Changeset 170239
- Timestamp:
- 11/04/2009 04:34:36 AM (16 years ago)
- Location:
- kivaorg-widget/trunk
- Files:
-
- 1 added
- 2 edited
-
kiva.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
-
upgrade.html (added)
Legend:
- Unmodified
- Added
- Removed
-
kivaorg-widget/trunk/kiva.php
r156100 r170239 4 4 Plugin URI: http://urpisdream.com/2009/05/kiva-loans-wordpress-widget/ 5 5 Description: Kiva widget, display my investments 6 Version: 2. 87 Author: Marilyn Burgess 26 Version: 2.9 7 Author: Marilyn Burgess 8 8 Author URI: http://urpisdream.com 9 9 */ … … 187 187 $time = time(); 188 188 189 if($time - $cache_time < (60 * 60)){ 189 if($time - $cache_time < (60)){ 190 #if($time - $cache_time < (60 * 60)){ 190 191 // Cache is less than an hour old 191 192 return 1; 192 193 }else{ 193 194 // delete the old cache 194 //$file = "$kiva_cache_dir/$cache_file_original"; 195 //unlink($file); 195 $file = "$kiva_cache_dir/$cache_file_original"; 196 unlink($file); 197 check_for_old_cache_files(); 196 198 } 197 199 } 198 200 return 0; 201 } 202 203 function check_for_old_cache_files(){ 204 global $kiva_cache_dir; 205 206 $i = 0; 207 $limit = 1000; 208 if (is_dir($kiva_cache_dir)) { 209 if ($dh = opendir($kiva_cache_dir)) { 210 while (($file = readdir($dh)) !== false) { 211 if(! is_dir($file)){ 212 if( preg_match("/^kiva_cache_/", $file)){ 213 // delelte the file 214 unlink("$kiva_cache_dir/$file"); 215 } 216 } 217 $i++; 218 if($i == $limit){ 219 break; 220 } 221 } 222 } 223 } 199 224 } 200 225 -
kivaorg-widget/trunk/readme.txt
r156100 r170239 4 4 Tags: kiva, widgit 5 5 Requires at least: 2.8 6 Tested up to: 2.8. 47 Stable tag: 2. 86 Tested up to: 2.8.5 7 Stable tag: 2.9 8 8 9 9 Displays rotating entrepreneurs the blogger has invested in publically. Links back to Kiva. … … 26 26 Lender Page. under .My Portfolio. on Kiva.org. 27 27 28 Version 2.9 includes an important update that fixes a big problem that causes the kiva file cache 29 to fill up and take up lots of space. Please upgrade asap! 30 31 Version 2.8 includes an important update that handles when the Kiva server is unavailable. 32 28 33 Version 2.7 includes an important upgrade that allows Kiva to track the widgets requests. Please 29 34 upgrade your copy of the Kive Wordpress widget. 30 35 31 Version 2.8 includes an important update that handles when the Kiva server is unavailable. 36 32 37 33 38 == Installation ==
Note: See TracChangeset
for help on using the changeset viewer.