aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorfilip <filip.komar@gmail.com>2015-04-28 21:41:11 +0200
committerfilip <filip.komar@gmail.com>2015-04-28 21:41:11 +0200
commit1ae07cd226f7526d10ecc6dc75e410d036b4a4ef (patch)
treeece5f5db0f67e5edbe458b7d6aa0bc12f84afd14 /lib
parentc8e6955057b05abd1e48b5bc1b1d696667119a84 (diff)
downloadwww-1ae07cd226f7526d10ecc6dc75e410d036b4a4ef.tar
www-1ae07cd226f7526d10ecc6dc75e410d036b4a4ef.tar.gz
www-1ae07cd226f7526d10ecc6dc75e410d036b4a4ef.tar.bz2
www-1ae07cd226f7526d10ecc6dc75e410d036b4a4ef.tar.xz
www-1ae07cd226f7526d10ecc6dc75e410d036b4a4ef.zip
adding blog link and it's first title to the front page (main index)
Diffstat (limited to 'lib')
-rw-r--r--lib/news.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/news.php b/lib/news.php
index 7f8f09a4d..7e01dae21 100644
--- a/lib/news.php
+++ b/lib/news.php
@@ -95,10 +95,11 @@ function get_feed($url, $count = 5, $cache_timeout = 5)
* @param integer $count how many items to return
* @param string $skip url whose element we want to skip (why?)
* @param boolean split title that has been built by aggregator
+ * @param string $prefix discrete title
*
* @return string
*/
-function show_feed($locale, $title, $link, $feed, $count = 5, $skip = null, $split = false) {
+function show_feed($locale, $title, $link, $feed, $count = 5, $skip = null, $split = false, $prefix = null) {
if (!is_null($skip))
$count += 5;
@@ -123,8 +124,9 @@ function show_feed($locale, $title, $link, $feed, $count = 5, $skip = null, $spl
$source = null;
}
- $s .= sprintf('<li><a href="%s">%s</a> <span class="dt">%s%s</span></li>',
- $d['link'], $title, news_date($d['date'], $locale), $source);
+ $s .= sprintf('<li>%s<a href="%s">%s</a> <span class="dt">%s%s</span></li>',
+ $prefix, $d['link'], $title, news_date($d['date'], $locale), $source);
+ $prefix = null;
}
$s .= '</ul>';
echo $s;