Commit 2e0bec96fc4ddbfc77d0f9b2af59adbd9acfb334
Merge branch 'edge' of github.com:ktgit/knowledgetree into edge
Showing
3 changed files
with
17 additions
and
13 deletions
setup/wizard/lib/services/unixScheduler.php
| @@ -179,7 +179,7 @@ class unixScheduler extends unixService { | @@ -179,7 +179,7 @@ class unixScheduler extends unixService { | ||
| 179 | function start() { | 179 | function start() { |
| 180 | // TODO : Write sh on the fly? Not sure the reasoning here | 180 | // TODO : Write sh on the fly? Not sure the reasoning here |
| 181 | $source = $this->getSchedulerSourceLoc(); | 181 | $source = $this->getSchedulerSourceLoc(); |
| 182 | - $this->writeSchedulerTask(); | 182 | +// $this->writeSchedulerTask(); |
| 183 | $logFile = "/dev/null"; | 183 | $logFile = "/dev/null"; |
| 184 | // @unlink($logFile); | 184 | // @unlink($logFile); |
| 185 | if($source) { // Source | 185 | if($source) { // Source |
setup/wizard/steps/configuration.php
| @@ -247,10 +247,12 @@ class configuration extends Step | @@ -247,10 +247,12 @@ class configuration extends Step | ||
| 247 | public function doRun($edit = false) | 247 | public function doRun($edit = false) |
| 248 | { | 248 | { |
| 249 | $server = $this->getServerInfo(); | 249 | $server = $this->getServerInfo(); |
| 250 | - if(!$edit) $this->temp_variables['server'] = $server; | 250 | + if(!$edit || $this->util->isMigration()) |
| 251 | + $this->temp_variables['server'] = $server; | ||
| 251 | 252 | ||
| 252 | $paths = $this->getPathInfo($server['file_system_root']['value']); | 253 | $paths = $this->getPathInfo($server['file_system_root']['value']); |
| 253 | - if(!$edit) $this->temp_variables['paths'] = $paths; | 254 | + if(!$edit || $this->util->isMigration()) |
| 255 | + $this->temp_variables['paths'] = $paths; | ||
| 254 | 256 | ||
| 255 | // Rewrite file system root | 257 | // Rewrite file system root |
| 256 | if(!$this->fpath) { | 258 | if(!$this->fpath) { |
| @@ -432,13 +434,15 @@ class configuration extends Step | @@ -432,13 +434,15 @@ class configuration extends Step | ||
| 432 | { | 434 | { |
| 433 | if(isset($this->temp_variables['paths'])) { | 435 | if(isset($this->temp_variables['paths'])) { |
| 434 | if ($this->util->isMigration()) { // Check if its an upgrade | 436 | if ($this->util->isMigration()) { // Check if its an upgrade |
| 435 | - $this->readInstallation(); // Read values from config.ini of other installation | 437 | + $this->readConfigPath(); // Read contents of config-path file as only var Documents are used of old stack |
| 438 | + $this->readInstallation(); // Read values from config.ini of other installation and overwrite config-path's | ||
| 436 | $dirs = $this->getFromConfigPath(); // Store contents | 439 | $dirs = $this->getFromConfigPath(); // Store contents |
| 437 | } else { | 440 | } else { |
| 438 | $dirs = $this->temp_variables['paths']; // Pull from temp | 441 | $dirs = $this->temp_variables['paths']; // Pull from temp |
| 439 | } | 442 | } |
| 440 | } else { | 443 | } else { |
| 441 | if ($this->util->isMigration()) { // Check if its an upgrade | 444 | if ($this->util->isMigration()) { // Check if its an upgrade |
| 445 | + $this->readConfigPath(); // Read contents of config-path file as only var Documents are used of old stack | ||
| 442 | $this->readInstallation(); // Read values from config.ini of other installation | 446 | $this->readInstallation(); // Read values from config.ini of other installation |
| 443 | } else { | 447 | } else { |
| 444 | $this->readConfigPath(); // Read contents of config-path file | 448 | $this->readConfigPath(); // Read contents of config-path file |
| @@ -455,13 +459,13 @@ class configuration extends Step | @@ -455,13 +459,13 @@ class configuration extends Step | ||
| 455 | } | 459 | } |
| 456 | if(WINDOWS_OS) | 460 | if(WINDOWS_OS) |
| 457 | $path = preg_replace('/\//', '\\',$path); | 461 | $path = preg_replace('/\//', '\\',$path); |
| 458 | - $dirs[$key]['path'] = $path; | ||
| 459 | - $path = $class = strtolower(substr($path,0,1)).substr($path,1); // Damn you windows | ||
| 460 | - if(isset($dir['file'])) { | ||
| 461 | - $class = $this->util->checkPermission($path, false, true); | ||
| 462 | - } else { | ||
| 463 | - $class = $this->util->checkPermission($path, $dir['create']); | ||
| 464 | - } | 462 | + $dirs[$key]['path'] = $path; |
| 463 | + $path = $class = strtolower(substr($path,0,1)).substr($path,1); // Damn you windows | ||
| 464 | + if(isset($dir['file'])) { | ||
| 465 | + $class = $this->util->checkPermission($path, false, true); | ||
| 466 | + } else { | ||
| 467 | + $class = $this->util->checkPermission($path, $dir['create']); | ||
| 468 | + } | ||
| 465 | if(isset($class['msg'])) { | 469 | if(isset($class['msg'])) { |
| 466 | if($class['class'] != 'tick') { | 470 | if($class['class'] != 'tick') { |
| 467 | $this->temp_variables['paths_perms'] = $class['class']; | 471 | $this->temp_variables['paths_perms'] = $class['class']; |
var/bin/schedulerTask.sh
| @@ -2,11 +2,11 @@ | @@ -2,11 +2,11 @@ | ||
| 2 | PHP_CLI="/usr/local/zend/bin/php" | 2 | PHP_CLI="/usr/local/zend/bin/php" |
| 3 | 3 | ||
| 4 | BIN_DIR=$(dirname $0) | 4 | BIN_DIR=$(dirname $0) |
| 5 | -INSTALL_DIR="../../${BIN_DIR}" | 5 | +INSTALL_DIR="../..${BIN_DIR}" |
| 6 | 6 | ||
| 7 | cd $INSTALL_DIR/bin | 7 | cd $INSTALL_DIR/bin |
| 8 | 8 | ||
| 9 | while true; do | 9 | while true; do |
| 10 | $PHP_CLI -Cq scheduler.php | 10 | $PHP_CLI -Cq scheduler.php |
| 11 | sleep 30 | 11 | sleep 30 |
| 12 | -done | ||
| 13 | \ No newline at end of file | 12 | \ No newline at end of file |
| 13 | +done |