Changeset 689 for trunk/plugins
- Timestamp:
- 10/31/07 23:50:46 (14 months ago)
- Files:
-
- 1 modified
-
trunk/plugins/altarchive_onemonth.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/altarchive_onemonth.php
r635 r689 58 58 /* genaltarchive_onemonth {{{ */ 59 59 public function genaltarchive_onemonth($defaultmenu) { 60 /* find out what the oldest post date is */ 61 $q = "SELECT date FROM articles WHERE active = 1 AND public = 1 ORDER BY date LIMIT 1"; 62 $res = $this->_mvblog->db->query($q); 63 $row = $res->fetchRow(MDB2_FETCHMODE_ASSOC); 64 $oldest = $row["date"]; 65 60 66 $output = ""; 61 67 $url_next = ""; … … 124 130 } 125 131 $output .= "</tr><tr>\n"; 126 $output .= "<td class=\"altarchive_onemonth_month_noitems\" colspan=\"3\"><a href=\"$url_prev\"><< ".strftime("%b", mktime(0, 0, 0, $_month-1, 1, $_year))."</a></td>\n"; 132 if ($oldest < mktime(0, 0, 0, $_month, 1, $_year)) 133 $output .= "<td class=\"altarchive_onemonth_month_noitems\" colspan=\"3\"><a href=\"$url_prev\"><< ".strftime("%b", mktime(0, 0, 0, $_month-1, 1, $_year))."</a></td>\n"; 134 else 135 $output .= "<td class=\"altarchive_onemonth_month_noitems\" colspan=\"3\"> </td>\n"; 127 136 $output .= "<td class=\"altarchive_onemonth_month_noitems\"> </td>\n"; 128 137 if (date("m") == $_month)
