applemobile; return false; } function ob_end_flush_child($now_ob_level){ // The flash does the output buffer of WP before doing rendering. // Example: comment_quicktags plugin does not flash buffer specifically. while(ob_get_level() > $now_ob_level) ob_end_flush(); $ob_level = ob_get_level(); } function safe_site_url(){ global $modInfo,$blog_id,$blogname; if (is_xpress_index_page_call()){ if (!empty($_POST['submit_url_change'])) { if (!empty($_POST['site_url_set'])) { update_option('siteurl' , $_POST['site_url_set']); } if (!empty($_POST['home_url_set'])) { update_option('home' , $_POST['home_url_set']); } } if (!empty($_POST['submit_redirect'])) { $url = get_option('home') . '/wp-admin/options-permalink.php'; // echo $url; wp_redirect($url); exit(); } $siteurl = get_option('siteurl'); $home = get_option('home'); $module_url = $modInfo->get_module_url(); $module_name = $modInfo->get_module_name(); $schema = ( isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ) ? 'https://' : 'http://'; $guess_url = preg_replace('|/' . $module_name . '/.*|i', '/' . $module_name, $schema . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] ); $blog_sub_path = ''; if(function_exists('is_multisite') && is_multisite()){ if ($blog_id > 0 && $blog_id != BLOG_ID_CURRENT_SITE){ $blog_sub_path = '/' .$blogname; } } $guess_url .= $blog_sub_path; $xoops_module_url = $module_url.$blog_sub_path; $site_url_error = false; if(strcmp($siteurl,$guess_url) !== 0) { if (!@fclose(@fopen($siteurl . '/xoops_version.php', "r"))){ $site_url_error = true; } } $home_url_error = false; if(strcmp($guess_url,$home) !== 0) { $home_url_error = true; } if ($site_url_error || $home_url_error){ include $modInfo->get_xoops_header_path(); $form = '
' ."\n"; echo $form; include $modInfo->get_xoops_footer_path(); exit(); } if (!empty($_POST['home_url_set'])) { $url = get_option('home') . '/wp-admin/options-permalink.php'; $form = '' ."\n"; include $modInfo->get_xoops_header_path(); echo $form; include $modInfo->get_xoops_footer_path(); exit(); } } } require_once( dirname( __FILE__ ).'/request_url.php'); require_once( dirname( __FILE__ ).'/memory_limit.php'); $global_session = $_SESSION; if (is_xpress_index_page_call()){ require_once( dirname( __FILE__ ).'/wp_check.php'); if (!is_wpdb_installed()){ include $modInfo->get_xoops_header_path(); echo "