diff --git a/campcaster/src/modules/htmlUI/var/templates/subjects/chgPasswd.tpl b/campcaster/src/modules/htmlUI/var/templates/subjects/chgPasswd.tpl index 4b08f50c3..525528cf1 100644 --- a/campcaster/src/modules/htmlUI/var/templates/subjects/chgPasswd.tpl +++ b/campcaster/src/modules/htmlUI/var/templates/subjects/chgPasswd.tpl @@ -1,6 +1,7 @@ -{assign var="dynform" value=$SUBJECTS->getChgPasswdForm(Subjects::GetSubjName($_REQUEST.id), false)} +{assign var="subjectName" value=$SUBJECTS->getSubjectName($_REQUEST.id)} +{assign var="dynform" value=$SUBJECTS->getChgPasswdForm($subjectName)}
-

{tra str='Change password for: $1' 1=Subjects::GetSubjName($_REQUEST.id)}

+

{tra str='Change password for: $1' 1=$subjectName}

{include file="sub/dynForm_plain.tpl"}
diff --git a/campcaster/src/modules/htmlUI/var/ui_subjects.class.php b/campcaster/src/modules/htmlUI/var/ui_subjects.class.php index 49873a2a4..58425783f 100644 --- a/campcaster/src/modules/htmlUI/var/ui_subjects.class.php +++ b/campcaster/src/modules/htmlUI/var/ui_subjects.class.php @@ -20,31 +20,37 @@ class uiSubjects } - function setReload() + public function setReload() { $this->Base->redirUrl = $this->reloadUrl; } - function setSuRedir() + public function setSuRedir() { $this->Base->redirUrl = $this->suRedirUrl; } - function setRedir() + public function setRedir() { $this->Base->redirUrl = $this->redirUrl; } + public function getSubjectName($p_name) + { + return Subjects::GetSubjName($p_name); + } + + /** * Create a form to add GreenBox subjects (users/groups). * * @param unknown $type * @return string (html) */ - function getAddSubjForm($type) + public function getAddSubjForm($type) { include(dirname(__FILE__). '/formmask/subjects.inc.php'); @@ -65,7 +71,7 @@ class uiSubjects * passwd - string * @return string */ - function addSubj($request) + public function addSubj($request) { include(dirname(__FILE__). '/formmask/subjects.inc.php'); $this->setRedir(); @@ -107,7 +113,7 @@ class uiSubjects * a string, the login name of removed user * @return boolean */ - function removeSubj($request) + public function removeSubj($request) { $this->setReload(); @@ -133,7 +139,7 @@ class uiSubjects * @return string * HTML string */ - function getChgPasswdForm($login, $su = FALSE) + public function getChgPasswdForm($login, $su = FALSE) { include(dirname(__FILE__). '/formmask/subjects.inc.php'); @@ -160,7 +166,7 @@ class uiSubjects * Required array keys: passwd, passwd2, login, oldpasswd * @return boolean */ - function chgPasswd($request) + public function chgPasswd($request) { if ($request['passwd'] !== $request['passwd2']) { $this->Base->_retMsg("Passwords did not match."); @@ -204,7 +210,7 @@ class uiSubjects * subj=>unique id of subject * loggedAs=>corresponding login name */ - function getSubjectsWCnt() + public function getSubjectsWCnt() { return Subjects::GetSubjectsWCnt(); } @@ -218,7 +224,7 @@ class uiSubjects * local user ID * @return array */ - function getGroupMember($id) + public function getGroupMember($id) { return Subjects::ListGroup($id); } // fn getGroupMember @@ -231,7 +237,7 @@ class uiSubjects * Local user ID * @return array */ - function getNonGroupMember($id) + public function getNonGroupMember($id) { foreach (Subjects::ListGroup($id) as $val1) { $members[$val1['id']] = TRUE; @@ -256,7 +262,7 @@ class uiSubjects * Required array keys: login, id, gname * @return boolean */ - function addSubj2Gr(&$request) + public function addSubj2Gr(&$request) { $this->setReload(); @@ -294,7 +300,7 @@ class uiSubjects * Required keys: login, id, gname * @return boolean */ - function removeSubjFromGr(&$request) + public function removeSubjFromGr(&$request) { $this->setReload(); @@ -331,7 +337,7 @@ class uiSubjects * @param string $groupname * @return boolean */ - function isMemberOf($groupname) + public function isMemberOf($groupname) { if ($gid = Subjects::GetSubjId($groupname)) { $members = $this->getGroupMember($gid); diff --git a/campcaster/src/modules/storageServer/var/GreenBox.php b/campcaster/src/modules/storageServer/var/GreenBox.php index 50234e92b..e3432d78b 100644 --- a/campcaster/src/modules/storageServer/var/GreenBox.php +++ b/campcaster/src/modules/storageServer/var/GreenBox.php @@ -1844,7 +1844,7 @@ class GreenBox extends BasicStor { "GreenBox::passwd: access denied (oldpass)", GBERR_DENY); } } - $res = parent::passwd($login, $oldpass, $pass); + $res = Subjects::Passwd($login, $oldpass, $pass); if (PEAR::isError($res)) { return $res; } @@ -1873,7 +1873,7 @@ class GreenBox extends BasicStor { if (($res = BasicStor::Authorize('editPerms', $parid, $sessid)) !== TRUE) { return $res; } - return parent::addPerm($sid, $action, $oid, $type); + return Alib::AddPerm($sid, $action, $oid, $type); } // fn addPerm