From: <dts...@us...> - 2003-06-03 16:23:16
|
Update of /cvsroot/phpwebsite-comm/modules/phpwsbb/class In directory sc8-pr-cvs1:/tmp/cvs-serv14102/class Modified Files: Manager.php Message.php Log Message: Updates for adding replies and lastreply fields Index: Manager.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/phpwsbb/class/Manager.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Manager.php 23 May 2003 04:09:28 -0000 1.5 --- Manager.php 3 Jun 2003 16:22:41 -0000 1.6 *************** *** 8,11 **** --- 8,19 ---- var $message = NULL; + + /** + * The message object + * + * @var PHPWSBB_Message + * @access public + */ + var $phpwsbb_message = NULL; function PHPWSBB_Manager() { *************** *** 41,46 **** function _view($id) { ! $this->message = new PHPWSBB_Message($id[0]); ! $_REQUEST["PHPWSBB_OP"] = "view"; }// END FUNC _view --- 49,54 ---- function _view($id) { ! $this->phpwsbb_message = new PHPWSBB_Message($id[0]); ! $_REQUEST["PHPWSBB_MESSAGE_OP"] = "view"; }// END FUNC _view *************** *** 48,53 **** function _new() { // Will pid be passed along so I don't need separate reply() function? ! $this->message = new PHPWSBB_Message; ! $_REQUEST["PHPWSBB_OP"] = "edit"; }// END FUNC _new --- 56,61 ---- function _new() { // Will pid be passed along so I don't need separate reply() function? ! $this->phpwsbb_message = new PHPWSBB_Message; ! $_REQUEST["PHPWSBB_MESSAGE_OP"] = "edit"; }// END FUNC _new Index: Message.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/phpwsbb/class/Message.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Message.php 23 May 2003 04:09:28 -0000 1.6 --- Message.php 3 Jun 2003 16:22:41 -0000 1.7 *************** *** 69,73 **** * @access private */ ! var $_lastpost = NULL; /** --- 69,73 ---- * @access private */ ! var $_lastreply = NULL; /** *************** *** 81,85 **** function PHPWSBB_Message($MESSAGE_ID = NULL) { /* These variable are excluded when calling commit() */ ! $exclude = array("children","_replies","_lastpost"); $this->addExclude($exclude); --- 81,85 ---- function PHPWSBB_Message($MESSAGE_ID = NULL) { /* These variable are excluded when calling commit() */ ! $exclude = array("children"); $this->addExclude($exclude); *************** *** 115,119 **** $tags["LOCKED"] = $this->_locked; $tags["REPLIES"] = $this->_replies; ! $tags["LASTPOST"] = $this->_lastpost; $poster = $this->getOwner(); --- 115,119 ---- $tags["LOCKED"] = $this->_locked; $tags["REPLIES"] = $this->_replies; ! $tags["LASTREPLY"] = $this->_lastreply; $poster = $this->getOwner(); *************** *** 125,129 **** $tags["POSTED"] = $_SESSION["translate"]->it("Posted by [var1] on [var2]", $poster, $this->getCreated()); ! $tags["REPLY"] = "<a href=\"./index.php?module=phpwsbb&PHPWSBB_OP=reply&PHPWSBB_pid=" . $this->getId() . "\">" . $_SESSION["translate"]->it("Reply to Message") . "</a>"; // Need to cycle through all children still --- 125,129 ---- $tags["POSTED"] = $_SESSION["translate"]->it("Posted by [var1] on [var2]", $poster, $this->getCreated()); ! $tags["REPLY"] = "<a href=\"./index.php?module=phpwsbb&PHPWSBB_MESSAGE_OP=reply&PHPWSBB_pid=" . $this->getId() . "\">" . $_SESSION["translate"]->it("Reply to Message") . "</a>"; // Need to cycle through all children still *************** *** 186,190 **** /* Module Information */ $form->add("module", "hidden", "phpwsbb"); ! $form->add("PHPWSBB_OP", "hidden", "save"); $form->add("Message_pid", "hidden", $_REQUEST["Message_pid"]); --- 186,190 ---- /* Module Information */ $form->add("module", "hidden", "phpwsbb"); ! $form->add("PHPWSBB_MESSAGE_OP", "hidden", "save"); $form->add("Message_pid", "hidden", $_REQUEST["Message_pid"]); *************** *** 232,241 **** $error->message("CNT_phpwsbb"); ! $_REQUEST["PHPWSBB_OP"] = "edit"; $this->action(); return; } else { $GLOBALS["CNT_phpwsbb"]["content"] .= $_SESSION["translate"]->it("Your message was successfully saved.") . "<br />\n"; ! $_REQUEST["PHPWSBB_OP"] = "view"; $this->action(); } --- 232,241 ---- $error->message("CNT_phpwsbb"); ! $_REQUEST["PHPWSBB_MESSAGE_OP"] = "edit"; $this->action(); return; } else { $GLOBALS["CNT_phpwsbb"]["content"] .= $_SESSION["translate"]->it("Your message was successfully saved.") . "<br />\n"; ! $_REQUEST["PHPWSBB_MESSAGE_OP"] = "view"; $this->action(); } *************** *** 244,248 **** function action() { ! switch($_REQUEST["PHPWSBB_OP"]) { case "edit": if(isset($this->_id)) --- 244,248 ---- function action() { ! switch($_REQUEST["PHPWSBB_MESSAGE_OP"]) { case "edit": if(isset($this->_id)) |