Bug :Bug with counting the number of pages in the category
Status :Validated
Severity :Normal
Reporter :Amro 25-12-14 19:23
Updated by :Amro 25-12-14 20:11
CategoryPages
Version :175
Frequency :Consistently
Fixed in :
Details :

Bug associated with the wrong condition L IKE in a SQL query in list.inc.php.

 $sql4 = sed_sql_query("SELECT COUNT(*) FROM $db_pages p, $db_structure s 
       WHERE p.page_cat=s.structure_code 
       AND s.structure_path LIKE '".$sed_cat[$i]['rpath']."%' 
       AND page_state=0 "); 

Fix

 $sql4 = sed_sql_query("SELECT COUNT(*) FROM $db_pages p, $db_structure s 
       WHERE p.page_cat=s.structure_code 
       AND (s.structure_path LIKE '".$sed_cat[$i]['rpath'].".%' OR s.structure_path = '".$sed_cat[$i]['rpath']."') 
       AND page_state=0 "); 

 

Items affected :list.inc.php

History and comments :

None