[gnome-web-www] previous-donors: Shortened the cache lookup name



commit a5ebba023ceba35d55a823a784b4238fdef32f94
Author: Tobias Mueller <tobiasmue gnome org>
Date:   Fri Jan 25 19:13:34 2013 +0100

    previous-donors: Shortened the cache lookup name
    
    due to suspected bug. The page generated is empty. So maybe we're hitting http://core.trac.wordpress.org/ticket/15058

 theme/page-previous-donors.php |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/theme/page-previous-donors.php b/theme/page-previous-donors.php
index ff7b9a2..56f023a 100644
--- a/theme/page-previous-donors.php
+++ b/theme/page-previous-donors.php
@@ -21,17 +21,18 @@ foreach (array(
     $donors[$year] = array();
     
     foreach ($fname_dispname_map as $level => $disp_name) {
-        if (false === ($donors_file = get_transient("friends_of_gnome_{$year}_{$level}"))) {
+        $cache_name = "fog_donors_{$year}_{$level}";
+        if (false === ($donors_file = get_transient($cache_name))) {
             $url = "http://people.gnome.org/~tobiasmue/fog/{$year}-{$level}.txt";;
             $donors_file = file_get_contents($url);
+
+            // keeps a 24-hour cache until another HTTP request
+            $set_transient($cache_name, $donors, 60*60*24);
         }
         $donors[$year][$level] = array();
 
         $donors[$year][$level] = explode("\n", $donors_file);
 
-        // keeps a 24-hour cache until another HTTP request
-        // to get the members list
-        set_transient("friends_of_gnome_{$year}_{$level}", $donors, 60*60*24);
     }
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]