Changeset 25577
- Timestamp:
- Nov 19, 2013, 4:41:05 PM (10 years ago)
- Location:
- trunk/admin/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/include/plugins.class.php
r25406 r25577 30 30 function install($plugin_version, &$errors=array()) 31 31 { 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 } 33 36 } 34 37 function activate($plugin_version, &$errors=array()) 35 38 { 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 } 37 43 } 38 44 function deactivate() 39 45 { 40 return $this->__call(__FUNCTION__, func_get_args()); 46 if (is_callable('plugin_install')) 47 { 48 return plugin_install($this->plugin_id); 49 } 41 50 } 42 51 function uninstall() 43 52 { 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 } 55 57 } 56 58 } -
trunk/admin/include/themes.class.php
r25406 r25577 30 30 function activate($theme_version, &$errors=array()) 31 31 { 32 return $this->__call(__FUNCTION__, func_get_args()); 32 if (is_callable('theme_activate')) 33 { 34 return theme_activate($this->theme_id, $theme_version, $errors); 35 } 33 36 } 34 37 function deactivate() 35 38 { 36 return $this->__call(__FUNCTION__, func_get_args()); 39 if (is_callable('theme_deactivate')) 40 { 41 return theme_deactivate($this->theme_id); 42 } 37 43 } 38 44 function delete() 39 45 { 40 return $this->__call(__FUNCTION__, func_get_args()); 41 } 42 43 function __call($name, $arguments) 44 { 45 if (is_callable('theme_'.$name)) 46 { 47 array_unshift($arguments, $this->theme_id); 48 return call_user_func_array('theme_'.$name, $arguments); 49 } 50 return null; 46 if (is_callable('theme_delete')) 47 { 48 return theme_delete($this->theme_id); 49 } 51 50 } 52 51 }
Note: See TracChangeset
for help on using the changeset viewer.