aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2013-11-19 15:41:05 +0000
committermistic100 <mistic@piwigo.org>2013-11-19 15:41:05 +0000
commit6f211a609ad750106a7366ac656b434825db0b20 (patch)
tree84a063e9b664a613223d3afb14706fe45a2e54ce /admin
parent9bd6264087068d3635582fee32a4ebdbd87ff187 (diff)
feature 2998: Warning: Parameter 3 to theme_activate() expected to be a reference, value given
unable to pass references through func_get_args and call_user_func_array git-svn-id: http://piwigo.org/svn/trunk@25577 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin')
-rw-r--r--admin/include/plugins.class.php26
-rw-r--r--admin/include/themes.class.php21
2 files changed, 24 insertions, 23 deletions
diff --git a/admin/include/plugins.class.php b/admin/include/plugins.class.php
index 197bed678..e5e6d47f4 100644
--- a/admin/include/plugins.class.php
+++ b/admin/include/plugins.class.php
@@ -29,29 +29,31 @@ class DummyPlugin_maintain extends PluginMaintain
{
function install($plugin_version, &$errors=array())
{
- return $this->__call(__FUNCTION__, func_get_args());
+ if (is_callable('plugin_install'))
+ {
+ return plugin_install($this->plugin_id, $plugin_version, $errors);
+ }
}
function activate($plugin_version, &$errors=array())
{
- return $this->__call(__FUNCTION__, func_get_args());
+ if (is_callable('plugin_activate'))
+ {
+ return plugin_activate($this->plugin_id, $plugin_version, $errors);
+ }
}
function deactivate()
{
- return $this->__call(__FUNCTION__, func_get_args());
+ if (is_callable('plugin_install'))
+ {
+ return plugin_install($this->plugin_id);
+ }
}
function uninstall()
{
- return $this->__call(__FUNCTION__, func_get_args());
- }
-
- function __call($name, $arguments)
- {
- if (is_callable('plugin_'.$name))
+ if (is_callable('plugin_uninstall'))
{
- array_unshift($arguments, $this->plugin_id);
- return call_user_func_array('plugin_'.$name, $arguments);
+ return plugin_uninstall($this->plugin_id);
}
- return null;
}
}
diff --git a/admin/include/themes.class.php b/admin/include/themes.class.php
index a86828057..26e15c654 100644
--- a/admin/include/themes.class.php
+++ b/admin/include/themes.class.php
@@ -29,25 +29,24 @@ class DummyTheme_maintain extends ThemeMaintain
{
function activate($theme_version, &$errors=array())
{
- return $this->__call(__FUNCTION__, func_get_args());
+ if (is_callable('theme_activate'))
+ {
+ return theme_activate($this->theme_id, $theme_version, $errors);
+ }
}
function deactivate()
{
- return $this->__call(__FUNCTION__, func_get_args());
+ if (is_callable('theme_deactivate'))
+ {
+ return theme_deactivate($this->theme_id);
+ }
}
function delete()
{
- return $this->__call(__FUNCTION__, func_get_args());
- }
-
- function __call($name, $arguments)
- {
- if (is_callable('theme_'.$name))
+ if (is_callable('theme_delete'))
{
- array_unshift($arguments, $this->theme_id);
- return call_user_func_array('theme_'.$name, $arguments);
+ return theme_delete($this->theme_id);
}
- return null;
}
}