From 08aa93a93b8fdb94c767bdd118f260f826ad9326 Mon Sep 17 00:00:00 2001 From: rvelices Date: Thu, 13 Sep 2007 23:30:46 +0000 Subject: - merge content of layout.css and popuphelp.css (very few lines) into existing css -> faster page loading the first time (avoid 2 http requests) - optimized sql for $conf['display_fromto'] in category_cats.inc.php git-svn-id: http://piwigo.org/svn/trunk@2091 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/category_cats.inc.php | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'include/category_cats.inc.php') diff --git a/include/category_cats.inc.php b/include/category_cats.inc.php index 68b0ec4c2..80efcd184 100644 --- a/include/category_cats.inc.php +++ b/include/category_cats.inc.php @@ -163,16 +163,14 @@ SELECT MIN(date_creation) AS date_creation_min, MAX(date_creation) AS date_creation_max FROM '.IMAGE_CATEGORY_TABLE.' - INNER JOIN '.USER_CACHE_CATEGORIES_TABLE.' - ON category_id = cat_id and user_id = '.$user['id'].' INNER JOIN '.IMAGES_TABLE.' ON image_id = id - WHERE category_id IN ('.implode(',', $category_ids).') + WHERE category_id IN ('.implode(',', $category_ids).') '.get_sql_condition_FandF ( array ( 'visible_categories' => 'category_id', - 'visible_images' => 'image_id' + 'visible_images' => 'id' ), 'AND' ).' @@ -186,7 +184,6 @@ SELECT 'to' => $row['date_creation_max'], ); } - // echo '
'; print_r($dates_of_category); echo '
'; } } @@ -263,8 +260,8 @@ if (count($categories) > 0) '
' ), 'DESCRIPTION' => - trigger_event('render_category_literal_description', - trigger_event('render_category_description', + trigger_event('render_category_literal_description', + trigger_event('render_category_description', @$category['comment'])), 'NAME' => $name, ) @@ -276,11 +273,11 @@ if (count($categories) > 0) { $from = $dates_of_category[ $category['id'] ]['from']; $to = $dates_of_category[ $category['id'] ]['to']; - + if (!empty($from)) { $info = ''; - + if ($from == $to) { $info = format_date($from); -- cgit v1.2.3