From: Shaun M. <sin...@us...> - 2006-03-01 18:18:33
|
Update of /cvsroot/phpwsbb/phpwsbb/class In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28337 Modified Files: Thread.php Log Message: RFE # [ 1044661 ] Posting to a locked thread Removing Popbox Titles on boxes with messages eg. monitor/unmonitor Index: Thread.php =================================================================== RCS file: /cvsroot/phpwsbb/phpwsbb/class/Thread.php,v retrieving revision 1.84 retrieving revision 1.85 diff -C2 -d -r1.84 -r1.85 *** Thread.php 1 Mar 2006 14:45:16 -0000 1.84 --- Thread.php 1 Mar 2006 18:18:28 -0000 1.85 *************** *** 219,225 **** if (!$ro) { ! $reply = $_SESSION['translate']->it('Reply'); ! $tags['REPLY'] = $this->createLink($reply, array('PHPWSBB_MAN_OP'=>'reply', ! 'PHPWS_MAN_ITEMS[]'=>$this->getId()), 'reply_message.png', 16, 16); if ($_SESSION['OBJ_user']->allow_access('phpwsbb', 'lock_threads') && $this->isModerator) { if ($this->_locked) { --- 219,227 ---- if (!$ro) { ! if (!$this->_locked || $_SESSION['OBJ_user']->allow_access('phpwsbb', 'edit_messages') || $this->isModerator) { ! $reply = $_SESSION['translate']->it('Reply'); ! $tags['REPLY'] = $this->createLink($reply, array('PHPWSBB_MAN_OP'=>'reply', ! 'PHPWS_MAN_ITEMS[]'=>$this->getId()), 'reply_message.png', 16, 16); ! } if ($_SESSION['OBJ_user']->allow_access('phpwsbb', 'lock_threads') && $this->isModerator) { if ($this->_locked) { *************** *** 467,472 **** } else { - $title = $_SESSION['translate']->it('Delete Topic Confirmation'); - $form = new EZform('PHPWSBB_Thread_delete'); $form->add('module', 'hidden', 'phpwsbb'); --- 469,472 ---- *************** *** 480,485 **** $tags['MESSAGE'] = $_SESSION['translate']->it('Are you sure you want to delete this topic?'); ! $content = PHPWS_Template::processTemplate($tags, 'phpwsbb', 'delete.tpl'); ! $_SESSION['OBJ_layout']->popbox($title, $content, NULL, 'CNT_phpwsbb'); } --- 480,485 ---- $tags['MESSAGE'] = $_SESSION['translate']->it('Are you sure you want to delete this topic?'); ! $GLOBALS['CNT_phpwsbb']['title'] = $_SESSION['translate']->it('Delete Topic Confirmation'); ! $GLOBALS['CNT_phpwsbb']['content'] = PHPWS_Template::processTemplate($tags, 'phpwsbb', 'delete.tpl'); } *************** *** 586,590 **** if ($_SESSION['PHPWSBB_Manager']->_allow_user_monitors) { if (empty($_SESSION['OBJ_user']->user_id)) { ! $GLOBALS['CNT_phpwsbb']['content'] .= '<div class="errortext">' . $_SESSION['translate']->it('You must be a registered user and logged in to monitor topics.') . '</div>'; } else { $data = array(); --- 586,590 ---- if ($_SESSION['PHPWSBB_Manager']->_allow_user_monitors) { if (empty($_SESSION['OBJ_user']->user_id)) { ! $content = '<div class="errortext">' . $_SESSION['translate']->it('You must be a registered user and logged in to monitor topics.') . '</div>'; } else { $data = array(); *************** *** 592,608 **** $data['user_id'] = $_SESSION['OBJ_user']->user_id; if ($GLOBALS['core']->sqlInsert($data, 'mod_phpwsbb_monitors', TRUE, FALSE, FALSE, FALSE)) { ! $GLOBALS['CNT_phpwsbb']['content'] .= $_SESSION['translate']->it('You are now monitoring the topic "[var1]" and will be emailed when there is a new reply.', PHPWS_Text::parseOutput($this->getLabel())); $this->monitored = TRUE; } else { ! $GLOBALS['CNT_phpwsbb']['content'] .= '<div class="errortext">' . $_SESSION['translate']->it('There was a problem adding the monitor entry. Please try again or contact the system administrator.') . '</div>'; } ! $GLOBALS['CNT_phpwsbb']['content'] .= '<p>' . $this->createLink($_SESSION['translate']->it('Back to the topic.'), array('PHPWSBB_MAN_OP'=>'view','PHPWS_MAN_ITEMS[]'=>$this->getId())) . ' | '; ! $GLOBALS['CNT_phpwsbb']['content'] .= $this->createLink($_SESSION['translate']->it('Back to the forum.'), array('PHPWSBB_MAN_OP'=>'viewforum','PHPWS_MAN_ITEMS[]'=>$this->_fid)) . '</p>'; } ! ! //$_REQUEST['PHPWSBB_THREAD_OP'] = 'view'; ! //$this->action(); } }// END FUNC _monitor --- 592,606 ---- $data['user_id'] = $_SESSION['OBJ_user']->user_id; if ($GLOBALS['core']->sqlInsert($data, 'mod_phpwsbb_monitors', TRUE, FALSE, FALSE, FALSE)) { ! $content = $_SESSION['translate']->it('You are now monitoring the topic "[var1]" and will be emailed when there is a new reply.', PHPWS_Text::parseOutput($this->getLabel())); $this->monitored = TRUE; } else { ! $content = '<div class="errortext">' . $_SESSION['translate']->it('There was a problem adding the monitor entry. Please try again or contact the system administrator.') . '</div>'; } ! $content .= '<p>' . $this->createLink($_SESSION['translate']->it('Back to the topic.'), array('PHPWSBB_MAN_OP'=>'view','PHPWS_MAN_ITEMS[]'=>$this->getId())) . ' | '; ! $content .= $this->createLink($_SESSION['translate']->it('Back to the forum.'), array('PHPWSBB_MAN_OP'=>'viewforum','PHPWS_MAN_ITEMS[]'=>$this->_fid)) . '</p>'; } ! return $content; } }// END FUNC _monitor *************** *** 615,627 **** $data['user_id'] = $_SESSION['OBJ_user']->user_id; if ($GLOBALS['core']->sqlDelete('mod_phpwsbb_monitors', $data)) { ! $GLOBALS['CNT_phpwsbb']['content'] .= $_SESSION['translate']->it('Monitor successfully removed.'); $this->monitored = FALSE; } else { ! $GLOBALS['CNT_phpwsbb']['content'] .= '<div class="errortext">' . $_SESSION['translate']->it('There was a problem removing the monitor entry. Please try again or contact the system administrator.') . '</div>'; } ! $GLOBALS['CNT_phpwsbb']['content'] .= '<p>' . $this->createLink($_SESSION['translate']->it('Back to the topic.'), ! array('PHPWSBB_MAN_OP'=>'view','PHPWS_MAN_ITEMS[]'=>$this->getId())) . ' | '; ! $GLOBALS['CNT_phpwsbb']['content'] .= $this->createLink($_SESSION['translate']->it('Back to the forum.'), ! array('PHPWSBB_MAN_OP'=>'viewforum','PHPWS_MAN_ITEMS[]'=>$this->_fid)) . '</p>'; } }// END FUNC _unmonitor --- 613,626 ---- $data['user_id'] = $_SESSION['OBJ_user']->user_id; if ($GLOBALS['core']->sqlDelete('mod_phpwsbb_monitors', $data)) { ! $content = $_SESSION['translate']->it('Monitor successfully removed.'); $this->monitored = FALSE; } else { ! $content = '<div class="errortext">' . $_SESSION['translate']->it('There was a problem removing the monitor entry. Please try again or contact the system administrator.') . '</div>'; } ! $content .= '<p>' . $this->createLink($_SESSION['translate']->it('Back to the topic.'), ! array('PHPWSBB_MAN_OP'=>'view','PHPWS_MAN_ITEMS[]'=>$this->getId())) . ' | '; ! $content .= $this->createLink($_SESSION['translate']->it('Back to the forum.'), ! array('PHPWSBB_MAN_OP'=>'viewforum','PHPWS_MAN_ITEMS[]'=>$this->_fid)) . '</p>'; ! return $content; } }// END FUNC _unmonitor *************** *** 632,636 **** $this->_fid = $_REQUEST['Thread_fid']; if ($oldfid == $this->_fid) ! return $_SESSION['translate']->it('You tried to move it to current forum.'); $this->commit(); --- 631,635 ---- $this->_fid = $_REQUEST['Thread_fid']; if ($oldfid == $this->_fid) ! return '<div class="errortext">' . $_SESSION['translate']->it('You tried to move it to current forum.') . '</div>'; $this->commit(); *************** *** 676,684 **** case 'monitor': ! $this->_monitor(); break; case 'unmonitor': ! $this->_unmonitor(); break; --- 675,687 ---- case 'monitor': ! $title = $_SESSION['translate']->it('Monitor'); ! $content = $_SESSION['PHPWSBB_Manager']->_menu(NULL, $this); ! $content .= $this->_monitor(); break; case 'unmonitor': ! $title = $_SESSION['translate']->it('Monitor'); ! $content = $_SESSION['PHPWSBB_Manager']->_menu(NULL, $this); ! $content .= $this->_unmonitor(); break; |