Plugin Directory

Changeset 591218


Ignore:
Timestamp:
08/28/2012 07:12:35 AM (14 years ago)
Author:
omarke85
Message:

update version 0.1.7

Location:
wp-birthday-users
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • wp-birthday-users/tags/0.1.7/widget.php

    r565449 r591218  
    7575    $tocome = $usersarray['come'];
    7676    $past = $usersarray['past'];
    77     uasort($tocome, 'date_sort');
    78     uasort($past, 'date_sort');
     77    (is_array($tocome)?uasort($tocome, 'date_sort'):"");
     78    (is_array($past)?uasort($past, 'date_sort'):"");
    7979    if ($usersarray['info']['today'] > 0 || $instance['hide_if_none'] != "on") {
    8080      echo "\n".$before_widget."\n  ";
     
    8383        echo "<div class=\"birthdaylink\"><a href=\"".$usersarray['info']['baseurl']."\" title=\"".__('Download Birthday calendar', 'wp-birthday-users')."\"></a></div>";
    8484      }
     85      if (is_array($tocome)) {
    8586      $t = 0;
    8687      $number = ($instance['number_coming'] < count($tocome)?$instance['number_coming']:count($tocome));
     
    114115        $t++;
    115116      }
     117      }
     118      if (is_array($past)) {
    116119      $t = 0;
    117120      foreach ($past as $key => $user) {
     
    135138        $t++;
    136139      }
     140      }
    137141      echo $after_widget;
    138142    }
  • wp-birthday-users/trunk/widget.php

    r565449 r591218  
    7575    $tocome = $usersarray['come'];
    7676    $past = $usersarray['past'];
    77     uasort($tocome, 'date_sort');
    78     uasort($past, 'date_sort');
     77    (is_array($tocome)?uasort($tocome, 'date_sort'):"");
     78    (is_array($past)?uasort($past, 'date_sort'):"");
    7979    if ($usersarray['info']['today'] > 0 || $instance['hide_if_none'] != "on") {
    8080      echo "\n".$before_widget."\n  ";
     
    8383        echo "<div class=\"birthdaylink\"><a href=\"".$usersarray['info']['baseurl']."\" title=\"".__('Download Birthday calendar', 'wp-birthday-users')."\"></a></div>";
    8484      }
     85      if (is_array($tocome)) {
    8586      $t = 0;
    8687      $number = ($instance['number_coming'] < count($tocome)?$instance['number_coming']:count($tocome));
     
    114115        $t++;
    115116      }
     117      }
     118      if (is_array($past)) {
    116119      $t = 0;
    117120      foreach ($past as $key => $user) {
     
    135138        $t++;
    136139      }
     140      }
    137141      echo $after_widget;
    138142    }
Note: See TracChangeset for help on using the changeset viewer.