mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 17:36:38 +02:00
Merge branch 'w28_MDL-34175_m23_admin' of git://github.com/skodak/moodle into MOODLE_23_STABLE
This commit is contained in:
commit
3ca82ed605
10 changed files with 20 additions and 14 deletions
|
@ -468,7 +468,7 @@ class core_renderer extends renderer_base {
|
|||
$link= '<a title="' . $title . '" href="' . $url . '">' . $txt . '</a>';
|
||||
$output .= '<div class="profilingfooter">' . $link . '</div>';
|
||||
}
|
||||
$output .= '<div class="purgecaches"><a href="'.$CFG->wwwroot.'/admin/purgecaches.php?confirm=1&sesskey='.sesskey().'">'.get_string('purgecaches', 'admin').'</a></div>';
|
||||
$output .= '<div class="purgecaches"><a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/purgecaches.php?confirm=1&sesskey='.sesskey().'">'.get_string('purgecaches', 'admin').'</a></div>';
|
||||
}
|
||||
if (!empty($CFG->debugvalidators)) {
|
||||
// NOTE: this is not a nice hack, $PAGE->url is not always accurate and $FULLME neither, it is not a bug if it fails. --skodak
|
||||
|
|
|
@ -399,6 +399,12 @@ class page_requirements_manager {
|
|||
if ($url instanceof moodle_url) {
|
||||
return $url;
|
||||
} else if (strpos($url, '/') === 0) {
|
||||
// Fix the admin links if needed.
|
||||
if ($CFG->admin !== 'admin') {
|
||||
if (strpos($url, "/admin/") === 0) {
|
||||
$url = preg_replace("|^/admin/|", "/$CFG->admin/", $url);
|
||||
}
|
||||
}
|
||||
if (debugging()) {
|
||||
// check file existence only when in debug mode
|
||||
if (!file_exists($CFG->dirroot . strtok($url, '?'))) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue