|
From: OryNider <ory...@us...> - 2008-01-13 21:35:19
|
Update of /cvsroot/mxbb/mx_phpbb/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv28632 Modified Files: Tag: core28x forum_hack.php Log Message: This will supress error wile uploading avatar not succed. Index: forum_hack.php =================================================================== RCS file: /cvsroot/mxbb/mx_phpbb/includes/forum_hack.php,v retrieving revision 1.24.2.1 retrieving revision 1.24.2.2 diff -C2 -d -r1.24.2.1 -r1.24.2.2 *** forum_hack.php 20 Dec 2007 10:57:57 -0000 1.24.2.1 --- forum_hack.php 13 Jan 2008 21:35:15 -0000 1.24.2.2 *************** *** 1512,1526 **** case 'includes/usercp_avatar': // ! // Avatars and ranks // ! $code = str_replace( '\'./\' . $board_config[\'avatar_gallery_path\']', '$board_config[\'avatar_gallery_path\']', $code ); ! $code = str_replace( '\'./\' . $board_config[\'avatar_path\']', '$board_config[\'avatar_path\']', $code ); $code = str_replace( '$board_config[\'avatar_gallery_path\']', '\'' . $phpbb_root_path . '\' . $board_config[\'avatar_gallery_path\']', $code ); ! $code = str_replace( '$board_config[\'avatar_path\']', '\'' . $phpbb_root_path . '\' . $board_config[\'avatar_path\']', $code ); ! $code = str_replace( 'if (!is_uploaded_file($avatar_filename))', 'if (!file_exists($avatar_filename))', $code); ! $code = str_replace( '$move_file($avatar_filename, \'' . $phpbb_root_path .'\' . $board_config[\'avatar_path\'] . "/$new_filename");','$move_file($avatar_filename, \'' . $phpbb_root_path .'\' . $board_config[\'avatar_path\'] . "/$new_filename"); ! @unlink( $avatar_filename);', $code); break; --- 1512,1526 ---- case 'includes/usercp_avatar': // ! // Avatars and ranks // ! $code = str_replace( '\'./\' . $board_config[\'avatar_gallery_path\']', '$board_config[\'avatar_gallery_path\']', $code ); ! $code = str_replace( '\'./\' . $board_config[\'avatar_path\']', '$board_config[\'avatar_path\']', $code ); $code = str_replace( '$board_config[\'avatar_gallery_path\']', '\'' . $phpbb_root_path . '\' . $board_config[\'avatar_gallery_path\']', $code ); ! $code = str_replace( '$board_config[\'avatar_path\']', '\'' . $phpbb_root_path . '\' . $board_config[\'avatar_path\']', $code ); ! $code = str_replace( '$error = true;', 'return;', $code); ! $code = str_replace( 'if (!is_uploaded_file($avatar_filename))', 'if (!file_exists($avatar_filename))', $code); ! $code = str_replace( '$move_file($avatar_filename, \'' . $phpbb_root_path .'\' . $board_config[\'avatar_path\'] . "/$new_filename");','$move_file($avatar_filename, \'' . $phpbb_root_path .'\' . $board_config[\'avatar_path\'] . "/$new_filename"); @unlink( $avatar_filename);', $code); break; |