Changeset 1596 for trunk/picture.php


Ignore:
Timestamp:
Nov 7, 2006, 4:37:57 AM (18 years ago)
Author:
rvelices
Message:
  • 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)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/picture.php

    r1590 r1596  
    8282      'SRC_IMG' => $element_info['image_url'],
    8383      'ALT_IMG' => $element_info['file'],
    84       'WIDTH_IMG' => $element_info['scaled_width'],
    85       'HEIGHT_IMG' => $element_info['scaled_height'],
     84      'WIDTH_IMG' => @$element_info['scaled_width'],
     85      'HEIGHT_IMG' => @$element_info['scaled_height'],
    8686      )
    8787    );
     
    280280$result = pwg_query($query);
    281281
    282 while ($row = mysql_fetch_array($result))
     282while ($row = mysql_fetch_assoc($result))
    283283{
    284284  if (isset($page['previous_item']) and $row['id'] == $page['previous_item'])
     
    303303  }
    304304
    305   foreach (array_keys($row) as $key)
    306   {
    307     if (!is_numeric($key))
    308     {
    309       $picture[$i][$key] = $row[$key];
    310     }
    311   }
     305  $picture[$i] = $row;
    312306
    313307  $picture[$i]['is_picture'] = false;
     
    381375  }
    382376
    383   $picture[$i]['thumbnail'] = get_thumbnail_src($row['path'], @$row['tn_ext']);
     377  $picture[$i]['thumbnail'] = get_thumbnail_url($row);
    384378
    385379  if ( !empty( $row['name'] ) )
Note: See TracChangeset for help on using the changeset viewer.