|
From: <dts...@us...> - 2003-05-23 04:09:31
|
Update of /cvsroot/phpwebsite-comm/modules/phpwsbb/class
In directory sc8-pr-cvs1:/tmp/cvs-serv19373/class
Modified Files:
Manager.php Message.php
Log Message:
Updates
Index: Manager.php
===================================================================
RCS file: /cvsroot/phpwebsite-comm/modules/phpwsbb/class/Manager.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Manager.php 22 May 2003 02:53:34 -0000 1.4
--- Manager.php 23 May 2003 04:09:28 -0000 1.5
***************
*** 17,20 ****
--- 17,30 ----
+ function _menu() {
+ $links = array();
+ $links[] = "<a href=\"index.php?module=phpwsbb&PHPWSBB_MAN_OP=list\">" . $_SESSION["translate"]->it("List Messages") . "</a>";
+ $links[] = "<a href=\"index.php?module=phpwsbb&PHPWSBB_MAN_OP=new\">" . $_SESSION["translate"]->it("Add New Message") . "</a>";
+
+ $menu = "<div align=\"right\">" . implode(" | ", $links) . "</div><br />";
+ return $menu;
+ }
+
+
function _list() {
$GLOBALS["CNT_phpwsbb"]["title"] = $_SESSION["translate"]->it("Bulletin Board Messages");
***************
*** 24,28 ****
$links[] = "<a href=\"index.php?module=phpwsbb&PHPWSBB_MAN_OP=new\">" . $_SESSION["translate"]->it("Add New Message") . "</a>";
! $GLOBALS["CNT_phpwsbb"]["content"] .= "<div align=\"right\">" . implode(" | ", $links) . "</div><br />";
$GLOBALS["CNT_phpwsbb"]["content"] .= $this->getList("messages", $_SESSION["translate"]->it("Bulletin Board Messages"), FALSE);
--- 34,38 ----
$links[] = "<a href=\"index.php?module=phpwsbb&PHPWSBB_MAN_OP=new\">" . $_SESSION["translate"]->it("Add New Message") . "</a>";
! $GLOBALS["CNT_phpwsbb"]["content"] .= $this->_menu();
$GLOBALS["CNT_phpwsbb"]["content"] .= $this->getList("messages", $_SESSION["translate"]->it("Bulletin Board Messages"), FALSE);
***************
*** 53,61 ****
function action() {
switch($_REQUEST["PHPWSBB_MAN_OP"]) {
- /*
- case "list":
- $content = $this->_list();
- break;
- */
case "new":
$content = $this->_new();
--- 63,66 ----
Index: Message.php
===================================================================
RCS file: /cvsroot/phpwebsite-comm/modules/phpwsbb/class/Message.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** Message.php 22 May 2003 02:53:34 -0000 1.5
--- Message.php 23 May 2003 04:09:28 -0000 1.6
***************
*** 7,19 ****
class PHPWSBB_Message extends PHPWS_Item {
! var $_pid = 0;
! var $_guestname = NULL;
! var $_guestemail = NULL;
! var $_body = NULL;
! var $_sticky = 0;
function PHPWSBB_Message($MESSAGE_ID = NULL) {
/* These variable are excluded when calling commit() */
! $exclude[] = "";
$this->addExclude($exclude);
--- 7,85 ----
class PHPWSBB_Message extends PHPWS_Item {
! /**
! * The parent id of this message
! *
! * @var integer
! * @access private
! */
! var $_pid = 0;
!
! /**
! * The name used by guest poster
! *
! * @var string
! * @access private
! */
! var $_guestname = NULL;
!
! /**
! * The email address used by guest poster
! *
! * @var string
! * @access private
! */
! var $_guestemail = NULL;
!
! /**
! * The body of the message
! *
! * @var string
! * @access private
! */
! var $_body = NULL;
!
! /**
! * Sticky flag
! *
! * @var bit
! * @access private
! */
! var $_sticky = 0;
!
! /**
! * Locked flag
! *
! * @var bit
! * @access private
! */
! var $_locked = 0;
!
! /**
! * Number of replies to this message
! *
! * @var integer
! * @access private
! */
! var $_replies = 0;
!
! /**
! * Timestamp of last post
! *
! * @var string
! * @access private
! */
! var $_lastpost = NULL;
!
! /**
! * The ids of all the messages under this one
! *
! * @var array
! * @access private
! */
! var $children = array();
function PHPWSBB_Message($MESSAGE_ID = NULL) {
/* These variable are excluded when calling commit() */
! $exclude = array("children","_replies","_lastpost");
$this->addExclude($exclude);
***************
*** 25,29 ****
--- 91,98 ----
$this->setId($MESSAGE_ID);
$this->init();
+ $sql = "SELECT id FROM " . $GLOBALS["core"]->tbl_prefix . "mod_phpwsbb_messages WHERE pid=" . $this->getId() . " ORDER BY created;";
+ $this->children = $GLOBALS["core"]->getCol($sql);
}
+
}// END FUNC PHPWSBB_Message
***************
*** 43,46 ****
--- 112,119 ----
$tags["GUESTEMAIL"] = $this->_guestemail;
$tags["PID"] = $this->_pid;
+ $tags["STICKY"] = $this->_sticky;
+ $tags["LOCKED"] = $this->_locked;
+ $tags["REPLIES"] = $this->_replies;
+ $tags["LASTPOST"] = $this->_lastpost;
$poster = $this->getOwner();
***************
*** 52,56 ****
$tags["POSTED"] = $_SESSION["translate"]->it("Posted by [var1] on [var2]", $poster, $this->getCreated());
! $tags["REPLY"] = $_SESSION["translate"]->it("Reply to Message");
// 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_OP=reply&PHPWSBB_pid=" . $this->getId() . "\">" . $_SESSION["translate"]->it("Reply to Message") . "</a>";
// Need to cycle through all children still
***************
*** 177,181 ****
else
$title = $_SESSION["translate"]->it("New Message");
! $content = $this->_edit();
break;
case "save":
--- 250,255 ----
else
$title = $_SESSION["translate"]->it("New Message");
! $content = $_SESSION["PHPWSBB_Manager"]->_menu();
! $content .= $this->_edit();
break;
case "save":
***************
*** 183,188 ****
break;
case "view":
! $content = $this->_view();
break;
case "fork":
case "lock":
--- 257,264 ----
break;
case "view":
! $content = $_SESSION["PHPWSBB_Manager"]->_menu();
! $content .= $this->_view();
break;
+ case "delete":
case "fork":
case "lock":
|