Changeset 144 for trunk/admin
- Timestamp:
- 04/17/06 01:48:10 (3 years ago)
- Files:
-
- 1 modified
-
trunk/admin/index.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/index.php
r118 r144 44 44 function show_posts($options = array()) { 45 45 global $db; 46 if (!$options["top"]) { $options["top"] = 0; } else { $options["top"] = (int)$options["top"]; } 46 if (!is_object($db)) { 47 echo "db should be an object, something went wrong"; 48 exit; 49 } 50 if (!$options["top"]) { $options["top"] = 0; } else { $options["top"] = (int)$options["top"]; } 47 51 if (!$options["limit"]) { $options["limit"] = 15; } else { $options["limit"] = (int)$options["limit"]; } 48 52 //put all categories in array … … 55 59 } 56 60 $cats[-1] = "asides"; 57 if ( $options["month"] && $options["year"]) {61 if ((array_key_exists("month", $options) && $options["month"] > 0) && (array_key_exists("year", $options) && $options["year"] > 0)) { 58 62 $timestamp_start = mktime(0,0,0,$options["month"],1,$options["year"]); 59 63 $timestamp_stop = mktime(0,0,0,$options["month"]+1,1,$options["year"]);
