Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dirk Dankhoff
ISPConfig 3
Commits
a6904b08
Commit
a6904b08
authored
Jul 08, 2010
by
tbrehm
Browse files
Show max. 10 news records on the dashboard.
parent
fb5ebb5a
Changes
1
Hide whitespace changes
Inline
Side-by-side
interface/web/dashboard/lib/custom_menu.inc.php
View file @
a6904b08
...
...
@@ -46,14 +46,19 @@ if($misc_config['dashboard_atom_url'] != '') {
$items
=
$app
->
simplepie
->
get_items
();
$rows
=
array
();
$n
=
1
;
foreach
(
$items
as
$item
)
{
$rows
[]
=
array
(
'title'
=>
$item
->
get_title
(),
'link'
=>
$item
->
get_link
(),
'content'
=>
$item
->
get_content
(),
'date'
=>
$item
->
get_date
(
'Y-m-d'
)
);
//* We want to show only the first 10 news records
if
(
$n
<=
10
)
{
$rows
[]
=
array
(
'title'
=>
$item
->
get_title
(),
'link'
=>
$item
->
get_link
(),
'content'
=>
$item
->
get_content
(),
'date'
=>
$item
->
get_date
(
'Y-m-d'
)
);
}
$n
++
;
}
$_SESSION
[
's'
][
'rss_news'
]
=
$rows
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment