Uploaded image for project: 'In-Portal CMS'
  1. In-Portal CMS
  2. INP-1302

Use build-in date manipulation functions instead of AdoDb library

    XMLWordPrintable

    Details

    • Change Log Group:
      Removed
    • Change Log Message:
      Use PHP built-in date functions instead of adodb library.
    • Story Points:
      1
    • Copy Issue Key:
    • Patch Instructions:

      Patches must be submitted through Phabricator.

    • BC Break Details:
      Hide

      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
      Show
      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

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                alex Alex
                Reporter:
                alex Alex
                Developer:
                Erik Snarski [Intechnic]
                Reviewer:
                Alex
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: