]> git.mjollnir.org Git - moodle.git/commitdiff
Works with slasharguments off now
authormoodler <moodler>
Mon, 17 Jan 2005 15:21:00 +0000 (15:21 +0000)
committermoodler <moodler>
Mon, 17 Jan 2005 15:21:00 +0000 (15:21 +0000)
userpix/index.php

index 90762aa7daba80bf0e8ac9e0881c6e9e49f61e12..a744cfb56747924551f6f6adf81e45139ccb89cd 100644 (file)
     print_header($title, $title, $title);
     
     foreach ($users as $user) {
-       echo "<a href=\"$CFG->wwwroot/user/view.php?id=$user->id&amp;course=1\"".
-            "title=\"".fullname($user)."\">";
-       echo "<img border=0 src=\"$CFG->wwwroot/user/pix.php/$user->id/f1.jpg\" ".
-            "width=100 height=100 alt=\"".fullname($user)."\" />";
-       echo "</a> \n";
+        $fullname = fullname($user);
+        echo "<a href=\"$CFG->wwwroot/user/view.php?id=$user->id&amp;course=1\"".
+             "title=\"$fullname\">";
+        if ($CFG->slasharguments) {        // Use this method if possible for better caching
+            echo '<img src="'. $CFG->wwwroot .'/user/pix.php/'.$user->id.'/f1.jpg"'.
+                 ' border="0" width="100" height="100" alt="'.$fullname.'" />';
+        } else {
+            echo '<img src="'. $CFG->wwwroot .'/user/pix.php?file=/'. $user->id .'/f1.jpg"'.
+                 ' border="0" width="100" height="100" alt="'.$fullname.'" />';
+        }
+        echo "</a> \n";
     }
     
     print_footer();