Changeset 5688
- Timestamp:
- 06/12/07 21:48:55 (1 year ago)
- Files:
-
- branches/2.2/wp-includes/widgets.php (modified) (1 diff)
- trunk/wp-includes/widgets.php (modified) (1 diff)
- trunk/wp-settings.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/2.2/wp-includes/widgets.php
r5677 r5688 861 861 } 862 862 } 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>'; 864 864 } 865 865 ?> trunk/wp-includes/widgets.php
r5677 r5688 861 861 } 862 862 } 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>'; 864 864 } 865 865 ?> trunk/wp-settings.php
r5615 r5688 1 1 <?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 3 if ( 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] ) ) { 16 13 $GLOBALS[$k] = NULL; 17 unset( $GLOBALS[$k]);14 unset( $GLOBALS[$key] ); 18 15 } 19 } 20 21 wp_unregister_GLOBALS(); 16 } 17 18 unset( $no_unset, $input ); 19 } 22 20 23 21 unset( $wp_filter, $cache_userdata, $cache_lastcommentmodified, $cache_lastpostdate, $cache_settings, $category_cache, $cache_categories ); 24 22 25 if ( ! isset($blog_id) )23 if ( !isset( $blog_id ) ) 26 24 $blog_id = 1; 27 25
