Use build-in date manipulation functions instead of AdoDb library

Components

Labels

Description

Use build-in date manipulation functions instead of adodb library.

For example:

  1. adodb_date(...) -> date(...)

  2. adodb_mktime() -> time()

  3. adodb_mktime(...) -> mktime(...)

  4. ...

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.

Context Information

None

Additional information (do not use)

None

Attachments

2

Activity

Show:

Alex February 9, 2017 at 8:57 AM

This change is backportable when BC fixing patch is created.

[API] Administrator July 30, 2013 at 10:17 AM

User committed a fix to 5.3.x. Commit Message:

Fixes - Use build-in date manipulation functions instead of adodb library

Erik S. July 24, 2013 at 3:29 PM

All done. Patches attached:
core_remove_adodb_library.patch 24/Jul/13 6:27 PM 73 kB
modules_remove_adodb_library.patch 24/Jul/13 6:27 PM 48 kB

Ready for Testing.

Fixed

Details

Priority

Assignee

Reporter

Developer

Reviewer

Change Log Group

Removed

Change Log Message

Patch Instructions

Patches must be submitted through Phabricator.

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

  1. restore deleted "/core/kernel/utility/adodb-time.inc.php" file and it's inclusion in "/core/kernel/startup.php"

  2. in restore file only keep definitions of public deleted functions (see BC break description) and constants

  3. 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

Fix versions

Created July 24, 2013 at 7:16 AM
Updated December 30, 2024 at 2:00 AM
Resolved July 30, 2013 at 10:17 AM