]> git.mjollnir.org Git - moodle.git/commitdiff
Some old backups can contain empties in user->picture, fix them before insert. Merged...
authorstronk7 <stronk7>
Tue, 5 Feb 2008 20:31:06 +0000 (20:31 +0000)
committerstronk7 <stronk7>
Tue, 5 Feb 2008 20:31:06 +0000 (20:31 +0000)
backup/restorelib.php

index 0c128bdd0e0dedf700938aa1132f047cf9fa172d..1ba2c3297ce7762762ace16b4a0ddfbb664ba981 100644 (file)
@@ -2381,7 +2381,8 @@ define('RESTORE_GROUPS_GROUPINGS', 3);
                     // relink the descriptions
                     $user->description = stripslashes($user->description);
 
-                    if (!empty($CFG->disableuserimages)) {
+                /// Disable pictures based on global setting or existing empty value (old backups can contain wrong empties)
+                    if (!empty($CFG->disableuserimages) || empty($user->picture)) {
                         $user->picture = 0;
                     }