Commit 17c88d07c856fec0e180ad315a17b3b75614e6d5
Merge branch 'master' of git@github.com:ktgit/knowledgetree
Showing
10 changed files
with
93 additions
and
61 deletions
config/dmsDefaults.php
| ... | ... | @@ -636,7 +636,8 @@ if ($checkup !== true) { |
| 636 | 636 | |
| 637 | 637 | if ($checkup !== true) { |
| 638 | 638 | if (KTPluginUtil::pluginIsActive('ktdms.wintools')) { |
| 639 | - require_once(KT_DIR . '/plugins/wintools/baobabkeyutil.inc.php'); | |
| 639 | + $path = KTPluginUtil::getPluginPath('ktdms.wintools'); | |
| 640 | + require_once($path . 'baobabkeyutil.inc.php'); | |
| 640 | 641 | $name = BaobabKeyUtil::getName(); |
| 641 | 642 | if ($name) { |
| 642 | 643 | $default->versionName = sprintf('%s %s', $default->versionName, $name); | ... | ... |
lib/plugins/plugin.inc.php
| ... | ... | @@ -713,6 +713,8 @@ class KTPlugin { |
| 713 | 713 | $oEntity = KTPluginEntity::getByNamespace($this->sNamespace); |
| 714 | 714 | $friendly_name = ''; |
| 715 | 715 | $iOrder = $this->iOrder; |
| 716 | + global $default; | |
| 717 | + | |
| 716 | 718 | if (!empty($this->sFriendlyName)) { $friendly_name = $this->sFriendlyName; } |
| 717 | 719 | if (!PEAR::isError($oEntity)) { |
| 718 | 720 | |
| ... | ... | @@ -724,6 +726,8 @@ class KTPlugin { |
| 724 | 726 | $iEndVersion = $this->upgradePlugin($oEntity->getVersion()+1, $this->iVersion); |
| 725 | 727 | |
| 726 | 728 | if ($iEndVersion != $this->iVersion) { |
| 729 | + $default->log->error("Plugin register: {$friendly_name}, namespace: {$this->sNamespace} failed to upgrade properly. Original version: {$oEntity->getVersion()}, upgrading to version {$this->iVersion}, current version {$iEndVersion}"); | |
| 730 | + | |
| 727 | 731 | // we obviously failed. |
| 728 | 732 | $oEntity->updateFromArray(array( |
| 729 | 733 | 'path' => $this->stripKtDir($this->sFilename), |
| ... | ... | @@ -735,6 +739,8 @@ class KTPlugin { |
| 735 | 739 | // FIXME we -really- need to raise an error here, somehow. |
| 736 | 740 | |
| 737 | 741 | } else { |
| 742 | + $default->log->debug("Plugin register: {$friendly_name}, namespace: {$this->sNamespace} upgraded. Original version: {$oEntity->getVersion()}, upgrading to version {$this->iVersion}, current version {$iEndVersion}"); | |
| 743 | + | |
| 738 | 744 | $oEntity->updateFromArray(array( |
| 739 | 745 | 'path' => $this->stripKtDir($this->sFilename), |
| 740 | 746 | 'version' => $this->iVersion, |
| ... | ... | @@ -750,6 +756,7 @@ class KTPlugin { |
| 750 | 756 | return $oEntity; |
| 751 | 757 | } |
| 752 | 758 | if(PEAR::isError($oEntity) && !is_a($oEntity, 'KTEntityNoObjects')){ |
| 759 | + $default->log->error("Plugin register: the plugin {$friendly_name}, namespace: {$this->sNamespace} returned an error: ".$oEntity->getMessage()); | |
| 753 | 760 | return $oEntity; |
| 754 | 761 | } |
| 755 | 762 | |
| ... | ... | @@ -759,6 +766,8 @@ class KTPlugin { |
| 759 | 766 | $disabled = 0; |
| 760 | 767 | } |
| 761 | 768 | |
| 769 | + $default->log->debug("Plugin register: creating {$friendly_name}, namespace: {$this->sNamespace}"); | |
| 770 | + | |
| 762 | 771 | $iEndVersion = $this->upgradePlugin(0, $this->iVersion); |
| 763 | 772 | $oEntity = KTPluginEntity::createFromArray(array( |
| 764 | 773 | 'namespace' => $this->sNamespace, |
| ... | ... | @@ -771,6 +780,7 @@ class KTPlugin { |
| 771 | 780 | )); |
| 772 | 781 | |
| 773 | 782 | if (PEAR::isError($oEntity)) { |
| 783 | + $default->log->error("Plugin register: the plugin, {$friendly_name}, namespace: {$this->sNamespace} returned an error on creation: ".$oEntity->getMessage()); | |
| 774 | 784 | return $oEntity; |
| 775 | 785 | } |
| 776 | 786 | ... | ... |
lib/plugins/pluginentity.inc.php
| ... | ... | @@ -6,31 +6,31 @@ |
| 6 | 6 | * Document Management Made Simple |
| 7 | 7 | * Copyright (C) 2008, 2009 KnowledgeTree Inc. |
| 8 | 8 | * Portions copyright The Jam Warehouse Software (Pty) Limited |
| 9 | - * | |
| 9 | + * | |
| 10 | 10 | * This program is free software; you can redistribute it and/or modify it under |
| 11 | 11 | * the terms of the GNU General Public License version 3 as published by the |
| 12 | 12 | * Free Software Foundation. |
| 13 | - * | |
| 13 | + * | |
| 14 | 14 | * This program is distributed in the hope that it will be useful, but WITHOUT |
| 15 | 15 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
| 16 | 16 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more |
| 17 | 17 | * details. |
| 18 | - * | |
| 18 | + * | |
| 19 | 19 | * You should have received a copy of the GNU General Public License |
| 20 | 20 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 21 | - * | |
| 22 | - * You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco, | |
| 21 | + * | |
| 22 | + * You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco, | |
| 23 | 23 | * California 94120-7775, or email info@knowledgetree.com. |
| 24 | - * | |
| 24 | + * | |
| 25 | 25 | * The interactive user interfaces in modified source and object code versions |
| 26 | 26 | * of this program must display Appropriate Legal Notices, as required under |
| 27 | 27 | * Section 5 of the GNU General Public License version 3. |
| 28 | - * | |
| 28 | + * | |
| 29 | 29 | * In accordance with Section 7(b) of the GNU General Public License version 3, |
| 30 | 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 | |
| 31 | + * KnowledgeTree" logo and retain the original copyright notice. If the display of the | |
| 32 | 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 | |
| 33 | + * must display the words "Powered by KnowledgeTree" and retain the original | |
| 34 | 34 | * copyright notice. |
| 35 | 35 | * Contributor( s): ______________________________________ |
| 36 | 36 | * |
| ... | ... | @@ -111,7 +111,7 @@ class KTPluginEntity extends KTEntity { |
| 111 | 111 | |
| 112 | 112 | // STATIC |
| 113 | 113 | function &getAvailable() { |
| 114 | - $aOptions = array('multi' => true); | |
| 114 | + $aOptions = array('multi' => true, 'orderby' => 'friendly_name'); | |
| 115 | 115 | return KTEntityUtil::getBy('KTPluginEntity', 'unavailable', false, $aOptions); |
| 116 | 116 | } |
| 117 | 117 | ... | ... |
lib/plugins/pluginutil.inc.php
| ... | ... | @@ -525,7 +525,7 @@ class KTPluginUtil { |
| 525 | 525 | } |
| 526 | 526 | return false; |
| 527 | 527 | } |
| 528 | - | |
| 528 | + | |
| 529 | 529 | /* Get the priority of the plugin */ |
| 530 | 530 | function getPluginPriority($sFile) { |
| 531 | 531 | $defaultPriority = 10; |
| ... | ... | @@ -560,7 +560,7 @@ class KTPluginUtil { |
| 560 | 560 | |
| 561 | 561 | $files = array(); |
| 562 | 562 | $plugins = array(); |
| 563 | - | |
| 563 | + | |
| 564 | 564 | KTPluginUtil::_walk(KT_DIR . '/plugins', $files); |
| 565 | 565 | foreach ($files as $sFile) { |
| 566 | 566 | $plugin_ending = "Plugin.php"; |
| ... | ... | @@ -569,17 +569,17 @@ class KTPluginUtil { |
| 569 | 569 | $plugins[$sFile] = KTPluginUtil::getPluginPriority($sFile); |
| 570 | 570 | } |
| 571 | 571 | } |
| 572 | - | |
| 572 | + | |
| 573 | 573 | /* Sort the plugins by priority */ |
| 574 | 574 | asort($plugins); |
| 575 | - | |
| 575 | + | |
| 576 | 576 | foreach($plugins as $sFile => $priority) { |
| 577 | 577 | require_once($sFile); |
| 578 | 578 | } |
| 579 | - | |
| 580 | - | |
| 581 | - | |
| 582 | - | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | 583 | |
| 584 | 584 | $oRegistry =& KTPluginRegistry::getSingleton(); |
| 585 | 585 | $aRegistryList = $oRegistry->getPlugins(); |
| ... | ... | @@ -687,15 +687,34 @@ class KTPluginUtil { |
| 687 | 687 | } |
| 688 | 688 | } |
| 689 | 689 | |
| 690 | - // utility function to detect if the plugin is loaded and active. | |
| 691 | - static function pluginIsActive($sNamespace) { | |
| 690 | + /** | |
| 691 | + * Get the full path to the plugin | |
| 692 | + * | |
| 693 | + * @param string $sNamespace The namespace of the plugin | |
| 694 | + * @param bool $relative Whether the path should be relative or full | |
| 695 | + * @return string | |
| 696 | + */ | |
| 697 | + static function getPluginPath($sNamespace, $relative = false) | |
| 698 | + { | |
| 699 | + $oEntity = KTPluginEntity::getByNamespace($sNamespace); | |
| 692 | 700 | |
| 701 | + if(PEAR::isError($oEntity)){ | |
| 702 | + return $oEntity; | |
| 703 | + } | |
| 704 | + $dir = dirname($oEntity->getPath()) . DIRECTORY_SEPARATOR; | |
| 693 | 705 | |
| 706 | + if(!$relative){ | |
| 707 | + $dir = KT_DIR . DIRECTORY_SEPARATOR . $dir; | |
| 708 | + } | |
| 694 | 709 | |
| 695 | - $oReg =& KTPluginRegistry::getSingleton(); | |
| 696 | - $plugin = $oReg->getPlugin($sNamespace); | |
| 710 | + return $dir; | |
| 711 | + } | |
| 697 | 712 | |
| 713 | + // utility function to detect if the plugin is loaded and active. | |
| 714 | + static function pluginIsActive($sNamespace) { | |
| 698 | 715 | |
| 716 | + $oReg =& KTPluginRegistry::getSingleton(); | |
| 717 | + $plugin = $oReg->getPlugin($sNamespace); | |
| 699 | 718 | |
| 700 | 719 | if (is_null($plugin) || PEAR::isError($plugin)) { return false; } // no such plugin |
| 701 | 720 | else { // check if its active |
| ... | ... | @@ -709,4 +728,4 @@ class KTPluginUtil { |
| 709 | 728 | } |
| 710 | 729 | } |
| 711 | 730 | |
| 712 | 731 | -?> |
| 732 | +?> | |
| 713 | 733 | \ No newline at end of file | ... | ... |
lib/session/Session.inc
| ... | ... | @@ -56,7 +56,8 @@ class Session { |
| 56 | 56 | // Don't need to lock a user out the web interface if KT Tools exists and has no license. |
| 57 | 57 | if (KTPluginUtil::pluginIsActive('ktdms.wintools')) { |
| 58 | 58 | if (!$oUser->isAnonymous()) { |
| 59 | - require_once(KT_DIR . '/plugins/wintools/baobabkeyutil.inc.php'); | |
| 59 | + $path = KTPluginUtil::getPluginPath('ktdms.wintools'); | |
| 60 | + require_once($path . 'baobabkeyutil.inc.php'); | |
| 60 | 61 | $res = BaobabKeyUtil::isValidUser($oUser); |
| 61 | 62 | if (PEAR::isError($res)) { |
| 62 | 63 | return $res; |
| ... | ... | @@ -236,7 +237,7 @@ class Session { |
| 236 | 237 | } |
| 237 | 238 | |
| 238 | 239 | // this should be an existing session, so check the db |
| 239 | - $aRows = DBUtil::getResultArray(array("SELECT * FROM $default->sessions_table WHERE session_id = ?", $sessionID)); | |
| 240 | + $aRows = DBUtil::getResultArray(array("SELECT * FROM $default->sessions_table WHERE session_id = ? ORDER BY id DESC", $sessionID)); | |
| 240 | 241 | |
| 241 | 242 | $numrows = count($aRows); |
| 242 | 243 | ... | ... |
lib/templating/kt3template.inc.php
| ... | ... | @@ -101,6 +101,9 @@ class KTPage { |
| 101 | 101 | global $default; |
| 102 | 102 | $oConfig = KTConfig::getSingleton(); |
| 103 | 103 | |
| 104 | + // set the system url | |
| 105 | + $this->systemURL = $oConfig->get('ui/systemUrl'); | |
| 106 | + | |
| 104 | 107 | /* default css files initialisation */ |
| 105 | 108 | $aCSS = Array( |
| 106 | 109 | "thirdpartyjs/extjs/resources/css/ext-all.css", | ... | ... |
lib/users/User.inc
| ... | ... | @@ -465,7 +465,8 @@ class User extends KTEntity { |
| 465 | 465 | $this->setDisabled(1); |
| 466 | 466 | $this->update(); |
| 467 | 467 | if (KTPluginUtil::pluginIsActive('ktdms.wintools')) { |
| 468 | - require_once(KT_DIR . '/plugins/wintools/baobabkeyutil.inc.php'); | |
| 468 | + $path = KTPluginUtil::getPluginPath('ktdms.wintools'); | |
| 469 | + require_once($path . 'baobabkeyutil.inc.php'); | |
| 469 | 470 | BaobabKeyUtil::deallocateUser($this); |
| 470 | 471 | } |
| 471 | 472 | return; |
| ... | ... | @@ -475,7 +476,8 @@ class User extends KTEntity { |
| 475 | 476 | $this->setDisabled(0); |
| 476 | 477 | $this->update(); |
| 477 | 478 | if (KTPluginUtil::pluginIsActive('ktdms.wintools')) { |
| 478 | - require_once(KT_DIR . '/plugins/wintools/baobabkeyutil.inc.php'); | |
| 479 | + $path = KTPluginUtil::getPluginPath('ktdms.wintools'); | |
| 480 | + require_once($path . 'baobabkeyutil.inc.php'); | |
| 479 | 481 | BaobabKeyUtil::allocateUser($this); |
| 480 | 482 | } |
| 481 | 483 | return; |
| ... | ... | @@ -483,7 +485,8 @@ class User extends KTEntity { |
| 483 | 485 | |
| 484 | 486 | function create() { |
| 485 | 487 | if (KTPluginUtil::pluginIsActive('ktdms.wintools')) { |
| 486 | - require_once(KT_DIR . '/plugins/wintools/baobabkeyutil.inc.php'); | |
| 488 | + $path = KTPluginUtil::getPluginPath('ktdms.wintools'); | |
| 489 | + require_once($path . 'baobabkeyutil.inc.php'); | |
| 487 | 490 | $res = BaobabKeyUtil::canAddUser(); |
| 488 | 491 | if (PEAR::isError($res)) { |
| 489 | 492 | return $res; |
| ... | ... | @@ -516,7 +519,8 @@ class User extends KTEntity { |
| 516 | 519 | |
| 517 | 520 | $this->update(); |
| 518 | 521 | if (KTPluginUtil::pluginIsActive('ktdms.wintools')) { |
| 519 | - require_once(KT_DIR . '/plugins/wintools/baobabkeyutil.inc.php'); | |
| 522 | + $path = KTPluginUtil::getPluginPath('ktdms.wintools'); | |
| 523 | + require_once($path . 'baobabkeyutil.inc.php'); | |
| 520 | 524 | BaobabKeyUtil::deallocateUser($this); |
| 521 | 525 | } |
| 522 | 526 | return; | ... | ... |
plugins/ktcore/KTCorePlugin.php
| ... | ... | @@ -108,14 +108,14 @@ class KTCorePlugin extends KTPlugin { |
| 108 | 108 | $this->registerDashlet('KTCheckoutDashlet', 'ktcore.dashlet.checkout', 'KTDashlets.php'); |
| 109 | 109 | $this->registerDashlet('KTMailServerDashlet', 'ktcore.dashlet.mail_server', 'KTDashlets.php'); |
| 110 | 110 | $this->registerDashlet('LuceneMigrationDashlet', 'ktcore.dashlet.lucene_migration', KT_DIR . '/plugins/search2/MigrationDashlet.php'); |
| 111 | - | |
| 112 | - | |
| 111 | + | |
| 112 | + | |
| 113 | 113 | // THESE THREE DASHLETS HAVE BEEN MOVED TO ADMIN PAGES |
| 114 | - | |
| 114 | + | |
| 115 | 115 | //$this->registerDashlet('ExternalResourceStatusDashlet', 'ktcore.dashlet.resource_status', KT_DIR . '/plugins/search2/ExternalDashlet.php'); |
| 116 | 116 | //$this->registerDashlet('IndexingStatusDashlet', 'ktcore.dashlet.indexing_status', KT_DIR . '/plugins/search2/IndexingStatusDashlet.php'); |
| 117 | 117 | //$this->registerDashlet('LuceneStatisticsDashlet', 'ktcore.dashlet.indexing_statss', KT_DIR . '/plugins/search2/LuceneStatisticsDashlet.php'); |
| 118 | - | |
| 118 | + | |
| 119 | 119 | $this->registerDashlet('schedulerDashlet', 'ktcore.schedulerdashlet.plugin', 'scheduler/schedulerDashlet.php'); |
| 120 | 120 | |
| 121 | 121 | $this->registerAdminPage('scheduler', 'manageSchedulerDispatcher', 'misc', _kt('Manage Task Scheduler'), _kt('Manage the task scheduler'), 'scheduler/taskScheduler.php'); |
| ... | ... | @@ -279,13 +279,6 @@ class KTCorePlugin extends KTPlugin { |
| 279 | 279 | _kt('Document Fieldsets'), |
| 280 | 280 | _kt('Manage the different types of information that can be associated with classes of documents.'), |
| 281 | 281 | 'admin/documentFieldsv2.php', null); |
| 282 | - if(KTPluginUtil::pluginIsActive('ktdms.wintools')) | |
| 283 | - { | |
| 284 | - $this->registerAdminPage('emailtypemanagement', 'KTEmailDocumentTypeDispatcher', 'documents', | |
| 285 | - _kt('Email Document Types'), | |
| 286 | - _kt('Manage the addition of Email document types to the system.'), | |
| 287 | - '../wintools/email/emailDocumentTypes.php', null); | |
| 288 | - } | |
| 289 | 282 | $this->registerAdminPage('workflows_2', 'KTWorkflowAdminV2', 'documents', |
| 290 | 283 | _kt('Workflows'), _kt('Configure automated Workflows that map to document life-cycles.'), |
| 291 | 284 | 'admin/workflowsv2.php', null); |
| ... | ... | @@ -322,20 +315,20 @@ class KTCorePlugin extends KTPlugin { |
| 322 | 315 | $this->registerAdminPage('reschedulealldocuments', 'RescheduleDocumentsDispatcher', 'search', |
| 323 | 316 | _kt('Reschedule all documents'), _kt('This function allows you to re-index your entire repository.'), |
| 324 | 317 | '../search2/reporting/RescheduleDocuments.php', null); |
| 325 | - | |
| 326 | - | |
| 318 | + | |
| 319 | + | |
| 327 | 320 | // Admin Pages for Previous Dashlets |
| 328 | 321 | $this->registerAdminPage('indexingstatus', 'IndexingStatusDispatcher', 'search', |
| 329 | 322 | _kt('Document Indexer and External Resource Dependancy Status'), _kt('This report will show the status of external dependencies and the document indexer.'), |
| 330 | 323 | '../search2/reporting/IndexingStatus.php', null); |
| 331 | - | |
| 324 | + | |
| 332 | 325 | $this->registerAdminPage('lucenestatistics', 'LuceneStatisticsDispatcher', 'search', |
| 333 | 326 | _kt('Document Indexer Statistics'), _kt('This report will show the Lucene Document Indexing Statistics '), |
| 334 | 327 | '../search2/reporting/LuceneStatistics.php', null); |
| 335 | - | |
| 336 | - | |
| 337 | - | |
| 338 | - | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 339 | 332 | //config |
| 340 | 333 | $this->registerAdminPage('emailconfigpage', 'EmailConfigPageDispatcher', 'config', |
| 341 | 334 | _kt('Email'), _kt('Define the sending email server address, email password, email port, and user name, and view and modify policies for emailing documents and attachments from KnowledgeTree.'), | ... | ... |
plugins/ktcore/admin/userManagement.php
| ... | ... | @@ -6,31 +6,31 @@ |
| 6 | 6 | * Document Management Made Simple |
| 7 | 7 | * Copyright (C) 2008, 2009 KnowledgeTree Inc. |
| 8 | 8 | * Portions copyright The Jam Warehouse Software (Pty) Limited |
| 9 | - * | |
| 9 | + * | |
| 10 | 10 | * This program is free software; you can redistribute it and/or modify it under |
| 11 | 11 | * the terms of the GNU General Public License version 3 as published by the |
| 12 | 12 | * Free Software Foundation. |
| 13 | - * | |
| 13 | + * | |
| 14 | 14 | * This program is distributed in the hope that it will be useful, but WITHOUT |
| 15 | 15 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
| 16 | 16 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more |
| 17 | 17 | * details. |
| 18 | - * | |
| 18 | + * | |
| 19 | 19 | * You should have received a copy of the GNU General Public License |
| 20 | 20 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 21 | - * | |
| 22 | - * You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco, | |
| 21 | + * | |
| 22 | + * You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco, | |
| 23 | 23 | * California 94120-7775, or email info@knowledgetree.com. |
| 24 | - * | |
| 24 | + * | |
| 25 | 25 | * The interactive user interfaces in modified source and object code versions |
| 26 | 26 | * of this program must display Appropriate Legal Notices, as required under |
| 27 | 27 | * Section 5 of the GNU General Public License version 3. |
| 28 | - * | |
| 28 | + * | |
| 29 | 29 | * In accordance with Section 7(b) of the GNU General Public License version 3, |
| 30 | 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 | |
| 31 | + * KnowledgeTree" logo and retain the original copyright notice. If the display of the | |
| 32 | 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 | |
| 33 | + * must display the words "Powered by KnowledgeTree" and retain the original | |
| 34 | 34 | * copyright notice. |
| 35 | 35 | * Contributor( s): ______________________________________ |
| 36 | 36 | * |
| ... | ... | @@ -93,7 +93,8 @@ class KTUserAdminDispatcher extends KTAdminDispatcher { |
| 93 | 93 | |
| 94 | 94 | $bCanAdd = true; |
| 95 | 95 | if (KTPluginUtil::pluginIsActive('ktdms.wintools')) { |
| 96 | - require_once(KT_DIR . '/plugins/wintools/baobabkeyutil.inc.php'); | |
| 96 | + $path = KTPluginUtil::getPluginPath('ktdms.wintools'); | |
| 97 | + require_once($path . 'baobabkeyutil.inc.php'); | |
| 97 | 98 | $bCanAdd = BaobabKeyUtil::canAddUser(); |
| 98 | 99 | if (PEAR::isError($bCanAdd)) { |
| 99 | 100 | $bCanAdd = false; |
| ... | ... | @@ -697,7 +698,8 @@ class KTUserAdminDispatcher extends KTAdminDispatcher { |
| 697 | 698 | $iLicenses = 0; |
| 698 | 699 | $bRequireLicenses = false; |
| 699 | 700 | if (KTPluginUtil::pluginIsActive('ktdms.wintools')) { |
| 700 | - require_once(KT_DIR . '/plugins/wintools/baobabkeyutil.inc.php'); | |
| 701 | + $path = KTPluginUtil::getPluginPath('ktdms.wintools'); | |
| 702 | + require_once($path . 'baobabkeyutil.inc.php'); | |
| 701 | 703 | $iLicenses = BaobabKeyUtil::getLicenseCount(); |
| 702 | 704 | $bRequireLicenses = true; |
| 703 | 705 | } | ... | ... |
plugins/ktstandard/KTWebDAVDashletPlugin.php
| ... | ... | @@ -76,8 +76,7 @@ class KTWebDAVDashlet extends KTBaseDashlet { |
| 76 | 76 | // Shortcut: Check if the the wintools plugin exists and set to true. |
| 77 | 77 | // Long way: Check that a license is installed - this is only text so having a license is not a requirement. |
| 78 | 78 | $isComm = false; |
| 79 | - $keyUtil = KT_DIR . '/plugins/wintools/baobabkeyutil.inc.php'; | |
| 80 | - if(file_exists($keyUtil)){ | |
| 79 | + if (KTPluginUtil::pluginIsActive('ktdms.wintools')) { | |
| 81 | 80 | $isComm = true; |
| 82 | 81 | } |
| 83 | 82 | $webdavUrl = $sURL.'/ktwebdav/ktwebdav.php'; | ... | ... |