mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Add HTTPS support, fixes #1372
git-svn-id: https://develop.svn.wordpress.org/trunk@3041 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -324,7 +324,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||
|
||||
/* warning: here we make the assumption that the weblog's URI is on the same server */
|
||||
$filename = get_settings('home') . '/';
|
||||
$filename = preg_replace('#http://.+?/#', $_SERVER['DOCUMENT_ROOT'].'/', $filename);
|
||||
$filename = preg_replace('#https?://.+?/#', $_SERVER['DOCUMENT_ROOT'].'/', $filename);
|
||||
|
||||
$f = fopen($filename, 'r');
|
||||
$content = fread($f, filesize($filename));
|
||||
@@ -359,7 +359,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||
|
||||
/* warning: here we make the assumption that the weblog's URI is on the same server */
|
||||
$filename = get_settings('home') . '/';
|
||||
$filename = preg_replace('#http://.+?/#', $_SERVER['DOCUMENT_ROOT'].'/', $filename);
|
||||
$filename = preg_replace('#https?://.+?/#', $_SERVER['DOCUMENT_ROOT'].'/', $filename);
|
||||
|
||||
if ($f = fopen($filename, 'w+')) {
|
||||
fwrite($f, $content);
|
||||
@@ -1147,7 +1147,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||
$error_code = -1;
|
||||
|
||||
// Check if the page linked to is in our site
|
||||
$pos1 = strpos($pagelinkedto, str_replace('http://', '', str_replace('www.', '', get_settings('home'))));
|
||||
$pos1 = strpos($pagelinkedto, str_replace(array('http://www.','http://','https://www.','https://'), '', get_settings('home')));
|
||||
if( !$pos1 )
|
||||
return new IXR_Error(0, 'Is there no link to us?');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user