Make WordPress Core

Changeset 714


Ignore:
Timestamp:
01/04/2004 07:40:15 AM (23 years ago)
Author:
saxmatt
Message:

Lots of fixes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/links-update-xml.php

    r630 r714  
    33// Copyright (C) 2003 Mike Little -- mike@zed1.com
    44
    5 require_once('wp-config.php');
     5require_once('../wp-config.php');
    66
    77// globals to hold state
     
    4747 **/
    4848function get_weblogs_updatedfile() {
    49         global $ignore_weblogs_cache,ABSPATH;
     49        global $ignore_weblogs_cache;
    5050        $update = false;
    51 
     51        $file = ABSPATH . get_settings('weblogs_cache_file');
    5252        if ($ignore_weblogs_cache) {
    5353                $update = true;
    5454        } else {
    55                 if (file_exists(get_settings('weblogs_cache_file'))) {
     55                if (file_exists($file)) {
    5656                        // is it old?
    57                         $modtime = filemtime(get_settings('weblogs_cache_file'));
     57                        $modtime = filemtime($file);
    5858                        if ((time() - $modtime) > (get_settings('weblogs_cacheminutes') * 60)) {
    5959                                $update = true;
     
    7474                        $contents = preg_replace('|[^[:space:][:punct:][:alpha:][:digit:]]|','',$contents);
    7575
    76                         $cachefp = fopen(get_settings('weblogs_cache_file'), "w");
     76                        $cachefp = fopen(ABSPATH . get_settings('weblogs_cache_file'), "w");
    7777                        fwrite($cachefp, $contents);
    7878                        fclose($cachefp);
     
    120120 **/
    121121function transform_url($url) {
    122         global ABSPATH;
    123122        //echo("transform_url(): $url ");
    124123        $url = str_replace('www.', '', $url);
     
    146145
    147146        // Open the XML file for reading
    148         $fp = fopen(ABSPATH.get_settings('weblogs_cache_file'), "r")
     147        $fp = fopen(ABSPATH . get_settings('weblogs_cache_file'), "r")
    149148                  or die("Error reading XML data.");
    150149
Note: See TracChangeset for help on using the changeset viewer.