[pLog-svn] r3665 - plog/trunk/class/summary/action
oscar at devel.lifetype.net
oscar at devel.lifetype.net
Wed Jun 28 19:52:00 GMT 2006
Author: oscar
Date: 2006-06-28 19:51:59 +0000 (Wed, 28 Jun 2006)
New Revision: 3665
Modified:
plog/trunk/class/summary/action/registeraction.class.php
Log:
added a check to verify whether registration of new blogs is allowed or not. A bit of a hack, but I can't find any other way right now.
Modified: plog/trunk/class/summary/action/registeraction.class.php
===================================================================
--- plog/trunk/class/summary/action/registeraction.class.php 2006-06-28 08:09:47 UTC (rev 3664)
+++ plog/trunk/class/summary/action/registeraction.class.php 2006-06-28 19:51:59 UTC (rev 3665)
@@ -3,6 +3,7 @@
include_once( PLOG_CLASS_PATH."class/summary/action/summaryaction.class.php" );
include_once( PLOG_CLASS_PATH."class/data/textfilter.class.php" );
include_once( PLOG_CLASS_PATH."class/summary/view/summarycachedview.class.php" );
+include_once( PLOG_CLASS_PATH."class/config/config.class.php" );
/**
* Base action that all register actions should extend
@@ -11,7 +12,6 @@
*/
class RegisterAction extends SummaryAction
{
- //{{{ member variables
var $userName;
var $userPassword;
var $userFullName;
@@ -21,9 +21,7 @@
var $blogLocale;
var $templateId;
var $blogDomain;
- //}}}
- //{{{function RegisterAction( $actionInfo, $request )
function RegisterAction( $actionInfo, $request )
{
$this->SummaryAction( $actionInfo, $request );
@@ -38,8 +36,17 @@
$this->userEmail = $tf->filterAllHTML($this->_request->getValue( "userEmail" ));
$this->userFullName = $tf->filterAllHTML($this->_request->getValue( "userFullName" ));
+ // there has to be a better place to check this, but I can't think of it now... Killing
+ // the script without returning to the controller probably isn't a good idea, but it's
+ // the quickest right now!
+ $config =& Config::getConfig();
+ if( $config->getValue( "summary_disable_registration" )) {
+ include_once( PLOG_CLASS_PATH."class/summary/view/summarymessageview.class.php" );
+ $this->_view = new SummaryMessageView();
+ $this->_view->setErrorMessage( $this->_locale->tr("error_registration_disabled"));
+ die($this->_view->render());
+ }
}
- //}}}
function validationErrorProcessing()
{
@@ -50,7 +57,8 @@
/**
* make these values tranferred until the last register step
*/
- function setValues(){
+ function setValues()
+ {
$this->_view->setValue( "userName", $this->userName );
$this->_view->setValue( "userFullName", $this->userFullName );
$this->_view->setValue( "userPassword", $this->userPassword );
More information about the pLog-svn
mailing list