[pLog-CVS] plog/class/action addcommentaction.class.php,1.8,1.8.2.1 adminaddpostaction.class.php,1.7
Brought to you by:
jondaley
From: Oscar R. <phu...@us...> - 2004-05-29 12:59:12
|
Update of /cvsroot/plog/plog/class/action In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28406/class/action Modified Files: Tag: PLOG_0_3_2_DEVEL addcommentaction.class.php adminaddpostaction.class.php adminupdatepostaction.class.php Log Message: added support for xhtmlizing posts and comments by users, optionally. There is also an 'aggressive' mode that will try to xhtmize even more things! Index: addcommentaction.class.php =================================================================== RCS file: /cvsroot/plog/plog/class/action/addcommentaction.class.php,v retrieving revision 1.8 retrieving revision 1.8.2.1 diff -C2 -d -r1.8 -r1.8.2.1 *** addcommentaction.class.php 15 Apr 2004 19:05:04 -0000 1.8 --- addcommentaction.class.php 29 May 2004 12:59:00 -0000 1.8.2.1 *************** *** 19,23 **** * Takes care of validating the form to add new comments to an article */ ! class AddCommentAction extends BlogAction { var $_articleId; --- 19,24 ---- * Takes care of validating the form to add new comments to an article */ ! class AddCommentAction extends BlogAction ! { var $_articleId; *************** *** 61,68 **** // remove all straneous stuff from the text and topic $tf = new TextFilter(); ! $this->_commentTopic = $tf->filterHTML( $this->_commentTopic ); // and also from the text ! $this->_commentText = $tf->filterHTML( $this->_commentText ); // now, if the option is set, we 'beautify' the text typed by users --- 62,69 ---- // remove all straneous stuff from the text and topic $tf = new TextFilter(); ! $this->_commentTopic = $tf->xhtmlize($tf->filterHTML( $this->_commentTopic )); // and also from the text ! $this->_commentText = $tf->xhtmlize($tf->filterHTML( $this->_commentText )); // now, if the option is set, we 'beautify' the text typed by users Index: adminupdatepostaction.class.php =================================================================== RCS file: /cvsroot/plog/plog/class/action/adminupdatepostaction.class.php,v retrieving revision 1.7.4.1 retrieving revision 1.7.4.2 diff -C2 -d -r1.7.4.1 -r1.7.4.2 *** adminupdatepostaction.class.php 26 Apr 2004 19:45:35 -0000 1.7.4.1 --- adminupdatepostaction.class.php 29 May 2004 12:59:00 -0000 1.7.4.2 *************** *** 7,15 **** include_once( PLOG_CLASS_PATH."class/data/integervalidator.class.php" ); include_once( PLOG_CLASS_PATH."class/dao/articles.class.php" ); /** * Updates the values of the post in the database */ ! class AdminUpdatePostAction extends AdminAction { var $_postTopic; --- 7,17 ---- include_once( PLOG_CLASS_PATH."class/data/integervalidator.class.php" ); include_once( PLOG_CLASS_PATH."class/dao/articles.class.php" ); + include_once( PLOG_CLASS_PATH."class/data/textfilter.class.php" ); /** * Updates the values of the post in the database */ ! class AdminUpdatePostAction extends AdminAction ! { var $_postTopic; *************** *** 46,51 **** function validate() { ! $this->_postText = $this->_request->getValue( "postText" ); ! $this->_postExtendedText = $this->_request->getValue( "postExtendedText" ); $this->_postTopic = $this->_request->getValue( "postTopic" ); $this->_postCategory = $this->_request->getValue( "postCategory" ); --- 48,53 ---- function validate() { ! $this->_postText = Textfilter::xhtmlize($this->_request->getValue( "postText" )); ! $this->_postExtendedText = Textfilter::xhtmlize($this->_request->getValue( "postExtendedText" )); $this->_postTopic = $this->_request->getValue( "postTopic" ); $this->_postCategory = $this->_request->getValue( "postCategory" ); Index: adminaddpostaction.class.php =================================================================== RCS file: /cvsroot/plog/plog/class/action/adminaddpostaction.class.php,v retrieving revision 1.7.4.1 retrieving revision 1.7.4.2 diff -C2 -d -r1.7.4.1 -r1.7.4.2 *** adminaddpostaction.class.php 7 May 2004 18:09:13 -0000 1.7.4.1 --- adminaddpostaction.class.php 29 May 2004 12:59:00 -0000 1.7.4.2 *************** *** 12,20 **** include_once( PLOG_CLASS_PATH."class/view/adminnewpostview.class.php" ); include_once( PLOG_CLASS_PATH."class/bayesian/bayesianfiltercore.class.php" ); /** * Action that adds a new post to the database. */ ! class AdminAddPostAction extends AdminAction { var $_postText; --- 12,22 ---- include_once( PLOG_CLASS_PATH."class/view/adminnewpostview.class.php" ); include_once( PLOG_CLASS_PATH."class/bayesian/bayesianfiltercore.class.php" ); + include_once( PLOG_CLASS_PATH."class/data/textfilter.class.php" ); /** * Action that adds a new post to the database. */ ! class AdminAddPostAction extends AdminAction ! { var $_postText; *************** *** 107,111 **** } } ! return true; } --- 109,113 ---- } } ! return true; } *************** *** 146,150 **** $articles = new Articles(); ! $postText = $this->_postText.POST_EXTENDED_TEXT_MODIFIER.$this->_postExtendedText; $article = new Article( $this->_postTopic, $postText, $this->_postCategory, --- 148,152 ---- $articles = new Articles(); ! $postText = Textfilter::xhtmlize($this->_postText).POST_EXTENDED_TEXT_MODIFIER.Textfilter::xhtmlize($this->_postExtendedText); $article = new Article( $this->_postTopic, $postText, $this->_postCategory, *************** *** 223,227 **** --- 225,231 ---- $this->_view->setValue( "categories", $blogCategories ); $this->_view->setValue( "postText", trim(stripslashes($this->_postText ))); + $this->_view->setValue( "postPreviewText", Textfilter::xhtmlize(trim(stripslashes($this->_postText )))); $this->_view->setValue( "postExtendedText", trim(stripslashes($this->_postExtendedText))); + $this->_view->setValue( "postPreviewExtendedText", Textfilter::xhtmlize(trim(stripslashes($this->_postExtendedText )))); $this->_view->setValue( "postStatus", $this->_postStatus ); $this->_view->setValue( "postTopic", ltrim(stripslashes($this->_postTopic ))); |