cvs: docweb /include lib_general.inc.php
| From: | Sean Coates | Date: | Sun, 23 Jan 2005 23:02:39 +0000 |
| Subject: | cvs: docweb /include lib_general.inc.php | ||
| Groups: | php.doc.web | ||
| Request: | Send a blank email to doc-web+get-549@lists.php.net to get a copy of this message | ||
sean Sun Jan 23 18:02:39 2005 EDT
Modified files:
/docweb/include lib_general.inc.php
Log:
file_put_contents workaround
http://cvs.php.net/diff.php/docweb/include/lib_general.inc.php?r1=1.37&r2=1.38&ty=u
Index: docweb/include/lib_general.inc.php
diff -u docweb/include/lib_general.inc.php:1.37 docweb/include/lib_general.inc.php:1.38
--- docweb/include/lib_general.inc.php:1.37 Sun Jan 23 17:29:05 2005
+++ docweb/include/lib_general.inc.php Sun Jan 23 18:02:38 2005
@@ -18,7 +18,7 @@
| Gabor Hojtsy <goba@php.net> |
| Sean Coates <sean@php.net> |
+----------------------------------------------------------------------+
-$Id: lib_general.inc.php,v 1.37 2005/01/23 22:29:05 sean Exp $
+$Id: lib_general.inc.php,v 1.38 2005/01/23 23:02:38 sean Exp $
*/
function is_translation($project, $language)
@@ -295,7 +295,9 @@
if (!(is_readable($localFile) &&
(filemtime($localFile) > time() - RSS_STALE_CACHE_BUGS))) {
// cache miss: download (& cache) rss
- file_put_contents($localFile, file_get_contents($RSS_URL));
+ $fp = fopen($localFile, 'w');
+ fwrite($fp, file_get_contents($RSS_URL));
+ fclose($fp);
}
require_once "XML/RSS.php";