Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
6e45b2f9
Commit
6e45b2f9
authored
Jan 12, 2006
by
Dries
Browse files
- Patch
#42029
by drumm: correct post times for administrators posting using a blogapi client.
parent
47ae354e
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/blogapi.module
View file @
6e45b2f9
...
...
@@ -223,6 +223,9 @@ function blogapi_blogger_new_post($appkey, $blogid, $username, $password, $conte
return
blogapi_error
(
t
(
'You do not have permission to create the type of post you wanted to create.'
));
}
if
(
user_access
(
'administer nodes'
)
&&
!
isset
(
$edit
[
'date'
]))
{
$edit
[
'date'
]
=
format_date
(
time
(),
'custom'
,
'Y-m-d H:i:s O'
);
}
$node
=
node_submit
(
$edit
);
node_save
(
$node
);
if
(
$node
->
nid
)
{
...
...
@@ -274,6 +277,9 @@ function blogapi_blogger_edit_post($appkey, $postid, $username, $password, $cont
return
blogapi_error
(
implode
(
"
\n
"
,
$errors
));
}
if
(
user_access
(
'administer nodes'
)
&&
!
isset
(
$edit
[
'date'
]))
{
$node
->
date
=
format_date
(
$node
->
created
,
'custom'
,
'Y-m-d H:i:s O'
);
}
$node
=
node_submit
(
$node
);
node_save
(
$node
);
if
(
$node
->
nid
)
{
...
...
modules/blogapi/blogapi.module
View file @
6e45b2f9
...
...
@@ -223,6 +223,9 @@ function blogapi_blogger_new_post($appkey, $blogid, $username, $password, $conte
return
blogapi_error
(
t
(
'You do not have permission to create the type of post you wanted to create.'
));
}
if
(
user_access
(
'administer nodes'
)
&&
!
isset
(
$edit
[
'date'
]))
{
$edit
[
'date'
]
=
format_date
(
time
(),
'custom'
,
'Y-m-d H:i:s O'
);
}
$node
=
node_submit
(
$edit
);
node_save
(
$node
);
if
(
$node
->
nid
)
{
...
...
@@ -274,6 +277,9 @@ function blogapi_blogger_edit_post($appkey, $postid, $username, $password, $cont
return
blogapi_error
(
implode
(
"
\n
"
,
$errors
));
}
if
(
user_access
(
'administer nodes'
)
&&
!
isset
(
$edit
[
'date'
]))
{
$node
->
date
=
format_date
(
$node
->
created
,
'custom'
,
'Y-m-d H:i:s O'
);
}
$node
=
node_submit
(
$node
);
node_save
(
$node
);
if
(
$node
->
nid
)
{
...
...
Write
Preview
Markdown
is supported
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