From 06870aa32430d43d3106adf008757444c4be9573 Mon Sep 17 00:00:00 2001
From: fiedorow <fiedorow>
Date: Fri, 31 Dec 2004 16:12:58 +0000
Subject: [PATCH] fixing a couple of instances of hardcoded /admin/

---
 admin/lang.php           |  6 +++---
 mod/glossary/formats.php | 10 +++++-----
 theme/index.php          |  4 ++--
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/admin/lang.php b/admin/lang.php
index d062af6f7e..1a61e9eddb 100644
--- a/admin/lang.php
+++ b/admin/lang.php
@@ -27,7 +27,7 @@
         case "missing":
             $navigation = "<a href=\"lang.php\">$strlanguage</a> -> $strmissingstrings";
             $title = $strmissingstrings;
-            $button = '<form target="'.$CFG->framename.'" method="get" action="'.$CFG->wwwroot.'/admin/lang.php">'.
+            $button = '<form target="'.$CFG->framename.'" method="get" action="'.$CFG->wwwroot.'/'.$CFG->admin.'/lang.php">'.
                       '<input type="hidden" name="mode" value="compare" />'.
                       '<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />'.
                       '<input type="submit" value="'.$strcomparelanguage.'" /></form>';
@@ -35,7 +35,7 @@
         case "compare":
             $navigation = "<a href=\"lang.php\">$strlanguage</a> -> $strcomparelanguage";
             $title = $strcomparelanguage;
-            $button = '<form target="'.$CFG->framename.'" method="get" action="'.$CFG->wwwroot.'/admin/lang.php">'.
+            $button = '<form target="'.$CFG->framename.'" method="get" action="'.$CFG->wwwroot.'/'.$CFG->admin.'/lang.php">'.
                       '<input type="hidden" name="mode" value="missing" />'.
                       '<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />'.
                       '<input type="submit" value="'.$strmissingstrings.'" /></form>';
@@ -60,7 +60,7 @@
         echo "<table align=\"center\"><tr><td align=\"right\">";
         echo "<b>$strcurrentlanguage:</b>";
         echo "</td><td>";
-        echo popup_form ("$CFG->wwwroot/admin/lang.php?lang=", $langs, "chooselang", $currlang, "", "", "", true);
+        echo popup_form ("$CFG->wwwroot/$CFG->admin/lang.php?lang=", $langs, "chooselang", $currlang, "", "", "", true);
         echo "</td></tr></table>";
         print_heading("<a href=\"lang.php?mode=missing&sesskey=$USER->sesskey\">$strmissingstrings</a>");
         print_heading("<a href=\"lang.php?mode=compare&sesskey=$USER->sesskey\">$strcomparelanguage</a>");
diff --git a/mod/glossary/formats.php b/mod/glossary/formats.php
index c218603653..cc8a7c1ffb 100644
--- a/mod/glossary/formats.php
+++ b/mod/glossary/formats.php
@@ -31,7 +31,7 @@
             }
             update_record("glossary_formats",$displayformat);
         }
-        redirect("../../admin/module.php?sesskey=$USER->sesskey&module=glossary#formats");
+        redirect("../../$CFG->admin/module.php?sesskey=$USER->sesskey&module=glossary#formats");
         die;
     } elseif ( $mode == 'edit' and $form) {
         
@@ -43,7 +43,7 @@
         $displayformat->sortorder   = $form->sortorder;
         
         update_record("glossary_formats",$displayformat);
-        redirect("../../admin/module.php?sesskey=$USER->sesskey&module=glossary#formats");
+        redirect("../../$CFG->admin/module.php?sesskey=$USER->sesskey&module=glossary#formats");
         die;
     }
     
@@ -54,9 +54,9 @@
     $strdisplayformats = get_string("displayformats","glossary");
 
     print_header("$strmodulename: $strconfiguration", $site->fullname,
-                  "<a href=\"../../admin/index.php\">$stradmin</a> -> ".
-                  "<a href=\"../../admin/configure.php\">$strconfiguration</a> -> ".
-                  "<a href=\"../../admin/modules.php\">$strmanagemodules</a> -> <a href=\"../../admin/module.php?module=glossary&sesskey=$USER->sesskey\">$strmodulename</a> -> $strdisplayformats");
+                  "<a href=\"../../$CFG->admin/index.php\">$stradmin</a> -> ".
+                  "<a href=\"../../$CFG->admin/configure.php\">$strconfiguration</a> -> ".
+                  "<a href=\"../../$CFG->admin/modules.php\">$strmanagemodules</a> -> <a href=\"../../$CFG->admin/module.php?module=glossary&sesskey=$USER->sesskey\">$strmodulename</a> -> $strdisplayformats");
 
     print_heading($strmodulename . ': ' . get_string("displayformats","glossary"));
 
diff --git a/theme/index.php b/theme/index.php
index e8c8caccbd..03fd1b6014 100644
--- a/theme/index.php
+++ b/theme/index.php
@@ -39,8 +39,8 @@
     $strthemesaved = get_string("themesaved");
 
     print_header("$site->shortname: $strthemes", $site->fullname, 
-                 "<a href=\"$CFG->wwwroot/admin/index.php\">$stradministration</a> -> ".
-                 "<a href=\"$CFG->wwwroot/admin/configure.php\">$strconfiguration</a> -> $strthemes");
+                 "<a href=\"$CFG->wwwroot/$CFG->admin/index.php\">$stradministration</a> -> ".
+                 "<a href=\"$CFG->wwwroot/$CFG->admin/configure.php\">$strconfiguration</a> -> $strthemes");
 
     if ($choose and confirm_sesskey()) {
         if (set_config("theme", $choose)) {
-- 
2.39.5