From 522b7c1c1352db07deacc3e2ea0948e54a551eed Mon Sep 17 00:00:00 2001 From: kevin_fourie Date: Mon, 25 Feb 2008 10:46:40 +0000 Subject: [PATCH] Merged in from DEV trunk... --- bin/openoffice/pdfgen.py | 15 ++++++++++++--- plugins/housekeeper/DiskUsageDashlet.inc.php | 9 +++++++++ plugins/housekeeper/FolderUsageDashlet.inc.php | 7 ++++--- plugins/search2/DocumentIndexAction.php | 5 +++++ templates/ktcore/workflow/admin/actions_edit.smarty | 8 +++++++- 5 files changed, 37 insertions(+), 7 deletions(-) diff --git a/bin/openoffice/pdfgen.py b/bin/openoffice/pdfgen.py index 4273081..487bc03 100755 --- a/bin/openoffice/pdfgen.py +++ b/bin/openoffice/pdfgen.py @@ -84,7 +84,7 @@ except RuntimeException, e: sys.stderr.write("An unknown error occured: " + e.Message + "\n") if doc == None: - sys.stderr.write("OpenOffice could not load the document for conversion. This could indicate an unsupported minetype.\n") + sys.stderr.write("The document could not be opened for conversion. This could indicate an unsupported mimetype.\n") sys.exit(1) @@ -100,5 +100,14 @@ p.Value = 'writer_pdf_Export' properties.append(p) properties = tuple(properties) -doc.storeToURL(url_save, properties) -doc.dispose() +try: + doc.storeToURL(url_save, properties) + doc.dispose() +except IOException, e: + sys.stderr.write("URL (" + url_save + ") couldn't be found or was corrupt (" + e.Message + ")\n") + sys.exit(1) +except IllegalArgumentException, e: + sys.stderr.write("Given parameters don't conform to the specification ( " + e.Message + ")\n") + sys.exit(1) +except RuntimeException, e: + sys.stderr.write("An unknown error occured: " + e.Message + "\n") diff --git a/plugins/housekeeper/DiskUsageDashlet.inc.php b/plugins/housekeeper/DiskUsageDashlet.inc.php index 6770477..db80a7e 100644 --- a/plugins/housekeeper/DiskUsageDashlet.inc.php +++ b/plugins/housekeeper/DiskUsageDashlet.inc.php @@ -145,7 +145,16 @@ class DiskUsageDashlet extends KTBaseDashlet $oRegistry =& KTPluginRegistry::getSingleton(); $oPlugin =& $oRegistry->getPlugin('ktcore.housekeeper.plugin'); + $config = KTConfig::getSingleton(); + $rootUrl = $config->get('KnowledgeTree/rootUrl'); + $dispatcherURL = $oPlugin->getURLPath('HouseKeeperDispatcher.php'); + if (!empty($rootUrl)) $dispatcherURL .= $rootUrl . $dispatcherURL; + if ( substr( $dispatcherURL, 0,1 ) == '/' || substr( $dispatcherURL, 0,1 ) == '\\') + { + $dispatcherURL = substr($dispatcherURL,1); + } + $dispatcherURL = str_replace( '\\', '/', $dispatcherURL); $aTemplateData = array( diff --git a/plugins/housekeeper/FolderUsageDashlet.inc.php b/plugins/housekeeper/FolderUsageDashlet.inc.php index c1a96a0..7c89ef3 100644 --- a/plugins/housekeeper/FolderUsageDashlet.inc.php +++ b/plugins/housekeeper/FolderUsageDashlet.inc.php @@ -156,12 +156,13 @@ class FolderUsageDashlet extends KTBaseDashlet $dispatcherURL = $oPlugin->getURLPath('HouseKeeperDispatcher.php'); if (!empty($rootUrl)) $dispatcherURL .= $rootUrl . $dispatcherURL; - if (substr($dispatcherURL, 0,1 ) == '/') + if ( substr( $dispatcherURL, 0,1 ) == '/' || substr( $dispatcherURL, 0,1 ) == '\\') { $dispatcherURL = substr($dispatcherURL,1); } - - $this->getUsage(); + $dispatcherURL = str_replace( '\\', '/', $dispatcherURL); + + $this->getUsage(); $aTemplateData = array( 'context' => $this, diff --git a/plugins/search2/DocumentIndexAction.php b/plugins/search2/DocumentIndexAction.php index 05a8a08..effd3bb 100644 --- a/plugins/search2/DocumentIndexAction.php +++ b/plugins/search2/DocumentIndexAction.php @@ -15,6 +15,11 @@ class DocumentIndexAction extends KTDocumentAction $this->sDisplayName=_kt('Schedule Indexing'); } + function getName() + { + return _kt('Document Indexer'); + } + function getDisplayName() { if (Permission::userIsSystemAdministrator() && $_SESSION['adminmode']) diff --git a/templates/ktcore/workflow/admin/actions_edit.smarty b/templates/ktcore/workflow/admin/actions_edit.smarty index 97b9a45..4fa49ed 100644 --- a/templates/ktcore/workflow/admin/actions_edit.smarty +++ b/templates/ktcore/workflow/admin/actions_edit.smarty @@ -14,7 +14,13 @@ {i18n}State{/i18n} {foreach from=$actions item=oAction} - {$oAction->getDisplayName()} + + {if $oAction->getDisplayName() != ''} + {$oAction->getDisplayName()} + {else} + {$oAction->getName()} + {/if} + {/foreach} -- libgit2 0.21.4