Commit 39d747b07d6a06b8c8f05b9e1d15284869607453

Authored by Megan Watson
2 parents c302b7c9 0f21f249

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

Showing 41 changed files with 238 additions and 152 deletions
plugins/ktcore/document/edit.php
@@ -216,6 +216,31 @@ class KTDocumentEditAction extends KTDocumentAction { @@ -216,6 +216,31 @@ class KTDocumentEditAction extends KTDocumentAction {
216 $values = (array) KTUtil::arrayGet($data, 'fieldset_' . $oFieldset->getId()); 216 $values = (array) KTUtil::arrayGet($data, 'fieldset_' . $oFieldset->getId());
217 foreach ($fields as $oField) { 217 foreach ($fields as $oField) {
218 $val = KTUtil::arrayGet($values, 'metadata_' . $oField->getId()); 218 $val = KTUtil::arrayGet($values, 'metadata_' . $oField->getId());
  219 +
  220 + // for html fields we want to do some stripping :)
  221 + if ($oField->getIsHTML())
  222 + {
  223 + // NOTE this works great...once the text is saved a first time
  224 + // but the first time the <script> tags come through encoded, so decode first
  225 + // HOWEVER html_entity_decode decodes too much (e.g. &nbsp; - which causes a DB error for some reason)! use this instead
  226 + // NOTE I considered a preg_replace_callback but str_replace is probably more efficient in this case as we only have
  227 + // two symbols to replace
  228 + $val = str_replace('&lt;', '<', $val);
  229 + $val = str_replace('&gt;', '>', $val);
  230 + //$val = preg_replace_callback('/&lt;([^&]*)&gt;/', create_function('$matches', 'return "<" . $matches[1] . ">";'), $val);
  231 + // in case of script which does not yet contain <!-- //--> around the actual code (i.e. first submission again)
  232 + // these will not be correctly removed by strip_tags
  233 + $val = preg_replace('/<script[^>]*>([^<]*)<\/script>/', '', $val);
  234 + // remove any attempts to call an onclick/onmouseover/onwhatever call
  235 + $val = preg_replace_callback('/on[^= ]*=[^; \/>]*;?"? *\/? *(>?)/',
  236 + create_function('$matches', 'if (isset($matches[1])) return $matches[1]; else return null;'),
  237 + $val);
  238 + // now strip remaining tags including script tags with code surrounded by <!-- //-->,
  239 + // which would not be stripped by the previous regex
  240 + $val = strip_tags($val, '<p><a><b><strong><ol><ul><li><p><br><i><em><u><span>');
  241 + // remove empty <p> tags?
  242 + $val = preg_replace('/<p><\/p>\r?\n?/', '', $val);
  243 + }
219 244
220 if($oField->getDataType() == "LARGE TEXT" && !is_null($oField->getMaxLength())) 245 if($oField->getDataType() == "LARGE TEXT" && !is_null($oField->getMaxLength()))
221 { 246 {
plugins/multiselect/templates/ktcore/search2/adv_query_builder.smarty
@@ -429,6 +429,7 @@ function createText(groupid, fid, type) @@ -429,6 +429,7 @@ function createText(groupid, fid, type)
429 html += "<option value=\"is not\">{/literal}{i18n}is not{/i18n}{literal}"; 429 html += "<option value=\"is not\">{/literal}{i18n}is not{/i18n}{literal}";
430 break; 430 break;
431 case 'STRING': 431 case 'STRING':
  432 + case 'LARGE TEXT':
432 html += "<option value=\"is\">{/literal}{i18n}is{/i18n}{literal}"; 433 html += "<option value=\"is\">{/literal}{i18n}is{/i18n}{literal}";
433 html += "<option value=\"is not\">{/literal}{i18n}is not{/i18n}{literal}"; 434 html += "<option value=\"is not\">{/literal}{i18n}is not{/i18n}{literal}";
434 html += "<option value=\"contains\">{/literal}{i18n}contains{/i18n}{literal}"; 435 html += "<option value=\"contains\">{/literal}{i18n}contains{/i18n}{literal}";
@@ -496,7 +497,7 @@ function addFieldTypeSelection(groupid, fid, type, options) @@ -496,7 +497,7 @@ function addFieldTypeSelection(groupid, fid, type, options)
496 } 497 }
497 // want to fall through 498 // want to fall through
498 case 'FULLTEXT': 499 case 'FULLTEXT':
499 - 500 + case 'LARGE TEXT':
500 case 'STRINGMATCH': 501 case 'STRINGMATCH':
501 html = createText(groupid, fid, type); 502 html = createText(groupid, fid, type);
502 break; 503 break;
setup/migrate/migrateUtil.php
@@ -157,15 +157,6 @@ class MigrateUtil { @@ -157,15 +157,6 @@ class MigrateUtil {
157 return $this->bootstrap->absoluteURI($url = null, $protocol = null, $port = null); 157 return $this->bootstrap->absoluteURI($url = null, $protocol = null, $port = null);
158 } 158 }
159 159
160 - /**  
161 - * Portably execute a command on any of the supported platforms.  
162 - *  
163 - * @author KnowledgeTree Team  
164 - * @access public  
165 - * @param string $aCmd  
166 - * @param array $aOptions  
167 - * @return array  
168 - */  
169 public function pexec($aCmd, $aOptions = null) { 160 public function pexec($aCmd, $aOptions = null) {
170 return $this->bootstrap->pexec($aCmd, $aOptions = null); 161 return $this->bootstrap->pexec($aCmd, $aOptions = null);
171 } 162 }
setup/migrate/templates/complete.tpl
@@ -67,5 +67,6 @@ @@ -67,5 +67,6 @@
67 ?> 67 ?>
68 </table> 68 </table>
69 </div> 69 </div>
70 - <input class="button_next" type="submit" value="Back To Installer" name="BInstall"/>  
71 -</form>  
72 \ No newline at end of file 70 \ No newline at end of file
  71 + <input class="button_next" type="submit" value="Continue Installion" name="BInstall"/>
  72 +</form>
  73 +<?php if (AJAX) { echo $html->js('form.js'); } ?>
73 \ No newline at end of file 74 \ No newline at end of file
setup/migrate/templates/database.tpl
@@ -18,4 +18,5 @@ @@ -18,4 +18,5 @@
18 </form> 18 </form>
19 <script type="text/javascript"> 19 <script type="text/javascript">
20 $("#duname").focus(); 20 $("#duname").focus();
21 -</script>  
22 \ No newline at end of file 21 \ No newline at end of file
  22 +</script>
  23 +<?php if (AJAX) { echo $html->js('form.js'); } ?>
23 \ No newline at end of file 24 \ No newline at end of file
setup/migrate/templates/installation.tpl
@@ -46,4 +46,5 @@ @@ -46,4 +46,5 @@
46 </form> 46 </form>
47 <script type="text/javascript"> 47 <script type="text/javascript">
48 $("#location").focus(); 48 $("#location").focus();
49 -</script>  
50 \ No newline at end of file 49 \ No newline at end of file
  50 +</script>
  51 +<?php if (AJAX) { echo $html->js('form.js'); } ?>
51 \ No newline at end of file 52 \ No newline at end of file
setup/migrate/templates/installation_confirm.tpl
@@ -71,4 +71,4 @@ @@ -71,4 +71,4 @@
71 <input type="submit" name="Edit" value="Back" class="button_previous"/> 71 <input type="submit" name="Edit" value="Back" class="button_previous"/>
72 <input type="submit" name="Confirm" value="Confirm" class="button_next"/> 72 <input type="submit" name="Confirm" value="Confirm" class="button_next"/>
73 </form> 73 </form>
74 -<?php if (AJAX) { ?> <script type="text/javascript" src="resources/form.js"></script> <?php } ?>  
75 \ No newline at end of file 74 \ No newline at end of file
  75 +<?php if (AJAX) { echo $html->js('form.js'); } ?>
76 \ No newline at end of file 76 \ No newline at end of file
setup/migrate/templates/services.tpl
@@ -79,4 +79,5 @@ @@ -79,4 +79,5 @@
79 </div> 79 </div>
80 <input type="submit" name="Previous" value="Back" class="button_previous"/> 80 <input type="submit" name="Previous" value="Back" class="button_previous"/>
81 <input type="submit" name="Next" value="Next" class="button_next"/> 81 <input type="submit" name="Next" value="Next" class="button_next"/>
82 -</form>  
83 \ No newline at end of file 82 \ No newline at end of file
  83 +</form>
  84 +<?php if (AJAX) { echo $html->js('form.js'); } ?>
84 \ No newline at end of file 85 \ No newline at end of file
setup/wizard/installUtil.php
@@ -66,21 +66,6 @@ class InstallUtil { @@ -66,21 +66,6 @@ class InstallUtil {
66 return false; 66 return false;
67 } 67 }
68 68
69 - /**  
70 - * Check if system needs to be migrated  
71 - *  
72 - * @author KnowledgeTree Team  
73 - * @access public  
74 - * @param none  
75 - * @return boolean  
76 - */  
77 - public function isMigration() {  
78 - if (isset($_POST['Migrate'])) {  
79 - return true;  
80 - }  
81 - return false;  
82 - }  
83 -  
84 public function error($error) { 69 public function error($error) {
85 $template_vars['error'] = $error; 70 $template_vars['error'] = $error;
86 $file = "templates/error.tpl"; 71 $file = "templates/error.tpl";
@@ -518,6 +503,42 @@ class InstallUtil { @@ -518,6 +503,42 @@ class InstallUtil {
518 } 503 }
519 504
520 /** 505 /**
  506 + * Check if system needs to be migrated
  507 + *
  508 + * @author KnowledgeTree Team
  509 + * @access public
  510 + * @param none
  511 + * @return boolean
  512 + */
  513 + public function migrationSpecified() {
  514 + if(isset($_POST['installtype'])) {
  515 + if($_POST['installtype'] == "Upgrade Installation") {
  516 + return true;
  517 + }
  518 + }
  519 +
  520 + return false;
  521 + }
  522 +
  523 + /**
  524 + * Check if system needs to be migrated
  525 + *
  526 + * @author KnowledgeTree Team
  527 + * @access public
  528 + * @param none
  529 + * @return boolean
  530 + */
  531 + public function upgradeSpecified() {
  532 + if(isset($_POST['installtype'])) {
  533 + if($_POST['installtype'] == "Upgrade Only") {
  534 + return true;
  535 + }
  536 + }
  537 +
  538 + return false;
  539 + }
  540 +
  541 + /**
521 * Get session data from package 542 * Get session data from package
522 * 543 *
523 * @author KnowledgeTree Team 544 * @author KnowledgeTree Team
@@ -644,7 +665,30 @@ class InstallUtil { @@ -644,7 +665,30 @@ class InstallUtil {
644 return ''; 665 return '';
645 } 666 }
646 667
  668 + /**
  669 + * Deletes migration lock file if a clean install is chosen
  670 + * This is in case someone changes their mind after choosing upgrade/migrate and clicks back up to this step
  671 + *
  672 + * @author KnowledgeTree Team
  673 + * @access private
  674 + * @return void
  675 + */
  676 + function deleteMigrateFile() {
  677 + if(file_exists("migrate.lock"))
  678 + @unlink("migrate.lock");
  679 + }
647 680
  681 + /**
  682 + * Check if we are migrating an existing installation
  683 + *
  684 + * @return unknown
  685 + */
  686 + function isMigration() {
  687 + if(file_exists("migrate.lock"))
  688 + return true;
  689 + return false;
  690 + }
  691 +
648 /** 692 /**
649 * Portably execute a command on any of the supported platforms. 693 * Portably execute a command on any of the supported platforms.
650 * 694 *
setup/wizard/installWizard.php
@@ -116,18 +116,6 @@ class InstallWizard { @@ -116,18 +116,6 @@ class InstallWizard {
116 } 116 }
117 117
118 /** 118 /**
119 - * Check if system has to be migrated  
120 - *  
121 - * @author KnowledgeTree Team  
122 - * @access private  
123 - * @param none  
124 - * @return boolean  
125 - */  
126 - private function isMigration() {  
127 - return $this->util->isMigration();  
128 - }  
129 -  
130 - /**  
131 * Display the wizard 119 * Display the wizard
132 * 120 *
133 * @author KnowledgeTree Team 121 * @author KnowledgeTree Team
@@ -295,8 +283,10 @@ class InstallWizard { @@ -295,8 +283,10 @@ class InstallWizard {
295 $this->createInstallFile(); 283 $this->createInstallFile();
296 } 284 }
297 if(!$this->isSystemInstalled()) { // Check if the systems not installed 285 if(!$this->isSystemInstalled()) { // Check if the systems not installed
298 - if($this->isMigration()) { // Check if the migrator needs to be accessed 286 + if($this->util->migrationSpecified()) { // Check if the migrator needs to be accessed
299 $this->util->redirect('../migrate'); 287 $this->util->redirect('../migrate');
  288 + } elseif ($this->util->upgradeSpecified()) {
  289 + $this->util->redirect('../upgrade');
300 } 290 }
301 $response = $this->systemChecks(); 291 $response = $this->systemChecks();
302 if($response === true) { 292 if($response === true) {
setup/wizard/installer.php
@@ -414,8 +414,6 @@ class Installer { @@ -414,8 +414,6 @@ class Installer {
414 */ 414 */
415 private function _completeInstall() { 415 private function _completeInstall() {
416 @touch("install.lock"); 416 @touch("install.lock");
417 - if(file_exists("migrate.lock"))  
418 - @unlink("migrate.lock");  
419 } 417 }
420 418
421 /** 419 /**
setup/wizard/lib/services/unixLucene.php
@@ -59,7 +59,7 @@ class unixLucene extends unixService { @@ -59,7 +59,7 @@ class unixLucene extends unixService {
59 * @param string 59 * @param string
60 * @return void 60 * @return void
61 */ 61 */
62 - public function load() { 62 + public function load($options = null) {
63 $this->setLuceneSource("ktlucene.jar"); 63 $this->setLuceneSource("ktlucene.jar");
64 $this->setLuceneDir(SYSTEM_DIR."bin".DS."luceneserver".DS); 64 $this->setLuceneDir(SYSTEM_DIR."bin".DS."luceneserver".DS);
65 $this->setIndexerDir(SYSTEM_DIR."search2".DS."indexing".DS."bin".DS); 65 $this->setIndexerDir(SYSTEM_DIR."search2".DS."indexing".DS."bin".DS);
setup/wizard/lib/services/unixOpenOffice.php
@@ -63,7 +63,7 @@ class unixOpenOffice extends unixService { @@ -63,7 +63,7 @@ class unixOpenOffice extends unixService {
63 * @param string 63 * @param string
64 * @return void 64 * @return void
65 */ 65 */
66 - public function load() { 66 + public function load($options = null) {
67 $this->setPort("8100"); 67 $this->setPort("8100");
68 $this->setHost("localhost"); 68 $this->setHost("localhost");
69 $this->soffice = $this->util->getOpenOffice(); 69 $this->soffice = $this->util->getOpenOffice();
setup/wizard/lib/services/unixScheduler.php
@@ -57,7 +57,7 @@ class unixScheduler extends unixService { @@ -57,7 +57,7 @@ class unixScheduler extends unixService {
57 * @param string 57 * @param string
58 * @return void 58 * @return void
59 */ 59 */
60 - public function load() { 60 + public function load($options = null) {
61 $this->setPhpCli(); 61 $this->setPhpCli();
62 $this->scheduler = 'scheduler'; 62 $this->scheduler = 'scheduler';
63 $this->setSchedulerSource('schedulerTask.sh'); 63 $this->setSchedulerSource('schedulerTask.sh');
setup/wizard/lib/services/windowsLucene.php
@@ -140,7 +140,7 @@ class windowsLucene extends windowsService { @@ -140,7 +140,7 @@ class windowsLucene extends windowsService {
140 * @param string 140 * @param string
141 * @return void 141 * @return void
142 */ 142 */
143 - public function load() { 143 + public function load($options = null) {
144 $this->setJavaBin(); 144 $this->setJavaBin();
145 $this->setLuceneDIR(SYSTEM_DIR."bin".DS."luceneserver"); 145 $this->setLuceneDIR(SYSTEM_DIR."bin".DS."luceneserver");
146 $this->setLuceneExe("KTLuceneService.exe"); 146 $this->setLuceneExe("KTLuceneService.exe");
setup/wizard/lib/services/windowsOpenOffice.php
@@ -140,8 +140,10 @@ class windowsOpenOffice extends windowsService { @@ -140,8 +140,10 @@ class windowsOpenOffice extends windowsService {
140 * @param string 140 * @param string
141 * @return void 141 * @return void
142 */ 142 */
143 - public function load() {  
144 - // hack for testing 143 + public function load($options = null) {
  144 + if(isset($options['binary'])) {
  145 + $this->setBin($options['binary']);
  146 + }
145 $this->setPort("8100"); 147 $this->setPort("8100");
146 $this->setHost("127.0.0.1"); 148 $this->setHost("127.0.0.1");
147 $this->setLog("openoffice.log"); 149 $this->setLog("openoffice.log");
@@ -173,7 +175,7 @@ class windowsOpenOffice extends windowsService { @@ -173,7 +175,7 @@ class windowsOpenOffice extends windowsService {
173 } 175 }
174 176
175 private function setBin($bin) { 177 private function setBin($bin) {
176 - $this->bin = "\"".$bin."\""; 178 + $this->bin = $bin;
177 } 179 }
178 180
179 public function getBin() { 181 public function getBin() {
@@ -198,15 +200,18 @@ class windowsOpenOffice extends windowsService { @@ -198,15 +200,18 @@ class windowsOpenOffice extends windowsService {
198 public function install() { 200 public function install() {
199 $status = $this->status(); 201 $status = $this->status();
200 if($status == '') { 202 if($status == '') {
201 - $services = $this->util->getDataFromSession('services');  
202 - $this->setBin($services['openOfficeExe']);  
203 - $cmd = "\"{$this->winservice}\" install $this->name "."-displayname {$this->name} -start auto {$this->getBin()} -headless -invisible -accept=socket,host={$this->host},port={$this->port};urp;";;  
204 - if(DEBUG) {  
205 - echo "Command : $cmd<br/>";  
206 - return ;  
207 - }  
208 - $response = $this->util->pexec($cmd);  
209 - return $response; 203 + //$binary = $this->util->openOfficeSpecified();
  204 + $binary = $this->getBin();
  205 + if($binary != '') {
  206 + $cmd = "\"{$this->winservice}\" install $this->name "."-displayname {$this->name} -start auto \"".$binary."\" -headless -invisible -accept=socket,host={$this->host},port={$this->port};urp;";;
  207 + if(DEBUG) {
  208 + echo "Command : $cmd<br/>";
  209 + return ;
  210 + }
  211 + $response = $this->util->pexec($cmd);
  212 + return $response;
  213 + }
  214 + return $status;
210 } 215 }
211 else { 216 else {
212 return $status; 217 return $status;
setup/wizard/lib/services/windowsScheduler.php
@@ -85,7 +85,7 @@ class windowsScheduler extends windowsService { @@ -85,7 +85,7 @@ class windowsScheduler extends windowsService {
85 * @param string 85 * @param string
86 * @return void 86 * @return void
87 */ 87 */
88 - function load() { 88 + function load($options = null) {
89 $this->setSchedulerDIR($this->varDir."bin"); 89 $this->setSchedulerDIR($this->varDir."bin");
90 $this->setSchedulerScriptPath("taskrunner.bat"); 90 $this->setSchedulerScriptPath("taskrunner.bat");
91 $this->setSchedulerSource("schedulerService.php"); 91 $this->setSchedulerSource("schedulerService.php");
setup/wizard/lib/validation/openofficeValidation.php
@@ -63,8 +63,7 @@ class openofficeValidation extends serviceValidation { @@ -63,8 +63,7 @@ class openofficeValidation extends serviceValidation {
63 */ 63 */
64 private $unixLocations = array("/usr/local/bin", "/usr/bin"); 64 private $unixLocations = array("/usr/local/bin", "/usr/bin");
65 65
66 -  
67 - public function preset() { 66 + public function preset($options = null) {
68 $this->specifyOpenOffice(); 67 $this->specifyOpenOffice();
69 } 68 }
70 69
@@ -91,15 +90,15 @@ class openofficeValidation extends serviceValidation { @@ -91,15 +90,15 @@ class openofficeValidation extends serviceValidation {
91 public function binaryChecks() { 90 public function binaryChecks() {
92 if($this->util->openOfficeSpecified()) { 91 if($this->util->openOfficeSpecified()) {
93 $this->soffice = $this->util->openOfficeSpecified(); 92 $this->soffice = $this->util->openOfficeSpecified();
94 - if(file_exists($this->soffice))  
95 - return true; 93 + if(file_exists($this->soffice))
  94 + return $this->soffice;
96 else 95 else
97 return false; 96 return false;
98 } else { 97 } else {
99 $auto = $this->detectOpenOffice(); 98 $auto = $this->detectOpenOffice();
100 if($auto) { 99 if($auto) {
101 $this->soffice = $auto; 100 $this->soffice = $auto;
102 - return true; 101 + return $this->soffice;
103 } 102 }
104 return false; 103 return false;
105 } 104 }
setup/wizard/resources/css/wizard.css
@@ -102,13 +102,13 @@ select { @@ -102,13 +102,13 @@ select {
102 border: 1px solid rgb(207, 207, 207); 102 border: 1px solid rgb(207, 207, 207);
103 padding: 5px; 103 padding: 5px;
104 overflow: auto; 104 overflow: auto;
105 - height: 400px; 105 + min-height: 400px;
106 } 106 }
107 107
108 #step_content_dependencies { 108 #step_content_dependencies {
109 border: 1px solid rgb(207, 207, 207); 109 border: 1px solid rgb(207, 207, 207);
110 padding: 5px; 110 padding: 5px;
111 - min-height:265px; 111 + min-height:285px;
112 } 112 }
113 113
114 #step_content_configuration { 114 #step_content_configuration {
@@ -323,6 +323,12 @@ select { @@ -323,6 +323,12 @@ select {
323 margin-top:10px; 323 margin-top:10px;
324 } 324 }
325 325
  326 +.button_radio_next {
  327 + float:none;
  328 + margin-left:0px;
  329 + margin-top:0px;
  330 +}
  331 +
326 .buttons a { 332 .buttons a {
327 background: #DDDDDD; 333 background: #DDDDDD;
328 border: solid 1px #888; 334 border: solid 1px #888;
@@ -533,4 +539,10 @@ td.dir_description { @@ -533,4 +539,10 @@ td.dir_description {
533 position:relative; 539 position:relative;
534 height:0px; 540 height:0px;
535 width:0px; 541 width:0px;
  542 +}
  543 +
  544 +#install_options {
  545 + position:relative;
  546 + padding-left: 400px;
  547 + padding-top: 10px;
536 } 548 }
537 \ No newline at end of file 549 \ No newline at end of file
setup/wizard/resources/js/wizard.js
@@ -218,17 +218,11 @@ wizard.prototype.sendRegistration = function () { @@ -218,17 +218,11 @@ wizard.prototype.sendRegistration = function () {
218 } 218 }
219 219
220 wizard.prototype.clearSessions = function () { 220 wizard.prototype.clearSessions = function () {
221 - <?php  
222 - echo 'All Clear';  
223 - $_SESSION['installers'] = null;  
224 - $_SESSION['migrate'] = null;  
225 - $_SESSION['upgrade'] = null;  
226 - ?>  
227 // var address = 'session.php?action=destroyAll'; 221 // var address = 'session.php?action=destroyAll';
228 // $.ajax({ 222 // $.ajax({
229 // url: address, 223 // url: address,
230 // dataType: "html", 224 // dataType: "html",
231 // type: "POST", 225 // type: "POST",
232 // cache: false, 226 // cache: false,
233 -// }); 227 +// });
234 } 228 }
235 \ No newline at end of file 229 \ No newline at end of file
setup/wizard/step.php
@@ -295,10 +295,12 @@ class Step @@ -295,10 +295,12 @@ class Step
295 * @return boolean 295 * @return boolean
296 */ 296 */
297 function migrate() { 297 function migrate() {
298 - if(isset($_POST['Migrate'])) {  
299 - return true;  
300 - }  
301 - 298 + if(isset($_POST['installtype'])) {
  299 + if($_POST['installtype'] == "Upgrade Installation") {
  300 + return true;
  301 + }
  302 + }
  303 +
302 return false; 304 return false;
303 } 305 }
304 306
setup/wizard/steps/complete.php
@@ -52,6 +52,7 @@ class complete extends Step { @@ -52,6 +52,7 @@ class complete extends Step {
52 private $paths_check = 'tick'; 52 private $paths_check = 'tick';
53 private $privileges_check = 'tick'; 53 private $privileges_check = 'tick';
54 private $database_check = 'tick'; 54 private $database_check = 'tick';
  55 + private $migrate_check = false;
55 protected $silent = true; 56 protected $silent = true;
56 57
57 function doStep() { 58 function doStep() {
@@ -61,14 +62,11 @@ class complete extends Step { @@ -61,14 +62,11 @@ class complete extends Step {
61 } 62 }
62 63
63 function doRun() { 64 function doRun() {
64 - // check filesystem (including location of document directory and logging)  
65 - $this->checkFileSystem();  
66 - // check database  
67 - $this->checkDb();  
68 - // check services  
69 - $this->checkServices(); 65 + $this->checkFileSystem(); // check filesystem (including location of document directory and logging)
  66 + $this->checkDb(); // check database
  67 + $this->checkServices(); // check services
  68 + $this->checkInstallType();// Set silent mode variables
70 $this->storeSilent();// Set silent mode variables 69 $this->storeSilent();// Set silent mode variables
71 -  
72 } 70 }
73 71
74 private function checkFileSystem() 72 private function checkFileSystem()
@@ -219,6 +217,14 @@ class complete extends Step { @@ -219,6 +217,14 @@ class complete extends Step {
219 return true; 217 return true;
220 } 218 }
221 219
  220 + function checkInstallType() {
  221 + if ($this->util->isMigration()) {
  222 + $this->migrate_check = true;
  223 + } else {
  224 + $this->migrate_check = false;
  225 + }
  226 + }
  227 +
222 /** 228 /**
223 * Set all silent mode varibles 229 * Set all silent mode varibles
224 * 230 *
@@ -228,11 +234,7 @@ class complete extends Step { @@ -228,11 +234,7 @@ class complete extends Step {
228 $this->temp_variables['paths_check'] = $this->paths_check; 234 $this->temp_variables['paths_check'] = $this->paths_check;
229 $this->temp_variables['privileges_check'] = $this->privileges_check; 235 $this->temp_variables['privileges_check'] = $this->privileges_check;
230 $this->temp_variables['database_check'] = $this->database_check; 236 $this->temp_variables['database_check'] = $this->database_check;
231 - if (file_exists('migrate.lock')) {  
232 - $this->temp_variables['migrate_check'] = true;  
233 - } else {  
234 - $this->temp_variables['migrate_check'] = false;  
235 - } 237 + $this->temp_variables['migrate_check'] = $this->migrate_check;
236 } 238 }
237 } 239 }
238 ?> 240 ?>
239 \ No newline at end of file 241 \ No newline at end of file
setup/wizard/steps/configuration.php
@@ -310,7 +310,7 @@ class configuration extends Step @@ -310,7 +310,7 @@ class configuration extends Step
310 $server = $conf['server']; 310 $server = $conf['server'];
311 $paths = $conf['paths']; 311 $paths = $conf['paths'];
312 // TODO 312 // TODO
313 - if (file_exists('migrate.lock')) { // Check if its an upgrade 313 + if ($this->util->isMigration()) { // Check if its an upgrade
314 $this->readInstallation(); 314 $this->readInstallation();
315 } else { 315 } else {
316 $this->readConfigPath(); // initialise writing to config.ini 316 $this->readConfigPath(); // initialise writing to config.ini
@@ -448,14 +448,14 @@ class configuration extends Step @@ -448,14 +448,14 @@ class configuration extends Step
448 private function getPathInfo($fileSystemRoot) 448 private function getPathInfo($fileSystemRoot)
449 { 449 {
450 if(isset($this->temp_variables['paths'])) { 450 if(isset($this->temp_variables['paths'])) {
451 - if (file_exists('migrate.lock')) { // Check if its an upgrade 451 + if ($this->util->isMigration()) { // Check if its an upgrade
452 $this->readInstallation(); // Read values from config.ini of other installation 452 $this->readInstallation(); // Read values from config.ini of other installation
453 $dirs = $this->getFromConfigPath(); // Store contents 453 $dirs = $this->getFromConfigPath(); // Store contents
454 } else { 454 } else {
455 $dirs = $this->temp_variables['paths']; // Pull from temp 455 $dirs = $this->temp_variables['paths']; // Pull from temp
456 } 456 }
457 } else { 457 } else {
458 - if (file_exists('migrate.lock')) { // Check if its an upgrade 458 + if ($this->util->isMigration()) { // Check if its an upgrade
459 $this->readInstallation(); // Read values from config.ini of other installation 459 $this->readInstallation(); // Read values from config.ini of other installation
460 } else { 460 } else {
461 $this->readConfigPath(); // Read contents of config-path file 461 $this->readConfigPath(); // Read contents of config-path file
setup/wizard/steps/database.php
@@ -557,8 +557,8 @@ class database extends Step @@ -557,8 +557,8 @@ class database extends Step
557 */ 557 */
558 private function mysql() { 558 private function mysql() {
559 $con = $this->connectMysql(); 559 $con = $this->connectMysql();
560 - // check for migrate.lock file which indicates this is a migration and not a clean install  
561 - if (file_exists('migrate.lock')) { 560 + // check for migrate lock file which indicates this is a migration and not a clean install
  561 + if ($this->util->isMigration()) {
562 if(!$this->migrateDB($con)) { 562 if(!$this->migrateDB($con)) {
563 $this->error['con'] = "Could not Create Database: "; 563 $this->error['con'] = "Could not Create Database: ";
564 return false; 564 return false;
setup/wizard/steps/installtype.php
@@ -48,10 +48,11 @@ class installType extends step @@ -48,10 +48,11 @@ class installType extends step
48 if(!$this->inStep("installtype")) { 48 if(!$this->inStep("installtype")) {
49 return 'landing'; 49 return 'landing';
50 } 50 }
  51 +
51 if($this->migrate()) { 52 if($this->migrate()) {
52 return 'migrate'; 53 return 'migrate';
53 } if($this->next()) { 54 } if($this->next()) {
54 - $this->deleteMigrateFile(); 55 + $this->util->deleteMigrateFile();
55 return 'next'; 56 return 'next';
56 } else if($this->previous()) { 57 } else if($this->previous()) {
57 return 'previous'; 58 return 'previous';
@@ -68,17 +69,5 @@ class installType extends step @@ -68,17 +69,5 @@ class installType extends step
68 public function getErrors() { 69 public function getErrors() {
69 return $this->error; 70 return $this->error;
70 } 71 }
71 -  
72 - /**  
73 - * Deletes migration lock file if a clean install is chosen  
74 - * This is in case someone changes their mind after choosing upgrade/migrate and clicks back up to this step  
75 - *  
76 - * @author KnowledgeTree Team  
77 - * @access private  
78 - * @return void  
79 - */  
80 - private function deleteMigrateFile() {  
81 - @unlink("migrate.lock");  
82 - }  
83 } 72 }
84 ?> 73 ?>
85 \ No newline at end of file 74 \ No newline at end of file
setup/wizard/steps/services.php
@@ -216,10 +216,10 @@ class services extends Step @@ -216,10 +216,10 @@ class services extends Step
216 $class = strtolower($service)."Validation"; 216 $class = strtolower($service)."Validation";
217 $this->$class->preset(); // Sets defaults 217 $this->$class->preset(); // Sets defaults
218 if(!$this->$class->installed) { 218 if(!$this->$class->installed) {
219 - if(!WINDOWS_OS) { $this->$class->getBinary(); } // Get binary, if it exists 219 + if(!WINDOWS_OS) { $binary = $this->$class->getBinary(); } // Get binary, if it exists
220 $passed = $this->$class->binaryChecks(); // Run Binary Pre Checks 220 $passed = $this->$class->binaryChecks(); // Run Binary Pre Checks
221 if ($passed) { // Install Service 221 if ($passed) { // Install Service
222 - $this->installService($service); 222 + $this->installService($service, $passed);
223 } 223 }
224 } else { 224 } else {
225 $this->$class->installed(); 225 $this->$class->installed();
@@ -323,10 +323,10 @@ class services extends Step @@ -323,10 +323,10 @@ class services extends Step
323 * @access private 323 * @access private
324 * @return boolean 324 * @return boolean
325 */ 325 */
326 - private function installService($serviceName) { 326 + private function installService($serviceName, $binary) {
327 $className = OS.$serviceName; 327 $className = OS.$serviceName;
328 $service = new $className(); 328 $service = new $className();
329 - $status = $this->serviceHelper($service); 329 + $status = $this->serviceHelper($service, $binary);
330 if (!$status) { 330 if (!$status) {
331 $this->serviceCheck = 'cross_orange'; 331 $this->serviceCheck = 'cross_orange';
332 } 332 }
@@ -340,8 +340,8 @@ class services extends Step @@ -340,8 +340,8 @@ class services extends Step
340 * @access private 340 * @access private
341 * @return string 341 * @return string
342 */ 342 */
343 - private function serviceHelper($service) {  
344 - $service->load(); // Load Defaults 343 + private function serviceHelper($service, $binary) {
  344 + $service->load(array('binary'=>$binary)); // Load Defaults
345 $response = $service->install(); // Install service 345 $response = $service->install(); // Install service
346 $statusCheck = OS."ServiceInstalled"; 346 $statusCheck = OS."ServiceInstalled";
347 return $this->$statusCheck($service); 347 return $this->$statusCheck($service);
@@ -446,7 +446,7 @@ class services extends Step @@ -446,7 +446,7 @@ class services extends Step
446 * @return mixed 446 * @return mixed
447 */ 447 */
448 public function installStep() { 448 public function installStep() {
449 - if (!file_exists('migrate.lock')) { // Check if it is a migration 449 + if (!$this->util->isMigration()) { // Check if it is a migration
450 foreach ($this->getServices() as $serviceName) { 450 foreach ($this->getServices() as $serviceName) {
451 $className = OS.$serviceName; 451 $className = OS.$serviceName;
452 $service = new $className(); 452 $service = new $className();
setup/wizard/templates/complete.tpl
@@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
12 . 'Click Here for help on overcoming post install issues</a></div><br/>'; 12 . 'Click Here for help on overcoming post install issues</a></div><br/>';
13 } 13 }
14 ?> 14 ?>
15 - <div id="step_content_complete" class="step"> 15 + <div id="step_content_<?php echo $step_name; ?>" class="step">
16 <!-- Paths and Permissions --> 16 <!-- Paths and Permissions -->
17 <div> 17 <div>
18 <h3><?php echo "<span class='{$paths_check}'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>"; ?>Paths and Permissions</h3> 18 <h3><?php echo "<span class='{$paths_check}'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>"; ?>Paths and Permissions</h3>
@@ -65,6 +65,7 @@ @@ -65,6 +65,7 @@
65 </div> 65 </div>
66 <!-- Services --> 66 <!-- Services -->
67 <br/><br/> 67 <br/><br/>
  68 +<?php if(!$migrate_check) { ?>
68 <div> 69 <div>
69 <h3><?php echo "<span class='{$services_check}'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>"; ?>Services</h3> 70 <h3><?php echo "<span class='{$services_check}'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>"; ?>Services</h3>
70 <?php if($silent) { ?> 71 <?php if($silent) { ?>
@@ -116,11 +117,13 @@ @@ -116,11 +117,13 @@
116 </div> 117 </div>
117 <?php } ?> 118 <?php } ?>
118 </div> 119 </div>
  120 + <?php } ?>
119 </div> 121 </div>
  122 +
120 <?php if($migrate_check) { ?> 123 <?php if($migrate_check) { ?>
121 - <a href="../../login.php" class="buttons back upgrade" style="width:80px;" onclick="javascript:{w.clearSessions();}">Goto Login</a> 124 + <a href="../../control.php" class="buttons back upgrade" style="width:80px;" onclick="javascript:{w.clearSessions();}">Goto Login</a>
122 <?php } else { ?> 125 <?php } else { ?>
123 - <a href="../../login.php" class="buttons back upgrade" style="width:80px;" onclick="javascript:{w.clearSessions();}">Goto Login</a> 126 + <a href="../../control.php" class="buttons back upgrade" style="width:80px;" onclick="javascript:{w.clearSessions();}">Goto Login</a>
124 <?php } ?> 127 <?php } ?>
125 <?php 128 <?php
126 if (INSTALL_TYPE == 'Zend') { 129 if (INSTALL_TYPE == 'Zend') {
setup/wizard/templates/configuration.tpl
1 -<form id="dependencies_configuration_services" action="index.php?step_name=configuration" method="post"> 1 +<form id="dependencies_configuration_services" action="index.php?step_name=<?php echo $step_name; ?>" method="post">
2 <p class="title">Checking System Configuration</p> 2 <p class="title">Checking System Configuration</p>
3 3
4 <p class="description"> 4 <p class="description">
@@ -32,7 +32,7 @@ @@ -32,7 +32,7 @@
32 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://wiki.knowledgetree.com/Web_Based_Installer#System_Configuration" target="_blank">Click here for help on overcoming configuration issues</a> 32 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://wiki.knowledgetree.com/Web_Based_Installer#System_Configuration" target="_blank">Click here for help on overcoming configuration issues</a>
33 <?php } ?> 33 <?php } ?>
34 <!--Content--> 34 <!--Content-->
35 - <div id="step_content_configuration" class="step"> 35 + <div id="step_content_<?php echo $step_name; ?>" class="step">
36 <h3>Server Settings</h3> 36 <h3>Server Settings</h3>
37 37
38 <p class="description"> 38 <p class="description">
setup/wizard/templates/configuration_confirm.tpl
1 -<form id="dependencies_configuration_services" action="index.php?step_name=configuration" method="post"> 1 +<form id="dependencies_configuration_services" action="index.php?step_name=<?php echo $step_name; ?>" method="post">
2 <p class="title">System Configuration</p> 2 <p class="title">System Configuration</p>
3 <!--Continue Message--> 3 <!--Continue Message-->
4 <?php 4 <?php
@@ -26,7 +26,7 @@ @@ -26,7 +26,7 @@
26 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://wiki.knowledgetree.com/Web_Based_Installer#System_Configuration" target="_blank">Click here for help on overcoming configuration issues</a> 26 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://wiki.knowledgetree.com/Web_Based_Installer#System_Configuration" target="_blank">Click here for help on overcoming configuration issues</a>
27 <?php } ?> 27 <?php } ?>
28 <!--Content--> 28 <!--Content-->
29 - <div id="step_content_configuration" class="step"> 29 + <div id="step_content_<?php echo $step_name; ?>" class="step">
30 <h3>Server Settings</h3> 30 <h3>Server Settings</h3>
31 <table> 31 <table>
32 <tr> 32 <tr>
setup/wizard/templates/database.tpl
@@ -15,7 +15,7 @@ @@ -15,7 +15,7 @@
15 This step configures the connection to the database server and installs the database. The details for an administrative <br/> 15 This step configures the connection to the database server and installs the database. The details for an administrative <br/>
16 user on the database server are required in order to be able to configure and install the installation database. 16 user on the database server are required in order to be able to configure and install the installation database.
17 </div> 17 </div>
18 - <div id="step_content_database" class="step"> 18 + <div id="step_content_<?php echo $step_name; ?>" class="step">
19 19
20 <table class="dbconf"> 20 <table class="dbconf">
21 <?php 21 <?php
setup/wizard/templates/database_confirm.tpl
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
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 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>
6 </div> 6 </div>
7 - <div id="step_content_database_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>
9 <table class="dbconf"> 9 <table class="dbconf">
10 <?php 10 <?php
setup/wizard/templates/dependencies.tpl
1 -<form id="license_dependencies_configuration" action="index.php?step_name=dependencies" method="post"> 1 +<form id="license_dependencies_configuration" action="index.php?step_name=<?php echo $step_name; ?>" method="post">
2 <p class="title">Checking PHP Dependencies</p> 2 <p class="title">Checking PHP Dependencies</p>
3 <p class="description"> 3 <p class="description">
4 The wizard will review your system to determine whether you have the right PHP components in place to run KnowledgeTree. <br/> 4 The wizard will review your system to determine whether you have the right PHP components in place to run KnowledgeTree. <br/>
@@ -29,7 +29,7 @@ @@ -29,7 +29,7 @@
29 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://wiki.knowledgetree.com/Web_Based_Installer#PHP_Dependencies" target="_blank" class="description_click">Click here for help on overcoming dependency issues</span></a> 29 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://wiki.knowledgetree.com/Web_Based_Installer#PHP_Dependencies" target="_blank" class="description_click">Click here for help on overcoming dependency issues</span></a>
30 <?php } ?> 30 <?php } ?>
31 <!--Content--> 31 <!--Content-->
32 - <div id="step_content_dependencies" class="step"> 32 + <div id="step_content_<?php echo $step_name; ?>" class="step">
33 <h3><?php echo "<span class='{$php}'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>"; ?>PHP Version Check</h3> 33 <h3><?php echo "<span class='{$php}'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>"; ?>PHP Version Check</h3>
34 <?php if($silent) { ?> 34 <?php if($silent) { ?>
35 <?php if($versionSection) { 35 <?php if($versionSection) {
setup/wizard/templates/install.tpl
1 -<form id="registration_install_complete" action="index.php?step_name=install" method="post"> 1 +<form id="registration_install_complete" action="index.php?step_name=<?php echo $step_name; ?>" method="post">
2 <p class="title">Finalizing System Installation</p> 2 <p class="title">Finalizing System Installation</p>
3 3
4 - <div id="step_content" class="step"> 4 + <div id="step_content_<?php echo $step_name; ?>" class="step">
5 <br/> 5 <br/>
6 <br/> 6 <br/>
7 <p class="empty_space"> 7 <p class="empty_space">
setup/wizard/templates/installtype.tpl
1 -<form id="registration_install_complete" action="index.php?step_name=installtype" method="post"> 1 +<form id="registration_install_complete" action="index.php?step_name=<?php echo $step_name; ?>" method="post">
2 <p class="title">Installation Type</p> 2 <p class="title">Installation Type</p>
3 3
4 <div id="step_content" class="step"> 4 <div id="step_content" class="step">
5 <br/> 5 <br/>
6 - <br/>  
7 - <p class="empty_space">  
8 - The wizard will require you choose between an upgrade of an existing sytem or a clean install.  
9 - </p>  
10 - <div class="demo"><?php echo $html->image('kt_browse.png'); ?></div> 6 + The wizard will require you choose an installation type.
  7 + <br/><br/>
  8 + <table>
  9 + <tr>
  10 + <td> <input type="radio" name="installtype" value="Clean Install" checked id="clean" /> </td>
  11 + <td> <label for="clean"><b>Clean Install</b> - New Installation of KnowledgeTree</label> </td>
  12 + </tr>
  13 + <tr>
  14 + <td> <input type="radio" name="installtype" value="Upgrade Installation" id="migrate" /> </td>
  15 + <td> <label for="migrate"><b>Upgrade Installation</b> - Upgrade an existing Installation of KnowledgeTree</label> </td>
  16 + </tr>
  17 + <tr>
  18 + <td> <input type="radio" name="installtype" value="Upgrade Only" id="upgrade" /> </td>
  19 + <td> <label for="upgrade"><b>Source Only Upgrade</b> - Manually Update Source and Upgrade Database only</label> </td>
  20 + </tr>
  21 + </table>
11 </div> 22 </div>
12 <input type="submit" name="Previous" value="Previous" class="button_previous"/> 23 <input type="submit" name="Previous" value="Previous" class="button_previous"/>
13 - <input type="submit" name="Next" value="Clean Install" class="button_next"/>  
14 - <input type="submit" name="Migrate" value="Upgrade Install" class="button_next"/> 24 + <input type="submit" name="Next" value="Next" class="button_next" />
15 </form> 25 </form>
  26 +<script type="text/javascript">
  27 + function clear() {
  28 +
  29 + }
  30 +</script>
16 <?php if (AJAX) { echo $html->js('form.js'); } ?> 31 <?php if (AJAX) { echo $html->js('form.js'); } ?>
17 \ No newline at end of file 32 \ No newline at end of file
setup/wizard/templates/registration.tpl
@@ -20,7 +20,7 @@ @@ -20,7 +20,7 @@
20 and services. Please see our <a href="http://www.knowledgetree.com/about/legal" target="_blank">Privacy and Data Retention policies</a> for more information. 20 and services. Please see our <a href="http://www.knowledgetree.com/about/legal" target="_blank">Privacy and Data Retention policies</a> for more information.
21 </p> 21 </p>
22 <br/> 22 <br/>
23 - <div id="step_content_registration" class="step"> 23 + <div id="step_content_<?php echo $step_name; ?>" class="step">
24 <span class="error" id="reg_error"></span> 24 <span class="error" id="reg_error"></span>
25 <?php if(WINDOWS_OS) $input_width = 40; else { $input_width = 32; } ?> 25 <?php if(WINDOWS_OS) $input_width = 40; else { $input_width = 32; } ?>
26 <table> 26 <table>
setup/wizard/templates/registration_confirm.tpl
1 <form id="database_registration_install" action="index.php?step_name=install" method="post"> 1 <form id="database_registration_install" action="index.php?step_name=install" method="post">
2 <p class="title">Thank you for registering</p> 2 <p class="title">Thank you for registering</p>
3 - <div id="step_content_registration_confirm" class="step"> 3 + <div id="step_content_<?php echo $step_name; ?>_confirm" class="step">
4 <br/> 4 <br/>
5 <br/> 5 <br/>
6 <p class="empty_space"> 6 <p class="empty_space">
setup/wizard/templates/services.tpl
1 <?php if (AJAX) { ?> 1 <?php if (AJAX) { ?>
2 - <form id="configuration_services_database" action="index.php?step_name=services" method="post" id="services"> 2 + <form id="configuration_services_database" action="index.php?step_name=<?php echo $step_name; ?>" method="post" id="services">
3 <?php } else { ?> 3 <?php } else { ?>
4 - <form action="index.php?step_name=services" method="post" id="services"> 4 + <form action="index.php?step_name=<?php echo $step_name; ?>" method="post" id="_<?php echo $step_name; ?>">
5 <?php } ?> 5 <?php } ?>
6 6
7 <p class="title">Checking Service Dependencies</p> 7 <p class="title">Checking Service Dependencies</p>
setup/wizard/templates/welcome.tpl
1 -<form id="welcome_license" action="index.php?step_name=welcome" method="post"> 1 +<form id="welcome_license" action="index.php?step_name=<?php echo $step_name; ?>" method="post">
2 <p class="title">Welcome to KnowledgeTree</p> 2 <p class="title">Welcome to KnowledgeTree</p>
3 <div id="step_content" class="step"> 3 <div id="step_content" class="step">
4 <br/> 4 <br/>
templates/kt3/fieldsets/simple.smarty
@@ -8,8 +8,17 @@ @@ -8,8 +8,17 @@
8 {foreach item=aFieldPair from=$fieldset_values name=fields} 8 {foreach item=aFieldPair from=$fieldset_values name=fields}
9 <tr class="{cycle values=even,odd} {if $smarty.foreach.fields.first}first{/if}"> 9 <tr class="{cycle values=even,odd} {if $smarty.foreach.fields.first}first{/if}">
10 <th>{$aFieldPair.field->getName()}</th> 10 <th>{$aFieldPair.field->getName()}</th>
11 - <td>{if ($aFieldPair.value !== null)}{$aFieldPair.value|sanitize}  
12 - {else}<span class="descriptiveText">{i18n}no value{/i18n}</span>{/if}</td> 11 + <td>
  12 + {if ($aFieldPair.value !== null)}
  13 + {if ($aFieldPair.field->getIsHTML())}
  14 + {$aFieldPair.value}
  15 + {else}
  16 + {$aFieldPair.value|sanitize}
  17 + {/if}
  18 + {else}
  19 + <span class="descriptiveText">{i18n}no value{/i18n}</span>
  20 + {/if}
  21 + </td>
13 </tr> 22 </tr>
14 {/foreach} 23 {/foreach}
15 </table> 24 </table>
templates/ktcore/forms/widgets/textarea.smarty
1 <!-------------------------------------- 1 <!--------------------------------------
2 ---- Changes for Custom Fields ----- 2 ---- Changes for Custom Fields -----
3 - --------------------------------------> 3 + ------------------------------------
  4 + Bold, italics, underline, hyperlink and colour.
  5 +Lists, ordered and unordered (<ul>, <ol>, <li>).
  6 +Paragraph and break tags.
  7 + -->
4 {if $options.field->getIsHTML()} 8 {if $options.field->getIsHTML()}
5 {literal} 9 {literal}
6 <script type="text/javascript" src="/thirdpartyjs/tinymce/jscripts/tiny_mce/tiny_mce.js"></script> 10 <script type="text/javascript" src="/thirdpartyjs/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
@@ -15,10 +19,8 @@ theme : &quot;advanced&quot;, @@ -15,10 +19,8 @@ theme : &quot;advanced&quot;,
15 plugins : "safari,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,imagemanager,filemanager", 19 plugins : "safari,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,imagemanager,filemanager",
16 20
17 // Theme options 21 // Theme options
18 -theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",  
19 -theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",  
20 -theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",  
21 -theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,spellchecker,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak,|,insertfile,insertimage", 22 +theme_advanced_buttons1 : "bold,italic,underline,|,forecolor,backcolor,|,bullist,numlist,|,link,unlink,anchor,|,pagebreak,|,insertdate,inserttime,preview,help",
  23 +theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,undo,redo,|,cleanup,removeformat,print,fullscreen,spellchecker",
22 theme_advanced_toolbar_location : "top", 24 theme_advanced_toolbar_location : "top",
23 theme_advanced_toolbar_align : "left", 25 theme_advanced_toolbar_align : "left",
24 theme_advanced_statusbar_location : "bottom", 26 theme_advanced_statusbar_location : "bottom",
templates/ktcore/search2/adv_query_builder.smarty
@@ -382,6 +382,7 @@ function createText(groupid, fid, type) @@ -382,6 +382,7 @@ function createText(groupid, fid, type)
382 html += "<option value=\"is not\">{/literal}{i18n}is not{/i18n}{literal}"; 382 html += "<option value=\"is not\">{/literal}{i18n}is not{/i18n}{literal}";
383 break; 383 break;
384 case 'STRING': 384 case 'STRING':
  385 + case 'LARGE TEXT':
385 html += "<option value=\"is\">{/literal}{i18n}is{/i18n}{literal}"; 386 html += "<option value=\"is\">{/literal}{i18n}is{/i18n}{literal}";
386 html += "<option value=\"is not\">{/literal}{i18n}is not{/i18n}{literal}"; 387 html += "<option value=\"is not\">{/literal}{i18n}is not{/i18n}{literal}";
387 html += "<option value=\"contains\">{/literal}{i18n}contains{/i18n}{literal}"; 388 html += "<option value=\"contains\">{/literal}{i18n}contains{/i18n}{literal}";
@@ -449,7 +450,7 @@ function addFieldTypeSelection(groupid, fid, type, options) @@ -449,7 +450,7 @@ function addFieldTypeSelection(groupid, fid, type, options)
449 } 450 }
450 // want to fall through 451 // want to fall through
451 case 'FULLTEXT': 452 case 'FULLTEXT':
452 - 453 + case 'LARGE TEXT':
453 case 'STRINGMATCH': 454 case 'STRINGMATCH':
454 html = createText(groupid, fid, type); 455 html = createText(groupid, fid, type);
455 break; 456 break;