Commit a52131c9006e861093a5e3514fce70e1a4967048

Authored by kevin_fourie
1 parent f1d87be2

Merged in whitespace and comments from DEV trunk.

git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/STABLE/trunk@7928 c91229c3-7414-0410-bfa2-8a42b809f60b
bin/win32/installScheduler.php
1 <?php 1 <?php
2 2
  3 +/**
  4 + * $Id: $
  5 + *
  6 + * KnowledgeTree Open Source Edition
  7 + * Document Management Made Simple
  8 + * Copyright (C) 2004 - 2007 The Jam Warehouse Software (Pty) Limited
  9 + *
  10 + * This program is free software; you can redistribute it and/or modify it under
  11 + * the terms of the GNU General Public License version 3 as published by the
  12 + * Free Software Foundation.
  13 + *
  14 + * This program is distributed in the hope that it will be useful, but WITHOUT
  15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  16 + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  17 + * details.
  18 + *
  19 + * You should have received a copy of the GNU General Public License
  20 + * along with this program. If not, see <http://www.gnu.org/licenses/>.
  21 + *
  22 + * You can contact The Jam Warehouse Software (Pty) Limited, Unit 1, Tramber Place,
  23 + * Blake Street, Observatory, 7925 South Africa. or email info@knowledgetree.com.
  24 + *
  25 + * The interactive user interfaces in modified source and object code versions
  26 + * of this program must display Appropriate Legal Notices, as required under
  27 + * Section 5 of the GNU General Public License version 3.
  28 + *
  29 + * In accordance with Section 7(b) of the GNU General Public License version 3,
  30 + * these Appropriate Legal Notices must retain the display of the "Powered by
  31 + * KnowledgeTree" logo and retain the original copyright notice. If the display of the
  32 + * logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices
  33 + * must display the words "Powered by KnowledgeTree" and retain the original
  34 + * copyright notice.
  35 + * Contributor( s): ______________________________________
  36 + *
  37 + */
  38 +
3 $scriptPath = realpath(dirname(__FILE__) . '/taskrunner.bat'); 39 $scriptPath = realpath(dirname(__FILE__) . '/taskrunner.bat');
4 40
5 win32_create_service(array( 41 win32_create_service(array(
bin/win32/schedulerServiceStatus.php
1 <?php 1 <?php
2 2
  3 +/**
  4 + * $Id: $
  5 + *
  6 + * KnowledgeTree Open Source Edition
  7 + * Document Management Made Simple
  8 + * Copyright (C) 2004 - 2007 The Jam Warehouse Software (Pty) Limited
  9 + *
  10 + * This program is free software; you can redistribute it and/or modify it under
  11 + * the terms of the GNU General Public License version 3 as published by the
  12 + * Free Software Foundation.
  13 + *
  14 + * This program is distributed in the hope that it will be useful, but WITHOUT
  15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  16 + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  17 + * details.
  18 + *
  19 + * You should have received a copy of the GNU General Public License
  20 + * along with this program. If not, see <http://www.gnu.org/licenses/>.
  21 + *
  22 + * You can contact The Jam Warehouse Software (Pty) Limited, Unit 1, Tramber Place,
  23 + * Blake Street, Observatory, 7925 South Africa. or email info@knowledgetree.com.
  24 + *
  25 + * The interactive user interfaces in modified source and object code versions
  26 + * of this program must display Appropriate Legal Notices, as required under
  27 + * Section 5 of the GNU General Public License version 3.
  28 + *
  29 + * In accordance with Section 7(b) of the GNU General Public License version 3,
  30 + * these Appropriate Legal Notices must retain the display of the "Powered by
  31 + * KnowledgeTree" logo and retain the original copyright notice. If the display of the
  32 + * logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices
  33 + * must display the words "Powered by KnowledgeTree" and retain the original
  34 + * copyright notice.
  35 + * Contributor( s): ______________________________________
  36 + *
  37 + */
  38 +
3 var_dump(win32_query_service_status('ktscheduler')); 39 var_dump(win32_query_service_status('ktscheduler'));
4 40
5 ?> 41 ?>
bin/win32/uninstallScheduler.php
1 <?php 1 <?php
2 2
  3 +/**
  4 + * $Id: $
  5 + *
  6 + * KnowledgeTree Open Source Edition
  7 + * Document Management Made Simple
  8 + * Copyright (C) 2004 - 2007 The Jam Warehouse Software (Pty) Limited
  9 + *
  10 + * This program is free software; you can redistribute it and/or modify it under
  11 + * the terms of the GNU General Public License version 3 as published by the
  12 + * Free Software Foundation.
  13 + *
  14 + * This program is distributed in the hope that it will be useful, but WITHOUT
  15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  16 + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  17 + * details.
  18 + *
  19 + * You should have received a copy of the GNU General Public License
  20 + * along with this program. If not, see <http://www.gnu.org/licenses/>.
  21 + *
  22 + * You can contact The Jam Warehouse Software (Pty) Limited, Unit 1, Tramber Place,
  23 + * Blake Street, Observatory, 7925 South Africa. or email info@knowledgetree.com.
  24 + *
  25 + * The interactive user interfaces in modified source and object code versions
  26 + * of this program must display Appropriate Legal Notices, as required under
  27 + * Section 5 of the GNU General Public License version 3.
  28 + *
  29 + * In accordance with Section 7(b) of the GNU General Public License version 3,
  30 + * these Appropriate Legal Notices must retain the display of the "Powered by
  31 + * KnowledgeTree" logo and retain the original copyright notice. If the display of the
  32 + * logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices
  33 + * must display the words "Powered by KnowledgeTree" and retain the original
  34 + * copyright notice.
  35 + * Contributor( s): ______________________________________
  36 + *
  37 + */
  38 +
3 win32_delete_service('ktscheduler'); 39 win32_delete_service('ktscheduler');
4 40
5 ?> 41 ?>
6 \ No newline at end of file 42 \ No newline at end of file
ktwebservice/download_cleanup.php
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 2
3 /** 3 /**
4 * 4 *
5 - * $Id:$ 5 + * $Id$
6 * 6 *
7 * Cleans up the download_files table. 7 * Cleans up the download_files table.
8 * 8 *
ktwebservice/index.php
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 2
3 /** 3 /**
4 * 4 *
5 - * $Id:$ 5 + * $Id$
6 * 6 *
7 * A wrapper for webservice.php 7 * A wrapper for webservice.php
8 * 8 *
ktwebservice/upload_cleanup.php
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 2
3 /** 3 /**
4 * 4 *
5 - * $Id:$ 5 + * $Id$
6 * 6 *
7 * Cleans up the uploaded_files table and the upload. 7 * Cleans up the uploaded_files table and the upload.
8 * 8 *
lib/util/ktutil.inc
@@ -303,6 +303,49 @@ class KTUtil { @@ -303,6 +303,49 @@ class KTUtil {
303 } 303 }
304 // }}} 304 // }}}
305 305
  306 +
  307 + // {{{ winexec
  308 + /**
  309 + * Execute a command on a windows platform.
  310 + */
  311 + function winexec($aCmd, $aOptions = null) {
  312 + if (is_array($aCmd)) {
  313 + $sCmd = KTUtil::safeShellString($aCmd);
  314 + } else {
  315 + $sCmd = $aCmd;
  316 + }
  317 + $sAppend = KTUtil::arrayGet($aOptions, 'append');
  318 + if ($sAppend) {
  319 + $sCmd .= " >> " . escapeshellarg($sAppend);
  320 + }
  321 +
  322 + $sCmd = str_replace( '/','\\',$sCmd);
  323 +
  324 + // Set wait to true if the execute must wait for the script to complete before continuing
  325 + $wait = true;
  326 + if(isset($aOptions['exec_wait']) && ($aOptions['exec_wait'] == 'false')){
  327 + $wait = false;
  328 + }
  329 +
  330 + // Iterate through the various execute functions till one works.
  331 + $WshShell = new COM("WScript.Shell");
  332 + $res = $WshShell->Run($sCmd, 0, $wait);
  333 +
  334 + if($res){
  335 + return $res;
  336 + }
  337 +
  338 + $sCmd = "start /b \"kt\" " . $sCmd;
  339 + $fp = popen($sCmd, 'r');
  340 + fclose($fp);
  341 +
  342 + if($wait){
  343 + sleep(1);
  344 + }
  345 + return 1;
  346 + }
  347 + // }}}
  348 +
306 // {{{ copyDirectory 349 // {{{ copyDirectory
307 function copyDirectory($sSrc, $sDst, $bMove = false) { 350 function copyDirectory($sSrc, $sDst, $bMove = false) {
308 if (file_exists($sDst)) { 351 if (file_exists($sDst)) {
plugins/ktcore/folder/addDocument.php
@@ -311,7 +311,7 @@ class KTFolderAddDocumentAction extends KTFolderAction { @@ -311,7 +311,7 @@ class KTFolderAddDocumentAction extends KTFolderAction {
311 ); 311 );
312 312
313 $aFile = $this->oValidator->validateFile($extra_d['file'], $aErrorOptions); 313 $aFile = $this->oValidator->validateFile($extra_d['file'], $aErrorOptions);
314 - $sTitle = sanitizeForSQL($extra_d['document_name']); 314 + $sTitle = $extra_d['document_name'];
315 315
316 $iFolderId = $this->oFolder->getId(); 316 $iFolderId = $this->oFolder->getId();
317 $aOptions = array( 317 $aOptions = array(
plugins/ktstandard/PDFGeneratorAction.php
@@ -2,29 +2,35 @@ @@ -2,29 +2,35 @@
2 /** 2 /**
3 * $Id$ 3 * $Id$
4 * 4 *
5 - * The contents of this file are subject to the KnowledgeTree Public  
6 - * License Version 1.1.2 ("License"); You may not use this file except in  
7 - * compliance with the License. You may obtain a copy of the License at  
8 - * http://www.knowledgetree.com/KPL 5 + * KnowledgeTree Open Source Edition
  6 + * Document Management Made Simple
  7 + * Copyright (C) 2004 - 2007 The Jam Warehouse Software (Pty) Limited
9 * 8 *
10 - * Software distributed under the License is distributed on an "AS IS"  
11 - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.  
12 - * See the License for the specific language governing rights and  
13 - * limitations under the License.  
14 - *  
15 - * All copies of the Covered Code must include on each user interface screen:  
16 - * (i) the "Powered by KnowledgeTree" logo and  
17 - * (ii) the KnowledgeTree copyright notice  
18 - * in the same form as they appear in the distribution. See the License for  
19 - * requirements. 9 + * This program is free software; you can redistribute it and/or modify it under
  10 + * the terms of the GNU General Public License version 3 as published by the
  11 + * Free Software Foundation.
  12 + *
  13 + * This program is distributed in the hope that it will be useful, but WITHOUT
  14 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  15 + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  16 + * details.
  17 + *
  18 + * You should have received a copy of the GNU General Public License
  19 + * along with this program. If not, see <http://www.gnu.org/licenses/>.
  20 + *
  21 + * You can contact The Jam Warehouse Software (Pty) Limited, Unit 1, Tramber Place,
  22 + * Blake Street, Observatory, 7925 South Africa. or email info@knowledgetree.com.
20 * 23 *
21 - * The Original Code is: KnowledgeTree Open Source 24 + * The interactive user interfaces in modified source and object code versions
  25 + * of this program must display Appropriate Legal Notices, as required under
  26 + * Section 5 of the GNU General Public License version 3.
22 * 27 *
23 - * The Initial Developer of the Original Code is The Jam Warehouse Software  
24 - * (Pty) Ltd, trading as KnowledgeTree.  
25 - * Portions created by The Jam Warehouse Software (Pty) Ltd are Copyright  
26 - * (C) 2007 The Jam Warehouse Software (Pty) Ltd;  
27 - * All Rights Reserved. 28 + * In accordance with Section 7(b) of the GNU General Public License version 3,
  29 + * these Appropriate Legal Notices must retain the display of the "Powered by
  30 + * KnowledgeTree" logo and retain the original copyright notice. If the display of the
  31 + * logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices
  32 + * must display the words "Powered by KnowledgeTree" and retain the original
  33 + * copyright notice.
28 * Contributor( s): ______________________________________ 34 * Contributor( s): ______________________________________
29 * 35 *
30 */ 36 */
plugins/ktstandard/admin/manageDisclaimers.php
1 <?php 1 <?php
2 2
3 /** 3 /**
4 - * $Id:$ 4 + * $Id$
5 * 5 *
6 * KnowledgeTree Open Source Edition 6 * KnowledgeTree Open Source Edition
7 * Document Management Made Simple 7 * Document Management Made Simple
plugins/ktstandard/contents/BaseIndexer.php
@@ -5,37 +5,37 @@ @@ -5,37 +5,37 @@
5 * KnowledgeTree Open Source Edition 5 * KnowledgeTree Open Source Edition
6 * Document Management Made Simple 6 * Document Management Made Simple
7 * Copyright (C) 2004 - 2007 The Jam Warehouse Software (Pty) Limited 7 * Copyright (C) 2004 - 2007 The Jam Warehouse Software (Pty) Limited
8 - * 8 + *
9 * This program is free software; you can redistribute it and/or modify it under 9 * This program is free software; you can redistribute it and/or modify it under
10 * the terms of the GNU General Public License version 3 as published by the 10 * the terms of the GNU General Public License version 3 as published by the
11 * Free Software Foundation. 11 * Free Software Foundation.
12 - * 12 + *
13 * This program is distributed in the hope that it will be useful, but WITHOUT 13 * This program is distributed in the hope that it will be useful, but WITHOUT
14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 15 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
16 * details. 16 * details.
17 - * 17 + *
18 * You should have received a copy of the GNU General Public License 18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>. 19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 - * 20 + *
21 * You can contact The Jam Warehouse Software (Pty) Limited, Unit 1, Tramber Place, 21 * You can contact The Jam Warehouse Software (Pty) Limited, Unit 1, Tramber Place,
22 * Blake Street, Observatory, 7925 South Africa. or email info@knowledgetree.com. 22 * Blake Street, Observatory, 7925 South Africa. or email info@knowledgetree.com.
23 - * 23 + *
24 * The interactive user interfaces in modified source and object code versions 24 * The interactive user interfaces in modified source and object code versions
25 * of this program must display Appropriate Legal Notices, as required under 25 * of this program must display Appropriate Legal Notices, as required under
26 * Section 5 of the GNU General Public License version 3. 26 * Section 5 of the GNU General Public License version 3.
27 - * 27 + *
28 * In accordance with Section 7(b) of the GNU General Public License version 3, 28 * In accordance with Section 7(b) of the GNU General Public License version 3,
29 * these Appropriate Legal Notices must retain the display of the "Powered by 29 * these Appropriate Legal Notices must retain the display of the "Powered by
30 - * KnowledgeTree" logo and retain the original copyright notice. If the display of the 30 + * KnowledgeTree" logo and retain the original copyright notice. If the display of the
31 * logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices 31 * logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices
32 - * must display the words "Powered by KnowledgeTree" and retain the original  
33 - * copyright notice. 32 + * must display the words "Powered by KnowledgeTree" and retain the original
  33 + * copyright notice.
34 * Contributor( s): ______________________________________ 34 * Contributor( s): ______________________________________
35 * 35 *
36 */ 36 */
37 37
38 -class KTBaseIndexerTrigger { 38 +class KTBaseIndexerTrigger {
39 /** 39 /**
40 * Which MIME types that this indexer acts upon. 40 * Which MIME types that this indexer acts upon.
41 */ 41 */
@@ -76,8 +76,8 @@ class KTBaseIndexerTrigger { @@ -76,8 +76,8 @@ class KTBaseIndexerTrigger {
76 * If it is false, the temporary file will be sent as the last 76 * If it is false, the temporary file will be sent as the last
77 * parameter. 77 * parameter.
78 */ 78 */
79 - var $use_pipes = true;  
80 - 79 + var $use_pipes = true;
  80 +
81 /* return a diagnostic string _if_ there is something wrong. NULL otherwise. */ 81 /* return a diagnostic string _if_ there is something wrong. NULL otherwise. */
82 function getDiagnostic() { 82 function getDiagnostic() {
83 return null; 83 return null;
@@ -103,9 +103,10 @@ class KTBaseIndexerTrigger { @@ -103,9 +103,10 @@ class KTBaseIndexerTrigger {
103 } 103 }
104 104
105 $oKTConfig =& KTConfig::getSingleton(); 105 $oKTConfig =& KTConfig::getSingleton();
106 - $sBasedir = $oKTConfig->get("urls/tmpDirectory");  
107 - 106 + $sBasedir = $oKTConfig->get("urls/tmpDirectory");
  107 +
108 $myfilename = tempnam($sBasedir, 'kt.' . $tempstub); 108 $myfilename = tempnam($sBasedir, 'kt.' . $tempstub);
  109 +
109 if (OS_WINDOWS) { 110 if (OS_WINDOWS) {
110 $intermediate = tempnam($sBasedir, 'kt.' . $tempstub); 111 $intermediate = tempnam($sBasedir, 'kt.' . $tempstub);
111 if (!@copy($sFile, $intermediate)) { 112 if (!@copy($sFile, $intermediate)) {
@@ -114,9 +115,9 @@ class KTBaseIndexerTrigger { @@ -114,9 +115,9 @@ class KTBaseIndexerTrigger {
114 } else { 115 } else {
115 $intermediate = $sFile; 116 $intermediate = $sFile;
116 } 117 }
117 - 118 +
118 $contents = $this->extract_contents($intermediate, $myfilename); 119 $contents = $this->extract_contents($intermediate, $myfilename);
119 - 120 +
120 @unlink($myfilename); 121 @unlink($myfilename);
121 if (OS_WINDOWS) { @unlink($intermediate); } 122 if (OS_WINDOWS) { @unlink($intermediate); }
122 if (empty($contents)) { 123 if (empty($contents)) {
@@ -127,14 +128,14 @@ class KTBaseIndexerTrigger { @@ -127,14 +128,14 @@ class KTBaseIndexerTrigger {
127 'document_text' => $contents, 128 'document_text' => $contents,
128 ); 129 );
129 $sTable = KTUtil::getTableName('document_text'); 130 $sTable = KTUtil::getTableName('document_text');
130 - 131 +
131 // clean up the document query "stuff". 132 // clean up the document query "stuff".
132 // FIXME this suggests that we should move the _old_ document_searchable_text across to the old-document's id if its a checkin. 133 // FIXME this suggests that we should move the _old_ document_searchable_text across to the old-document's id if its a checkin.
133 DBUtil::runQuery(array('DELETE FROM ' . $sTable . ' WHERE document_id = ?', array($this->oDocument->getId()))); 134 DBUtil::runQuery(array('DELETE FROM ' . $sTable . ' WHERE document_id = ?', array($this->oDocument->getId())));
134 DBUtil::autoInsert($sTable, $aInsertValues, array('noid' => true)); 135 DBUtil::autoInsert($sTable, $aInsertValues, array('noid' => true));
135 136
136 } 137 }
137 - 138 +
138 // handles certain, _very_ simple reader types. 139 // handles certain, _very_ simple reader types.
139 function extract_contents($sFilename, $sTempFilename) { 140 function extract_contents($sFilename, $sTempFilename) {
140 $sCommand = KTUtil::findCommand($this->commandconfig, $this->command); 141 $sCommand = KTUtil::findCommand($this->commandconfig, $this->command);
@@ -145,7 +146,7 @@ class KTBaseIndexerTrigger { @@ -145,7 +146,7 @@ class KTBaseIndexerTrigger {
145 $cmdline = array($sCommand); 146 $cmdline = array($sCommand);
146 $cmdline = kt_array_merge($cmdline, $this->args); 147 $cmdline = kt_array_merge($cmdline, $this->args);
147 $cmdline[] = $sFilename; 148 $cmdline[] = $sFilename;
148 - 149 +
149 $aOptions = array(); 150 $aOptions = array();
150 $aOptions['exec_wait'] = 'true'; 151 $aOptions['exec_wait'] = 'true';
151 if ($this->use_pipes) { 152 if ($this->use_pipes) {
@@ -153,7 +154,12 @@ class KTBaseIndexerTrigger { @@ -153,7 +154,12 @@ class KTBaseIndexerTrigger {
153 } else { 154 } else {
154 $cmdline[] = $sTempFilename; 155 $cmdline[] = $sTempFilename;
155 } 156 }
156 - $aRet = KTUtil::pexec($cmdline, $aOptions); 157 +
  158 + if(OS_WINDOWS){
  159 + $aRet = KTUtil::winexec($cmdline, $aOptions);
  160 + }else{
  161 + $aRet = KTUtil::pexec($cmdline, $aOptions);
  162 + }
157 $this->aCommandOutput = $aRet['out']; 163 $this->aCommandOutput = $aRet['out'];
158 $contents = file_get_contents($sTempFilename); 164 $contents = file_get_contents($sTempFilename);
159 165
plugins/ktstandard/contents/WordIndexer.php
@@ -5,32 +5,32 @@ @@ -5,32 +5,32 @@
5 * KnowledgeTree Open Source Edition 5 * KnowledgeTree Open Source Edition
6 * Document Management Made Simple 6 * Document Management Made Simple
7 * Copyright (C) 2004 - 2007 The Jam Warehouse Software (Pty) Limited 7 * Copyright (C) 2004 - 2007 The Jam Warehouse Software (Pty) Limited
8 - * 8 + *
9 * This program is free software; you can redistribute it and/or modify it under 9 * This program is free software; you can redistribute it and/or modify it under
10 * the terms of the GNU General Public License version 3 as published by the 10 * the terms of the GNU General Public License version 3 as published by the
11 * Free Software Foundation. 11 * Free Software Foundation.
12 - * 12 + *
13 * This program is distributed in the hope that it will be useful, but WITHOUT 13 * This program is distributed in the hope that it will be useful, but WITHOUT
14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 15 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
16 * details. 16 * details.
17 - * 17 + *
18 * You should have received a copy of the GNU General Public License 18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>. 19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 - * 20 + *
21 * You can contact The Jam Warehouse Software (Pty) Limited, Unit 1, Tramber Place, 21 * You can contact The Jam Warehouse Software (Pty) Limited, Unit 1, Tramber Place,
22 * Blake Street, Observatory, 7925 South Africa. or email info@knowledgetree.com. 22 * Blake Street, Observatory, 7925 South Africa. or email info@knowledgetree.com.
23 - * 23 + *
24 * The interactive user interfaces in modified source and object code versions 24 * The interactive user interfaces in modified source and object code versions
25 * of this program must display Appropriate Legal Notices, as required under 25 * of this program must display Appropriate Legal Notices, as required under
26 * Section 5 of the GNU General Public License version 3. 26 * Section 5 of the GNU General Public License version 3.
27 - * 27 + *
28 * In accordance with Section 7(b) of the GNU General Public License version 3, 28 * In accordance with Section 7(b) of the GNU General Public License version 3,
29 * these Appropriate Legal Notices must retain the display of the "Powered by 29 * these Appropriate Legal Notices must retain the display of the "Powered by
30 - * KnowledgeTree" logo and retain the original copyright notice. If the display of the 30 + * KnowledgeTree" logo and retain the original copyright notice. If the display of the
31 * logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices 31 * logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices
32 - * must display the words "Powered by KnowledgeTree" and retain the original  
33 - * copyright notice. 32 + * must display the words "Powered by KnowledgeTree" and retain the original
  33 + * copyright notice.
34 * Contributor( s): ______________________________________ 34 * Contributor( s): ______________________________________
35 * 35 *
36 */ 36 */
@@ -45,62 +45,64 @@ class KTWordIndexerTrigger extends KTBaseIndexerTrigger { @@ -45,62 +45,64 @@ class KTWordIndexerTrigger extends KTBaseIndexerTrigger {
45 var $commandconfig = 'indexer/catdoc'; // could be any application. 45 var $commandconfig = 'indexer/catdoc'; // could be any application.
46 var $args = array("-w", "-d", "UTF-8"); 46 var $args = array("-w", "-d", "UTF-8");
47 var $use_pipes = true; 47 var $use_pipes = true;
48 - 48 +
49 function extract_contents($sFilename, $sTempFilename) { 49 function extract_contents($sFilename, $sTempFilename) {
50 - if (OS_WINDOWS) { 50 + if (OS_WINDOWS) {
51 $this->command = 'c:\antiword\antiword.exe'; 51 $this->command = 'c:\antiword\antiword.exe';
52 $this->commandconfig = 'indexer/antiword'; 52 $this->commandconfig = 'indexer/antiword';
53 $this->args = array(); 53 $this->args = array();
54 } 54 }
55 putenv('LANG=en_US.UTF-8'); 55 putenv('LANG=en_US.UTF-8');
56 - 56 +
57 $sCommand = KTUtil::findCommand($this->commandconfig, $this->command); 57 $sCommand = KTUtil::findCommand($this->commandconfig, $this->command);
58 if (empty($sCommand)) { 58 if (empty($sCommand)) {
59 return false; 59 return false;
60 } 60 }
61 -  
62 - if (OS_WINDOWS) { 61 +
  62 + if (OS_WINDOWS) {
63 $sDir = dirname(dirname($sCommand)); 63 $sDir = dirname(dirname($sCommand));
64 - putenv('HOME=' . $sDir); 64 + putenv('HOME=' . $sDir);
65 65
  66 + /*
66 $cmdline = array($sCommand); 67 $cmdline = array($sCommand);
67 $cmdline = kt_array_merge($cmdline, $this->args); 68 $cmdline = kt_array_merge($cmdline, $this->args);
68 $cmdline[] = $sFilename; 69 $cmdline[] = $sFilename;
69 - 70 +
70 $sCmd = KTUtil::safeShellString($cmdline); 71 $sCmd = KTUtil::safeShellString($cmdline);
71 $sCmd .= " >> " . escapeshellarg($sTempFilename); 72 $sCmd .= " >> " . escapeshellarg($sTempFilename);
72 - 73 +
73 $sCmd = str_replace( '/','\\',$sCmd); 74 $sCmd = str_replace( '/','\\',$sCmd);
74 - 75 +
75 $sCmd = "start /b \"kt\" " . $sCmd; 76 $sCmd = "start /b \"kt\" " . $sCmd;
76 - 77 +
77 pclose(popen($sCmd, 'r')); 78 pclose(popen($sCmd, 'r'));
78 - 79 +
79 $this->aCommandOutput = 1; 80 $this->aCommandOutput = 1;
80 $contents = file_get_contents($sTempFilename); 81 $contents = file_get_contents($sTempFilename);
81 return $contents; 82 return $contents;
  83 + */
82 } 84 }
83 return parent::extract_contents($sFilename, $sTempFilename); 85 return parent::extract_contents($sFilename, $sTempFilename);
84 } 86 }
85 - 87 +
86 function findLocalCommand() { 88 function findLocalCommand() {
87 if (OS_WINDOWS) { 89 if (OS_WINDOWS) {
88 $this->command = 'c:\antiword\antiword.exe'; 90 $this->command = 'c:\antiword\antiword.exe';
89 $this->commandconfig = 'indexer/antiword'; 91 $this->commandconfig = 'indexer/antiword';
90 $this->args = array(); 92 $this->args = array();
91 - } 93 + }
92 $sCommand = KTUtil::findCommand($this->commandconfig, $this->command); 94 $sCommand = KTUtil::findCommand($this->commandconfig, $this->command);
93 return $sCommand; 95 return $sCommand;
94 } 96 }
95 - 97 +
96 function getDiagnostic() { 98 function getDiagnostic() {
97 $sCommand = $this->findLocalCommand(); 99 $sCommand = $this->findLocalCommand();
98 - 100 +
99 // can't find the local command. 101 // can't find the local command.
100 if (empty($sCommand)) { 102 if (empty($sCommand)) {
101 return sprintf(_kt('Unable to find required command for indexing. Please ensure that <strong>%s</strong> is installed and in the %s Path. For more information on indexers and helper applications, please <a href="%s">visit the %s site</a>.'), $this->command, APP_NAME, $this->support_url, APP_NAME); 103 return sprintf(_kt('Unable to find required command for indexing. Please ensure that <strong>%s</strong> is installed and in the %s Path. For more information on indexers and helper applications, please <a href="%s">visit the %s site</a>.'), $this->command, APP_NAME, $this->support_url, APP_NAME);
102 } 104 }
103 - 105 +
104 return null; 106 return null;
105 } 107 }
106 } 108 }
plugins/rssplugin/RSSDashlet.php
1 <?php 1 <?php
2 /* 2 /*
3 - * $Id:$ 3 + * $Id$
4 * 4 *
5 * KnowledgeTree Open Source Edition 5 * KnowledgeTree Open Source Edition
6 * Document Management Made Simple 6 * Document Management Made Simple
plugins/rssplugin/RSSDocumentLinkAction.php
1 <?php 1 <?php
2 /* 2 /*
3 - * The contents of this file are subject to the KnowledgeTree Public  
4 - * License Version 1.1.2 ("License"); You may not use this file except in  
5 - * compliance with the License. You may obtain a copy of the License at  
6 - * http://www.knowledgetree.com/KPL  
7 - *  
8 - * Software distributed under the License is distributed on an "AS IS"  
9 - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.  
10 - * See the License for the specific language governing rights and  
11 - * limitations under the License. 3 + * $Id$
12 * 4 *
13 - * All copies of the Covered Code must include on each user interface screen:  
14 - * (i) the "Powered by KnowledgeTree" logo and  
15 - * (ii) the KnowledgeTree copyright notice  
16 - * in the same form as they appear in the distribution. See the License for  
17 - * requirements. 5 + * KnowledgeTree Open Source Edition
  6 + * Document Management Made Simple
  7 + * Copyright (C) 2004 - 2007 The Jam Warehouse Software (Pty) Limited
  8 + *
  9 + * This program is free software; you can redistribute it and/or modify it under
  10 + * the terms of the GNU General Public License version 3 as published by the
  11 + * Free Software Foundation.
  12 + *
  13 + * This program is distributed in the hope that it will be useful, but WITHOUT
  14 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  15 + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  16 + * details.
  17 + *
  18 + * You should have received a copy of the GNU General Public License
  19 + * along with this program. If not, see <http://www.gnu.org/licenses/>.
  20 + *
  21 + * You can contact The Jam Warehouse Software (Pty) Limited, Unit 1, Tramber Place,
  22 + * Blake Street, Observatory, 7925 South Africa. or email info@knowledgetree.com.
18 * 23 *
19 - * The Original Code is: KnowledgeTree Open Source 24 + * The interactive user interfaces in modified source and object code versions
  25 + * of this program must display Appropriate Legal Notices, as required under
  26 + * Section 5 of the GNU General Public License version 3.
20 * 27 *
21 - * The Initial Developer of the Original Code is The Jam Warehouse Software  
22 - * (Pty) Ltd, trading as KnowledgeTree.  
23 - * Portions created by The Jam Warehouse Software (Pty) Ltd are Copyright  
24 - * (C) 2007 The Jam Warehouse Software (Pty) Ltd;  
25 - * All Rights Reserved. 28 + * In accordance with Section 7(b) of the GNU General Public License version 3,
  29 + * these Appropriate Legal Notices must retain the display of the "Powered by
  30 + * KnowledgeTree" logo and retain the original copyright notice. If the display of the
  31 + * logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices
  32 + * must display the words "Powered by KnowledgeTree" and retain the original
  33 + * copyright notice.
26 * Contributor( s): ______________________________________ 34 * Contributor( s): ______________________________________
27 * 35 *
28 */ 36 */
@@ -76,4 +84,4 @@ class RSSDocumentLinkAction extends KTDocumentAction { @@ -76,4 +84,4 @@ class RSSDocumentLinkAction extends KTDocumentAction {
76 return $oTemplate->render($aTemplateData); 84 return $oTemplate->render($aTemplateData);
77 } 85 }
78 } 86 }
79 -?>  
80 \ No newline at end of file 87 \ No newline at end of file
  88 +?>
plugins/rssplugin/RSSFolderLinkAction.php
1 <?php 1 <?php
2 /* 2 /*
3 - * $Id:$ 3 + * $Id$
4 * 4 *
5 * KnowledgeTree Open Source Edition 5 * KnowledgeTree Open Source Edition
6 * Document Management Made Simple 6 * Document Management Made Simple
plugins/rssplugin/manageRSSFeeds.php
1 <?php 1 <?php
2 2
3 /* 3 /*
4 - * $Id:$ 4 + * $Id$
5 * 5 *
6 * KnowledgeTree Open Source Edition 6 * KnowledgeTree Open Source Edition
7 * Document Management Made Simple 7 * Document Management Made Simple
plugins/tagcloud/TagCloudRedirectPage.php
1 <?php 1 <?php
2 /* 2 /*
3 - * $Id:$ 3 + * $Id$
4 * 4 *
5 * KnowledgeTree Open Source Edition 5 * KnowledgeTree Open Source Edition
6 * Document Management Made Simple 6 * Document Management Made Simple
presentation/i18nJavascript.php
1 <?php 1 <?php
2 /* 2 /*
3 - * $Id:$ 3 + * $Id$
4 * 4 *
5 * KnowledgeTree Open Source Edition 5 * KnowledgeTree Open Source Edition
6 * Document Management Made Simple 6 * Document Management Made Simple
sql/mysql/upgrade/3.4.6/remove_backslashes.sql
1 -/* Script to remove back slashes from ' and " and \  
2 - * From the welcome dashlet, folder names and document titles.  
3 - */  
4 -  
5 UPDATE help_replacement 1 UPDATE help_replacement
6 SET description = replace(replace(replace(description, '\\\\', '\\'), '\\\"', '\"'), '\\\'', '\''), 2 SET description = replace(replace(replace(description, '\\\\', '\\'), '\\\"', '\"'), '\\\'', '\''),
7 title = replace(replace(replace(title, '\\\\', '\\'), '\\\"', '\"'), '\\\'', '\''); 3 title = replace(replace(replace(title, '\\\\', '\\'), '\\\"', '\"'), '\\\'', '\'');
@@ -16,4 +12,4 @@ SET name = replace(replace(replace(name, &#39;\\\\&#39;, &#39;\\&#39;), &#39;\\\&quot;&#39;, &#39;\&quot;&#39;), &#39;\\\&#39;&#39;, &#39; @@ -16,4 +12,4 @@ SET name = replace(replace(replace(name, &#39;\\\\&#39;, &#39;\\&#39;), &#39;\\\&quot;&#39;, &#39;\&quot;&#39;), &#39;\\\&#39;&#39;, &#39;
16 12
17 UPDATE discussion_comments 13 UPDATE discussion_comments
18 SET subject = replace(replace(replace(subject, '\\\\', '\\'), '\\\"', '\"'), '\\\'', '\''), 14 SET subject = replace(replace(replace(subject, '\\\\', '\\'), '\\\"', '\"'), '\\\'', '\''),
19 - body = replace(replace(replace(body, '\\\\', '\\'), '\\\"', '\"'), '\\\'', '\'');  
20 \ No newline at end of file 15 \ No newline at end of file
  16 + body = replace(replace(replace(body, '\\\\', '\\'), '\\\"', '\"'), '\\\'', '\'');
thirdparty/pear/GraphViz.php
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 /** 4 /**
5 * Image_GraphViz 5 * Image_GraphViz
6 * 6 *
7 - * Copyright (c) 2001-2006, Dr. Volker Göbbels <vmg@arachnion.de> and 7 + * Copyright (c) 2001-2006, Dr. Volker G�bbels <vmg@arachnion.de> and
8 * Sebastian Bergmann <sb@sebastian-bergmann.de>. All rights reserved. 8 * Sebastian Bergmann <sb@sebastian-bergmann.de>. All rights reserved.
9 * 9 *
10 * LICENSE: This source file is subject to version 3.0 of the PHP license 10 * LICENSE: This source file is subject to version 3.0 of the PHP license
@@ -15,7 +15,7 @@ @@ -15,7 +15,7 @@
15 * 15 *
16 * @category Image 16 * @category Image
17 * @package GraphViz 17 * @package GraphViz
18 - * @author Dr. Volker Göbbels <vmg@arachnion.de> 18 + * @author Dr. Volker G�bbels <vmg@arachnion.de>
19 * @author Sebastian Bergmann <sb@sebastian-bergmann.de> 19 * @author Sebastian Bergmann <sb@sebastian-bergmann.de>
20 * @author Karsten Dambekalns <k.dambekalns@fishfarm.de> 20 * @author Karsten Dambekalns <k.dambekalns@fishfarm.de>
21 * @author Michael Lively Jr. <mlively@ft11.net> 21 * @author Michael Lively Jr. <mlively@ft11.net>
@@ -90,10 +90,10 @@ require_once &#39;System.php&#39;; @@ -90,10 +90,10 @@ require_once &#39;System.php&#39;;
90 * @category Image 90 * @category Image
91 * @package GraphViz 91 * @package GraphViz
92 * @author Sebastian Bergmann <sb@sebastian-bergmann.de> 92 * @author Sebastian Bergmann <sb@sebastian-bergmann.de>
93 - * @author Dr. Volker Göbbels <vmg@arachnion.de> 93 + * @author Dr. Volker G�bbels <vmg@arachnion.de>
94 * @author Karsten Dambekalns <k.dambekalns@fishfarm.de> 94 * @author Karsten Dambekalns <k.dambekalns@fishfarm.de>
95 * @author Michael Lively Jr. <mlively@ft11.net> 95 * @author Michael Lively Jr. <mlively@ft11.net>
96 - * @copyright Copyright &copy; 2001-2006 Dr. Volker Göbbels <vmg@arachnion.de> and Sebastian Bergmann <sb@sebastian-bergmann.de> 96 + * @copyright Copyright &copy; 2001-2006 Dr. Volker G�bbels <vmg@arachnion.de> and Sebastian Bergmann <sb@sebastian-bergmann.de>
97 * @license http://www.php.net/license/3_0.txt The PHP License, Version 3.0 97 * @license http://www.php.net/license/3_0.txt The PHP License, Version 3.0
98 * @version Release: @package_version@ 98 * @version Release: @package_version@
99 * @link http://pear.php.net/package/Image_GraphViz 99 * @link http://pear.php.net/package/Image_GraphViz
thirdparty/pear/HTTP/Upload.php
@@ -205,7 +205,7 @@ class HTTP_Upload_Error extends PEAR @@ -205,7 +205,7 @@ class HTTP_Upload_Error extends PEAR
205 'en' => 'The file was only partially uploaded.', 205 'en' => 'The file was only partially uploaded.',
206 'de' => 'Die Datei wurde unvollst&auml;ndig &uuml;bertragen.', 206 'de' => 'Die Datei wurde unvollst&auml;ndig &uuml;bertragen.',
207 'nl' => 'Het bestand is slechts gedeeltelijk geupload.', 207 'nl' => 'Het bestand is slechts gedeeltelijk geupload.',
208 - 'pt_BR' => 'O arquivo não foi enviado por completo.' 208 + 'pt_BR' => 'O arquivo n�o foi enviado por completo.'
209 ), 209 ),
210 'ERROR' => array( 210 'ERROR' => array(
211 'es' => 'Error en subida:', 211 'es' => 'Error en subida:',
@@ -215,7 +215,7 @@ class HTTP_Upload_Error extends PEAR @@ -215,7 +215,7 @@ class HTTP_Upload_Error extends PEAR
215 'pt_BR' => 'Erro de upload:' 215 'pt_BR' => 'Erro de upload:'
216 ), 216 ),
217 'DEV_NO_DEF_FILE' => array( 217 'DEV_NO_DEF_FILE' => array(
218 - 'es' => 'No está definido en el formulario este nombre de fichero como &lt;input type="file" name=?&gt;.', 218 + 'es' => 'No est� definido en el formulario este nombre de fichero como &lt;input type="file" name=?&gt;.',
219 'en' => 'This filename is not defined in the form as &lt;input type="file" name=?&gt;.', 219 'en' => 'This filename is not defined in the form as &lt;input type="file" name=?&gt;.',
220 'de' => 'Dieser Dateiname ist im Formular nicht als &lt;input type="file" name=?&gt; definiert.', 220 'de' => 'Dieser Dateiname ist im Formular nicht als &lt;input type="file" name=?&gt; definiert.',
221 'nl' => 'Deze bestandsnaam is niett gedefineerd in het formulier als &lt;input type="file" name=?&gt;.' 221 'nl' => 'Deze bestandsnaam is niett gedefineerd in het formulier als &lt;input type="file" name=?&gt;.'
@@ -660,7 +660,7 @@ class HTTP_Upload_File extends HTTP_Upload_Error @@ -660,7 +660,7 @@ class HTTP_Upload_File extends HTTP_Upload_Error
660 */ 660 */
661 function nameToSafe($name, $maxlen=250) 661 function nameToSafe($name, $maxlen=250)
662 { 662 {
663 - $noalpha = 'ÁÉÍÓÚÝáéíóúýÂÊÎÔÛâêîôûÀÈÌÒÙàèìòùÄËÏÖÜäëïöüÿÃãÕõÅåÑñÇç@°ºª'; 663 + $noalpha = '�����������������������������������������������������@���';
664 $alpha = 'AEIOUYaeiouyAEIOUaeiouAEIOUaeiouAEIOUaeiouyAaOoAaNnCcaooa'; 664 $alpha = 'AEIOUYaeiouyAEIOUaeiouAEIOUaeiouAEIOUaeiouyAaOoAaNnCcaooa';
665 665
666 $name = substr($name, 0, $maxlen); 666 $name = substr($name, 0, $maxlen);
thirdparty/pear/Net/Ping.php
@@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
16 // | Authors: Martin Jansen <mj@php.net> | 16 // | Authors: Martin Jansen <mj@php.net> |
17 // | Tomas V.V.Cox <cox@idecnet.com> | 17 // | Tomas V.V.Cox <cox@idecnet.com> |
18 // | Jan Lehnardt <jan@php.net> | 18 // | Jan Lehnardt <jan@php.net> |
19 -// | Kai Schröder <k.schroeder@php.net> | 19 +// | Kai Schr�der <k.schroeder@php.net> |
20 // +----------------------------------------------------------------------+ 20 // +----------------------------------------------------------------------+
21 // 21 //
22 // $Id$ 22 // $Id$
@@ -408,7 +408,7 @@ class Net_Ping @@ -408,7 +408,7 @@ class Net_Ping
408 * @param mixed $error a PEAR error or a string with the error message 408 * @param mixed $error a PEAR error or a string with the error message
409 * @return bool false 409 * @return bool false
410 * @access private 410 * @access private
411 - * @author Kai Schröder <k.schroeder@php.net> 411 + * @author Kai Schr�der <k.schroeder@php.net>
412 */ 412 */
413 function _raiseError($error) 413 function _raiseError($error)
414 { 414 {
@@ -864,7 +864,7 @@ class Net_Ping_Result @@ -864,7 +864,7 @@ class Net_Ping_Result
864 /** 864 /**
865 * Parses the output of Windows' ping command 865 * Parses the output of Windows' ping command
866 * 866 *
867 - * @author Kai Schröder <k.schroeder@php.net> 867 + * @author Kai Schr�der <k.schroeder@php.net>
868 * @access private 868 * @access private
869 */ 869 */
870 function _parseResultwindows() 870 function _parseResultwindows()