Ignore:
Timestamp:
Jan 5, 2013, 2:37:03 PM (8 years ago)
Author:
mistic100
Message:

replace "mysql" functions by "pwg_db" functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/ExtendedDescription/main.inc.php

    r19283 r19840  
    229229
    230230  $result = pwg_query($query);
    231   while ($row = mysql_fetch_assoc($result))
     231  while ($row = pwg_db_fetch_assoc($result))
    232232  {
    233233    $ids[] = $row['id'];
     
    289289  $result = pwg_query($query);
    290290
    291   if($result and $category = mysql_fetch_array($result))
     291  if($result and $category = pwg_db_fetch_array($result))
    292292  {
    293293    $template->set_filename('extended_description_content', dirname(__FILE__) . '/template/cat.tpl');
     
    350350
    351351    $imglist=array();
    352     while ($picture = mysql_fetch_array($result))
     352    while ($picture = pwg_db_fetch_array($result))
    353353    {
    354354      $imglist[$picture["id"]]=$picture;
     
    622622;';
    623623    $ids = array_from_query($query, 'image_id');
     624    $ids = implode(',', $ids);
    624625  }
    625626  // ...or pictures list
     
    630631  else
    631632  {
    632     $ids = explode(',', $params['list']);
     633    $ids = $params['list'];
    633634  }
    634635 
     
    637638SELECT *
    638639  FROM '.IMAGES_TABLE.'
    639   WHERE id IN ('.implode(',', $ids).')
    640   ORDER BY FIND_IN_SET(id, "'.implode(',', $ids).'")
     640  WHERE id IN ('.$ids.')
     641  ORDER BY FIND_IN_SET(id, "'.$ids.'")
    641642;';
    642643  $pictures = hash_from_query($query, 'id');
     
    717718function get_deriv_type($size)
    718719{
     720  $size = strtoupper($size);
     721 
    719722  $size_map = array(
    720723    'SQ' => IMG_SQUARE,
     
    731734  if (!array_key_exists($size, $size_map)) $size = 'M';
    732735 
    733   return $size_map[ strtoupper($size) ];
     736  return $size_map[$size];
    734737}
    735738
Note: See TracChangeset for help on using the changeset viewer.