From: Shaun M. <sin...@us...> - 2005-07-20 17:31:09
|
Update of /cvsroot/phpwsbb/phpwsbb/class In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22527/class Modified Files: Message.php Thread.php Log Message: * Changes to 'save' messages and buttons to be in context * Allow 'Re:' to be translated Index: Thread.php =================================================================== RCS file: /cvsroot/phpwsbb/phpwsbb/class/Thread.php,v retrieving revision 1.77 retrieving revision 1.78 diff -C2 -d -r1.77 -r1.78 *** Thread.php 27 May 2005 00:13:45 -0000 1.77 --- Thread.php 20 Jul 2005 17:30:27 -0000 1.78 *************** *** 470,474 **** $error = $this->commit(); if (PHPWS_Error::isError($error)) { ! $message = $_SESSION['translate']->it('The topic could not be saved to the database.'); $error = new PHPWS_Error('phpwsbb', $message, 'continue', 0); $error->message('CNT_phpwsbb'); --- 470,477 ---- $error = $this->commit(); if (PHPWS_Error::isError($error)) { ! if ($unlock) ! $message = $_SESSION['translate']->it('The topic could not be unlocked.'); ! else ! $message = $_SESSION['translate']->it('The topic could not be locked.'); $error = new PHPWS_Error('phpwsbb', $message, 'continue', 0); $error->message('CNT_phpwsbb'); *************** *** 478,483 **** return; } else { ! $GLOBALS['CNT_phpwsbb']['content'] .= $_SESSION['translate']->it('The topic was successfully saved.') . '<br />'; ! $_REQUEST['PHPWSBB_THREAD_OP'] = 'view'; $this->action(); --- 481,488 ---- return; } else { ! if ($unlock) ! $GLOBALS['CNT_phpwsbb']['content'] .= $_SESSION['translate']->it('The topic was successfully unlocked.') . '<br />'; ! else ! $GLOBALS['CNT_phpwsbb']['content'] .= $_SESSION['translate']->it('The topic was successfully locked.') . '<br />'; $_REQUEST['PHPWSBB_THREAD_OP'] = 'view'; $this->action(); *************** *** 512,516 **** $error = $this->commit(); if (PHPWS_Error::isError($error)) { ! $message = $_SESSION['translate']->it('The topic could not be saved to the database.'); $error = new PHPWS_Error('phpwsbb', $message, 'continue', 0); $error->message('CNT_phpwsbb'); --- 517,524 ---- $error = $this->commit(); if (PHPWS_Error::isError($error)) { ! if ($unstick) ! $message = $_SESSION['translate']->it('The topic could not be unstuck.'); ! else ! $message = $_SESSION['translate']->it('The topic could not be stuck.'); $error = new PHPWS_Error('phpwsbb', $message, 'continue', 0); $error->message('CNT_phpwsbb'); *************** *** 520,524 **** return; } else { ! $GLOBALS['CNT_phpwsbb']['content'] .= $_SESSION['translate']->it('The topic was successfully saved.') . '<br />'; $_REQUEST['PHPWSBB_THREAD_OP'] = 'view'; --- 528,535 ---- return; } else { ! if ($unstick) ! $GLOBALS['CNT_phpwsbb']['content'] .= $_SESSION['translate']->it('The topic was successfully unstuck.') . '<br />'; ! else ! $GLOBALS['CNT_phpwsbb']['content'] .= $_SESSION['translate']->it('The topic was successfully stuck.') . '<br />'; $_REQUEST['PHPWSBB_THREAD_OP'] = 'view'; Index: Message.php =================================================================== RCS file: /cvsroot/phpwsbb/phpwsbb/class/Message.php,v retrieving revision 1.82 retrieving revision 1.83 diff -C2 -d -r1.82 -r1.83 *** Message.php 27 May 2005 00:13:41 -0000 1.82 --- Message.php 20 Jul 2005 17:30:26 -0000 1.83 *************** *** 264,268 **** // Default topic to re: current topic if (is_null($this->getLabel())) { ! $label = 'Re: ' . $thread->getLabel(FALSE); $this->setLabel(PHPWS_Text::parseOutput($label)); } --- 264,268 ---- // Default topic to re: current topic if (is_null($this->getLabel())) { ! $label = $_SESSION['translate']->it('Re') . ': ' . $thread->getLabel(FALSE); $this->setLabel(PHPWS_Text::parseOutput($label)); } *************** *** 315,319 **** /* Save Button */ ! $form->add('Message_save', 'submit', $_SESSION['translate']->it('Save')); $form->setTab('Message_save', $tabs); $tabs++; --- 315,326 ---- /* Save Button */ ! if (isset($this->_id)) ! $form->add('Message_save', 'submit', $_SESSION['translate']->it('Update Post')); ! else ! if (isset($this->_tid) && !empty($this->_tid)) ! $form->add('Message_save', 'submit', $_SESSION['translate']->it('Post Reply')); ! else ! $form->add('Message_save', 'submit', $_SESSION['translate']->it('Post')); ! $form->setTab('Message_save', $tabs); $tabs++; *************** *** 439,443 **** $error = $this->commit(); if (PHPWS_Error::isError($error)) { ! $message = $_SESSION['translate']->it('The message could not be saved to the database.'); $error = new PHPWS_Error('phpwsbb', $message, 'continue', 0); $error->message('CNT_phpwsbb'); --- 446,450 ---- $error = $this->commit(); if (PHPWS_Error::isError($error)) { ! $message = $_SESSION['translate']->it('The message could not be posted.'); $error = new PHPWS_Error('phpwsbb', $message, 'continue', 0); $error->message('CNT_phpwsbb'); *************** *** 447,451 **** return; } else { ! $GLOBALS['CNT_phpwsbb']['content'] .= $_SESSION['translate']->it('Your message was successfully saved.') . '<br />
'; // Update user statistics --- 454,458 ---- return; } else { ! $GLOBALS['CNT_phpwsbb']['content'] .= $_SESSION['translate']->it('Your message was successfully posted.') . '<br />
'; // Update user statistics *************** *** 521,525 **** $error = $this->commit(); if (PHPWS_Error::isError($error)) { ! $message = $_SESSION['translate']->it('The message could not be saved to the database.'); $error = new PHPWS_Error('phpwsbb', $message, 'continue', 0); $error->message('CNT_phpwsbb'); --- 528,532 ---- $error = $this->commit(); if (PHPWS_Error::isError($error)) { ! $message = $_SESSION['translate']->it('The message could not be forked.'); $error = new PHPWS_Error('phpwsbb', $message, 'continue', 0); $error->message('CNT_phpwsbb'); *************** *** 529,533 **** return; } else { ! $GLOBALS['CNT_phpwsbb']['content'] .= $_SESSION['translate']->it('Your message was successfully saved.') . '<br />'; // Update old and new thread objects with new statistics --- 536,540 ---- return; } else { ! $GLOBALS['CNT_phpwsbb']['content'] .= $_SESSION['translate']->it('Your message was successfully forked.') . '<br />'; // Update old and new thread objects with new statistics *************** *** 648,652 **** /* Save Button */ ! $form->add('Message_save', 'submit', $_SESSION['translate']->it('Save')); $form->setTab('Message_save', $tabs); $tabs++; --- 655,659 ---- /* Save Button */ ! $form->add('Message_save', 'submit', $_SESSION['translate']->it('Send Report')); $form->setTab('Message_save', $tabs); $tabs++; |