Index: /extensions/AStat/admin/plugin_admin.php
===================================================================
--- /extensions/AStat/admin/plugin_admin.php	(revision 5545)
+++ /extensions/AStat/admin/plugin_admin.php	(revision 5546)
@@ -22,5 +22,5 @@
 $main_plugin_object = get_plugin_data($plugin_id);
 
-$plugin_ai = new AStat_AIP($prefixeTable, $main_plugin_object->get_filelocation());
+$plugin_ai = new AStat_AIP($prefixeTable, $main_plugin_object->getFileLocation());
 $plugin_ai->manage();
 
Index: /extensions/AStat/astat_aim.class.inc.php
===================================================================
--- /extensions/AStat/astat_aim.class.inc.php	(revision 5545)
+++ /extensions/AStat/astat_aim.class.inc.php	(revision 5546)
@@ -16,8 +16,8 @@
 if (!defined('PHPWG_ROOT_PATH')) { die('Hacking attempt!'); }
 
-include_once(PHPWG_PLUGINS_PATH.'grum_plugins_classes-2/common_plugin.class.inc.php');
-include_once(PHPWG_PLUGINS_PATH.'grum_plugins_classes-2/css.class.inc.php');
-
-class AStat_AIM extends common_plugin
+include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/CommonPlugin.class.inc.php');
+include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/GPCCss.class.inc.php');
+
+class AStat_AIM extends CommonPlugin
 {
   protected $css = null;
@@ -25,8 +25,8 @@
   function AStat_AIM($prefixeTable, $filelocation)
   {
-    $this->plugin_name="AStat.2";
-    $this->plugin_name_files="astat";
+    $this->setPluginName("AStat.2");
+    $this->setPluginNameFiles("astat");
     parent::__construct($prefixeTable, $filelocation);
-    $this->css = new css(dirname($this->filelocation).'/'.$this->plugin_name_files.".css");
+    $this->css = new GPCCss(dirname($this->getFileLocation()).'/'.$this->getPluginNameFiles().".css");
   }
 
@@ -34,7 +34,7 @@
     initialize events call for the plugin
   */
-  function init_events()
-  {
-    add_event_handler('get_admin_plugin_menu_links', array(&$this, 'plugin_admin_menu') );
+  function initEvents()
+  {
+    add_event_handler('get_admin_plugin_menu_links', array(&$this, 'pluginAdminMenu') );
   }
 
@@ -43,7 +43,7 @@
     initialization of config properties
   */
-  function init_config()
-  {
-    $this->my_config=array(
+  function initConfig()
+  {
+    $this->config=array(
       'AStat_BarColor_Pages' => '6666ff',
       'AStat_BarColor_Img' => '66ff66',
@@ -69,23 +69,23 @@
 
   /*
-    surchage of common_plugin->save_config function
-  */
-  function load_config()
-  {
-    parent::load_config();
-    if(!$this->css->css_file_exists())
-    {
-      $this->css->make_CSS($this->generate_CSS());
-    }
-  }
-
-  /*
-    surchage of common_plugin->save_config function
-  */
-  function save_config()
-  {
-    if(parent::save_config())
-    {
-      $this->css->make_CSS($this->generate_CSS());
+    surchage of CommonPlugin->saveConfig function
+  */
+  function loadConfig()
+  {
+    parent::loadConfig();
+    if(!$this->css->fileExists())
+    {
+      $this->css->makeCSS($this->generate_CSS());
+    }
+  }
+
+  /*
+    surchage of CommonPlugin->saveConfig function
+  */
+  function saveConfig()
+  {
+    if(parent::saveConfig())
+    {
+      $this->css->makeCSS($this->generate_CSS());
       return(true);
     }
@@ -114,14 +114,14 @@
       padding:0px;
       }
-       .AStatBar1 { background-color:#".$this->my_config['AStat_BarColor_Pages']."; top:5px;  }
-       .AStatBar2 { background-color:#".$this->my_config['AStat_BarColor_Img']."; top:-3px; }
-       .AStatBar3 { background-color:#".$this->my_config['AStat_BarColor_IP']."; top:-3px;}
-       .AStatBar4 { background-color:#".$this->my_config['AStat_BarColor_Cat']."; top:-3px;}
+       .AStatBar1 { background-color:#".$this->config['AStat_BarColor_Pages']."; top:5px;  }
+       .AStatBar2 { background-color:#".$this->config['AStat_BarColor_Img']."; top:-3px; }
+       .AStatBar3 { background-color:#".$this->config['AStat_BarColor_IP']."; top:-3px;}
+       .AStatBar4 { background-color:#".$this->config['AStat_BarColor_Cat']."; top:-3px;}
        .AStatBarX { background-color:transparent; top:-3px; height:1px; }
-       .MiniSquare1 { color:#".$this->my_config['AStat_BarColor_Pages'].";   }
-       .MiniSquare2 { color:#".$this->my_config['AStat_BarColor_Img'].";  }
-       .MiniSquare3 { color:#".$this->my_config['AStat_BarColor_IP']."; }
-       .MiniSquare4 { color:#".$this->my_config['AStat_BarColor_Cat']."; }
-       .StatTableRow:hover { background-color:#".$this->my_config['AStat_MouseOverColor']."; }
+       .MiniSquare1 { color:#".$this->config['AStat_BarColor_Pages'].";   }
+       .MiniSquare2 { color:#".$this->config['AStat_BarColor_Img'].";  }
+       .MiniSquare3 { color:#".$this->config['AStat_BarColor_IP']."; }
+       .MiniSquare4 { color:#".$this->config['AStat_BarColor_Cat']."; }
+       .StatTableRow:hover { background-color:#".$this->config['AStat_MouseOverColor']."; }
        .formtable, .formtable P { text-align:left; display:block; }
        .formtable tr { vertical-align:top; }
Index: /extensions/AStat/astat_aip.class.inc.php
===================================================================
--- /extensions/AStat/astat_aip.class.inc.php	(revision 5545)
+++ /extensions/AStat/astat_aip.class.inc.php	(revision 5546)
@@ -17,5 +17,5 @@
 include_once('astat_aim.class.inc.php');
 include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
-include_once(PHPWG_PLUGINS_PATH.'grum_plugins_classes-2/ajax.class.inc.php');
+include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/GPCAjax.class.inc.php');
 
 class AStat_AIP extends AStat_AIM
@@ -26,5 +26,4 @@
   protected $list_sortimg = array('picture', 'catname');
   protected $list_sortip = array('page', 'picture', 'ip');
-  protected $ajax;
 
   protected $catfilter;    //filter on categories
@@ -36,28 +35,27 @@
     parent::__construct($prefixeTable, $filelocation);
 
-    $this->load_config();
-    $this->init_events();
+    $this->loadConfig();
+    $this->initEvents();
 
     $this->tabsheet = new tabsheet();
     $this->tabsheet->add('stats_by_period',
                           l10n('AStat_by_period'),
-                          $this->page_link.'&amp;fAStat_tabsheet=stats_by_period');
+                          $this->getAdminLink().'&amp;fAStat_tabsheet=stats_by_period');
     $this->tabsheet->add('stats_by_ip',
                           l10n('AStat_by_ip'),
-                          $this->page_link.'&amp;fAStat_tabsheet=stats_by_ip');
+                          $this->getAdminLink().'&amp;fAStat_tabsheet=stats_by_ip');
     $this->tabsheet->add('stats_by_category',
                           l10n('AStat_by_category'),
-                          $this->page_link.'&amp;fAStat_tabsheet=stats_by_category');
+                          $this->getAdminLink().'&amp;fAStat_tabsheet=stats_by_category');
     $this->tabsheet->add('stats_by_image',
                           l10n('AStat_by_image'),
-                          $this->page_link.'&amp;fAStat_tabsheet=stats_by_image');
+                          $this->getAdminLink().'&amp;fAStat_tabsheet=stats_by_image');
     $this->tabsheet->add('config',
                           l10n('AStat_config'),
-                          $this->page_link.'&amp;fAStat_tabsheet=config');
+                          $this->getAdminLink().'&amp;fAStat_tabsheet=config');
     $this->tabsheet->add('tools',
                           l10n('AStat_tools'),
-                          $this->page_link.'&amp;fAStat_tabsheet=tools');
-
-    $this->ajax = new Ajax();
+                          $this->getAdminLink().'&amp;fAStat_tabsheet=tools');
+
   }
 
@@ -65,7 +63,7 @@
     initialize events call for the plugin
   */
-  function init_events()
-  {
-    add_event_handler('loc_end_page_header', array(&$this->css, 'apply_CSS'));
+  function initEvents()
+  {
+    add_event_handler('loc_end_page_header', array(&$this->css, 'applyCSS'));
   }
 
@@ -92,5 +90,5 @@
     if($_REQUEST['fAStat_catfilter']!="")
     {
-      $this->page_link.="&amp;fAStat_catfilter=".$_REQUEST['fAStat_catfilter'];
+      $this->setAdminLink($this->getAdminLink()."&amp;fAStat_catfilter=".$_REQUEST['fAStat_catfilter']);
     }
 
@@ -102,6 +100,6 @@
           $_REQUEST['fAStat_month'],
           $_REQUEST['fAStat_day'],
-          $this->my_config['AStat_MaxBarWidth'],
-          $this->my_config['AStat_SeeTimeRequests']
+          $this->config['AStat_MaxBarWidth'],
+          $this->config['AStat_SeeTimeRequests']
       );
     }
@@ -117,9 +115,9 @@
           $_REQUEST['fAStat_month'],
           $_REQUEST['fAStat_day'],
-          $this->my_config['AStat_MaxBarWidth'],
-          $this->my_config['AStat_NpIPPerPages'],
+          $this->config['AStat_MaxBarWidth'],
+          $this->config['AStat_NpIPPerPages'],
           $_REQUEST['fAStat_page_number'],
           $_REQUEST['fAStat_SortIP'],
-          $this->my_config['AStat_SeeTimeRequests']
+          $this->config['AStat_SeeTimeRequests']
       );
     }
@@ -130,10 +128,10 @@
           $_REQUEST['fAStat_month'],
           $_REQUEST['fAStat_day'],
-          $this->my_config['AStat_MaxBarWidth'],
-          $this->my_config['AStat_NpCatPerPages'],
+          $this->config['AStat_MaxBarWidth'],
+          $this->config['AStat_NpCatPerPages'],
           $_REQUEST['fAStat_page_number'],
-          $this->my_config['AStat_ShowThumbCat'],
+          $this->config['AStat_ShowThumbCat'],
           $_REQUEST['fAStat_SortCat'],
-          $this->my_config['AStat_SeeTimeRequests']
+          $this->config['AStat_SeeTimeRequests']
       );
     }
@@ -144,11 +142,11 @@
           $_REQUEST['fAStat_month'],
           $_REQUEST['fAStat_day'],
-          $this->my_config['AStat_MaxBarWidth'],
-          $this->my_config['AStat_NbImgPerPages'],
+          $this->config['AStat_MaxBarWidth'],
+          $this->config['AStat_NbImgPerPages'],
           $_REQUEST['fAStat_page_number'],
-          $this->my_config['AStat_ShowThumbImg'],
+          $this->config['AStat_ShowThumbImg'],
           $_REQUEST['fAStat_SortImg'],
           $_REQUEST['fAStat_IP'],
-          $this->my_config['AStat_SeeTimeRequests']
+          $this->config['AStat_SeeTimeRequests']
       );
     }
@@ -197,6 +195,5 @@
           break;
       }
-      //$template->
-      $this->ajax->return_result($result);
+      GPCAjax::returnResult($result);
     }
   }
@@ -223,13 +220,13 @@
     if(!array_key_exists('fAStat_SortCat', $_REQUEST))
     {
-      $_REQUEST['fAStat_SortCat']=$this->my_config['AStat_DefaultSortCat'];
+      $_REQUEST['fAStat_SortCat']=$this->config['AStat_DefaultSortCat'];
     }
     if(!array_key_exists('fAStat_SortImg', $_REQUEST))
     {
-      $_REQUEST['fAStat_SortImg']=$this->my_config['AStat_DefaultSortImg'];
+      $_REQUEST['fAStat_SortImg']=$this->config['AStat_DefaultSortImg'];
     }
     if(!array_key_exists('fAStat_SortIP', $_REQUEST))
     {
-      $_REQUEST['fAStat_SortIP']=$this->my_config['AStat_DefaultSortIP'];
+      $_REQUEST['fAStat_SortIP']=$this->config['AStat_DefaultSortIP'];
     }
     if(!array_key_exists('fAStat_page_number', $_REQUEST))
@@ -252,23 +249,23 @@
     if(($_REQUEST['fAStat_tabsheet']=='stats_by_period')&&($_REQUEST['fAStat_defper']=='Y'))
     {
-      if($this->my_config['AStat_default_period']!='global')
+      if($this->config['AStat_default_period']!='global')
       {
         $default_request['all'] = 'N';
       }
 
-      if(($this->my_config['AStat_default_period']=='year')||
-        ($this->my_config['AStat_default_period']=='month')||
-        ($this->my_config['AStat_default_period']=='day'))
+      if(($this->config['AStat_default_period']=='year')||
+        ($this->config['AStat_default_period']=='month')||
+        ($this->config['AStat_default_period']=='day'))
       {
         $default_request['year'] = date('Y');
       }
 
-      if(($this->my_config['AStat_default_period']=='month')||
-        ($this->my_config['AStat_default_period']=='day'))
+      if(($this->config['AStat_default_period']=='month')||
+        ($this->config['AStat_default_period']=='day'))
       {
         $default_request['month'] = date('n');
       }
 
-      if($this->my_config['AStat_default_period']=='day')
+      if($this->config['AStat_default_period']=='day')
       {
         $default_request['day'] = date('j');
@@ -420,9 +417,9 @@
     }
 
-    if(($this->my_config['AStat_UseBlackList']!="false")&&($this->my_config['AStat_BlackListedIP']!=""))
+    if(($this->config['AStat_UseBlackList']!="false")&&($this->config['AStat_BlackListedIP']!=""))
     {
       ($sql_where=="")?$sql_where=" where ":$sql_where.=" AND ";
-      ($this->my_config['AStat_UseBlackList']=="true")?$sql_where .= " NOT ":"";
-      $sql_where .= $this->make_IP_where_clause($this->my_config['AStat_BlackListedIP']);
+      ($this->config['AStat_UseBlackList']=="true")?$sql_where .= " NOT ":"";
+      $sql_where .= $this->make_IP_where_clause($this->config['AStat_BlackListedIP']);
     }
 
@@ -499,14 +496,14 @@
     }
 
-    if(($this->my_config['AStat_UseBlackList']!="false")&&($this->my_config['AStat_BlackListedIP']!=""))
+    if(($this->config['AStat_UseBlackList']!="false")&&($this->config['AStat_BlackListedIP']!=""))
     {
       ($sql_where=="")?$sql_where=" where ":$sql_where.=" AND ";
-      ($this->my_config['AStat_UseBlackList']=="true")?$sql_where .= " NOT ":"";
-      $sql_where .= $this->make_IP_where_clause($this->my_config['AStat_BlackListedIP']);
+      ($this->config['AStat_UseBlackList']=="true")?$sql_where .= " NOT ":"";
+      $sql_where .= $this->make_IP_where_clause($this->config['AStat_BlackListedIP']);
       $sql.=" , 'N' AS blacklist";
     }
     else
     {
-      if($this->my_config['AStat_BlackListedIP']=='')
+      if($this->config['AStat_BlackListedIP']=='')
       {
         $sql.=" , 'N' AS blacklist";
@@ -515,5 +512,5 @@
       {
         $sql.=" , (CASE ";
-        $tmp=explode(',', $this->my_config['AStat_BlackListedIP']);
+        $tmp=explode(',', $this->config['AStat_BlackListedIP']);
         foreach($tmp as $key=>$val)
         {
@@ -626,8 +623,8 @@
     $sql_where .= "  ic2.catid = ".HISTORY_TABLE.".category_id ";
 
-    if(($this->my_config['AStat_UseBlackList']!="false")&&($this->my_config['AStat_BlackListedIP']!=""))
-    {
-      ($this->my_config['AStat_UseBlackList']=="true")?$sql_where .= " NOT ":"";
-      $sql_where .= $this->make_IP_where_clause($this->my_config['AStat_BlackListedIP']);
+    if(($this->config['AStat_UseBlackList']!="false")&&($this->config['AStat_BlackListedIP']!=""))
+    {
+      ($this->config['AStat_UseBlackList']=="true")?$sql_where .= " NOT ":"";
+      $sql_where .= $this->make_IP_where_clause($this->config['AStat_BlackListedIP']);
     }
 
@@ -722,9 +719,9 @@
     }
 
-    if(($this->my_config['AStat_UseBlackList']!="false")&&($this->my_config['AStat_BlackListedIP']!=""))
+    if(($this->config['AStat_UseBlackList']!="false")&&($this->config['AStat_BlackListedIP']!=""))
     {
       ($sql_where=="")?$sql_where=" where ":$sql_where.=" AND ";
-      ($this->my_config['AStat_UseBlackList']=="true")?$sql_where .= " NOT ":"";
-      $sql_where .= $this->make_IP_where_clause($this->my_config['AStat_BlackListedIP']);
+      ($this->config['AStat_UseBlackList']=="true")?$sql_where .= " NOT ":"";
+      $sql_where .= $this->make_IP_where_clause($this->config['AStat_BlackListedIP']);
     }
 
@@ -783,24 +780,24 @@
 
     $dir_links = "";
-    $a_links=array("global" => $this->page_link."&amp;fAStat_defper=N&amp;fAStat_all=Y",
-        "all" => $this->page_link."&amp;fAStat_defper=N&amp;fAStat_all=N",
-        "year" => $this->page_link."&amp;fAStat_defper=N&amp;fAStat_all=N&amp;fAStat_year=$year",
-        "month" => $this->page_link."&amp;fAStat_defper=N&amp;fAStat_all=N&amp;fAStat_year=$year&amp;fAStat_month=$month",
-        "day" => $this->page_link."&amp;fAStat_defper=N&amp;fAStat_all=N&amp;fAStat_year=$year&amp;fAStat_month=$month&amp;fAStat_day=$day");
-
-    $ip_links=array("all" => $this->page_link."&amp;fAStat_tabsheet=stats_by_ip",
-        "year" => $this->page_link."&amp;fAStat_tabsheet=stats_by_ip&amp;fAStat_year=",
-        "month" => $this->page_link."&amp;fAStat_tabsheet=stats_by_ip&amp;fAStat_year=$year&amp;fAStat_month=",
-        "day" => $this->page_link."&amp;fAStat_tabsheet=stats_by_ip&amp;fAStat_year=$year&amp;fAStat_month=$month&amp;fAStat_day=");
-
-    $cat_links=array("all" => $this->page_link."&amp;fAStat_tabsheet=stats_by_category",
-        "year" => $this->page_link."&amp;fAStat_tabsheet=stats_by_category&amp;fAStat_year=",
-        "month" => $this->page_link."&amp;fAStat_tabsheet=stats_by_category&amp;fAStat_year=$year&amp;fAStat_month=",
-        "day" => $this->page_link."&amp;fAStat_tabsheet=stats_by_category&amp;fAStat_year=$year&amp;fAStat_month=$month&amp;fAStat_day=");
-
-    $img_links=array("all" => $this->page_link."&amp;fAStat_tabsheet=stats_by_image",
-        "year" => $this->page_link."&amp;fAStat_tabsheet=stats_by_image&amp;fAStat_year=",
-        "month" => $this->page_link."&amp;fAStat_tabsheet=stats_by_image&amp;fAStat_year=$year&amp;fAStat_month=",
-        "day" => $this->page_link."&amp;fAStat_tabsheet=stats_by_image&amp;fAStat_year=$year&amp;fAStat_month=$month&amp;fAStat_day=");
+    $a_links=array("global" => $this->getAdminLink()."&amp;fAStat_defper=N&amp;fAStat_all=Y",
+        "all" => $this->getAdminLink()."&amp;fAStat_defper=N&amp;fAStat_all=N",
+        "year" => $this->getAdminLink()."&amp;fAStat_defper=N&amp;fAStat_all=N&amp;fAStat_year=$year",
+        "month" => $this->getAdminLink()."&amp;fAStat_defper=N&amp;fAStat_all=N&amp;fAStat_year=$year&amp;fAStat_month=$month",
+        "day" => $this->getAdminLink()."&amp;fAStat_defper=N&amp;fAStat_all=N&amp;fAStat_year=$year&amp;fAStat_month=$month&amp;fAStat_day=$day");
+
+    $ip_links=array("all" => $this->getAdminLink()."&amp;fAStat_tabsheet=stats_by_ip",
+        "year" => $this->getAdminLink()."&amp;fAStat_tabsheet=stats_by_ip&amp;fAStat_year=",
+        "month" => $this->getAdminLink()."&amp;fAStat_tabsheet=stats_by_ip&amp;fAStat_year=$year&amp;fAStat_month=",
+        "day" => $this->getAdminLink()."&amp;fAStat_tabsheet=stats_by_ip&amp;fAStat_year=$year&amp;fAStat_month=$month&amp;fAStat_day=");
+
+    $cat_links=array("all" => $this->getAdminLink()."&amp;fAStat_tabsheet=stats_by_category",
+        "year" => $this->getAdminLink()."&amp;fAStat_tabsheet=stats_by_category&amp;fAStat_year=",
+        "month" => $this->getAdminLink()."&amp;fAStat_tabsheet=stats_by_category&amp;fAStat_year=$year&amp;fAStat_month=",
+        "day" => $this->getAdminLink()."&amp;fAStat_tabsheet=stats_by_category&amp;fAStat_year=$year&amp;fAStat_month=$month&amp;fAStat_day=");
+
+    $img_links=array("all" => $this->getAdminLink()."&amp;fAStat_tabsheet=stats_by_image",
+        "year" => $this->getAdminLink()."&amp;fAStat_tabsheet=stats_by_image&amp;fAStat_year=",
+        "month" => $this->getAdminLink()."&amp;fAStat_tabsheet=stats_by_image&amp;fAStat_year=$year&amp;fAStat_month=",
+        "day" => $this->getAdminLink()."&amp;fAStat_tabsheet=stats_by_image&amp;fAStat_year=$year&amp;fAStat_month=$month&amp;fAStat_day=");
 
 
@@ -869,5 +866,5 @@
       { // si mois sÃ©lectionnÃ©, jours affichÃ©s
         $value = $stats[$i]["GId"]." (".l10n("AStat_day_of_week_".date("w",mktime(0, 0, 0, $month, $stats[$i]["GId"], $year))).")";
-        $link=$this->page_link."&amp;fAStat_defper=N&amp;fAStat_all=N&amp;fAStat_year=$year&amp;fAStat_month=$month&amp;fAStat_day=".$stats[$i]["GId"];
+        $link=$this->getAdminLink()."&amp;fAStat_defper=N&amp;fAStat_all=N&amp;fAStat_year=$year&amp;fAStat_month=$month&amp;fAStat_day=".$stats[$i]["GId"];
         $value_ip=$ip_links["day"].$stats[$i]["GId"];
         $value_cat=$cat_links["day"].$stats[$i]["GId"];
@@ -877,5 +874,5 @@
       { // si annÃ©e sÃ©lectionnÃ©e, mois affichÃ©s
         $value = l10n("AStat_month_of_year_".$stats[$i]["GId"]);
-        $link=$this->page_link."&amp;fAStat_defper=N&amp;fAStat_all=N&amp;fAStat_year=$year&amp;fAStat_month=".$stats[$i]["GId"];
+        $link=$this->getAdminLink()."&amp;fAStat_defper=N&amp;fAStat_all=N&amp;fAStat_year=$year&amp;fAStat_month=".$stats[$i]["GId"];
         $value_ip=$ip_links["month"].$stats[$i]["GId"];
         $value_cat=$cat_links["month"].$stats[$i]["GId"];
@@ -885,5 +882,5 @@
       { // si total sÃ©lectionnÃ©, annÃ©es affichÃ©es
         $value = $stats[$i]["GId"];
-        $link=$this->page_link."&amp;fAStat_defper=N&amp;fAStat_all=N&amp;fAStat_year=".$stats[$i]["GId"];
+        $link=$this->getAdminLink()."&amp;fAStat_defper=N&amp;fAStat_all=N&amp;fAStat_year=".$stats[$i]["GId"];
         $value_ip=$ip_links["year"].$stats[$i]["GId"];
         $value_cat=$cat_links["year"].$stats[$i]["GId"];
@@ -893,5 +890,5 @@
       {
         $value=l10n("AStat_period_label_all");
-        $link=$this->page_link."&amp;fAStat_defper=N&amp;fAStat_all=N";
+        $link=$this->getAdminLink()."&amp;fAStat_defper=N&amp;fAStat_all=N";
         $value_ip=$ip_links["all"];
         $value_cat=$cat_links["all"];
@@ -966,19 +963,19 @@
     $dir_links = "";
     $page_link = "";
-    $a_links=array("global" => $this->page_link."&amp;fAStat_defper=N&amp;fAStat_all=Y",
-        "all" => $this->page_link."&amp;fAStat_defper=N&amp;fAStat_all=N",
-        "year" => $this->page_link."&amp;fAStat_defper=N&amp;fAStat_all=N&amp;fAStat_year=$year",
-        "month" => $this->page_link."&amp;fAStat_defper=N&amp;fAStat_all=N&amp;fAStat_year=$year&amp;fAStat_month=$month",
-        "day" => $this->page_link."&amp;fAStat_defper=N&amp;fAStat_all=N&amp;fAStat_year=$year&amp;fAStat_month=$month&amp;fAStat_day=$day");
-
-    $ip_links=array("all" => $this->page_link."&amp;fAStat_tabsheet=stats_by_ip",
-        "year" => $this->page_link."&amp;fAStat_tabsheet=stats_by_ip&amp;fAStat_year=$year",
-        "month" => $this->page_link."&amp;fAStat_tabsheet=stats_by_ip&amp;fAStat_year=$year&amp;fAStat_month=$month",
-        "day" => $this->page_link."&amp;fAStat_tabsheet=stats_by_ip&amp;fAStat_year=$year&amp;fAStat_month=$month&amp;fAStat_day=$day");
-
-    $img_links=array("all" => $this->page_link."&amp;fAStat_tabsheet=stats_by_image",
-        "year" => $this->page_link."&amp;fAStat_tabsheet=stats_by_image&amp;fAStat_year=$year",
-        "month" => $this->page_link."&amp;fAStat_tabsheet=stats_by_image&amp;fAStat_year=$year&amp;fAStat_month=$month",
-        "day" => $this->page_link."&amp;fAStat_tabsheet=stats_by_image&amp;fAStat_year=$year&amp;fAStat_month=$month&amp;fAStat_day=$day");
+    $a_links=array("global" => $this->getAdminLink()."&amp;fAStat_defper=N&amp;fAStat_all=Y",
+        "all" => $this->getAdminLink()."&amp;fAStat_defper=N&amp;fAStat_all=N",
+        "year" => $this->getAdminLink()."&amp;fAStat_defper=N&amp;fAStat_all=N&amp;fAStat_year=$year",
+        "month" => $this->getAdminLink()."&amp;fAStat_defper=N&amp;fAStat_all=N&amp;fAStat_year=$year&amp;fAStat_month=$month",
+        "day" => $this->getAdminLink()."&amp;fAStat_defper=N&amp;fAStat_all=N&amp;fAStat_year=$year&amp;fAStat_month=$month&amp;fAStat_day=$day");
+
+    $ip_links=array("all" => $this->getAdminLink()."&amp;fAStat_tabsheet=stats_by_ip",
+        "year" => $this->getAdminLink()."&amp;fAStat_tabsheet=stats_by_ip&amp;fAStat_year=$year",
+        "month" => $this->getAdminLink()."&amp;fAStat_tabsheet=stats_by_ip&amp;fAStat_year=$year&amp;fAStat_month=$month",
+        "day" => $this->getAdminLink()."&amp;fAStat_tabsheet=stats_by_ip&amp;fAStat_year=$year&amp;fAStat_month=$month&amp;fAStat_day=$day");
+
+    $img_links=array("all" => $this->getAdminLink()."&amp;fAStat_tabsheet=stats_by_image",
+        "year" => $this->getAdminLink()."&amp;fAStat_tabsheet=stats_by_image&amp;fAStat_year=$year",
+        "month" => $this->getAdminLink()."&amp;fAStat_tabsheet=stats_by_image&amp;fAStat_year=$year&amp;fAStat_month=$month",
+        "day" => $this->getAdminLink()."&amp;fAStat_tabsheet=stats_by_image&amp;fAStat_year=$year&amp;fAStat_month=$month&amp;fAStat_day=$day");
 
 
@@ -1130,14 +1127,14 @@
     $dir_links = "";
     $page_link = "";
-    $a_links=array("global" => $this->page_link."&amp;fAStat_defper=N&amp;fAStat_all=Y",
-        "all" => $this->page_link."&amp;fAStat_defper=N&amp;fAStat_all=N",
-        "year" => $this->page_link."&amp;fAStat_defper=N&amp;fAStat_all=N&amp;fAStat_year=$year",
-        "month" => $this->page_link."&amp;fAStat_defper=N&amp;fAStat_all=N&amp;fAStat_year=$year&amp;fAStat_month=$month",
-        "day" => $this->page_link."&amp;fAStat_defper=N&amp;fAStat_all=N&amp;fAStat_year=$year&amp;fAStat_month=$month&amp;fAStat_day=$day");
-
-    $cat_links=array("all" => $this->page_link."&amp;fAStat_tabsheet=stats_by_category",
-        "year" => $this->page_link."&amp;fAStat_tabsheet=stats_by_category&amp;fAStat_year=$year",
-        "month" => $this->page_link."&amp;fAStat_tabsheet=stats_by_category&amp;fAStat_year=$year&amp;fAStat_month=$month",
-        "day" => $this->page_link."&amp;fAStat_tabsheet=stats_by_category&amp;fAStat_year=$year&amp;fAStat_month=$month&amp;fAStat_day=$day");
+    $a_links=array("global" => $this->getAdminLink()."&amp;fAStat_defper=N&amp;fAStat_all=Y",
+        "all" => $this->getAdminLink()."&amp;fAStat_defper=N&amp;fAStat_all=N",
+        "year" => $this->getAdminLink()."&amp;fAStat_defper=N&amp;fAStat_all=N&amp;fAStat_year=$year",
+        "month" => $this->getAdminLink()."&amp;fAStat_defper=N&amp;fAStat_all=N&amp;fAStat_year=$year&amp;fAStat_month=$month",
+        "day" => $this->getAdminLink()."&amp;fAStat_defper=N&amp;fAStat_all=N&amp;fAStat_year=$year&amp;fAStat_month=$month&amp;fAStat_day=$day");
+
+    $cat_links=array("all" => $this->getAdminLink()."&amp;fAStat_tabsheet=stats_by_category",
+        "year" => $this->getAdminLink()."&amp;fAStat_tabsheet=stats_by_category&amp;fAStat_year=$year",
+        "month" => $this->getAdminLink()."&amp;fAStat_tabsheet=stats_by_category&amp;fAStat_year=$year&amp;fAStat_month=$month",
+        "day" => $this->getAdminLink()."&amp;fAStat_tabsheet=stats_by_category&amp;fAStat_year=$year&amp;fAStat_month=$month&amp;fAStat_day=$day");
 
     /* make navigation links */
@@ -1276,14 +1273,14 @@
     $dir_links = "";
     $page_link = "";
-    $a_links=array("global" => $this->page_link."&amp;fAStat_defper=N&amp;fAStat_all=Y",
-        "all" => $this->page_link."&amp;fAStat_defper=N&amp;fAStat_all=N",
-        "year" => $this->page_link."&amp;fAStat_defper=N&amp;fAStat_all=N&amp;fAStat_year=$year",
-        "month" => $this->page_link."&amp;fAStat_defper=N&amp;fAStat_all=N&amp;fAStat_year=$year&amp;fAStat_month=$month",
-        "day" => $this->page_link."&amp;fAStat_defper=N&amp;fAStat_all=N&amp;fAStat_year=$year&amp;fAStat_month=$month&amp;fAStat_day=$day");
-
-    $img_links=array("all" => $this->page_link."&amp;fAStat_tabsheet=stats_by_image",
-        "year" => $this->page_link."&amp;fAStat_tabsheet=stats_by_image&amp;fAStat_year=$year",
-        "month" => $this->page_link."&amp;fAStat_tabsheet=stats_by_image&amp;fAStat_year=$year&amp;fAStat_month=$month",
-        "day" => $this->page_link."&amp;fAStat_tabsheet=stats_by_image&amp;fAStat_year=$year&amp;fAStat_month=$month&amp;fAStat_day=$day");
+    $a_links=array("global" => $this->getAdminLink()."&amp;fAStat_defper=N&amp;fAStat_all=Y",
+        "all" => $this->getAdminLink()."&amp;fAStat_defper=N&amp;fAStat_all=N",
+        "year" => $this->getAdminLink()."&amp;fAStat_defper=N&amp;fAStat_all=N&amp;fAStat_year=$year",
+        "month" => $this->getAdminLink()."&amp;fAStat_defper=N&amp;fAStat_all=N&amp;fAStat_year=$year&amp;fAStat_month=$month",
+        "day" => $this->getAdminLink()."&amp;fAStat_defper=N&amp;fAStat_all=N&amp;fAStat_year=$year&amp;fAStat_month=$month&amp;fAStat_day=$day");
+
+    $img_links=array("all" => $this->getAdminLink()."&amp;fAStat_tabsheet=stats_by_image",
+        "year" => $this->getAdminLink()."&amp;fAStat_tabsheet=stats_by_image&amp;fAStat_year=$year",
+        "month" => $this->getAdminLink()."&amp;fAStat_tabsheet=stats_by_image&amp;fAStat_year=$year&amp;fAStat_month=$month",
+        "day" => $this->getAdminLink()."&amp;fAStat_tabsheet=stats_by_image&amp;fAStat_year=$year&amp;fAStat_month=$month&amp;fAStat_day=$day");
 
     /* navigation links */
@@ -1434,9 +1431,9 @@
   private function add_ip_to_filter($ip)
   {
-    if(strpos($this->my_config['AStat_BlackListedIP'].",", $ip.",")===false)
-    {
-      ($this->my_config['AStat_BlackListedIP']!='')?$this->my_config['AStat_BlackListedIP'].=",":"";
-      $this->my_config['AStat_BlackListedIP'].=$ip;
-      $this->save_config();
+    if(strpos($this->config['AStat_BlackListedIP'].",", $ip.",")===false)
+    {
+      ($this->config['AStat_BlackListedIP']!='')?$this->config['AStat_BlackListedIP'].=",":"";
+      $this->config['AStat_BlackListedIP'].=$ip;
+      $this->saveConfig();
     }
   }
@@ -1456,13 +1453,13 @@
       if(!is_adviser())
       {
-        reset($this->my_config);
-        while (list($key, $val) = each($this->my_config))
+        reset($this->config);
+        while (list($key, $val) = each($this->config))
         {
           if(isset($_POST['f_'.$key]))
           {
-            $this->my_config[$key] = $_POST['f_'.$key];
+            $this->config[$key] = $_POST['f_'.$key];
           }
         }
-        if($this->save_config())
+        if($this->saveConfig())
         {
           array_push($page['infos'], l10n('AStat_config_saved'));
@@ -1486,6 +1483,6 @@
 
     //standards inputs zones
-    reset($this->my_config);
-    while (list($key, $val) = each($this->my_config))
+    reset($this->config);
+    while (list($key, $val) = each($this->config))
     {
       $template_datas["f_".$key]=$val;
@@ -1493,15 +1490,15 @@
 
     //
-    $template_datas['ajaxurl']=$this->page_link;
+    $template_datas['ajaxurl']=$this->getAdminLink();
 
     // define selected item for lists zones
-    $template_datas['AStat_periods_selected']=$this->my_config['AStat_default_period'];
-    $template_datas['AStat_defaultsortcat_selected']=$this->my_config['AStat_DefaultSortCat'];
-    $template_datas['AStat_defaultsortip_selected']=$this->my_config['AStat_DefaultSortIP'];
-    $template_datas['AStat_defaultsortimg_selected']=$this->my_config['AStat_DefaultSortImg'];
-
-    $template_datas['AStat_showthumbcat_selected']=$this->my_config['AStat_ShowThumbCat'];
-    $template_datas['AStat_showthumbimg_selected']=$this->my_config['AStat_ShowThumbImg'];
-    $template_datas['AStat_UseBlackList_selected']=$this->my_config['AStat_UseBlackList'];
+    $template_datas['AStat_periods_selected']=$this->config['AStat_default_period'];
+    $template_datas['AStat_defaultsortcat_selected']=$this->config['AStat_DefaultSortCat'];
+    $template_datas['AStat_defaultsortip_selected']=$this->config['AStat_DefaultSortIP'];
+    $template_datas['AStat_defaultsortimg_selected']=$this->config['AStat_DefaultSortImg'];
+
+    $template_datas['AStat_showthumbcat_selected']=$this->config['AStat_ShowThumbCat'];
+    $template_datas['AStat_showthumbimg_selected']=$this->config['AStat_ShowThumbImg'];
+    $template_datas['AStat_UseBlackList_selected']=$this->config['AStat_UseBlackList'];
 
     // making lists zones
@@ -1616,5 +1613,5 @@
         elseif($_REQUEST['fAStat_purge_history_type']=='byipid0')
         {
-          $fparam=$this->my_config['AStat_BlackListedIP'];
+          $fparam=$this->config['AStat_BlackListedIP'];
         }
         else
@@ -2146,7 +2143,7 @@
   private function purge_history_count_ipid0()
   {
-    if($this->my_config['AStat_BlackListedIP']!="")
-    {
-      $list=explode(',', $this->my_config['AStat_BlackListedIP']);
+    if($this->config['AStat_BlackListedIP']!="")
+    {
+      $list=explode(',', $this->config['AStat_BlackListedIP']);
     }
     else
@@ -2157,9 +2154,9 @@
     $returned=array(0,count($list));
 
-    if($this->my_config['AStat_BlackListedIP']!='')
+    if($this->config['AStat_BlackListedIP']!='')
     {
       $sql="SELECT COUNT(id)
             FROM ".HISTORY_TABLE."
-            WHERE ".$this->make_IP_where_clause($this->my_config['AStat_BlackListedIP']);
+            WHERE ".$this->make_IP_where_clause($this->config['AStat_BlackListedIP']);
       $result=pwg_query($sql);
       if($result)
Index: /extensions/AStat/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/AStat/language/fr_FR/plugin.lang.php	(revision 5545)
+++ /extensions/AStat/language/fr_FR/plugin.lang.php	(revision 5546)
@@ -216,3 +216,7 @@
 $lang['AStat_enableddisabled_invert'] = "Filtre inversé";
 
+//--- > 2.2.0
+$lang['To install this plugin, you need to install Grum Plugin Classes %s before'] = 'Pour installer ce plugin, vous devez au préalable, installer le plugin Grum Plugin Classes %s';
+
+
 ?>
Index: /extensions/AStat/main.inc.php
===================================================================
--- /extensions/AStat/main.inc.php	(revision 5545)
+++ /extensions/AStat/main.inc.php	(revision 5546)
@@ -81,5 +81,5 @@
 define('ASTAT_PATH' , PHPWG_PLUGINS_PATH . ASTAT_DIR . '/');
 
-define('ASTAT_VERSION' , '2.2.0'); // => ne pas oublier la version dans l'entête !!
+include_once('astat_version.inc.php'); // => Don't forget to update this file !!
 
 global $prefixeTable;
@@ -91,5 +91,5 @@
 
   $obj = new AStat_AIM($prefixeTable, __FILE__);
-  $obj->init_events();
+  $obj->initEvents();
   set_plugin_data($plugin['id'], $obj);
 }
Index: /extensions/AStat/maintain.inc.php
===================================================================
--- /extensions/AStat/maintain.inc.php	(revision 5545)
+++ /extensions/AStat/maintain.inc.php	(revision 5546)
@@ -17,8 +17,10 @@
 if(!defined('ASTAT_PATH')) define('ASTAT_PATH' , PHPWG_PLUGINS_PATH . ASTAT_DIR . '/');
 
+include_once('astat_version.inc.php');
+
 //ini_set('error_reporting', E_ALL);
 //ini_set('display_errors', true);
 
-global $gpc_installed, $lang; //needed for plugin manager compatibility
+global $gpc_installed, $gpcNeeded, $lang; //needed for plugin manager compatibility
 
 /* -----------------------------------------------------------------------------
@@ -26,9 +28,10 @@
 ----------------------------------------------------------------------------- */
 $gpc_installed=false;
-if(file_exists(PHPWG_PLUGINS_PATH.'grum_plugins_classes-2/common_plugin.class.inc.php'))
+$gpcNeeded="3.0.0";
+if(file_exists(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/CommonPlugin.class.inc.php'))
 {
-  @include_once(PHPWG_PLUGINS_PATH.'grum_plugins_classes-2/main.inc.php');
-  // need GPC release greater or equal than 2.0.5
-  if(checkGPCRelease(2,0,5))
+  @include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/CommonPlugin.class.inc.php');
+  // need GPC release greater or equal than 3.0.0
+  if(CommonPlugin::checkGPCRelease(3,0,0))
   {
     @include_once("astat_aim.class.inc.php");
@@ -39,5 +42,14 @@
 function gpcMsgError(&$errors)
 {
-  array_push($errors, sprintf(l10n('AStat_gpc2_not_installed'), "2.0.5"));
+  global $gpcNeeded;
+  $msg=sprintf(l10n('To install this plugin, you need to install Grum Plugin Classes %s before'), $gpcNeeded);
+  if(is_array($errors))
+  {
+    array_push($errors, $msg);
+  }
+  else
+  {
+    $errors=Array($msg);
+  }
 }
 // -----------------------------------------------------------------------------
@@ -48,11 +60,13 @@
 function plugin_install($plugin_id, $plugin_version, &$errors)
 {
-  global $prefixeTable, $gpc_installed;
+  global $prefixeTable, $gpc_installed, $gpcNeeded;
   if($gpc_installed)
   {
     $obj = new AStat_AIM($prefixeTable, __FILE__);
-    $obj->delete_config();
-    $obj->init_config();
-    $obj->save_config();
+    $obj->deleteConfig();
+    $obj->initConfig();
+    $obj->my_config['installed']=ASTAT_VERSION2;
+    $obj->saveConfig();
+    GPCCore::register($obj->getPluginName(), ASTAT_VERSION, $gpcNeeded);
   }
   else
@@ -68,7 +82,8 @@
   {
     $obj = new AStat_AIM($prefixeTable, __FILE__);
-    $obj->init_config();
-    $obj->load_config();
-    $obj->save_config();
+    $obj->initConfig();
+    $obj->loadConfig();
+    $obj->my_config['installed']=ASTAT_VERSION2;
+    $obj->saveConfig();
     $obj->alter_history_section_enum('deleted_cat');
   }
@@ -89,5 +104,6 @@
   {
     $obj = new AStat_AIM($prefixeTable, __FILE__);
-    $obj->delete_config();
+    $obj->deleteConfig();
+    GPCCore::unregister($obj->getPluginName());
   }
   else
