Changeset 30359


Ignore:
Timestamp:
Nov 3, 2014, 10:07:33 PM (9 years ago)
Author:
rvelices
Message:

bug 3163: pwg.tags.getImages mysql error if order parameter is provided

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/ws_functions/pwg.tags.php

    r26461 r30359  
    111111  }
    112112
     113  $order_by = ws_std_image_sql_order($params, 'i.');
     114  if (!empty($order_by))
     115  {
     116    $order_by = 'ORDER BY '.$order_by;
     117  }
    113118  $image_ids = get_image_ids_for_tags(
    114119    $tag_ids,
    115120    $params['tag_mode_and'] ? 'AND' : 'OR',
    116121    $where_clauses,
    117     ws_std_image_sql_order($params)
     122    $order_by
    118123    );
    119124
     
    137142    {
    138143      $row['image_id'] = (int)$row['image_id'];
    139       $image_ids[] = $row['image_id'];
    140144      $image_tag_map[ $row['image_id'] ] = explode(',', $row['tag_ids']);
    141145    }
Note: See TracChangeset for help on using the changeset viewer.