Changeset 16015


Ignore:
Timestamp:
Jun 24, 2012, 9:20:19 PM (12 years ago)
Author:
grum
Message:

feature:2643- compatibility with Piwigo 2.4

Location:
extensions/UserStat
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • extensions/UserStat/main.inc.php

    r15374 r16015  
    6868
    6969//UserStat loaded and active only if in admin page
    70 if(basename($_SERVER["PHP_SELF"])=='admin.php')
     70if(defined('IN_ADMIN') && !defined('AJAX_CALL'))
    7171{
    7272  include_once("userstat_aim.class.inc.php");
  • extensions/UserStat/userstat_aim.class.inc.php

    r10344 r16015  
    1717
    1818include_once('userstat_root.class.inc.php');
    19 include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/GPCCss.class.inc.php');
    2019
    2120class UserStat_AIM extends UserStat_root
     
    3433    add_event_handler('get_admin_plugin_menu_links', array(&$this, 'pluginAdminMenu') );
    3534  }
    36 
    37 
    3835} // UserStat_Plugin class
    3936
  • extensions/UserStat/userstat_aip.class.inc.php

    r15374 r16015  
    4444    parent::__destruct();
    4545  }
    46 
    47   /*
    48     initialize events call for the plugin
    49   */
    50   function initEvents()
    51   {
    52     add_event_handler('loc_end_page_header', array(&$this->css, 'applyCSS'));
    53   }
    54 
    5546
    5647
  • extensions/UserStat/userstat_root.class.inc.php

    r10344 r16015  
    2222
    2323include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/CommonPlugin.class.inc.php');
    24 include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/GPCCss.class.inc.php');
    2524
    2625class UserStat_root extends CommonPlugin
    2726{
    28   protected $css;   //the css object
    29 
    3027  public function __construct($prefixeTable, $filelocation)
    3128  {
     
    3330    $this->setPluginNameFiles("userstat");
    3431    parent::__construct($prefixeTable, $filelocation);
    35     $this->css = new GPCCss(dirname($this->getFileLocation()).'/'.$this->getPluginNameFiles().".css");
    36   }
    37 
    38   public function __destruct()
    39   {
    40     unset($this->css);
    41     parent::__destruct();
    4232  }
    4333
     
    4636  --------------------------------------------------------------------------- */
    4737
    48   /* this function initialize var $config with default values */
    49   /*
    50     initialization of config properties
    51   */
    52   function initConfig()
     38  public function loadCSS()
    5339  {
    54     $this->config=array(
    55     );
     40    parent::loadCSS();
     41    GPCCore::addHeaderCSS('userstat.css', 'plugins/'.$this->getDirectory().'/'.$this->getPluginNameFiles().".css");
    5642  }
    57 
    5843}
    5944
Note: See TracChangeset for help on using the changeset viewer.