Moodle

global search should use of PATH_SEPARATOR

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor 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

Activity

Hide
Valery Fremaux added a comment -

sure, much better indeed...

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

Commited in both HEAD and STABLE_19

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

Thanks Valery.

Show
Gordon Bateson added a comment - Thanks Valery.
Hide
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
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
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
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
Valery Fremaux added a comment -

right !

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

Done !

Show
Valery Fremaux added a comment - Done !

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: