瀏覽代碼

Fixed events on index. Now only shows coming events.

tags/rls1
kenn408k 6 年之前
父節點
當前提交
6d710e706d
共有 1 個檔案被更改,包括 2 行新增1 行删除
  1. 2
    1
      classes/get.class.php

+ 2
- 1
classes/get.class.php 查看文件

@@ -81,7 +81,8 @@ class Get {
81 81
     
82 82
     public static function publicEventListHome($limit) {
83 83
         $db = new DBClass();
84
-        $sql = "SELECT * FROM `events` ORDER BY `time` ASC LIMIT $limit";
84
+        $time = new DateTime();
85
+        $sql = "SELECT * FROM `events` WHERE `time` > ".$time->getTimestamp()." ORDER BY `time` ASC LIMIT $limit";
85 86
         return $db->fetchAll($db->query($sql));
86 87
     }
87 88
     

Loading…
取消
儲存