diff --git a/setup/migrate/steps/migrateInstallation.php b/setup/migrate/steps/migrateInstallation.php index 0c98bcc..4a696e5 100644 --- a/setup/migrate/steps/migrateInstallation.php +++ b/setup/migrate/steps/migrateInstallation.php @@ -148,7 +148,7 @@ class migrateInstallation extends step return false; } else { $this->foundVersion = $this->readVersion(); - if($version) { + if($this->foundVersion) { $this->checkVersion(); } $this->storeSilent(); @@ -239,6 +239,8 @@ class migrateInstallation extends step ); $ktSettings = $this->util->iniUtilities->getSection('KnowledgeTree'); $froot = $ktSettings['fileSystemRoot']; +// print_r($ktSettings); +// die; if ($froot == 'default') { $froot = $this->location; } diff --git a/setup/postcheckup.php b/setup/postcheckup.php index 322a627..fb69501 100644 --- a/setup/postcheckup.php +++ b/setup/postcheckup.php @@ -38,7 +38,7 @@ $checkup = true; error_reporting(E_ALL); -require_once('../config/dmsDefaults.php'); +//require_once('../config/dmsDefaults.php'); function writablePath($name, $path) { $ret = sprintf('%s (%s)', $name, $path); diff --git a/setup/precheckup.php b/setup/precheckup.php index 216cf53..d8e5de4 100644 --- a/setup/precheckup.php +++ b/setup/precheckup.php @@ -38,7 +38,7 @@ error_reporting(E_ALL); -require_once('../config/dmsDefaults.php'); +//require_once('../config/dmsDefaults.php'); function get_php_setting($val) { $r = (ini_get($val) == '1' ? 1 : 0); diff --git a/setup/upgrade/lib/UpgradeItems.inc.php b/setup/upgrade/lib/UpgradeItems.inc.php index 36b1aca..692958b 100644 --- a/setup/upgrade/lib/UpgradeItems.inc.php +++ b/setup/upgrade/lib/UpgradeItems.inc.php @@ -117,7 +117,7 @@ class UpgradeItem extends InstallUtil { return $this->type; } - function runDBQuery($query) { + function runDBQuery($query, $checkResult = false, $typeCheck = false) { require_once("../wizard/steps/configuration.php"); // configuration to read the ini path $wizConfigHandler = new configuration(); $configPath = $wizConfigHandler->readConfigPathIni(); @@ -128,13 +128,36 @@ class UpgradeItem extends InstallUtil { $dconf = $this->iniUtilities->getSection('db'); $this->dbUtilities->load($dconf['dbHost'], '', $dconf['dbUser'], $dconf['dbPass'], $dconf['dbName']); $result = $this->dbUtilities->query($query); - $assArr = $this->dbUtilities->fetchAssoc($result); - return $assArr; +// echo "$query
"; +// echo '
';
+//        print_r($result);
+//        echo '
'; + if($checkResult) { + $assArr = $this->dbUtilities->fetchAssoc($result); +// echo '
';
+//	        print_r($assArr);
+//	        echo '
'; +// if(is_null($assArr)) { +// echo '=== null ===
'; +// return false; +// } else { +// echo '=== not null ===
'; +// } + if($typeCheck) { + return !is_null($assArr); + } else { + return is_null($assArr); + } + } +// echo '
';
+//        print_r($assArr);
+//        echo '
'; + return !is_null($result); } function _upgradeTableInstalled() { $query = "SELECT COUNT(id) FROM upgrades"; - $res = $this->runDBQuery($query); + $res = $this->runDBQuery($query, true, true); if($res) { return true; } @@ -146,8 +169,9 @@ class UpgradeItem extends InstallUtil { return false; } $query = "SELECT id FROM upgrades WHERE descriptor = '".$this->getDescriptor()."' AND result = 1"; - $res = $this->runDBQuery($query); - if($res) { + $res = $this->runDBQuery($query, true, false); + + if(!$res) { return true; } return false; @@ -161,27 +185,30 @@ class UpgradeItem extends InstallUtil { return new Upgrade_Already_Applied($this); } } -// if (PEAR::isError($res)) { -// return $res; +// if (!$res) { +// $this->error[] = 'An Error Has Occured'; // } - $oCache =& KTCache::getSingleton(); - $save = $oCache->bEnabled; - $oCache->bEnabled = false; +// $oCache =& KTCache::getSingleton(); +// $save = $oCache->bEnabled; +// $oCache->bEnabled = false; $res = $this->_performUpgrade(); - $oCache->bEnabled = $save; -// if (PEAR::isError($res)) { -// $this->_recordUpgrade(false); -// return $res; -// } +// $oCache->bEnabled = $save; + if (!$res) { + $this->_recordUpgrade(false); + $this->error[] = $this->dbUtilities->getErrors(); + return false; + } $res = $this->_recordUpgrade(true); -// if (PEAR::isError($res)) { -// return $res; -// } + if (!$res) { + $this->error[] = 'An Error Has Occured 1'; + return false; + } return true; } function _performUpgrade() { -// return PEAR::raiseError("Unimplemented"); + $this->error[] = 'Unimplemented'; + return false; } function _recordUpgrade($result) { @@ -193,17 +220,10 @@ class UpgradeItem extends InstallUtil { } else { $parentid = null; } - //TODO: Where is the code? - exit("add code"); - /*return $this->autoInsert(); - - DBUtil::autoInsert("upgrades", array( - "descriptor" => $this->getDescriptor(), - "description" => $this->description, - "date_performed" => $this->date, - "result" => $result, - "parent" => $parentid, - ));*/ + $sql = "INSERT INTO upgrades (`id`, `descriptor`, `description`, `date_performed`, `result`, `parent`) VALUES ('', '". $this->getDescriptor()."', '".$this->description."', '".$this->date."', '".$result."', '".$parentid."')"; + $this->dbUtilities->query($sql); + + return true; } // STATIC @@ -358,15 +378,13 @@ class SQLUpgradeItem extends UpgradeItem { } function _performUpgrade() { -// global $default; $dbType = 'mysql'; $sqlupgradedir = KT_DIR . 'sql/' . $dbType . '/upgrade/'; $queries = SQLFile::sqlFromFile($sqlupgradedir . $this->name); - exit('add code'); -// return DBUtil::runQueries($queries, $default->_admindb); + return $this->dbUtilities->runQueries($queries); } - + } class KTRebuildPermissionObserver { @@ -426,8 +444,8 @@ class RecordUpgradeItem extends UpgradeItem { $query = "UPDATE system_settings SET value = '$systemVersion' WHERE name = 'knowledgetreeVersion'"; $this->runDBQuery($query); $query = "UPDATE system_settings SET value = '{$this->version}' WHERE name = 'databaseVersion'"; - $assArray = $this->runDBQuery($query); - return !is_null($assArray); + $result = $this->runDBQuery($query); + return $result; } function _deleteSmartyFiles() { diff --git a/setup/upgrade/steps/upgradeComplete.php b/setup/upgrade/steps/upgradeComplete.php index 99471f4..11f48d8 100644 --- a/setup/upgrade/steps/upgradeComplete.php +++ b/setup/upgrade/steps/upgradeComplete.php @@ -48,6 +48,7 @@ class upgradeComplete extends Step { public function doStep() { $this->temp_variables = array("step_name"=>"complete", "silent"=>$this->silent); + $this->doRun(); return 'landing'; } @@ -61,6 +62,8 @@ class upgradeComplete extends Step { * */ private function storeSilent() { + $v = $this->getDataFromSession('upgradeProperties'); + $this->temp_variables['sysVersion'] = $v['upgrade_version']; } } diff --git a/setup/upgrade/steps/upgradeDatabase.php b/setup/upgrade/steps/upgradeDatabase.php index 61e05bf..ac34dca 100644 --- a/setup/upgrade/steps/upgradeDatabase.php +++ b/setup/upgrade/steps/upgradeDatabase.php @@ -42,6 +42,7 @@ define('KT_DIR', SYSTEM_DIR); define('KT_LIB_DIR', SYSTEM_DIR.'lib'); +require_once(WIZARD_LIB . 'upgrade.inc.php'); class upgradeDatabase extends Step { @@ -94,8 +95,8 @@ class upgradeDatabase extends Step protected $silent = false; protected $temp_variables = array(); public $paths = ''; - - /** + + /** * Main control of database setup * * @author KnowledgeTree Team @@ -141,16 +142,8 @@ class upgradeDatabase extends Step } private function doRun($action = null) { -// $this->readConfig(KTConfig::getConfigFilename()); - $this->readConfig(); -// if($this->dbSettings['dbPort'] == '') { -// $con = $this->util->dbUtilities->load($this->dbSettings['dbHost'], '', $this->dbSettings['dbUser'],$this->dbSettings['dbPass'], $this->dbSettings['dbName']); -// } else { - $con = $this->util->dbUtilities->load($this->dbSettings['dbHost'], $this->dbSettings['dbPort'], $this->dbSettings['dbUser'], - $this->dbSettings['dbPass'], $this->dbSettings['dbName']); -// } - + $con = $this->util->dbUtilities->load($this->dbSettings['dbHost'], $this->dbSettings['dbPort'], $this->dbSettings['dbUser'],$this->dbSettings['dbPass'], $this->dbSettings['dbName']); $this->temp_variables['action'] = $action; if (is_null($action) || ($action == 'preview')) { $this->temp_variables['title'] = 'Preview Upgrade'; @@ -256,21 +249,30 @@ class upgradeDatabase extends Step require_once("../wizard/steps/configuration.php"); // configuration to read the ini path $wizConfigHandler = new configuration(); $path = $wizConfigHandler->readConfigPathIni(); - $this->util->iniUtilities->load($path); - $dbSettings = $this->util->iniUtilities->getSection('db'); - $this->dbSettings = array('dbHost'=> $dbSettings['dbHost'], + $this->util->iniUtilities->load($path); + $dbSettings = $this->util->iniUtilities->getSection('db'); + $this->dbSettings = array('dbHost'=> $dbSettings['dbHost'], 'dbName'=> $dbSettings['dbName'], 'dbUser'=> $dbSettings['dbUser'], 'dbPass'=> $dbSettings['dbPass'], 'dbPort'=> $dbSettings['dbPort'], 'dbAdminUser'=> $dbSettings['dbAdminUser'], 'dbAdminPass'=> $dbSettings['dbAdminPass'], - ); - $this->paths = $this->util->iniUtilities->getSection('urls'); - $this->paths = array_merge($this->paths, $this->util->iniUtilities->getSection('cache')); - $this->temp_variables['dbSettings'] = $this->dbSettings; - $this->sysVersion = $this->readVersion(); - $this->cachePath = $wizConfigHandler->readCachePath(); + ); + $this->paths = $this->util->iniUtilities->getSection('urls'); + $this->paths = array_merge($this->paths, $this->util->iniUtilities->getSection('cache')); + $this->sysVersion = $this->readVersion(); + $this->cachePath = $wizConfigHandler->readCachePath(); + $this->proxyPath = $this->cachePath."/.."; // Total guess. + $this->proxyPath = realpath($this->proxyPath."/proxies"); + $this->storeSilent(); + } + + public function storeSilent() { + $this->temp_variables['paths'] = $this->paths; + $this->temp_variables['sysVersion'] = $this->sysVersion; + $this->temp_variables['sysVersion'] = $this->sysVersion; + $this->temp_variables['dbSettings'] = $this->dbSettings; } private function upgradeConfirm() @@ -285,8 +287,6 @@ class upgradeDatabase extends Step private function doDatabaseUpgrade() { -// global $default; - $errors = false; $this->temp_variables['detail'] = '

The table below describes the upgrades that have occurred to @@ -294,18 +294,10 @@ class upgradeDatabase extends Step $pre_res = $this->performPreUpgradeActions(); - if (PEAR::isError($pre_res)) { - $errors = true; - $this->temp_variables['preUpgrade'] = 'Pre-Upgrade actions failed.'; - } - else { - $this->temp_variables['preUpgrade'] = 'Pre-Upgrade actions succeeded.'; - - } - $res = $this->performAllUpgrades(); - if (PEAR::isError($res) || PEAR::isError($pres)) { + if (!$res) { $errors = true; + $this->error[] = 'An Error has occured'; // TODO instantiate error details hideable section? $this->temp_variables['upgradeStatus'] = 'Database upgrade failed

@@ -319,13 +311,7 @@ class upgradeDatabase extends Step } $post_pres = $this->performPostUpgradeActions(); - if (PEAR::isError($post_res)) { - $errors = true; - $this->temp_variables['postUpgrade'] = 'Post-Upgrade actions failed.'; - } - else { - $this->temp_variables['postUpgrade'] = 'Post-Upgrade actions succeeded.'; - } + return !$errors; } @@ -334,40 +320,63 @@ class upgradeDatabase extends Step // This is just to test and needs to be updated to a more sane and error resistent architrcture if it works. // It should idealy work the same as the upgrades. - -// global $default; -// print_r($this->paths);die; // Lock the scheduler - $lockFile = $default->cacheDirectory . DIRECTORY_SEPARATOR . 'scheduler.lock'; - touch($lockFile); + $lockFile = $this->cachePath . DIRECTORY_SEPARATOR . 'scheduler.lock'; + @touch($lockFile); return true; } + private function deleteDirectory($sPath) { + if (!WINDOWS_OS) { + if (file_exists('/bin/rm')) { + $this->util->pexec(array('/bin/rm', '-rf', $sPath)); + return; + } + } + if (WINDOWS_OS) { + // Potentially kills off all the files in the path, speeding + // things up a bit + exec("del /q /s " . escapeshellarg($sPath)); + } + $hPath = @opendir($sPath); + while (($sFilename = readdir($hPath)) !== false) { + if (in_array($sFilename, array('.', '..'))) { + continue; + } + $sFullFilename = sprintf("%s/%s", $sPath, $sFilename); + if (is_dir($sFullFilename)) { + $this->deleteDirectory($sFullFilename); + continue; + } + @chmod($sFullFilename, 0666); + @unlink($sFullFilename); + } + closedir($hPath); + @rmdir($sPath); + } + private function performPostUpgradeActions() { // This is just to test and needs to be updated to a more sane and error resistent architrcture if it works. // It should idealy work the same as the upgrades. -// global $default; - // Ensure all plugins are re-registered. $sql = "TRUNCATE plugin_helper"; - $res = DBUtil::runQuery($sql); - + //$res = DBUtil::runQuery($sql); + $res = $this->util->dbUtilities->query($sql); + // Clear out all caches and proxies - they need to be regenerated with the new code - $proxyDir = $default->proxyCacheDirectory; - KTUtil::deleteDirectory($proxyDir); - - $oKTCache = new KTCache(); - $oKTCache->deleteAllCaches(); - + $this->deleteDirectory($this->proxyPath); +// $oKTCache = new KTCache(); +// $oKTCache->deleteAllCaches(); + $this->deleteDirectory($this->cachePath); // Clear the configuration cache, it'll regenerate on next load - $oKTConfig = new KTConfig(); - $oKTConfig->clearCache(); +// $oKTConfig = new KTConfig(); +// $oKTConfig->clearCache(); // Unlock the scheduler - $lockFile = $default->cacheDirectory . DIRECTORY_SEPARATOR . 'scheduler.lock'; + $lockFile = $this->cachePath . DIRECTORY_SEPARATOR . 'scheduler.lock'; if(file_exists($lockFile)){ @unlink($lockFile); } @@ -377,18 +386,15 @@ class upgradeDatabase extends Step } private function performAllUpgrades () { -// global $default; - $row = 1; - - $query = sprintf('SELECT value FROM %s WHERE name = "databaseVersion"', $default->system_settings_table); - $lastVersion = DBUtil::getOneResultKey($query, 'value'); - $currentVersion = $default->systemVersion; - + $table = 'system_settings'; + $query = "SELECT value FROM $table WHERE name = 'databaseVersion'"; + $result = $this->util->dbUtilities->query($query); + $assArr = $this->util->dbUtilities->fetchAssoc($result); + $lastVersion = $assArr[0]['value']; + $currentVersion = $this->sysVersion; $upgrades = describeUpgrade($lastVersion, $currentVersion); - $this->temp_variables['upgradeTable'] = ''; - foreach ($upgrades as $upgrade) { if (($row % 2) == 1) { $class = "odd"; @@ -402,15 +408,17 @@ class upgradeDatabase extends Step $this->temp_variables['upgradeTable'] .= sprintf('

%s
', $this->showResult($res)); $this->temp_variables['upgradeTable'] .= '
' . "\n"; $this->temp_variables['upgradeTable'] .= "\n"; - if (PEAR::isError($res)) { - if (!is_a($res, 'Upgrade_Already_Applied')) { - break; - } else { - $res = true; - } - } +// if (!$res) { +// if (!is_a($res, 'Upgrade_Already_Applied')) { +// $res = false; +// } else { +// $res = true; +// } +// } if ($res === false) { - $res = PEAR::raiseError("Upgrade returned false"); + die; + $this->error = $this->util->dbUtilities->getErrors(); +// print_r($this->error); break; } } @@ -419,11 +427,11 @@ class upgradeDatabase extends Step } private function showResult($res) { - if (PEAR::isError($res)) { + if ($res) { if (is_a($res, 'Upgrade_Already_Applied')) { return 'Already applied'; } - return sprintf('%s', htmlspecialchars($res->toString())); +// return sprintf('%s', htmlspecialchars($res)); } if ($res === true) { return 'Success'; @@ -433,6 +441,5 @@ class upgradeDatabase extends Step } return $res; } - } ?> \ No newline at end of file diff --git a/setup/upgrade/steps/upgradeWelcome.php b/setup/upgrade/steps/upgradeWelcome.php index 3e4d056..1c232df 100644 --- a/setup/upgrade/steps/upgradeWelcome.php +++ b/setup/upgrade/steps/upgradeWelcome.php @@ -45,7 +45,8 @@ class upgradeWelcome extends step { protected $silent = true; protected $temp_variables = array(); protected $error = array() ; - + protected $storeInSession = true; + public function doStep() { $this->temp_variables = array("step_name"=>"welcome"); if($this->next()) { @@ -88,8 +89,6 @@ class upgradeWelcome extends step { $configPath = $wizConfigHandler->readConfigPathIni(); $this->util->iniUtilities->load($configPath); $dconf = $this->util->iniUtilities->getSection('db'); - if($dconf['dbPort'] == 'default') - $dconf['dbPort'] = 3306; $this->util->dbUtilities->load($dconf['dbHost'],$dconf['dbPort'], $dconf['dbUser'], $dconf['dbPass'], $dconf['dbName']); $sQuery = "SELECT count(*) AS match_count FROM users WHERE username = '$username' AND password = '".md5($password)."'"; $res = $this->util->dbUtilities->query($sQuery); diff --git a/setup/upgrade/templates/complete.tpl b/setup/upgrade/templates/complete.tpl index d32a3ce..9b35d08 100644 --- a/setup/upgrade/templates/complete.tpl +++ b/setup/upgrade/templates/complete.tpl @@ -6,8 +6,8 @@

- Your database has been upgraded to systemVersion; ?> + Your database has been upgraded to
- Goto Login + Goto Login \ No newline at end of file diff --git a/setup/upgrade/templates/database.tpl b/setup/upgrade/templates/database.tpl index 46b3aec..4fb564b 100644 --- a/setup/upgrade/templates/database.tpl +++ b/setup/upgrade/templates/database.tpl @@ -3,6 +3,13 @@
This step performs the necessary Database Upgrades. + "; + foreach ($errors as $error) { + if($error != '') + echo "$error
"; + } + ?>


diff --git a/setup/upgrade/upgradeSession.php b/setup/upgrade/upgradeSession.php deleted file mode 100644 index 019fded..0000000 --- a/setup/upgrade/upgradeSession.php +++ /dev/null @@ -1,224 +0,0 @@ -. -* -* 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. -* -* @copyright 2008-2009, KnowledgeTree Inc. -* @license GNU General Public License version 3 -* @author KnowledgeTree Team -* @package Upgrader -* @version Version 0.1 -*/ -class UpgradeSession -{ - private $salt = 'upgrade'; - /** - * Constructs session object - * - * @author KnowledgeTree Team - * @access public - * @param none - */ - public function __construct() { - $this->startSession(); - } - - /** - * Starts a session if one does not exist - * - * @author KnowledgeTree Team - * @param none - * @access public - * @return void - */ - public function startSession() { - if(!isset($_SESSION[$this->salt]['ready'])) { - session_start(); - $_SESSION[$this->salt] ['ready'] = TRUE; - } - } - - /** - * Sets a value key pair in session - * - * @author KnowledgeTree Team - * @param string $fld - * @param string $val - * @access public - * @return void - */ - public function set($fld, $val) { - $this->startSession(); - $_SESSION[$this->salt] [$fld] = $val; - } - - /** - * Sets a value key pair in a class in session - * - * @author KnowledgeTree Team - * @param string $class - * @param string $fld - * @param string $val - * @access public - * @return void - */ - public function setClass($class , $k, $v) { - $this->startSession(); - $classArray = $this->get($class); - if(isset($classArray[$k])) { - $classArray[$k] = $v; - } else { - $classArray[$k] = $v; - } - $_SESSION[$this->salt] [ $class] = $classArray; - } - - /** - * Sets a error value key pair in a class in session - * - * @author KnowledgeTree Team - * @param string $class - * @param string $fld - * @param string $val - * @access public - * @return void - */ - public function setClassError($class, $k, $v) { - $this->startSession(); - $classArray = $this->get($class); - if(isset($classArray[$k])) { - $classArray[$k] = $v; - } else { - $classArray[$k] = $v; - } - $_SESSION[$this->salt] [ $class] = $classArray; - } - - /** - * Clear error values in a class session - * - * @author KnowledgeTree Team - * @param string $class - * @param string $fld - * @param string $val - * @access public - * @return void - */ - public function clearErrors($class) { - $classArray = $this->get($class); - unset($classArray['errors']); - $_SESSION[$this->salt] [ $class] = $classArray; - } - - /** - * Unset a value in session - * - * @author KnowledgeTree Team - * @param string $fld - * @access public - * @return void - */ - public function un_set($fld) { - $this->startSession(); - unset($_SESSION[$this->salt] [$fld]); - } - - /** - * Unset a class value in session - * - * @author KnowledgeTree Team - * @param string $class - * @access public - * @return void - */ - public function un_setClass($class) { - $this->startSession(); - if(isset($_SESSION[$this->salt] [$class])) - unset($_SESSION[$this->salt] [$class]); - } - - /** - * Destroy the session - * - * @author KnowledgeTree Team - * @param none - * @access public - * @return void - */ - public function destroy() { - $this->startSession(); - unset($_SESSION[$this->salt]); - session_destroy(); - } - - /** - * Get a session value - * - * @author KnowledgeTree Team - * @param string $fld - * @access public - * @return string - */ - public function get($fld) { - $this->startSession(); - if(isset($_SESSION[$this->salt] [$fld])) - return $_SESSION[$this->salt] [$fld]; - return false; - } - - /** - * Check if a field exists in session - * - * @author KnowledgeTree Team - * @param string $fld - * @access public - * @return string - */ - public function is_set($fld) { - $this->startSession(); - return isset($_SESSION[$this->salt] [$fld]); - } - - /** - * Return a class from session - * - * @author KnowledgeTree Team - * @param string $fld - * @access public - * @return string - */ - public function getClass($class) { - return $_SESSION[$this->salt][$class]; - } -} -?> \ No newline at end of file diff --git a/setup/wizard/dbUtilities.php b/setup/wizard/dbUtilities.php index 6206fe6..39f6876 100644 --- a/setup/wizard/dbUtilities.php +++ b/setup/wizard/dbUtilities.php @@ -267,5 +267,15 @@ class dbUtilities { public function rollback() { $this->query("ROLLBACK"); } + + public function runQueries($aQueries) { + foreach ($aQueries as $sQuery) { + $res = $this->query($sQuery); + if (!$res) { + return $res; + } + } + return true; + } } ?> \ No newline at end of file diff --git a/setup/wizard/iniUtilities.php b/setup/wizard/iniUtilities.php index e47053a..366caf7 100644 --- a/setup/wizard/iniUtilities.php +++ b/setup/wizard/iniUtilities.php @@ -45,11 +45,11 @@ class iniUtilities { function load($iniFile) { - if($this->iniFile != $iniFile) { - $this->cleanArray = array(); - $this->lineNum = 0; - $this->exists = ''; - } +// if($this->iniFile != $iniFile) { +// $this->cleanArray = array(); +// $this->lineNum = 0; +// $this->exists = ''; +// } $this->iniFile = $iniFile; $this->backupIni($iniFile); $this->read($iniFile); diff --git a/setup/wizard/lib/services/unixLucene.php b/setup/wizard/lib/services/unixLucene.php index a87ca88..1520874 100644 --- a/setup/wizard/lib/services/unixLucene.php +++ b/setup/wizard/lib/services/unixLucene.php @@ -201,7 +201,7 @@ class unixLucene extends unixService { public function start() { $state = $this->status(); if($state != 'STARTED') { - $logFile = $this->outputDir."log".DS."lucene.log"; + $logFile = $this->outputDir.DS."lucene.log"; @unlink($logFile); $cmd = "cd ".$this->getLuceneDir()."; "; $cmd .= "nohup java {$this->getJavaXmx()} {$this->getJavaXmx()} -jar ".$this->getLuceneSource()." > ".$logFile." 2>&1 & echo $!"; diff --git a/setup/wizard/lib/services/unixScheduler.php b/setup/wizard/lib/services/unixScheduler.php index 6f8fada..9c5a4c0 100644 --- a/setup/wizard/lib/services/unixScheduler.php +++ b/setup/wizard/lib/services/unixScheduler.php @@ -180,7 +180,7 @@ class unixScheduler extends unixService { // TODO : Write sh on the fly? Not sure the reasoning here $source = $this->getSchedulerSourceLoc(); $this->writeSchedulerTask(); - $logFile = $this->outputDir."log".DS."scheduler.log"; + $logFile = $this->outputDir.DS."scheduler.log"; @unlink($logFile); if($source) { // Source $cmd = "nohup ".$source." > ".$logFile." 2>&1 & echo $!"; diff --git a/setup/wizard/resources/graphics/greenit.jpg b/setup/wizard/resources/graphics/greenit.jpg new file mode 100644 index 0000000..6498c37 --- /dev/null +++ b/setup/wizard/resources/graphics/greenit.jpg diff --git a/setup/wizard/templates/install.tpl b/setup/wizard/templates/install.tpl index 1e1a8f2..f25971f 100644 --- a/setup/wizard/templates/install.tpl +++ b/setup/wizard/templates/install.tpl @@ -5,10 +5,7 @@

We would greatly appreciate it if you would allow us to collect anonymous usage statistics to help us provide a better quality product. The information includes a unique identification number, number of users you have created, your operating system type and your IP address. Your privacy is protected by the KnowledgeTree Privacy and Data Protection Agreements.

-

- KnowledgeTree, in partnership with Food & Trees for Africa, and as a contributor to the National Tree Distribution Program, will also commit to planting one tree in Africa for every 1000 vertified installations of the product. -

-
image('img_fatlogo.jpg'); ?>
+
image('greenit.jpg'); ?>


   Help to improve KnowledgeTree by providing anonymous usage statistics