if ( $sectionid == 0 ) {
// used to show All content items
$where = array(
"c.state >= 0",
"c.catid = cc.id",
"cc.section = s.id",
"s.scope = 'content'",
);
// comment out below for backup reasons, then add new line of code
// $order = "\n ORDER BY s.title, c.catid, cc.ordering, cc.title, c.ordering";
$order = "\n ORDER BY c.created DESC";
$all = 1;
//$filter = "\n , #__sections AS s WHERE s.id = c.section";
if ($filter_sectionid > 0) {
$filter = "\n WHERE cc.section = '" . (int) $filter_sectionid . "'";
}
$section->title = 'All Content Items';
$section->id = 0;
} else {
$where = array(
"c.state >= 0",
"c.catid = cc.id",
"cc.section = s.id",
"s.scope = 'content'",
"c.sectionid = " . (int) $sectionid
);
// comment out below for backup reasons, then add new line of code
//$order = "\n ORDER BY cc.ordering, cc.title, c.ordering";
$order = "\n ORDER BY c.created DESC";
$all = NULL;
$filter = "\n WHERE cc.section = '" . (int) $sectionid . "'";
$section = new mosSection( $database );
$section->load( (int)$sectionid );
}
Time to create page: 0.045 seconds