Changeset 428995
- Timestamp:
- 08/26/2011 12:01:03 PM (15 years ago)
- Location:
- gravatarlocalcache/trunk
- Files:
-
- 2 edited
-
GravatarLocalCache.php (modified) (5 diffs)
-
readme.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
gravatarlocalcache/trunk/GravatarLocalCache.php
r298808 r428995 7 7 Description: Local cache for gravatar images (saves dnsqueries and let you control cache/proxysettings of the images). 8 8 Author: Oliver Schaal 9 Version: 1. 0.29 Version: 1.1.0 10 10 11 11 This is a WordPress plugin (http://wordpress.org) and widget … … 116 116 <ul> 117 117 <?php 118 // TODO: cache leeren119 118 if (is_dir(GLCCACHEPATH)) { 119 self::cleanupCache(GLCCACHEPATH); 120 120 $_filesInCache = self::filesInDirectory(GLCCACHEPATH); 121 121 $_fileInCacheCount = count($_filesInCache); … … 321 321 } 322 322 } 323 323 324 324 ?> 325 325 <div class="wrap"> … … 358 358 <ul style="padding-left:20px;"> 359 359 <?php 360 // TODO: cache leeren361 360 if (is_dir(GLCCACHEPATH)) { 361 self::cleanupCache(GLCCACHEPATH); 362 362 $_filesInCache = self::filesInDirectory(GLCCACHEPATH); 363 363 $_fileInCacheCount = count($_filesInCache); … … 413 413 } 414 414 /* showAdminMenu */ 415 416 /* cleanupCache */ 417 private static function cleanupCache ($path) { 418 if ($handle = opendir($path)) { 419 while (false !== ($file = readdir($handle))) { 420 if ($file[0] == '.' || is_dir($path.'/'.$file)) { 421 continue; 422 } 423 if ((time() - filemtime($path.'/'.$file)) > (self::$options['cache_time'] *60*60)) { 424 unlink($path.'/'.$file); 425 } 426 } 427 closedir($handle); 428 } 429 } 430 /* cleanupCache */ 415 431 416 432 /* array functions */ -
gravatarlocalcache/trunk/readme.txt
r298808 r428995 9 9 License: GPL v3, see LICENSE 10 10 Requires at least: 2.8 11 Tested up to: 3. 0.012 Stable tag: 1. 0.211 Tested up to: 3.2.1 12 Stable tag: 1.1.0 13 13 14 14 Local cache for gravatar images (saves dnsqueries and let you control cache/proxysettings of the images). … … 20 20 Please report bugs and/or feature-request to our ticket-system: [Bugtracker/Wiki](http://trac.splash.de/glc). 21 21 For Support, please use the [forum](http://board.splash.de/forumdisplay.php?f=105). 22 Latest development news: [Twitter](http://twitter.com/cybiox9). 22 23 23 24 == Installation == … … 42 43 For other webservers you have to check the manual. 43 44 44 For other questions, take a look atthe [support forum](http://board.splash.de/forumdisplay.php?f=105).45 For any further questions, please use the [support forum](http://board.splash.de/forumdisplay.php?f=105). 45 46 46 47 == Changelog == 48 49 = 1.1.0 = 50 * [NEW] "auto"-delete files older than cache time/cachecleanup 47 51 48 52 = 1.0.2 = … … 67 71 68 72 = 0.9.3 (1.0.0 RC2) = 69 * [NEW] wordpress setting sfor the default gravatar is now used73 * [NEW] wordpress setting for the default gravatar is now used 70 74 * [FIX] if there is a problem with the cache directory, some debug information will be displayed 71 75 * [FIX] possible duplicate constant
Note: See TracChangeset
for help on using the changeset viewer.