Make WordPress Core

Ticket #6278: 6278-default.diff

File 6278-default.diff, 965 bytes (added by andy, 14 years ago)
  • wp-includes/functions.php

     
    17271727 * @param string $mod e.g. mod_rewrite
    17281728 * @return bool
    17291729 */
    1730 function apache_mod_loaded($mod) {
     1730function apache_mod_loaded($mod, $default = false) {
    17311731        global $is_apache;
    17321732
    17331733        if ( !$is_apache )
     
    17441744                        if ( false !== strpos($phpinfo, $mod) )
    17451745                                return true;
    17461746        }
    1747         return false;
     1747        return $default;
    17481748}
    17491749
    17501750?>
  • wp-admin/includes/misc.php

     
    11<?php
    22
    33function got_mod_rewrite() {
    4         return apache_mod_loaded('mod_rewrite');
     4        return apache_mod_loaded('mod_rewrite', true);
    55}
    66
    77// Returns an array of strings from a file (.htaccess ) from between BEGIN