Dashboard: redo display of drafts / future entries
See #488 for the discussion. Merge `dashboardLimit` and `dashboardDraftLimit` to `dashboardEntriesLimit` Signed-off-by: Thomas Hochstein <thh@inter.net>
This commit is contained in:
parent
59d17ee112
commit
10caea1b92
@ -56,11 +56,8 @@ $data['updateButton'] = $output;
|
|||||||
if (!isset($serendipity['dashboardCommentsLimit'])) {
|
if (!isset($serendipity['dashboardCommentsLimit'])) {
|
||||||
$serendipity['dashboardCommentsLimit'] = 5;
|
$serendipity['dashboardCommentsLimit'] = 5;
|
||||||
}
|
}
|
||||||
if (!isset($serendipity['dashboardLimit'])) {
|
if (!isset($serendipity['dashboardEntriesLimit'])) {
|
||||||
$serendipity['dashboardLimit'] = 5;
|
$serendipity['dashboardEntriesLimit'] = 5;
|
||||||
}
|
|
||||||
if (!isset($serendipity['dashboardDraftLimit'])) {
|
|
||||||
$serendipity['dashboardDraftLimit'] = 5;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$cjoin = ($serendipity['serendipityUserlevel'] == USERLEVEL_EDITOR) ? "
|
$cjoin = ($serendipity['serendipityUserlevel'] == USERLEVEL_EDITOR) ? "
|
||||||
@ -97,7 +94,7 @@ $efilter = ($serendipity['serendipityUserlevel'] == USERLEVEL_EDITOR) ? ' AND e.
|
|||||||
$entries = serendipity_fetchEntries(
|
$entries = serendipity_fetchEntries(
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
(int)$serendipity['dashboardLimit'],
|
(int)$serendipity['dashboardEntriesLimit'],
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
'timestamp DESC',
|
'timestamp DESC',
|
||||||
@ -108,12 +105,12 @@ $entriesAmount = 0;
|
|||||||
if (is_array($entries)) {
|
if (is_array($entries)) {
|
||||||
$entriesAmount = count($entries);
|
$entriesAmount = count($entries);
|
||||||
};
|
};
|
||||||
if ($entriesAmount < (int)$serendipity['dashboardDraftLimit']) {
|
if ($entriesAmount < (int)$serendipity['dashboardEntriesLimit']) {
|
||||||
// there is still space for drafts
|
// there is still space for drafts
|
||||||
$drafts = serendipity_fetchEntries(
|
$drafts = serendipity_fetchEntries(
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
(int)$serendipity['dashboardDraftLimit'] - $entriesAmount,
|
(int)$serendipity['dashboardEntriesLimit'] - $entriesAmount,
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
'timestamp DESC',
|
'timestamp DESC',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user