cvs: phpdoc /scripts/iniupdate cvs-versions.php
| From: | Nuno Lopes | Date: | Fri, 21 Sep 2007 15:12:23 +0000 |
| Subject: | cvs: phpdoc /scripts/iniupdate cvs-versions.php | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-49@lists.php.net to get a copy of this message | ||
nlopess Fri Sep 21 15:12:23 2007 UTC
Modified files:
/phpdoc/scripts/iniupdate cvs-versions.php
Log:
cache get_pecl_releases_local() results
http://cvs.php.net/viewvc.cgi/phpdoc/scripts/iniupdate/cvs-versions.php?r1=1.12&r2=1.13&diff_format=u
Index: phpdoc/scripts/iniupdate/cvs-versions.php
diff -u phpdoc/scripts/iniupdate/cvs-versions.php:1.12
phpdoc/scripts/iniupdate/cvs-versions.php:1.13
--- phpdoc/scripts/iniupdate/cvs-versions.php:1.12 Fri Sep 21 14:00:52 2007
+++ phpdoc/scripts/iniupdate/cvs-versions.php Fri Sep 21 15:12:23 2007
@@ -69,6 +69,9 @@
/** fetch the PECL's packages releases that have been downloaded */
function get_pecl_releases_local()
{
+ static $cache = null;
+ if ($cache) return $cache;
+
foreach (scandir('sources') as $dir) {
if ($dir !== '.' &&
$dir !== '..' &&
@@ -80,7 +83,7 @@
}
}
- return $releases;
+ return $cache = $releases;
}