]> git.mjollnir.org Git - moodle.git/commitdiff
Bug #6136 - Hard coded admin paths; merged from MOODLE_16_STABLE
authorskodak <skodak>
Wed, 19 Jul 2006 08:13:25 +0000 (08:13 +0000)
committerskodak <skodak>
Wed, 19 Jul 2006 08:13:25 +0000 (08:13 +0000)
admin/blocks.php
admin/filters.php
admin/report/courseoverview/index.php
admin/report/courseoverview/reportsgraph.php
admin/report/stats/mod.php
admin/stickyblocks.php
admin/utfdbmigrate.php
blocks/admin/block_admin.php
lib/pagelib.php
mod/hotpot/db/update_to_v2.php
my/pagelib.php

index 76f4c9f98b416b11195a2d10a1761603457ef5e4..0a4917b7ea888476f4fb09b1bb1374c57d7f24c7 100644 (file)
 
     $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');
         
         $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');
index d21ab6f032dd27a09cd506b4856d1ade46842b8c..8fde4e0c3d04e0a7d67fb2df991418813a44cd99 100644 (file)
     $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;');
index 2ecc794832ab790153a7972f861069548f3cdeb8..66c8d249cd680966a60fc8285d882197acb9961f 100644 (file)
@@ -23,7 +23,7 @@
     $strreports = get_string('reports');
     $strcourseoverview = get_string('courseoverview');
 
-    $strnav = '<a href="'.$CFG->wwwroot.'/admin/index.php">'.get_string('administration').'</a> -> <a href="'.$CFG->wwwroot.'/admin/report.php">'.$strreports.'</a> -> '.$strcourseoverview;
+    $strnav = '<a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/index.php">'.get_string('administration').'</a> -> <a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/report.php">'.$strreports.'</a> -> '.$strcourseoverview;
     
     $reportoptions = stats_get_report_options($course->id,STATS_MODE_RANKED);
 
         $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 '<center><img src="'.$CFG->wwwroot.'/admin/report/courseoverview/reportsgraph.php?time='.$time.'&report='.$report.'&numcourses='.$numcourses.'" /></center>';
+        echo '<center><img src="'.$CFG->wwwroot.'/'.$CFG->admin.'/report/courseoverview/reportsgraph.php?time='.$time.'&report='.$report.'&numcourses='.$numcourses.'" /></center>';
         
         $table = new object();
         $table->align = array('left','center','center','center');
index 165ee9ac8557e851f25fcf31c303dd0a3b7c7ae0..1b11bfc81c5ed5b4755ae0f4486ea2087c12f72b 100644 (file)
@@ -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');
     }
     
 
index 2b2ddbe4f79d534ddfda22fa3685bcc2dc713d97..bc3133fa87557f6bf9c190c4ffbd1ceb89d605f6 100644 (file)
@@ -6,7 +6,7 @@
     
     if (!empty($CFG->enablestats)) {
         echo '<p style="text-align:center;">';
-        echo '<a href="'.$CFG->wwwroot.'/admin/report/stats/index.php?course='.$course->id.'">'.get_string('stats').'</a>';
+        echo '<a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/report/stats/index.php?course='.$course->id.'">'.get_string('stats').'</a>';
         echo '</p>';
         $statsstatus = stats_check_uptodate($course->id);
         if ($statsstatus !== NULL) {
index a5fa1860b31a0352242781b2c3d7bac30d4a050b..72a19886269ebb03e5b4d827c5add21f0165bca8 100644 (file)
@@ -63,7 +63,7 @@
     echo '<td valign="top" width="*" id="middle-column">';
     print_simple_box_start('center');
     print_heading($strheading);
-    echo '<form method="post" action="'.$CFG->wwwroot.'/admin/stickyblocks.php">'
+    echo '<form method="post" action="'.$CFG->wwwroot.'/'.$CFG->admin.'/stickyblocks.php">'
         .'<p align="center">'.get_string('stickyblockspagetype','admin').': ';
     choose_from_menu($options,'pt',$pt,'choose','this.form.submit();');
     echo '</p></form>';
index 88bd4017281d76e7974a8805245500b0cebb7b31..757a9a0c0a955a02dfb09689a54c6d9c0963e1e6 100755 (executable)
@@ -1,4 +1,5 @@
 <?php //$Id$
+
 ///dummy field names are used to help adding and dropping indexes. There's only 1 case now, in scorm_scoes_track
 
     require_once('../config.php');
@@ -88,7 +89,7 @@
         print_heading('db unicode migration has been completed!');
         unlink($filename);    //no longer in maintenance mode
         @require_logout();
-        print_continue($CFG->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 '</b><br/><a href="'.$CFG->wwwroot.'/admin/langimport.php">Language Import Utility</a></div>';
+    echo '</b><br/><a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/langimport.php">Language Import Utility</a></div>';
     print_simple_box_end();
     delete_records('config','name','langsused');
 
index 35c7d5c0d53a482f9caffbe39762034cbcb508eb..f481c8b5a92216d565b6cca99263a4b6622a8796 100644 (file)
@@ -56,7 +56,7 @@ class block_admin extends block_list {
             $this->content->icons[] = '<img src="'.$CFG->pixpath.'/i/log.gif" alt="" />';
 
 
-            $this->content->items[] = '<a href="'.$CFG->wwwroot.'/admin/report.php">'.get_string('reports').'</a>';
+            $this->content->items[] = '<a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/report.php">'.get_string('reports').'</a>';
             $this->content->icons[] = '<img src="'.$CFG->pixpath.'/i/stats.gif" alt="" />';
 
             $this->content->items[] = '<a href="'.$CFG->wwwroot.'/files/index.php?id='.SITEID.'">'.get_string('sitefiles').'</a>';
index 3b2b45474b41a8815bca2369078ddb567b6077ad..818756d1d240269fb3b58296a85236ccde97afe7 100644 (file)
@@ -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';
index 0bdd9c824b54f5ad9851cebd85f8665afc5bc14d..5f27e3acc3dd880a270bd62a4603e712b2094ff0 100644 (file)
@@ -449,7 +449,7 @@ function hotpot_update_to_v2_from_hotpotatoes() {
                        set_field("modules", "visible", "0", "id", $module->id);
                        print '<p>All HotPotatoes activities have been imported to the HotPot module.<br />'."\n";
                        print 'The HotPotatoes module has been hidden and can safely be deleted from this Moodle site.<br />'."\n";
-                       print ' &nbsp; &nbsp; <a href="'.$CFG->wwwroot.'/admin/modules.php">Configuration -> Modules</A>, then click &quot;Delete&quot; for &quot;Hot Potatoes XML Quiz&quot;</p>'."\n";
+                       print ' &nbsp; &nbsp; <a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/modules.php">Configuration -> Modules</A>, then click &quot;Delete&quot; for &quot;Hot Potatoes XML Quiz&quot;</p>'."\n";
                }
        }
        if ($ok) {
index 4394df69eb19c6d74bcea2d7efc67b61f2dad800..2195da844c4447d7ca88858cf6b1b58ac4a33a58 100644 (file)
@@ -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';
         }
     }