Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-12970

sql_isnull() doesn't seem to be necessary

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9, 2.0
    • Fix Version/s: 1.9, 2.0
    • Labels:
      None
    • Environment:
      Any
    • Database:
      Any
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE

      Description

      The sql_isnull() function in dmllib.php is there since ages ago in order to generate correct "IS NULL" SQL clauses.

      Anyway, AFAIK, that clause is 100% cross-db and we don't need the compatibility function at all. In fact, there are a lot of "harcoded" IS NULL clauses here and there in code and everything seems to be working of. Also, after a quick grep, I only have found one use of that function in "mod/quiz/report/overview/report.php"

      So I'd propose to move that function to deprecate and emit a warning for developers. Then, we'll be able to delete it definitively in, say, 2.0.

      Ciao

        Attachments

          Activity

            People

            • Assignee:
              stronk7 Eloy Lafuente (stronk7)
              Reporter:
              stronk7 Eloy Lafuente (stronk7)
              Participants:
              Component watchers:
              Jake Dallimore, Jun Pataleta, Ryan Wyllie, Jake Dallimore, Jun Pataleta, Ryan Wyllie, Tim Hunt, Andrew Nicols, Mathew May, Michael Hawkins, Shamim Rezaie, Simey Lameze
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                3/Mar/08