Commit 6fd959d61cce7a3476b28b0157087c9182f48a67

Authored by Jarrett Jordaan
2 parents b85c5254 3ab26ce1

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

kthelp/ktcore/EN/welcome.html
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 </head> 4 </head>
5 <body> 5 <body>
6 <p class="descriptiveText"><b>#APP_NAME# is Document Management Made Simple.</b></p><br> 6 <p class="descriptiveText"><b>#APP_NAME# is Document Management Made Simple.</b></p><br>
7 -<a href="http://www.youtube.com/watch?v=adTzHbk3SLU" target="_blank"><img src="resources/graphics/video_dashlet.png" border="0" align="right" /></a> 7 +<a href="http://www.knowledgetree.com/video/gettingstarted" target="_blank"><img src="resources/graphics/video_dashlet.png" border="0" align="right" /></a>
8 <p class="descriptiveText">Easily and securely 8 <p class="descriptiveText">Easily and securely
9 manage your company's document creation, editing, versioning, and sharing - all from 9 manage your company's document creation, editing, versioning, and sharing - all from
10 a powerful Web interface and Microsoft&#0174 Office&#0174 and Windows&#0174 Explorer&#0174 tools.</p> 10 a powerful Web interface and Microsoft&#0174 Office&#0174 and Windows&#0174 Explorer&#0174 tools.</p>
kthelp/ktcore/EN/welcomeCommercial.html
@@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
5 <body> 5 <body>
6 <p class="descriptiveText"><b>#APP_NAME# is Document Management Made Simple.</b></p> <br> 6 <p class="descriptiveText"><b>#APP_NAME# is Document Management Made Simple.</b></p> <br>
7 7
8 -<a href="http://www.youtube.com/watch?v=adTzHbk3SLU" target="_blank"><img src="resources/graphics/video_dashlet.png" border="0" align="right" /></a> 8 +<a href="http://www.knowledgetree.com/video/gettingstarted" target="_blank"><img src="resources/graphics/video_dashlet.png" border="0" align="right" /></a>
9 <p class="descriptiveText">Easily and securely manage your company's document creation, editing, versioning, and sharing - all from a powerful Web interface and Microsoft&#0174 Office and Windows&#0174 Explorer tools.</p> <br> 9 <p class="descriptiveText">Easily and securely manage your company's document creation, editing, versioning, and sharing - all from a powerful Web interface and Microsoft&#0174 Office and Windows&#0174 Explorer tools.</p> <br>
10 10
11 <p class="descriptiveText">A subscription to #APP_NAME# provides your organization with product updates, enhanced document management features, and commercial support. Please view your welcome mailer for information on accessing these services.</p> <br> 11 <p class="descriptiveText">A subscription to #APP_NAME# provides your organization with product updates, enhanced document management features, and commercial support. Please view your welcome mailer for information on accessing these services.</p> <br>
plugins/ktstandard/documentpreview/documentPreview.php
@@ -176,7 +176,11 @@ class DocumentPreview { @@ -176,7 +176,11 @@ class DocumentPreview {
176 176
177 $sInfo = $this->getMetadata(); 177 $sInfo = $this->getMetadata();
178 178
179 - return '<div id="preview" class="preview" onclick="javascript: destroyPanel();">'.$sInfo.'</div>'; 179 + $sInfo = '<div id="preview" class="preview" onclick="javascript: destroyPanel();">'.$sInfo.'</div>';
  180 +
  181 + $sInfo .= $this->getThumbnail();
  182 +
  183 + return $sInfo;
180 } 184 }
181 185
182 /** 186 /**
@@ -280,8 +284,6 @@ class DocumentPreview { @@ -280,8 +284,6 @@ class DocumentPreview {
280 $sInfo .= "<tr><td>{$sIdLb}</td><td><b>{$sId}</b></td></tr>"; 284 $sInfo .= "<tr><td>{$sIdLb}</td><td><b>{$sId}</b></td></tr>";
281 $sInfo .= " </table></div>"; 285 $sInfo .= " </table></div>";
282 286
283 - $sInfo .= $this->getThumbnail();  
284 -  
285 return $sInfo; 287 return $sInfo;
286 } 288 }
287 289
search2/indexing/extractors/OpenXmlTextExtractor.inc.php
@@ -219,6 +219,9 @@ class OpenXmlTextExtractor extends ExternalDocumentExtractor @@ -219,6 +219,9 @@ class OpenXmlTextExtractor extends ExternalDocumentExtractor
219 } 219 }
220 $filename = str_replace('\\','/',$filename); 220 $filename = str_replace('\\','/',$filename);
221 221
  222 + /*
  223 + // Removing the unzip command as the whole document gets unzipped at the start
  224 +
222 $cmd = '"' .$this->unzip . '"' . ' ' . str_replace( 225 $cmd = '"' .$this->unzip . '"' . ' ' . str_replace(
223 array('{source}','{part}', '{target_dir}'), 226 array('{source}','{part}', '{target_dir}'),
224 array($this->sourcefile, $filename,$this->openxml_dir), $this->unzip_params); 227 array($this->sourcefile, $filename,$this->openxml_dir), $this->unzip_params);
@@ -228,6 +231,7 @@ class OpenXmlTextExtractor extends ExternalDocumentExtractor @@ -228,6 +231,7 @@ class OpenXmlTextExtractor extends ExternalDocumentExtractor
228 $this->output = _kt('Failed to execute command: ') . $cmd; 231 $this->output = _kt('Failed to execute command: ') . $cmd;
229 return false; 232 return false;
230 } 233 }
  234 + */
231 235
232 $filename = $this->openxml_dir . "/$filename"; 236 $filename = $this->openxml_dir . "/$filename";
233 if (!file_exists($filename)) 237 if (!file_exists($filename))
setup/wizard/installUtil.php
@@ -1061,9 +1061,6 @@ class InstallUtil { @@ -1061,9 +1061,6 @@ class InstallUtil {
1061 1061
1062 // {{{ copyDirectory 1062 // {{{ copyDirectory
1063 function copyDirectory($sSrc, $sDst, $bMove = false) { 1063 function copyDirectory($sSrc, $sDst, $bMove = false) {
1064 - if (file_exists($sDst)) {  
1065 - return false; //PEAR::raiseError(_kt("Destination directory already exists."));  
1066 - }  
1067 if (!WINDOWS_OS) { 1064 if (!WINDOWS_OS) {
1068 if ($bMove && file_exists('/bin/mv')) { 1065 if ($bMove && file_exists('/bin/mv')) {
1069 $this->pexec(array('/bin/mv', $sSrc, $sDst)); 1066 $this->pexec(array('/bin/mv', $sSrc, $sDst));
@@ -1081,15 +1078,13 @@ class InstallUtil { @@ -1081,15 +1078,13 @@ class InstallUtil {
1081 if ($hSrc === false) { 1078 if ($hSrc === false) {
1082 return false; //PEAR::raiseError(sprintf(_kt("Could not open source directory: %s"), $sSrc)); 1079 return false; //PEAR::raiseError(sprintf(_kt("Could not open source directory: %s"), $sSrc));
1083 } 1080 }
1084 - if (@mkdir($sDst, 0777) === false) {  
1085 - return false; //PEAR::raiseError(sprintf(_kt("Could not create destination directory: %s"), $sDst));  
1086 - } 1081 + @mkdir($sDst, 0777);
1087 while (($sFilename = readdir($hSrc)) !== false) { 1082 while (($sFilename = readdir($hSrc)) !== false) {
1088 if (in_array($sFilename, array('.', '..'))) { 1083 if (in_array($sFilename, array('.', '..'))) {
1089 continue; 1084 continue;
1090 } 1085 }
1091 - $sOldFile = sprintf("%s/%s", $sSrc, $sFilename);  
1092 - $sNewFile = sprintf("%s/%s", $sDst, $sFilename); 1086 + $sOldFile = sprintf("%s" . DS . "%s", $sSrc, $sFilename);
  1087 + $sNewFile = sprintf("%s" . DS . "%s", $sDst, $sFilename);
1093 if (is_dir($sOldFile)) { 1088 if (is_dir($sOldFile)) {
1094 $this->copyDirectory($sOldFile, $sNewFile, $bMove); 1089 $this->copyDirectory($sOldFile, $sNewFile, $bMove);
1095 continue; 1090 continue;
setup/wizard/resources/css/wizard.css
@@ -64,7 +64,7 @@ select { @@ -64,7 +64,7 @@ select {
64 /* *** Layout Styles *** */ 64 /* *** Layout Styles *** */
65 65
66 #wrapper { 66 #wrapper {
67 - background: white; min-height:410px; 67 + background: white; min-height:500px;
68 } 68 }
69 69
70 #outer-wrapper { 70 #outer-wrapper {
@@ -87,12 +87,12 @@ select { @@ -87,12 +87,12 @@ select {
87 #container { 87 #container {
88 background: white url("../graphics/left.png") repeat-y left; 88 background: white url("../graphics/left.png") repeat-y left;
89 overflow:auto; 89 overflow:auto;
90 - /*min-height:630px;height:410px;*/min-height:410px; 90 + /*min-height:630px;height:410px;*/min-height:500px;
91 } 91 }
92 92
93 #content { 93 #content {
94 margin-left: 220px; 94 margin-left: 220px;
95 - /*height:515px;*/height:400px; 95 + /*height:515px;*/height:500px;
96 } 96 }
97 97
98 #content_container { 98 #content_container {
setup/wizard/steps/install.php
@@ -104,6 +104,14 @@ class install extends step @@ -104,6 +104,14 @@ class install extends step
104 public function installStep() 104 public function installStep()
105 { 105 {
106 $this->callHome(); 106 $this->callHome();
  107 + // copy indexing directory if this is a migration
  108 + $this->setDataFromSession();
  109 + if ($this->util->isMigration()) {
  110 + $migrateSessionData = $this->getDataFromPackage('migrate', 'installation');
  111 + $src = $migrateSessionData['location'] . DS . 'var' . DS . 'indexes';
  112 + $dst = SYSTEM_DIR . 'var' . DS . 'indexes';
  113 + $this->util->copyDirectory($src, $dst);
  114 + }
107 } 115 }
108 116
109 /** 117 /**
var/cache/.empty deleted
webservice/clienttools/ajaxhandler.php
@@ -94,8 +94,8 @@ class ajaxHandler{ @@ -94,8 +94,8 @@ class ajaxHandler{
94 94
95 95
96 //TODO: Get rid of this service 96 //TODO: Get rid of this service
97 - $this->loadService('auth');  
98 - $this->authenticator=new auth($this,$this->ret,$this->kt,$this->request,$this->auth); 97 +// $this->loadService('auth');
  98 +// $this->authenticator=new auth($this,$this->ret,$this->kt,$this->request,$this->auth);
99 99
100 100
101 101
@@ -273,6 +273,9 @@ class ajaxHandler{ @@ -273,6 +273,9 @@ class ajaxHandler{
273 273
274 $kt=$this->kt; 274 $kt=$this->kt;
275 275
  276 + /*
  277 + * User Check
  278 + */
276 $o_user=$kt->get_user_object_by_username($user); 279 $o_user=$kt->get_user_object_by_username($user);
277 280
278 if(PEAR::isError($o_user)){ 281 if(PEAR::isError($o_user)){
@@ -281,6 +284,33 @@ class ajaxHandler{ @@ -281,6 +284,33 @@ class ajaxHandler{
281 return false; 284 return false;
282 } 285 }
283 286
  287 + /*
  288 + * BAOBAB Licence Check
  289 + */
  290 + if ($user != 'admin') {
  291 + try{
  292 + if(class_exists('BaobabKeyUtil')){
  293 + if (!BaobabKeyUtil::checkIfLicensed(true)) {
  294 + $this->ret->setResponse(array('authenticated'=> false, 'message'=> 'license_expired'));
  295 + $this->ret->addError('Licence Expired');
  296 + return false;
  297 + }
  298 + }else{
  299 + $this->ret->addError('Licence Utility could not be loaded. Appears to be a Community version.');
  300 + $this->ret->setResponse(array('authenticated'=> false, 'message'=> 'Licence Utility could not be loaded. Appears to be a Community version.'));
  301 + return false;
  302 + }
  303 + }catch(Exception $e){
  304 + $this->ret->addError('could not execute BaobabKeyUtil::checkIfLicensed');
  305 + $this->ret->setResponse(array('authenticated'=> false, 'message'=> 'BaobabKeyUtil::checkIfLicensed error'));
  306 + return;
  307 + }
  308 + }
  309 +
  310 +
  311 + /*
  312 + * Password Check
  313 + */
284 try{ 314 try{
285 $l_pass=$o_user->getPassword(); 315 $l_pass=$o_user->getPassword();
286 $l_passHash=md5($l_pass.$this->auth['token']); 316 $l_passHash=md5($l_pass.$this->auth['token']);