[pLog-svn] r6995 - plog/branches/lifetype-1.2/class/action/admin
jondaley at devel.lifetype.net
jondaley at devel.lifetype.net
Fri Apr 9 14:34:14 EDT 2010
Author: jondaley
Date: 2010-04-09 14:34:13 -0400 (Fri, 09 Apr 2010)
New Revision: 6995
Modified:
plog/branches/lifetype-1.2/class/action/admin/adminnewpostaction.class.php
Log:
allow sendTrackbacks to be set by the bookmarklet
Modified: plog/branches/lifetype-1.2/class/action/admin/adminnewpostaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/admin/adminnewpostaction.class.php 2010-04-09 18:28:18 UTC (rev 6994)
+++ plog/branches/lifetype-1.2/class/action/admin/adminnewpostaction.class.php 2010-04-09 18:34:13 UTC (rev 6995)
@@ -5,6 +5,7 @@
lt_include( PLOG_CLASS_PATH."class/view/admin/admintemplatedview.class.php" );
lt_include( PLOG_CLASS_PATH."class/dao/articlecategories.class.php" );
lt_include( PLOG_CLASS_PATH."class/data/validator/stringvalidator.class.php" );
+ lt_include( PLOG_CLASS_PATH."class/data/validator/integervalidator.class.php" );
lt_include( PLOG_CLASS_PATH."class/data/textfilter.class.php" );
/**
@@ -25,6 +26,7 @@
{
$this->AdminAction( $actionInfo, $request );
$this->registerFieldValidator( "postText", new StringValidator( true ), true );
+ $this->registerFieldValidator( "sendTrackbacks", new IntegerValidator(), true );
// security checks
$this->requirePermission( "add_post" );
@@ -54,15 +56,13 @@
$config =& Config::getConfig();
$this->_view->setValue( "globalArticleCategoryId", $config->getValue( "default_global_article_category_id", 0 ));
+ $this->_view->setValue( "sendTrackbacks", $this->_request->getValue( "sendTrackbacks" ) ? 1 : 0);
+
$postText = $this->_request->getValue( "postText" );
- // check if javascript code is allowed in posts
- $config =& Config::getConfig();
- // Don't ever allow javascript when directing from the 'bookmarklet'
- // or perhaps other hackers trying to exploit the poor lifetype user
-// if( !$config->getValue( "allow_javascript_blocks_in_posts", false ))
$postText = Textfilter::filterJavaScript( $postText );
- $postText = trim(Textfilter::xhtmlize( $postText ));
+ $postText = trim(Textfilter::xhtmlize( $postText ));
+
$this->_view->setValue( "postText", $postText );
$this->setCommonData();
More information about the pLog-svn
mailing list