[pLog-svn] r4323 - in plog/branches/lifetype-1.1.3:
class/summary/action templates/summary
oscar at devel.lifetype.net
oscar at devel.lifetype.net
Tue Nov 21 21:47:14 GMT 2006
Author: oscar
Date: 2006-11-21 21:47:14 +0000 (Tue, 21 Nov 2006)
New Revision: 4323
Modified:
plog/branches/lifetype-1.1.3/class/summary/action/chooseblogtemplateaction.class.php
plog/branches/lifetype-1.1.3/class/summary/action/doblogregistration.class.php
plog/branches/lifetype-1.1.3/class/summary/action/dofinishregister.class.php
plog/branches/lifetype-1.1.3/class/summary/action/dousercreation.class.php
plog/branches/lifetype-1.1.3/class/summary/action/douserregister.class.php
plog/branches/lifetype-1.1.3/class/summary/action/registeraction.class.php
plog/branches/lifetype-1.1.3/templates/summary/registerstep2.template
plog/branches/lifetype-1.1.3/templates/summary/registerstep3.template
plog/branches/lifetype-1.1.3/templates/summary/registerstep4.template
Log:
possible (working) fix for issue http://bugs.lifetype.net/view.php?id=1119, registration data is not carried accross steps as part of a hidden form anymore but in the session, where it cannot be changed anymore during the process.
Modified: plog/branches/lifetype-1.1.3/class/summary/action/chooseblogtemplateaction.class.php
===================================================================
--- plog/branches/lifetype-1.1.3/class/summary/action/chooseblogtemplateaction.class.php 2006-11-21 20:58:13 UTC (rev 4322)
+++ plog/branches/lifetype-1.1.3/class/summary/action/chooseblogtemplateaction.class.php 2006-11-21 21:47:14 UTC (rev 4323)
@@ -13,8 +13,6 @@
*/
class ChooseBlogTemplateAction extends RegisterAction
{
-
-
function ChooseBlogTemplateAction( $actionInfo, $request )
{
$this->RegisterAction( $actionInfo, $request );
@@ -23,8 +21,12 @@
$this->setValidationErrorView( new BlogTemplateChooserView());
}
- function perform()
- {
- }
+ function perform()
+ {
+ // save data to the session
+ SessionManager::setSessionValue( "templateId", $this->_request->getValue( "templateId" ));
+
+ $this->setCommonData();
+ }
}
?>
\ No newline at end of file
Modified: plog/branches/lifetype-1.1.3/class/summary/action/doblogregistration.class.php
===================================================================
--- plog/branches/lifetype-1.1.3/class/summary/action/doblogregistration.class.php 2006-11-21 20:58:13 UTC (rev 4322)
+++ plog/branches/lifetype-1.1.3/class/summary/action/doblogregistration.class.php 2006-11-21 21:47:14 UTC (rev 4323)
@@ -72,9 +72,15 @@
{
// create the new view and clean the cache
$this->_view = new BlogTemplateChooserView();
- $this->setValues();
$this->setCommonData();
+ // save data to the session
+ SessionManager::setSessionValue( "blogName", $this->_request->getValue( "blogName" ));
+ SessionManager::setSessionValue( "blogCategoryId", $this->_request->getValue( "blogCategoryId" ));
+ SessionManager::setSessionValue( "blogLocale", $this->_request->getValue( "blogLocale" ));
+ SessionManager::setSessionValue( "blogSubDomain", $this->_request->getValue( "blogSubDomain" ));
+ SessionManager::setSessionValue( "blogMainDomain", $this->_request->getValue( "blogMainDomain" ));
+
return( true );
}
}
Modified: plog/branches/lifetype-1.1.3/class/summary/action/dofinishregister.class.php
===================================================================
--- plog/branches/lifetype-1.1.3/class/summary/action/dofinishregister.class.php 2006-11-21 20:58:13 UTC (rev 4322)
+++ plog/branches/lifetype-1.1.3/class/summary/action/dofinishregister.class.php 2006-11-21 21:47:14 UTC (rev 4323)
@@ -76,10 +76,10 @@
function createUser()
{
// all data is already correct
- $this->userName = $this->_request->getValue("userName");
- $this->userFullName = $this->_request->getValue("userFullName");
- $this->userPassword = $this->_request->getValue("userPassword");
- $this->userEmail = $this->_request->getValue("userEmail");
+ $this->userName = SessionManager::getSessionValue("userName");
+ $this->userFullName = SessionManager::getSessionValue("userFullName");
+ $this->userPassword = SessionManager::getSessionValue("userPassword");
+ $this->userEmail = SessionManager::getSessionValue("userEmail");
$users = new Users();
$user = new UserInfo( $this->userName,
@@ -120,11 +120,11 @@
*/
function createBlog($userId)
{
- $this->blogName = stripslashes($this->_request->getValue("blogName"));
- $this->blogDomain = stripslashes($this->_request->getValue("blogDomain"));
- $this->blogCategoryId = $this->_request->getValue("blogCategoryId");
- $this->blogLocale = $this->_request->getValue("blogLocale");
- $this->templateId = $this->_request->getValue("templateId");
+ $this->blogName = stripslashes(SessionManager::getSessionValue("blogName"));
+ $this->blogDomain = stripslashes(SessionManager::getSessionValue("blogDomain"));
+ $this->blogCategoryId = SessionManager::getSessionValue("blogCategoryId");
+ $this->blogLocale = SessionManager::getSessionValue("blogLocale");
+ $this->templateId = SessionManager::getSessionValue("templateId");
// get the default locale configured for the site
$blogs = new Blogs();
@@ -142,7 +142,7 @@
$blogInfo->setBlogCategoryId( $this->blogCategoryId );
if( Subdomains::getSubdomainsEnabled()) {
- $blogDomain = $this->_request->getValue( "blogDomain" );
+ $blogDomain = SessionManager::getSessionValue( "blogDomain" );
$blogInfo->setCustomDomain( $blogDomain );
}
Modified: plog/branches/lifetype-1.1.3/class/summary/action/dousercreation.class.php
===================================================================
--- plog/branches/lifetype-1.1.3/class/summary/action/dousercreation.class.php 2006-11-21 20:58:13 UTC (rev 4322)
+++ plog/branches/lifetype-1.1.3/class/summary/action/dousercreation.class.php 2006-11-21 21:47:14 UTC (rev 4323)
@@ -89,9 +89,14 @@
}
}
+ // save the data to the session
+ SessionManager::setSessionValue( "userName", $this->userName );
+ SessionManager::setSessionValue( "userPassword", $this->userPassword );
+ SessionManager::setSessionValue( "userEmail", $this->userEmail );
+ SessionManager::setSessionValue( "userFullName", $this->userFullName );
+
// if everything went fine, then proceed
$this->_view = new doBlogRegistrationView();
- $this->setValues();
$this->setCommonData();
return true;
}
Modified: plog/branches/lifetype-1.1.3/class/summary/action/douserregister.class.php
===================================================================
--- plog/branches/lifetype-1.1.3/class/summary/action/douserregister.class.php 2006-11-21 20:58:13 UTC (rev 4322)
+++ plog/branches/lifetype-1.1.3/class/summary/action/douserregister.class.php 2006-11-21 21:47:14 UTC (rev 4323)
@@ -12,6 +12,17 @@
{
$this->_view = new SummaryUserCreationView();
$this->setCommonData();
+
+ // clean the session data
+ SessionManager::setSessionValue( "blogName", "" );
+ SessionManager::setSessionValue( "blogCategoryId", "" );
+ SessionManager::setSessionValue( "blogLocale", "" );
+ SessionManager::setSessionValue( "blogSubDomain", "" );
+ SessionManager::setSessionValue( "blogMainDomain", "" );
+ SessionManager::setSessionValue( "userName", "" );
+ SessionManager::setSessionValue( "userPassword", "" );
+ SessionManager::setSessionValue( "userEmail", "" );
+ SessionManager::setSessionValue( "userFullName", "" );
return( true );
}
Modified: plog/branches/lifetype-1.1.3/class/summary/action/registeraction.class.php
===================================================================
--- plog/branches/lifetype-1.1.3/class/summary/action/registeraction.class.php 2006-11-21 20:58:13 UTC (rev 4322)
+++ plog/branches/lifetype-1.1.3/class/summary/action/registeraction.class.php 2006-11-21 21:47:14 UTC (rev 4323)
@@ -4,6 +4,11 @@
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" );
+include_once( PLOG_CLASS_PATH."class/data/validator/stringvalidator.class.php" );
+include_once( PLOG_CLASS_PATH."class/data/validator/usernamevalidator.class.php" );
+include_once( PLOG_CLASS_PATH."class/data/validator/passwordvalidator.class.php" );
+include_once( PLOG_CLASS_PATH."class/data/validator/integervalidator.class.php" );
+include_once( PLOG_CLASS_PATH."class/data/validator/emailvalidator.class.php" );
/**
* Base action that all register actions should extend
@@ -25,18 +30,7 @@
function RegisterAction( $actionInfo, $request )
{
$this->SummaryAction( $actionInfo, $request );
- $this->registerValidators();
- $tf = new Textfilter();
- $this->blogName = $tf->filterAllHTML( $this->_request->getValue( "blogName" ));
- $this->blogDomain = $tf->filterAllHTML( $this->_request->getValue( "blogDomain" ));
- $this->blogCategoryId = $this->_request->getValue( "blogCategoryId" );
- $this->blogLocale = $this->_request->getValue( "blogLocale" );
- $this->userName = $tf->filterAllHTML($this->_request->getValue( "userName" ));
- $this->userPassword = $tf->filterAllHTML($this->_request->getValue( "userPassword" ));
- $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!
@@ -47,44 +41,8 @@
$this->_view->setErrorMessage( $this->_locale->tr("error_registration_disabled"));
die($this->_view->render());
}
+
+ print_r($_SESSION["SessionInfo"]);
}
-
- function validationErrorProcessing()
- {
- parent::validationErrorProcessing();
- $this->setValues();
- }
-
- /**
- * make these values tranferred until the last register step, if there are validation error happened.
- */
- function registerValidators()
- {
- $this->registerField( "userName" );
- $this->registerField( "userFullName" );
- $this->registerField( "userPassword" );
- $this->registerField( "userEmail" );
- $this->registerField( "blogName" );
- $this->registerField( "blogCategoryId" );
- $this->registerField( "blogDomain" );
- $this->registerField( "blogLocale" );
- $this->registerField( "templateId" );
- }
-
- /**
- * make these values tranferred until the last register step
- */
- function setValues()
- {
- $this->_view->setValue( "userName", $this->userName );
- $this->_view->setValue( "userFullName", $this->userFullName );
- $this->_view->setValue( "userPassword", $this->userPassword );
- $this->_view->setValue( "userEmail", $this->userEmail );
- $this->_view->setValue( "blogName", $this->blogName );
- $this->_view->setValue( "blogCategoryId", $this->blogCategoryId );
- $this->_view->setValue( "blogDomain", $this->blogDomain );
- $this->_view->setValue( "blogLocale", $this->blogLocale );
- $this->_view->setValue( "templateId", $this->templateId );
- }
}
?>
Modified: plog/branches/lifetype-1.1.3/templates/summary/registerstep2.template
===================================================================
--- plog/branches/lifetype-1.1.3/templates/summary/registerstep2.template 2006-11-21 20:58:13 UTC (rev 4322)
+++ plog/branches/lifetype-1.1.3/templates/summary/registerstep2.template 2006-11-21 21:47:14 UTC (rev 4323)
@@ -57,10 +57,6 @@
</fieldset>
<div class="buttons">
<input type="submit" name="{$locale->tr("register_next")}" value="{$locale->tr("register_next")} »"/>
- <input type="hidden" name="userName" value="{$userName}"/>
- <input type="hidden" name="userFullName" value="{$userFullName}"/>
- <input type="hidden" name="userPassword" value="{$userPassword}"/>
- <input type="hidden" name="userEmail" value="{$userEmail}"/>
</div>
</form>
{include file="summary/footer.template"}
Modified: plog/branches/lifetype-1.1.3/templates/summary/registerstep3.template
===================================================================
--- plog/branches/lifetype-1.1.3/templates/summary/registerstep3.template 2006-11-21 20:58:13 UTC (rev 4322)
+++ plog/branches/lifetype-1.1.3/templates/summary/registerstep3.template 2006-11-21 21:47:14 UTC (rev 4323)
@@ -28,14 +28,6 @@
</fieldset>
<div class="buttons">
<input type="submit" name="{$locale->tr("register_next")}" value="{$locale->tr("register_next")} »"/>
- <input type="hidden" name="userName" value="{$userName}"/>
- <input type="hidden" name="blogDomain" value="{$blogDomain}"/>
- <input type="hidden" name="userFullName" value="{$userFullName}"/>
- <input type="hidden" name="userPassword" value="{$userPassword}"/>
- <input type="hidden" name="userEmail" value="{$userEmail}"/>
- <input type="hidden" name="blogName" value="{$blogName}"/>
- <input type="hidden" name="blogCategoryId" value="{$blogCategoryId}"/>
- <input type="hidden" name="blogLocale" value="{$blogLocale}"/>
</div>
</form>
{include file="summary/footer.template"}
Modified: plog/branches/lifetype-1.1.3/templates/summary/registerstep4.template
===================================================================
--- plog/branches/lifetype-1.1.3/templates/summary/registerstep4.template 2006-11-21 20:58:13 UTC (rev 4322)
+++ plog/branches/lifetype-1.1.3/templates/summary/registerstep4.template 2006-11-21 21:47:14 UTC (rev 4323)
@@ -45,16 +45,6 @@
<div class="buttons">
<input type="submit" name="done" value="{$locale->tr("create")}" />
</div>
-
- <input type="hidden" name="userName" value="{$userName}"/>
- <input type="hidden" name="blogDomain" value="{$blogDomain}"/>
- <input type="hidden" name="userFullName" value="{$userFullName}"/>
- <input type="hidden" name="userPassword" value="{$userPassword}"/>
- <input type="hidden" name="userEmail" value="{$userEmail}"/>
- <input type="hidden" name="blogName" value="{$blogName}"/>
- <input type="hidden" name="blogCategoryId" value="{$blogCategoryId}"/>
- <input type="hidden" name="blogLocale" value="{$blogLocale}"/>
- <input type="hidden" name="templateId" value="{$templateId}"/>
</form>
</div>
More information about the pLog-svn
mailing list