mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 15:32:13 +00:00
first check if folder has parent before accessing the parent
This commit is contained in:
parent
fc6a034c2b
commit
d3caff7cdc
|
@ -145,7 +145,10 @@ if ($action == "setowner") {
|
|||
$message = "ownership_changed_email_body";
|
||||
$params = array();
|
||||
$params['name'] = $folder->getName();
|
||||
$params['folder_path'] = $folder->getFolderPathPlain();
|
||||
if($folder->getParent())
|
||||
$params['folder_path'] = $folder->getParent()->getFolderPathPlain();
|
||||
else
|
||||
$params['folder_path'] = $folder->getFolderPathPlain();
|
||||
$params['username'] = $user->getFullName();
|
||||
$params['old_owner'] = $oldOwner->getFullName();
|
||||
$params['new_owner'] = $newOwner->getFullName();
|
||||
|
@ -189,7 +192,10 @@ else if ($action == "notinherit") {
|
|||
$message = "access_permission_changed_email_body";
|
||||
$params = array();
|
||||
$params['name'] = $folder->getName();
|
||||
$params['folder_path'] = $folder->getParent()->getFolderPathPlain();
|
||||
if($folder->getParent())
|
||||
$params['folder_path'] = $folder->getParent()->getFolderPathPlain();
|
||||
else
|
||||
$params['folder_path'] = $folder->getFolderPathPlain();
|
||||
$params['username'] = $user->getFullName();
|
||||
$params['url'] = "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewFolder.php?folderid=".$folder->getID();
|
||||
$params['sitename'] = $settings->_siteName;
|
||||
|
@ -222,7 +228,10 @@ else if ($action == "notinherit") {
|
|||
$message = "access_permission_changed_email_body";
|
||||
$params = array();
|
||||
$params['name'] = $folder->getName();
|
||||
$params['folder_path'] = $folder->getFolderPathPlain();
|
||||
if($folder->getParent())
|
||||
$params['folder_path'] = $folder->getParent()->getFolderPathPlain();
|
||||
else
|
||||
$params['folder_path'] = $folder->getFolderPathPlain();
|
||||
$params['username'] = $user->getFullName();
|
||||
$params['url'] = "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewFolder.php?folderid=".$folder->getID();
|
||||
$params['sitename'] = $settings->_siteName;
|
||||
|
@ -273,7 +282,10 @@ else if ($action == "inherit") {
|
|||
$message = "access_permission_changed_email_body";
|
||||
$params = array();
|
||||
$params['name'] = $folder->getName();
|
||||
$params['folder_path'] = $folder->getParent()->getFolderPathPlain();
|
||||
if($folder->getParent())
|
||||
$params['folder_path'] = $folder->getParent()->getFolderPathPlain();
|
||||
else
|
||||
$params['folder_path'] = $folder->getFolderPathPlain();
|
||||
$params['username'] = $user->getFullName();
|
||||
$params['url'] = "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewFolder.php?folderid=".$folder->getID();
|
||||
$params['sitename'] = $settings->_siteName;
|
||||
|
|
Loading…
Reference in New Issue
Block a user