MDL-27676 Requests for a users profile pic that doesnt exist now redirect to the requested f1/f2 rather than just f1

This commit is contained in:
Sam Hemelryk 2011-06-02 10:24:20 +08:00
parent a56c68e3f4
commit 82ee5a1f41

View File

@ -305,7 +305,7 @@ if ($component === 'blog') {
}
if (!$file = $fs->get_file($context->id, 'user', 'icon', 0, '/', $filename.'/.png')) {
if (!$file = $fs->get_file($context->id, 'user', 'icon', 0, '/', $filename.'/.jpg')) {
redirect($OUTPUT->pix_url('u/f1'));
redirect($OUTPUT->pix_url('u/'.$filename));
}
}