]> git.mjollnir.org Git - moodle.git/commitdiff
A new Moodle variable called sessioncookie is now added to the session
authormoodler <moodler>
Thu, 16 Oct 2003 13:19:10 +0000 (13:19 +0000)
committermoodler <moodler>
Thu, 16 Oct 2003 13:19:10 +0000 (13:19 +0000)
cookie name.  This provides a means for multiple Moodles within the
same website to keep separate sessions and not get confused.

admin/config.html
lang/en/moodle.php
lib/defaults.php
lib/setup.php

index 162151a7b9ec74a1a35595a9757621e9fc5b6ab9..4eff2652e79ce0020d7f32f1b064f2e474019d42 100644 (file)
     <?php print_string("configsessiontimeout") ?>
     </td>
 </tr>
+<tr valign=top>
+       <td align=right><p>sessioncookie:</td>
+       <td>
+    <input name=sessioncookie type=text size=10 value="<?php p($config->sessioncookie)?>">
+    </td>
+    <td>
+    <?php print_string("configsessioncookie") ?>
+    </td>
+</tr>
 <tr valign=top>
        <td align=right><p>zip:</td>
        <td>
index 71002d6dbe502e7397e65163d8404f893919c353..f9ab072fcd416c60fc48fab05bf6fb27cc0f9962 100644 (file)
@@ -129,6 +129,7 @@ $string['configmaxbytes'] = "This specifies a maximum size that uploaded files c
 $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 <B>server</B> 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['configsecureforms'] = "Moodle can use an additional level of security when accepting data from web forms. If this is enabled, then the browser's HTTP_REFERER variable is checked against the current form address.  In a very few cases this can cause problems if the user is using a firewall (eg Zonealarm) configured to strip HTTP_REFERER from their web traffic.  Symptoms are getting 'stuck' on a form. If your users are having problems with the login page (for example) you might want to disable this setting, although it might leave your site more open to brute-force password attacks.  If in doubt, leave this set to 'Yes'.";
+$string['configsessioncookie'] = "This setting customises the name of the cookie used for Moodle sessions.  This is optional, and only useful to avoid cookies being confused when there is more than one copy of Moodle running within the same web site.";
 $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.";
 $string['configslasharguments'] = "Files (images, uploads etc) are provided via a script using 'slash arguments' (the second option here). This method allows files to be more easily cached in web browsers, proxy servers etc.  Unfortunately, some PHP servers don't allow this method, so if you have trouble viewing uploaded files or images (eg user pictures), set this variable to the first option";
 $string['configsmtphosts'] = "Give the full name of one or more local SMTP servers that Moodle should use to send mail (eg 'mail.a.com' or 'mail.a.com;mail.b.com'). If you leave it blank, Moodle will use the PHP default method of sending mail.";
index 3a892a902784416ec84c4be9e28a89a86d937c5e..c17a49b6851b160cf4420f8a3ef747a11e78baa6 100644 (file)
@@ -26,6 +26,7 @@
        "proxyhost"        => "",
        "proxyport"        => "",
        "secureforms"      =>  false,
+       "sessioncookie"    => "",
        "sessiontimeout"   =>  7200,
        "slasharguments"   =>  1,
        "smtphosts"        => "",
index 35106df9c798363297ac953059f1765fa87fcffd..1422136504a134a829d8d74a3bdfac36ad7c31ee 100644 (file)
     class object {};
     
     if (!isset($nomoodlecookie)) {
-        session_name('MoodleSession');
+        session_name('MoodleSession'.$CFG->sessioncookie);
         @session_start();
         if (! isset($_SESSION['SESSION'])) { 
             $_SESSION['SESSION'] = new object;