Skip to content
Browse files

Merge branch 'w28_MDL-34175_m23_admin' of git://github.com/skodak/moo…

…dle into MOODLE_23_STABLE
  • Loading branch information...
2 parents 6b8399d + 93f3eb6 commit 3ca82ed605b69847456b62da482950ee9482ecef Sam Hemelryk committed Jul 10, 2012
View
2 admin/settings/mnet.php
@@ -29,7 +29,7 @@
new admin_externalpage(
'mnetpeer' . $host->id,
$host->name,
- $CFG->wwwroot . '/admin/mnet/peers.php?step=update&hostid=' . $host->id,
+ $CFG->wwwroot . '/'.$CFG->admin.'/mnet/peers.php?step=update&hostid=' . $host->id,
'moodle/site:config'
)
);
View
6 admin/tool/assignmentupgrade/batchupgrade.php
@@ -26,9 +26,9 @@
require_once(dirname(__FILE__) . '/../../../config.php');
require_once($CFG->libdir . '/adminlib.php');
-require_once($CFG->dirroot . '/admin/tool/assignmentupgrade/locallib.php');
-require_once($CFG->dirroot . '/admin/tool/assignmentupgrade/upgradableassignmentstable.php');
-require_once($CFG->dirroot . '/admin/tool/assignmentupgrade/upgradableassignmentsbatchform.php');
+require_once($CFG->dirroot . '/'.$CFG->admin.'/tool/assignmentupgrade/locallib.php');
+require_once($CFG->dirroot . '/'.$CFG->admin.'/tool/assignmentupgrade/upgradableassignmentstable.php');
+require_once($CFG->dirroot . '/'.$CFG->admin.'/tool/assignmentupgrade/upgradableassignmentsbatchform.php');
require_sesskey();
View
2 admin/tool/assignmentupgrade/index.php
@@ -35,7 +35,7 @@
require_once(dirname(__FILE__) . '/../../../config.php');
require_once($CFG->libdir . '/adminlib.php');
-require_once($CFG->dirroot . '/admin/tool/assignmentupgrade/locallib.php');
+require_once($CFG->dirroot . '/'.$CFG->admin.'/tool/assignmentupgrade/locallib.php');
// admin_externalpage_setup calls require_login and checks moodle/site:config
admin_externalpage_setup('assignmentupgrade');
View
8 admin/tool/assignmentupgrade/listnotupgraded.php
@@ -24,10 +24,10 @@
require_once(dirname(__FILE__) . '/../../../config.php');
require_once($CFG->libdir . '/adminlib.php');
-require_once($CFG->dirroot . '/admin/tool/assignmentupgrade/locallib.php');
-require_once($CFG->dirroot . '/admin/tool/assignmentupgrade/upgradableassignmentstable.php');
-require_once($CFG->dirroot . '/admin/tool/assignmentupgrade/upgradableassignmentsbatchform.php');
-require_once($CFG->dirroot . '/admin/tool/assignmentupgrade/paginationform.php');
+require_once($CFG->dirroot . '/'.$CFG->admin.'/tool/assignmentupgrade/locallib.php');
+require_once($CFG->dirroot . '/'.$CFG->admin.'/tool/assignmentupgrade/upgradableassignmentstable.php');
+require_once($CFG->dirroot . '/'.$CFG->admin.'/tool/assignmentupgrade/upgradableassignmentsbatchform.php');
+require_once($CFG->dirroot . '/'.$CFG->admin.'/tool/assignmentupgrade/paginationform.php');
// admin_externalpage_setup calls require_login and checks moodle/site:config
admin_externalpage_setup('assignmentupgrade', '', array(), tool_assignmentupgrade_url('listnotupgraded'));
View
2 admin/tool/assignmentupgrade/upgradesingle.php
@@ -24,7 +24,7 @@
require_once(dirname(__FILE__) . '/../../../config.php');
require_once($CFG->libdir . '/adminlib.php');
-require_once($CFG->dirroot . '/admin/tool/assignmentupgrade/locallib.php');
+require_once($CFG->dirroot . '/'.$CFG->admin.'/tool/assignmentupgrade/locallib.php');
require_sesskey();
View
2 admin/tool/assignmentupgrade/upgradesingleconfirm.php
@@ -24,7 +24,7 @@
require_once(dirname(__FILE__) . '/../../../config.php');
require_once($CFG->libdir . '/adminlib.php');
-require_once($CFG->dirroot . '/admin/tool/assignmentupgrade/locallib.php');
+require_once($CFG->dirroot . '/'.$CFG->admin.'/tool/assignmentupgrade/locallib.php');
require_sesskey();
View
2 admin/tool/profiling/index.php
@@ -142,7 +142,7 @@
// The flexitable that will root listings
$table = new xhprof_table_sql('profiling-list-table');
- $baseurl = $CFG->wwwroot . '/admin/tool/profiling/index.php';
+ $baseurl = $CFG->wwwroot . '/'.$CFG->admin.'/tool/profiling/index.php';
// Check if we are listing all or some URL ones
$sqlconditions = '';
View
2 lib/outputrenderers.php
@@ -468,7 +468,7 @@ public function standard_footer_html() {
$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&amp;sesskey='.sesskey().'">'.get_string('purgecaches', 'admin').'</a></div>';
+ $output .= '<div class="purgecaches"><a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/purgecaches.php?confirm=1&amp;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
View
6 lib/outputrequirementslib.php
@@ -399,6 +399,12 @@ protected function js_fix_url($url) {
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, '?'))) {
View
2 mod/lti/typessettings.php
@@ -106,7 +106,7 @@
}
$PAGE->set_title("$SITE->shortname: " . get_string('toolsetup', 'lti'));
-$PAGE->navbar->add(get_string('lti_administration', 'lti'), $CFG->wwwroot.'/admin/settings.php?section=modsettinglti');
+$PAGE->navbar->add(get_string('lti_administration', 'lti'), $CFG->wwwroot.'/'.$CFG->admin.'/settings.php?section=modsettinglti');
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('toolsetup', 'lti'));

0 comments on commit 3ca82ed

Please sign in to comment.
Something went wrong with that request. Please try again.