[pLog-svn] r2496 - plog/trunk

oscar at devel.plogworld.net oscar at devel.plogworld.net
Tue Sep 20 18:17:21 GMT 2005


Author: oscar
Date: 2005-09-20 18:17:20 +0000 (Tue, 20 Sep 2005)
New Revision: 2496

Modified:
   plog/trunk/wizard.php
Log:
-fixed a bug where the user created during the installation process wasn't given administrator rights
-fixed a bug where catalan would end up selected as default language (just because it appears as the first
one in the drop-down list), in case the page needed to be shown again because of missing information.


Modified: plog/trunk/wizard.php
===================================================================
--- plog/trunk/wizard.php	2005-09-20 16:44:29 UTC (rev 2495)
+++ plog/trunk/wizard.php	2005-09-20 18:17:20 UTC (rev 2496)
@@ -587,7 +587,7 @@
 $Inserts[113] = "INSERT INTO {dbprefix}config (config_key, config_value, value_type) VALUES('use_http_accept_language_detection', '0', 1);";
 $Inserts[114] = "INSERT INTO {dbprefix}config (config_key, config_value, value_type) VALUES('session_save_path', '', 3);";
 $Inserts[115] = "INSERT INTO {dbprefix}config (config_key, config_value, value_type) VALUES('skip_dashboard', '0', 1);";
-$Inserts[116] = "INSERT INTO {dbprefix}config (config_key, config_value, value_type) VALUES('use_captcha_auth', '0', 1);";
+$Inserts[116] = "INSERT INTO {dbprefix}config (config_key, config_value, value_type) VALUES('use_captcha_auth', '0', 1);";
 
     /**
      * Open a connection to the database
@@ -1082,6 +1082,9 @@
                                   $this->_userEmail,
                                   "",
                                   $this->_userFullName);
+			// set the user as an administrator
+			$user->setSiteAdmin( true );
+			// and add this record to the db
             $userId = $users->addUser( $user );
             if( !$userId ) {
                 $this->_view = new WizardView( "step3" );
@@ -1121,10 +1124,11 @@
               $this->registerFieldValidator( "blogName", new StringValidator());
               $this->registerFieldValidator( "ownerid", new IntegerValidator());
               $this->registerFieldValidator( "blogTemplate", new StringValidator());
-              $this->registerFieldValidator( "blogLocale", new StringValidator());
+              $this->registerFieldValidator( "blogLocale", new StringValidator());			  
               $view = new WizardView( "step4" );
               $view->setErrorMessage( "Some data is missing or incorrect" );
               $view->setValue( "siteLocales", Locales::getLocales());
+			  $view->setValue( "defaultLocale", Locales::getDefaultLocale());
               $ts = new TemplateSets();
               $view->setValue( "siteTemplates", $ts->getGlobalTemplateSets());
               $this->setValidationErrorView( $view );




More information about the pLog-svn mailing list