Commit:    79e6635cb66a9efd47d48012bafe00f2897b0814
Author:    Xinchen Hui <larue...@php.net>         Tue, 11 Sep 2012 18:02:19 
+0800
Parents:   0146efbd4108eab809d1f0d70b46691c229e0315
Branches:  master

Link:       
http://git.php.net/?p=php-src.git;a=commitdiff;h=79e6635cb66a9efd47d48012bafe00f2897b0814

Log:
Rearrange the codes, remove empty lines

Changed paths:
  M  ext/date/php_date.c


Diff:
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
index eac6ca5..e43ff19 100644
--- a/ext/date/php_date.c
+++ b/ext/date/php_date.c
@@ -738,7 +738,6 @@ PHP_RSHUTDOWN_FUNCTION(date)
 #define SUNFUNCS_RET_STRING    1
 #define SUNFUNCS_RET_DOUBLE    2
 
-
 /* {{{ PHP_MINIT_FUNCTION */
 PHP_MINIT_FUNCTION(date)
 {
@@ -860,9 +859,10 @@ static char* guess_timezone(const timelib_tzdb *tzdb 
TSRMLS_DC)
                    timelib_timezone_id_is_valid(Z_STRVAL(ztz), tzdb)) {
                        return Z_STRVAL(ztz);
                }
-       } else if (*DATEG(default_timezone) && 
timelib_timezone_id_is_valid(DATEG(default_timezone), tzdb)) {
-               return DATEG(default_timezone);
        } else if (*DATEG(default_timezone)) {
+               if (timelib_timezone_id_is_valid(DATEG(default_timezone), 
tzdb)) {
+                       return DATEG(default_timezone);
+               }
                /* Invalid date.timezone value */
                php_error_docref(NULL TSRMLS_CC, E_WARNING, "date.timezone 
value '%s' is invalid. We selected the timezone 'UTC' for now.", 
DATEG(default_timezone));
        } else {
@@ -887,7 +887,6 @@ PHPAPI timelib_tzinfo *get_timezone_info(TSRMLS_D)
 }
 /* }}} */
 
-
 /* {{{ date() and gmdate() data */
 #include "ext/standard/php_smart_str.h"
 
@@ -1323,7 +1322,6 @@ PHPAPI signed long php_parse_date(char *string, signed 
long *now)
 }
 /* }}} */
 
-
 /* {{{ proto int strtotime(string time [, int now ])
    Convert string representation of date and time to a timestamp */
 PHP_FUNCTION(strtotime)
@@ -1384,7 +1382,6 @@ PHP_FUNCTION(strtotime)
 }
 /* }}} */
 
-
 /* {{{ php_mktime - (gm)mktime helper */
 PHPAPI void php_mktime(INTERNAL_FUNCTION_PARAMETERS, int gmt)
 {
@@ -1493,7 +1490,6 @@ PHP_FUNCTION(gmmktime)
 }
 /* }}} */
 
-
 /* {{{ proto bool checkdate(int month, int day, int year)
    Returns true(1) if it is a valid date in gregorian calendar */
 PHP_FUNCTION(checkdate)


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to