[Phpcoder-cvs] phpcoder coder-class.php,1.1.1.1,1.2
Brought to you by:
garyjharris,
quickfoot
From: <gh...@pr...> - 2004-01-27 13:35:14
|
Update of /cvsroot/phpcoder/phpcoder In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7670 Modified Files: coder-class.php Log Message: Switch to Unix style line endings. Use -w parameter for cvs diff. Create encoded files using the file mode of the source file by default. The user can still specify a custom file mode. Index: coder-class.php =================================================================== RCS file: /cvsroot/phpcoder/phpcoder/coder-class.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- coder-class.php 25 Jan 2004 01:38:08 -0000 1.1.1.1 +++ coder-class.php 27 Jan 2004 13:34:12 -0000 1.2 @@ -1,847 +1,849 @@ -<?php -/** -This code distributed under the BSD License below, for more information about the BSD License see http://www.opensource.org/licenses/bsd-license.php. - -Copyright (c) 2003, Jason Sheets <js...@sh...>, Idaho Image Works LLC -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - [...1665 lines suppressed...] + function _WriteFile($file, $contents) + { + if (empty($file)) { + return false; + } + + if (!$fp = @fopen($file, 'wb')) { + return false; + } + + if (!fwrite($fp, $contents, strlen($contents))) { + return false; + } + + @fclose($fp); + + return true; + } +} +?> |