Commit:    69e43607aa49a54c685db6891d8537e67502e1c2
Author:    Peter Cowburn <[email protected]>         Mon, 29 Jun 2020 16:50:50 
+0100
Parents:   9445ecfd592c075cb593ae3b636e953e40b087b5
Branches:  master

Link:       
http://git.php.net/?p=web/php.git;a=commitdiff;h=69e43607aa49a54c685db6891d8537e67502e1c2

Log:
home page news is latest 25 entries tagged with "frontpage"

Changed paths:
  M  index.php


Diff:
diff --git a/index.php b/index.php
index 3dc7505df..ad1977842 100644
--- a/index.php
+++ b/index.php
@@ -45,23 +45,16 @@ mirror_setcookie("LAST_NEWS", $_SERVER["REQUEST_TIME"], 
60*60*24*365);
 
 
 $content = "<div class='home-content'>";
-$releasenews = 0;
 $frontpage = array();
 foreach($NEWS_ENTRIES as $entry) {
-    $maybe = false;
     foreach($entry["category"] as $category) {
-        if ($category["term"] == "releases") {
-            if ($releasenews++ > 5) {
-                continue 2;
-            }
-        }
         if ($category["term"] == "frontpage") {
-            $maybe = $entry;
+            $frontpage[] = $entry;
+            if (count($frontpage) >= 25) {
+                break 2;
+            }
         }
     }
-    if ($maybe) {
-        $frontpage[] = $maybe;
-    }
 }
 foreach($frontpage as $entry) {
     $link = preg_replace('~^(http://php.net/|https://www.php.net/)~', '', 
$entry["id"]);


--
PHP Webmaster List Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to