From: skodak Date: Wed, 19 Jul 2006 08:13:25 +0000 (+0000) Subject: Bug #6136 - Hard coded admin paths; merged from MOODLE_16_STABLE X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=ad0f9c828e613e360f9ef2ba3e3dd80000e7d383;p=moodle.git Bug #6136 - Hard coded admin paths; merged from MOODLE_16_STABLE --- diff --git a/admin/blocks.php b/admin/blocks.php index 76f4c9f98b..0a4917b7ea 100644 --- a/admin/blocks.php +++ b/admin/blocks.php @@ -159,7 +159,7 @@ $table->define_columns(array('name', 'instances', 'version', 'hideshow', 'multiple', 'delete', 'settings')); $table->define_headers(array($strname, $strcourses, $strversion, $strhide.'/'.$strshow, $strmultiple, $strdelete, $strsettings)); - $table->define_baseurl($CFG->wwwroot.'/admin/blocks.php'); + $table->define_baseurl($CFG->wwwroot.'/'.$CFG->admin.'/blocks.php'); $table->set_attribute('cellspacing', '0'); $table->set_attribute('id', 'blocks'); @@ -221,7 +221,7 @@ $table->define_columns(array('block', 'delete')); $table->define_headers(array($strname, $strdelete)); - $table->define_baseurl($CFG->wwwroot.'/admin/blocks.php'); + $table->define_baseurl($CFG->wwwroot.'/'.$CFG->admin.'/blocks.php'); $table->set_attribute('cellspacing', '0'); $table->set_attribute('id', 'incompatible'); diff --git a/admin/filters.php b/admin/filters.php index d21ab6f032..8fde4e0c3d 100644 --- a/admin/filters.php +++ b/admin/filters.php @@ -192,7 +192,7 @@ $table->column_style('order', 'text-align', 'center'); $table->column_style('settings', 'text-align', 'center'); $table->define_headers(array($txt->name, $txt->hideshow, $txt->updown, $txt->settings)); - $table->define_baseurl("$CFG->wwwroot/admin/filters.php"); + $table->define_baseurl("$CFG->wwwroot/$CFG->admin/filters.php"); $table->set_attribute('id', 'blocks'); $table->set_attribute('class', 'flexible generaltable generalbox'); $table->set_attribute('style', 'margin:auto;'); diff --git a/admin/report/courseoverview/index.php b/admin/report/courseoverview/index.php index 2ecc794832..66c8d249cd 100644 --- a/admin/report/courseoverview/index.php +++ b/admin/report/courseoverview/index.php @@ -23,7 +23,7 @@ $strreports = get_string('reports'); $strcourseoverview = get_string('courseoverview'); - $strnav = ''.get_string('administration').' -> '.$strreports.' -> '.$strcourseoverview; + $strnav = ''.get_string('administration').' -> '.$strreports.' -> '.$strcourseoverview; $reportoptions = stats_get_report_options($course->id,STATS_MODE_RANKED); @@ -75,10 +75,10 @@ $courses = get_records_sql($sql); if (empty($courses)) { - error(get_string('statsnodata'),$CFG->wwwroot.'/admin/report/courseoverview/index.php'); + error(get_string('statsnodata'),$CFG->wwwroot.'/'.$CFG->admin.'/report/courseoverview/index.php'); } - echo '
'; + echo '
'; $table = new object(); $table->align = array('left','center','center','center'); diff --git a/admin/report/courseoverview/reportsgraph.php b/admin/report/courseoverview/reportsgraph.php index 165ee9ac85..1b11bfc81c 100644 --- a/admin/report/courseoverview/reportsgraph.php +++ b/admin/report/courseoverview/reportsgraph.php @@ -28,7 +28,7 @@ $courses = get_records_sql($sql); if (empty($courses)) { - error(get_string('statsnodata'),$CFG->wwwroot.'/admin/report/course/index.php'); + error(get_string('statsnodata'),$CFG->wwwroot.'/'.$CFG->admin.'/report/course/index.php'); } diff --git a/admin/report/stats/mod.php b/admin/report/stats/mod.php index 2b2ddbe4f7..bc3133fa87 100644 --- a/admin/report/stats/mod.php +++ b/admin/report/stats/mod.php @@ -6,7 +6,7 @@ if (!empty($CFG->enablestats)) { echo '

'; - echo ''.get_string('stats').''; + echo ''.get_string('stats').''; echo '

'; $statsstatus = stats_check_uptodate($course->id); if ($statsstatus !== NULL) { diff --git a/admin/stickyblocks.php b/admin/stickyblocks.php index a5fa1860b3..72a1988626 100644 --- a/admin/stickyblocks.php +++ b/admin/stickyblocks.php @@ -63,7 +63,7 @@ echo ''; print_simple_box_start('center'); print_heading($strheading); - echo '
' + echo '' .'

'.get_string('stickyblockspagetype','admin').': '; choose_from_menu($options,'pt',$pt,'choose','this.form.submit();'); echo '

'; diff --git a/admin/utfdbmigrate.php b/admin/utfdbmigrate.php index 88bd401728..757a9a0c0a 100755 --- a/admin/utfdbmigrate.php +++ b/admin/utfdbmigrate.php @@ -1,4 +1,5 @@ wwwroot.'/admin/langimport.php'); + print_continue($CFG->wwwroot.'/'.$CFG->admin.'/langimport.php'); } //else if $migrate @@ -812,7 +813,7 @@ function db_migrate2utf8(){ //Eloy: Perhaps some type of limit parameter here echo $lang.', '; } } - echo '
Language Import Utility'; + echo '
Language Import Utility'; print_simple_box_end(); delete_records('config','name','langsused'); diff --git a/blocks/admin/block_admin.php b/blocks/admin/block_admin.php index 35c7d5c0d5..f481c8b5a9 100644 --- a/blocks/admin/block_admin.php +++ b/blocks/admin/block_admin.php @@ -56,7 +56,7 @@ class block_admin extends block_list { $this->content->icons[] = ''; - $this->content->items[] = ''.get_string('reports').''; + $this->content->items[] = ''.get_string('reports').''; $this->content->icons[] = ''; $this->content->items[] = ''.get_string('sitefiles').''; diff --git a/lib/pagelib.php b/lib/pagelib.php index 3b2b45474b..818756d1d2 100644 --- a/lib/pagelib.php +++ b/lib/pagelib.php @@ -440,7 +440,7 @@ class page_course extends page_base { function url_get_path() { global $CFG; if (defined('ADMIN_STICKYBLOCKS')) { - return $CFG->wwwroot.'/admin/stickyblocks.php'; + return $CFG->wwwroot.'/'.$CFG->admin.'/stickyblocks.php'; } if($this->id == SITEID) { return $CFG->wwwroot .'/index.php'; diff --git a/mod/hotpot/db/update_to_v2.php b/mod/hotpot/db/update_to_v2.php index 0bdd9c824b..5f27e3acc3 100644 --- a/mod/hotpot/db/update_to_v2.php +++ b/mod/hotpot/db/update_to_v2.php @@ -449,7 +449,7 @@ function hotpot_update_to_v2_from_hotpotatoes() { set_field("modules", "visible", "0", "id", $module->id); print '

All HotPotatoes activities have been imported to the HotPot module.
'."\n"; print 'The HotPotatoes module has been hidden and can safely be deleted from this Moodle site.
'."\n"; - print '     Configuration -> Modules, then click "Delete" for "Hot Potatoes XML Quiz"

'."\n"; + print '     Configuration -> Modules, then click "Delete" for "Hot Potatoes XML Quiz"

'."\n"; } } if ($ok) { diff --git a/my/pagelib.php b/my/pagelib.php index 4394df69eb..2195da844c 100644 --- a/my/pagelib.php +++ b/my/pagelib.php @@ -49,11 +49,12 @@ class page_my_moodle extends page_base { } function url_get_path() { + global $CFG; page_id_and_class($id,$class); if ($id == PAGE_MY_MOODLE) { - return $GLOBALS['CFG']->wwwroot.'/my/index.php'; + return $CFG->wwwroot.'/my/index.php'; } elseif (defined('ADMIN_STICKYBLOCKS')){ - return $GLOBALS['CFG']->wwwroot.'/admin/stickyblocks.php'; + return $CFG->wwwroot.'/'.$CFG->admin.'/stickyblocks.php'; } }