|
From: Culprit <cul...@us...> - 2008-06-22 10:19:31
|
Update of /cvsroot/mxbb/core/admin In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv13554/core/admin Modified Files: index_new.php Log Message: massive update for new_acp caching of ported phpBB3 files that are not in shared or sessions folder under includes Index: index_new.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/index_new.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** index_new.php 18 Jun 2008 12:13:39 -0000 1.13 --- index_new.php 20 Jun 2008 15:55:03 -0000 1.14 *************** *** 45,48 **** --- 45,81 ---- } + + function cache_filename( $part = 'NONE', $file = '') + { + global $mx_root_path, $phpEx; + + $info_global = ""; + foreach( $_GET as $key => $value) + { + if ( $key == 'sid') + { + continue; + } + $key = strtoupper( $key); + $value = strtolower( $value); + $info_global .= "_{$key}-{$value}"; + } + if( $file != '') + { + $file = "_{$file}"; + } + + return "{$mx_root_path}cache/acp_{$part}{$file}.{$phpEx}"; + + } + + function cache_file( $code, $part = 'NONE', $file = '') + { + $filename = cache_filename( $part, $file); + $fopen = fopen( $filename, 'w'); + fwrite( $fopen, "<?php\r\n$code\r\n?>"); + fclose( $fopen); + return $filename; + } /** * Enter description here... *************** *** 106,110 **** if ( PORTAL_BACKEND == OLYMPUS_BACKEND ) { ! include_once( $mx_root_path . 'includes/sessions/phpbb3/auth.' . $phpEx ); mx_page::load_file( 'acp/auth', 'phpbb3' ); --- 139,143 ---- if ( PORTAL_BACKEND == OLYMPUS_BACKEND ) { ! //include_once( $mx_root_path . 'includes/sessions/phpbb3/auth.' . $phpEx ); mx_page::load_file( 'acp/auth', 'phpbb3' ); *************** *** 113,116 **** --- 146,150 ---- mx_page::load_file( 'functions_admin', 'phpbb3' ); mx_page::load_file( 'functions_hook', 'phpbb3' ); + mx_page::load_file( 'bbcode', 'phpbb3'); $phpbb_admin_path = ( defined( 'PHPBB_ADMIN_PATH' ) ) ? PHPBB_ADMIN_PATH : 'adm/'; *************** *** 809,817 **** // VERSION mxP v2.9 $script = str_replace( 'mx_phpBB2::', 'phpBB2::', $script ); switch ( 0 ) { case 0: ob_start(); ! eval( $script ); $panel_html = ob_get_contents(); ob_end_clean(); --- 843,854 ---- // VERSION mxP v2.9 $script = str_replace( 'mx_phpBB2::', 'phpBB2::', $script ); + + $cache_file_name = cache_file( $script, 'PANEL'); + switch ( 0 ) { case 0: ob_start(); ! include_once( $cache_file_name); $panel_html = ob_get_contents(); ob_end_clean(); |