Delete page images, fix for #869
This commit is contained in:
parent
8e528ca701
commit
5eb48f9060
@ -53,7 +53,7 @@
|
||||
echo Bootstrap::formSelect(array(
|
||||
'name'=>'role',
|
||||
'label'=>$L->g('Role'),
|
||||
'options'=>array('editor'=>$L->g('Editor'), 'admin'=>$L->g('Administrator')),
|
||||
'options'=>array('writer'=>$L->g('Writer'), 'editor'=>$L->g('Editor'), 'admin'=>$L->g('Administrator')),
|
||||
'selected'=>$user->role(),
|
||||
'class'=>'',
|
||||
'tip'=>''
|
||||
|
@ -280,6 +280,9 @@ class Pages extends dbJSON {
|
||||
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to delete the directory '.PATH_PAGES.$key);
|
||||
}
|
||||
|
||||
// Delete page images directory; The function already check if exists the directory
|
||||
Filesystem::deleteRecursive(PATH_UPLOADS_PAGES.$this->db[$key]['uuid']);
|
||||
|
||||
// Remove from database
|
||||
unset($this->db[$key]);
|
||||
|
||||
|
@ -13,7 +13,7 @@ class User {
|
||||
$row = $users->getDefaultFields();
|
||||
} else {
|
||||
if (Text::isEmpty($username) || !$users->exists($username)) {
|
||||
$errorMessage = 'User not found in database by username ['.$username.']';
|
||||
$errorMessage = 'User not found in the database by username ['.$username.']';
|
||||
Log::set(__METHOD__.LOG_SEP.$errorMessage);
|
||||
throw new Exception($errorMessage);
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ class Users extends dbJSON {
|
||||
'firstName'=>'',
|
||||
'lastName'=>'',
|
||||
'nickname'=>'',
|
||||
'role'=>'editor', // admin, editor
|
||||
'role'=>'editor', // admin, editor, writer
|
||||
'password'=>'',
|
||||
'salt'=>'!Pink Floyd!Welcome to the machine!',
|
||||
'email'=>'',
|
||||
|
Loading…
Reference in New Issue
Block a user