Changeset 146 for branches

Show
Ignore:
Timestamp:
04/17/06 01:56:55 (3 years ago)
Author:
michiel
Message:

merged truunk changes

Location:
branches/comment-registration
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/comment-registration

    • Property svnmerge-integrated changed from /trunk:1-142 to /trunk:1-142,144
  • branches/comment-registration/admin/index.php

    r118 r146  
    4444function show_posts($options = array()) { 
    4545        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"];   } 
    4751        if (!$options["limit"]) { $options["limit"] = 15; } else { $options["limit"] = (int)$options["limit"]; } 
    4852        //put all categories in array 
     
    5559        } 
    5660        $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)) { 
    5862                $timestamp_start = mktime(0,0,0,$options["month"],1,$options["year"]); 
    5963                $timestamp_stop  = mktime(0,0,0,$options["month"]+1,1,$options["year"]);