Changeset 2581
- Timestamp:
- 05/03/2005 07:52:11 AM (21 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
-
wp-admin/upgrade-schema.php (modified) (1 diff)
-
wp-includes/functions.php (modified) (1 diff)
-
xmlrpc.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/upgrade-schema.php
r2393 r2581 216 216 add_option('rss_language', 'en'); 217 217 add_option('html_type', 'text/html'); 218 // 1.5.1 219 add_option('use_trackback', 0); 218 220 219 221 // Delete unused options -
trunk/wp-includes/functions.php
r2572 r2581 1859 1859 } 1860 1860 1861 function wp_remote_fopen( $uri ) { 1862 if ( function_exists('curl_init') ) { 1863 $handle = curl_init(); 1864 curl_setopt ($handle, CURLOPT_URL, $uri); 1865 curl_setopt ($handle, CURLOPT_CONNECTTIMEOUT, 1); 1866 curl_setopt ($handle, CURLOPT_RETURNTRANSFER, 1); 1867 $buffer = curl_exec($handle); 1868 curl_close($handle); 1869 return $buffer; 1870 } else { 1871 $fp = fopen( $uri, 'r' ); 1872 if ( !$fp ) 1873 return false; 1874 $linea = ''; 1875 while( $remote_read = fread($fp, 4096) ) 1876 $linea .= $remote_read; 1877 return $linea; 1878 } 1879 } 1880 1861 1881 ?> -
trunk/xmlrpc.php
r2399 r2581 1163 1163 1164 1164 // Let's check the remote site 1165 $fp = @fopen($pagelinkedfrom, 'r'); 1166 if (!$fp) { 1167 // The source URI does not exist 1165 $linea = wp_remote_fopen( $pagelinkedfrom ); 1166 if ( !$linea ) 1168 1167 return new IXR_Error(16, 'The source URI does not exist.'); 1169 }1170 1171 $puntero = 4096;1172 while($remote_read = fread($fp, $puntero)) {1173 $linea .= $remote_read;1174 }1175 1168 1176 1169 // Work around bug in strip_tags(): … … 1180 1173 // I don't think we need this? -- emc3 1181 1174 //$linea = preg_replace('#&([^amp\;])#is', '&$1', $linea); 1182 if ( empty($matchtitle)) {1175 if ( empty($matchtitle) ) { 1183 1176 preg_match('|<title>([^<]*?)</title>|is', $linea, $matchtitle); 1184 1177 }
Note: See TracChangeset
for help on using the changeset viewer.