Little tweak to fix a caching problem.

User images were not being cached properly because Moodle was
sending a session cookie.  I've turned this off now for user images.
This commit is contained in:
moodler
2003-08-12 07:02:34 +00:00
parent 3bd5733800
commit 16e4918d43
2 changed files with 14 additions and 10 deletions
+12 -10
View File
@@ -162,17 +162,19 @@
class object {};
session_name('MoodleSession');
@session_start();
if (! isset($_SESSION['SESSION'])) {
$_SESSION['SESSION'] = new object;
if (!isset($nomoodlecookie)) {
session_name('MoodleSession');
@session_start();
if (! isset($_SESSION['SESSION'])) {
$_SESSION['SESSION'] = new object;
}
if (! isset($_SESSION['USER'])) {
$_SESSION['USER'] = new object;
}
$SESSION = &$_SESSION['SESSION']; // Makes them easier to reference
$USER = &$_SESSION['USER'];
}
if (! isset($_SESSION['USER'])) {
$_SESSION['USER'] = new object;
}
$SESSION = &$_SESSION['SESSION']; // Makes them easier to reference
$USER = &$_SESSION['USER'];
if (isset($FULLME)) {
$ME = $FULLME;
+2
View File
@@ -3,6 +3,8 @@
// Syntax: pix.php/userid/f1.jpg or pix.php/userid/f2.jpg
// OR: ?file=userid/f1.jpg or ?file=userid/f2.jpg
$nomoodlecookie = true; // Because it interferes with caching
require_once("../config.php");
$lifetime = 86400;