- Timestamp:
- May 23, 2011, 3:03:57 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Ver3.0/xpressme_integration_kit/include/add_xpress_process.php
r744 r757 14 14 } 15 15 function safe_site_url(){ 16 global $ xoops_config,$blog_id,$blogname;16 global $modInfo,$blog_id,$blogname; 17 17 18 18 if (is_xpress_index_page_call()){ … … 35 35 $siteurl = get_option('siteurl'); 36 36 $home = get_option('home'); 37 $module_url = $ xoops_config->module_url;38 $module_name = $ xoops_config->module_name;37 $module_url = $modInfo->get_module_url(); 38 $module_name = $modInfo->get_module_name(); 39 39 $schema = ( isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ) ? 'https://' : 'http://'; 40 40 $guess_url = preg_replace('|/' . $module_name . '/.*|i', '/' . $module_name, $schema . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] ); … … 59 59 } 60 60 if ($site_url_error || $home_url_error){ 61 include $ xoops_config->xoops_root_path ."/header.php";61 include $modInfo->get_xoops_header_path(); 62 62 $form = '<form method="post" action="' . $_SERVER["REQUEST_URI"] . '">'."\n"; 63 63 $form .= '<table cellspacing="1" cellpadding="1" border="0">'; … … 94 94 $form .= '</form>' ."\n"; 95 95 echo $form; 96 include $ xoops_config->xoops_root_path . '/footer.php';96 include $modInfo->get_xoops_footer_path(); 97 97 exit(); 98 98 } … … 103 103 $form .= '<input type="submit" value= "'.__('Permalink Settings').'" name="submit_redirect" />' ."\n"; 104 104 $form .= '</form>' ."\n"; 105 include $ xoops_config->xoops_root_path ."/header.php";105 include $modInfo->get_xoops_header_path(); 106 106 echo $form; 107 include $ xoops_config->xoops_root_path . '/footer.php';107 include $modInfo->get_xoops_footer_path(); 108 108 exit(); 109 109 } … … 118 118 require_once( dirname( __FILE__ ).'/wp_check.php'); 119 119 if (!is_wpdb_installed()){ 120 include $ xoops_config->xoops_root_path ."/header.php";120 include $modInfo->get_xoops_header_path(); 121 121 echo "<h2>Wordpress has not been installed yet. </h2>"; 122 include $ xoops_config->xoops_root_path . '/footer.php';122 include $modInfo->get_xoops_footer_path(); 123 123 exit(); 124 124 } 125 125 126 //$_SERVER['REQUEST_METHOD'] = 'POST' is127 //When notifying by a private message, Notification_reserve_send();128 //it is evaded that the data base becomes read-only as a result of the check on the referrer and the method.129 /*130 $request_method = (isset($_SERVER['REQUEST_METHOD'])) ? $_SERVER['REQUEST_METHOD'] : '';131 $_SERVER['REQUEST_METHOD'] = 'POST';132 require_once $xoops_config->xoops_mainfile_path; //It is necessary to execute it for the user attestation before wp-settings.php.133 $_SERVER['REQUEST_METHOD'] = $request_method;134 */135 126 xpress_set_memory_limmit(); // Set memory limmit.(Limmit Value from XPressMe modele config.) 136 127 unset($offset); //This Trap is provides the case where $offset is defined on the XOOPS side. … … 161 152 xpress_pulugin_activation('xpressme/xpressme.php'); 162 153 // reloaded 163 header('Location: ' . $ xoops_config->module_url. '/');154 header('Location: ' . $modInfo->get_module_url() . '/'); 164 155 165 156 $err_str = "The activation of the XPressME plugin was executed.<br />\n"; … … 172 163 ob_start(); 173 164 $now_ob_level = ob_get_level(); 174 if (version_compare($xoops_config->wp_version,'2.2', '<')) 175 require_once dirname( __FILE__ ).'/old_template-loader.php' ; 176 else 177 require_once( ABSPATH . WPINC . '/template-loader.php' ); 165 require_once( ABSPATH . WPINC . '/template-loader.php' ); 178 166 ob_end_flush_child($now_ob_level); 179 167 $wp_output = ob_get_contents(); … … 202 190 // This Function in xpressme plugin 203 191 require_once( dirname( __FILE__ ).'/xpress_block_render.php' ); 204 xpress_unnecessary_block_cache_delete($ xoops_config->module_name);192 xpress_unnecessary_block_cache_delete($modInfo->get_module_dirname()); 205 193 if (is_home()) { 206 xpress_block_cache_refresh($ xoops_config->module_name);194 xpress_block_cache_refresh($modInfo->get_module_dirname()); 207 195 require_once( dirname( __FILE__ ).'/xpress_block_header.php' ); 208 set_xpress_block_header($ xoops_config->module_name);196 set_xpress_block_header($modInfo->get_module_dirname()); 209 197 } 210 198 if ( ini_get( 'register_globals' ) ) … … 213 201 exit(); // The return to wp-blog-header.php is stolen here 214 202 } 215 //if (is_admin_post_call()) require_once $xoops_config->xoops_mainfile_path; // for Notification_triggerEvent216 //if (is_xpress_comments_post_call()) require_once $xoops_config->xoops_mainfile_path; // for Notification_triggerEvent217 203 xpress_set_memory_limmit(); // Set memory limmit.(Limmit Value from XPressMe modele config.) 218 204 require_once(ABSPATH.'wp-settings.php');
Note: See TracChangeset
for help on using the changeset viewer.