[wptest-www: 22/27] test if the members list is correctly being downloaded from f.g.o
- From: Andrea Veri <av src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [wptest-www: 22/27] test if the members list is correctly being downloaded from f.g.o
- Date: Sun, 12 Feb 2012 21:46:13 +0000 (UTC)
commit 0f8c33d53e9c04fcab91368eba2aa474e37c525a
Author: Vinicius Depizzol <vdepizzol gmail com>
Date: Mon Jan 30 21:02:13 2012 -0200
test if the members list is correctly being downloaded from f.g.o
theme/page-members.php | 20 ++++++++++++--------
1 files changed, 12 insertions(+), 8 deletions(-)
---
diff --git a/theme/page-members.php b/theme/page-members.php
index ab057ff..06ad353 100644
--- a/theme/page-members.php
+++ b/theme/page-members.php
@@ -1,17 +1,19 @@
<?php
-if (false === ($members = get_transient('foundation_members_list'))) {
+//if (false === ($members = get_transient('foundation_members_list'))) {
$members_url = "http://foundation.gnome.org/membership/members.php?format=json";
$members = json_decode(file_get_contents($members_url));
+ var_dump($members);
+
// keeps a 12-hour cache until another HTTP request
// to get the members list
set_transient('foundation_members_list', $members, 60*60*12);
-}
+//}
@@ -32,13 +34,15 @@ require_once("header.php"); ?>
<?php
- echo '<ul class="foundation_members_list">'."\n";
- $antispam = array(".", "@");
- foreach ($members as $member) {
- $email = str_replace($antispam, " ", $member["email"]);
- echo " <li title=\"<" . $email . "> / " . "Last Renewed on " . $member['last_renewed_on'] . "\">" . $member['firstname'] . " " . $member['lastname'] . "</li>\n";
+ if (isset($members)) {
+ echo '<ul class="foundation_members_list">'."\n";
+ $antispam = array(".", "@");
+ foreach ($members as $member) {
+ $email = str_replace($antispam, " ", $member["email"]);
+ echo " <li title=\"<" . $email . "> / " . "Last Renewed on " . $member['last_renewed_on'] . "\">" . $member['firstname'] . " " . $member['lastname'] . "</li>\n";
+ }
+ echo '</ul>'."\n";
}
- echo '</ul>'."\n";
?>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]