]> git.mjollnir.org Git - moodle.git/commitdiff
FIxed bug with forced languages by moving string definitions
authormoodler <moodler>
Fri, 20 Feb 2004 02:29:30 +0000 (02:29 +0000)
committermoodler <moodler>
Fri, 20 Feb 2004 02:29:30 +0000 (02:29 +0000)
mod/forum/view.php

index 82a3fd12a4dc709320ba1d2e65e0a0839b9a3fa3..605feb77e98157bbed94b2eb58363fbd2ba2f493 100644 (file)
@@ -10,9 +10,6 @@
     optional_variable($showall, "");   // show all discussions on one page
     optional_variable($group, -1);     // choose the current group
 
-    $strforums = get_string("modulenameplural", "forum");
-    $strforum = get_string("modulename", "forum");
-
     if ($id) {
         if (! $cm = get_record("course_modules", "id", $id)) {
             error("Course Module ID was incorrect");
         if (! $forum = get_record("forum", "id", $cm->instance)) {
             error("Forum ID was incorrect");
         }
+
+        $strforums = get_string("modulenameplural", "forum");
+        $strforum = get_string("modulename", "forum");
+
         $buttontext = update_module_button($cm->id, $course->id, $strforum);
 
     } else if ($f) {
         if (! $course = get_record("course", "id", $forum->course)) {
             error("Forum is misconfigured - don't know what course it's from");
         }
+
+        $strforums = get_string("modulenameplural", "forum");
+        $strforum = get_string("modulename", "forum");
+
         if ($cm = get_coursemodule_from_instance("forum", $forum->id, $course->id)) {
             $buttontext = update_module_button($cm->id, $course->id, $strforum);
         } else {