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

global search should use of PATH_SEPARATOR

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.4
    • Fix Version/s: 1.9.5, 2.0
    • Component/s: Global search
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE

      Description

      The scripts in the global search folder contain several instances of the following code:

      $separator = (array_key_exists('WINDIR', $_SERVER)) ? ';' : ':' ;
      ini_set('include_path', $CFG->dirroot.'\search'.$separator.ini_get('include_path'));

      But it seems unnecessary when we should use the PATH_SEPARATOR instead:

      ini_set('include_path', $CFG->dirroot.'\search'.PATH_SEPARATOR.ini_get('include_path'));

      Scripts affected:

      • search/add.php
      • search/delete.php
      • search/indexer.php
      • search/indexersplash.php
      • search/update.php
      • search/tests/index.php

        Gliffy Diagrams

          Activity

          Hide
          vf Valery Fremaux added a comment -

          sure, much better indeed...

          Show
          vf Valery Fremaux added a comment - sure, much better indeed...
          Hide
          vf Valery Fremaux added a comment -

          Commited in both HEAD and STABLE_19

          Show
          vf Valery Fremaux added a comment - Commited in both HEAD and STABLE_19
          Hide
          xxxxxxx Gordon Bateson added a comment -

          Thanks Valery.

          Show
          xxxxxxx Gordon Bateson added a comment - Thanks Valery.
          Hide
          vf Valery Fremaux added a comment -

          Oups, bad read !! The real thing should be this :

          ini_set('include_path', $CFG->dirroot.DIRECTORY_SEPARATOR.'search'.PATH_SEPARATOR.ini_get('include_path'));

          Show
          vf Valery Fremaux added a comment - Oups, bad read !! The real thing should be this : ini_set('include_path', $CFG->dirroot.DIRECTORY_SEPARATOR.'search'.PATH_SEPARATOR.ini_get('include_path'));
          Hide
          timhunt Tim Hunt added a comment -

          By the way Valery, you need to get in the habit of looking at http://moodle.org/mod/cvsadmin/view.php?tab=unmerged and fixing your merge tags (and merging too, if you are not doing that).

          Show
          timhunt Tim Hunt added a comment - By the way Valery, you need to get in the habit of looking at http://moodle.org/mod/cvsadmin/view.php?tab=unmerged and fixing your merge tags (and merging too, if you are not doing that).
          Hide
          vf Valery Fremaux added a comment -

          right !

          Show
          vf Valery Fremaux added a comment - right !
          Hide
          vf Valery Fremaux added a comment -

          Done !

          Show
          vf Valery Fremaux added a comment - Done !

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                13/May/09