Changed location of break statement in display.php
when config file is set to zero, one leaf would still show due to previous placement of statement.
Lines 185 - 205
(This is the NEW code)
Code:
$cm_rowcount = 1;
while ($row3 = db_fetch_row($result3)) {
if ($cm_rowcount > $cm_home_maxleafs) {
break;
}
if (stristr ($row3[5], CM_HITTYPE_ANNOUNCE)) {
fcm_articlelist_box ($row3[1], $row3[0], $row3[3], $row3[4], false, fcm_get_totalcomments ($row3[1]), fcm_get_totalhits ($row3[1], CM_HITTYPE_PAGE), fcm_getaverage_rating ($row3[1]), fcm_is_cleditable ($row3[1], $user_kurz, $row3[5]), true, $row3[6]);
$cm_rowcount++;
}
}
$result3 = db_query("select cmdb_title, cmdb_directory, cmdb_parentdir, cmdb_abstract, cmdb_date_update, cmdb_type, cmdb_logo from content3 where (cmdb_parentdir like '$row2[1]' or cmdb_parentdir like '$row2[1]/%') and cmdb_type like '%" . CM_HITTYPE_PAGE . "%' " . fcm_access_sqldef ($user_kurz) . " order by cmdb_date_update desc") or db_die();
while ($row3 = db_fetch_row($result3)) {
if ($cm_rowcount > $cm_home_maxleafs) {
break;
}
if (!stristr ($row3[5], CM_HITTYPE_ANNOUNCE)) {
fcm_articlelist_box ($row3[1], $row3[0], $row3[3], $row3[4], false, fcm_get_totalcomments ($row3[1]), fcm_get_totalhits ($row3[1], CM_HITTYPE_PAGE), fcm_getaverage_rating ($row3[1]), fcm_is_cleditable ($row3[1], $user_kurz, $row3[5]), false, $row3[6]);
$cm_rowcount++;
}
}
}