From: stronk7 Date: Tue, 5 Feb 2008 20:31:06 +0000 (+0000) Subject: Some old backups can contain empties in user->picture, fix them before insert. Merged... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=b3238b35196957446f91ea161292861995f54b52;p=moodle.git Some old backups can contain empties in user->picture, fix them before insert. Merged from 19_STABLE --- diff --git a/backup/restorelib.php b/backup/restorelib.php index 0c128bdd0e..1ba2c3297c 100644 --- a/backup/restorelib.php +++ b/backup/restorelib.php @@ -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; }