Index: /extensions/piclens/admin/functions.inc.php
===================================================================
--- /extensions/piclens/admin/functions.inc.php	(revision 21237)
+++ /extensions/piclens/admin/functions.inc.php	(revision 21238)
@@ -57,5 +57,5 @@
 
 $ext = array();
-  while ($row = mysql_fetch_assoc($result))
+  while ($row = pwg_db_fetch_assoc($result))
   {
     if (empty($row['tn_ext']))
Index: /extensions/piclens/admin/piclenswallconfig.php
===================================================================
--- /extensions/piclens/admin/piclenswallconfig.php	(revision 21237)
+++ /extensions/piclens/admin/piclenswallconfig.php	(revision 21238)
@@ -43,5 +43,5 @@
 	if (!empty($result))
 	{
-		while ($row = mysql_fetch_assoc($result))
+		while ($row = pwg_db_fetch_assoc($result))
 			array_push($categories, $row);			
 	}
@@ -67,5 +67,5 @@
   $me->my_config['piclens_wall_nav'] = isset($_POST['piclens_wall_nav']);
   $me->my_config['piclens_wall_cat_nav_replace'] = isset($_POST['categories_nav']) ? 
-                          array_map("mysql_escape_string", $_POST['categories_nav']) :
+                          array_map("pwg_db_real_escape_string", $_POST['categories_nav']) :
                           array(); 
   $me->my_config['piclens_wall_specif'] =   $_POST['piclens_wall_specif'];
@@ -124,5 +124,5 @@
 if (!empty($result))
 {
-	while ($row = mysql_fetch_assoc($result))
+	while ($row = pwg_db_fetch_assoc($result))
 		array_push($categories, $row);
 }
@@ -157,5 +157,5 @@
 if (!empty($result))
 {
-	while ($row = mysql_fetch_assoc($result))
+	while ($row = pwg_db_fetch_assoc($result))
 		array_push($categories, $row);
 }
Index: /extensions/piclens/admin/rssfeed.php
===================================================================
--- /extensions/piclens/admin/rssfeed.php	(revision 21237)
+++ /extensions/piclens/admin/rssfeed.php	(revision 21238)
@@ -35,5 +35,5 @@
   
   $included_file_types = isset($_POST['file_types']) ? 
-                          array_map("mysql_escape_string", $_POST['file_types']) :
+                          array_map("pwg_db_real_escape_string", $_POST['file_types']) :
                           array(); 
   $me->my_config['included_file_types'] = $included_file_types;
Index: /extensions/piclens/generate_rss.php
===================================================================
--- /extensions/piclens/generate_rss.php	(revision 21237)
+++ /extensions/piclens/generate_rss.php	(revision 21238)
@@ -251,5 +251,5 @@
 					$result = pwg_query($query);
 
-					while ($row = mysql_fetch_assoc($result))
+					while ($row = pwg_db_fetch_assoc($result))
 					{
 						if (!(in_array($row['id'], explode(',', $user['forbidden_categories']))))
@@ -386,5 +386,5 @@
 			$result = pwg_query($query);
 			
-			while ($row = mysql_fetch_assoc($result))
+			while ($row = pwg_db_fetch_assoc($result))
 			{
 				// Plugin Extended Description present et active
@@ -756,5 +756,5 @@
 		$first = true;
 
-		while ($row = mysql_fetch_array($result))
+		while ($row = pwg_db_fetch_assoc($result))
 		{
 		
Index: /extensions/piclens/include/Piclens.class.php
===================================================================
--- /extensions/piclens/include/Piclens.class.php	(revision 21237)
+++ /extensions/piclens/include/Piclens.class.php	(revision 21238)
@@ -84,5 +84,5 @@
 						$piclnkMaster='';
 						$result = pwg_query($query);
-						while ($row = mysql_fetch_assoc($result))
+						while ($row = pwg_db_fetch_assoc($result))
 						{
 							// Gestion des permalinks
@@ -150,5 +150,5 @@
 							$result = pwg_query($query);
 
-							while ($row = mysql_fetch_assoc($result))
+							while ($row = pwg_db_fetch_assoc($result))
 							{
 								if (!(in_array($row['id'], explode(',', $user['forbidden_categories']))))
@@ -193,5 +193,5 @@
 							$result = pwg_query($query);
 
-							while ($row = mysql_fetch_array($result))
+							while ($row = pwg_db_fetch_assoc($result))
 							{
 								$piclnkMaster.='<link rel="alternate"'
@@ -283,6 +283,9 @@
 						$tpl_code='<li><img src="'.$this->root_site_piclens.PICLENS_IMG_PATH.'cooliris-icon-black.png" NAME="but1" class="button" alt="'.l10n('piclens_button').'" width="24" height="24"></a></li>';
 				}
+        
 				if (isset($tpl_code))
-					$template->concat('PLUGIN_INDEX_ACTIONS', $tpl_code."\n");
+        {
+          $template->add_index_button($tpl_code, 100);
+        }
 			}
 			
@@ -318,5 +321,5 @@
 	    if($result) 
 		{
-		     $row = mysql_fetch_row($result);
+		     $row = pwg_db_fetch_row($result);
 		     if(is_string($row[0])) 
 			 {
Index: /extensions/piclens/main.inc.php
===================================================================
--- /extensions/piclens/main.inc.php	(revision 21237)
+++ /extensions/piclens/main.inc.php	(revision 21238)
@@ -2,5 +2,5 @@
 /*
  * Plugin Name: CoolIris-Piclens
- * Version: 0.4.4
+ * Version: auto
  * Description: Cooliris/Piclens activation
  * Plugin URI: http://piwigo.org/ext/extension_view.php?eid=234
Index: /extensions/piclens/maintain.inc.php
===================================================================
--- /extensions/piclens/maintain.inc.php	(revision 21237)
+++ /extensions/piclens/maintain.inc.php	(revision 21238)
@@ -26,5 +26,5 @@
 	if($result) 
 	{
-		 $row = mysql_fetch_row($result);
+		 $row = pwg_db_fetch_row($result);
 		 if(is_string($row[0])) 
 		 {
