Commit 6f25184ef288e1a214bde44741f5da8c812acb53
Merge branch 'edge' of git@github.com:ktgit/knowledgetree into edge
Showing
23 changed files
with
246 additions
and
78 deletions
setup/migrate/step.php
| @@ -429,6 +429,20 @@ class Step | @@ -429,6 +429,20 @@ class Step | ||
| 429 | public function setErrors($error) { | 429 | public function setErrors($error) { |
| 430 | $this->error = $error; | 430 | $this->error = $error; |
| 431 | } | 431 | } |
| 432 | + | ||
| 433 | + /** | ||
| 434 | + * Is the installation | ||
| 435 | + * | ||
| 436 | + * @author KnowledgeTree Team | ||
| 437 | + * @param none | ||
| 438 | + * @access public | ||
| 439 | + * @return string | ||
| 440 | + */ | ||
| 441 | + public function isCe() { | ||
| 442 | + if($this->util->getVersionType() == "community") | ||
| 443 | + return true; | ||
| 444 | + return false; | ||
| 445 | + } | ||
| 432 | } | 446 | } |
| 433 | 447 | ||
| 434 | ?> | 448 | ?> |
| 435 | \ No newline at end of file | 449 | \ No newline at end of file |
setup/migrate/steps/migrateDatabase.php
| @@ -103,7 +103,7 @@ class migrateDatabase extends Step | @@ -103,7 +103,7 @@ class migrateDatabase extends Step | ||
| 103 | } else if($this->previous()) { | 103 | } else if($this->previous()) { |
| 104 | return 'previous'; | 104 | return 'previous'; |
| 105 | } | 105 | } |
| 106 | - | 106 | + $this->storeSilent(); |
| 107 | return 'landing'; | 107 | return 'landing'; |
| 108 | } | 108 | } |
| 109 | 109 | ||
| @@ -171,7 +171,7 @@ class migrateDatabase extends Step | @@ -171,7 +171,7 @@ class migrateDatabase extends Step | ||
| 171 | $cmd = $exe.' -u"'.$dbAdminUser.'" -p"'.$dbAdminPass.'" --port="'.$port.'" '.$dbName.' > '.$sqlFile; | 171 | $cmd = $exe.' -u"'.$dbAdminUser.'" -p"'.$dbAdminPass.'" --port="'.$port.'" '.$dbName.' > '.$sqlFile; |
| 172 | if($noFile) { | 172 | if($noFile) { |
| 173 | $this->error[]['error'] = "The KnowledgeTree Setup Wizard was unable to connect to your KnowledgeTree 3.6.1 database."; | 173 | $this->error[]['error'] = "The KnowledgeTree Setup Wizard was unable to connect to your KnowledgeTree 3.6.1 database."; |
| 174 | - $this->error[]['msg'] = "Please ensure that your KnowledgeTree Mysql service is running."; | 174 | + $this->error[]['msg'] = "Ensure that your KnowledgeTree Mysql service is running."; |
| 175 | $this->error[]['cmd'] = "Click <b>Next</b> after resolving the above errors."; | 175 | $this->error[]['cmd'] = "Click <b>Next</b> after resolving the above errors."; |
| 176 | $this->temp_variables['manual_export'] = ""; | 176 | $this->temp_variables['manual_export'] = ""; |
| 177 | } else { | 177 | } else { |
| @@ -209,6 +209,9 @@ class migrateDatabase extends Step | @@ -209,6 +209,9 @@ class migrateDatabase extends Step | ||
| 209 | private function setDetails() { | 209 | private function setDetails() { |
| 210 | $this->createMigrateFile(); // create lock file to indicate migration mode | 210 | $this->createMigrateFile(); // create lock file to indicate migration mode |
| 211 | $database = $this->getDataFromSession("database"); | 211 | $database = $this->getDataFromSession("database"); |
| 212 | + $installation = $this->getDataFromSession("installation"); // Get installation directory | ||
| 213 | + $location = $installation['location']; | ||
| 214 | + $this->temp_variables['location'] = $location; | ||
| 212 | if(isset($database['dumpLocation'])) { | 215 | if(isset($database['dumpLocation'])) { |
| 213 | if(!empty($database['dumpLocation'])) { | 216 | if(!empty($database['dumpLocation'])) { |
| 214 | if(file_exists($database['dumpLocation'])) { // Maybe file has been deleted by tmp | 217 | if(file_exists($database['dumpLocation'])) { // Maybe file has been deleted by tmp |
| @@ -220,7 +223,8 @@ class migrateDatabase extends Step | @@ -220,7 +223,8 @@ class migrateDatabase extends Step | ||
| 220 | $this->temp_variables['duname'] = $this->getPostSafe('duname'); | 223 | $this->temp_variables['duname'] = $this->getPostSafe('duname'); |
| 221 | $this->temp_variables['dpassword'] = $this->getPostSafe('dpassword'); | 224 | $this->temp_variables['dpassword'] = $this->getPostSafe('dpassword'); |
| 222 | $this->temp_variables['dumpLocation'] = $this->getPostSafe('dumpLocation'); | 225 | $this->temp_variables['dumpLocation'] = $this->getPostSafe('dumpLocation'); |
| 223 | - | 226 | + |
| 227 | + | ||
| 224 | return true; | 228 | return true; |
| 225 | } | 229 | } |
| 226 | 230 |
setup/migrate/steps/migrateInstallation.php
| @@ -220,7 +220,7 @@ class migrateInstallation extends step | @@ -220,7 +220,7 @@ class migrateInstallation extends step | ||
| 220 | $this->error[] = "KnowledgeTree 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[] = "Enter a Location"; |
| 224 | } | 224 | } |
| 225 | 225 | ||
| 226 | return false; | 226 | return false; |
setup/migrate/steps/migrateServices.php
| @@ -294,7 +294,7 @@ class migrateServices extends Step | @@ -294,7 +294,7 @@ class migrateServices extends Step | ||
| 294 | $state = 'cross'; | 294 | $state = 'cross'; |
| 295 | $this->error[] = "Service : {$serv->getName()} could not be uninstalled.<br/>"; | 295 | $this->error[] = "Service : {$serv->getName()} could not be uninstalled.<br/>"; |
| 296 | $this->serviceCheck = 'cross'; | 296 | $this->serviceCheck = 'cross'; |
| 297 | - $this->temp_variables['services'][$serv->getName()]['msg'] = "Service Stopped, please uninstall service"; | 297 | + $this->temp_variables['services'][$serv->getName()]['msg'] = "Service Stopped, uninstall service"; |
| 298 | } else { | 298 | } else { |
| 299 | $state = 'tick'; | 299 | $state = 'tick'; |
| 300 | $this->temp_variables['services'][$serv->getName()]['msg'] = "Service has been uninstalled"; | 300 | $this->temp_variables['services'][$serv->getName()]['msg'] = "Service has been uninstalled"; |
| @@ -402,7 +402,7 @@ class migrateServices extends Step | @@ -402,7 +402,7 @@ class migrateServices extends Step | ||
| 402 | private function storeSilent() { | 402 | private function storeSilent() { |
| 403 | $this->temp_variables['alreadyUninstalled'] = $this->alreadyUninstalled; | 403 | $this->temp_variables['alreadyUninstalled'] = $this->alreadyUninstalled; |
| 404 | $this->temp_variables['serviceCheck'] = $this->serviceCheck; | 404 | $this->temp_variables['serviceCheck'] = $this->serviceCheck; |
| 405 | - $this->temp_variables['msg'] = "Please turn off KnowledgeTree Mysql Instance."; | 405 | + $this->temp_variables['msg'] = "Turn off KnowledgeTree Mysql Instance."; |
| 406 | } | 406 | } |
| 407 | } | 407 | } |
| 408 | ?> | 408 | ?> |
| 409 | \ No newline at end of file | 409 | \ No newline at end of file |
setup/migrate/templates/complete.tpl
| 1 | <form action="index.php?step_name=<?php echo $step_name; ?>" method="post" id="<?php echo $step_name; ?>"> | 1 | <form action="index.php?step_name=<?php echo $step_name; ?>" method="post" id="<?php echo $step_name; ?>"> |
| 2 | <p class="title">Migration Completed</p> | 2 | <p class="title">Migration Completed</p> |
| 3 | 3 | ||
| 4 | - <p class="description">Your database migration was successfully completed. Please check the section below for details of the migration and final instructions</p> | 4 | + <p class="description">Your database migration was successfully completed. Check the section below for details of the migration and final instructions</p> |
| 5 | <div id="step_content_<?php echo $step_name; ?>" class="step"> | 5 | <div id="step_content_<?php echo $step_name; ?>" class="step"> |
| 6 | 6 | ||
| 7 | <!-- SQL --> | 7 | <!-- SQL --> |
| @@ -9,13 +9,35 @@ | @@ -9,13 +9,35 @@ | ||
| 9 | <span class='<?php echo $sql['class']; ?>'> </span><?php echo $sql['msg']; ?> | 9 | <span class='<?php echo $sql['class']; ?>'> </span><?php echo $sql['msg']; ?> |
| 10 | <br /><br /> | 10 | <br /><br /> |
| 11 | <h3>Start new MySQL service</h3> | 11 | <h3>Start new MySQL service</h3> |
| 12 | - In order to complete the upgrade process please start the Zend Server MySQL service and then click <b>Next</b> to continue (<a href="http://wiki.knowledgetree.com/Web_Based_Migrater#Complete" target="_blank">Click here for help</a>). | ||
| 13 | - <br /><br /> | 12 | + In order to complete the upgrade process, start the Zend Server MySQL service and then click <b>Next</b> to continue (<a href="http://wiki.knowledgetree.com/Web_Based_Migrater#Complete" target="_blank">Click here for help</a>). |
| 13 | + <br /> | ||
| 14 | + <br /> | ||
| 14 | <?php if(!empty($errors)) { ?> | 15 | <?php if(!empty($errors)) { ?> |
| 15 | <span class='<?php echo $zmysql['class']; ?>'> </span> | 16 | <span class='<?php echo $zmysql['class']; ?>'> </span> |
| 16 | <?php echo $zmysql['name']; ?> | 17 | <?php echo $zmysql['name']; ?> |
| 17 | <?php echo $zmysql['msg']; ?> | 18 | <?php echo $zmysql['msg']; ?> |
| 19 | + <br /> | ||
| 20 | + <br /> | ||
| 18 | <?php } ?> | 21 | <?php } ?> |
| 22 | + | ||
| 23 | +<p class="disclaimer"> | ||
| 24 | + <?php if(WINDOWS_OS) { ?> | ||
| 25 | + [START MENU] => [Programs] => [KnowledgeTree 3.7.x] => [Mysql] | ||
| 26 | + <br/> | ||
| 27 | + Right-Click and run [Start Mysql] as administrator, if applicable, or | ||
| 28 | + <br/> | ||
| 29 | + Click [Start Mysql] | ||
| 30 | + <?php } else { ?> | ||
| 31 | + #Ubuntu | ||
| 32 | + <br/> | ||
| 33 | + sudo /etc/init.d/mysql start | ||
| 34 | + <br/> | ||
| 35 | + #RedHat | ||
| 36 | + <br/> | ||
| 37 | + sudo /etc/init.d/mysqld start | ||
| 38 | + <?php } ?> | ||
| 39 | +</p> | ||
| 40 | +<br /> | ||
| 19 | </div> | 41 | </div> |
| 20 | <!-- <input class="button_next" type="submit" value="Continue Installation" name="BInstall"/>--> | 42 | <!-- <input class="button_next" type="submit" value="Continue Installation" name="BInstall"/>--> |
| 21 | <input class="button_next" type="submit" value="Next" name="Next"/> | 43 | <input class="button_next" type="submit" value="Next" name="Next"/> |
setup/migrate/templates/database.tpl
| @@ -6,43 +6,123 @@ | @@ -6,43 +6,123 @@ | ||
| 6 | </div> | 6 | </div> |
| 7 | <div id="step_content_<?php echo $step_name; ?>" class="step"> | 7 | <div id="step_content_<?php echo $step_name; ?>" class="step"> |
| 8 | <?php if(empty($errors)) { ?> | 8 | <?php if(empty($errors)) { ?> |
| 9 | -<p class="description">The Setup Wizard will now export your existing database in preparation for the migration to the new KnowledgeTree Stack.</p><br /> | ||
| 10 | - <span class="error">Please ensure that your database is backed up before proceeding. If you need assistance with backing up see the <a class="description_click" target="_blank" href="http://wiki.knowledgetree.com/Backing_up_and_restoring_KnowledgeTree">'Backing up and restoring KnowledgeTree'</a> wiki entry. | 9 | +<p class="description">The Setup Wizard will now export your existing database in preparation for the migration to the new KnowledgeTree Stack.</p> |
| 10 | +<br /> | ||
| 11 | +<p class="description"> | ||
| 12 | + Ensure that the new Mysql server installed from your operating system's repository is not running | ||
| 13 | +</p> | ||
| 14 | +<br /> | ||
| 15 | +<p class="disclaimer"> | ||
| 16 | + <?php if(WINDOWS_OS) { ?> | ||
| 17 | + [START MENU] => [Programs] => [KnowledgeTree 3.7.x] => [Mysql] | ||
| 18 | + <br/> | ||
| 19 | + Right-Click and run [Stop Mysql] as administrator, if applicable, or | ||
| 20 | + <br/> | ||
| 21 | + Click [Stop Mysql] | ||
| 22 | + <?php } else { ?> | ||
| 23 | + #Ubuntu | ||
| 24 | + <br/> | ||
| 25 | + sudo /etc/init.d/mysql stop | ||
| 26 | + <br/> | ||
| 27 | + #RedHat | ||
| 28 | + <br/> | ||
| 29 | + sudo /etc/init.d/mysqld stop | ||
| 30 | + <?php } ?> | ||
| 31 | +</p> | ||
| 32 | +<br/> | ||
| 33 | +<p class="description"> | ||
| 34 | + Ensure that the old KnowledgeTree 3.6.1 Mysql server is running | ||
| 35 | +</p> | ||
| 36 | +<p class="disclaimer"> | ||
| 37 | + <?php if(WINDOWS_OS) { ?> | ||
| 38 | + [START MENU] => [Programs] => [KnowledgeTree 3.6.x] => [Control] | ||
| 39 | + <br/> | ||
| 40 | + Right-Click and run [Start Services] as administrator, if applicable, or | ||
| 41 | + <br/> | ||
| 42 | + Click [Start Services] | ||
| 43 | + <?php } else { ?> | ||
| 44 | + sudo <?php echo $location.DS; ?>dmsctl.sh start mysql | ||
| 45 | + <?php } ?> | ||
| 46 | +</p> | ||
| 47 | +<br/> | ||
| 48 | +<span class="error"> | ||
| 49 | + Ensure that your database is backed up before proceeding. If you need assistance with backing up see the | ||
| 50 | + <a class="description_click" target="_blank" href="http://wiki.knowledgetree.com/Backing_up_and_restoring_KnowledgeTree">'Backing up and restoring KnowledgeTree'</a> wiki entry. | ||
| 11 | </span> | 51 | </span> |
| 12 | - <br /><br /> | ||
| 13 | - <p class="description">Click <b>Next</b> to continue.</p> | 52 | + <br /> |
| 53 | + <br /> | ||
| 54 | + <p class="description">Click <b>Next</b> to continue.</p> | ||
| 14 | <?php } ?> | 55 | <?php } ?> |
| 15 | <!--Handle a failed dump--> | 56 | <!--Handle a failed dump--> |
| 16 | - <?php if(isset($errors)) { ?> | ||
| 17 | - <?php | ||
| 18 | - foreach ($errors as $error) { | 57 | +<?php if(!empty($errors)) { ?> |
| 58 | + <?php | ||
| 59 | + foreach ($errors as $error) { | ||
| 60 | + ?> | ||
| 61 | + <span class="error"> | ||
| 62 | + <?php | ||
| 63 | + if(isset($error['error'])) { | ||
| 64 | + echo $error['error']; | ||
| 19 | ?> | 65 | ?> |
| 20 | - <span class="error"> | ||
| 21 | - <?php | ||
| 22 | - if(isset($error['error'])) { | ||
| 23 | - echo $error['error']; | ||
| 24 | - ?> | ||
| 25 | - <br/><br/> | ||
| 26 | - <?php | ||
| 27 | - } | ||
| 28 | - ?> | ||
| 29 | - </span> | ||
| 30 | - <?php | ||
| 31 | - if(isset($error['msg'])) { | ||
| 32 | - echo $error['msg']; | ||
| 33 | - ?> | ||
| 34 | - <br/><br/> | ||
| 35 | - <?php | ||
| 36 | - } | ||
| 37 | - ?> | ||
| 38 | - | ||
| 39 | - <?php | ||
| 40 | - if(isset($error['cmd'])) { | ||
| 41 | - echo $error['cmd']; | ||
| 42 | - } | ||
| 43 | - } | 66 | + <br/><br/> |
| 67 | + <?php | ||
| 44 | } | 68 | } |
| 45 | - ?> | 69 | + ?> |
| 70 | + </span> | ||
| 71 | + <?php | ||
| 72 | + //if(isset($error['msg'])) { | ||
| 73 | + //echo $error['msg']; | ||
| 74 | + ?> | ||
| 75 | +<!-- <br/><br/>--> | ||
| 76 | + <?php | ||
| 77 | + //} | ||
| 78 | + ?> | ||
| 79 | + <?php | ||
| 80 | + //if(isset($error['cmd'])) { | ||
| 81 | +// echo $error['cmd']; | ||
| 82 | + // } | ||
| 83 | + } | ||
| 84 | +?> | ||
| 85 | +<p class="description"> | ||
| 86 | + Ensure that the new Mysql server installed from your operating system's repository is not running | ||
| 87 | +</p> | ||
| 88 | +<p class="disclaimer"> | ||
| 89 | + <?php if(WINDOWS_OS) { ?> | ||
| 90 | + [START MENU] => [Programs] => [KnowledgeTree 3.7.x] => [Mysql] | ||
| 91 | + <br/> | ||
| 92 | + Right-Click and run [Stop Mysql] as administrator, if applicable, or | ||
| 93 | + <br/> | ||
| 94 | + Click [Stop Mysql] | ||
| 95 | + <?php } else { ?> | ||
| 96 | + #Ubuntu | ||
| 97 | + <br/> | ||
| 98 | + sudo /etc/init.d/mysql stop | ||
| 99 | + <br/> | ||
| 100 | + #RedHat | ||
| 101 | + <br/> | ||
| 102 | + sudo /etc/init.d/mysqld stop | ||
| 103 | + <?php } ?> | ||
| 104 | +</p> | ||
| 105 | +<br/> | ||
| 106 | +<p class="description"> | ||
| 107 | + Ensure that the old KnowledgeTree 3.6.1 Mysql server is running | ||
| 108 | +</p> | ||
| 109 | +<p class="disclaimer"> | ||
| 110 | + <?php if(WINDOWS_OS) { ?> | ||
| 111 | + [START MENU] => [Programs] => [KnowledgeTree 3.6.x] => [Control] | ||
| 112 | + <br/> | ||
| 113 | + Right-Click and run [Start Services] as administrator, if applicable, or | ||
| 114 | + <br/> | ||
| 115 | + Click [Start Services] | ||
| 116 | + <?php } else { ?> | ||
| 117 | + sudo <?php echo $location.DS; ?>dmsctl.sh start mysql | ||
| 118 | + <?php } ?> | ||
| 119 | +</p> | ||
| 120 | +<br/> | ||
| 121 | +<?php | ||
| 122 | + } | ||
| 123 | + ?> | ||
| 124 | + | ||
| 125 | + | ||
| 46 | <br/> | 126 | <br/> |
| 47 | </div> | 127 | </div> |
| 48 | </div> | 128 | </div> |
setup/migrate/templates/installation.tpl
| @@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
| 20 | </p> | 20 | </p> |
| 21 | 21 | ||
| 22 | <p class="description"> | 22 | <p class="description"> |
| 23 | - Please enter the full path of the installation you wish to upgrade: | 23 | + Enter the full path of the installation you wish to upgrade: |
| 24 | </p> | 24 | </p> |
| 25 | 25 | ||
| 26 | <input id="location" name="location" type="text" style="width:430px; float:left" value="<?php if($location) echo $location; ?>"> | 26 | <input id="location" name="location" type="text" style="width:430px; float:left" value="<?php if($location) echo $location; ?>"> |
setup/migrate/templates/installation_confirm.tpl
| @@ -5,7 +5,7 @@ | @@ -5,7 +5,7 @@ | ||
| 5 | if(!$errors && !$warnings) { | 5 | if(!$errors && !$warnings) { |
| 6 | ?> | 6 | ?> |
| 7 | <span class='big_ok'> </span> | 7 | <span class='big_ok'> </span> |
| 8 | - Installation has been detected. Please confirm system settings. | 8 | + Installation has been detected. Confirm system settings. |
| 9 | <br/><br/> | 9 | <br/><br/> |
| 10 | <?php | 10 | <?php |
| 11 | } | 11 | } |
| @@ -27,7 +27,7 @@ | @@ -27,7 +27,7 @@ | ||
| 27 | <!--Content--> | 27 | <!--Content--> |
| 28 | <div id="step_content_<?php echo $step_name; ?>" class="step"> | 28 | <div id="step_content_<?php echo $step_name; ?>" class="step"> |
| 29 | <p class="empty_space"> | 29 | <p class="empty_space"> |
| 30 | - Please verify your current installation settings. | 30 | + Verify your current installation settings. |
| 31 | </p> | 31 | </p> |
| 32 | <h3>Installation Settings</h3> | 32 | <h3>Installation Settings</h3> |
| 33 | <table class="conf_paths"> | 33 | <table class="conf_paths"> |
setup/migrate/templates/services.tpl
| @@ -9,7 +9,7 @@ | @@ -9,7 +9,7 @@ | ||
| 9 | if(!$errors && !$warnings) { | 9 | if(!$errors && !$warnings) { |
| 10 | ?> | 10 | ?> |
| 11 | <span class='big_ok'> </span> | 11 | <span class='big_ok'> </span> |
| 12 | - All services have been shut down. Please click next to continue. | 12 | + All services have been shut down. Click next to continue. |
| 13 | <br/><br/> | 13 | <br/><br/> |
| 14 | <?php | 14 | <?php |
| 15 | } | 15 | } |
| @@ -38,7 +38,7 @@ | @@ -38,7 +38,7 @@ | ||
| 38 | <?php } else { ?> | 38 | <?php } else { ?> |
| 39 | All services are uninstalled. | 39 | All services are uninstalled. |
| 40 | <?php } ?> | 40 | <?php } ?> |
| 41 | - <h3><?php echo "<span class='{$serviceCheck}'> </span>"; ?>Please shutdown the following services</h3> | 41 | + <h3><?php echo "<span class='{$serviceCheck}'> </span>"; ?>Shutdown the following services</h3> |
| 42 | <?php if($silent) { ?> | 42 | <?php if($silent) { ?> |
| 43 | <?php if($serviceCheck != 'tick') { | 43 | <?php if($serviceCheck != 'tick') { |
| 44 | $details = 'Hide Details'; | 44 | $details = 'Hide Details'; |
setup/upgrade/step.php
| @@ -476,6 +476,20 @@ class Step | @@ -476,6 +476,20 @@ class Step | ||
| 476 | protected function storeSilent() { | 476 | protected function storeSilent() { |
| 477 | 477 | ||
| 478 | } | 478 | } |
| 479 | + | ||
| 480 | + /** | ||
| 481 | + * Is the installation | ||
| 482 | + * | ||
| 483 | + * @author KnowledgeTree Team | ||
| 484 | + * @param none | ||
| 485 | + * @access public | ||
| 486 | + * @return string | ||
| 487 | + */ | ||
| 488 | + public function isCe() { | ||
| 489 | + if($this->util->getVersionType() == "community") | ||
| 490 | + return true; | ||
| 491 | + return false; | ||
| 492 | + } | ||
| 479 | } | 493 | } |
| 480 | 494 | ||
| 481 | ?> | 495 | ?> |
| 482 | \ No newline at end of file | 496 | \ No newline at end of file |
setup/wizard/resources/js/wizard.js
| @@ -85,27 +85,27 @@ wizard.prototype.valRegHelper = function() { | @@ -85,27 +85,27 @@ wizard.prototype.valRegHelper = function() { | ||
| 85 | var last = $("#last"); | 85 | var last = $("#last"); |
| 86 | var email = $("#email"); | 86 | var email = $("#email"); |
| 87 | if(first.attr('value').length < 1) { | 87 | if(first.attr('value').length < 1) { |
| 88 | - $("#reg_error").html('Please enter a First Name'); | 88 | + $("#reg_error").html('Enter a First Name'); |
| 89 | w.focusElement(first); | 89 | w.focusElement(first); |
| 90 | return false; | 90 | return false; |
| 91 | } | 91 | } |
| 92 | if(!w.nameCheck(first.attr('value'))) { | 92 | if(!w.nameCheck(first.attr('value'))) { |
| 93 | - $("#reg_error").html('Please enter a valid First Name'); | 93 | + $("#reg_error").html('Enter a valid First Name'); |
| 94 | w.focusElement(first); | 94 | w.focusElement(first); |
| 95 | return false; | 95 | return false; |
| 96 | } | 96 | } |
| 97 | if(last.attr('value').length < 1) { | 97 | if(last.attr('value').length < 1) { |
| 98 | - $("#reg_error").html('Please enter a Last Name'); | 98 | + $("#reg_error").html('Enter a Last Name'); |
| 99 | w.focusElement(last); | 99 | w.focusElement(last); |
| 100 | return false; | 100 | return false; |
| 101 | } | 101 | } |
| 102 | if(!w.nameCheck(last.attr('value'))) { | 102 | if(!w.nameCheck(last.attr('value'))) { |
| 103 | - $("#reg_error").html('Please enter a valid Last Name'); | 103 | + $("#reg_error").html('Enter a valid Last Name'); |
| 104 | w.focusElement(last); | 104 | w.focusElement(last); |
| 105 | return false; | 105 | return false; |
| 106 | } | 106 | } |
| 107 | if(!w.emailCheck(email.attr('value'))) { | 107 | if(!w.emailCheck(email.attr('value'))) { |
| 108 | - $("#reg_error").html('Please enter a valid email address'); | 108 | + $("#reg_error").html('Enter a valid email address'); |
| 109 | w.focusElement(email); | 109 | w.focusElement(email); |
| 110 | return false; | 110 | return false; |
| 111 | } | 111 | } |
setup/wizard/step.php
| @@ -104,10 +104,15 @@ class Step | @@ -104,10 +104,15 @@ class Step | ||
| 104 | */ | 104 | */ |
| 105 | protected $silent = false; | 105 | protected $silent = false; |
| 106 | 106 | ||
| 107 | + /** | ||
| 108 | + * Flag if step needs to show confirm page first | ||
| 109 | + * | ||
| 110 | + * @author KnowledgeTree Team | ||
| 111 | + * @access public | ||
| 112 | + * @var boolean | ||
| 113 | + */ | ||
| 107 | public $displayFirst = false; | 114 | public $displayFirst = false; |
| 108 | 115 | ||
| 109 | - private $salt = 'installers'; | ||
| 110 | - | ||
| 111 | /** | 116 | /** |
| 112 | * Reference to utility object | 117 | * Reference to utility object |
| 113 | * | 118 | * |
| @@ -116,10 +121,20 @@ class Step | @@ -116,10 +121,20 @@ class Step | ||
| 116 | * @var object | 121 | * @var object |
| 117 | */ | 122 | */ |
| 118 | public $util; | 123 | public $util; |
| 124 | + | ||
| 125 | + /** | ||
| 126 | + * Session salt | ||
| 127 | + * | ||
| 128 | + * @author KnowledgeTree Team | ||
| 129 | + * @access public | ||
| 130 | + * @var boolean | ||
| 131 | + */ | ||
| 132 | + private $salt = 'installers'; | ||
| 119 | 133 | ||
| 120 | public function __construct() { | 134 | public function __construct() { |
| 121 | $this->util = new InstallUtil(); | 135 | $this->util = new InstallUtil(); |
| 122 | } | 136 | } |
| 137 | + | ||
| 123 | /** | 138 | /** |
| 124 | * Returns step state | 139 | * Returns step state |
| 125 | * | 140 | * |
| @@ -445,6 +460,21 @@ class Step | @@ -445,6 +460,21 @@ class Step | ||
| 445 | public function setErrors($error) { | 460 | public function setErrors($error) { |
| 446 | $this->error = $error; | 461 | $this->error = $error; |
| 447 | } | 462 | } |
| 463 | + | ||
| 464 | + /** | ||
| 465 | + * Is the installation | ||
| 466 | + * | ||
| 467 | + * @author KnowledgeTree Team | ||
| 468 | + * @param none | ||
| 469 | + * @access public | ||
| 470 | + * @return string | ||
| 471 | + */ | ||
| 472 | + public function isCe() { | ||
| 473 | + if($this->util->getVersionType() == "community") | ||
| 474 | + return true; | ||
| 475 | + return false; | ||
| 476 | + } | ||
| 477 | + | ||
| 448 | } | 478 | } |
| 449 | 479 | ||
| 450 | ?> | 480 | ?> |
| 451 | \ No newline at end of file | 481 | \ No newline at end of file |
setup/wizard/steps/configuration.php
| @@ -408,15 +408,14 @@ class configuration extends Step | @@ -408,15 +408,14 @@ class configuration extends Step | ||
| 408 | $server['host'] = array('name' => 'Host', 'setting' => 'server_name', 'where' => 'db', 'value' => $host); | 408 | $server['host'] = array('name' => 'Host', 'setting' => 'server_name', 'where' => 'db', 'value' => $host); |
| 409 | $server['port'] = array('name' => 'Port', 'setting' => 'server_port', 'where' => 'db', 'value' => $port); | 409 | $server['port'] = array('name' => 'Port', 'setting' => 'server_port', 'where' => 'db', 'value' => $port); |
| 410 | $server['ssl_enabled'] = array('name' => 'SSL Enabled', 'section' => 'KnowledgeTree', 'setting' => 'sslEnabled', 'where' => 'file', 'value' => $ssl_enabled); | 410 | $server['ssl_enabled'] = array('name' => 'SSL Enabled', 'section' => 'KnowledgeTree', 'setting' => 'sslEnabled', 'where' => 'file', 'value' => $ssl_enabled); |
| 411 | - | ||
| 412 | if(empty($server['host']['value'])) | 411 | if(empty($server['host']['value'])) |
| 413 | - $this->error[] = 'Please enter the servers host name'; | 412 | + $this->error[] = 'Enter the servers host name'; |
| 414 | 413 | ||
| 415 | if(empty($server['port']['value'])) | 414 | if(empty($server['port']['value'])) |
| 416 | - $this->error[] = 'Please enter the servers port'; | 415 | + $this->error[] = 'Enter the servers port'; |
| 417 | 416 | ||
| 418 | if(empty($server['file_system_root']['value'])) | 417 | if(empty($server['file_system_root']['value'])) |
| 419 | - $this->error[] = 'Please enter the file system root'; | 418 | + $this->error[] = 'Enter the file system root'; |
| 420 | 419 | ||
| 421 | return $server; | 420 | return $server; |
| 422 | } | 421 | } |
setup/wizard/steps/database.php
| @@ -311,11 +311,11 @@ class database extends Step | @@ -311,11 +311,11 @@ class database extends Step | ||
| 311 | } | 311 | } |
| 312 | $this->util->dbUtilities->load($this->dhost, $this->dport, $this->duname, $this->dpassword, $this->dname); | 312 | $this->util->dbUtilities->load($this->dhost, $this->dport, $this->duname, $this->dpassword, $this->dname); |
| 313 | if (!$this->util->dbUtilities->getDatabaseLink()) { | 313 | if (!$this->util->dbUtilities->getDatabaseLink()) { |
| 314 | - $this->error['con'] = "Could not connect to the database, please check username and password"; | 314 | + $this->error['con'] = "Could not connect to the database, check username and password"; |
| 315 | return false; | 315 | return false; |
| 316 | } else { | 316 | } else { |
| 317 | if ($this->dbExists()) { // Check if database Exists | 317 | if ($this->dbExists()) { // Check if database Exists |
| 318 | - $this->error['dname'] = 'Database Already Exists, please specify a different name'; // Reset usage errors | 318 | + $this->error['dname'] = 'Database Already Exists, specify a different name'; // Reset usage errors |
| 319 | return false; | 319 | return false; |
| 320 | } else { | 320 | } else { |
| 321 | $this->error = array(); // Reset usage errors | 321 | $this->error = array(); // Reset usage errors |
setup/wizard/steps/dependencies.php
| @@ -360,7 +360,7 @@ class dependencies extends Step | @@ -360,7 +360,7 @@ class dependencies extends Step | ||
| 360 | */ | 360 | */ |
| 361 | private function getConfigurations() | 361 | private function getConfigurations() |
| 362 | { | 362 | { |
| 363 | - return array( | 363 | + $conf = array( |
| 364 | array('name' => 'Safe Mode', 'configuration' => 'safe_mode', 'recommended' => 'OFF', 'type' => 'bool'), | 364 | array('name' => 'Safe Mode', 'configuration' => 'safe_mode', 'recommended' => 'OFF', 'type' => 'bool'), |
| 365 | array('name' => 'Display Errors', 'configuration' => 'display_errors', 'recommended' => 'OFF', 'type' => 'bool'), | 365 | array('name' => 'Display Errors', 'configuration' => 'display_errors', 'recommended' => 'OFF', 'type' => 'bool'), |
| 366 | array('name' => 'Display Startup Errors', 'configuration' => 'display_startup_errors', 'recommended' => 'OFF', 'type' => 'bool'), | 366 | array('name' => 'Display Startup Errors', 'configuration' => 'display_startup_errors', 'recommended' => 'OFF', 'type' => 'bool'), |
| @@ -375,6 +375,11 @@ class dependencies extends Step | @@ -375,6 +375,11 @@ class dependencies extends Step | ||
| 375 | array('name' => 'Open base directory', 'configuration' => 'open_basedir', 'recommended' => 'unset', 'type' => 'empty'), | 375 | array('name' => 'Open base directory', 'configuration' => 'open_basedir', 'recommended' => 'unset', 'type' => 'empty'), |
| 376 | array('name' => 'Default MIME type', 'configuration' => 'default_mimetype', 'recommended' => 'text/html', 'type' => 'string'), | 376 | array('name' => 'Default MIME type', 'configuration' => 'default_mimetype', 'recommended' => 'text/html', 'type' => 'string'), |
| 377 | ); | 377 | ); |
| 378 | + if(!WINDOWS_OS) { // Remove linux settings | ||
| 379 | + unset($conf[1]); | ||
| 380 | + unset($conf[2]); | ||
| 381 | + } | ||
| 382 | + return $conf; | ||
| 378 | } | 383 | } |
| 379 | 384 | ||
| 380 | /** | 385 | /** |
setup/wizard/steps/license.php
| @@ -76,11 +76,11 @@ class license extends step { | @@ -76,11 +76,11 @@ class license extends step { | ||
| 76 | if($_POST['license']) { | 76 | if($_POST['license']) { |
| 77 | return true; | 77 | return true; |
| 78 | } else { | 78 | } else { |
| 79 | - $this->error[] = "Please accept the license agreement"; | 79 | + $this->error[] = "Accept the license agreement"; |
| 80 | return false; | 80 | return false; |
| 81 | } | 81 | } |
| 82 | } | 82 | } |
| 83 | - $this->error[] = "Please accept the license agreement"; | 83 | + $this->error[] = "Accept the license agreement"; |
| 84 | return false; | 84 | return false; |
| 85 | } | 85 | } |
| 86 | 86 |
setup/wizard/templates/configuration.tpl
| @@ -9,7 +9,7 @@ | @@ -9,7 +9,7 @@ | ||
| 9 | if(!$errors && !$warnings) { | 9 | if(!$errors && !$warnings) { |
| 10 | ?> | 10 | ?> |
| 11 | <span class='big_ok'> </span> | 11 | <span class='big_ok'> </span> |
| 12 | - All configuration settings are correctly set. Please click next to continue. | 12 | + All configuration settings are correctly set. Click next to continue. |
| 13 | <br/><br/> | 13 | <br/><br/> |
| 14 | <?php | 14 | <?php |
| 15 | } | 15 | } |
setup/wizard/templates/configuration_confirm.tpl
| @@ -4,7 +4,7 @@ | @@ -4,7 +4,7 @@ | ||
| 4 | <?php | 4 | <?php |
| 5 | if(!$errors && !$warnings) { | 5 | if(!$errors && !$warnings) { |
| 6 | ?> | 6 | ?> |
| 7 | - <span class='big_ok'> </span><span class='continue_message'>All configuration settings are correctly set. Please click next to continue.</span><br/><br/> | 7 | + <span class='big_ok'> </span><span class='continue_message'>All configuration settings are correctly set. Click next to continue.</span><br/><br/> |
| 8 | <?php | 8 | <?php |
| 9 | } | 9 | } |
| 10 | ?> | 10 | ?> |
setup/wizard/templates/database.tpl
| @@ -68,12 +68,12 @@ | @@ -68,12 +68,12 @@ | ||
| 68 | </tr> | 68 | </tr> |
| 69 | <tr> | 69 | <tr> |
| 70 | <td> <label for='dport'>Port: </label> </td> | 70 | <td> <label for='dport'>Port: </label> </td> |
| 71 | - <td> <div id="tooltips" title="The port on which your database server is listening, if it is a non-standard port please enter the number here"> </div> </td> | 71 | + <td> <div id="tooltips" title="The port on which your database server is listening, if it is a non-standard port enter the number here"> </div> </td> |
| 72 | <td> <input type="text" value="<?php echo $dport?>" id="dport" name="dport" size='10' class="textinput" style="float:left"/> </td> | 72 | <td> <input type="text" value="<?php echo $dport?>" id="dport" name="dport" size='10' class="textinput" style="float:left"/> </td> |
| 73 | </tr> | 73 | </tr> |
| 74 | <tr> | 74 | <tr> |
| 75 | <td> <label for='dbbinary'>Socket: </label> </td> | 75 | <td> <label for='dbbinary'>Socket: </label> </td> |
| 76 | - <td> <div id="tooltips" title="The path to the database binary. If it is not on your system path then please enter it here"> </div> </td> | 76 | + <td> <div id="tooltips" title="The path to the database binary. If it is not on your system path then enter it here"> </div> </td> |
| 77 | <td> <input type="text" value="<?php echo $dbbinary?>" id="dbbinary" name="dbbinary" size='<?php echo $input_size; ?>' class="textinput"/> </td> | 77 | <td> <input type="text" value="<?php echo $dbbinary?>" id="dbbinary" name="dbbinary" size='<?php echo $input_size; ?>' class="textinput"/> </td> |
| 78 | </tr> | 78 | </tr> |
| 79 | </table> | 79 | </table> |
| @@ -96,17 +96,17 @@ An administrative user is required for creating tables within the database. | @@ -96,17 +96,17 @@ An administrative user is required for creating tables within the database. | ||
| 96 | <tr style="<?php if ($silent) echo 'display:none' ;?>"> | 96 | <tr style="<?php if ($silent) echo 'display:none' ;?>"> |
| 97 | <td><label for='dmsname'>Enter the name of the Database Administrative User: </label></td> | 97 | <td><label for='dmsname'>Enter the name of the Database Administrative User: </label></td> |
| 98 | <td><input type='text' value="<?php echo $dmsname; ?>" id='dmsname' name='dmsname' size='40' /></td> | 98 | <td><input type='text' value="<?php echo $dmsname; ?>" id='dmsname' name='dmsname' size='40' /></td> |
| 99 | - <td id="error_1_2" class="error" style="display:none">Please Enter A Username</td> | 99 | + <td id="error_1_2" class="error" style="display:none">Enter A Username</td> |
| 100 | </tr> | 100 | </tr> |
| 101 | <tr> | 101 | <tr> |
| 102 | <td><label for='dmspassword'>Enter a password for the Administrative User: </label></td> | 102 | <td><label for='dmspassword'>Enter a password for the Administrative User: </label></td> |
| 103 | <td><input type='password' value="<?php echo $dmspassword; ?>" id='dmspassword' name='dmspassword' size='40' /></td> | 103 | <td><input type='password' value="<?php echo $dmspassword; ?>" id='dmspassword' name='dmspassword' size='40' /></td> |
| 104 | - <td id="error_2_2" class="error" style="display:none">Please Enter A Password</td> | 104 | + <td id="error_2_2" class="error" style="display:none">Enter A Password</td> |
| 105 | </tr> | 105 | </tr> |
| 106 | <tr> | 106 | <tr> |
| 107 | - <td><label for='dmspassword2'>Please confirm the password: </label></td> | 107 | + <td><label for='dmspassword2'>Confirm the password: </label></td> |
| 108 | <td><input type='password' value="<?php echo $dmspassword; ?>" id='dmspassword2' name='dmspassword2' size='40' /></td> | 108 | <td><input type='password' value="<?php echo $dmspassword; ?>" id='dmspassword2' name='dmspassword2' size='40' /></td> |
| 109 | - <td id="error_3_2" class="error" style="display:none">Please Confirm Password</td> | 109 | + <td id="error_3_2" class="error" style="display:none">Confirm Password</td> |
| 110 | <td id="error_4_2" class="error" style="display:none">Passwords Do Not Match</td> | 110 | <td id="error_4_2" class="error" style="display:none">Passwords Do Not Match</td> |
| 111 | </tr> | 111 | </tr> |
| 112 | </table> | 112 | </table> |
| @@ -125,17 +125,17 @@ An second user is required for normal database interaction, the reading and writ | @@ -125,17 +125,17 @@ An second user is required for normal database interaction, the reading and writ | ||
| 125 | <tr style="<?php if ($silent) echo 'display:none' ;?>"> | 125 | <tr style="<?php if ($silent) echo 'display:none' ;?>"> |
| 126 | <td><label for='dmsusername'>Enter a name for the User: </label></td> | 126 | <td><label for='dmsusername'>Enter a name for the User: </label></td> |
| 127 | <td><input type='text' value="<?php echo $dmsusername; ?>" id='dmsusername' name='dmsusername' size='40' /></td> | 127 | <td><input type='text' value="<?php echo $dmsusername; ?>" id='dmsusername' name='dmsusername' size='40' /></td> |
| 128 | - <td id="error_1_3" class="error" style="display:none">Please Enter A Username</td> | 128 | + <td id="error_1_3" class="error" style="display:none">Enter A Username</td> |
| 129 | </tr> | 129 | </tr> |
| 130 | <tr> | 130 | <tr> |
| 131 | <td><label for='dmsuserpassword'>Enter a password: </label></td> | 131 | <td><label for='dmsuserpassword'>Enter a password: </label></td> |
| 132 | <td><input type='password' value="<?php echo $dmsuserpassword?>" id='dmsuserpassword' name='dmsuserpassword' size='40' /></td> | 132 | <td><input type='password' value="<?php echo $dmsuserpassword?>" id='dmsuserpassword' name='dmsuserpassword' size='40' /></td> |
| 133 | - <td id="error_2_3" class="error" style="display:none">Please Enter A Password</td> | 133 | + <td id="error_2_3" class="error" style="display:none">Enter A Password</td> |
| 134 | </tr> | 134 | </tr> |
| 135 | <tr> | 135 | <tr> |
| 136 | - <td><label for='dmsuserpassword2'>Please confirm the password: </label></td> | 136 | + <td><label for='dmsuserpassword2'>Confirm the password: </label></td> |
| 137 | <td><input type='password' value="<?php echo $dmsuserpassword?>" id='dmsuserpassword2' name='dmsuserpassword2' size='40' /></td> | 137 | <td><input type='password' value="<?php echo $dmsuserpassword?>" id='dmsuserpassword2' name='dmsuserpassword2' size='40' /></td> |
| 138 | - <td id="error_3_3" class="error" style="display:none">Please Confirm Password</td> | 138 | + <td id="error_3_3" class="error" style="display:none">Confirm Password</td> |
| 139 | <td id="error_4_3" class="error" style="display:none">Passwords Do Not Match</td> | 139 | <td id="error_4_3" class="error" style="display:none">Passwords Do Not Match</td> |
| 140 | </tr> | 140 | </tr> |
| 141 | </table> | 141 | </table> |
setup/wizard/templates/database_confirm.tpl
| @@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
| 2 | <p class="title">Confirming Database Configurations</p> | 2 | <p class="title">Confirming Database Configurations</p> |
| 3 | 3 | ||
| 4 | <div class="description"> | 4 | <div class="description"> |
| 5 | - Please confirm whether KnowledgeTree has correctly determined your database settings before proceeding. Print this page for future use. <a href="javascript:window.print()">Click to Print This Page</a> | 5 | + Confirm whether KnowledgeTree has correctly determined your database settings before proceeding. Print this page for future use. <a href="javascript:window.print()">Click to Print This Page</a> |
| 6 | </div> | 6 | </div> |
| 7 | <div id="step_content_<?php echo $step_name; ?>_confirm" class="step"> | 7 | <div id="step_content_<?php echo $step_name; ?>_confirm" class="step"> |
| 8 | <h3><b>Database Settings</b></h3> | 8 | <h3><b>Database Settings</b></h3> |
setup/wizard/templates/license.tpl
| @@ -6,7 +6,7 @@ | @@ -6,7 +6,7 @@ | ||
| 6 | } | 6 | } |
| 7 | }?> | 7 | }?> |
| 8 | <p class="description_1"> | 8 | <p class="description_1"> |
| 9 | -Please read and accept the license agreement below before continuing with the setup. | 9 | +Read and accept the license agreement below before continuing with the setup. |
| 10 | </p> | 10 | </p> |
| 11 | 11 | ||
| 12 | <?php if(!empty($errors)) { ?> | 12 | <?php if(!empty($errors)) { ?> |
setup/wizard/templates/registration.tpl
| @@ -21,7 +21,7 @@ | @@ -21,7 +21,7 @@ | ||
| 21 | <input type="hidden" id="state" name="" /> | 21 | <input type="hidden" id="state" name="" /> |
| 22 | <p class='disclaimer'> | 22 | <p class='disclaimer'> |
| 23 | We will not share your information with 3rd-parties, nor will we send you information not directly related to KnowledgeTree's products | 23 | We will not share your information with 3rd-parties, nor will we send you information not directly related to KnowledgeTree's products |
| 24 | - and services. Please see our <a href="http://www.knowledgetree.com/about/legal" target="_blank">Privacy and Data Retention policies</a> for more information. | 24 | + and services. See our <a href="http://www.knowledgetree.com/about/legal" target="_blank">Privacy and Data Retention policies</a> for more information. |
| 25 | </p> | 25 | </p> |
| 26 | <br/> | 26 | <br/> |
| 27 | <div id="step_content_<?php echo $step_name; ?>" class="step"> | 27 | <div id="step_content_<?php echo $step_name; ?>" class="step"> |
setup/wizard/templates/services.tpl
| @@ -15,7 +15,7 @@ | @@ -15,7 +15,7 @@ | ||
| 15 | if(!$errors && !$warnings) { | 15 | if(!$errors && !$warnings) { |
| 16 | ?> | 16 | ?> |
| 17 | <span class='big_ok'> </span> | 17 | <span class='big_ok'> </span> |
| 18 | - All service dependencies are met. Please click next to continue. | 18 | + All service dependencies are met. Click next to continue. |
| 19 | <br/><br/> | 19 | <br/><br/> |
| 20 | <?php | 20 | <?php |
| 21 | } | 21 | } |