]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-14617 file_put_content emulation gone
authorskodak <skodak>
Thu, 1 May 2008 21:12:56 +0000 (21:12 +0000)
committerskodak <skodak>
Thu, 1 May 2008 21:12:56 +0000 (21:12 +0000)
lib/moodlelib.php

index 24255912886280ef3e14dd7e14c943072dd63882..37d3edd23b116199141e5cce39bec9518c0a94d7 100644 (file)
@@ -7417,25 +7417,6 @@ function cleanremoteaddr($addr) {
     return array_pop($goodmatches);
 }
 
-/**
- * file_put_contents is only supported by php 5.0 and higher
- * so if it is not predefined, define it here
- *
- * @param $file full path of the file to write
- * @param $contents contents to be sent
- * @return number of bytes written (false on error)
- */
-if(!function_exists('file_put_contents')) {
-    function file_put_contents($file, $contents) {
-        $result = false;
-        if ($f = fopen($file, 'w')) {
-            $result = fwrite($f, $contents);
-            fclose($f);
-        }
-        return $result;
-    }
-}
-
 /**
  * The clone keyword is only supported from PHP 5 onwards.
  * The behaviour of $obj2 = $obj1 differs fundamentally