Make WordPress Core

Ticket #1782: options.php.diff

File options.php.diff, 680 bytes (added by markjaquith, 21 years ago)
  • options.php

     
    4646        $old_siteurl = get_settings('siteurl');
    4747        $old_home = get_settings('home');
    4848
     49// prevent ".php" on end of siteurl or home
     50foreach ( array('home', 'siteurl') as $opt_name ) {
     51        if ( strpos(trim($_POST[$opt_name]), '.php') == strlen(trim($_POST[$opt_name])) - 4 ) {
     52                $old_name = 'old_' . $opt_name;
     53                $_POST[$opt_name] = $$old_name;
     54        }
     55}
     56
    4957// HACK
    5058// Options that if not there have 0 value but need to be something like "closed"
    5159    $nonbools = array('default_ping_status', 'default_comment_status');