Commit beae7c30b06656f2a03818d60bb49faa31625c8b

Authored by megan_w
1 parent 01fcdfcd

KTC-382

"The version history dies if the document comparison plugin is enabled but no license is installed"
Fixed. Added a check on loading the plugin, load returns false if the license is not installed.

Committed By: Megan Watson
Reviewed By: Conrad Vermeulen

git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@8065 c91229c3-7414-0410-bfa2-8a42b809f60b
plugins/ktcore/KTDocumentActions.php
... ... @@ -171,15 +171,17 @@ class KTDocumentVersionHistoryAction extends KTDocumentAction {
171 171  
172 172 if($isActive){
173 173 $oRegistry =& KTPluginRegistry::getSingleton();
174   - $oPlugin =& $oRegistry->getPlugin('document.comparison.plugin');
175   - $oPlugin->load();
176   - $sUrl = $oPlugin->getPagePath('DocumentComparison');
177   - $file = $oPlugin->_aPages['document.comparison.plugin/DocumentComparison'][2];
  174 + $oPlugin =& $oRegistry->getPlugin('document.comparison.plugin');
  175 +
  176 + if($oPlugin->load()){
  177 + $sUrl = $oPlugin->getPagePath('DocumentComparison');
  178 + $file = $oPlugin->_aPages['document.comparison.plugin/DocumentComparison'][2];
178 179  
179   - include_once($file);
  180 + include_once($file);
180 181  
181   - // Check mime type of document for content comparison
182   - list($bShowCompare, $bShowVersionCompare) = DocumentComparison::checkMimeType($this->oDocument);
  182 + // Check mime type of document for content comparison
  183 + list($bShowCompare, $bShowVersionCompare) = DocumentComparison::checkMimeType($this->oDocument);
  184 + }
183 185 }
184 186  
185 187 $aTemplateData = array(
... ...