Make WordPress Core

Changeset 5844 for trunk/wp-settings.php


Ignore:
Timestamp:
08/03/2007 01:08:59 AM (17 years ago)
Author:
markjaquith
Message:

More streamlined install process. Obeys WP_SITEURL if defined. fixes #4687 (props JeremyVisser, Nazgul), see #4685

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-settings.php

    r5820 r5844  
    143143
    144144if ( !is_blog_installed() && (strpos($_SERVER['PHP_SELF'], 'install.php') === false && !defined('WP_INSTALLING')) ) {
    145     if (strpos($_SERVER['PHP_SELF'], 'wp-admin') !== false)
    146         $link = 'install.php';
     145    if ( defined('WP_SITEURL') )
     146        $link = WP_SITEURL . '/wp-admin/install.php';
     147    elseif (strpos($_SERVER['PHP_SELF'], 'wp-admin') !== false)
     148        $link = preg_replace('|/wp-admin/?.*?$|', '/', $_SERVER['PHP_SELF']) . 'wp-admin/install.php';
    147149    else
    148         $link = 'wp-admin/install.php';
    149 
    150     wp_die( sprintf( 'It doesn&#8217;t look like you&#8217;ve installed WP yet. Try running <a href="%s">install.php</a>.', $link ) );
     150        $link = preg_replace('|/[^/]+?$|', '/', $_SERVER['PHP_SELF']) . 'wp-admin/install.php';
     151    require_once(ABSPATH . WPINC . '/kses.php');
     152    require_once(ABSPATH . WPINC . '/pluggable.php');
     153    wp_redirect($link);
     154    die(); // have to die here ~ Mark
    151155}
    152156
Note: See TracChangeset for help on using the changeset viewer.