|
From: Jon O. <jon...@us...> - 2008-07-10 23:02:12
|
Update of /cvsroot/mxbb/core/includes/shared/phpbb3/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv21326/shared/phpbb3/includes Modified Files: functions.php functions_hook.php functions_module.php message_parser.php Log Message: Moving load_file to mx_cache... Index: functions.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/shared/phpbb3/includes/functions.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** functions.php 5 Jul 2008 22:18:50 -0000 1.20 --- functions.php 10 Jul 2008 23:02:06 -0000 1.21 *************** *** 3020,3024 **** { global $phpbb_root_path, $phpEx; ! mx_page::load_file( 'bbcode'); } --- 3020,3024 ---- { global $phpbb_root_path, $phpEx; ! mx_cache::load_file( 'bbcode'); } Index: message_parser.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/shared/phpbb3/includes/message_parser.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** message_parser.php 22 Feb 2008 23:03:55 -0000 1.3 --- message_parser.php 10 Jul 2008 23:02:07 -0000 1.4 *************** *** 19,23 **** if (!class_exists('bbcode')) { ! mx_page::load_file( 'bbcode'); } --- 19,23 ---- if (!class_exists('bbcode')) { ! mx_cache::load_file( 'bbcode'); } Index: functions_hook.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/shared/phpbb3/includes/functions_hook.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** functions_hook.php 18 Jun 2008 17:00:55 -0000 1.17 --- functions_hook.php 10 Jul 2008 23:02:07 -0000 1.18 *************** *** 151,155 **** '#\$auth->acl\(\$user->data\)[^;]*;#si' => '// MX_ACP_REPLACE \0', '#\$user->setup[^;]*;#si' => '// MX_ACP_REPLACE \0', ! '#(include|require)\(([^)]*)\)[^;]*#s' => '// MX_ACP_REPLACE mx_page::load_file(\2, \'phpbb3\')', '#\$user#si' => '$mx_user', '#\$auth#si' => '$phpbb_auth', --- 151,155 ---- '#\$auth->acl\(\$user->data\)[^;]*;#si' => '// MX_ACP_REPLACE \0', '#\$user->setup[^;]*;#si' => '// MX_ACP_REPLACE \0', ! '#(include|require)\(([^)]*)\)[^;]*#s' => '// MX_ACP_REPLACE mx_cache::load_file(\2, \'phpbb3\')', '#\$user#si' => '$mx_user', '#\$auth#si' => '$phpbb_auth', *************** *** 175,179 **** $func_cnt = preg_match_all( "#\nfunction ([^(]*)\\(#si", $script, $func_match ); ! mx_page::load_file( 'utf/utf_tools'); for( $i = 0; $i < $func_cnt; $i++ ) --- 175,179 ---- $func_cnt = preg_match_all( "#\nfunction ([^(]*)\\(#si", $script, $func_match ); ! mx_cache::load_file( 'utf/utf_tools'); for( $i = 0; $i < $func_cnt; $i++ ) *************** *** 276,280 **** } ! } --- 276,280 ---- } ! } Index: functions_module.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/shared/phpbb3/includes/functions_module.php,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** functions_module.php 20 Jun 2008 15:55:04 -0000 1.19 --- functions_module.php 10 Jul 2008 23:02:07 -0000 1.20 *************** *** 414,418 **** global $phpbb_root_path, $phpEx; ! $modulecode = file_get_contents( $filepathname); --- 414,418 ---- global $phpbb_root_path, $phpEx; ! $modulecode = file_get_contents( $filepathname); *************** *** 440,444 **** "#'(" . $FUNCTION_REPLACE . ")'#si" => "'phpBB3::\\1'" ); ! $modulecode = preg_replace( array_keys( $preg_array), $preg_array, $modulecode); --- 440,444 ---- "#'(" . $FUNCTION_REPLACE . ")'#si" => "'phpBB3::\\1'" ); ! $modulecode = preg_replace( array_keys( $preg_array), $preg_array, $modulecode); *************** *** 447,466 **** $modulecode = str_replace('$board_config_', '$config_', $modulecode); $modulecode = str_replace('auth_admin', 'phpbb_auth_admin', $modulecode); ! $modulecode = str_replace('include_once($phpbb_root_path . \'includes/acp/auth.\' . $phpEx);', 'mx_page::load_file(\'acp/auth\', \'phpbb3\');', $modulecode); $modulecode = str_replace('function phpBB3::', 'function phpbb3_', $modulecode); ! $modulecode = preg_replace( '/function ([^(]*)?phpBB3::([^(]*)\(/si', 'function \1\2(', $modulecode); $modulecode = str_replace('$this->phpBB3::', '$this->', $modulecode); $includes_cnt = preg_match_all( '#(include|require)(_once)?\(([^)]*)\);#si', $modulecode, $includes_match); $modulecode = preg_replace( '#(include|require)(_once)?\(([^)]*)\);#si', '// MXP INCLUDE CODE \0', $modulecode); ! ! $cache_file_name = str_replace( '.'. $phpEx, '', $filepathname); $cache_file_name = substr( $cache_file_name, strrpos( $cache_file_name, '/')+1); $cache_file_name = cache_file( $modulecode, $mode, $cache_file_name); ! for ( $i = 0; $i < $includes_cnt; $i++) { ! eval( '$include = ' . $includes_match[3][$i] . ';'); if ( in_array( $include, $this->includes)) { --- 447,466 ---- $modulecode = str_replace('$board_config_', '$config_', $modulecode); $modulecode = str_replace('auth_admin', 'phpbb_auth_admin', $modulecode); ! $modulecode = str_replace('include_once($phpbb_root_path . \'includes/acp/auth.\' . $phpEx);', 'mx_cache::load_file(\'acp/auth\', \'phpbb3\');', $modulecode); $modulecode = str_replace('function phpBB3::', 'function phpbb3_', $modulecode); ! $modulecode = preg_replace( '/function ([^(]*)?phpBB3::([^(]*)\(/si', 'function \1\2(', $modulecode); $modulecode = str_replace('$this->phpBB3::', '$this->', $modulecode); $includes_cnt = preg_match_all( '#(include|require)(_once)?\(([^)]*)\);#si', $modulecode, $includes_match); $modulecode = preg_replace( '#(include|require)(_once)?\(([^)]*)\);#si', '// MXP INCLUDE CODE \0', $modulecode); ! ! $cache_file_name = str_replace( '.'. $phpEx, '', $filepathname); $cache_file_name = substr( $cache_file_name, strrpos( $cache_file_name, '/')+1); $cache_file_name = cache_file( $modulecode, $mode, $cache_file_name); ! for ( $i = 0; $i < $includes_cnt; $i++) { ! eval( '$include = ' . $includes_match[3][$i] . ';'); if ( in_array( $include, $this->includes)) { *************** *** 471,479 **** continue; } ! $filename = str_replace( '.'. $phpEx, '', $include); $filename = substr( $filename, strrpos( $filename, '/')+1); $filename = cache_filename( 'INCLUDE', $filename); ! if ( file_exists( $filename)) { --- 471,479 ---- continue; } ! $filename = str_replace( '.'. $phpEx, '', $include); $filename = substr( $filename, strrpos( $filename, '/')+1); $filename = cache_filename( 'INCLUDE', $filename); ! if ( file_exists( $filename)) { *************** *** 481,490 **** } else ! { $this->includes[$include] = $this->get_code( $include, 'INCLUDE'); } ! } ! return $cache_file_name; } --- 481,490 ---- } else ! { $this->includes[$include] = $this->get_code( $include, 'INCLUDE'); } ! } ! return $cache_file_name; } *************** *** 515,519 **** //include("$module_path/{$this->p_class}_$this->p_name.$phpEx"); ! $cache_file_name = $this->get_code("$module_path/{$this->p_class}_$this->p_name.$phpEx", 'MODULE'); // Do eval() --- 515,519 ---- //include("$module_path/{$this->p_class}_$this->p_name.$phpEx"); ! $cache_file_name = $this->get_code("$module_path/{$this->p_class}_$this->p_name.$phpEx", 'MODULE'); // Do eval() *************** *** 526,534 **** } } ! //print '<pre>'; //print_r( $this->includes); //die(); ! include_once( $cache_file_name); --- 526,534 ---- } } ! //print '<pre>'; //print_r( $this->includes); //die(); ! include_once( $cache_file_name); |