From f82c2d428afd0a8a7ff5cc0486620818769f2f7d Mon Sep 17 00:00:00 2001 From: moodler Date: Wed, 12 Mar 2003 07:36:22 +0000 Subject: [PATCH] Modified Greg's work to: - rename the main_frame variable to framename, because it - might have caused some confusion - none of the global variables have underscores - put the config in the config table, with a default of _top --- admin/auth.php | 2 +- admin/config.html | 13 +++++++++++++ lang/en/moodle.php | 1 + lib/db/mysql.php | 1 + lib/defaults.php | 1 + lib/weblib.php | 8 ++++---- mod/journal/lib.php | 22 ++++++++++++++++------ mod/resource/view.php | 8 ++++---- mod/survey/report.php | 10 +++++----- theme/oceanblue/header.html_logo | 2 +- theme/poweraid/header.html | 4 ++-- version.php | 2 +- 12 files changed, 50 insertions(+), 24 deletions(-) diff --git a/admin/auth.php b/admin/auth.php index dd73e0ae1d..334c6ae587 100644 --- a/admin/auth.php +++ b/admin/auth.php @@ -91,7 +91,7 @@ "$stradministration -> $strauthenticationoptions", "$focus"); echo "

"; - echo "

main_frame}\" NAME=\"authmenu\" method=\"post\" action=\"auth.php\">"; + echo "framename}\" NAME=\"authmenu\" method=\"post\" action=\"auth.php\">"; print_string("chooseauthmethod","auth"); choose_from_menu ($options, "auth", $auth, "","top.location='auth.php?auth='+document.authmenu.auth.options[document.authmenu.auth.selectedIndex].value", ""); diff --git a/admin/config.html b/admin/config.html index e4fea33852..4f65567774 100644 --- a/admin/config.html +++ b/admin/config.html @@ -218,6 +218,19 @@ + +

framename: + + framename)) { + $config->framename = "_top"; + } + ?> + + + + + + diff --git a/lang/en/moodle.php b/lang/en/moodle.php index 4b3540ebab..6d3526d654 100644 --- a/lang/en/moodle.php +++ b/lang/en/moodle.php @@ -66,6 +66,7 @@ $string['configlang'] = "Choose a default language for the whole site. Users ca $string['configlangdir'] = "Most languages are printed left-to-right, but some, like Arabic and Hebrew, are printed right-to-left."; $string['configlocale'] = "Choose a sitewide locale - this will affect the format and language of dates. You need to have this locale data installed on your operating system. (eg en_US or es_ES). If you don't know what to choose leave it blank."; $string['configlongtimenosee'] = "If students haven't logged in for a very long time, then they are automatically unsubscribed from courses. This parameter specifies that time limit."; +$string['configframename'] = "If you are embedding Moodle within a web frame, then put the name of this frame here. Otherwise this value should remain as '_top'"; $string['configmaxeditingtime'] = "This specifies the amount of time people have to re-edit forum postings, journal feedback etc. Usually 30 minutes is a good value."; $string['configproxyhost'] = "If this server needs to use a proxy computer (eg a firewall) to access the Internet, then provide the proxy hostname and port here. Otherwise leave it blank."; $string['configsessiontimeout'] = "If people logged in to this site are idle for a long time (without loading pages) then they are automatically logged out (their session is ended). This variable specifies how long this time should be."; diff --git a/lib/db/mysql.php b/lib/db/mysql.php index dd10ad0e16..a41aeeaf6b 100644 --- a/lib/db/mysql.php +++ b/lib/db/mysql.php @@ -88,6 +88,7 @@ function main_upgrade($oldversion=0) { } if ($oldversion < 2002102503) { + execute_sql(" ALTER TABLE `course` ADD `modinfo` TEXT NOT NULL AFTER `format` "); require_once("$CFG->dirroot/mod/forum/lib.php"); require_once("$CFG->dirroot/course/lib.php"); diff --git a/lib/defaults.php b/lib/defaults.php index 40be0aa1b6..7dee176a10 100644 --- a/lib/defaults.php +++ b/lib/defaults.php @@ -26,6 +26,7 @@ "prefix" => "", "guestloginbutton" => 1, "sessiontimeout" => 7200, + "framename" => "_top", "debug" => 7 ); diff --git a/lib/weblib.php b/lib/weblib.php index 5362387a80..c193533f07 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -319,7 +319,7 @@ function popup_form ($common, $options, $formname, $selected="", $nothing="choos $nothing = get_string("choose")."..."; } - $output = "main_frame}\" NAME=$formname>"; + $output = "framename}\" NAME=$formname>"; $output .= "