Commit f750990913f1ac997ec0e8663120a829993ff003

Authored by unknown
2 parents 79805226 a2de260d

Merge branch 'edge' of github.com:ktgit/knowledgetree into edge

dmsctl.sh
@@ -16,13 +16,30 @@ INSTALL_PATH=`pwd` @@ -16,13 +16,30 @@ INSTALL_PATH=`pwd`
16 JAVABIN=/usr/bin/java 16 JAVABIN=/usr/bin/java
17 ZEND_DIR=/usr/local/zend 17 ZEND_DIR=/usr/local/zend
18 18
  19 +# exits if the UID is not 0 [root]
  20 +check_root_privileges()
  21 +{
  22 + ID="id -u"
  23 + MYUID=`$ID 2> /dev/null`
  24 + if [ ! -z "$MYUID" ]; then
  25 + if [ $MYUID != 0 ]; then
  26 + echo "You need root privileges to run this script!";
  27 + exit 1
  28 + fi
  29 + else
  30 + echo "Could not detect UID";
  31 + exit 1
  32 + fi
  33 +}
  34 +
  35 +
19 if [ -f /etc/zce.rc ];then 36 if [ -f /etc/zce.rc ];then
20 . /etc/zce.rc 37 . /etc/zce.rc
21 else 38 else
22 echo "/etc/zce.rc doesn't exist!" 39 echo "/etc/zce.rc doesn't exist!"
23 exit 1; 40 exit 1;
24 fi 41 fi
25 - 42 +check_root_privileges
26 43
27 # OpenOffice 44 # OpenOffice
28 SOFFICEFILE=soffice 45 SOFFICEFILE=soffice
setup/migrate/steps/migrateInstallation.php
@@ -160,7 +160,7 @@ class migrateInstallation extends step @@ -160,7 +160,7 @@ class migrateInstallation extends step
160 public function checkVersion() { 160 public function checkVersion() {
161 if($this->foundVersion < $this->supportedVersion) { 161 if($this->foundVersion < $this->supportedVersion) {
162 $this->versionError = true; 162 $this->versionError = true;
163 - $this->error[] = "KT installation needs to be 3.6.1 or higher"; 163 + $this->error[] = "KnowledgeTree installation needs to be 3.6.1 or higher";
164 return false; 164 return false;
165 } 165 }
166 166
@@ -173,7 +173,7 @@ class migrateInstallation extends step @@ -173,7 +173,7 @@ class migrateInstallation extends step
173 $foundVersion = file_get_contents($verFile); 173 $foundVersion = file_get_contents($verFile);
174 return $foundVersion; 174 return $foundVersion;
175 } else { 175 } else {
176 - $this->error[] = "KT installation version not found"; 176 + $this->error[] = "KnowledgeTree installation version not found";
177 } 177 }
178 178
179 return false; 179 return false;
@@ -214,10 +214,10 @@ class migrateInstallation extends step @@ -214,10 +214,10 @@ class migrateInstallation extends step
214 214
215 return true; 215 return true;
216 } 216 }
217 - $this->error[] = "KT installation configuration file empty"; 217 + $this->error[] = "KnowledgeTree installation configuration file empty";
218 } 218 }
219 } else { 219 } else {
220 - $this->error[] = "KT installation configuration file not found"; 220 + $this->error[] = "KnowledgeTree installation configuration file not found";
221 } 221 }
222 } else { 222 } else {
223 $this->error[] = "Please Enter a Location"; 223 $this->error[] = "Please Enter a Location";
setup/upgrade/step.php
@@ -467,7 +467,7 @@ class Step @@ -467,7 +467,7 @@ class Step
467 $foundVersion = file_get_contents($verFile); 467 $foundVersion = file_get_contents($verFile);
468 return $foundVersion; 468 return $foundVersion;
469 } else { 469 } else {
470 - $this->error[] = "KT installation version not found"; 470 + $this->error[] = "KnowledgeTree installation version not found";
471 } 471 }
472 472
473 return false; 473 return false;
setup/upgrade/steps/upgradeDatabase.php
@@ -202,7 +202,7 @@ class upgradeDatabase extends Step @@ -202,7 +202,7 @@ class upgradeDatabase extends Step
202 $foundVersion = file_get_contents($verFile); 202 $foundVersion = file_get_contents($verFile);
203 return $foundVersion; 203 return $foundVersion;
204 } else { 204 } else {
205 - $this->error[] = "KT installation version not found"; 205 + $this->error[] = "KnowledgeTree installation version not found";
206 } 206 }
207 207
208 return false; 208 return false;
setup/upgrade/upgradeWizard.php
@@ -146,18 +146,6 @@ class UpgradeWizard { @@ -146,18 +146,6 @@ class UpgradeWizard {
146 } 146 }
147 147
148 /** 148 /**
149 - * Create upgrade file  
150 - *  
151 - * @author KnowledgeTree Team  
152 - * @access private  
153 - * @param none  
154 - * @return void  
155 - */  
156 - private function createUpgradeFile() {  
157 - touch(SYSTEM_DIR.'var'.DS.'bin'.DS."upgrade.lock");  
158 - }  
159 -  
160 - /**  
161 * Remove upgrade file 149 * Remove upgrade file
162 * 150 *
163 * @author KnowledgeTree Team 151 * @author KnowledgeTree Team
@@ -222,8 +210,6 @@ class UpgradeWizard { @@ -222,8 +210,6 @@ class UpgradeWizard {
222 */ 210 */
223 public function dispatch() { 211 public function dispatch() {
224 $this->load(); 212 $this->load();
225 - // is this necessary?  
226 - $this->createUpgradeFile();  
227 $response = $this->systemChecks(); 213 $response = $this->systemChecks();
228 if($this->util->installationSpecified()) { // Check if the migrator needs to be accessed 214 if($this->util->installationSpecified()) { // Check if the migrator needs to be accessed
229 $this->util->redirect('../wizard/index.php?step_name=install_type'); 215 $this->util->redirect('../wizard/index.php?step_name=install_type');
setup/upgrade/upgrader.php
@@ -400,20 +400,6 @@ class Upgrader { @@ -400,20 +400,6 @@ class Upgrader {
400 for ($i=1; $i< count($steps)+1; $i++) { 400 for ($i=1; $i< count($steps)+1; $i++) {
401 $this->_upgradeHelper($steps[$i]); 401 $this->_upgradeHelper($steps[$i]);
402 } 402 }
403 -  
404 - $this->_completeUpgrade();  
405 - }  
406 -  
407 - /**  
408 - * Complete upgrade cleanup process  
409 - *  
410 - * @author KnowledgeTree Team  
411 - * @param none  
412 - * @access private  
413 - * @return void  
414 - */  
415 - private function _completeUpgrade() {  
416 - touch("upgrade");  
417 } 403 }
418 404
419 /** 405 /**
setup/wizard/installUtil.php
@@ -878,7 +878,7 @@ class InstallUtil { @@ -878,7 +878,7 @@ class InstallUtil {
878 return $type; 878 return $type;
879 } 879 }
880 880
881 - return false; 881 + return "community";
882 } 882 }
883 883
884 /** 884 /**
setup/wizard/lib/services/windowsLucene.php
@@ -424,7 +424,7 @@ class windowsLucene extends windowsService { @@ -424,7 +424,7 @@ class windowsLucene extends windowsService {
424 $luceneExe = $this->getLuceneExe(); 424 $luceneExe = $this->getLuceneExe();
425 $luceneSource = $this->getLuceneSource(); 425 $luceneSource = $this->getLuceneSource();
426 $luceneDir = $this->getluceneDir(); 426 $luceneDir = $this->getluceneDir();
427 - $cmd = "\"{$luceneExe}\""." -install \"".$this->getName()."\" -description "."\"".$this->description."\""." \"".$this->getJavaJVM(). "\" -Djava.class.path=\"".$luceneSource."\"". " -start ".$this->getLuceneServer(). " -out \"".$this->getLuceneOut()."\" -err \"".$this->getLuceneError()."\" -current \"".$luceneDir."\" -auto"; 427 + $cmd = "\"{$luceneExe}\""." -install \"".$this->getName()."\" \"".$this->getJavaJVM(). "\" -Djava.class.path=\"".$luceneSource."\"". " -start ".$this->getLuceneServer(). " -out \"".$this->getLuceneOut()."\" -err \"".$this->getLuceneError()."\" -current \"".$luceneDir."\" -auto";
428 if(DEBUG) { 428 if(DEBUG) {
429 echo "$cmd<br/>"; 429 echo "$cmd<br/>";
430 return false; 430 return false;