check if autosave exists
This commit is contained in:
parent
f59f55f5d4
commit
6b1020f0c4
|
@ -325,10 +325,10 @@ function editPage($args) {
|
||||||
|
|
||||||
// Check if the autosave page exists for this new page and delete it
|
// Check if the autosave page exists for this new page and delete it
|
||||||
if (isset($args['uuid'])) {
|
if (isset($args['uuid'])) {
|
||||||
$pageKey = $pages->getByUUID('autosave-'.$args['uuid']);
|
$autosaveKey = $pages->getByUUID('autosave-'.$args['uuid']);
|
||||||
if (!empty($pageKey)) {
|
if ($autosaveKey) {
|
||||||
Log::set('Function editPage()'.LOG_SEP.'Autosave deleted for '.$args['title'], LOG_TYPE_INFO);
|
Log::set('Function editPage()'.LOG_SEP.'Autosave deleted for '.$autosaveKey, LOG_TYPE_INFO);
|
||||||
deletePage($pageKey);
|
deletePage($autosaveKey);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -355,7 +355,7 @@ function editPage($args) {
|
||||||
// Add to syslog
|
// Add to syslog
|
||||||
$syslog->add(array(
|
$syslog->add(array(
|
||||||
'dictionaryKey'=>'content-edited',
|
'dictionaryKey'=>'content-edited',
|
||||||
'notes'=>$args['title']
|
'notes'=>empty($args['title'])?$key:$args['title']
|
||||||
));
|
));
|
||||||
|
|
||||||
return $key;
|
return $key;
|
||||||
|
|
Loading…
Reference in New Issue