aboutsummaryrefslogtreecommitdiffstats
path: root/include/category_default.inc.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2009-02-04 02:33:50 +0000
committerrvelices <rv-github@modusoptimus.com>2009-02-04 02:33:50 +0000
commit9428613b2da6132ef507e92461535283d48ecdc1 (patch)
tree0e4cbef5443faac056052c20c3197eac82cfd6d1 /include/category_default.inc.php
parent9a0510c88c16b5617d7714b0e958b0f71f0fd912 (diff)
merge 3120 from trunk
optimizations (php only) - removed unnecessary call to array_unique in get_image_ids_for_tags - put back in smarty exec time counting (debug mode) for each included template - prefix some smarty modifiers with @ in some templates - do not call format_date (still very slow due to mktime and date even after prev commit) from category_default.inc.php - if used in templates format_date can be used as a smarty modifier git-svn-id: http://piwigo.org/svn/branches/2.0@3121 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/category_default.inc.php')
-rw-r--r--include/category_default.inc.php35
1 files changed, 16 insertions, 19 deletions
diff --git a/include/category_default.inc.php b/include/category_default.inc.php
index afb195a3a..da2386445 100644
--- a/include/category_default.inc.php
+++ b/include/category_default.inc.php
@@ -106,28 +106,25 @@ foreach ($pictures as $row)
$tpl_var =
array(
- 'ID' => $row['id'],
- 'TN_SRC' => $thumbnail_url,
- 'TN_ALT' => $row['file'],
- 'TN_TITLE' => get_thumbnail_title($row),
- 'ICON_TS' => get_icon($row['date_available']),
- 'URL' => $url,
+ 'ID' => $row['id'],
+ 'TN_SRC' => $thumbnail_url,
+ 'TN_ALT' => $row['file'],
+ 'TN_TITLE' => get_thumbnail_title($row),
+ 'ICON_TS' => get_icon($row['date_available']),
+ 'URL' => $url,
/* Fields for template-extension usage */
'FILE_PATH' => $row['path'],
- 'FILE_POSTED' => format_date($row['date_available'], 'mysql_datetime'),
- 'FILE_CREATED' => (empty($row['date_creation'])) ?
- '-': format_date($row['date_creation'], 'mysql_date'),
- 'FILE_DESC' => (empty($row['comment'])) ? '-' : $row['comment'],
- 'FILE_AUTHOR' => (empty($row['author'])) ? '-' : $row['author'],
+ 'FILE_POSTED' => $row['date_available'],
+ 'FILE_CREATED' => $row['date_creation'],
+ 'FILE_DESC' => $row['comment'],
+ 'FILE_AUTHOR' => $row['author'],
'FILE_HIT' => $row['hit'],
- 'FILE_SIZE' => (empty($row['filesize'])) ? '-' : $row['filesize'],
- 'FILE_WIDTH' => (empty($row['width'])) ? '-' : $row['width'],
- 'FILE_HEIGHT' => (empty($row['height'])) ? '-' : $row['height'],
- 'FILE_METADATE' => (empty($row['date_metadata_update'])) ?
- '-': format_date($row['date_metadata_update'], 'mysql_date'),
- 'FILE_RATE' => (empty($row['rate'])) ? '-' : $row['rate'],
- 'FILE_HAS_HD' => ($row['has_high'] and $user['enabled_high']=='true') ?
+ 'FILE_SIZE' => $row['filesize'],
+ 'FILE_WIDTH' => $row['width'],
+ 'FILE_HEIGHT' => $row['height'],
+ 'FILE_METADATE' => $row['date_metadata_update'],
+ 'FILE_HAS_HD' => ($row['has_high'] and $user['enabled_high']=='true') ?
true:false, /* lack of include/functions_picture.inc.php */
);
@@ -184,4 +181,4 @@ trigger_action('loc_end_index_thumbnails', $pictures);
$template->assign_var_from_handle('THUMBNAILS', 'index_thumbnails');
pwg_debug('end include/category_default.inc.php');
-?>
+?> \ No newline at end of file