Commit a8a227938119e59d92dfa5466477c8009f122226
Merge branch 'edge' of github.com:ktgit/knowledgetree into edge
Showing
25 changed files
with
33 additions
and
506 deletions
setup/migrate/steps/migrateDatabase.php
100644 → 100755
| @@ -122,6 +122,7 @@ class migrateDatabase extends Step | @@ -122,6 +122,7 @@ class migrateDatabase extends Step | ||
| 122 | $dbSettings = $installation['dbSettings']; | 122 | $dbSettings = $installation['dbSettings']; |
| 123 | $location = $installation['location']; | 123 | $location = $installation['location']; |
| 124 | $port = $this->util->getPort($location); | 124 | $port = $this->util->getPort($location); |
| 125 | + $socket = $this->getSocket($location); | ||
| 125 | $tmpFolder = $this->resolveTempDir(); | 126 | $tmpFolder = $this->resolveTempDir(); |
| 126 | if(WINDOWS_OS) { | 127 | if(WINDOWS_OS) { |
| 127 | $termOrBash = "command prompt window"; | 128 | $termOrBash = "command prompt window"; |
| @@ -143,7 +144,11 @@ class migrateDatabase extends Step | @@ -143,7 +144,11 @@ class migrateDatabase extends Step | ||
| 143 | $dbName = $dbSettings['dbName']; | 144 | $dbName = $dbSettings['dbName']; |
| 144 | if(!$manual) { // Try to export database | 145 | if(!$manual) { // Try to export database |
| 145 | $sqlFile = $tmpFolder."/kt-backup-$date.sql"; | 146 | $sqlFile = $tmpFolder."/kt-backup-$date.sql"; |
| 146 | - $cmd = $exe.' -u"'.$dbAdminUser.'" -p"'.$dbAdminPass.'" --port="'.$port.'" '.$dbName.' > '.$sqlFile; | 147 | + if($socket != "") |
| 148 | + $cmd = $exe.' -u"'.$dbAdminUser.'" -p"'.$dbAdminPass.'" --port="'.$port.'" '.' --socket="'.$socket.'" '.$dbName.' > '.$sqlFile; | ||
| 149 | + else | ||
| 150 | + $cmd = $exe.' -u"'.$dbAdminUser.'" -p"'.$dbAdminPass.'" --port="'.$port.'" '.$dbName.' > '.$sqlFile; | ||
| 151 | + echo $cmd; | ||
| 147 | $response = $this->util->pexec($cmd); | 152 | $response = $this->util->pexec($cmd); |
| 148 | } | 153 | } |
| 149 | if(file_exists($sqlFile)) { | 154 | if(file_exists($sqlFile)) { |
| @@ -162,7 +167,10 @@ class migrateDatabase extends Step | @@ -162,7 +167,10 @@ class migrateDatabase extends Step | ||
| 162 | } else { | 167 | } else { |
| 163 | $sqlFile = "/tmp/kt-backup-$date.sql"; // Use tmp instead due to permissions | 168 | $sqlFile = "/tmp/kt-backup-$date.sql"; // Use tmp instead due to permissions |
| 164 | } | 169 | } |
| 165 | - $cmd = $exe.' -u"'.$dbAdminUser.'" -p"'.$dbAdminPass.'" --port="'.$port.'" '.$dbName.' > '.$sqlFile; | 170 | + if($socket != "") |
| 171 | + $cmd = $exe.' -u"'.$dbAdminUser.'" -p"'.$dbAdminPass.'" --port="'.$port.'" '.' --socket="'.$socket.'" '.$dbName.' > '.$sqlFile; | ||
| 172 | + else | ||
| 173 | + $cmd = $exe.' -u"'.$dbAdminUser.'" -p"'.$dbAdminPass.'" --port="'.$port.'" '.$dbName.' > '.$sqlFile; | ||
| 166 | $this->error[]['error'] = "The KnowledgeTree Setup Wizard was unable to connect to your KnowledgeTree 3.6.1 database."; | 174 | $this->error[]['error'] = "The KnowledgeTree Setup Wizard was unable to connect to your KnowledgeTree 3.6.1 database."; |
| 167 | $this->error[]['msg'] = "Ensure that your KnowledgeTree Mysql service is running."; | 175 | $this->error[]['msg'] = "Ensure that your KnowledgeTree Mysql service is running."; |
| 168 | $this->error[]['cmd'] = "Click <b>Next</b> after resolving the above errors."; | 176 | $this->error[]['cmd'] = "Click <b>Next</b> after resolving the above errors."; |
| @@ -269,5 +277,27 @@ class migrateDatabase extends Step | @@ -269,5 +277,27 @@ class migrateDatabase extends Step | ||
| 269 | $this->temp_variables['dumpLocation'] = $this->sqlDumpFile; | 277 | $this->temp_variables['dumpLocation'] = $this->sqlDumpFile; |
| 270 | } | 278 | } |
| 271 | 279 | ||
| 280 | + /** | ||
| 281 | + * Return socket of the old installation | ||
| 282 | + * | ||
| 283 | + * @param location | ||
| 284 | + * @return string | ||
| 285 | + */ | ||
| 286 | + public function getSocket($location) { | ||
| 287 | + if(WINDOWS_OS) { | ||
| 288 | + $myIni = "my.ini"; | ||
| 289 | + } else { | ||
| 290 | + $myIni = "my.cnf"; | ||
| 291 | + } | ||
| 292 | + $dbConfigPath = $location.DS."mysql".DS."$myIni"; | ||
| 293 | + | ||
| 294 | + if(file_exists($dbConfigPath)) { | ||
| 295 | + $this->util->iniUtilities->load($dbConfigPath); | ||
| 296 | + $dbSettings = $this->util->iniUtilities->getSection('mysqladmin'); | ||
| 297 | + return $dbSettings['socket']; | ||
| 298 | + } | ||
| 299 | + | ||
| 300 | + return ''; | ||
| 301 | + } | ||
| 272 | } | 302 | } |
| 273 | -?> | ||
| 274 | \ No newline at end of file | 303 | \ No newline at end of file |
| 304 | +?> |
setup/wizard/batches/lucene_install.bat deleted
| 1 | -"C:\Program Files\Zend\Apache2\htdocs\knowledgetree\bin\luceneserver\KTLuceneService.exe" -install "KTLuceneTest" "C:\Program Files\Java\jre6\bin\client\jvm.dll" -Djava.class.path="C:\Program Files\Zend\Apache2\htdocs\knowledgetree\bin\luceneserver\ktlucene.jar" -start com.knowledgetree.lucene.KTLuceneServer -out "C:\Program Files\Zend\Apache2\htdocs\knowledgetree\var\log\lucene-out.txt" -err "C:\Program Files\Zend\Apache2\htdocs\knowledgetree\var\log\lucene-err.txt" -current "C:\Program Files\Zend\Apache2\htdocs\knowledgetree\bin\luceneserver" -auto | ||
| 2 | \ No newline at end of file | 0 | \ No newline at end of file |
setup/wizard/batches/lucene_start.bat deleted
setup/wizard/batches/lucene_uninstall.bat deleted
setup/wizard/batches/scheduler_install.bat deleted
setup/wizard/batches/scheduler_start.bat deleted
setup/wizard/batches/scheduler_uninstall.bat deleted
setup/wizard/lib/system/config-path-mock deleted
| 1 | -/var/lib/knowledgetree | ||
| 2 | -/var/lib/knowledgetree/Documents | ||
| 3 | -/var/lib/knowledgetree/indexes | ||
| 4 | -/etc/knowledgetree/config.ini | ||
| 5 | -/var/log/knowledgetree | ||
| 6 | -/var/tmp/knowledgetree | ||
| 7 | -/var/tmp/knowledgetree/proxies | ||
| 8 | -/var/tmp/knowledgetree/uploads | ||
| 9 | -/var/tmp/knowledgetree/cache | ||
| 10 | \ No newline at end of file | 0 | \ No newline at end of file |
setup/wizard/lib/system/config-path-mock-windows deleted
setup/wizard/lib/system/demo.sh deleted
| 1 | -#!/bin/bash | ||
| 2 | -rm ../../../../var/log/lucene.log; | ||
| 3 | -rm ../../../../var/log/scheduler.log; | ||
| 4 | -rm ../../../../var/log/openoffice.log; | ||
| 5 | -rm ../../../../setup/wizard/output/outJV; | ||
| 6 | -chmod 777 -R /var/lib/knowledgetree | ||
| 7 | -chmod 777 -R /var/log/knowledgetree | ||
| 8 | -chmod 777 -R /var/tmp/knowledgetree | ||
| 9 | -chmod 777 -R /var/lib/knowledgetree/Documents | ||
| 10 | -chmod 777 -R /var/lib/knowledgetree/indexes | ||
| 11 | -chmod 777 -R /var/lib/knowledgetree/proxies | ||
| 12 | -chmod 777 -R /var/lib/knowledgetree/uploads |
setup/wizard/lib/system/executeCommand.class deleted
No preview for this file type
setup/wizard/lib/system/executeCommand.java deleted
| 1 | -import java.io.*; | ||
| 2 | -import java.lang.System; | ||
| 3 | -import java.util.Properties; | ||
| 4 | - | ||
| 5 | -public class executeCommand { | ||
| 6 | - | ||
| 7 | - public static void main(String args[]) throws Exception { | ||
| 8 | - String command = args[0]; | ||
| 9 | - try { | ||
| 10 | - // Execute a command without arguments | ||
| 11 | - Process child = Runtime.getRuntime().exec(command); | ||
| 12 | - } catch (IOException e) { | ||
| 13 | - System.err.println("Error: " + e.getMessage()); | ||
| 14 | - } | ||
| 15 | - } | ||
| 16 | -} |
setup/wizard/lib/system/javaVersion.class deleted
No preview for this file type
setup/wizard/lib/system/javaVersion.java deleted
| 1 | -import java.io.*; | ||
| 2 | -import java.lang.System; | ||
| 3 | -import java.util.Properties; | ||
| 4 | - | ||
| 5 | -public class javaVersion { | ||
| 6 | - public static void main(String args[]) throws Exception { | ||
| 7 | - String outJV = args[0]; | ||
| 8 | - String outJVHome = args[1]; | ||
| 9 | - Properties sysProps = new Properties(); | ||
| 10 | - sysProps = System.getProperties(); | ||
| 11 | - String sysVersion = sysProps.getProperty("java.version"); | ||
| 12 | - String javaHome = sysProps.getProperty("java.home"); | ||
| 13 | - try{ | ||
| 14 | - // Create file | ||
| 15 | - FileWriter fstream = new FileWriter(outJV); | ||
| 16 | - BufferedWriter out = new BufferedWriter(fstream); | ||
| 17 | - out.write(sysVersion); | ||
| 18 | - //Close the output stream | ||
| 19 | - out.close(); | ||
| 20 | - fstream = new FileWriter(outJVHome); | ||
| 21 | - out = new BufferedWriter(fstream); | ||
| 22 | - out.write(javaHome); | ||
| 23 | - //Close the output stream | ||
| 24 | - out.close(); | ||
| 25 | - } catch (Exception e){//Catch exception if any | ||
| 26 | - System.err.println("Error: " + e.getMessage()); | ||
| 27 | - } | ||
| 28 | - } | ||
| 29 | -} | ||
| 30 | \ No newline at end of file | 0 | \ No newline at end of file |
setup/wizard/lib/system/openOffice.class deleted
No preview for this file type
setup/wizard/lib/system/openOffice.java deleted
| 1 | -import java.io.*; | ||
| 2 | -import java.lang.System; | ||
| 3 | -import java.util.Properties; | ||
| 4 | - | ||
| 5 | -public class openOffice { | ||
| 6 | - | ||
| 7 | - public static void main(String args[]) throws Exception { | ||
| 8 | - String openoffice = args[0]; | ||
| 9 | - try { | ||
| 10 | - // Execute a command without arguments | ||
| 11 | - String command = ""+openoffice+" -nofirststartwizard -nologo -headless -accept=\"socket,host=localhost,port=8100;urp;StarOffice.ServiceManager\""; | ||
| 12 | - Process child = Runtime.getRuntime().exec(command); | ||
| 13 | - System.out.println(command); | ||
| 14 | - } catch (IOException e) { | ||
| 15 | - System.err.println("Error: " + e.getMessage()); | ||
| 16 | - } | ||
| 17 | - } | ||
| 18 | -} |
setup/wizard/lib/system/perms.sh deleted
| 1 | -sudo chown -R www-data:www-data /var/lib/knowledgetree-ce /var/lib/knowledgetree-ce/Documents /var/lib/knowledgetree-ce/indexes /etc/knowledgetree-ce/config.ini /var/log/knowledgetree-ce /var/tmp/knowledgetree-ce /var/tmp/knowledgetree-ce/proxies /var/tmp/knowledgetree-ce/uploads /var/tmp/knowledgetree-ce/cache /usr/share/knowledgetree-ce/var/ /usr/share/knowledgetree-ce/config/ | ||
| 2 | \ No newline at end of file | 0 | \ No newline at end of file |
setup/wizard/lib/system/phpinfo.php deleted
setup/wizard/lib/system/soffice.php deleted
| 1 | -<?php | ||
| 2 | - $cmd = "nohup /usr/bin/soffice -nofirststartwizard -nologo -headless -accept=\"socket,host=localhost,port=8100;urp;StarOffice.ServiceManager\" &1> /dev/null &"; | ||
| 3 | - $res = pexec($cmd); | ||
| 4 | - print_r($res); | ||
| 5 | -/** | ||
| 6 | - * Portably execute a command on any of the supported platforms. | ||
| 7 | - * | ||
| 8 | - * @author KnowledgeTree Team | ||
| 9 | - * @access public | ||
| 10 | - * @param string $aCmd | ||
| 11 | - * @param array $aOptions | ||
| 12 | - * @return array | ||
| 13 | - */ | ||
| 14 | - function pexec($aCmd, $aOptions = null) { | ||
| 15 | - if (is_array($aCmd)) { | ||
| 16 | - $sCmd = safeShellString($aCmd); | ||
| 17 | - } else { | ||
| 18 | - $sCmd = $aCmd; | ||
| 19 | - } | ||
| 20 | - $sAppend = arrayGet($aOptions, 'append'); | ||
| 21 | - if ($sAppend) { | ||
| 22 | - $sCmd .= " >> " . escapeshellarg($sAppend); | ||
| 23 | - } | ||
| 24 | - $sPopen = arrayGet($aOptions, 'popen'); | ||
| 25 | - if ($sPopen) { | ||
| 26 | - if (WINDOWS_OS) { | ||
| 27 | - $sCmd = "start /b \"kt\" " . $sCmd; | ||
| 28 | - } | ||
| 29 | - return popen($sCmd, $sPopen); | ||
| 30 | - } | ||
| 31 | - // for exec, check return code and output... | ||
| 32 | - $aRet = array(); | ||
| 33 | - $aOutput = array(); | ||
| 34 | - $iRet = ''; | ||
| 35 | - //if(WINDOWS_OS) { | ||
| 36 | - // $sCmd = 'call '.$sCmd; | ||
| 37 | - // } | ||
| 38 | - | ||
| 39 | - exec($sCmd, $aOutput, $iRet); | ||
| 40 | - $aRet['ret'] = $iRet; | ||
| 41 | - $aRet['out'] = $aOutput; | ||
| 42 | - | ||
| 43 | - return $aRet; | ||
| 44 | - } | ||
| 45 | - | ||
| 46 | - /** | ||
| 47 | - * | ||
| 48 | - * | ||
| 49 | - * @author KnowledgeTree Team | ||
| 50 | - * @access public | ||
| 51 | - * @return string | ||
| 52 | - */ | ||
| 53 | - function arrayGet($aArray, $sKey, $mDefault = null, $bDefaultIfEmpty = true) { | ||
| 54 | - if (!is_array($aArray)) { | ||
| 55 | - $aArray = (array) $aArray; | ||
| 56 | - } | ||
| 57 | - | ||
| 58 | - if ($aArray !== 0 && $aArray !== '0' && empty($aArray)) { | ||
| 59 | - return $mDefault; | ||
| 60 | - } | ||
| 61 | - if (array_key_exists($sKey, $aArray)) { | ||
| 62 | - $mVal =& $aArray[$sKey]; | ||
| 63 | - if (empty($mVal) && $bDefaultIfEmpty) { | ||
| 64 | - return $mDefault; | ||
| 65 | - } | ||
| 66 | - return $mVal; | ||
| 67 | - } | ||
| 68 | - return $mDefault; | ||
| 69 | - } | ||
| 70 | - | ||
| 71 | - /** | ||
| 72 | - * | ||
| 73 | - * | ||
| 74 | - * @author KnowledgeTree Team | ||
| 75 | - * @access public | ||
| 76 | - * @return string | ||
| 77 | - */ | ||
| 78 | - function safeShellString () { | ||
| 79 | - $aArgs = func_get_args(); | ||
| 80 | - $aSafeArgs = array(); | ||
| 81 | - if (is_array($aArgs[0])) { | ||
| 82 | - $aArgs = $aArgs[0]; | ||
| 83 | - } | ||
| 84 | - $aSafeArgs[] = escapeshellarg(array_shift($aArgs)); | ||
| 85 | - if (is_array($aArgs[0])) { | ||
| 86 | - $aArgs = $aArgs; | ||
| 87 | - } | ||
| 88 | - foreach ($aArgs as $sArg) { | ||
| 89 | - if (empty($sArg)) { | ||
| 90 | - $aSafeArgs[] = "''"; | ||
| 91 | - } else { | ||
| 92 | - $aSafeArgs[] = escapeshellarg($sArg); | ||
| 93 | - } | ||
| 94 | - } | ||
| 95 | - return join(" ", $aSafeArgs); | ||
| 96 | - } | ||
| 97 | -?> |
setup/wizard/lib/system/start.sh deleted
setup/wizard/lib/system/systemCheck.php deleted
setup/wizard/lib/tests/configurationStep.php deleted
| 1 | -<?php | ||
| 2 | -/** | ||
| 3 | -* Configuration Step Tests. | ||
| 4 | -* | ||
| 5 | -* KnowledgeTree Community Edition | ||
| 6 | -* Document Management Made Simple | ||
| 7 | -* Copyright(C) 2008,2009 KnowledgeTree Inc. | ||
| 8 | -* | ||
| 9 | -* This program is free software; you can redistribute it and/or modify it under | ||
| 10 | -* the terms of the GNU General Public License version 3 as published by the | ||
| 11 | -* Free Software Foundation. | ||
| 12 | -* | ||
| 13 | -* This program is distributed in the hope that it will be useful, but WITHOUT | ||
| 14 | -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
| 15 | -* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more | ||
| 16 | -* details. | ||
| 17 | -* | ||
| 18 | -* You should have received a copy of the GNU General Public License | ||
| 19 | -* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 20 | -* | ||
| 21 | -* You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco, | ||
| 22 | -* California 94120-7775, or email info@knowledgetree.com. | ||
| 23 | -* | ||
| 24 | -* The interactive user interfaces in modified source and object code versions | ||
| 25 | -* of this program must display Appropriate Legal Notices, as required under | ||
| 26 | -* Section 5 of the GNU General Public License version 3. | ||
| 27 | -* | ||
| 28 | -* In accordance with Section 7(b) of the GNU General Public License version 3, | ||
| 29 | -* these Appropriate Legal Notices must retain the display of the "Powered by | ||
| 30 | -* KnowledgeTree" logo and retain the original copyright notice. If the display of the | ||
| 31 | -* logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices | ||
| 32 | -* must display the words "Powered by KnowledgeTree" and retain the original | ||
| 33 | -* copyright notice. | ||
| 34 | -* | ||
| 35 | -* @copyright 2008-2009, KnowledgeTree Inc. | ||
| 36 | -* @license GNU General Public License version 3 | ||
| 37 | -* @author KnowledgeTree Team | ||
| 38 | -* @package Installer | ||
| 39 | -* @version Version 0.1 | ||
| 40 | -*/ | ||
| 41 | -if(isset($_GET['action'])) { | ||
| 42 | - $func = $_GET['action']; | ||
| 43 | - if($func != '' && $func != 'installer') { | ||
| 44 | - require_once("../iniUtilities.php"); | ||
| 45 | - require_once("../step.php"); | ||
| 46 | - require_once("../path.php"); | ||
| 47 | - require_once("../dbUtilities.php"); | ||
| 48 | - require_once("../installUtil.php"); | ||
| 49 | - } | ||
| 50 | -} | ||
| 51 | - | ||
| 52 | -class configurationStep { | ||
| 53 | - | ||
| 54 | -} | ||
| 55 | - | ||
| 56 | -if(isset($_GET['action'])) { | ||
| 57 | - $func = $_GET['action']; | ||
| 58 | - if($func != '' && $func != 'installer') { | ||
| 59 | - $serv = new configuration(); | ||
| 60 | - $func_call = strtoupper(substr($func,0,1)).substr($func,1); | ||
| 61 | - $method = "do$func_call"; | ||
| 62 | - $serv->$method(); | ||
| 63 | - } | ||
| 64 | -} | ||
| 65 | -?> | ||
| 66 | \ No newline at end of file | 0 | \ No newline at end of file |
setup/wizard/lib/tests/databaseStep.php deleted
| 1 | -<?php | ||
| 2 | -/** | ||
| 3 | -* Database Step Tests. | ||
| 4 | -* | ||
| 5 | -* KnowledgeTree Community Edition | ||
| 6 | -* Document Management Made Simple | ||
| 7 | -* Copyright(C) 2008,2009 KnowledgeTree Inc. | ||
| 8 | -* | ||
| 9 | -* This program is free software; you can redistribute it and/or modify it under | ||
| 10 | -* the terms of the GNU General Public License version 3 as published by the | ||
| 11 | -* Free Software Foundation. | ||
| 12 | -* | ||
| 13 | -* This program is distributed in the hope that it will be useful, but WITHOUT | ||
| 14 | -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
| 15 | -* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more | ||
| 16 | -* details. | ||
| 17 | -* | ||
| 18 | -* You should have received a copy of the GNU General Public License | ||
| 19 | -* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 20 | -* | ||
| 21 | -* You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco, | ||
| 22 | -* California 94120-7775, or email info@knowledgetree.com. | ||
| 23 | -* | ||
| 24 | -* The interactive user interfaces in modified source and object code versions | ||
| 25 | -* of this program must display Appropriate Legal Notices, as required under | ||
| 26 | -* Section 5 of the GNU General Public License version 3. | ||
| 27 | -* | ||
| 28 | -* In accordance with Section 7(b) of the GNU General Public License version 3, | ||
| 29 | -* these Appropriate Legal Notices must retain the display of the "Powered by | ||
| 30 | -* KnowledgeTree" logo and retain the original copyright notice. If the display of the | ||
| 31 | -* logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices | ||
| 32 | -* must display the words "Powered by KnowledgeTree" and retain the original | ||
| 33 | -* copyright notice. | ||
| 34 | -* | ||
| 35 | -* @copyright 2008-2009, KnowledgeTree Inc. | ||
| 36 | -* @license GNU General Public License version 3 | ||
| 37 | -* @author KnowledgeTree Team | ||
| 38 | -* @package Installer | ||
| 39 | -* @version Version 0.1 | ||
| 40 | -*/ | ||
| 41 | - | ||
| 42 | -if(isset($_GET['action'])) { | ||
| 43 | - $func = $_GET['action']; | ||
| 44 | - if($func != '') { | ||
| 45 | - require_once("../step.php"); | ||
| 46 | - require_once("../installUtil.php"); | ||
| 47 | - require_once("../path.php"); | ||
| 48 | - require_once("../dbUtilities.php"); | ||
| 49 | - } | ||
| 50 | -} | ||
| 51 | - | ||
| 52 | -class databaseStep { | ||
| 53 | - | ||
| 54 | - public function doCreateSchema() { | ||
| 55 | - $this->dhost = '127.0.0.1'; | ||
| 56 | - $this->duname = 'root'; | ||
| 57 | - $this->dpassword = 'root'; | ||
| 58 | - $this->dname = 'dms_install'; | ||
| 59 | - $this->dbbinary = 'mysql'; | ||
| 60 | - $this->util->dbUtilities->load($this->dhost, '', $this->duname, $this->dpassword, $this->dname); | ||
| 61 | - $this->createSchema(); | ||
| 62 | - echo 'Schema loaded<br>'; | ||
| 63 | - } | ||
| 64 | -} | ||
| 65 | - | ||
| 66 | -if(isset($_GET['action'])) { | ||
| 67 | - $func = $_GET['action']; | ||
| 68 | - if($func != '') { | ||
| 69 | - $serv = new database(); | ||
| 70 | - $func_call = strtoupper(substr($func,0,1)).substr($func,1); | ||
| 71 | - $method = "do$func_call"; | ||
| 72 | - $serv->$method(); | ||
| 73 | - } | ||
| 74 | -} | ||
| 75 | -?> | ||
| 76 | \ No newline at end of file | 0 | \ No newline at end of file |
setup/wizard/lib/tests/servicesStep.php deleted
| 1 | -<?php | ||
| 2 | -/** | ||
| 3 | -* Services Step Tests. | ||
| 4 | -* | ||
| 5 | -* KnowledgeTree Community Edition | ||
| 6 | -* Document Management Made Simple | ||
| 7 | -* Copyright(C) 2008,2009 KnowledgeTree Inc. | ||
| 8 | -* | ||
| 9 | -* This program is free software; you can redistribute it and/or modify it under | ||
| 10 | -* the terms of the GNU General Public License version 3 as published by the | ||
| 11 | -* Free Software Foundation. | ||
| 12 | -* | ||
| 13 | -* This program is distributed in the hope that it will be useful, but WITHOUT | ||
| 14 | -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
| 15 | -* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more | ||
| 16 | -* details. | ||
| 17 | -* | ||
| 18 | -* You should have received a copy of the GNU General Public License | ||
| 19 | -* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 20 | -* | ||
| 21 | -* You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco, | ||
| 22 | -* California 94120-7775, or email info@knowledgetree.com. | ||
| 23 | -* | ||
| 24 | -* The interactive user interfaces in modified source and object code versions | ||
| 25 | -* of this program must display Appropriate Legal Notices, as required under | ||
| 26 | -* Section 5 of the GNU General Public License version 3. | ||
| 27 | -* | ||
| 28 | -* In accordance with Section 7(b) of the GNU General Public License version 3, | ||
| 29 | -* these Appropriate Legal Notices must retain the display of the "Powered by | ||
| 30 | -* KnowledgeTree" logo and retain the original copyright notice. If the display of the | ||
| 31 | -* logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices | ||
| 32 | -* must display the words "Powered by KnowledgeTree" and retain the original | ||
| 33 | -* copyright notice. | ||
| 34 | -* | ||
| 35 | -* @copyright 2008-2009, KnowledgeTree Inc. | ||
| 36 | -* @license GNU General Public License version 3 | ||
| 37 | -* @author KnowledgeTree Team | ||
| 38 | -* @package Installer | ||
| 39 | -* @version Version 0.1 | ||
| 40 | -*/ | ||
| 41 | -if(isset($_GET['action'])) { | ||
| 42 | - $func = $_GET['action']; | ||
| 43 | - if($func != '') { | ||
| 44 | - require_once(WIZARD_DIR. "step.php"); | ||
| 45 | - require_once(WIZARD_DIR. "installUtil.php"); | ||
| 46 | - require_once(WIZARD_DIR. "path.php"); | ||
| 47 | - require_once(WIZARD_DIR. "dbUtilities.php"); | ||
| 48 | - } | ||
| 49 | -} | ||
| 50 | - | ||
| 51 | -class servicesStep { | ||
| 52 | - /** External Access **/ | ||
| 53 | - public function doDeleteAll() { | ||
| 54 | - $serverDetails = $this->getServices(); | ||
| 55 | - foreach ($serverDetails as $serviceName) { | ||
| 56 | - $className = OS.$serviceName; | ||
| 57 | - require_once("../lib/services/service.php"); | ||
| 58 | - require_once("../lib/services/".OS."Service.php"); | ||
| 59 | - require_once("../lib/services/$className.php"); | ||
| 60 | - $service = new $className(); | ||
| 61 | - $service->uninstall(); | ||
| 62 | - echo "Delete Service {$service->getName()}<br/>"; | ||
| 63 | - echo "Status of service ".$service->status()."<br/>"; | ||
| 64 | - } | ||
| 65 | - } | ||
| 66 | - | ||
| 67 | - public function doInstallAll() { | ||
| 68 | - $serverDetails = $this->getServices(); | ||
| 69 | - if(!empty($serverDetails)) { | ||
| 70 | - require_once("../lib/validation/serviceValidation.php"); | ||
| 71 | - require_once("../lib/services/service.php"); | ||
| 72 | - } | ||
| 73 | - foreach ($serverDetails as $serviceName) { | ||
| 74 | - $className = OS.$serviceName; | ||
| 75 | - $serv = strtolower($serviceName); // Linux Systems. | ||
| 76 | - require_once("../lib/services/".OS."Service.php"); | ||
| 77 | - require_once("../lib/validation/$serv"."Validation.php"); | ||
| 78 | - require_once("../lib/services/$className.php"); | ||
| 79 | - $service = new $className(); | ||
| 80 | - $class = strtolower($serviceName)."Validation"; | ||
| 81 | - $vClass = new $class(); | ||
| 82 | - $passed = $vClass->binaryChecks(); // Run Binary Pre Checks | ||
| 83 | - $service->load(array('binary'=>$passed)); | ||
| 84 | - $service->install(); | ||
| 85 | - echo "Install Service {$service->getName()}<br/>"; | ||
| 86 | - echo "Status of service ".$service->status()."<br/>"; | ||
| 87 | - } | ||
| 88 | - } | ||
| 89 | - | ||
| 90 | - public function doStatusAll() { | ||
| 91 | - $serverDetails = $this->getServices(); | ||
| 92 | - foreach ($serverDetails as $serviceName) { | ||
| 93 | - $className = OS.$serviceName; | ||
| 94 | - require_once("../lib/services/service.php"); | ||
| 95 | - require_once("../lib/services/".OS."Service.php"); | ||
| 96 | - require_once("../lib/services/$className.php"); | ||
| 97 | - $service = new $className(); | ||
| 98 | - $service->load(); | ||
| 99 | - echo "{$service->getName()} : Status of service = ".$service->status()."<br/>"; | ||
| 100 | - } | ||
| 101 | - } | ||
| 102 | -} | ||
| 103 | - | ||
| 104 | -if(isset($_GET['action'])) { | ||
| 105 | - $func = $_GET['action']; | ||
| 106 | - if(isset($_GET['debug'])) { | ||
| 107 | - define('DEBUG', $_GET['debug']); | ||
| 108 | - } else { | ||
| 109 | - define('DEBUG', 0); | ||
| 110 | - } | ||
| 111 | - if($func != '') { | ||
| 112 | - $serv = new services(); | ||
| 113 | - $func_call = strtoupper(substr($func,0,1)).substr($func,1); | ||
| 114 | - $method = "do$func_call"; | ||
| 115 | - $serv->$method(); | ||
| 116 | - } | ||
| 117 | -} | ||
| 118 | -?> | ||
| 119 | \ No newline at end of file | 0 | \ No newline at end of file |
setup/wizard/lib/tests/tests.php deleted
| 1 | -<?php | ||
| 2 | -/** | ||
| 3 | -* Step Tests. | ||
| 4 | -* | ||
| 5 | -* KnowledgeTree Community Edition | ||
| 6 | -* Document Management Made Simple | ||
| 7 | -* Copyright(C) 2008,2009 KnowledgeTree Inc. | ||
| 8 | -* | ||
| 9 | -* This program is free software; you can redistribute it and/or modify it under | ||
| 10 | -* the terms of the GNU General Public License version 3 as published by the | ||
| 11 | -* Free Software Foundation. | ||
| 12 | -* | ||
| 13 | -* This program is distributed in the hope that it will be useful, but WITHOUT | ||
| 14 | -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
| 15 | -* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more | ||
| 16 | -* details. | ||
| 17 | -* | ||
| 18 | -* You should have received a copy of the GNU General Public License | ||
| 19 | -* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 20 | -* | ||
| 21 | -* You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco, | ||
| 22 | -* California 94120-7775, or email info@knowledgetree.com. | ||
| 23 | -* | ||
| 24 | -* The interactive user interfaces in modified source and object code versions | ||
| 25 | -* of this program must display Appropriate Legal Notices, as required under | ||
| 26 | -* Section 5 of the GNU General Public License version 3. | ||
| 27 | -* | ||
| 28 | -* In accordance with Section 7(b) of the GNU General Public License version 3, | ||
| 29 | -* these Appropriate Legal Notices must retain the display of the "Powered by | ||
| 30 | -* KnowledgeTree" logo and retain the original copyright notice. If the display of the | ||
| 31 | -* logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices | ||
| 32 | -* must display the words "Powered by KnowledgeTree" and retain the original | ||
| 33 | -* copyright notice. | ||
| 34 | -* | ||
| 35 | -* @copyright 2008-2009, KnowledgeTree Inc. | ||
| 36 | -* @license GNU General Public License version 3 | ||
| 37 | -* @author KnowledgeTree Team | ||
| 38 | -* @package Installer | ||
| 39 | -* @version Version 0.1 | ||
| 40 | -*/ | ||
| 41 | - | ||
| 42 | -?> | ||
| 43 | \ No newline at end of file | 0 | \ No newline at end of file |