Changeset 7488


Ignore:
Timestamp:
Oct 30, 2010, 12:34:41 AM (10 years ago)
Author:
plg
Message:

merge r7487 from branch 2.1 to trunk

bug 1973 fixed: aboid SQL syntax error if the category id given in the URL is
unknown.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/comments.php

    r6910 r7488  
    106106{
    107107  check_input_parameter('cat', $_GET, false, PATTERN_ID);
     108
     109  $category_ids = get_subcat_ids(array($_GET['cat']));
     110  if (empty($category_id))
     111  {
     112    $category_ids = array(-1);
     113  }
    108114 
    109115  $page['where_clauses'][] =
    110     'category_id IN ('.implode(',', get_subcat_ids(array($_GET['cat']))).')';
     116    'category_id IN ('.implode(',', $category_ids).')';
    111117}
    112118
Note: See TracChangeset for help on using the changeset viewer.