Lots of fixes.
git-svn-id: http://svn.automattic.com/wordpress/trunk@714 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c31ebcf3c0
commit
5781a9f056
|
@ -2,7 +2,7 @@
|
|||
// Links weblogs.com grabber
|
||||
// Copyright (C) 2003 Mike Little -- mike@zed1.com
|
||||
|
||||
require_once('wp-config.php');
|
||||
require_once('../wp-config.php');
|
||||
|
||||
// globals to hold state
|
||||
$updated_timestamp = 0;
|
||||
|
@ -46,15 +46,15 @@ function update_links() {
|
|||
** otherwise return false (nothing to do)
|
||||
**/
|
||||
function get_weblogs_updatedfile() {
|
||||
global $ignore_weblogs_cache,ABSPATH;
|
||||
global $ignore_weblogs_cache;
|
||||
$update = false;
|
||||
|
||||
$file = ABSPATH . get_settings('weblogs_cache_file');
|
||||
if ($ignore_weblogs_cache) {
|
||||
$update = true;
|
||||
} else {
|
||||
if (file_exists(get_settings('weblogs_cache_file'))) {
|
||||
if (file_exists($file)) {
|
||||
// is it old?
|
||||
$modtime = filemtime(get_settings('weblogs_cache_file'));
|
||||
$modtime = filemtime($file);
|
||||
if ((time() - $modtime) > (get_settings('weblogs_cacheminutes') * 60)) {
|
||||
$update = true;
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ function get_weblogs_updatedfile() {
|
|||
$contents = preg_replace("/'/",''',$contents);
|
||||
$contents = preg_replace('|[^[:space:][:punct:][:alpha:][:digit:]]|','',$contents);
|
||||
|
||||
$cachefp = fopen(get_settings('weblogs_cache_file'), "w");
|
||||
$cachefp = fopen(ABSPATH . get_settings('weblogs_cache_file'), "w");
|
||||
fwrite($cachefp, $contents);
|
||||
fclose($cachefp);
|
||||
} else {
|
||||
|
@ -119,7 +119,6 @@ function endElement($parser, $tagName) {
|
|||
** trailing slash
|
||||
**/
|
||||
function transform_url($url) {
|
||||
global ABSPATH;
|
||||
//echo("transform_url(): $url ");
|
||||
$url = str_replace('www.', '', $url);
|
||||
$url = str_replace('WWW.', '', $url);
|
||||
|
|
Loading…
Reference in New Issue