From fd77b2c30c92f34fc1e86a93e3fc0a138ca9099e Mon Sep 17 00:00:00 2001 From: rvelices Date: Tue, 11 Apr 2006 03:55:51 +0000 Subject: merge r1144 from branch-1_6 into trunk git-svn-id: http://piwigo.org/svn/trunk@1145 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/category_recent_cats.inc.php | 19 ++++++++++++++----- include/category_subcats.inc.php | 2 +- 2 files changed, 15 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/category_recent_cats.inc.php b/include/category_recent_cats.inc.php index 44494c9df..ae98426bd 100644 --- a/include/category_recent_cats.inc.php +++ b/include/category_recent_cats.inc.php @@ -46,6 +46,7 @@ SELECT c.id AS category_id , c.comment , tn_ext , nb_images + , c.name AS cat_name FROM '.CATEGORIES_TABLE.' AS c INNER JOIN '.IMAGES_TABLE.' AS i ON i.id = c.representative_picture_id WHERE date_last > SUBDATE( @@ -67,13 +68,19 @@ if ($conf['subcatify']) 'mainpage_categories' => 'mainpage_categories.tpl', ) ); - + // template thumbnail initialization if (mysql_num_rows($result) > 0) { $template->assign_block_vars('categories', array()); } + $comment = null; + if (isset($row['comment'])) + { + $comment = strip_tags($row['comment'], '

'); + } + // for each category, we have to search a recent picture to display and // the name to display while ( $row = mysql_fetch_array( $result ) ) @@ -84,15 +91,16 @@ if ($conf['subcatify']) 'SRC' => get_thumbnail_src($row['path'], @$row['tn_ext']), 'ALT' => $row['file'], 'TITLE' => $lang['hint_category'], - + 'URL' => make_index_url( array( 'category' => $row['category_id'], + 'cat_name' => $row['cat_name'], ) ), 'NAME' => get_cat_display_name_cache($row['uppercats'], null, false), 'NB_IMAGES' => $row['nb_images'], - 'DESCRIPTION' => @$row['comment'], + 'DESCRIPTION' => $comment, ) ); } @@ -110,7 +118,7 @@ else // current row displayed $row_number = 0; } - + $old_level_separator = $conf['level_separator']; $conf['level_separator'] = '
'; // for each category, we have to search a recent picture to display and @@ -123,10 +131,11 @@ else 'IMAGE' => get_thumbnail_src($row['path'], @$row['tn_ext']), 'IMAGE_ALT' => $row['file'], 'IMAGE_TITLE' => $lang['hint_category'], - + 'U_IMG_LINK' => make_index_url( array( 'category' => $row['category_id'], + 'cat_name' => $row['cat_name'], ) ), ) diff --git a/include/category_subcats.inc.php b/include/category_subcats.inc.php index 08c883d78..3e31ecc80 100644 --- a/include/category_subcats.inc.php +++ b/include/category_subcats.inc.php @@ -94,7 +94,7 @@ SELECT representative_picture_id $comment = null; if (isset($row['comment'])) { - $comment = strip_tags($row['comment']); + $comment = strip_tags($row['comment'], '

'); } if (isset($image_id)) -- cgit v1.2.3