Changeset 425

Show
Ignore:
Timestamp:
10/07/03 18:19:47 (5 years ago)
Author:
emc3
Message:

Fixed potential infinite loop if there are no posts

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/b2calendar.php

    r410 r425  
    5656require_once($abspath.$b2inc.'/b2functions.php'); 
    5757require_once($abspath.$b2inc.'/b2vars.php'); 
     58 
     59// Quick check. If we have no posts at all, abort! 
     60$gotsome = $wpdb->get_var("SELECT ID from $tableposts WHERE post_status = 'publish' AND post_category > 0 ORDER BY post_date DESC LIMIT 1"); 
     61if (!$gotsome) 
     62    return; 
    5863 
    5964$w = $HTTP_GET_VARS['w'];