X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/d3b1ea255664edd2deef17f900a655613d20820d..672d6bc6da735e745275ef7a86341dc1178da8d2:/wp-admin/options-general.php?ds=sidebyside diff --git a/wp-admin/options-general.php b/wp-admin/options-general.php index cd4b8cdb..def21249 100644 --- a/wp-admin/options-general.php +++ b/wp-admin/options-general.php @@ -9,6 +9,9 @@ /** WordPress Administration Bootstrap */ require_once('./admin.php'); +if ( ! current_user_can('manage_options') ) + wp_die(__('You do not have sufficient permissions to manage options for this blog.')); + $title = __('General Settings'); $parent_file = 'options-general.php'; /* translators: date and time format for exact current time, mainly about timezones, see http://php.net/date */ @@ -157,7 +160,7 @@ if (empty($tzstring)) { // set the Etc zone if no timezone string exists
- +
time()) { - $found = true; + $found = true; break; } } @@ -179,10 +182,7 @@ if (empty($tzstring)) { // set the Etc zone if no timezone string exists $message = $tr['isdst'] ? __('Daylight savings time begins on: %s.') : __('Standard time begins on: %s.'); - $tz = new DateTimeZone($tzstring); - $d = new DateTime( "@{$tr['ts']}" ); - $d->setTimezone($tz); - printf( $message, date_i18n(get_option('date_format').' '.get_option('time_format'), $d->format('U') ) ); + printf( $message, date_i18n(get_option('date_format').' '.get_option('time_format'), $tr['ts'] ) ); } else { _e('This timezone does not observe daylight savings time.'); }