Ignore:
Timestamp:
Sep 21, 2008, 1:06:20 PM (16 years ago)
Author:
rvelices
Message:
  • fix function get_fulldirs - works correctly eent for wrong params (virtual cats)
  • fix functions_metadata.php - could not be included from inside another function
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/include/functions.php

    r2551 r2560  
    799799  WHERE dir IS NOT NULL
    800800;';
    801   $result = pwg_query($query);
    802   $cat_dirs = array();
    803   while ($row = mysql_fetch_array($result))
    804   {
    805     $cat_dirs[$row['id']] = $row['dir'];
    806   }
     801  $cat_dirs = simple_hash_from_query($query, 'id', 'dir');
    807802
    808803  // caching galleries_url
     
    811806  FROM '.SITES_TABLE.'
    812807;';
    813   $result = pwg_query($query);
    814   $galleries_url = array();
    815   while ($row = mysql_fetch_array($result))
    816   {
    817     $galleries_url[$row['id']] = $row['galleries_url'];
    818   }
     808  $galleries_url = simple_hash_from_query($query, 'id', 'galleries_url');
    819809
    820810  // categories : id, site_id, uppercats
     
    824814SELECT id, uppercats, site_id
    825815  FROM '.CATEGORIES_TABLE.'
    826   WHERE id IN (
     816  WHERE dir IS NOT NULL
     817    AND id IN (
    827818'.wordwrap(implode(', ', $cat_ids), 80, "\n").')
    828819;';
Note: See TracChangeset for help on using the changeset viewer.