From: <dts...@us...> - 2003-05-21 15:54:16
|
Update of /cvsroot/phpwebsite-comm/modules/phpwsbb/class In directory sc8-pr-cvs1:/tmp/cvs-serv26782/class Modified Files: Manager.php Message.php Log Message: Got an edit screen! Index: Manager.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/phpwsbb/class/Manager.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Manager.php 20 May 2003 21:59:16 -0000 1.2 --- Manager.php 21 May 2003 15:54:12 -0000 1.3 *************** *** 45,48 **** --- 45,49 ---- function _accessDenied() { $message = $_SESSION["translate"]->it("Access was denied due to lack of proper permissions."); + $error = new PHPWS_Error("phpwsbb", "PHPWSBB_Manager::_accessDenied()", $message, "exit", 1); $error->message(); *************** *** 54,57 **** --- 55,59 ---- case "new": $content = $this->_new(); + break; case "access_denied": $this->_accessDenied(); Index: Message.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/phpwsbb/class/Message.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Message.php 20 May 2003 21:59:16 -0000 1.2 --- Message.php 21 May 2003 15:54:13 -0000 1.3 *************** *** 30,37 **** function _edit() { ! if(!$_SESSION["OBJ_user"]->allow_access("phpwsbb", "edit_message")) { ! $_REQUEST["PHPWSBB_MAN_OP"] = "access_denied"; ! $_SESSION["PHPWSBB_Manager"]->action(); return FALSE; } --- 30,41 ---- function _edit() { ! if(!empty($this->_id) && !$_SESSION["OBJ_user"]->allow_access("phpwsbb", "edit_messages")) { ! //$_REQUEST["PHPWSBB_MAN_OP"] = "access_denied"; ! //$_SESSION["PHPWSBB_Manager"]->action(); ! $message = $_SESSION["translate"]->it("Access to edit message $this->_id was denied due to lack of proper permissions."); ! $error = new PHPWS_Error("phpwsbb", "PHPWSBB_Message::_edit()", $message, "exit", 1); ! $error->message(); return FALSE; + } *************** *** 44,47 **** --- 48,52 ---- /* Guest information, if not registered user */ if(empty($_SESSION["OBJ_user"]->user_id)) { + $tags["GUESTNAME_TEXT"] = $_SESSION["translate"]->it("Guest Name"); $form->add("Message_guestname", "text", $this->_guestname); $form->setSize("Message_guestname", 33); *************** *** 50,53 **** --- 55,59 ---- $tabs++; + $tags["GUESTEMAIL_TEXT"] = $_SESSION["translate"]->it("Guest Email"); $form->add("Message_guestemail", "text", $this->_guestemail); $form->setSize("Message_guestemail", 33); *************** *** 87,91 **** $tags["MESSAGE_BODY"] = $GLOBALS["core"]->js_insert("wysiwyg", "PHPWSBB_Message_edit", "Message_body") . $tags["MESSAGE_BODY"]; ! return $GLOBALS["core"]->processTemplate($tags, "phpwsbb", "editMessage.tpl"); }// END FUNC _edit --- 93,97 ---- $tags["MESSAGE_BODY"] = $GLOBALS["core"]->js_insert("wysiwyg", "PHPWSBB_Message_edit", "Message_body") . $tags["MESSAGE_BODY"]; ! return $GLOBALS["core"]->processTemplate($tags, "phpwsbb", "edit.tpl"); }// END FUNC _edit *************** *** 93,99 **** function _save() { ! if(!$_SESSION["OBJ_user"]->allow_access("phpwsbb", "edit_message")) { ! $_REQUEST["PHPWSBB_MAN_OP"] = "access_denied"; ! $_SESSION["PHPWSBB_Manager"]->action(); return FALSE; } --- 99,108 ---- function _save() { ! if(!empty($this->_id) && !$_SESSION["OBJ_user"]->allow_access("phpwsbb", "edit_messages")) { ! //$_REQUEST["PHPWSBB_MAN_OP"] = "access_denied"; ! //$_SESSION["PHPWSBB_Manager"]->action(); ! $message = $_SESSION["translate"]->it("Access to save message $this->_id was denied due to lack of proper permissions."); ! $error = new PHPWS_Error("phpwsbb", "PHPWSBB_Manager::_accessDenied()", $message, "exit", 1); ! $error->message(); return FALSE; } |