Commit 522b7c1c1352db07deacc3e2ea0948e54a551eed

Authored by kevin_fourie
1 parent 610e1a78

Merged in from DEV trunk...

KTC-262

"Action Restriction section of a work flow there are extra two extra columns as well as one that says "no name" after you select "Edit Action""

Fixed. Added a check to display name using getName() in case getDisplayName() returns an empty string. 

Committed By: Jonathan Byrne
Reviewed By: Megan Watson

KTS-3057
"Cleanup link on System Folder Utilization dashlet points to an non-existing url"
Fixed. Cleaned up Url creation for Windows.

Committed By: Kevin Fourie
Reviewed By: Conrad Vermeulen


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/STABLE/trunk@8134 c91229c3-7414-0410-bfa2-8a42b809f60b
bin/openoffice/pdfgen.py
@@ -84,7 +84,7 @@ except RuntimeException, e: @@ -84,7 +84,7 @@ except RuntimeException, e:
84 sys.stderr.write("An unknown error occured: " + e.Message + "\n") 84 sys.stderr.write("An unknown error occured: " + e.Message + "\n")
85 85
86 if doc == None: 86 if doc == None:
87 - sys.stderr.write("OpenOffice could not load the document for conversion. This could indicate an unsupported minetype.\n") 87 + sys.stderr.write("The document could not be opened for conversion. This could indicate an unsupported mimetype.\n")
88 sys.exit(1) 88 sys.exit(1)
89 89
90 90
@@ -100,5 +100,14 @@ p.Value = 'writer_pdf_Export' @@ -100,5 +100,14 @@ p.Value = 'writer_pdf_Export'
100 properties.append(p) 100 properties.append(p)
101 properties = tuple(properties) 101 properties = tuple(properties)
102 102
103 -doc.storeToURL(url_save, properties)  
104 -doc.dispose() 103 +try:
  104 + doc.storeToURL(url_save, properties)
  105 + doc.dispose()
  106 +except IOException, e:
  107 + sys.stderr.write("URL (" + url_save + ") couldn't be found or was corrupt (" + e.Message + ")\n")
  108 + sys.exit(1)
  109 +except IllegalArgumentException, e:
  110 + sys.stderr.write("Given parameters don't conform to the specification ( " + e.Message + ")\n")
  111 + sys.exit(1)
  112 +except RuntimeException, e:
  113 + sys.stderr.write("An unknown error occured: " + e.Message + "\n")
plugins/housekeeper/DiskUsageDashlet.inc.php
@@ -145,7 +145,16 @@ class DiskUsageDashlet extends KTBaseDashlet @@ -145,7 +145,16 @@ class DiskUsageDashlet extends KTBaseDashlet
145 $oRegistry =& KTPluginRegistry::getSingleton(); 145 $oRegistry =& KTPluginRegistry::getSingleton();
146 $oPlugin =& $oRegistry->getPlugin('ktcore.housekeeper.plugin'); 146 $oPlugin =& $oRegistry->getPlugin('ktcore.housekeeper.plugin');
147 147
  148 + $config = KTConfig::getSingleton();
  149 + $rootUrl = $config->get('KnowledgeTree/rootUrl');
  150 +
148 $dispatcherURL = $oPlugin->getURLPath('HouseKeeperDispatcher.php'); 151 $dispatcherURL = $oPlugin->getURLPath('HouseKeeperDispatcher.php');
  152 + if (!empty($rootUrl)) $dispatcherURL .= $rootUrl . $dispatcherURL;
  153 + if ( substr( $dispatcherURL, 0,1 ) == '/' || substr( $dispatcherURL, 0,1 ) == '\\')
  154 + {
  155 + $dispatcherURL = substr($dispatcherURL,1);
  156 + }
  157 + $dispatcherURL = str_replace( '\\', '/', $dispatcherURL);
149 158
150 159
151 $aTemplateData = array( 160 $aTemplateData = array(
plugins/housekeeper/FolderUsageDashlet.inc.php
@@ -156,12 +156,13 @@ class FolderUsageDashlet extends KTBaseDashlet @@ -156,12 +156,13 @@ class FolderUsageDashlet extends KTBaseDashlet
156 156
157 $dispatcherURL = $oPlugin->getURLPath('HouseKeeperDispatcher.php'); 157 $dispatcherURL = $oPlugin->getURLPath('HouseKeeperDispatcher.php');
158 if (!empty($rootUrl)) $dispatcherURL .= $rootUrl . $dispatcherURL; 158 if (!empty($rootUrl)) $dispatcherURL .= $rootUrl . $dispatcherURL;
159 - if (substr($dispatcherURL, 0,1 ) == '/') 159 + if ( substr( $dispatcherURL, 0,1 ) == '/' || substr( $dispatcherURL, 0,1 ) == '\\')
160 { 160 {
161 $dispatcherURL = substr($dispatcherURL,1); 161 $dispatcherURL = substr($dispatcherURL,1);
162 } 162 }
163 -  
164 - $this->getUsage(); 163 + $dispatcherURL = str_replace( '\\', '/', $dispatcherURL);
  164 +
  165 + $this->getUsage();
165 166
166 $aTemplateData = array( 167 $aTemplateData = array(
167 'context' => $this, 168 'context' => $this,
plugins/search2/DocumentIndexAction.php
@@ -15,6 +15,11 @@ class DocumentIndexAction extends KTDocumentAction @@ -15,6 +15,11 @@ class DocumentIndexAction extends KTDocumentAction
15 $this->sDisplayName=_kt('Schedule Indexing'); 15 $this->sDisplayName=_kt('Schedule Indexing');
16 } 16 }
17 17
  18 + function getName()
  19 + {
  20 + return _kt('Document Indexer');
  21 + }
  22 +
18 function getDisplayName() 23 function getDisplayName()
19 { 24 {
20 if (Permission::userIsSystemAdministrator() && $_SESSION['adminmode']) 25 if (Permission::userIsSystemAdministrator() && $_SESSION['adminmode'])
templates/ktcore/workflow/admin/actions_edit.smarty
@@ -14,7 +14,13 @@ @@ -14,7 +14,13 @@
14 <thead> 14 <thead>
15 <th>{i18n}State{/i18n}</th> 15 <th>{i18n}State{/i18n}</th>
16 {foreach from=$actions item=oAction} 16 {foreach from=$actions item=oAction}
17 - <th>{$oAction->getDisplayName()}</th> 17 + <th>
  18 + {if $oAction->getDisplayName() != ''}
  19 + {$oAction->getDisplayName()}
  20 + {else}
  21 + {$oAction->getName()}
  22 + {/if}
  23 + </th>
18 {/foreach} 24 {/foreach}
19 </thead> 25 </thead>
20 26