aboutsummaryrefslogtreecommitdiffstats
path: root/include/category_subcats.inc.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2006-04-06 02:23:54 +0000
committerrvelices <rv-github@modusoptimus.com>2006-04-06 02:23:54 +0000
commitd700a5917233fb8049589a9e0aef3d94e87fb320 (patch)
tree81f8c53ccf908e900638abd117f3dc8719ca67a1 /include/category_subcats.inc.php
parentb9a37cd6f06a19fd48d4a8e546b10c8fb3ff5b33 (diff)
improvement: urls for tags can contain now only the tag or the id and tag
improvement: urls for category can be now id and category names (instead of only id) improvement: added 2 indexes (#image_tag.tag_id and #tags.url_name) improvement: identification, register, search pages automatically set focus on first form input improvement: focus, nofocus css class now valid for all forms fix: category comment is tag stripped in category_subcats.inc.php (otherwise issues with html/scripts inside category comment) git-svn-id: http://piwigo.org/svn/trunk@1131 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/category_subcats.inc.php')
-rw-r--r--include/category_subcats.inc.php19
1 files changed, 13 insertions, 6 deletions
diff --git a/include/category_subcats.inc.php b/include/category_subcats.inc.php
index 57fe73cec..8deef5711 100644
--- a/include/category_subcats.inc.php
+++ b/include/category_subcats.inc.php
@@ -28,7 +28,7 @@
/**
* This file is included by the main page to show thumbnails for a category
* that have only subcategories
- *
+ *
*/
$query = '
@@ -90,6 +90,12 @@ SELECT representative_picture_id
}
}
+ $comment = null;
+ if ( isset($row['comment']) )
+ {
+ $comment = strip_tags( $row['comment'] );
+ }
+
if (isset($image_id))
{
array_push(
@@ -99,7 +105,7 @@ SELECT representative_picture_id
'picture' => $image_id,
'name' => $row['name'],
'date_last' => @$row['date_last'],
- 'comment' => @$row['comment'],
+ 'comment' => $comment,
'nb_images' => $row['nb_images'],
)
);
@@ -111,7 +117,7 @@ SELECT representative_picture_id
if (count($cat_thumbnails) > 0)
{
$images = array();
-
+
foreach ($cat_thumbnails as $item)
{
$images[$item['picture']] = '';
@@ -129,7 +135,7 @@ SELECT id, path, tn_ext
}
$template->assign_block_vars('categories', array());
-
+
foreach ($cat_thumbnails as $item)
{
$template->assign_block_vars(
@@ -139,10 +145,11 @@ SELECT id, path, tn_ext
'ALT' => $item['name'],
'TITLE' => $lang['hint_category'],
'ICON' => get_icon(@$item['date_last']),
-
+
'URL' => make_index_url(
array(
'category' => $item['category'],
+ 'cat_name' => $item['name'],
)
),
'NAME' => $item['name'],
@@ -152,4 +159,4 @@ SELECT id, path, tn_ext
);
}
}
-?>
+?> \ No newline at end of file