if (($a&~0xffff) && (($a&0xff00)<(99<<8))) {
$sections[] = $a&~0xff; // add extended section for plugins
}
- $areas[] = $a;
+ $areas[] = (int)$a;
}
if (substr($p,0,7) == 'Section')
- $sections[] = substr($p, 7);
+ $sections[] = (int)substr($p, 7);
}
// $areas = sort_areas($areas);
}
if (count($ord)) {
- $sql .= " ORDER BY " . implode($ord, ',');
+ $ord = array_map(function_exists('mysql_real_escape_string') ?
+ 'mysql_real_escape_string': 'mysql_escape_string', $ord);
+ $sql .= " ORDER BY " . implode(',', $ord);
} else {
if($order)
$sql .= " ORDER BY $order"; // original base query order