Changeset 7487


Ignore:
Timestamp:
10/30/10 00:33:52 (9 years ago)
Author:
plg
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.1/comments.php

    r6909 r7487  
    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.