diff --git a/plugins/ktstandard/PDFGeneratorAction.php b/plugins/ktstandard/PDFGeneratorAction.php
index 98210f3..42d6188 100644
--- a/plugins/ktstandard/PDFGeneratorAction.php
+++ b/plugins/ktstandard/PDFGeneratorAction.php
@@ -2,35 +2,29 @@
/**
* $Id$
*
- * KnowledgeTree Open Source Edition
- * Document Management Made Simple
- * Copyright (C) 2004 - 2007 The Jam Warehouse Software (Pty) Limited
+ * The contents of this file are subject to the KnowledgeTree Public
+ * License Version 1.1.2 ("License"); You may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ * http://www.knowledgetree.com/KPL
*
- * This program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License version 3 as published by the
- * Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- *
- * You can contact The Jam Warehouse Software (Pty) Limited, Unit 1, Tramber Place,
- * Blake Street, Observatory, 7925 South Africa. or email info@knowledgetree.com.
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
+ * See the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * All copies of the Covered Code must include on each user interface screen:
+ * (i) the "Powered by KnowledgeTree" logo and
+ * (ii) the KnowledgeTree copyright notice
+ * in the same form as they appear in the distribution. See the License for
+ * requirements.
*
- * The interactive user interfaces in modified source and object code versions
- * of this program must display Appropriate Legal Notices, as required under
- * Section 5 of the GNU General Public License version 3.
+ * The Original Code is: KnowledgeTree Open Source
*
- * In accordance with Section 7(b) of the GNU General Public License version 3,
- * these Appropriate Legal Notices must retain the display of the "Powered by
- * KnowledgeTree" logo and retain the original copyright notice. If the display of the
- * logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices
- * must display the words "Powered by KnowledgeTree" and retain the original
- * copyright notice.
+ * The Initial Developer of the Original Code is The Jam Warehouse Software
+ * (Pty) Ltd, trading as KnowledgeTree.
+ * Portions created by The Jam Warehouse Software (Pty) Ltd are Copyright
+ * (C) 2007 The Jam Warehouse Software (Pty) Ltd;
+ * All Rights Reserved.
* Contributor( s): ______________________________________
*
*/
@@ -51,8 +45,8 @@ class PDFGeneratorAction extends KTDocumentAction {
var $sDisplayName = 'Generate PDF';
// Note: 'asc' below seems to be a catchall for plain text docs.
// 'htm' and 'html' should work but are not so have been removed for now.
- var $aAcceptedMimeTypes = array('doc', 'ods', 'odt', 'ott', 'txt', 'rtf', 'sxw', 'stw',
- // 'html', 'htm',
+ var $aAcceptedMimeTypes = array('doc', 'ods', 'odt', 'ott', 'txt', 'rtf', 'sxw', 'stw',
+ // 'html', 'htm',
'xml' , 'pdb', 'psw', 'ods', 'ots', 'sxc',
'stc', 'dif', 'dbf', 'xls', 'xlt', 'slk', 'csv', 'pxl',
'odp', 'otp', 'sxi', 'sti', 'ppt', 'pot', 'sxd', 'odg',
@@ -62,7 +56,7 @@ class PDFGeneratorAction extends KTDocumentAction {
// We need to handle Windows differently - as usual ;)
if (substr( PHP_OS, 0, 3) == 'WIN') {
$cmdpath = KT_DIR . "/../openoffice/openoffice/program/python.bat";
- $cmdpath = str_replace( '/','\\',$cmdpath);
+ $cmdpath = str_replace( '/','\\',$cmdpath);
} else {
$cmdpath = "../openoffice/program/python";
}
@@ -75,9 +69,8 @@ class PDFGeneratorAction extends KTDocumentAction {
return _kt('Generate PDF') . " $this->oDocument->getId(), "action" => "pdfdownload") ) . "\"
";
}
}
- return _kt('Generate PDF');
}
- return '';
+ return 'PDF Generator';
}
function form_main() {
@@ -123,7 +116,7 @@ class PDFGeneratorAction extends KTDocumentAction {
$this->do_pdfdownload();
}
redirect(KTUtil::ktLink( 'action.php', 'ktstandard.pdf.generate', array( "fDocumentId" => $this->oDocument->getId() ) ) );
- exit(0);
+ exit(0);
}
function do_main() {
@@ -168,7 +161,7 @@ class PDFGeneratorAction extends KTDocumentAction {
/**
* Method for downloading the document as a pdf.
*
- * @return true on success else false
+ * @return true on success else false
*/
function do_pdfdownload() {
@@ -188,7 +181,7 @@ class PDFGeneratorAction extends KTDocumentAction {
if (substr( PHP_OS, 0, 3) == 'WIN') {
$cmd = "\"" . KT_DIR . "/../openoffice/openoffice/program/python.bat\" \"". KT_DIR . "/bin/openoffice/pdfgen.py\" \"" . $sPath . "\" \"" . $sTempFilename . "\"";
- $cmd = str_replace( '/','\\',$cmd);
+ $cmd = str_replace( '/','\\',$cmd);
// TODO: Check for more errors here
// SECURTIY: Ensure $sPath and $sTempFilename are safe or they could be used to excecute arbitrary commands!
@@ -211,7 +204,7 @@ class PDFGeneratorAction extends KTDocumentAction {
}
- // Check the tempfile exists and the python script did not return anything (which would indicate an error)
+ // Check the tempfile exists and the python script did not return anything (which would indicate an error)
if (file_exists($sTempFilename) && $res == '') {
$sUrlEncodedFileName = substr($oDocument->getFileName(), 0, strrpos($oDocument->getFileName(), '.') );
@@ -231,7 +224,7 @@ class PDFGeneratorAction extends KTDocumentAction {
// HTTP/1.0
// header("Pragma: no-cache"); // Don't send this header! It breaks IE.
-
+
// Get a filelike object and send it to the browser
$oFile = new KTFSFileLike($sTempFilename);
KTFileLikeUtil::send_contents($oFile);
@@ -239,23 +232,23 @@ class PDFGeneratorAction extends KTDocumentAction {
unlink($sTempFilename);
// Create the document transaction
- $oDocumentTransaction = new DocumentTransaction($oDocument, 'Document downloaded as PDF', 'ktcore.transactions.download', $aOptions);
+ $oDocumentTransaction = & new DocumentTransaction($oDocument, 'Document downloaded as PDF', 'ktcore.transactions.download', $aOptions);
$oDocumentTransaction->create();
// Just stop here - the content has already been sent.
- exit(0);
+ exit(0);
} else {
// Set the error messsage and redirect to view document
- $this->addErrorMessage(_kt('An error occurred generating the PDF - please contact the system administrator. ' . $res));
+ $this->addErrorMessage(_kt('An error occurred generating the PDF - please contact the system administrator.
' . $res));
redirect(generateControllerLink('viewDocument',sprintf(_kt('fDocumentId=%d'),$oDocument->getId())));
- exit(0);
+ exit(0);
}
} else {
// Set the error messsage and redirect to view document
- $this->addErrorMessage(_kt('An error occurred generating the PDF - please contact the system administrator. The path to the document did not exist.'));
+ $this->addErrorMessage(_kt('An error occurred generating the PDF - please contact the system administrator.
The path to the document did not exist.'));
redirect(generateControllerLink('viewDocument',sprintf(_kt('fDocumentId=%d'),$oDocument->getId())));
- exit(0);
+ exit(0);
}
diff --git a/plugins/rssplugin/RSSDocumentLinkAction.php b/plugins/rssplugin/RSSDocumentLinkAction.php
index 829f4d9..66df51d 100644
--- a/plugins/rssplugin/RSSDocumentLinkAction.php
+++ b/plugins/rssplugin/RSSDocumentLinkAction.php
@@ -1,36 +1,28 @@
.
- *
- * You can contact The Jam Warehouse Software (Pty) Limited, Unit 1, Tramber Place,
- * Blake Street, Observatory, 7925 South Africa. or email info@knowledgetree.com.
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
+ * See the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * All copies of the Covered Code must include on each user interface screen:
+ * (i) the "Powered by KnowledgeTree" logo and
+ * (ii) the KnowledgeTree copyright notice
+ * in the same form as they appear in the distribution. See the License for
+ * requirements.
*
- * The interactive user interfaces in modified source and object code versions
- * of this program must display Appropriate Legal Notices, as required under
- * Section 5 of the GNU General Public License version 3.
+ * The Original Code is: KnowledgeTree Open Source
*
- * In accordance with Section 7(b) of the GNU General Public License version 3,
- * these Appropriate Legal Notices must retain the display of the "Powered by
- * KnowledgeTree" logo and retain the original copyright notice. If the display of the
- * logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices
- * must display the words "Powered by KnowledgeTree" and retain the original
- * copyright notice.
+ * The Initial Developer of the Original Code is The Jam Warehouse Software
+ * (Pty) Ltd, trading as KnowledgeTree.
+ * Portions created by The Jam Warehouse Software (Pty) Ltd are Copyright
+ * (C) 2007 The Jam Warehouse Software (Pty) Ltd;
+ * All Rights Reserved.
* Contributor( s): ______________________________________
*
*/
@@ -57,7 +49,7 @@ class RSSDocumentLinkAction extends KTDocumentAction {
// get document id
if(!isset($oDocument)){
- return _kt('RSS');
+ return 'RSS';
}
$iFId = $oDocument->getID();