Index: /trunk/admin.php
===================================================================
--- /trunk/admin.php	(revision 18627)
+++ /trunk/admin.php	(revision 18628)
@@ -254,5 +254,4 @@
         'cat_move',     // ?only POST
         'cat_options',  // ?only POST; public/private; lock/unlock
-        'picture_modify', // ?only POST; associate/dissociate
         'user_perm',
         'group_perm',
Index: /trunk/admin/include/functions.php
===================================================================
--- /trunk/admin/include/functions.php	(revision 18627)
+++ /trunk/admin/include/functions.php	(revision 18628)
@@ -34,10 +34,5 @@
   WHERE site_id = '.$id.'
 ;';
-  $result = pwg_query($query);
-  $category_ids = array();
-  while ($row = pwg_db_fetch_assoc($result))
-  {
-    array_push($category_ids, $row['id']);
-  }
+  $category_ids = array_from_query($query, 'id');
   delete_categories($category_ids);
 
@@ -80,10 +75,5 @@
 '.wordwrap(implode(', ', $ids), 80, "\n").')
 ;';
-  $result = pwg_query($query);
-  $element_ids = array();
-  while ($row = pwg_db_fetch_assoc($result))
-  {
-    array_push($element_ids, $row['id']);
-  }
+  $element_ids = array_from_query($query, 'id');
   delete_elements($element_ids);
 
@@ -396,5 +386,5 @@
     foreach ($orphan_tags as $tag)
     {
-      array_push($orphan_tag_ids, $tag['id']);
+      $orphan_tag_ids[] = $tag['id'];
     }
 
@@ -413,6 +403,4 @@
 function get_orphan_tags()
 {
-  $orphan_tags = array();
-
   $query = '
 SELECT
@@ -423,11 +411,5 @@
   WHERE tag_id IS NULL
 ;';
-  $result = pwg_query($query);
-  while ($row = pwg_db_fetch_assoc($result))
-  {
-    array_push($orphan_tags, $row);
-  }
-
-  return $orphan_tags;
+  return array_from_query($query);
 }
 
@@ -786,6 +768,4 @@
 
   // categories : id, site_id, uppercats
-  $categories = array();
-
   $query = '
 SELECT id, uppercats, site_id
@@ -795,9 +775,5 @@
 '.wordwrap(implode(', ', $cat_ids), 80, "\n").')
 ;';
-  $result = pwg_query($query);
-  while ($row = pwg_db_fetch_assoc($result))
-  {
-    array_push($categories, $row);
-  }
+  $categories = array_from_query($query);
 
   // filling $cat_fulldirs
@@ -1604,5 +1580,5 @@
   WHERE id IN ('.implode(',', $images).')
 ';
-  
+
   if (is_array($categories) and count($categories) > 0)
   {
@@ -2084,5 +2060,4 @@
     case 'rating':
     case 'tags':
-    case 'picture_modify':
     case 'batch_manager':
       return 0;
@@ -2146,13 +2121,4 @@
     {
       $alt_names = trigger_event('get_tag_alt_names', array(), $raw_name);
-
-      // TEMP 2.4
-      if (count($alt_names)==0 and preg_match_all('#\[lang=(.*?)\](.*?)\[/lang\]#is', $row['name'], $matches))
-      {
-        foreach ($matches[2] as $alt)
-        {
-          $alt_names[] = $alt;
-        }
-      }
 
       foreach( array_diff( array_unique($alt_names), array($name) ) as $alt)
Index: /trunk/admin/include/themes.class.php
===================================================================
--- /trunk/admin/include/themes.class.php	(revision 18627)
+++ /trunk/admin/include/themes.class.php	(revision 18628)
@@ -79,5 +79,5 @@
         {
           array_push(
-            $errors, 
+            $errors,
             sprintf(
               l10n('Impossible to activate this theme, the parent theme is missing: %s'),
@@ -85,5 +85,5 @@
               )
             );
-          
+
           break;
         }
@@ -212,5 +212,5 @@
           break;
         }
-        
+
         if (!$this->deltree(PHPWG_THEMES_PATH.$theme_id))
         {
@@ -221,5 +221,5 @@
       case 'set_default':
         // first we need to know which users are using the current default theme
-        $this->set_default_theme($theme_id);        
+        $this->set_default_theme($theme_id);
         break;
     }
@@ -233,12 +233,12 @@
       return null;
     }
-    
+
     $parent = $this->fs_themes[$theme_id]['parent'];
-      
+
     if ('default' == $parent)
     {
       return null;
     }
-      
+
     if (!isset($this->fs_themes[$parent]))
     {
@@ -252,5 +252,5 @@
   {
     $children = array();
-    
+
     foreach ($this->fs_themes as $test_child)
     {
@@ -262,13 +262,13 @@
 
     return $children;
-  } 
+  }
 
   function set_default_theme($theme_id)
   {
     global $conf;
-    
+
     // first we need to know which users are using the current default theme
     $default_theme = get_default_theme();
-    
+
     $query = '
 SELECT
@@ -301,5 +301,5 @@
     *
   FROM '.THEMES_TABLE;
-    
+
     $clauses = array();
     if (!empty($id))
@@ -322,12 +322,12 @@
   }
 
-  
+
   /**
   *  Get themes defined in the theme directory
-  */  
+  */
   function get_fs_themes()
   {
     $dir = opendir(PHPWG_THEMES_PATH);
-    
+
     while ($file = readdir($dir))
     {
@@ -532,5 +532,5 @@
     return false;
   }
-  
+
   /**
    * Sort $server_themes
@@ -654,5 +654,5 @@
     return $status;
   }
-  
+
   /**
    * delete $path directory
@@ -775,38 +775,4 @@
   }
 
-  // themes specific methods
-  function get_fs_themes_with_ini()
-  {
-    $themes_dir = PHPWG_ROOT_PATH.'themes';
-
-    $fs_themes = array();
-
-    foreach (get_dirs($themes_dir) as $theme)
-    {
-      $conf_file = $themes_dir.'/'.$theme.'/themeconf.inc.php';
-      if (file_exists($conf_file))
-      {
-        $theme_data = array(
-          'name' => $theme,
-          );
-        
-        $ini_file = $themes_dir.'/'.$theme.'/theme.ini';
-        if (file_exists($ini_file))
-        {
-          $theme_ini = parse_ini_file($ini_file);
-          if (isset($theme_ini['extension_id']))
-          {
-            $theme_data['extension_id'] = $theme_ini['extension_id'];
-          }
-        }
-
-        array_push($fs_themes, $theme_data);
-      }
-    }
-
-    echo '<pre>'; print_r($fs_themes); echo '</pre>';
-  }
-
-  
 }
 ?>
