- Timestamp:
- Mar 16, 2010, 12:33:18 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/xpressme_integration_kit/include/add_xpress_process.php
r534 r548 11 11 12 12 if (is_xpress_index_page_call()){ 13 14 if (!empty($_POST['submit_url_change'])) { 15 if (!empty($_POST['site_url_set'])) { 16 update_option('siteurl' , $_POST['site_url_set']); 17 } 18 if (!empty($_POST['home_url_set'])) { 19 update_option('home' , $_POST['home_url_set']); 20 } 21 } 22 13 23 $siteurl = get_option('siteurl'); 14 24 $home = get_option('home'); … … 24 34 } 25 35 $guess_url .= $blog_sub_path; 26 27 if(strcmp($siteurl,$module_url.$blog_sub_path) !== 0) { 36 $xoops_module_url = $module_url.$blog_sub_path; 37 38 $site_url_error = false; 39 if(strcmp($siteurl,$guess_url) !== 0) { 28 40 if (!@fclose(@fopen($siteurl . '/xoops_version.php', "r"))){ 29 update_option('siteurl' , $module_url.$blog_sub_path);41 $site_url_error = true; 30 42 } 31 43 } 44 $home_url_error = false; 45 if(strcmp($guess_url,$home) !== 0) { 46 $home_url_error = true; 47 } 48 if ($site_url_error || $home_url_error){ 49 include $xoops_config->xoops_root_path ."/header.php"; 50 $form = '<form method="post" action="' . $_SERVER["REQUEST_URI"] . '">'."\n"; 51 $form .= '<table cellspacing="1" cellpadding="1" border="0">'; 52 $form .= '<tbody>'; 53 if ($site_url_error){ 54 $site_url_error_log = sprintf('Can not access WordPress Site URL(%s)',$siteurl); 55 $form .= '<tr><td colspan="3"><font color="red"><b>' . $site_url_error_log . '</b></font></td></tr>'; 56 $form .= '<tr>'; 57 $form .= '<td width="16"> </td>'; 58 $form .= '<td width="64">Site URL</td>'; 59 $form .= '<td><input name="site_url_set" type="text" size="64" maxlength="200" value="' . $guess_url . '" /></td>'; 60 $form .= '</tr>'; 32 61 33 if(strcmp($guess_url,$home) !== 0) {34 if (@fclose(@fopen($guess_url . '/xoops_version.php', "r"))){35 update_option('home' , $guess_url);36 62 } 63 if ($home_url_error){ 64 if ($site_url_error) $form .= '<tr><td colspan="3"> </td></tr>';; 65 $home_url_error_log = sprintf('WordPress Home URL(%s) is different from access URL. ',$home); 66 $form .= '<tr><td colspan="3"><font color="red"><b>' . $home_url_error_log . '</b></font></td></tr>'; 67 $form .= '<tr>'; 68 $form .= '<td width="16"> </td>'; 69 $form .= '<td width="64">Home URL</td>'; 70 $form .= '<td><input name="home_url_set" type="text" size="64" maxlength="200" value="' . $guess_url . '" /></td>'; 71 $form .= '</tr>'; 72 } 73 $form .= '</tbody>'; 74 $form .= '</table><br />'; 75 $form .= '<input type="submit" value= "Setting" name="submit_url_change" />' ."\n"; 76 echo $form; 77 include $xoops_config->xoops_root_path . '/footer.php'; 78 exit(); 37 79 } 38 80 } … … 54 96 //When it is not possible to connect it correctly at site home URL on the WordPress side, 55 97 //URL is corrected based on accessed URL. 56 safe_site_url(); 98 global $xoopsUserIsAdmin; 99 if ($xoopsUserIsAdmin) safe_site_url(); 57 100 58 101 if (!is_object($xoopsUser)){ // before login auth cookie clear
Note: See TracChangeset
for help on using the changeset viewer.