Index: /trunk/admin/cat_modify.php
===================================================================
--- /trunk/admin/cat_modify.php	(revision 4264)
+++ /trunk/admin/cat_modify.php	(revision 4265)
@@ -194,5 +194,5 @@
   WHERE id = '.$_GET['cat_id'].'
 ;';
-$category = mysql_fetch_array( pwg_query( $query ) );
+$category = mysql_fetch_assoc( pwg_query( $query ) );
 // nullable fields
 foreach (array('comment','dir','site_id', 'id_uppercat') as $nullable)
@@ -374,5 +374,5 @@
   WHERE id = '.$category['representative_picture_id'].'
 ;';
-    $row = mysql_fetch_array(pwg_query($query));
+    $row = mysql_fetch_assoc(pwg_query($query));
     $src = get_thumbnail_url($row);
     $url = get_root_url().'admin.php?page=picture_modify';
Index: /trunk/admin/cat_perm.php
===================================================================
--- /trunk/admin/cat_perm.php	(revision 4264)
+++ /trunk/admin/cat_perm.php	(revision 4265)
@@ -46,5 +46,5 @@
   WHERE id = '.$_GET['cat'].'
 ;';
-  list($status) = mysql_fetch_array(pwg_query($query));
+  list($status) = mysql_fetch_row(pwg_query($query));
   
   if ('private' == $status)
@@ -63,5 +63,5 @@
 ;';
 
-  list($page['cat']) = mysql_fetch_array(pwg_query($query));
+  list($page['cat']) = mysql_fetch_row(pwg_query($query));
 }
 
@@ -111,5 +111,5 @@
 ;';
   $result = pwg_query($query);
-  while ($row = mysql_fetch_array($result))
+  while ($row = mysql_fetch_assoc($result))
   {
     array_push($granteds[$row['cat_id']], $row['group_id']);
@@ -170,5 +170,5 @@
 ;';
   $result = pwg_query($query);
-  while ($row = mysql_fetch_array($result))
+  while ($row = mysql_fetch_assoc($result))
   {
     array_push($granteds[$row['cat_id']], $row['user_id']);
@@ -275,5 +275,5 @@
 ';
   $result = pwg_query($query);
-  while ($row = mysql_fetch_array($result))
+  while ($row = mysql_fetch_assoc($result))
   {
     if (!isset($granted_groups[$row['group_id']]))
Index: /trunk/admin/configuration.php
===================================================================
--- /trunk/admin/configuration.php	(revision 4264)
+++ /trunk/admin/configuration.php	(revision 4265)
@@ -139,5 +139,5 @@
     //echo '<pre>'; print_r($_POST); echo '</pre>';
     $result = pwg_query('SELECT param FROM '.CONFIG_TABLE);
-    while ($row = mysql_fetch_array($result))
+    while ($row = mysql_fetch_assoc($result))
     {
       if (isset($_POST[$row['param']]))
Index: /trunk/admin/element_set.php
===================================================================
--- /trunk/admin/element_set.php	(revision 4264)
+++ /trunk/admin/element_set.php	(revision 4265)
@@ -193,5 +193,5 @@
   $query = 'SELECT MAX(date_available) AS date
   FROM '.IMAGES_TABLE;
-  if ($row=mysql_fetch_array( pwg_query($query) ) )
+  if ($row = mysql_fetch_assoc( pwg_query($query) ) )
   {
     $query = 'SELECT id
Index: /trunk/admin/element_set_global.php
===================================================================
--- /trunk/admin/element_set_global.php	(revision 4264)
+++ /trunk/admin/element_set_global.php	(revision 4265)
@@ -246,5 +246,5 @@
     $result = pwg_query($query);
 
-    while ($row = mysql_fetch_array($result))
+    while ($row = mysql_fetch_assoc($result))
     {
       $data = array();
Index: /trunk/admin/element_set_ranks.php
===================================================================
--- /trunk/admin/element_set_ranks.php	(revision 4264)
+++ /trunk/admin/element_set_ranks.php	(revision 4265)
@@ -116,5 +116,5 @@
   WHERE id = '.$page['category_id'].'
 ;';
-$category = mysql_fetch_array(pwg_query($query));
+$category = mysql_fetch_assoc(pwg_query($query));
 
 // Navigation path
Index: /trunk/admin/element_set_unit.php
===================================================================
--- /trunk/admin/element_set_unit.php	(revision 4264)
+++ /trunk/admin/element_set_unit.php	(revision 4265)
@@ -57,5 +57,5 @@
   $result = pwg_query($query);
 
-  while ($row = mysql_fetch_array($result))
+  while ($row = mysql_fetch_assoc($result))
   {
     $data = array();
Index: /trunk/admin/group_list.php
===================================================================
--- /trunk/admin/group_list.php	(revision 4264)
+++ /trunk/admin/group_list.php	(revision 4265)
@@ -176,5 +176,5 @@
 $toggle_is_default_url     = $admin_url.'group_list&amp;toggle_is_default=';
 
-while ($row = mysql_fetch_array($result))
+while ($row = mysql_fetch_assoc($result))
 {
   $query = '
Index: /trunk/admin/group_perm.php
===================================================================
--- /trunk/admin/group_perm.php	(revision 4264)
+++ /trunk/admin/group_perm.php	(revision 4265)
@@ -80,5 +80,5 @@
 ;';
   $result = pwg_query($query);
-  while ($row = mysql_fetch_array($result))
+  while ($row = mysql_fetch_assoc($result))
   {
     array_push($private_uppercats, $row['id']);
@@ -97,5 +97,5 @@
   $result = pwg_query($query);
 
-  while ($row = mysql_fetch_array($result))
+  while ($row = mysql_fetch_assoc($result))
   {
     array_push($authorized_ids, $row['cat_id']);
@@ -158,5 +158,5 @@
 $result = pwg_query($query_true);
 $authorized_ids = array();
-while ($row = mysql_fetch_array($result))
+while ($row = mysql_fetch_assoc($result))
 {
   array_push($authorized_ids, $row['id']);
Index: /trunk/admin/history.php
===================================================================
--- /trunk/admin/history.php	(revision 4264)
+++ /trunk/admin/history.php	(revision 4265)
@@ -258,5 +258,5 @@
 
     $username_of = array();
-    while ($row = mysql_fetch_array($result))
+    while ($row = mysql_fetch_assoc($result))
     {
       $username_of[$row['id']] = $row['username'];
@@ -306,5 +306,5 @@
 
     $result = pwg_query($query);
-    while ($row = mysql_fetch_array($result))
+    while ($row = mysql_fetch_assoc($result))
     {
       $label_of_image[ $row['id'] ] = $row['label'];
@@ -342,5 +342,5 @@
 
     $result = pwg_query($query);
-    while ($row = mysql_fetch_array($result))
+    while ($row = mysql_fetch_assoc($result))
     {
       $name_of_tag[ $row['id'] ] = $row['name'];
Index: /trunk/admin/include/c13y_internal.class.php
===================================================================
--- /trunk/admin/include/c13y_internal.class.php	(revision 4264)
+++ /trunk/admin/include/c13y_internal.class.php	(revision 4265)
@@ -127,5 +127,5 @@
 
     $result = pwg_query($query);
-    while ($row = mysql_fetch_array($result))
+    while ($row = mysql_fetch_assoc($result))
     {
       $status[$row['id']] = $row['status'];
Index: /trunk/admin/include/functions.php
===================================================================
--- /trunk/admin/include/functions.php	(revision 4264)
+++ /trunk/admin/include/functions.php	(revision 4265)
@@ -37,5 +37,5 @@
   $result = pwg_query($query);
   $category_ids = array();
-  while ($row = mysql_fetch_array($result))
+  while ($row = mysql_fetch_assoc($result))
   {
     array_push($category_ids, $row['id']);
@@ -78,5 +78,5 @@
   $result = pwg_query($query);
   $element_ids = array();
-  while ($row = mysql_fetch_array($result))
+  while ($row = mysql_fetch_assoc($result))
   {
     array_push($element_ids, $row['id']);
@@ -545,5 +545,5 @@
     $columns = array();
     $all_fields = array_merge($dbfields['primary'], $dbfields['update']);
-    while ($row = mysql_fetch_array($result))
+    while ($row = mysql_fetch_assoc($result))
     {
       if (in_array($row['Field'], $all_fields))
@@ -631,5 +631,5 @@
 
   $result = pwg_query($query);
-  while ($row = mysql_fetch_array($result))
+  while ($row = mysql_fetch_assoc($result))
   {
     if ($row['id_uppercat'] != $current_uppercat)
@@ -777,5 +777,5 @@
 ;';
   $result = pwg_query($query);
-  while ($row = mysql_fetch_array($result))
+  while ($row = mysql_fetch_assoc($result))
   {
     $uppercats = array_merge($uppercats,
@@ -804,5 +804,5 @@
   LIMIT 0,1
 ;';
-    list($representative) = mysql_fetch_array(pwg_query($query));
+    list($representative) = mysql_fetch_row(pwg_query($query));
 
     array_push(
@@ -864,5 +864,5 @@
 ;';
   $result = pwg_query($query);
-  while ($row = mysql_fetch_array($result))
+  while ($row = mysql_fetch_assoc($result))
   {
     array_push($categories, $row);
@@ -1140,5 +1140,5 @@
   $datas = array();
 
-  while ($row = mysql_fetch_array($result))
+  while ($row = mysql_fetch_assoc($result))
   {
     array_push(
@@ -1207,5 +1207,5 @@
 ;';
   $result = pwg_query($query);
-  while ($row = mysql_fetch_array($result))
+  while ($row = mysql_fetch_assoc($result))
   {
     $categories[$row['id']] =
@@ -1356,5 +1356,5 @@
   WHERE id_uppercat '.(is_numeric($parent_id) ? '= '.$parent_id : 'IS NULL').'
 ;';
-  list($current_rank) = mysql_fetch_array(pwg_query($query));
+  list($current_rank) = mysql_fetch_row(pwg_query($query));
 
   $insert = array(
@@ -1372,8 +1372,8 @@
   WHERE id = '.$parent_id.'
 ;';
-    $parent = mysql_fetch_array(pwg_query($query));
-
-    $insert{'id_uppercat'} = $parent{'id'};
-    $insert{'global_rank'} = $parent{'global_rank'}.'.'.$insert{'rank'};
+    $parent = mysql_fetch_assoc(pwg_query($query));
+
+    $insert['id_uppercat'] = $parent['id'];
+    $insert['global_rank'] = $parent['global_rank'].'.'.$insert['rank'];
 
     // at creation, must a category be visible or not ? Warning : if the
@@ -1382,9 +1382,9 @@
     if ('false' == $parent['visible'])
     {
-      $insert{'visible'} = 'false';
+      $insert['visible'] = 'false';
     }
     else
     {
-      $insert{'visible'} = boolean_to_string($conf['newcat_default_visible']);
+      $insert['visible'] = boolean_to_string($conf['newcat_default_visible']);
     }
 
@@ -1394,16 +1394,16 @@
     if ('private' == $parent['status'])
     {
-      $insert{'status'} = 'private';
+      $insert['status'] = 'private';
     }
     else
     {
-      $insert{'status'} = $conf['newcat_default_status'];
+      $insert['status'] = $conf['newcat_default_status'];
     }
   }
   else
   {
-    $insert{'visible'} = boolean_to_string($conf['newcat_default_visible']);
-    $insert{'status'} = $conf['newcat_default_status'];
-    $insert{'global_rank'} = $insert{'rank'};
+    $insert['visible'] = boolean_to_string($conf['newcat_default_visible']);
+    $insert['status'] = $conf['newcat_default_status'];
+    $insert['global_rank'] = $insert['rank'];
   }
 
@@ -1610,5 +1610,5 @@
   $query = 'SHOW TABLES LIKE \''.$prefixeTable.'%\'';
   $result = pwg_query($query);
-  while ($row = mysql_fetch_array($result))
+  while ($row = mysql_fetch_assoc($result))
   {
     array_push($all_tables, $row[0]);
@@ -1626,5 +1626,5 @@
     $query = 'DESC '.$table_name.';';
     $result = pwg_query($query);
-    while ($row = mysql_fetch_array($result))
+    while ($row = mysql_fetch_assoc($result))
     {
       if ($row['Key'] == 'PRI')
Index: /trunk/admin/include/functions_metadata.php
===================================================================
--- /trunk/admin/include/functions_metadata.php	(revision 4264)
+++ /trunk/admin/include/functions_metadata.php	(revision 4265)
@@ -260,5 +260,5 @@
 ;';
   $result = pwg_query($query);
-  while ($row = mysql_fetch_array($result))
+  while ($row = mysql_fetch_assoc($result))
   {
     array_push($cat_ids, $row['id']);
@@ -285,5 +285,5 @@
 ;';
   $result = pwg_query($query);
-  while ($row = mysql_fetch_array($result))
+  while ($row = mysql_fetch_assoc($result))
   {
     $files[$row['id']] = $row['path'];
Index: /trunk/admin/include/functions_notification_by_mail.inc.php
===================================================================
--- /trunk/admin/include/functions_notification_by_mail.inc.php	(revision 4264)
+++ /trunk/admin/include/functions_notification_by_mail.inc.php	(revision 4265)
@@ -168,5 +168,5 @@
     if (!empty($result))
     {
-      while ($nbm_user = mysql_fetch_array($result))
+      while ($nbm_user = mysql_fetch_assoc($result))
       {
         array_push($data_users, $nbm_user);
Index: /trunk/admin/include/functions_permalinks.php
===================================================================
--- /trunk/admin/include/functions_permalinks.php	(revision 4264)
+++ /trunk/admin/include/functions_permalinks.php	(revision 4265)
@@ -53,5 +53,5 @@
   $cat_id = null;
   if ( mysql_num_rows($result) )
-    list( $cat_id ) = mysql_fetch_array($result);
+    list( $cat_id ) = mysql_fetch_row($result);
   return $cat_id;
 }
@@ -75,5 +75,5 @@
   if ( mysql_num_rows($result) )
   {
-    list($permalink) = mysql_fetch_array($result);
+    list($permalink) = mysql_fetch_row($result);
   }
   if ( !isset($permalink) )
Index: /trunk/admin/notification_by_mail.php
===================================================================
--- /trunk/admin/notification_by_mail.php	(revision 4264)
+++ /trunk/admin/notification_by_mail.php	(revision 4265)
@@ -151,5 +151,5 @@
     $check_key_list = array();
 
-    while ($nbm_user = mysql_fetch_array($result))
+    while ($nbm_user = mysql_fetch_assoc($result))
     {
       // Calculate key
@@ -513,5 +513,5 @@
       // Update param
       $result = pwg_query('select param, value from '.CONFIG_TABLE.' where param like \'nbm\\_%\'');
-      while ($nbm_user = mysql_fetch_array($result))
+      while ($nbm_user = mysql_fetch_assoc($result))
       {
         if (isset($_POST[$nbm_user['param']]))
Index: /trunk/admin/picture_modify.php
===================================================================
--- /trunk/admin/picture_modify.php	(revision 4264)
+++ /trunk/admin/picture_modify.php	(revision 4265)
@@ -176,5 +176,5 @@
   WHERE id = '.$_GET['image_id'].'
 ;';
-$row = mysql_fetch_array(pwg_query($query));
+$row = mysql_fetch_assoc(pwg_query($query));
 
 $storage_category_id = null;
@@ -325,5 +325,5 @@
 $result = pwg_query($query);
 
-while ($row = mysql_fetch_array($result))
+while ($row = mysql_fetch_assoc($result))
 {
   $name =
@@ -418,5 +418,5 @@
   array_push($associateds, $storage_category_id);
 }
-while ($row = mysql_fetch_array($result))
+while ($row = mysql_fetch_assoc($result))
 {
   array_push($associateds, $row['id']);
Index: /trunk/admin/rating.php
===================================================================
--- /trunk/admin/rating.php	(revision 4264)
+++ /trunk/admin/rating.php	(revision 4265)
@@ -95,5 +95,5 @@
 ;';
 $result = pwg_query($query);
-while ($row = mysql_fetch_array($result))
+while ($row = mysql_fetch_assoc($result))
 {
   $users[$row['id']]=$row['username'];
@@ -215,5 +215,5 @@
    );
 
-  while ($row = mysql_fetch_array($result))
+  while ($row = mysql_fetch_assoc($result))
   {
 
Index: /trunk/admin/site_manager.php
===================================================================
--- /trunk/admin/site_manager.php	(revision 4264)
+++ /trunk/admin/site_manager.php	(revision 4265)
@@ -99,5 +99,5 @@
   WHERE galleries_url = \''.$url.'\'
 ;';
-  $row = mysql_fetch_array(pwg_query($query));
+  $row = mysql_fetch_assoc(pwg_query($query));
   if ($row['count'] > 0)
   {
@@ -168,5 +168,5 @@
   WHERE id = '.$page['site'].'
 ;';
-  list($galleries_url) = mysql_fetch_array(pwg_query($query));
+  list($galleries_url) = mysql_fetch_row(pwg_query($query));
   switch($_GET['action'])
   {
@@ -237,5 +237,5 @@
 $result = pwg_query($query);
 
-while ($row = mysql_fetch_array($result))
+while ($row = mysql_fetch_assoc($result))
 {
   $is_remote = url_is_remote($row['galleries_url']);
Index: /trunk/admin/site_update.php
===================================================================
--- /trunk/admin/site_update.php	(revision 4264)
+++ /trunk/admin/site_update.php	(revision 4265)
@@ -186,5 +186,5 @@
   FROM '.CATEGORIES_TABLE;
   $result = pwg_query($query);
-  while ($row = mysql_fetch_array($result))
+  while ($row = mysql_fetch_assoc($result))
   {
     $next_rank[$row['id']] = 1;
@@ -197,5 +197,5 @@
   GROUP BY id_uppercat';
   $result = pwg_query($query);
-  while ($row = mysql_fetch_array($result))
+  while ($row = mysql_fetch_assoc($result))
   {
     // for the id_uppercat NULL, we write 'NULL' and not the empty string
@@ -211,5 +211,5 @@
 SELECT IF(MAX(id)+1 IS NULL, 1, MAX(id)+1) AS next_id
   FROM '.CATEGORIES_TABLE;
-  list($next_id) = mysql_fetch_array(pwg_query($query));
+  list($next_id) = mysql_fetch_row(pwg_query($query));
 
   // retrieve sub-directories fulldirs from the site reader
@@ -387,5 +387,5 @@
     AND validated = \'false\'';
     $result = pwg_query($query);
-    while ($row = mysql_fetch_array($result))
+    while ($row = mysql_fetch_assoc($result))
     {
       array_push(
@@ -403,5 +403,5 @@
 SELECT IF(MAX(id)+1 IS NULL, 1, MAX(id)+1) AS next_element_id
   FROM '.IMAGES_TABLE;
-  list($next_element_id) = mysql_fetch_array(pwg_query($query));
+  list($next_element_id) = mysql_fetch_row(pwg_query($query));
 
   $start = get_moment();
@@ -556,5 +556,5 @@
     $waiting_to_delete = array();
 
-    while ($row = mysql_fetch_array($result))
+    while ($row = mysql_fetch_assoc($result))
     {
       $data = array();
@@ -565,5 +565,5 @@
   WHERE storage_category_id = '.$row['storage_category_id'].'
     AND file = \''.$row['file'].'\'';
-      list($data['id']) = mysql_fetch_array(pwg_query($query));
+      list($data['id']) = mysql_fetch_row(pwg_query($query));
 
       foreach ($fields['update'] as $field)
Index: /trunk/admin/stats.php
===================================================================
--- /trunk/admin/stats.php	(revision 4264)
+++ /trunk/admin/stats.php	(revision 4265)
@@ -96,5 +96,5 @@
 
   $output = array();
-  while ($row = mysql_fetch_array($result))
+  while ($row = mysql_fetch_assoc($result))
   {
     array_push($output, $row);
@@ -134,5 +134,5 @@
 $first_time_key = null;
 
-while ($row = mysql_fetch_array($result))
+while ($row = mysql_fetch_assoc($result))
 {
   $time_keys = array(
Index: /trunk/admin/tags.php
===================================================================
--- /trunk/admin/tags.php	(revision 4264)
+++ /trunk/admin/tags.php	(revision 4265)
@@ -50,5 +50,5 @@
 ;';
   $result = pwg_query($query);
-  while ($row = mysql_fetch_array($result))
+  while ($row = mysql_fetch_assoc($result))
   {
     $current_name_of[ $row['id'] ] = $row['name'];
@@ -221,5 +221,5 @@
 ;';
   $result = pwg_query($query);
-  while ($row = mysql_fetch_array($result))
+  while ($row = mysql_fetch_assoc($result))
   {
     $name_of[ $row['id'] ] = $row['name'];
Index: /trunk/admin/upload.php
===================================================================
--- /trunk/admin/upload.php	(revision 4264)
+++ /trunk/admin/upload.php	(revision 4265)
@@ -101,5 +101,5 @@
 ;';
     $result = pwg_query($query);
-    while($row = mysql_fetch_array($result))
+    while($row = mysql_fetch_assoc($result))
     {
       $dir = get_complete_dir($row['storage_category_id']);
@@ -154,5 +154,5 @@
 $query.= ';';
 $result = pwg_query( $query );
-while ( $row = mysql_fetch_array( $result ) )
+while ( $row = mysql_fetch_assoc( $result ) )
 {
   if ( !isset( $cat_names[$row['storage_category_id']] ) )
Index: /trunk/admin/user_list.php
===================================================================
--- /trunk/admin/user_list.php	(revision 4264)
+++ /trunk/admin/user_list.php	(revision 4265)
@@ -116,5 +116,5 @@
 
   $result = pwg_query($query);
-  while ($row = mysql_fetch_array($result))
+  while ($row = mysql_fetch_assoc($result))
   {
     $user = $row;
@@ -140,5 +140,5 @@
 ;';
     $result = pwg_query($query);
-    while ($row = mysql_fetch_array($result))
+    while ($row = mysql_fetch_assoc($result))
     {
       array_push(
@@ -493,5 +493,5 @@
 $result = pwg_query($query);
 
-while ($row = mysql_fetch_array($result))
+while ($row = mysql_fetch_assoc($result))
 {
   $groups[$row['id']] = $row['name'];
Index: /trunk/admin/user_perm.php
===================================================================
--- /trunk/admin/user_perm.php	(revision 4264)
+++ /trunk/admin/user_perm.php	(revision 4265)
@@ -79,5 +79,5 @@
 ;';
   $result = pwg_query($query);
-  while ($row = mysql_fetch_array($result))
+  while ($row = mysql_fetch_assoc($result))
   {
     array_push($private_uppercats, $row['id']);
@@ -96,5 +96,5 @@
   $result = pwg_query($query);
 
-  while ($row = mysql_fetch_array($result))
+  while ($row = mysql_fetch_assoc($result))
   {
     array_push($authorized_ids, $row['cat_id']);
@@ -159,5 +159,5 @@
 {
   $cats = array();
-  while ($row = mysql_fetch_array($result))
+  while ($row = mysql_fetch_assoc($result))
   {
     array_push($cats, $row);
@@ -192,5 +192,5 @@
 $result = pwg_query($query_true);
 $authorized_ids = array();
-while ($row = mysql_fetch_array($result))
+while ($row = mysql_fetch_assoc($result))
 {
   array_push($authorized_ids, $row['id']);
Index: /trunk/include/calendar_monthly.class.php
===================================================================
--- /trunk/include/calendar_monthly.class.php	(revision 4264)
+++ /trunk/include/calendar_monthly.class.php	(revision 4265)
@@ -232,5 +232,5 @@
   $result = pwg_query($query);
   $items=array();
-  while ($row = mysql_fetch_array($result))
+  while ($row = mysql_fetch_assoc($result))
   {
     $y = substr($row['period'], 0, 4);
@@ -284,5 +284,5 @@
   $result = pwg_query($query);
   $items=array();
-  while ($row = mysql_fetch_array($result))
+  while ($row = mysql_fetch_assoc($result))
   {
     $m = (int)substr($row['period'], 0, 2);
@@ -334,5 +334,5 @@
   $items=array();
   $result = pwg_query($query);
-  while ($row = mysql_fetch_array($result))
+  while ($row = mysql_fetch_assoc($result))
   {
     $d = (int)$row['period'];
Index: /trunk/include/category_cats.inc.php
===================================================================
--- /trunk/include/category_cats.inc.php	(revision 4264)
+++ /trunk/include/category_cats.inc.php	(revision 4265)
@@ -179,5 +179,5 @@
 ;';
     $result = pwg_query($query);
-    while ($row = mysql_fetch_array($result))
+    while ($row = mysql_fetch_assoc($result))
     {
       $dates_of_category[ $row['category_id'] ] = array(
Index: /trunk/include/functions.inc.php
===================================================================
--- /trunk/include/functions.inc.php	(revision 4264)
+++ /trunk/include/functions.inc.php	(revision 4265)
@@ -45,5 +45,5 @@
   // columns are 'Field', 'Type'
   $result = pwg_query('desc '.$table);
-  while ($row = mysql_fetch_array($result))
+  while ($row = mysql_fetch_assoc($result))
   {
     // we are only interested in the the field given in parameter for the
@@ -936,5 +936,5 @@
 
   $result = pwg_query($query);
-  while ($row = mysql_fetch_array($result))
+  while ($row = mysql_fetch_assoc($result))
   {
     array_push($array, $row[$fieldname]);
@@ -1122,5 +1122,5 @@
   WHERE '.$conf['user_fields']['id'].' = '.$conf['webmaster_id'].'
 ;';
-  list($email) = mysql_fetch_array(pwg_query($query));
+  list($email) = mysql_fetch_row(pwg_query($query));
 
   return $email;
@@ -1148,5 +1148,5 @@
   }
 
-  while ($row = mysql_fetch_array($result))
+  while ($row = mysql_fetch_assoc($result))
   {
     $conf[ $row['param'] ] = isset($row['value']) ? $row['value'] : '';
@@ -1193,5 +1193,5 @@
 
   $result = pwg_query($query);
-  while ($row = mysql_fetch_array($result))
+  while ($row = mysql_fetch_assoc($result))
   {
     $array[ $row[$keyname] ] = $row[$valuename];
@@ -1585,5 +1585,5 @@
     // Use MySql date in order to standardize all recent "actions/queries"
     list($cache['get_icon']['sql_recent_date']) =
-      mysql_fetch_array(pwg_query('select SUBDATE(
+      mysql_fetch_row(pwg_query('select SUBDATE(
       CURRENT_DATE,INTERVAL '.$user['recent_period'].' DAY)'));
   }
Index: /trunk/include/functions_category.inc.php
===================================================================
--- /trunk/include/functions_category.inc.php	(revision 4264)
+++ /trunk/include/functions_category.inc.php	(revision 4265)
@@ -241,5 +241,5 @@
     $query.= ' FROM '.CATEGORIES_TABLE.' WHERE id = '.$category_id;
     $query.= ';';
-    $row = mysql_fetch_array( pwg_query( $query ) );
+    $row = mysql_fetch_assoc( pwg_query( $query ) );
     $uppercats = $row['uppercats'];
   }
@@ -252,5 +252,5 @@
   $query.= ';';
   $result = pwg_query( $query );
-  while( $row = mysql_fetch_array( $result ) )
+  while( $row = mysql_fetch_assoc( $result ) )
   {
     $database_dirs[$row['id']] = $row['dir'];
@@ -276,5 +276,5 @@
     AND c.id = '.$category_id.'
 ;';
-  $row = mysql_fetch_array(pwg_query($query));
+  $row = mysql_fetch_assoc(pwg_query($query));
   return $row['galleries_url'];
 }
@@ -385,5 +385,5 @@
 
   $subcats = array();
-  while ($row = mysql_fetch_array($result))
+  while ($row = mysql_fetch_assoc($result))
   {
     array_push($subcats, $row['id']);
Index: /trunk/include/functions_mail.inc.php
===================================================================
--- /trunk/include/functions_mail.inc.php	(revision 4264)
+++ /trunk/include/functions_mail.inc.php	(revision 4265)
@@ -352,5 +352,5 @@
   if (!empty($datas))
   {
-    while ($admin = mysql_fetch_array($datas))
+    while ($admin = mysql_fetch_assoc($datas))
     {
       if (!empty($admin['mail_address']))
@@ -451,5 +451,5 @@
   {
     $list = array();
-    while ($row = mysql_fetch_array($result))
+    while ($row = mysql_fetch_assoc($result))
     {
       $row['template_theme'] = $row['template'];
@@ -480,5 +480,5 @@
       {
         $Bcc = array();
-        while ($row = mysql_fetch_array($result))
+        while ($row = mysql_fetch_assoc($result))
         {
           if (!empty($row['mail_address']))
Index: /trunk/include/functions_notification.inc.php
===================================================================
--- /trunk/include/functions_notification.inc.php	(revision 4264)
+++ /trunk/include/functions_notification.inc.php	(revision 4265)
@@ -146,5 +146,5 @@
     $query = 'SELECT count(distinct '.$field_id.') as CountId
 '.$query;
-    list($count) = mysql_fetch_array(pwg_query($query));
+    list($count) = mysql_fetch_row(pwg_query($query));
     return $count;
 
@@ -179,5 +179,5 @@
     $infos = array();
 
-    while ($row = mysql_fetch_array($result))
+    while ($row = mysql_fetch_assoc($result))
     {
       array_push($infos, $row);
Index: /trunk/include/functions_plugins.inc.php
===================================================================
--- /trunk/include/functions_plugins.inc.php	(revision 4264)
+++ /trunk/include/functions_plugins.inc.php	(revision 4265)
@@ -239,5 +239,5 @@
   $result = pwg_query($query);
   $plugins = array();
-  while ($row = mysql_fetch_array($result))
+  while ($row = mysql_fetch_assoc($result))
   {
     array_push($plugins, $row);
Index: /trunk/include/functions_search.inc.php
===================================================================
--- /trunk/include/functions_search.inc.php	(revision 4264)
+++ /trunk/include/functions_search.inc.php	(revision 4265)
@@ -459,5 +459,5 @@
   $by_weights=array();
   $result = pwg_query($query);
-  while ($row = mysql_fetch_array($result))
+  while ($row = mysql_fetch_assoc($result))
   { // weight is important when sorting images by relevance
     if ($row['weight'])
Index: /trunk/include/functions_user.inc.php
===================================================================
--- /trunk/include/functions_user.inc.php	(revision 4264)
+++ /trunk/include/functions_user.inc.php	(revision 4265)
@@ -59,5 +59,5 @@
 '.(is_numeric($user_id) ? 'and '.$conf['user_fields']['id'].' != \''.$user_id.'\'' : '').'
 ;';
-    list($count) = mysql_fetch_array(pwg_query($query));
+    list($count) = mysql_fetch_row(pwg_query($query));
     if ($count != 0)
     {
@@ -111,5 +111,5 @@
   FROM '.USERS_TABLE.'
 ;';
-    list($next_id) = mysql_fetch_array(pwg_query($query));
+    list($next_id) = mysql_fetch_row(pwg_query($query));
 
     $insert =
@@ -135,5 +135,5 @@
 
       $inserts = array();
-      while ($row = mysql_fetch_array($result))
+      while ($row = mysql_fetch_assoc($result))
       {
         array_push
@@ -250,5 +250,5 @@
   WHERE '.$conf['user_fields']['id'].' = \''.$user_id.'\'';
 
-  $row = mysql_fetch_array(pwg_query($query));
+  $row = mysql_fetch_assoc(pwg_query($query));
 
   while (true)
@@ -270,5 +270,5 @@
   }
 
-  $row = array_merge($row, mysql_fetch_array($result));
+  $row = array_merge($row, mysql_fetch_assoc($result));
 
   foreach ($row as $key => $value)
@@ -325,5 +325,5 @@
   WHERE category_id NOT IN ('.$userdata['forbidden_categories'].')
     AND image_id '.$userdata['image_access_type'].' ('.$userdata['image_access_list'].')';
-      list($userdata['nb_total_images']) = mysql_fetch_array(pwg_query($query));
+      list($userdata['nb_total_images']) = mysql_fetch_row(pwg_query($query));
 
 
@@ -429,5 +429,5 @@
   $result = pwg_query($query);
   $authorizeds = array();
-  while ($row = mysql_fetch_array($result))
+  while ($row = mysql_fetch_assoc($result))
   {
     array_push($authorizeds, $row['image_id']);
@@ -441,5 +441,5 @@
   $result = pwg_query($query);
   $favorites = array();
-  while ($row = mysql_fetch_array($result))
+  while ($row = mysql_fetch_assoc($result))
   {
     array_push($favorites, $row['image_id']);
@@ -482,5 +482,5 @@
 ;';
   $result = pwg_query($query);
-  while ($row = mysql_fetch_array($result))
+  while ($row = mysql_fetch_assoc($result))
   {
     array_push($private_array, $row['id']);
@@ -524,5 +524,5 @@
 ;';
     $result = pwg_query($query);
-    while ($row = mysql_fetch_array($result))
+    while ($row = mysql_fetch_assoc($result))
     {
       array_push($forbidden_array, $row['id']);
Index: /trunk/include/picture_comment.inc.php
===================================================================
--- /trunk/include/picture_comment.inc.php	(revision 4264)
+++ /trunk/include/picture_comment.inc.php	(revision 4265)
@@ -94,5 +94,5 @@
   FROM '.COMMENTS_TABLE.'
   WHERE image_id='.$page['image_id']." AND validated = 'true'";
-  $row = mysql_fetch_array( pwg_query( $query ) );
+  $row = mysql_fetch_assoc( pwg_query( $query ) );
 
   // navigation bar creation
@@ -141,5 +141,5 @@
     $result = pwg_query( $query );
 
-    while ($row = mysql_fetch_array($result))
+    while ($row = mysql_fetch_assoc($result))
     {
       if (!empty($row['author']))
Index: /trunk/include/picture_rate.inc.php
===================================================================
--- /trunk/include/picture_rate.inc.php	(revision 4264)
+++ /trunk/include/picture_rate.inc.php	(revision 4265)
@@ -38,5 +38,5 @@
   WHERE element_id = '.$picture['current']['id'].'
 ;';
-    $row = mysql_fetch_array(pwg_query($query));
+    $row = mysql_fetch_assoc(pwg_query($query));
   }
   else
@@ -70,5 +70,5 @@
       if (mysql_num_rows($result) > 0)
       {
-        $row = mysql_fetch_array($result);
+        $row = mysql_fetch_assoc($result);
         $user_rate = $row['rate'];
       }
Index: /trunk/install/db/12-database.php
===================================================================
--- /trunk/install/db/12-database.php	(revision 4264)
+++ /trunk/install/db/12-database.php	(revision 4265)
@@ -67,5 +67,5 @@
 $datas = array();
 
-while ($row = mysql_fetch_array($result))
+while ($row = mysql_fetch_assoc($result))
 {
   array_push(
Index: /trunk/install/db/18-database.php
===================================================================
--- /trunk/install/db/18-database.php	(revision 4264)
+++ /trunk/install/db/18-database.php	(revision 4265)
@@ -48,5 +48,5 @@
 $datas = array();
 
-while ($row = mysql_fetch_array($result))
+while ($row = mysql_fetch_assoc($result))
 {
   array_push(
Index: /trunk/install/db/19-database.php
===================================================================
--- /trunk/install/db/19-database.php	(revision 4264)
+++ /trunk/install/db/19-database.php	(revision 4265)
@@ -69,5 +69,5 @@
 ;';
 $result = pwg_query($query);
-while ($row = mysql_fetch_array($result))
+while ($row = mysql_fetch_assoc($result))
 {
   foreach(preg_split('/[,]+/', $row['keywords']) as $keyword)
Index: /trunk/install/db/20-database.php
===================================================================
--- /trunk/install/db/20-database.php	(revision 4264)
+++ /trunk/install/db/20-database.php	(revision 4265)
@@ -48,5 +48,5 @@
 
 $datas = array();
-while ($row = mysql_fetch_array($result))
+while ($row = mysql_fetch_assoc($result))
 {
   array_push(
Index: /trunk/install/db/65-database.php
===================================================================
--- /trunk/install/db/65-database.php	(revision 4264)
+++ /trunk/install/db/65-database.php	(revision 4265)
@@ -166,5 +166,5 @@
   $query = 'SHOW TABLES LIKE "'.$prefixeTable.'%"';
   $result = pwg_query($query);
-  while ( $row=mysql_fetch_array($result) )
+  while ( $row=mysql_fetch_assoc($result) )
   {
     array_push($all_tables, $row[0]);
@@ -177,5 +177,5 @@
     $result = pwg_query($query);
     $field_definitions=array();
-    while ( $row=mysql_fetch_array($result) )
+    while ( $row=mysql_fetch_assoc($result) )
     {
       if ( !isset($row['Collation']) or $row['Collation']=='NULL' )
Index: /trunk/install/db/8-database.php
===================================================================
--- /trunk/install/db/8-database.php	(revision 4264)
+++ /trunk/install/db/8-database.php	(revision 4265)
@@ -61,5 +61,5 @@
 $query = 'SELECT param FROM '.PREFIX_TABLE.'config';
 $result = pwg_query($query);
-while ($row = mysql_fetch_array($result))
+while ($row = mysql_fetch_assoc($result))
 {
   unset( $params[ $row['param'] ] );
Index: /trunk/install/db/9-database.php
===================================================================
--- /trunk/install/db/9-database.php	(revision 4264)
+++ /trunk/install/db/9-database.php	(revision 4265)
@@ -48,5 +48,5 @@
 $datas = array();
 
-while ($row = mysql_fetch_array($result))
+while ($row = mysql_fetch_assoc($result))
 {
   array_push(
Index: /trunk/install/upgrade_1.3.0.php
===================================================================
--- /trunk/install/upgrade_1.3.0.php	(revision 4264)
+++ /trunk/install/upgrade_1.3.0.php	(revision 4265)
@@ -85,5 +85,5 @@
 ;';
 $result = pwg_query($query);
-while ($row = mysql_fetch_array($result))
+while ($row = mysql_fetch_assoc($result))
 {
   if (!isset($row['id_uppercat']) or $row['id_uppercat'] == '')
Index: /trunk/install/upgrade_1.3.1.php
===================================================================
--- /trunk/install/upgrade_1.3.1.php	(revision 4264)
+++ /trunk/install/upgrade_1.3.1.php	(revision 4265)
@@ -43,5 +43,5 @@
   FROM '.PREFIX_TABLE.'config
 ;';
-$save = mysql_fetch_array(pwg_query($query));
+$save = mysql_fetch_assoc(pwg_query($query));
 
 $queries = array(
@@ -345,5 +345,5 @@
 ;';
   $result = pwg_query($query);
-  while ($row = mysql_fetch_array($result))
+  while ($row = mysql_fetch_assoc($result))
   {
     if ($row['Key_name'] != 'PRIMARY')
@@ -537,5 +537,5 @@
 ;';
 $result = pwg_query($query);
-while ($row = mysql_fetch_array($result))
+while ($row = mysql_fetch_assoc($result))
 {
   array_push($cat_ids, $row['unique_storage_category_id']);
@@ -562,5 +562,5 @@
 ;';
 $result = pwg_query($query);
-while ($row = mysql_fetch_array($result))
+while ($row = mysql_fetch_assoc($result))
 {
   array_push($cat_ids, $row['id']);
Index: /trunk/install/upgrade_1.4.0.php
===================================================================
--- /trunk/install/upgrade_1.4.0.php	(revision 4264)
+++ /trunk/install/upgrade_1.4.0.php	(revision 4265)
@@ -43,5 +43,5 @@
   WHERE param = \'prefix_thumbnail\'
 ;';
-list($prefix_thumbnail) = mysql_fetch_array(pwg_query($query));
+list($prefix_thumbnail) = mysql_fetch_row(pwg_query($query));
 
 // delete obsolete configuration
@@ -195,5 +195,5 @@
 
 $result = pwg_query($query);
-while ($row = mysql_fetch_array($result))
+while ($row = mysql_fetch_assoc($result))
 {
   $row['user_id'] = $row['id'];
Index: /trunk/install/upgrade_1.5.0.php
===================================================================
--- /trunk/install/upgrade_1.5.0.php	(revision 4264)
+++ /trunk/install/upgrade_1.5.0.php	(revision 4265)
@@ -80,5 +80,5 @@
 ;';
   $result = pwg_query($query);
-  while ($row = mysql_fetch_array($result))
+  while ($row = mysql_fetch_assoc($result))
   {
     foreach(preg_split('/[,]+/', $row['keywords']) as $keyword)
@@ -352,5 +352,5 @@
 $query = 'SELECT param FROM '.PREFIX_TABLE.'config';
 $result = pwg_query($query);
-while ($row = mysql_fetch_array($result))
+while ($row = mysql_fetch_assoc($result))
 {
   unset( $params[ $row['param'] ] );
@@ -453,5 +453,5 @@
 $result = pwg_query($query);
 
-while ($row = mysql_fetch_array($result))
+while ($row = mysql_fetch_assoc($result))
 {
   if (!in_array($row['Field'], $to_keep))
Index: /trunk/password.php
===================================================================
--- /trunk/password.php	(revision 4264)
+++ /trunk/password.php	(revision 4265)
@@ -80,5 +80,5 @@
       $datas = array();
       
-      while ($row = mysql_fetch_array($result))
+      while ($row = mysql_fetch_assoc($result))
       {
         $new_password = generate_key(6);
Index: /trunk/picture.php
===================================================================
--- /trunk/picture.php	(revision 4264)
+++ /trunk/picture.php	(revision 4265)
@@ -58,5 +58,5 @@
       '.%" ESCAPE "/" LIMIT 1';
   }
-  if ( ! ( $row = mysql_fetch_array(pwg_query($query)) ) )
+  if ( ! ( $row = mysql_fetch_assoc(pwg_query($query)) ) )
   {// element does not exist
     page_not_found( 'The requested image does not exist',
@@ -388,5 +388,5 @@
 $result = pwg_query($query);
 $related_categories = array();
-while ($row = mysql_fetch_array($result))
+while ($row = mysql_fetch_assoc($result))
 {
   array_push($related_categories, $row);
@@ -768,5 +768,5 @@
 ;';
   $result = pwg_query($query);
-  $row = mysql_fetch_array($result);
+  $row = mysql_fetch_assoc($result);
 
   if ($row['nb_fav'] == 0)
Index: /trunk/search_rules.php
===================================================================
--- /trunk/search_rules.php	(revision 4264)
+++ /trunk/search_rules.php	(revision 4265)
@@ -136,5 +136,5 @@
   if (!empty($result))
   {
-    while ($row = mysql_fetch_array($result))
+    while ($row = mysql_fetch_assoc($result))
     {
       array_push($categories, $row);
Index: /trunk/upload.php
===================================================================
--- /trunk/upload.php	(revision 4264)
+++ /trunk/upload.php	(revision 4265)
@@ -289,5 +289,5 @@
   $query.= ';';
   $result= pwg_query( $query );
-  $row = mysql_fetch_array( $result );
+  $row = mysql_fetch_assoc( $result );
   $file = substr ( $row['file'], 0, strrpos ( $row['file'], ".") );
   $extension = get_extension( $_FILES['picture']['name'] );
