~ubuntu-branches/ubuntu/utopic/moodle/utopic

« back to all changes in this revision

Viewing changes to theme/yui_image.php

  • Committer: Package Import Robot
  • Author(s): Thijs Kinkhorst
  • Date: 2014-05-12 16:10:38 UTC
  • mfrom: (36.1.3 sid)
  • Revision ID: package-import@ubuntu.com-20140512161038-puyqf65k4e0s8ytz
Tags: 2.6.3-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
$etag = sha1($path);
41
41
$parts = explode('/', $path);
42
42
$version = array_shift($parts);
 
43
if ($version === 'm') {
 
44
    $version = 'moodle';
 
45
}
43
46
if ($version == 'moodle' && count($parts) >= 3) {
44
 
    if (!defined('ABORT_AFTER_CONFIG_CANCEL')) {
45
 
        define('ABORT_AFTER_CONFIG_CANCEL', true);
46
 
        define('NO_UPGRADE_CHECK', true);
47
 
        define('NO_MOODLE_COOKIES', true);
48
 
        require($CFG->libdir.'/setup.php');
49
 
    }
50
47
    $frankenstyle = array_shift($parts);
51
48
    $module = array_shift($parts);
52
49
    $image = array_pop($parts);
53
50
    $subdir = join('/', $parts);
54
 
    $dir = get_component_directory($frankenstyle);
 
51
    $dir = core_component::get_component_directory($frankenstyle);
55
52
 
56
53
    // For shifted YUI modules, we need the YUI module name in frankenstyle format.
57
54
    $frankenstylemodulename = join('-', array($version, $frankenstyle, $module));
69
66
} else if (count($parts) == 1 && ($version == $CFG->yui3version || $version == $CFG->yui2version)) {
70
67
    list($image) = $parts;
71
68
    if ($version == $CFG->yui3version) {
72
 
        $imagepath = "$CFG->dirroot/lib/yuilib/$CFG->yui3version/build/assets/skins/sam/$image";
 
69
        $imagepath = "$CFG->dirroot/lib/yuilib/$CFG->yui3version/assets/skins/sam/$image";
73
70
    } else  {
74
71
        $imagepath = "$CFG->dirroot/lib/yuilib/2in3/$CFG->yui2version/build/assets/skins/sam/$image";
75
72
    }