aboutsummaryrefslogtreecommitdiffstats
path: root/include/category_default.inc.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2012-01-17 21:58:18 +0000
committerrvelices <rv-github@modusoptimus.com>2012-01-17 21:58:18 +0000
commitcc01941ed97f6c8f6790931bfc167ba45c5a8f91 (patch)
treefe465d457c034efba03cfe26d65b5467d88bfca2 /include/category_default.inc.php
parente1bd64fdfc50f3ef50c0b4391c4586bbaeacb287 (diff)
feature 2548 multisize - code cleanup + better usage in category_cats + i.php logs memory usage peak
git-svn-id: http://piwigo.org/svn/trunk@12920 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--include/category_default.inc.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/include/category_default.inc.php b/include/category_default.inc.php
index 18a4cb4bf..454d1e1e5 100644
--- a/include/category_default.inc.php
+++ b/include/category_default.inc.php
@@ -109,13 +109,15 @@ foreach ($pictures as $row)
$row['NB_COMMENTS'] = $row['nb_comments'] = (int)@$nb_comments_of[$row['id']];
}
- $name = get_picture_title($row);
+ $name = render_element_name($row);
+ $desc = render_element_description($row);
$tpl_var = array_merge( $row, array(
'TN_SRC' => DerivativeImage::thumb_url($row),
'TN_ALT' => htmlspecialchars(strip_tags($name)),
- 'TN_TITLE' => get_thumbnail_title($row),
+ 'TN_TITLE' => get_thumbnail_title($row, $name, $desc),
'URL' => $url,
+ 'DESCRIPTION' => $desc,
'src_image' => new SrcImage($row),
) );
@@ -145,12 +147,11 @@ foreach ($pictures as $row)
break;
}
}
-
$tpl_var['NAME'] = $name;
$tpl_thumbnails_var[] = $tpl_var;
}
-$derivative_params = ImageStdParams::get_by_type( pwg_get_session_var('index_deriv', IMG_THUMB) );
+$derivative_params = trigger_event('get_index_derivative_params', ImageStdParams::get_by_type( pwg_get_session_var('index_deriv', IMG_THUMB) ) );
$template->assign( array(
'derivative_params' =>$derivative_params,
@@ -161,6 +162,6 @@ $template->assign('thumbnails', $tpl_thumbnails_var);
$template->assign_var_from_handle('THUMBNAILS', 'index_thumbnails');
unset($pictures, $selection, $tpl_thumbnails_var);
-$template->clear_assign( array('thumbnails') );
+$template->clear_assign( array('thumbnails', 'derivative_params') );
pwg_debug('end include/category_default.inc.php');
?> \ No newline at end of file