aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2014-02-05 20:15:05 +0000
committermistic100 <mistic@piwigo.org>2014-02-05 20:15:05 +0000
commitbed530cc88457273561ab4410c67dc185b53922a (patch)
tree5314c77331e29944708ab927706724c8087ed48e /include
parentec1f93b9873b70c5e5383ee858eae5b9de01bc65 (diff)
PluginMaintain is not abstract anymore, allowing partial declaration
git-svn-id: http://piwigo.org/svn/trunk@27221 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--include/functions_plugins.inc.php30
1 files changed, 12 insertions, 18 deletions
diff --git a/include/functions_plugins.inc.php b/include/functions_plugins.inc.php
index d3825a047..b1f4645d0 100644
--- a/include/functions_plugins.inc.php
+++ b/include/functions_plugins.inc.php
@@ -35,7 +35,7 @@ define('EVENT_HANDLER_PRIORITY_NEUTRAL', 50);
/**
* Used to declare maintenance methods of a plugin.
*/
-abstract class PluginMaintain
+class PluginMaintain
{
/** @var string $plugin_id */
protected $plugin_id;
@@ -52,17 +52,17 @@ abstract class PluginMaintain
* @param string $plugin_version
* @param array &$errors - used to return error messages
*/
- abstract function install($plugin_version, &$errors=array());
+ function install($plugin_version, &$errors=array()) {}
/**
* @param string $plugin_version
* @param array &$errors - used to return error messages
*/
- abstract function activate($plugin_version, &$errors=array());
+ function activate($plugin_version, &$errors=array()) {}
- abstract function deactivate();
+ function deactivate() {}
- abstract function uninstall();
+ function uninstall() {}
/**
* Tests if the plugin needs to be updated and call an update function
@@ -104,7 +104,7 @@ UPDATE '. PLUGINS_TABLE .'
/**
* Used to declare maintenance methods of a theme.
*/
-abstract class ThemeMaintain
+class ThemeMaintain
{
/** @var string $theme_id */
protected $theme_id;
@@ -121,11 +121,11 @@ abstract class ThemeMaintain
* @param string $theme_version
* @param array &$errors - used to return error messages
*/
- abstract function activate($theme_version, &$errors=array());
+ function activate($theme_version, &$errors=array()) {}
- abstract function deactivate();
+ function deactivate() {}
- abstract function delete();
+ function delete() {}
/**
* Tests if the theme needs to be updated and call an update function
@@ -398,17 +398,11 @@ SELECT * FROM '.PLUGINS_TABLE;
}
if (count($clauses))
{
- $query .= '
+ $query .= '
WHERE '. implode(' AND ', $clauses);
}
-
- $result = pwg_query($query);
- $plugins = array();
- while ($row = pwg_db_fetch_assoc($result))
- {
- $plugins[] = $row;
- }
- return $plugins;
+
+ return query2array($query);
}
/**