aboutsummaryrefslogtreecommitdiffstats
path: root/picture.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2006-11-07 03:37:57 +0000
committerrvelices <rv-github@modusoptimus.com>2006-11-07 03:37:57 +0000
commit8f52e36a6fdb362e204cfec4b865b0cee5735fbf (patch)
tree0b69f745a5f88b9e0148076690ca6c4962b4064e /picture.php
parenteb4214096f9e86a58a8991617696350bede89f7d (diff)
- deprecated get_thumbnail_src (still there for compatibility). use rather
get_thumbnail_path or get_thumbnail_url (these allow plugins to override) - plugins can hook into index thumbnail display (items only so far) git-svn-id: http://piwigo.org/svn/trunk@1596 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'picture.php')
-rw-r--r--picture.php16
1 files changed, 5 insertions, 11 deletions
diff --git a/picture.php b/picture.php
index 69b28a7cc..dd7ffa3ae 100644
--- a/picture.php
+++ b/picture.php
@@ -81,8 +81,8 @@ function default_picture_content($content, $element_info)
$my_template->assign_vars( array(
'SRC_IMG' => $element_info['image_url'],
'ALT_IMG' => $element_info['file'],
- 'WIDTH_IMG' => $element_info['scaled_width'],
- 'HEIGHT_IMG' => $element_info['scaled_height'],
+ 'WIDTH_IMG' => @$element_info['scaled_width'],
+ 'HEIGHT_IMG' => @$element_info['scaled_height'],
)
);
return $my_template->parse( 'default_content', true);
@@ -279,7 +279,7 @@ SELECT *
$result = pwg_query($query);
-while ($row = mysql_fetch_array($result))
+while ($row = mysql_fetch_assoc($result))
{
if (isset($page['previous_item']) and $row['id'] == $page['previous_item'])
{
@@ -302,13 +302,7 @@ while ($row = mysql_fetch_array($result))
$i = 'current';
}
- foreach (array_keys($row) as $key)
- {
- if (!is_numeric($key))
- {
- $picture[$i][$key] = $row[$key];
- }
- }
+ $picture[$i] = $row;
$picture[$i]['is_picture'] = false;
if (in_array(get_extension($row['file']), $conf['picture_ext']))
@@ -380,7 +374,7 @@ while ($row = mysql_fetch_array($result))
}
}
- $picture[$i]['thumbnail'] = get_thumbnail_src($row['path'], @$row['tn_ext']);
+ $picture[$i]['thumbnail'] = get_thumbnail_url($row);
if ( !empty( $row['name'] ) )
{