[pLog-svn] r2360 - plog/branches/plog-1.0.2/class/action/admin
oscar at devel.plogworld.net
oscar at devel.plogworld.net
Mon Jul 25 11:31:03 GMT 2005
Author: oscar
Date: 2005-07-25 11:31:02 +0000 (Mon, 25 Jul 2005)
New Revision: 2360
Modified:
plog/branches/plog-1.0.2/class/action/admin/adminloginaction.class.php
Log:
added feature request 661, pending for 1.1 is to add a configuration option for this in
Administration->General settings.
Modified: plog/branches/plog-1.0.2/class/action/admin/adminloginaction.class.php
===================================================================
--- plog/branches/plog-1.0.2/class/action/admin/adminloginaction.class.php 2005-07-24 16:10:14 UTC (rev 2359)
+++ plog/branches/plog-1.0.2/class/action/admin/adminloginaction.class.php 2005-07-25 11:31:02 UTC (rev 2360)
@@ -10,6 +10,7 @@
include_once( PLOG_CLASS_PATH."class/misc/version.class.php" );
include_once( PLOG_CLASS_PATH."class/locale/locales.class.php" );
include_once( PLOG_CLASS_PATH."class/data/validator/stringvalidator.class.php" );
+ include_once( PLOG_CLASS_PATH."class/view/admin/adminnewpostview.class.php" );
/**
* \ingroup Action
@@ -35,8 +36,8 @@
{
$this->Action( $actionInfo, $request );
- $config =& Config::getConfig();
- $this->_locale =& Locales::getLocale( $config->getValue( "default_locale" ));
+ $this->_config =& Config::getConfig();
+ $this->_locale =& Locales::getLocale( $this->_config->getValue( "default_locale" ));
// data validation
$this->registerFieldValidator( "userName", new StringValidator());
@@ -105,7 +106,20 @@
$pm->notifyEvent( EVENT_BLOGS_LOADED, Array( "blogs" => &$userBlogs, "from" => "Login" ));
- $this->_view = new AdminDashboardView( $userInfo, $userBlogs );
+ // check if we are skipping the dashboard
+ if( $this->_config->getValue( "skip_dashboard" )) {
+ // get the first blog that came
+ $this->_blogInfo = array_pop( $userBlogs );
+ // set it in the session
+ $session = HttpVars::getSession();
+ $session["SessionInfo"]->setValue( "blogInfo", $this->_blogInfo );
+ HttpVars::setSession( $session );
+ // and then continue...
+ AdminController::setForwardAction( "newPost" );
+ }
+ else {
+ $this->_view = new AdminDashboardView( $userInfo, $userBlogs );
+ }
// better to return true if everything's fine
return true;
}
More information about the pLog-svn
mailing list