Details
Priority
MinorAssignee
AlexAlexReporter
AlexAlexDeveloper
Erik S.Erik S.Reviewer
AlexAlexChange Log Group
RemovedChange Log Message
Use PHP built-in date functions instead of adodb library.Patch Instructions
Patches must be submitted through Phabricator.
To submit patch via Command Line use Patches Workflow (via Arcanist) tutorial.
To submit patch via Web Interface use Patches Workflow (via Web Interface) tutorial.
BC Break Details
ADOdb Date/Time Library: http://adodb.org/dokuwiki/doku.php?id=v5:datetime:datetime_index
Functions Deleted (internal):
"_adodb_getdate"
"_adodb_is_leap_year"
"adodb_date_test_date"
"adodb_date_test_strftime"
"adodb_dow"
"adodb_get_gmt_diff"
"adodb_is_leap_year"
"adodb_year_digit_check"
Functions Deleted (public):
"adodb_date"
"adodb_date2"
"adodb_getdate"
"adodb_gmdate"
"adodb_gmmktime"
"adodb_gmstrftime"
"adodb_mktime"
"adodb_strftime"
Constants Deleted:
"ADODB_DATE_VERSION"
Solution
restore deleted "/core/kernel/utility/adodb-time.inc.php" file and it's inclusion in "/core/kernel/startup.php"
in restore file only keep definitions of public deleted functions (see BC break description) and constants
for kept public functions:
add "@deprecated 5.3.0-B1" (the version where change is released)
add "@see time()" (the function name that should be used instead)
call to "kUtil::deprecatedMethod" method (as in http://qa.in-portal.org/D276)
return result of calling native PHP function
Story Points
1Fix versions
Details
Details
Priority
Assignee
Reporter
Developer
Reviewer
Change Log Group
Change Log Message
Patch Instructions
Patches must be submitted through Phabricator.
To submit patch via Command Line use Patches Workflow (via Arcanist) tutorial.
To submit patch via Web Interface use Patches Workflow (via Web Interface) tutorial.
BC Break Details
ADOdb Date/Time Library: http://adodb.org/dokuwiki/doku.php?id=v5:datetime:datetime_index
Functions Deleted (internal):
"_adodb_getdate"
"_adodb_is_leap_year"
"adodb_date_test_date"
"adodb_date_test_strftime"
"adodb_dow"
"adodb_get_gmt_diff"
"adodb_is_leap_year"
"adodb_year_digit_check"
Functions Deleted (public):
"adodb_date"
"adodb_date2"
"adodb_getdate"
"adodb_gmdate"
"adodb_gmmktime"
"adodb_gmstrftime"
"adodb_mktime"
"adodb_strftime"
Constants Deleted:
"ADODB_DATE_VERSION"
Solution
restore deleted "/core/kernel/utility/adodb-time.inc.php" file and it's inclusion in "/core/kernel/startup.php"
in restore file only keep definitions of public deleted functions (see BC break description) and constants
for kept public functions:
add "@deprecated 5.3.0-B1" (the version where change is released)
add "@see time()" (the function name that should be used instead)
call to "kUtil::deprecatedMethod" method (as in http://qa.in-portal.org/D276)
return result of calling native PHP function
Use build-in date manipulation functions instead of adodb library.
For example:
adodb_date(...) -> date(...)
adodb_mktime() -> time()
adodb_mktime(...) -> mktime(...)
...
Check, that argument order is correct for replaced functions calls to prevent date & month being swapped by accident.
If "is_gmt" parameter is used somewhere with adodb_* functions, then use corresponding gm* function from PHP.
Check within all modules (even In-Auction).
If no adodb_* is used, then remove inclusion of adodb library file too.