Ignore:
Timestamp:
May 6, 2020, 10:12:14 PM (5 years ago)
Author:
ddtddt
Message:

[Photo_add_by]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/Photo_add_by/maintain.class.php

    r32181 r32182  
    2222defined('PHPWG_ROOT_PATH') or die('Hacking attempt!');
    2323
    24 class Photo_add_by_maintain extends PluginMaintain
    25 {
     24class Photo_add_by_maintain extends PluginMaintain{
    2625  private $installed = false;
    2726
    28   function __construct($plugin_id)
    29   {
     27  function __construct($plugin_id){
    3028    parent::__construct($plugin_id);
    3129  }
    3230
    33   function install($plugin_version, &$errors=array())
    34   {
    35  
    36    
     31  function install($plugin_version, &$errors=array()){
     32   
    3733  }
    3834
    39   function activate($plugin_version, &$errors=array())
    40   {
    41       global $conf;
    42    
     35  function activate($plugin_version, &$errors=array()){
     36        global $conf, $template;
    4337    if (!isset($conf['Photo_add_by'])){
    4438        conf_update_param('Photo_add_by', 'Categories',true);
     
    5044  }
    5145
    52   function update($old_version, $new_version, &$errors=array())
    53   {
     46  function update($old_version, $new_version, &$errors=array()){
    5447    global $conf;
    55    
    5648    if (!isset($conf['Photo_add_by'])){
    5749        conf_update_param('Photo_add_by', 'Categories',true);
     
    6052        conf_update_param('Photo_add_by_show',0,true);
    6153    }
    62 
    6354  }
    6455 
    65   function deactivate()
    66   {
     56  function deactivate(){
     57        global $template;
    6758        $template->delete_compiled_templates(array('picture' => 'picture.tpl'));
    6859  }
    6960
    70   function uninstall()
    71   {
     61  function uninstall(){
    7262    conf_delete_param('Photo_add_by_show','Photo_add_by');
    73    
    7463  }
    7564}
Note: See TracChangeset for help on using the changeset viewer.