Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-14679 META: DB layer 2.0
  3. MDL-16669

Make sql_substr() to accept parameters instead of simply returning function name

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.0
    • 2.0
    • Database SQL/XMLDB
    • None
    • MOODLE_20_STABLE
    • MOODLE_20_STABLE

      Until Moodle 2.0, the sql_substr() helper function (dmllib), is used without parameters at simply returns the "substring" function used for each DB.

      Change this behaviour so it will look like:

      $DB->sql_substr(string, from, len)

      with len being optional.

      • Implement it in new moodle_databases.
      • Document it.
      • Look for wrong usages in core.
      • Add some tests, with and without len.

      Ciao

            skodak Petr Skoda
            stronk7 Eloy Lafuente (stronk7)
            Petr Skoda Petr Skoda
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.