Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
ba5606eb
Commit
ba5606eb
authored
Jan 16, 2007
by
Martyn Smith
Committed by
Martyn Smith
Jan 16, 2007
Browse files
Merge with
git+ssh://locke.catalyst.net.nz/var/git/mahara.git
parents
3cc65def
112c77d7
Changes
3
Hide whitespace changes
Inline
Side-by-side
htdocs/artefact/blog/editpost.php
View file @
ba5606eb
...
...
@@ -124,28 +124,29 @@ $getstring = quotestrings(array(
'myfiles'
,
),
'artefact.blog'
=>
array
(
'baseline'
,
'top'
,
'middle'
,
'bottom'
,
'texttop'
,
'absolutemiddle'
,
'absolutebottom'
,
'left'
,
'right'
,
'alignment'
,
'attach'
,
'baseline'
,
'blogpost'
,
'border'
,
'bottom'
,
'browsemyfiles'
,
'cancel'
,
'dimensions'
,
'horizontalspace'
,
'insert'
,
'insertimage'
,
'left'
,
'middle'
,
'name'
,
'nofilesattachedtothispost'
,
'remove'
,
'right'
,
'texttop'
,
'top'
,
'update'
,
'verticalspace'
,
'noimageshavebeenattachedtothispost'
,
)));
...
...
@@ -550,7 +551,8 @@ function blogpostExecCommandHandler(editor_id, elm, command, user_interface, val
INPUT({'type':'hidden', 'name':'imgid', 'value':a.alt}),
TABLE(null,tbody));
appendChildNodes(tbody, TR(null,TD({'colSpan':2},
INPUT({'type':'button', 'class':'button', 'value':{$getstring['insert']},
INPUT({'type':'button', 'class':'button',
'value':(a.src == '' ? {$getstring['insert']} : {$getstring['update']}),
'onclick':function () { insertImage(); }}),
INPUT({'type':'button', 'class':'button', 'value':{$getstring['cancel']},
'onclick':function () { replaceChildNodes('insertimage', null); }}))));
...
...
htdocs/artefact/blog/lang/en.utf8/artefact.blog.php
View file @
ba5606eb
...
...
@@ -93,6 +93,7 @@ $string['settings'] = 'Settings';
$string
[
'thisisdraft'
]
=
'This post is a draft'
;
$string
[
'thisisdraftdesc'
]
=
'When your post is a draft, no one except you can see it.'
;
$string
[
'title'
]
=
'Title'
;
$string
[
'update'
]
=
'Update'
;
$string
[
'verticalspace'
]
=
'Vertical space'
;
$string
[
'viewblog'
]
=
'View Blog'
;
$string
[
'youarenottheownerofthisblogpost'
]
=
'You are not the owner of this blog post'
;
...
...
htdocs/artefact/blog/saveblogpost.json.php
View file @
ba5606eb
...
...
@@ -109,6 +109,7 @@ if (!empty($uploads)) {
// we need to go through the body of the post and change the 'src' and
// 'alt' attributes of all images that refer to uploaded files.
if
(
!
empty
(
$uploadartefact
))
{
$originalbody
=
$body
;
foreach
(
$uploadartefact
as
$k
=>
$v
)
{
$regexps
=
array
(
'/\/artefact\/blog\/downloadtemp.php\?uploadnumber='
.
$k
.
'&createid=\d+/'
,
'/alt="uploaded:'
.
$k
.
'"/'
);
...
...
@@ -116,8 +117,11 @@ if (!empty($uploadartefact)) {
'alt="artefact:'
.
$v
.
'"'
);
$body
=
preg_replace
(
$regexps
,
$subs
,
$body
);
}
$postobj
->
set
(
'description'
,
$body
);
$postobj
->
commit
();
if
(
$body
!=
$originalbody
)
{
$postobj
=
new
ArtefactTypeBlogPost
(
$blogpost
,
null
);
$postobj
->
set
(
'description'
,
$body
);
$postobj
->
commit
();
}
}
json_reply
(
false
,
get_string
(
'blogpostsaved'
,
'artefact.blog'
));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment