Commit a21769a9ae3385fe45071304bb459e7e3e6b576e
1 parent
2968ae7b
KTS-2709
"After re-activating the Tag Cloud plugin this does not work" Fixed. Hid Tag fieldset and linked it to tag cloud plugin. Committed By: Jonathan Byrne Reviewed By: Jalaoedien Abrahams git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@7798 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
2 changed files
with
28 additions
and
1 deletions
plugins/ktcore/admin/documentFieldsv2.php
| @@ -66,7 +66,7 @@ class KTDocumentFieldDispatcher extends KTAdminDispatcher { | @@ -66,7 +66,7 @@ class KTDocumentFieldDispatcher extends KTAdminDispatcher { | ||
| 66 | 66 | ||
| 67 | $oTemplate->setData(array( | 67 | $oTemplate->setData(array( |
| 68 | 'context' => $this, | 68 | 'context' => $this, |
| 69 | - 'fieldsets' => KTFieldset::getList('disabled != true'), | 69 | + 'fieldsets' => KTFieldset::getList("disabled != true AND namespace != 'tagcloud'"), |
| 70 | )); | 70 | )); |
| 71 | return $oTemplate; | 71 | return $oTemplate; |
| 72 | } | 72 | } |
plugins/ktcore/admin/plugins.php
| @@ -75,6 +75,33 @@ class KTPluginDispatcher extends KTAdminDispatcher { | @@ -75,6 +75,33 @@ class KTPluginDispatcher extends KTAdminDispatcher { | ||
| 75 | $sTable = KTUtil::getTableName('plugins'); | 75 | $sTable = KTUtil::getTableName('plugins'); |
| 76 | $aIds = (array) KTUtil::arrayGet($_REQUEST, 'pluginids'); | 76 | $aIds = (array) KTUtil::arrayGet($_REQUEST, 'pluginids'); |
| 77 | KTPluginEntity::setEnabled($aIds); | 77 | KTPluginEntity::setEnabled($aIds); |
| 78 | + //enabling or disabling Tag fieldset depending on whether tag cloud plugin is enabled or disabled. | ||
| 79 | + //Get tag cloud object | ||
| 80 | + $oTagClouPlugin = KTPluginEntity::getByNamespace('ktcore.tagcloud.plugin'); | ||
| 81 | + if($oTagClouPlugin->getDisabled() == '1') | ||
| 82 | + { | ||
| 83 | + //disable tag fieldset | ||
| 84 | + $aFV = array( | ||
| 85 | + 'disabled' => true, | ||
| 86 | + ); | ||
| 87 | + $aWFV = array( | ||
| 88 | + 'namespace' => 'tagcloud' | ||
| 89 | + ); | ||
| 90 | + $res = DBUtil::whereUpdate('fieldsets', $aFV, $aWFV); | ||
| 91 | + } | ||
| 92 | + //if Tag Cloud plugin disabled | ||
| 93 | + if($oTagClouPlugin->getDisabled() == '0') | ||
| 94 | + { | ||
| 95 | + //enable tag fieldset | ||
| 96 | + $aFV = array( | ||
| 97 | + 'disabled' => false, | ||
| 98 | + ); | ||
| 99 | + $aWFV = array( | ||
| 100 | + 'namespace' => 'tagcloud' | ||
| 101 | + ); | ||
| 102 | + $res = DBUtil::whereUpdate('fieldsets', $aFV, $aWFV); | ||
| 103 | + } | ||
| 104 | + | ||
| 78 | $this->successRedirectToMain(_kt('Plugins updated')); | 105 | $this->successRedirectToMain(_kt('Plugins updated')); |
| 79 | } | 106 | } |
| 80 | 107 |