Changeset 3041
- Timestamp:
- 11/11/2005 01:21:28 AM (21 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
-
wp-admin/install.php (modified) (1 diff)
-
wp-admin/upgrade-schema.php (modified) (1 diff)
-
wp-includes/functions.php (modified) (1 diff)
-
wp-login.php (modified) (1 diff)
-
xmlrpc.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/install.php
r2992 r3041 7 7 require_once('./upgrade-functions.php'); 8 8 9 $guessurl = str_replace('/wp-admin/install.php?step=2', '', 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) ); 9 $schema = ( isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ) ? 'https://' : 'http://'; 10 $guessurl = str_replace('/wp-admin/install.php?step=2', '', $schema . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) ); 10 11 11 12 if (isset($_GET['step'])) -
trunk/wp-admin/upgrade-schema.php
r2974 r3041 151 151 global $wpdb; 152 152 153 $guessurl = preg_replace('|/wp-admin/.*|i', '', 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']); 153 $schema = ( isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ) ? 'https://' : 'http://'; 154 $guessurl = preg_replace('|/wp-admin/.*|i', '', $schema . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']); 154 155 add_option('siteurl', $guessurl, __('WordPress web address')); 155 156 add_option('blogname', __('My Weblog'), __('Blog title')); -
trunk/wp-includes/functions.php
r3028 r3041 824 824 $link_text = $matches[4][$i]; 825 825 $content = str_replace($link_match, $link_text.' '.$link_number, $content); 826 $link_url = ( strtolower(substr($link_url,0,7)) != 'http://') ? get_settings('home') . $link_url : $link_url;826 $link_url = ((strtolower(substr($link_url,0,7)) != 'http://')||(strtolower(substr($link_url,0,7)) != 'https://')) ? get_settings('home') . $link_url : $link_url; 827 827 $links_summary .= "\n".$link_number.' '.$link_url; 828 828 } -
trunk/wp-login.php
r2985 r3041 12 12 if ( isset( $_SERVER['PATH_INFO'] ) && ($_SERVER['PATH_INFO'] != $_SERVER['PHP_SELF']) ) 13 13 $_SERVER['PHP_SELF'] = str_replace( $_SERVER['PATH_INFO'], '', $_SERVER['PHP_SELF'] ); 14 15 if ( dirname('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']) != get_settings('siteurl') ) 16 update_option('siteurl', dirname('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']) ); 14 15 $schema = ( isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ) ? 'https://' : 'http://'; 16 if ( dirname($schema . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']) != get_settings('siteurl') ) 17 update_option('siteurl', dirname($schema . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']) ); 17 18 } 18 19 -
trunk/xmlrpc.php
r3009 r3041 325 325 /* warning: here we make the assumption that the weblog's URI is on the same server */ 326 326 $filename = get_settings('home') . '/'; 327 $filename = preg_replace('#http ://.+?/#', $_SERVER['DOCUMENT_ROOT'].'/', $filename);327 $filename = preg_replace('#https?://.+?/#', $_SERVER['DOCUMENT_ROOT'].'/', $filename); 328 328 329 329 $f = fopen($filename, 'r'); … … 360 360 /* warning: here we make the assumption that the weblog's URI is on the same server */ 361 361 $filename = get_settings('home') . '/'; 362 $filename = preg_replace('#http ://.+?/#', $_SERVER['DOCUMENT_ROOT'].'/', $filename);362 $filename = preg_replace('#https?://.+?/#', $_SERVER['DOCUMENT_ROOT'].'/', $filename); 363 363 364 364 if ($f = fopen($filename, 'w+')) { … … 1148 1148 1149 1149 // Check if the page linked to is in our site 1150 $pos1 = strpos($pagelinkedto, str_replace( 'http://', '', str_replace('www.', '', get_settings('home'))));1150 $pos1 = strpos($pagelinkedto, str_replace(array('http://www.','http://','https://www.','https://'), '', get_settings('home'))); 1151 1151 if( !$pos1 ) 1152 1152 return new IXR_Error(0, 'Is there no link to us?');
Note: See TracChangeset
for help on using the changeset viewer.