Ignore:
Timestamp:
Nov 19, 2013, 4:41:05 PM (10 years ago)
Author:
mistic100
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/include/plugins.class.php

    r25406 r25577  
    3030  function install($plugin_version, &$errors=array())
    3131  {
    32     return $this->__call(__FUNCTION__, func_get_args());
     32    if (is_callable('plugin_install'))
     33    {
     34      return plugin_install($this->plugin_id, $plugin_version, $errors);
     35    }
    3336  }
    3437  function activate($plugin_version, &$errors=array())
    3538  {
    36     return $this->__call(__FUNCTION__, func_get_args());
     39    if (is_callable('plugin_activate'))
     40    {
     41      return plugin_activate($this->plugin_id, $plugin_version, $errors);
     42    }
    3743  }
    3844  function deactivate()
    3945  {
    40     return $this->__call(__FUNCTION__, func_get_args());
     46    if (is_callable('plugin_install'))
     47    {
     48      return plugin_install($this->plugin_id);
     49    }
    4150  }
    4251  function uninstall()
    4352  {
    44     return $this->__call(__FUNCTION__, func_get_args());
    45   }
    46 
    47   function __call($name, $arguments)
    48   {
    49     if (is_callable('plugin_'.$name))
    50     {
    51       array_unshift($arguments, $this->plugin_id);
    52       return call_user_func_array('plugin_'.$name, $arguments);
    53     }
    54     return null;
     53    if (is_callable('plugin_uninstall'))
     54    {
     55      return plugin_uninstall($this->plugin_id);
     56    }
    5557  }
    5658}
Note: See TracChangeset for help on using the changeset viewer.