Dotclear

Changeset 938:71494b3e512d


Ignore:
Timestamp:
10/29/12 19:48:59 (13 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Add plugins management behaviours (add, activate, deactivate), fixes #388

File:
1 edited

Legend:

Unmodified
Added
Removed
  • admin/plugins.php

    r926 r938  
    8585               } 
    8686                
     87               # --BEHAVIOR-- pluginBeforeDeactivate 
     88               $core->callBehavior('pluginsBeforeDeactivate', $plugin); 
     89                     
    8790               $core->plugins->deactivateModule($plugin_id); 
     91 
     92               # --BEHAVIOR-- pluginAfterDeactivate 
     93               $core->callBehavior('pluginsAfterDeactivate', $plugin); 
     94                     
    8895               http::redirect('plugins.php'); 
    8996          } 
     
    102109                    throw new Exception(__('No such plugin.')); 
    103110               } 
     111 
     112               # --BEHAVIOR-- pluginBeforeActivate 
     113               $core->callBehavior('pluginsBeforeActivate', $plugin); 
     114                
    104115               $core->plugins->activateModule($plugin_id); 
     116 
     117               # --BEHAVIOR-- pluginAfterActivate 
     118               $core->callBehavior('pluginsAfterActivate', $plugin); 
     119                
    105120               http::redirect('plugins.php'); 
    106121          } 
     
    150165                    unset($client); 
    151166               } 
    152                 
     167 
     168               # --BEHAVIOR-- pluginBeforeAdd 
     169               $core->callBehavior('pluginsBeforeAdd', $plugin); 
     170                               
    153171               $ret_code = $core->plugins->installPackage($dest,$core->plugins); 
     172 
     173               # --BEHAVIOR-- pluginAfterAdd 
     174               $core->callBehavior('pluginsAfterAdd', $plugin); 
     175                
    154176               http::redirect('plugins.php?added='.$ret_code); 
    155177          } 
Note: See TracChangeset for help on using the changeset viewer.

Sites map