Commit 67d9f73c92b5bb6dc239935792bf1ab0c6b23474
1 parent
8e894d95
Merged in from DEV trunk...
KTS-3043 "On reread of plugins the quicklinks plugin is set to disabled" Fixed. Moved the checks on the end version after an upgrade into the if statement containing the upgrade. Committed By: Megan Watson Reviewed By: Conrad Vermeulen git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/STABLE/trunk@8076 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
3 changed files
with
24 additions
and
23 deletions
lib/metadata/metadatautil.inc.php
| ... | ... | @@ -2,39 +2,37 @@ |
| 2 | 2 | /** |
| 3 | 3 | * $Id$ |
| 4 | 4 | * |
| 5 | - * Utility functions for retrieving information from and managing | |
| 6 | - * fieldsets with conditions. | |
| 7 | - * | |
| 8 | 5 | * KnowledgeTree Open Source Edition |
| 9 | 6 | * Document Management Made Simple |
| 10 | 7 | * Copyright (C) 2004 - 2008 The Jam Warehouse Software (Pty) Limited |
| 11 | - * | |
| 8 | + * | |
| 12 | 9 | * This program is free software; you can redistribute it and/or modify it under |
| 13 | 10 | * the terms of the GNU General Public License version 3 as published by the |
| 14 | 11 | * Free Software Foundation. |
| 15 | - * | |
| 12 | + * | |
| 16 | 13 | * This program is distributed in the hope that it will be useful, but WITHOUT |
| 17 | 14 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
| 18 | 15 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more |
| 19 | 16 | * details. |
| 20 | - * | |
| 17 | + * | |
| 21 | 18 | * You should have received a copy of the GNU General Public License |
| 22 | 19 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 23 | - * | |
| 20 | + * | |
| 24 | 21 | * You can contact The Jam Warehouse Software (Pty) Limited, Unit 1, Tramber Place, |
| 25 | 22 | * Blake Street, Observatory, 7925 South Africa. or email info@knowledgetree.com. |
| 26 | - * | |
| 23 | + * | |
| 27 | 24 | * The interactive user interfaces in modified source and object code versions |
| 28 | 25 | * of this program must display Appropriate Legal Notices, as required under |
| 29 | 26 | * Section 5 of the GNU General Public License version 3. |
| 30 | - * | |
| 27 | + * | |
| 31 | 28 | * In accordance with Section 7(b) of the GNU General Public License version 3, |
| 32 | 29 | * these Appropriate Legal Notices must retain the display of the "Powered by |
| 33 | - * KnowledgeTree" logo and retain the original copyright notice. If the display of the | |
| 30 | + * KnowledgeTree" logo and retain the original copyright notice. If the display of the | |
| 34 | 31 | * logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices |
| 35 | - * must display the words "Powered by KnowledgeTree" and retain the original | |
| 36 | - * copyright notice. | |
| 32 | + * must display the words "Powered by KnowledgeTree" and retain the original | |
| 33 | + * copyright notice. | |
| 37 | 34 | * Contributor( s): ______________________________________ |
| 35 | + * | |
| 38 | 36 | */ |
| 39 | 37 | |
| 40 | 38 | require_once(KT_LIB_DIR . "/ktentity.inc"); |
| ... | ... | @@ -76,6 +74,9 @@ class KTMetadataUtil { |
| 76 | 74 | */ |
| 77 | 75 | |
| 78 | 76 | $oBehaviour =& KTUtil::getObject('KTFieldBehaviour', $oBehaviour); |
| 77 | + if(PEAR::isError($oBehaviour)) { | |
| 78 | + return array(); | |
| 79 | + } | |
| 79 | 80 | |
| 80 | 81 | $GLOBALS['default']->log->debug('KTMetadataUtil::_getNextForBehaviour, behaviour is ' . $oBehaviour->getId()); |
| 81 | 82 | |
| ... | ... | @@ -189,6 +190,7 @@ class KTMetadataUtil { |
| 189 | 190 | //var_dump($lookup); exit(0); |
| 190 | 191 | $oValueInstance = KTValueInstance::getByLookupSingle($lookup); |
| 191 | 192 | if (PEAR::isError($oValueInstance) || is_null($oValueInstance) || ($oValueInstance === false)) { return true; } // throw an error |
| 193 | + | |
| 192 | 194 | $aValues = KTMetadataUtil::_getNextForBehaviour($oValueInstance->getBehaviourId(), $aCurrentSelections); |
| 193 | 195 | $GLOBALS['default']->log->debug('KTMetadataUtil::getNext, values are ' . print_r($aValues, true)); |
| 194 | 196 | $aReturn = array(); | ... | ... |
lib/plugins/plugin.inc.php
| ... | ... | @@ -694,7 +694,6 @@ class KTPlugin { |
| 694 | 694 | // capture the filname version. |
| 695 | 695 | // remember to -start- the upgrade from the "next" version |
| 696 | 696 | $iEndVersion = $this->upgradePlugin($oEntity->getVersion()+1, $this->iVersion); |
| 697 | - } | |
| 698 | 697 | |
| 699 | 698 | if ($iEndVersion != $this->iVersion) { |
| 700 | 699 | // we obviously failed. |
| ... | ... | @@ -716,6 +715,7 @@ class KTPlugin { |
| 716 | 715 | )); |
| 717 | 716 | |
| 718 | 717 | } |
| 718 | + } | |
| 719 | 719 | /* ** Quick fix for optimisation. Reread must run plugin setup. ** */ |
| 720 | 720 | $this->setup(); |
| 721 | 721 | return $oEntity; | ... | ... |
plugins/ktcore/admin/fieldsets/conditional.inc.php
| 1 | 1 | <?php |
| 2 | - | |
| 3 | 2 | /** |
| 4 | 3 | * $Id$ |
| 5 | 4 | * |
| 6 | 5 | * KnowledgeTree Open Source Edition |
| 7 | 6 | * Document Management Made Simple |
| 8 | 7 | * Copyright (C) 2004 - 2008 The Jam Warehouse Software (Pty) Limited |
| 9 | - * | |
| 8 | + * | |
| 10 | 9 | * This program is free software; you can redistribute it and/or modify it under |
| 11 | 10 | * the terms of the GNU General Public License version 3 as published by the |
| 12 | 11 | * Free Software Foundation. |
| 13 | - * | |
| 12 | + * | |
| 14 | 13 | * This program is distributed in the hope that it will be useful, but WITHOUT |
| 15 | 14 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
| 16 | 15 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more |
| 17 | 16 | * details. |
| 18 | - * | |
| 17 | + * | |
| 19 | 18 | * You should have received a copy of the GNU General Public License |
| 20 | 19 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 21 | - * | |
| 20 | + * | |
| 22 | 21 | * You can contact The Jam Warehouse Software (Pty) Limited, Unit 1, Tramber Place, |
| 23 | 22 | * Blake Street, Observatory, 7925 South Africa. or email info@knowledgetree.com. |
| 24 | - * | |
| 23 | + * | |
| 25 | 24 | * The interactive user interfaces in modified source and object code versions |
| 26 | 25 | * of this program must display Appropriate Legal Notices, as required under |
| 27 | 26 | * Section 5 of the GNU General Public License version 3. |
| 28 | - * | |
| 27 | + * | |
| 29 | 28 | * In accordance with Section 7(b) of the GNU General Public License version 3, |
| 30 | 29 | * 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 | |
| 30 | + * KnowledgeTree" logo and retain the original copyright notice. If the display of the | |
| 32 | 31 | * logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices |
| 33 | - * must display the words "Powered by KnowledgeTree" and retain the original | |
| 34 | - * copyright notice. | |
| 32 | + * must display the words "Powered by KnowledgeTree" and retain the original | |
| 33 | + * copyright notice. | |
| 35 | 34 | * Contributor( s): ______________________________________ |
| 36 | 35 | * |
| 37 | 36 | */ | ... | ... |