summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Tänzer <neo@nhng.de>2013-07-15 18:51:18 +0200
committerMichael Tänzer <neo@nhng.de>2013-07-15 18:51:18 +0200
commitf1a4f67aae01da0276a2a962c006b8ff5d05e538 (patch)
tree9591bbea9c08821162a1a67a5bface79f4a5b180
parent2849777164eb4926a74099b53dc1137bb4e6c555 (diff)
downloadcacert-devel-f1a4f67aae01da0276a2a962c006b8ff5d05e538.tar.gz
cacert-devel-f1a4f67aae01da0276a2a962c006b8ff5d05e538.tar.xz
cacert-devel-f1a4f67aae01da0276a2a962c006b8ff5d05e538.zip
bug 1190: Limit number of news items
Signed-off-by: Michael Tänzer <neo@nhng.de>
-rw-r--r--pages/index/0.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/pages/index/0.php b/pages/index/0.php
index 805b147..76dcd28 100644
--- a/pages/index/0.php
+++ b/pages/index/0.php
@@ -41,6 +41,7 @@
$query = "//channel/item";
$items = $xpath->query($query);
+ $count = 0;
foreach($items as $id => $item) {
$query = "./title";
$nodeList = $xpath->query($query, $item);
@@ -61,6 +62,11 @@
$title = '';
$description = '';
$link = '';
+
+ count++;
+ if ($count >= 3) {
+ break;
+ }
}
?>