[Easymod-cvs] easymod2/mods/easymod/em_includes em_ftp.php, 1.15, 1.16 em_functions.php, 1.22, 1.23
Status: Beta
Brought to you by:
wgeric
From: Eric F. <wg...@us...> - 2006-06-08 04:08:12
|
Update of /cvsroot/easymod/easymod2/mods/easymod/em_includes In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv28189/mods/easymod/em_includes Modified Files: em_ftp.php em_functions.php em_modio.php Log Message: @_@ a commit! - making fopen binary, should hopefully fix problems with multiple lines being inserted. Will have to do more testing. - starts for MODX, decided to hack this version so that MODX works in it instead of releasing the rewrite. Too many bugs in it! Index: em_functions.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/em_includes/em_functions.php,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** em_functions.php 6 Nov 2005 13:30:52 -0000 1.22 --- em_functions.php 8 Jun 2006 04:08:07 -0000 1.23 *************** *** 40,43 **** --- 40,46 ---- define('FIND_FAIL_CRITICAL', 2); + define('TEXT', 0); + define('MODX', 1); + /// /// Interface to crypt class *************** *** 766,770 **** // using a file that we know is present ! if ($fin = fopen( 'languages/lang_easymod_'.$language.'.'.$phpEx, 'r')) { // just make sure the first line is what we were expecting --- 769,773 ---- // using a file that we know is present ! if ($fin = fopen( 'languages/lang_easymod_'.$language.'.'.$phpEx, 'rb')) { // just make sure the first line is what we were expecting *************** *** 798,802 **** // see if we can create a new file ! if ($fout = fopen( 'EM_test.txt', 'w')) { fwrite( $fout, 'EM can write!\n') ; --- 801,805 ---- // see if we can create a new file ! if ($fout = fopen( 'EM_test.txt', 'wb')) { fwrite( $fout, 'EM can write!\n') ; *************** *** 820,824 **** // see if we can open the index.php for writing; not making any changes though!! ! if ($fout = fopen( $phpbb_root_path . 'index.'.$phpEx, 'a')) { fclose( $fout) ; --- 823,827 ---- // see if we can open the index.php for writing; not making any changes though!! ! if ($fout = fopen( $phpbb_root_path . 'index.'.$phpEx, 'ab')) { fclose( $fout) ; *************** *** 917,921 **** // see if we can create and write to this file ! if ($fp = @fopen($tmpfname, 'w')) { // remember to clean up! --- 920,924 ---- // see if we can create and write to this file ! if ($fp = @fopen($tmpfname, 'wb')) { // remember to clean up! Index: em_modio.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/em_includes/em_modio.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** em_modio.php 31 Oct 2005 17:57:15 -0000 1.7 --- em_modio.php 8 Jun 2006 04:08:07 -0000 1.8 *************** *** 245,249 **** if (!$create_command) { ! if (!$this->pread_file = fopen ( $phpbb_root_path . $this->path . trim($this->filename), 'r')) { // restore error handling --- 245,249 ---- if (!$create_command) { ! if (!$this->pread_file = fopen ( $phpbb_root_path . $this->path . trim($this->filename), 'rb')) { // restore error handling *************** *** 280,284 **** // open the file on the server ! if ( $this->pfile = fopen( $install_path . $process . $this->path . trim($this->filename) . $ext, 'w')) { // restore error handling --- 280,284 ---- // open the file on the server ! if ( $this->pfile = fopen( $install_path . $process . $this->path . trim($this->filename) . $ext, 'wb')) { // restore error handling Index: em_ftp.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/em_includes/em_ftp.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** em_ftp.php 10 Nov 2005 01:57:43 -0000 1.15 --- em_ftp.php 8 Jun 2006 04:08:07 -0000 1.16 *************** *** 307,311 **** $tmpfname = @tempnam($phpbb_root_path . 'admin/em_includes/cache', 'txt'); @unlink($tmpfname); // unlink for safety on php4.0.3+ ! if( $fp = @fopen($tmpfname, 'w') ) { @fwrite($fp, ">>$easymod_install_version<<\n"); --- 307,311 ---- $tmpfname = @tempnam($phpbb_root_path . 'admin/em_includes/cache', 'txt'); @unlink($tmpfname); // unlink for safety on php4.0.3+ ! if( $fp = @fopen($tmpfname, 'wb') ) { @fwrite($fp, ">>$easymod_install_version<<\n"); *************** *** 1157,1161 **** @unlink($tmpfname); // unlink for safety on php4.0.3+ ! $fp = @fopen($tmpfname, 'w'); for ($i=0; $i<count($array_lines); $i++) { --- 1157,1161 ---- @unlink($tmpfname); // unlink for safety on php4.0.3+ ! $fp = @fopen($tmpfname, 'wb'); for ($i=0; $i<count($array_lines); $i++) { |