Commit 2727dfe35e40f12143239dfe58f984164608648d
1 parent
66cbe3ce
- plugin registration failed on NULL constraints for first-time registration.
- plugin update needed to use 1/0, not true/false git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@4585 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
2 changed files
with
3 additions
and
2 deletions
lib/plugins/plugin.inc.php
| @@ -202,6 +202,7 @@ class KTPlugin { | @@ -202,6 +202,7 @@ class KTPlugin { | ||
| 202 | 'namespace' => $this->sNamespace, | 202 | 'namespace' => $this->sNamespace, |
| 203 | 'path' => $this->sFilename, | 203 | 'path' => $this->sFilename, |
| 204 | 'version' => $this->iVersion, | 204 | 'version' => $this->iVersion, |
| 205 | + 'disabled' => 1, | ||
| 205 | )); | 206 | )); |
| 206 | if (PEAR::isError($oEntity)) { | 207 | if (PEAR::isError($oEntity)) { |
| 207 | return $oEntity; | 208 | return $oEntity; |
plugins/ktcore/admin/plugins.php
| @@ -39,9 +39,9 @@ class KTPluginDispatcher extends KTAdminDispatcher { | @@ -39,9 +39,9 @@ class KTPluginDispatcher extends KTAdminDispatcher { | ||
| 39 | $sTable = KTUtil::getTableName('plugins'); | 39 | $sTable = KTUtil::getTableName('plugins'); |
| 40 | $aIds = KTUtil::arrayGet($_REQUEST, 'pluginids'); | 40 | $aIds = KTUtil::arrayGet($_REQUEST, 'pluginids'); |
| 41 | $sIds = DBUtil::paramArray($aIds); | 41 | $sIds = DBUtil::paramArray($aIds); |
| 42 | - $sQuery = sprintf('UPDATE %s SET disabled = true WHERE id NOT IN (%s)', $sTable, $sIds); | 42 | + $sQuery = sprintf('UPDATE %s SET disabled = 1 WHERE id NOT IN (%s)', $sTable, $sIds); |
| 43 | DBUtil::runQuery(array($sQuery, $aIds)); | 43 | DBUtil::runQuery(array($sQuery, $aIds)); |
| 44 | - $sQuery = sprintf('UPDATE %s SET disabled = false WHERE id IN (%s)', $sTable, $sIds); | 44 | + $sQuery = sprintf('UPDATE %s SET disabled = 0 WHERE id IN (%s)', $sTable, $sIds); |
| 45 | DBUtil::runQuery(array($sQuery, $aIds)); | 45 | DBUtil::runQuery(array($sQuery, $aIds)); |
| 46 | $this->successRedirectToMain('Plugins updated'); | 46 | $this->successRedirectToMain('Plugins updated'); |
| 47 | } | 47 | } |