[pLog-svn] r6261 - in plog/branches/lifetype-1.2/class: action action/admin summary/action
jondaley at devel.lifetype.net
jondaley at devel.lifetype.net
Fri Mar 21 16:05:43 EDT 2008
Author: jondaley
Date: 2008-03-21 16:05:43 -0400 (Fri, 21 Mar 2008)
New Revision: 6261
Modified:
plog/branches/lifetype-1.2/class/action/admin/adminaddblogaction.class.php
plog/branches/lifetype-1.2/class/action/admin/adminloginaction.class.php
plog/branches/lifetype-1.2/class/action/admin/adminupdateeditblogaction.class.php
plog/branches/lifetype-1.2/class/action/admin/adminupdateuserprofileaction.class.php
plog/branches/lifetype-1.2/class/action/defaultaction.class.php
plog/branches/lifetype-1.2/class/action/viewarticleaction.class.php
plog/branches/lifetype-1.2/class/action/viewarticletrackbacksaction.class.php
plog/branches/lifetype-1.2/class/summary/action/activeaccountaction.class.php
plog/branches/lifetype-1.2/class/summary/action/summarysendresetemail.class.php
Log:
Our usernames should be validated using the username validator - not sure why these were only using the string validator
Modified: plog/branches/lifetype-1.2/class/action/admin/adminaddblogaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/admin/adminaddblogaction.class.php 2008-03-21 20:04:43 UTC (rev 6260)
+++ plog/branches/lifetype-1.2/class/action/admin/adminaddblogaction.class.php 2008-03-21 20:05:43 UTC (rev 6261)
@@ -5,6 +5,7 @@
lt_include( PLOG_CLASS_PATH."class/view/admin/adminsiteblogslistview.class.php" );
lt_include( PLOG_CLASS_PATH."class/data/validator/stringvalidator.class.php" );
lt_include( PLOG_CLASS_PATH."class/data/validator/blognamevalidator.class.php" );
+ lt_include( PLOG_CLASS_PATH."class/data/validator/usernamevalidator.class.php" );
lt_include( PLOG_CLASS_PATH."class/data/validator/integervalidator.class.php" );
lt_include( PLOG_CLASS_PATH."class/data/validator/domainvalidator.class.php" );
lt_include( PLOG_CLASS_PATH."class/dao/users.class.php" );
@@ -36,7 +37,7 @@
$this->registerFieldValidator( "blogMainDomain", new DomainValidator());
}
- $this->registerField( "userName" );
+ $this->registerFieldValidator( "userName", new UsernameValidator());
$view = new AdminCreateBlogView( $this->_blogInfo );
$view->setErrorMessage( $this->_locale->tr( "error_adding_blog" ));
$this->setValidationErrorView( $view );
Modified: plog/branches/lifetype-1.2/class/action/admin/adminloginaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/admin/adminloginaction.class.php 2008-03-21 20:04:43 UTC (rev 6260)
+++ plog/branches/lifetype-1.2/class/action/admin/adminloginaction.class.php 2008-03-21 20:05:43 UTC (rev 6261)
@@ -10,6 +10,7 @@
lt_include( PLOG_CLASS_PATH."class/misc/version.class.php" );
lt_include( PLOG_CLASS_PATH."class/locale/locales.class.php" );
lt_include( PLOG_CLASS_PATH."class/data/validator/stringvalidator.class.php" );
+ lt_include( PLOG_CLASS_PATH."class/data/validator/usernamevalidator.class.php" );
lt_include( PLOG_CLASS_PATH."class/view/admin/adminnewpostview.class.php" );
/**
@@ -40,7 +41,7 @@
$this->_locale =& Locales::getLocale( $this->_config->getValue( "default_locale" ));
// data validation
- $this->registerFieldValidator( "userName", new StringValidator());
+ $this->registerFieldValidator( "userName", new UsernameValidator());
$this->registerFieldValidator( "userPassword", new StringValidator());
$view = new AdminDefaultView();
$view->setErrorMessage( $this->_locale->tr("error_incorrect_username_or_password"));
Modified: plog/branches/lifetype-1.2/class/action/admin/adminupdateeditblogaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/admin/adminupdateeditblogaction.class.php 2008-03-21 20:04:43 UTC (rev 6260)
+++ plog/branches/lifetype-1.2/class/action/admin/adminupdateeditblogaction.class.php 2008-03-21 20:05:43 UTC (rev 6261)
@@ -8,6 +8,7 @@
lt_include( PLOG_CLASS_PATH."class/dao/userpermissions.class.php" );
lt_include( PLOG_CLASS_PATH."class/data/validator/stringvalidator.class.php" );
lt_include( PLOG_CLASS_PATH."class/data/validator/blognamevalidator.class.php" );
+ lt_include( PLOG_CLASS_PATH."class/data/validator/usernamevalidator.class.php" );
lt_include( PLOG_CLASS_PATH."class/data/validator/integervalidator.class.php" );
lt_include( PLOG_CLASS_PATH."class/data/validator/domainvalidator.class.php" );
lt_include( PLOG_CLASS_PATH."class/data/validator/arrayvalidator.class.php" );
@@ -49,7 +50,7 @@
$this->registerFieldValidator( "blogTemplate", new StringValidator());
$this->registerFieldValidator( "blogResourcesQuota", new IntegerValidator(), true );
$this->registerFieldValidator( "userId", new IntegerValidator());
- $this->registerFieldValidator( "userName", new StringValidator());
+ $this->registerFieldValidator( "userName", new UsernameValidator());
$this->registerField( "blogTimeOffset" );
if( Subdomains::getSubdomainsEnabled()) {
$this->registerFieldValidator( "blogSubDomain", new DomainValidator());
Modified: plog/branches/lifetype-1.2/class/action/admin/adminupdateuserprofileaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/admin/adminupdateuserprofileaction.class.php 2008-03-21 20:04:43 UTC (rev 6260)
+++ plog/branches/lifetype-1.2/class/action/admin/adminupdateuserprofileaction.class.php 2008-03-21 20:05:43 UTC (rev 6261)
@@ -2,6 +2,7 @@
lt_include( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
lt_include( PLOG_CLASS_PATH."class/data/validator/integervalidator.class.php" );
+ lt_include( PLOG_CLASS_PATH."class/data/validator/usernamevalidator.class.php" );
lt_include( PLOG_CLASS_PATH."class/data/validator/emailvalidator.class.php" );
lt_include( PLOG_CLASS_PATH."class/view/admin/admineditsiteuserview.class.php" );
lt_include( PLOG_CLASS_PATH."class/view/admin/adminsiteuserslistview.class.php" );
@@ -38,7 +39,7 @@
$this->registerField( "userAbout" );
$this->registerField( "properties" );
$this->registerField( "userIsSiteAdmin" );
- $this->registerField( "userName" );
+ $this->registerFieldValidator( "userName", new UsernameValidator());
$this->registerField( "userPermissions" );
$this->registerFieldValidator( "userProfilePassword", new PasswordValidator(), true );
$this->registerFieldValidator( "userStatus", new IntegerValidator());
Modified: plog/branches/lifetype-1.2/class/action/defaultaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/defaultaction.class.php 2008-03-21 20:04:43 UTC (rev 6260)
+++ plog/branches/lifetype-1.2/class/action/defaultaction.class.php 2008-03-21 20:05:43 UTC (rev 6261)
@@ -3,6 +3,7 @@
lt_include( PLOG_CLASS_PATH."class/action/blogaction.class.php" );
lt_include( PLOG_CLASS_PATH."class/plugin/pluginmanager.class.php" );
lt_include( PLOG_CLASS_PATH."class/data/validator/stringvalidator.class.php" );
+ lt_include( PLOG_CLASS_PATH."class/data/validator/usernamevalidator.class.php" );
lt_include( PLOG_CLASS_PATH."class/data/validator/integervalidator.class.php" );
lt_include( PLOG_CLASS_PATH."class/view/errorview.class.php" );
@@ -30,7 +31,7 @@
$this->registerFieldValidator( "postCategoryId", new IntegerValidator(), true );
$this->registerFieldValidator( "postCategoryName", new StringValidator(), true );
$this->registerFieldValidator( "userId", new IntegerValidator(), true );
- $this->registerFieldValidator( "userName", new StringValidator(), true );
+ $this->registerFieldValidator( "userName", new UsernameValidator(), true );
$this->setValidationErrorView( new ErrorView( $this->_blogInfo, "error_fetching_articles" ));
}
Modified: plog/branches/lifetype-1.2/class/action/viewarticleaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/viewarticleaction.class.php 2008-03-21 20:04:43 UTC (rev 6260)
+++ plog/branches/lifetype-1.2/class/action/viewarticleaction.class.php 2008-03-21 20:05:43 UTC (rev 6261)
@@ -3,6 +3,7 @@
lt_include( PLOG_CLASS_PATH."class/action/blogaction.class.php" );
lt_include( PLOG_CLASS_PATH."class/data/validator/integervalidator.class.php" );
lt_include( PLOG_CLASS_PATH."class/data/validator/stringvalidator.class.php" );
+ lt_include( PLOG_CLASS_PATH."class/data/validator/usernamevalidator.class.php" );
lt_include( PLOG_CLASS_PATH."class/view/errorview.class.php" );
lt_include( PLOG_CLASS_PATH."class/config/siteconfig.class.php" );
@@ -35,7 +36,7 @@
$this->registerFieldValidator( "postCategoryId", new IntegerValidator(), true );
$this->registerFieldValidator( "postCategoryName", new StringValidator(), true );
$this->registerFieldValidator( "userId", new IntegerValidator(), true );
- $this->registerFieldValidator( "userName", new StringValidator(), true );
+ $this->registerFieldValidator( "userName", new UsernameValidator(), true );
$this->setValidationErrorView( new ErrorView( $this->_blogInfo, "error_fetching_article" ));
}
Modified: plog/branches/lifetype-1.2/class/action/viewarticletrackbacksaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/viewarticletrackbacksaction.class.php 2008-03-21 20:04:43 UTC (rev 6260)
+++ plog/branches/lifetype-1.2/class/action/viewarticletrackbacksaction.class.php 2008-03-21 20:05:43 UTC (rev 6261)
@@ -2,6 +2,7 @@
lt_include( PLOG_CLASS_PATH."class/action/blogaction.class.php" );
lt_include( PLOG_CLASS_PATH."class/data/validator/stringvalidator.class.php" );
+ lt_include( PLOG_CLASS_PATH."class/data/validator/usernamevalidator.class.php" );
lt_include( PLOG_CLASS_PATH."class/view/errorview.class.php" );
define( "VIEW_TRACKBACKS_TEMPLATE", "posttrackbacks" );
@@ -32,7 +33,7 @@
$this->registerFieldValidator( "postCategoryId", new IntegerValidator(), true );
$this->registerFieldValidator( "postCategoryName", new StringValidator(), true );
$this->registerFieldValidator( "userId", new IntegerValidator(), true );
- $this->registerFieldValidator( "userName", new StringValidator(), true );
+ $this->registerFieldValidator( "userName", new UsernameValidator(), true );
$this->setValidationErrorView( new ErrorView( $this->_blogInfo, "error_fetching_article" ));
}
Modified: plog/branches/lifetype-1.2/class/summary/action/activeaccountaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/summary/action/activeaccountaction.class.php 2008-03-21 20:04:43 UTC (rev 6260)
+++ plog/branches/lifetype-1.2/class/summary/action/activeaccountaction.class.php 2008-03-21 20:05:43 UTC (rev 6261)
@@ -2,6 +2,7 @@
lt_include(PLOG_CLASS_PATH.'class/summary/action/summaryaction.class.php');
lt_include(PLOG_CLASS_PATH.'class/data/validator/stringvalidator.class.php');
+lt_include(PLOG_CLASS_PATH.'class/data/validator/usernamevalidator.class.php');
lt_include(PLOG_CLASS_PATH.'class/dao/users.class.php');
lt_include(PLOG_CLASS_PATH.'class/dao/blogs.class.php');
lt_include(PLOG_CLASS_PATH.'class/summary/view/summarymessageview.class.php');
@@ -16,7 +17,7 @@
{
$this->SummaryAction($actionInfo,$httpRequest);
- $this->registerFieldValidator("username",new StringValidator());
+ $this->registerFieldValidator("username",new UsernameValidator());
$this->registerFieldValidator("activeCode",new StringValidator());
}
Modified: plog/branches/lifetype-1.2/class/summary/action/summarysendresetemail.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/summary/action/summarysendresetemail.class.php 2008-03-21 20:04:43 UTC (rev 6260)
+++ plog/branches/lifetype-1.2/class/summary/action/summarysendresetemail.class.php 2008-03-21 20:05:43 UTC (rev 6261)
@@ -2,7 +2,7 @@
lt_include( PLOG_CLASS_PATH."class/summary/action/summaryaction.class.php" );
lt_include( PLOG_CLASS_PATH."class/summary/view/summarymessageview.class.php" );
- lt_include( PLOG_CLASS_PATH."class/data/validator/stringvalidator.class.php" );
+ lt_include( PLOG_CLASS_PATH."class/data/validator/usernamevalidator.class.php" );
lt_include( PLOG_CLASS_PATH."class/data/validator/emailvalidator.class.php" );
lt_include( PLOG_CLASS_PATH."class/data/filter/htmlfilter.class.php" );
lt_include( PLOG_CLASS_PATH."class/data/filter/htmlspecialcharsfilter.class.php" );
@@ -31,7 +31,7 @@
$this->_request->registerFilter( "userEmail", $f );
// data validation
- $this->registerFieldValidator( "userName", new StringValidator());
+ $this->registerFieldValidator( "userName", new UsernameValidator());
$this->registerFieldValidator( "userEmail", new EmailValidator());
$this->setValidationErrorView( new SummaryView( "resetpassword" ));
}
More information about the pLog-svn
mailing list