[pLog-svn] r6939 - plog/branches/lifetype-1.2/class/action/admin
jondaley at devel.lifetype.net
jondaley at devel.lifetype.net
Wed Jan 6 13:47:40 EST 2010
Author: jondaley
Date: 2010-01-06 13:47:40 -0500 (Wed, 06 Jan 2010)
New Revision: 6939
Modified:
plog/branches/lifetype-1.2/class/action/admin/adminaddlinkaction.class.php
Log:
removed unused class variables - there are other classes that do this too
Modified: plog/branches/lifetype-1.2/class/action/admin/adminaddlinkaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/admin/adminaddlinkaction.class.php 2010-01-06 18:41:29 UTC (rev 6938)
+++ plog/branches/lifetype-1.2/class/action/admin/adminaddlinkaction.class.php 2010-01-06 18:47:40 UTC (rev 6939)
@@ -17,13 +17,6 @@
*/
class AdminAddLinkAction extends AdminAction
{
-
- var $_linkName;
- var $_linkUrl;
- var $_linkDescription;
- var $_linkCategoryId;
- var $_properties;
-
/**
* Constructor. If nothing else, it also has to call the constructor of the parent
* class, BlogAction with the same parameters
@@ -39,6 +32,7 @@
$this->registerFieldValidator( "linkRssFeed", new HttpUrlValidator(), true );
$this->registerFieldValidator( "linkCategoryId", new IntegerValidator());
$this->registerFieldValidator( "linkDescription", new StringValidator(), true );
+
$view = new AdminNewLinkView( $this->_blogInfo );
$view->setErrorMessage( $this->_locale->tr("error_adding_link" ));
$this->setValidationErrorView( $view );
@@ -51,19 +45,20 @@
*/
function perform()
{
- // fetch the data
- $this->_linkName = Textfilter::filterAllHTML($this->_request->getValue( "linkName" ));
- $this->_linkUrl = Textfilter::filterAllHTML($this->_request->getValue( "linkUrl" ));
- $this->_linkCategoryId = $this->_request->getValue( "linkCategoryId" );
- $this->_linkDescription = Textfilter::filterAllHTML($this->_request->getValue( "linkDescription" ));
- $this->_linkRss = Textfilter::filterAllHTML($this->_request->getValue( "linkRssFeed" ));
- $this->_properties = Array();
+ die("test");
+ // fetch the data
+ $linkName = Textfilter::filterAllHTML($this->_request->getValue( "linkName" ));
+ $linkUrl = Textfilter::filterAllHTML($this->_request->getValue( "linkUrl" ));
+ $linkCategoryId = $this->_request->getValue( "linkCategoryId" );
+ $linkDescription = Textfilter::filterAllHTML($this->_request->getValue( "linkDescription" ));
+ $linkRss = Textfilter::filterAllHTML($this->_request->getValue( "linkRssFeed" ));
+ $properties = Array();
// adds the new link to the database
$myLinks = new MyLinks();
- $myLink = new MyLink( $this->_linkName, $this->_linkDescription, $this->_linkUrl,
- $this->_blogInfo->getId(), $this->_linkCategoryId,
- 0, $this->_linkRss, $this->_properties );
+ $myLink = new MyLink( $linkName, $linkDescription, $linkUrl,
+ $this->_blogInfo->getId(), $linkCategoryId,
+ 0, $linkRss, $properties );
$this->notifyEvent( EVENT_PRE_LINK_ADD, Array( "link" => &$link ));
if( !$myLinks->addMyLink( $myLink, $this->_blogInfo->getId())) {
$this->_view = new AdminNewLinkView( $this->_blogInfo );
More information about the pLog-svn
mailing list