Commit 166429b3a19a97ce0cf245241530fd2925f059a7

Authored by Jarrett Jordaan
1 parent 9cc1b9a4

KTC-855, KTC-856: Updated Versioning and Installation Path on Upgrade Complete Step

Committed by: Jarrett Jordaan

Reviewed by: Megan Watson
setup/migrate/steps/migrateComplete.php
@@ -86,7 +86,6 @@ class migrateComplete extends Step { @@ -86,7 +86,6 @@ class migrateComplete extends Step {
86 } 86 }
87 if($this->next()) { 87 if($this->next()) {
88 $this->checkZendMysql(); 88 $this->checkZendMysql();
89 - //if($this->checkMysql()) {  
90 if($this->checkZendMysql()) { 89 if($this->checkZendMysql()) {
91 return 'binstall'; 90 return 'binstall';
92 } else { 91 } else {
@@ -134,8 +133,17 @@ class migrateComplete extends Step { @@ -134,8 +133,17 @@ class migrateComplete extends Step {
134 if($response['out']) { 133 if($response['out']) {
135 $state = preg_replace('/^STATE *\: *\d */', '', trim($response['out'][3])); // Status store in third key 134 $state = preg_replace('/^STATE *\: *\d */', '', trim($response['out'][3])); // Status store in third key
136 } 135 }
137 - if($state == "STARTED") 136 + if($state == "STARTED") {
138 $running = true; 137 $running = true;
  138 + } else {
  139 + $installation = $this->getDataFromSession("database"); // Get installation directory
  140 + $dbConf = $installation;
  141 +// $this->util->dbUtilities->load($this->dhost, $this->dport, $this->duname, $this->dpassword, $this->dname);
  142 +// $res = @mysql_connect(null, 'root', '');
  143 +// if($res) {
  144 +// $running = true;
  145 +// }
  146 + }
139 } else { 147 } else {
140 $installation = $this->getDataFromSession("installation"); // Get installation directory 148 $installation = $this->getDataFromSession("installation"); // Get installation directory
141 $mysqlPid = $installation['location'].DS."mysql".DS."data".DS."mysqld.pid"; 149 $mysqlPid = $installation['location'].DS."mysql".DS."data".DS."mysqld.pid";
setup/migrate/steps/migrateServices.php
@@ -156,6 +156,8 @@ class migrateServices extends Step @@ -156,6 +156,8 @@ class migrateServices extends Step
156 * @return boolean 156 * @return boolean
157 */ 157 */
158 private function doRun() { 158 private function doRun() {
  159 + $installation = $this->getDataFromSession("installation"); // Get installation directory
  160 + $this->conf = $installation['location'];
159 if(!$this->alreadyUninstalled()) { // Pre-check if services are uninstalled 161 if(!$this->alreadyUninstalled()) { // Pre-check if services are uninstalled
160 $this->uninstallServices(); 162 $this->uninstallServices();
161 } 163 }
setup/upgrade/steps/upgradeComplete.php
@@ -86,7 +86,7 @@ class upgradeComplete extends Step { @@ -86,7 +86,7 @@ class upgradeComplete extends Step {
86 */ 86 */
87 protected function storeSilent() { 87 protected function storeSilent() {
88 $v = $this->getDataFromSession('upgradeProperties'); 88 $v = $this->getDataFromSession('upgradeProperties');
89 - $this->temp_variables['sysVersion'] = $v['upgrade_version']; 89 + $this->temp_variables['sysVersion'] = $this->util->readVersion();
90 $this->temp_variables['migrateCheck'] = $this->migrateCheck; 90 $this->temp_variables['migrateCheck'] = $this->migrateCheck;
91 $this->temp_variables['servicesCheck'] = $this->servicesCheck; 91 $this->temp_variables['servicesCheck'] = $this->servicesCheck;
92 } 92 }
setup/upgrade/templates/complete.tpl
@@ -23,7 +23,7 @@ @@ -23,7 +23,7 @@
23 <?php } ?> 23 <?php } ?>
24 <p class="disclaimer"> 24 <p class="disclaimer">
25 <?php if(WINDOWS_OS) { ?> 25 <?php if(WINDOWS_OS) { ?>
26 - cd <?php echo "\"".SYSTEM_DIR."knowledgetree\""; ?> <br/> 26 + cd <?php echo "\"".SYSTEM_DIR."\""; ?> <br/>
27 dmsctl.bat install<br/> 27 dmsctl.bat install<br/>
28 dmsctl.bat start 28 dmsctl.bat start
29 <?php } else { ?> 29 <?php } else { ?>
setup/wizard/resources/css/wizard.css
@@ -601,4 +601,12 @@ td.dir_description { @@ -601,4 +601,12 @@ td.dir_description {
601 font-size:100%; 601 font-size:100%;
602 line-height:150%; 602 line-height:150%;
603 font-family:sans-serif; 603 font-family:sans-serif;
  604 +}
  605 +
  606 +.twitter {
  607 +
  608 +}
  609 +
  610 +.facebook {
  611 +
604 } 612 }
605 \ No newline at end of file 613 \ No newline at end of file
setup/wizard/resources/graphics/facebookbutton.png 0 โ†’ 100644

6.93 KB

setup/wizard/resources/graphics/twitterbutton.png 0 โ†’ 100644

6.81 KB

setup/wizard/steps/database.php
@@ -309,11 +309,7 @@ class database extends Step @@ -309,11 +309,7 @@ class database extends Step
309 $this->error['dmsuserpassword'] = "Passwords do not match: " . $this->dmsuserpassword." ". $this->getPassword2(); 309 $this->error['dmsuserpassword'] = "Passwords do not match: " . $this->dmsuserpassword." ". $this->getPassword2();
310 return false; 310 return false;
311 } 311 }
312 -// if($this->dport == '') {  
313 -// $this->util->dbUtilities->load($this->dhost, $this->duname, $this->dpassword, $this->dname);  
314 -// } else {  
315 - $this->util->dbUtilities->load($this->dhost, $this->dport, $this->duname, $this->dpassword, $this->dname);  
316 -// } 312 + $this->util->dbUtilities->load($this->dhost, $this->dport, $this->duname, $this->dpassword, $this->dname);
317 if (!$this->util->dbUtilities->getDatabaseLink()) { 313 if (!$this->util->dbUtilities->getDatabaseLink()) {
318 $this->error['con'] = "Could not connect to the database, please check username and password"; 314 $this->error['con'] = "Could not connect to the database, please check username and password";
319 return false; 315 return false;
setup/wizard/templates/complete.tpl
@@ -4,9 +4,7 @@ @@ -4,9 +4,7 @@
4 </p> 4 </p>
5 <p class="description"> 5 <p class="description">
6 This step allows you to check that your KnowledgeTree configuration is set up correctly. 6 This step allows you to check that your KnowledgeTree configuration is set up correctly.
7 -<!-- <br/>-->  
8 Click <b>Finish</b> to browse to the KnowledgeTree Web Interface. Default login credentials are <b>username:</b> <i>admin</i> and <b>password:</b> <i>admin</i>. 7 Click <b>Finish</b> to browse to the KnowledgeTree Web Interface. Default login credentials are <b>username:</b> <i>admin</i> and <b>password:</b> <i>admin</i>.
9 -<!-- You can run this at any time after configuration to check that things are still set up correctly.-->  
10 </p> 8 </p>
11 <div> 9 <div>
12 <a href="http://wiki.knowledgetree.com/Web_Based_Installer#Post_Install" target="_blank"> 10 <a href="http://wiki.knowledgetree.com/Web_Based_Installer#Post_Install" target="_blank">
@@ -15,6 +13,16 @@ @@ -15,6 +13,16 @@
15 </div> 13 </div>
16 <br/> 14 <br/>
17 <div id="step_content_<?php echo $step_name; ?>" class="step"> 15 <div id="step_content_<?php echo $step_name; ?>" class="step">
  16 + <div style="padding: 0pt 0pt 40px 15px; float: right;">
  17 + <a class="twitter" href="http://www.twitter.com/knowledgetreesw" style="color:#FFFFFF;" target="_blank">
  18 + <?php echo $html->image('twitterbutton.png'); ?>
  19 + </a>
  20 + <br/>
  21 + <br/>
  22 + <a class="facebook" href="http://www.facebook.com/pages/KnowledgeTree-Document-Management-Made-Simple/59248880725" style="color:#FFFFFF;" target="_blank">
  23 + <?php echo $html->image('facebookbutton.png'); ?>
  24 + </a>
  25 + </div>
18 <?php if(!$servicesValidation) { ?> 26 <?php if(!$servicesValidation) { ?>
19 <?php if(!$migrate_check) { ?> 27 <?php if(!$migrate_check) { ?>
20 <h3>Services</h3> 28 <h3>Services</h3>
@@ -50,7 +58,6 @@ @@ -50,7 +58,6 @@
50 $iconFlag = "<span class='{$paths_check}'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>"; 58 $iconFlag = "<span class='{$paths_check}'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>";
51 $checkHeading = "<h3 style='width:35%; float:left;'>".$iconFlag."Paths and Permissions</h3>"; 59 $checkHeading = "<h3 style='width:35%; float:left;'>".$iconFlag."Paths and Permissions</h3>";
52 ?> 60 ?>
53 -<!-- <div>-->  
54 <?php if($pathsSection) { 61 <?php if($pathsSection) {
55 $details = 'Show Details'; 62 $details = 'Show Details';
56 $display = 'none'; 63 $display = 'none';
@@ -58,11 +65,6 @@ @@ -58,11 +65,6 @@
58 $details = 'Hide Details'; 65 $details = 'Hide Details';
59 $display = 'block'; 66 $display = 'block';
60 }?> 67 }?>
61 -<!-- <h3><?php //echo "<span class='{$paths_check}'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>"; ?>Paths and Permissions</h3>-->  
62 - <?php if($silent) { ?>  
63 -<!-- <div id="option8" class="onclick" onclick="javascript:{w.toggleClass('paths_check', 'option8');}">Show Details</div>-->  
64 -<!-- <div class="paths_check" style="display:none">-->  
65 - <?php } ?>  
66 <?php 68 <?php
67 $pathsCheck = $checkHeading; 69 $pathsCheck = $checkHeading;
68 $pathsCheck .= "<div id='option8' class='onclick' onclick='javascript:{w.toggleClass(\"paths_check\", \"option8\");}'>"; 70 $pathsCheck .= "<div id='option8' class='onclick' onclick='javascript:{w.toggleClass(\"paths_check\", \"option8\");}'>";
@@ -71,7 +73,6 @@ @@ -71,7 +73,6 @@
71 echo $pathsCheck; 73 echo $pathsCheck;
72 ?> 74 ?>
73 <table class="description_complete"> 75 <table class="description_complete">
74 -<!-- <table class="description">-->  
75 <tr></tr> 76 <tr></tr>
76 <?php if (!empty($varDirectory)) echo '<tr>' . $varDirectory . '</tr>'; ?> 77 <?php if (!empty($varDirectory)) echo '<tr>' . $varDirectory . '</tr>'; ?>
77 <?php if (!empty($documentRoot)) echo '<tr>' . $documentRoot . '</tr>'; ?> 78 <?php if (!empty($documentRoot)) echo '<tr>' . $documentRoot . '</tr>'; ?>
@@ -84,10 +85,8 @@ @@ -84,10 +85,8 @@
84 <?php if($silent) { ?> 85 <?php if($silent) { ?>
85 </div> 86 </div>
86 <?php } ?> 87 <?php } ?>
87 -<!-- </div>-->  
88 <br/> 88 <br/>
89 <br/> 89 <br/>
90 -<!-- <div>-->  
91 <!-- Database connectivity --> 90 <!-- Database connectivity -->
92 <?php 91 <?php
93 $iconFlag = "<span class='{$database_check}'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>"; 92 $iconFlag = "<span class='{$database_check}'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>";
@@ -100,10 +99,7 @@ @@ -100,10 +99,7 @@
100 $details = 'Hide Details'; 99 $details = 'Hide Details';
101 $display = 'block'; 100 $display = 'block';
102 }?> 101 }?>
103 -<!-- <h3><?php //echo "<span class='{$database_check}'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>"; ?>Database connectivity</h3>-->  
104 <?php if($silent) { ?> 102 <?php if($silent) { ?>
105 -<!-- <div id="option9" class="onclick" onclick="javascript:{w.toggleClass('database_check', 'option9');}">Show Details</div>-->  
106 -<!-- <div class="database_check" style="display:none">-->  
107 <?php 103 <?php
108 $databaseCheck = $checkHeading; 104 $databaseCheck = $checkHeading;
109 $databaseCheck .= "<div id='option9' class='onclick' onclick='javascript:{w.toggleClass(\"database_check\", \"option9\");}'>"; 105 $databaseCheck .= "<div id='option9' class='onclick' onclick='javascript:{w.toggleClass(\"database_check\", \"option9\");}'>";
@@ -133,10 +129,7 @@ @@ -133,10 +129,7 @@
133 $details = 'Hide Details'; 129 $details = 'Hide Details';
134 $display = 'block'; 130 $display = 'block';
135 }?> 131 }?>
136 -<!-- <h3><?php //echo "<span class='{$privileges_check}'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>"; ?>Privileges</h3>-->  
137 <?php if($silent) { ?> 132 <?php if($silent) { ?>
138 -<!-- <div id="option1" class="onclick" onclick="javascript:{w.toggleClass('privileges_check', 'option1');}">Show Details</div>-->  
139 -<!-- <div class="privileges_check" style="display:none">-->  
140 <?php 133 <?php
141 $privilegesCheck = $checkHeading; 134 $privilegesCheck = $checkHeading;
142 $privilegesCheck .= "<div id='option1' class='onclick' onclick='javascript:{w.toggleClass(\"privileges_check\", \"option1\");}'>"; 135 $privilegesCheck .= "<div id='option1' class='onclick' onclick='javascript:{w.toggleClass(\"privileges_check\", \"option1\");}'>";
@@ -152,7 +145,6 @@ @@ -152,7 +145,6 @@
152 <?php if($silent) { ?> 145 <?php if($silent) { ?>
153 </div> 146 </div>
154 <?php } ?> 147 <?php } ?>
155 -<!-- </div>-->  
156 <!-- Services --> 148 <!-- Services -->
157 <br/> 149 <br/>
158 <!-- <br/>--> 150 <!-- <br/>-->
@@ -164,46 +156,18 @@ @@ -164,46 +156,18 @@
164 <div id="option2" class="onclick" onclick="javascript:{w.toggleClass('services_check', 'option2');}">Show Details</div> 156 <div id="option2" class="onclick" onclick="javascript:{w.toggleClass('services_check', 'option2');}">Show Details</div>
165 <div class="services_check" style="display:none"> 157 <div class="services_check" style="display:none">
166 <?php } ?> 158 <?php } ?>
167 -<!-- <table class="description_complete">-->  
168 <table class="description"> 159 <table class="description">
169 <tr> 160 <tr>
170 <td style="width:15px;"> <?php echo "<span class='{$LuceneStatus}'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>"; ?> </td> 161 <td style="width:15px;"> <?php echo "<span class='{$LuceneStatus}'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>"; ?> </td>
171 <td style="width:640px;"> Lucene Service <?php if ($LuceneStatus != 'tick') { ?> Could not be started <?php } else { ?> Started <?php } ?></td> 162 <td style="width:640px;"> Lucene Service <?php if ($LuceneStatus != 'tick') { ?> Could not be started <?php } else { ?> Started <?php } ?></td>
172 - <?php if ($LuceneStatus != 'tick') { ?>  
173 - <td>  
174 - <?php if (AJAX) { ?>  
175 -<!-- <a href="#" class="refresh" onclick="w.refresh('complete')">Refresh</a>-->  
176 - <?php } else { ?>  
177 -<!-- <a href="javascript:this.location.reload();" class="refresh">Refresh</a>-->  
178 - <?php } ?>  
179 - </td>  
180 - <?php } ?>  
181 </tr> 163 </tr>
182 <tr> 164 <tr>
183 <td> <?php echo "<span class='{$SchedulerStatus}'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>"; ?> </td> 165 <td> <?php echo "<span class='{$SchedulerStatus}'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>"; ?> </td>
184 <td> Scheduler Service <?php if ($SchedulerStatus != 'tick') { ?> Could not be started <?php } else { ?> Started <?php } ?></td> 166 <td> Scheduler Service <?php if ($SchedulerStatus != 'tick') { ?> Could not be started <?php } else { ?> Started <?php } ?></td>
185 - <?php if ($SchedulerStatus != 'tick') { ?>  
186 - <td>  
187 - <?php if (AJAX) { ?>  
188 -<!-- <a href="#" class="refresh" onclick="w.refresh('complete')">Refresh</a>-->  
189 - <?php } else { ?>  
190 -<!-- <a href="javascript:this.location.reload();" class="refresh">Refresh</a>-->  
191 - <?php } ?>  
192 - </td>  
193 - <?php } ?>  
194 </tr> 167 </tr>
195 <tr> 168 <tr>
196 <td> <?php echo "<span class='{$OpenOfficeStatus}'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>"; ?> </td> 169 <td> <?php echo "<span class='{$OpenOfficeStatus}'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>"; ?> </td>
197 <td> OpenOffice Service <?php if ($OpenOfficeStatus != 'tick') { ?> Could not be started <?php } else { ?> Started <?php } ?></td> 170 <td> OpenOffice Service <?php if ($OpenOfficeStatus != 'tick') { ?> Could not be started <?php } else { ?> Started <?php } ?></td>
198 - <?php if ($OpenOfficeStatus != 'tick') { ?>  
199 - <td>  
200 - <?php if (AJAX) { ?>  
201 -<!-- <a href="#" class="refresh" onclick="w.refresh('complete')">Refresh</a>-->  
202 - <?php } else { ?>  
203 -<!-- <a href="javascript:this.location.reload();" class="refresh">Refresh</a>-->  
204 - <?php } ?>  
205 - </td>  
206 - <?php } ?>  
207 </tr> 171 </tr>
208 </table> 172 </table>
209 <?php if($silent) { ?> 173 <?php if($silent) { ?>
@@ -218,8 +182,6 @@ @@ -218,8 +182,6 @@
218 $file_system_root = $_SERVER['DOCUMENT_ROOT']; 182 $file_system_root = $_SERVER['DOCUMENT_ROOT'];
219 $host = $_SERVER['SERVER_NAME']; 183 $host = $_SERVER['SERVER_NAME'];
220 $port = $_SERVER['SERVER_PORT']; 184 $port = $_SERVER['SERVER_PORT'];
221 - //$ssl_enabled = isset($_SERVER['HTTPS']) ? (strtolower($_SERVER['HTTPS']) === 'on' ? 'yes' : 'no') : 'no';  
222 -  
223 $pos = strpos($script, '/setup/wizard/'); 185 $pos = strpos($script, '/setup/wizard/');
224 $root_url = substr($script, 0, $pos); 186 $root_url = substr($script, 0, $pos);
225 if($port == '') 187 if($port == '')