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

Possible simplification of code in search/lib.php

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.7, 1.8, 1.9, 1.9.13
    • 1.9.14
    • 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.

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              nebgor Aparup Banerjee
              scyrma Mathieu Petit-Clair
              Sam Hemelryk Sam Hemelryk
              Rajesh Taneja Rajesh Taneja
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Raquel Ortega, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                10/Oct/11