Update of /cvsroot/phpwsbb/phpwsbb/class
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30056
Modified Files:
Forum.php Message.php
Log Message:
Thread and Message edit/save fix
Index: Message.php
===================================================================
RCS file: /cvsroot/phpwsbb/phpwsbb/class/Message.php,v
retrieving revision 1.78
retrieving revision 1.79
diff -C2 -d -r1.78 -r1.79
*** Message.php 4 Mar 2005 18:19:42 -0000 1.78
--- Message.php 21 Mar 2005 20:37:19 -0000 1.79
***************
*** 321,324 ****
--- 321,325 ----
/* Module Information */
$form->add('module', 'hidden', 'phpwsbb');
+ $form->add('PHPWSBB_ITEMS[]', 'hidden', $this->getId());
$form->add('PHPWSBB_MESSAGE_OP', 'hidden', 'save');
$form->add('Message_tid', 'hidden', $this->_tid);
***************
*** 357,360 ****
--- 358,364 ----
*/
function _save() {
+ if (isset($_POST['PHPWSBB_ITEMS'])
+ && sizeof($_POST['PHPWSBB_ITEMS']) > 0 && is_array($_POST['PHPWSBB_ITEMS']))
+ $this->PHPWSBB_Message($_POST['PHPWSBB_ITEMS'][0]);
if (!empty($this->_id) && !$_SESSION['OBJ_user']->allow_access('phpwsbb', 'edit_messages') && !$this->isModerator && ($_SESSION['OBJ_user']->username != $this->getOwner())) {
$message = $_SESSION['translate']->it('Access to save message [var1] was denied due to lack of proper permissions.', $this->_id);
Index: Forum.php
===================================================================
RCS file: /cvsroot/phpwsbb/phpwsbb/class/Forum.php,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -d -r1.38 -r1.39
*** Forum.php 21 Mar 2005 17:23:10 -0000 1.38
--- Forum.php 21 Mar 2005 20:37:18 -0000 1.39
***************
*** 259,262 ****
--- 259,263 ----
/* Module Information */
$form->add('module', 'hidden', 'phpwsbb');
+ $form->add('PHPWSBB_ITEMS[]', 'hidden', $this->getId());
$form->add('PHPWSBB_FORUM_OP', 'hidden', 'save');
***************
*** 309,312 ****
--- 310,316 ----
function _save() {
+ if (isset($_POST['PHPWSBB_ITEMS'])
+ && sizeof($_POST['PHPWSBB_ITEMS']) > 0 && is_array($_POST['PHPWSBB_ITEMS']))
+ $this->PHPWSBB_Forum($_POST['PHPWSBB_ITEMS'][0]);
if(!empty($this->_id) && !($_SESSION['OBJ_user']->allow_access('phpwsbb', 'edit_messages') && $this->isModerator) && ($_SESSION['OBJ_user']->username != $this->getOwner())) {
$message = $_SESSION['translate']->it('Access to save message [var1] was denied due to lack of proper permissions.', $this->_id);
***************
*** 315,319 ****
return FALSE;
}
!
if(isset($_REQUEST['Forum_label']))
$error = $this->setLabel(PHPWS_Text::parseInput($_REQUEST['Forum_label']));
--- 319,325 ----
return FALSE;
}
! echo $this->getOwner();
! if(!empty($this->_id) && ($_SESSION['OBJ_user']->username != $this->getOwner()))
! echo 'poop';
if(isset($_REQUEST['Forum_label']))
$error = $this->setLabel(PHPWS_Text::parseInput($_REQUEST['Forum_label']));
|