~ubuntu-branches/ubuntu/trusty/moodle/trusty

« back to all changes in this revision

Viewing changes to admin/tool/behat/cli/util.php

  • Committer: Package Import Robot
  • Author(s): Thijs Kinkhorst
  • Date: 2014-01-21 13:40:52 UTC
  • mfrom: (1.1.13)
  • Revision ID: package-import@ubuntu.com-20140121134052-ym2qvsp2cd9vq0p6
Tags: 2.5.4-1
* New upstream release, fixing security issues:
  - MSA-14-0001 Config passwords visibility issue [CVE-2014-0008]
  - MSA-14-0002 Group constraints lacking in "login as" [CVE-2014-0009]
  - MSA-14-0003 CSRF vulnerability in profile fields [CVE-2014-0010]
* Move /var/lib/moodle directory into package.
* Revert back to bundled yui3. Unfortunately, version in Debian and
  of upstream are not compatible (closes: #735312).

Show diffs side-by-side

added added

removed removed

Lines of Context:
92
92
// Getting $CFG data.
93
93
require_once(__DIR__ . '/../../../../config.php');
94
94
 
95
 
// CFG->behat_prefix must be set and with value different than CFG->prefix and phpunit_prefix.
96
 
if (empty($CFG->behat_prefix) ||
97
 
       ($CFG->behat_prefix == $CFG->prefix) ||
98
 
       (!empty($CFG->phpunit_prefix) && $CFG->behat_prefix == $CFG->phpunit_prefix)) {
99
 
    behat_error(BEHAT_EXITCODE_CONFIG,
100
 
        'Define $CFG->behat_prefix in config.php with a value different than $CFG->prefix and $CFG->phpunit_prefix');
101
 
}
 
95
// When we use the utilities we don't know how the site
 
96
// will be accessed, so if neither $CFG->behat_switchcompletely or
 
97
// $CFG->behat_wwwroot are set we must think that the site will
 
98
// be accessed using the built-in server which is set by default
 
99
// to localhost:8000. We need to do this to prevent uses of the production
 
100
// wwwroot when the site is being installed / dropped...
 
101
$CFG->behat_wwwroot = behat_get_wwwroot();
102
102
 
103
 
// CFG->behat_dataroot must be set and with value different than CFG->dataroot and phpunit_dataroot.
104
 
if (empty($CFG->behat_dataroot) ||
105
 
       ($CFG->behat_dataroot == $CFG->dataroot) ||
106
 
       (!empty($CFG->phpunit_dataroot) && $CFG->behat_dataroot == $CFG->phpunit_dataroot)) {
107
 
    behat_error(BEHAT_EXITCODE_CONFIG,
108
 
        'Define $CFG->behat_dataroot in config.php with a value different than $CFG->dataroot and $CFG->phpunit_dataroot');
109
 
}
 
103
// Checking the integrity of the provided $CFG->behat_* vars
 
104
// to prevent conflicts with production and phpunit environments.
 
105
behat_check_config_vars();
110
106
 
111
107
// Create behat_dataroot if it doesn't exists.
112
108
if (!file_exists($CFG->behat_dataroot)) {