WordPress.org

Make WordPress Core

Changeset 5688


Ignore:
Timestamp:
06/12/2007 09:48:55 PM (14 years ago)
Author:
rob1n
Message:

Don't include HTML in gettext call. Props nbachiyski and Nazgul. fixes #4437

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/wp-includes/widgets.php

    r5677 r5688  
    861861        }
    862862    } else {
    863         echo __('<li>An error has occured; the feed is probably down. Try again later.</li>');
     863        echo '<li>' . __( 'An error has occurred; the feed is probably down. Try again later.' ) . '</li>';
    864864    }
    865865?>
  • trunk/wp-includes/widgets.php

    r5677 r5688  
    861861        }
    862862    } else {
    863         echo __('<li>An error has occured; the feed is probably down. Try again later.</li>');
     863        echo '<li>' . __( 'An error has occurred; the feed is probably down. Try again later.' ) . '</li>';
    864864    }
    865865?>
  • trunk/wp-settings.php

    r5615 r5688  
    11<?php
    2 // Turn register globals off
    3 function wp_unregister_GLOBALS() {
    4     if ( !ini_get('register_globals') )
    5         return;
    6 
    7     if ( isset($_REQUEST['GLOBALS']) )
    8         die('GLOBALS overwrite attempt detected');
    9 
    10     // Variables that shouldn't be unset
    11     $noUnset = array('GLOBALS', '_GET', '_POST', '_COOKIE', '_REQUEST', '_SERVER', '_ENV', '_FILES', 'table_prefix');
    12 
    13     $input = array_merge($_GET, $_POST, $_COOKIE, $_SERVER, $_ENV, $_FILES, isset($_SESSION) && is_array($_SESSION) ? $_SESSION : array());
    14     foreach ( $input as $k => $v )
    15         if ( !in_array($k, $noUnset) && isset($GLOBALS[$k]) ) {
     2
     3if ( ini_get( 'register_globals' ) ) {
     4    if ( isset( $_REQUEST['GLOBALS'] ) ) {
     5        die( 'GLOBALS overwrite attempt detected. Exiting.' );
     6    }
     7   
     8    $no_unset = array( 'GLOBALS', '_GET', '_POST', '_COOKIE', '_REQUEST', '_SERVER', '_ENV', '_FILES', 'table_prefix' );
     9    $input = array_merge( $_GET, $_POST, $_COOKIE, $_SERVER, $_ENV, $_FILES, is_array( $_SESSION ) ? $_SESSION : array() );
     10   
     11    foreach ( $input as $key => $val ) {
     12        if ( !in_array( $key, $no_unset ) && isset( $GLOBALS[$k] ) ) {
    1613            $GLOBALS[$k] = NULL;
    17             unset($GLOBALS[$k]);
     14            unset( $GLOBALS[$key] );
    1815        }
    19 }
    20 
    21 wp_unregister_GLOBALS();
     16    }
     17   
     18    unset( $no_unset, $input );
     19}
    2220
    2321unset( $wp_filter, $cache_userdata, $cache_lastcommentmodified, $cache_lastpostdate, $cache_settings, $category_cache, $cache_categories );
    2422
    25 if ( ! isset($blog_id) )
     23if ( !isset( $blog_id ) )
    2624    $blog_id = 1;
    2725
Note: See TracChangeset for help on using the changeset viewer.