cvs: docweb /include lib_general.inc.php

[email protected] ("Sean Coates")
Newsgroups php.doc.web
Message-ID <cvssean1106521359@cvsserver>
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 <[email protected]>                        |
 |                   Sean Coates <[email protected]>                         |
 +----------------------------------------------------------------------+
-$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";
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.