Index: /extensions/ColorStat/admin.php
===================================================================
--- /extensions/ColorStat/admin.php	(revision 15344)
+++ /extensions/ColorStat/admin.php	(revision 15344)
@@ -0,0 +1,70 @@
+<?php
+/* -----------------------------------------------------------------------------
+  Plugin     : ColorStat
+  Author     : Grum
+    email    : grum@piwigo.org
+    website  : http://photos.grum.fr
+
+    << May the Little SpaceFrog be with you ! >>
+  ------------------------------------------------------------------------------
+  See main.inc.php for release information
+
+  --------------------------------------------------------------------------- */
+
+if (!defined('PHPWG_ROOT_PATH')) { die('Hacking attempt!'); }
+
+global $prefixeTable, $template;
+load_language('plugin.lang', CSTAT_PATH);
+
+$main_plugin_object = get_plugin_data($plugin_id);
+
+
+if(CommonPlugin::checkGPCRelease(3,2,0))
+{
+  $config=Array();
+  GPCCore::loadConfig('cstat', $config);
+
+  if(!isset($config['installed'])) $config['installed']='01.00.01';
+  if($config['installed']!=CSTAT_VERSION2)
+  {
+    /* the plugin was updated without being deactivated
+     * deactivate + activate the plugin to process the database upgrade
+     */
+    include(CSTAT_PATH."cstat_install.class.inc.php");
+    $cstat=new CStat_Install($prefixeTable, dirname(__FILE__));
+    $cstat->deactivate();
+    $cstat->activate();
+    $template->delete_compiled_templates();
+    $config['newInstall']='n';
+  }
+
+  /*
+   * if the plugin is newly installed, display a special configuration page
+   * otherwise, display normal page
+   */
+  if($config['newInstall']=='n')
+  {
+    include(CSTAT_PATH."cstat_aip.class.inc.php");
+    $plugin_ai = new CStat_AIP($prefixeTable, $main_plugin_object->getFileLocation());
+  }
+  else
+  {
+    include(CSTAT_PATH."cstat_aip_install.class.inc.php");
+    $plugin_ai = new CStat_AIPInstall($prefixeTable, $main_plugin_object->getFileLocation());
+  }
+}
+else
+{
+  /*
+   * plugin was upgraded, but GPC was not
+   * display a page to inform user to upgrade GPC
+   */
+  include(CSTAT_PATH."cstat_aip_release.class.inc.php");
+  $plugin_ai = new CStat_AIPRelease($prefixeTable, $main_plugin_object->getFileLocation());
+}
+
+$plugin_ai->manage();
+
+
+
+?>
Index: /extensions/ColorStat/admin/cstat_config.tpl
===================================================================
--- /extensions/ColorStat/admin/cstat_config.tpl	(revision 15343)
+++ /extensions/ColorStat/admin/cstat_config.tpl	(revision 15344)
@@ -1,4 +1,6 @@
-{combine_script id="jquery.ui" path="themes/default/js/ui/minified/jquery.ui.core.min.js"}
-{combine_script id="jquery.ui.slider" path="themes/default/js/ui/minified/jquery.ui.slider.min.js"}
+{combine_script id="jquery.ui" require='jquery' path="themes/default/js/ui/jquery.ui.core.js"}
+{combine_script id="jquery.ui.widget" require='jquery.ui' path="themes/default/js/ui/jquery.ui.widget.js"}
+{combine_script id="jquery.ui.mouse" require='jquery.ui.widget' path="themes/default/js/ui/jquery.ui.mouse.js"}
+{combine_script id="jquery.ui.slider" require='jquery.ui.widget' src="themes/default/js/ui/jquery.ui.slider.js"}
 
 
Index: /extensions/ColorStat/admin/cstat_database.tpl
===================================================================
--- /extensions/ColorStat/admin/cstat_database.tpl	(revision 15343)
+++ /extensions/ColorStat/admin/cstat_database.tpl	(revision 15344)
@@ -1,4 +1,7 @@
-{combine_script id="jquery.ui" path="themes/default/js/ui/minified/jquery.ui.core.min.js"}
-{combine_script id="jquery.ui.dialog" path="themes/default/js/ui/minified/jquery.ui.dialog.min.js"}
+{combine_script id="jquery.ui" require='jquery' path="themes/default/js/ui/jquery.ui.core.js"}
+{combine_script id="jquery.ui.widget" require='jquery.ui' path="themes/default/js/ui/jquery.ui.widget.js"}
+{combine_script id="jquery.ui.mouse" require='jquery.ui.widget' path="themes/default/js/ui/jquery.ui.mouse.js"}
+{combine_script id="jquery.ui.position" require='jquery.ui.widget' path="themes/default/js/ui/jquery.ui.position.js"}
+{combine_script id="jquery.ui.dialog" require='jquery.ui.widget' src="themes/default/js/ui/jquery.ui.dialog.js"}
 
 {literal}
@@ -74,5 +77,5 @@
         resizable: false,
         width:480,
-        height:120,
+        height:150,
         modal: true,
         draggable:true,
@@ -160,5 +163,5 @@
           resizable: false,
           width:480,
-          height:120,
+          height:150,
           modal: true,
           draggable:true,
Index: /extensions/ColorStat/admin/cstat_install_page.tpl
===================================================================
--- /extensions/ColorStat/admin/cstat_install_page.tpl	(revision 15343)
+++ /extensions/ColorStat/admin/cstat_install_page.tpl	(revision 15344)
@@ -1,3 +1,5 @@
-{combine_script id="jquery.ui" path="themes/default/js/ui/minified/jquery.ui.core.min.js"}
+{combine_script id="jquery.ui" path="themes/default/js/ui/jquery.ui.core.js"}
+{combine_script id="jquery.ui.widget" path="themes/default/js/ui/jquery.ui.widget.js"}
+{combine_script id="jquery.ui.mouse" path="themes/default/js/ui/jquery.ui.mouse.js"}
 {combine_script id="jquery.tipTip" path="themes/default/js/plugins/jquery.tipTip.minified.js" }
 
Index: /extensions/ColorStat/admin/cstat_stat.tpl
===================================================================
--- /extensions/ColorStat/admin/cstat_stat.tpl	(revision 15343)
+++ /extensions/ColorStat/admin/cstat_stat.tpl	(revision 15344)
@@ -1,3 +1,5 @@
-{combine_script id="jquery.ui" path="themes/default/js/ui/minified/jquery.ui.core.min.js"}
+{combine_script id="jquery.ui" path="themes/default/js/ui/jquery.ui.core.js"}
+{combine_script id="jquery.ui.widget" path="themes/default/js/ui/jquery.ui.widget.js"}
+{combine_script id="jquery.ui.mouse" path="themes/default/js/ui/jquery.ui.mouse.js"}
 {combine_script id="jquery.tipTip" path="themes/default/js/plugins/jquery.tipTip.minified.js" }
 
Index: tensions/ColorStat/admin/plugin_admin.php
===================================================================
--- /extensions/ColorStat/admin/plugin_admin.php	(revision 15343)
+++ 	(revision )
@@ -1,70 +1,0 @@
-<?php
-/* -----------------------------------------------------------------------------
-  Plugin     : ColorStat
-  Author     : Grum
-    email    : grum@piwigo.org
-    website  : http://photos.grum.fr
-
-    << May the Little SpaceFrog be with you ! >>
-  ------------------------------------------------------------------------------
-  See main.inc.php for release information
-
-  --------------------------------------------------------------------------- */
-
-if (!defined('PHPWG_ROOT_PATH')) { die('Hacking attempt!'); }
-
-global $prefixeTable, $template;
-load_language('plugin.lang', CSTAT_PATH);
-
-$main_plugin_object = get_plugin_data($plugin_id);
-
-
-if(CommonPlugin::checkGPCRelease(3,2,0))
-{
-  $config=Array();
-  GPCCore::loadConfig('cstat', $config);
-
-  if(!isset($config['installed'])) $config['installed']='01.00.01';
-  if($config['installed']!=CSTAT_VERSION2)
-  {
-    /* the plugin was updated without being deactivated
-     * deactivate + activate the plugin to process the database upgrade
-     */
-    include(CSTAT_PATH."cstat_install.class.inc.php");
-    $cstat=new CStat_Install($prefixeTable, dirname(__FILE__));
-    $cstat->deactivate();
-    $cstat->activate();
-    $template->delete_compiled_templates();
-    $config['newInstall']='n';
-  }
-
-  /*
-   * if the plugin is newly installed, display a special configuration page
-   * otherwise, display normal page
-   */
-  if($config['newInstall']=='n')
-  {
-    include(CSTAT_PATH."cstat_aip.class.inc.php");
-    $plugin_ai = new CStat_AIP($prefixeTable, $main_plugin_object->getFileLocation());
-  }
-  else
-  {
-    include(CSTAT_PATH."cstat_aip_install.class.inc.php");
-    $plugin_ai = new CStat_AIPInstall($prefixeTable, $main_plugin_object->getFileLocation());
-  }
-}
-else
-{
-  /*
-   * plugin was upgraded, but GPC was not
-   * display a page to inform user to upgrade GPC
-   */
-  include(CSTAT_PATH."cstat_aip_release.class.inc.php");
-  $plugin_ai = new CStat_AIPRelease($prefixeTable, $main_plugin_object->getFileLocation());
-}
-
-$plugin_ai->manage();
-
-
-
-?>
Index: /extensions/ColorStat/cstat_aip.class.inc.php
===================================================================
--- /extensions/ColorStat/cstat_aip.class.inc.php	(revision 15343)
+++ /extensions/ColorStat/cstat_aip.class.inc.php	(revision 15344)
@@ -37,14 +37,14 @@
     $this->tabsheet->add('database',
                           l10n('cstat_database'),
-                          $this->getAdminLink()."&amp;f_tabsheet=database");
+                          $this->getAdminLink()."-database");
     $this->tabsheet->add('stat',
                           l10n('cstat_stat'),
-                          $this->getAdminLink()."&amp;f_tabsheet=stat");
+                          $this->getAdminLink()."-stat");
     $this->tabsheet->add('search',
                           l10n('cstat_search'),
-                          $this->getAdminLink()."&amp;f_tabsheet=search");
+                          $this->getAdminLink()."-search");
     $this->tabsheet->add('config',
                           l10n('cstat_config'),
-                          $this->getAdminLink()."&amp;f_tabsheet=config");
+                          $this->getAdminLink()."-config");
   }
 
@@ -61,5 +61,5 @@
   {
     parent::initEvents();
-    if($_REQUEST['f_tabsheet']=='search')
+    if($_GET['tab']=='search')
     {
       // load request builder JS only on the search page
@@ -81,6 +81,5 @@
     $template->set_filename('plugin_admin_content', dirname(__FILE__)."/admin/cstat_admin.tpl");
 
-
-    switch($_REQUEST['f_tabsheet'])
+    switch($_GET['tab'])
     {
       case 'database':
@@ -98,5 +97,5 @@
     }
 
-    $this->tabsheet->select($_REQUEST['f_tabsheet']);
+    $this->tabsheet->select($_GET['tab']);
     $this->tabsheet->assign();
     $selected_tab=$this->tabsheet->get_selected();
@@ -152,11 +151,11 @@
   protected function checkRequest()
   {
-    if(!isset($_REQUEST['f_tabsheet'])) $_REQUEST['f_tabsheet']='stat';
-
-
-    if(!($_REQUEST['f_tabsheet']=='database' or
-         $_REQUEST['f_tabsheet']=='stat' or
-         $_REQUEST['f_tabsheet']=='search' or
-         $_REQUEST['f_tabsheet']=='config')) $_REQUEST['f_tabsheet']='stat';
+    if(!isset($_GET['tab'])) $_GET['tab']='stat';
+
+
+    if(!($_GET['tab']=='database' or
+         $_GET['tab']=='stat' or
+         $_GET['tab']=='search' or
+         $_GET['tab']=='config')) $_GET['tab']='stat';
 
 
Index: /extensions/ColorStat/cstat_aip_install.class.inc.php
===================================================================
--- /extensions/ColorStat/cstat_aip_install.class.inc.php	(revision 15343)
+++ /extensions/ColorStat/cstat_aip_install.class.inc.php	(revision 15344)
@@ -31,5 +31,5 @@
     $this->tabsheet->add('install',
                           l10n('cstat_install'),
-                          $this->getAdminLink()."&amp;f_tabsheet=install");
+                          $this->getAdminLink()."-install");
   }
 
@@ -63,5 +63,5 @@
     $this->displayInstallPage();
 
-    $this->tabsheet->select($_REQUEST['f_tabsheet']);
+    $this->tabsheet->select($_GET['tab']);
     $this->tabsheet->assign();
     $selected_tab=$this->tabsheet->get_selected();
@@ -102,5 +102,5 @@
   protected function checkRequest()
   {
-    $_REQUEST['f_tabsheet']='install';
+    $_GET['tab']='install';
 
     if(isset($_REQUEST['ajaxfct']))
Index: /extensions/ColorStat/cstat_version.inc.php
===================================================================
--- /extensions/ColorStat/cstat_version.inc.php	(revision 15343)
+++ /extensions/ColorStat/cstat_version.inc.php	(revision 15344)
@@ -15,6 +15,6 @@
   if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
 
-  define('CSTAT_VERSION',  '1.1.0');
-  define('CSTAT_VERSION2', '01.01.00');
-  define('CSTAT_GPC_NEEDED', '3.5.1');
+  define('CSTAT_VERSION',  '1.2.0');
+  define('CSTAT_VERSION2', '01.02.00');
+  define('CSTAT_GPC_NEEDED', '3.5.2');
 ?>
Index: /extensions/ColorStat/main.inc.php
===================================================================
--- /extensions/ColorStat/main.inc.php	(revision 15343)
+++ /extensions/ColorStat/main.inc.php	(revision 15344)
@@ -2,5 +2,5 @@
 /*
 Plugin Name: ColorStat
-Version: 1.1.0
+Version: 1.2.0
 Description: Allow to make stat on pictures colors
 Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=393
@@ -43,4 +43,6 @@
 |         |            |   . Compatibility with Piwigo 2.2
 |         |            |
+| 1.2.0   | 2012/05/25 | * mantis feature:2639
+|         |            |   . Compatibility with Piwigo 2.4
 |         |            |
 |         |            |
Index: /extensions/ColorStat/templates/cstat_dialog_colors_choose.tpl
===================================================================
--- /extensions/ColorStat/templates/cstat_dialog_colors_choose.tpl	(revision 15343)
+++ /extensions/ColorStat/templates/cstat_dialog_colors_choose.tpl	(revision 15344)
@@ -1,4 +1,7 @@
-{combine_script id="jquery.ui" path="themes/default/js/ui/minified/jquery.ui.core.min.js"}
-{combine_script id="jquery.ui.dialog" path="themes/default/js/ui/minified/jquery.ui.dialog.min.js"}
+{combine_script id="jquery.ui" require='jquery' path="themes/default/js/ui/jquery.ui.core.js"}
+{combine_script id="jquery.ui.widget" require='jquery.ui' path="themes/default/js/ui/jquery.ui.widget.js"}
+{combine_script id="jquery.ui.mouse" require='jquery.ui.widget' path="themes/default/js/ui/jquery.ui.mouse.js"}
+{combine_script id="jquery.ui.position" require='jquery.ui.widget' path="themes/default/js/ui/jquery.ui.position.js"}
+{combine_script id="jquery.ui.dialog" require='jquery.ui.widget' src="themes/default/js/ui/jquery.ui.dialog.js"}
 {combine_script id="jquery.tipTip" path="themes/default/js/plugins/jquery.tipTip.minified.js"}
 
