diff --git a/setup/firstlogin/firstlogin.php b/setup/firstlogin/firstlogin.php index 5ea00fe..7555a53 100644 --- a/setup/firstlogin/firstlogin.php +++ b/setup/firstlogin/firstlogin.php @@ -44,7 +44,7 @@ * @version Version 0.1 */ -class FirstLogin { +class firstlogin { /** * Reference to simple xml object * @@ -160,7 +160,7 @@ class FirstLogin { try { $this->simpleXmlObj = simplexml_load_file(CONF_DIR.INSTALL_TYPE."_$name"); } catch (Exception $e) { - $util = new FirstLoginUtil(); + $util = new firstloginUtil(); $util->error("Error reading configuration file: $e"); exit(); } @@ -435,7 +435,7 @@ class FirstLogin { if($class->run()) { // Check if step needs to be run $class->setDataFromSession($className); // Set Session Information $class->setPostConfig(); // Set any posted variables - $class->Step(); // Run step + $class->runStep(); // Run step } } else { $util = new firstloginUtil(); diff --git a/setup/firstlogin/firstloginUtil.php b/setup/firstlogin/firstloginUtil.php index 9d1d895..a64da5d 100644 --- a/setup/firstlogin/firstloginUtil.php +++ b/setup/firstlogin/firstloginUtil.php @@ -53,12 +53,10 @@ class firstloginUtil extends InstallUtil { * @param none * @return boolean */ - public function isSystem() { - if (file_exists(dirname(__FILE__)."/firstlogin")) { - + public function isFirstLogin() { + if (file_exists(SYSTEM_DIR.'var'.DS.'bin'.DS."firstlogin.lock")) { return true; } - return false; } diff --git a/setup/firstlogin/firstloginWizard.php b/setup/firstlogin/firstloginWizard.php index 99eb47b..0ddae3a 100644 --- a/setup/firstlogin/firstloginWizard.php +++ b/setup/firstlogin/firstloginWizard.php @@ -63,8 +63,8 @@ class firstloginWizard extends WizardBase { * @param none * @return boolean */ - private function isSystem() { - return $this->util->isSystem(); + private function isFirstLogin() { + return $this->util->isFirstLogin(); } /** @@ -77,10 +77,10 @@ class firstloginWizard extends WizardBase { */ public function display($response = null) { if($response) { - $ins = new FirstLogin(); // Instantiate + $ins = new firstlogin(); // Instantiate $ins->resolveErrors($response); // Run step } else { - $ins = new FirstLogin(new Session()); // Instantiate and pass the session class + $ins = new firstlogin(new Session()); // Instantiate and pass the session class $ins->step(); // Run step } } @@ -165,7 +165,7 @@ class firstloginWizard extends WizardBase { } elseif ($this->getBypass() === "0") { $this->createFile(); } - if(!$this->isSystem()) { // Check if the systems + if(!$this->isFirstLogin()) { // Check if the systems $response = $this->systemChecks(); if($response === true) { $this->display(); diff --git a/setup/firstlogin/step.php b/setup/firstlogin/step.php index 11010e4..4b90c1a 100644 --- a/setup/firstlogin/step.php +++ b/setup/firstlogin/step.php @@ -131,7 +131,7 @@ class Step extends StepBase * @access public * @return void */ - public function Step() { + public function runStep() { return ''; } diff --git a/setup/firstlogin/steps/firstloginComplete.php b/setup/firstlogin/steps/firstloginComplete.php new file mode 100644 index 0000000..44717b6 --- /dev/null +++ b/setup/firstlogin/steps/firstloginComplete.php @@ -0,0 +1,81 @@ +. +* +* You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco, +* California 94120-7775, or email info@knowledgetree.com. +* +* The interactive user interfaces in modified source and object code versions +* of this program must display Appropriate Legal Notices, as required under +* Section 5 of the GNU General Public License version 3. +* +* In accordance with Section 7(b) of the GNU General Public License version 3, +* these Appropriate Legal Notices must retain the display of the "Powered by +* KnowledgeTree" logo and retain the original copyright notice. If the display of the +* logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices +* must display the words "Powered by KnowledgeTree" and retain the original +* copyright notice. +* Contributor( s): ______________________________________ +*/ + +/** +* +* @copyright 2008-2010, KnowledgeTree Inc. +* @license GNU General Public License version 3 +* @author KnowledgeTree Team +* @package First Login +* @version Version 0.1 +*/ + +class firstloginComplete extends Step { + /** + * Flag if step needs to run silently + * + * @access protected + * @var boolean + */ + protected $silent = true; + + /** + * Returns step state + * + * @author KnowledgeTree Team + * @param none + * @access public + * @return string + */ + function doStep() { + $this->temp_variables = array( + "step_name"=>"complete", + "silent"=>$this->silent); + return $this->doRun(); + } + + function doRun() { + + return 'landing'; + } + + + + public function getErrors() { + return $this->error; + } +} +?> \ No newline at end of file diff --git a/setup/firstlogin/steps/firstloginTemplates.php b/setup/firstlogin/steps/firstloginTemplates.php new file mode 100644 index 0000000..b3815d0 --- /dev/null +++ b/setup/firstlogin/steps/firstloginTemplates.php @@ -0,0 +1,79 @@ +. +* +* You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco, +* California 94120-7775, or email info@knowledgetree.com. +* +* The interactive user interfaces in modified source and object code versions +* of this program must display Appropriate Legal Notices, as required under +* Section 5 of the GNU General Public License version 3. +* +* In accordance with Section 7(b) of the GNU General Public License version 3, +* these Appropriate Legal Notices must retain the display of the "Powered by +* KnowledgeTree" logo and retain the original copyright notice. If the display of the +* logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices +* must display the words "Powered by KnowledgeTree" and retain the original +* copyright notice. +* Contributor( s): ______________________________________ +*/ + +/** +* +* @copyright 2008-2010, KnowledgeTree Inc. +* @license GNU General Public License version 3 +* @author KnowledgeTree Team +* @package First Login +* @version Version 0.1 +*/ + +class firstloginTemplates extends Step { + /** + * Flag if step needs to run silently + * + * @access protected + * @var boolean + */ + protected $silent = true; + + /** + * Returns step state + * + * @author KnowledgeTree Team + * @param none + * @access public + * @return string + */ + function doStep() { + $this->temp_variables = array( + "step_name"=>"folderstructures", + "silent"=>$this->silent); + return $this->doRun(); + } + + function doRun() { + + return 'landing'; + } + + public function getErrors() { + return $this->error; + } +} +?> \ No newline at end of file diff --git a/setup/firstlogin/templates/error.tpl b/setup/firstlogin/templates/error.tpl index 0778443..5bd3fe9 100644 --- a/setup/firstlogin/templates/error.tpl +++ b/setup/firstlogin/templates/error.tpl @@ -3,7 +3,7 @@