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

Possible simplification of code in search/lib.php

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 1.9.14
    • 1.7, 1.8, 1.9, 1.9.13
    • Global search
    • None
    • MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE
    • MOODLE_19_STABLE
    • Hide

      0) make sure you're using the mysqli driver in your moodle.
      1) setup global search (http://docs.moodle.org/19/en/Global_Search_set-up)
      2) run the indexing script, ensure there are no warnings when inserting document title and url into the index.

      Show
      0) make sure you're using the mysqli driver in your moodle. 1) setup global search ( http://docs.moodle.org/19/en/Global_Search_set-up ) 2) run the indexing script, ensure there are no warnings when inserting document title and url into the index.

      search/lib.php makes direct calls to mysql_real_escape_string and the equivalent for postgresql.

      Afaik, this should be done via a call to $db->qstr(), which would apply all the checks adodb provides for other engines (oci8, mysqli and mssql), and make the code a bit simpler.

            nebgor Aparup Banerjee
            scyrma Mathieu Petit-Clair
            Sam Hemelryk Sam Hemelryk
            Rajesh Taneja Rajesh Taneja
            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.