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,6 +145,9 @@ if ($action == "setowner") {
|
|||
$message = "ownership_changed_email_body";
|
||||
$params = array();
|
||||
$params['name'] = $folder->getName();
|
||||
if($folder->getParent())
|
||||
$params['folder_path'] = $folder->getParent()->getFolderPathPlain();
|
||||
else
|
||||
$params['folder_path'] = $folder->getFolderPathPlain();
|
||||
$params['username'] = $user->getFullName();
|
||||
$params['old_owner'] = $oldOwner->getFullName();
|
||||
|
@ -189,7 +192,10 @@ else if ($action == "notinherit") {
|
|||
$message = "access_permission_changed_email_body";
|
||||
$params = array();
|
||||
$params['name'] = $folder->getName();
|
||||
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,6 +228,9 @@ else if ($action == "notinherit") {
|
|||
$message = "access_permission_changed_email_body";
|
||||
$params = array();
|
||||
$params['name'] = $folder->getName();
|
||||
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();
|
||||
|
@ -273,7 +282,10 @@ else if ($action == "inherit") {
|
|||
$message = "access_permission_changed_email_body";
|
||||
$params = array();
|
||||
$params['name'] = $folder->getName();
|
||||
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