Make WordPress Core

Changeset 612 for trunk/wp-settings.php


Ignore:
Timestamp:
12/15/2003 08:02:19 AM (22 years ago)
Author:
saxmatt
Message:

Smilie fix from Jaykul, changed fool's siteurl fix to use faster preg_replace. Now handles *any number* of trailing slashes. :)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-settings.php

    r601 r612  
    77require ($abspath . $b2inc . '/functions.php');
    88require ($abspath . $b2inc . '/template-functions.php');
    9 require ($abspath . $b2inc . '/vars.php');
    109require ($abspath . $b2inc . '/class-xmlrpc.php');
    1110require ($abspath . $b2inc . '/class-xmlrpcs.php');
     
    4140    // "When trying to design a foolproof system,
    4241    //  never underestimate the ingenuity of the fools :)"
    43     //
    44     // Strip trailing slashes from $siteurl. But don't do
    45     // anything that could cause an infinite loop.
    46     while (('/' == substr($siteurl, -1)) && (10 > $i++)) {
    47         $siteurl = substr($siteurl, 0, -1);
    48     }
     42
     43    $siteurl = preg_replace('|/+$|', '', $siteurl);
    4944    $blogfilename = get_settings('blogfilename');
    5045    $blogname = get_settings('blogname');
     
    10398
    10499} //end !$_wp_installing
     100
     101require ($abspath . $b2inc . '/vars.php');
    105102?>
Note: See TracChangeset for help on using the changeset viewer.