1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-11 00:54:49 +02:00

Update routine to correct avatar paths.

This commit is contained in:
CaMer0n
2012-06-17 10:51:13 +00:00
parent e68c582e5b
commit df2d4f4c5b
2 changed files with 27 additions and 0 deletions

View File

@@ -1072,6 +1072,25 @@ function update_706_to_800($type='')
}
}
// Move Avatars to new location
$av1 = e107::getFile()->get_files(e_FILE.'public/avatars','.jpg|.gif|.png|.GIF|.jpeg|.JPG|.PNG');
$av2 = e107::getFile()->get_files(e_IMAGE.'avatars','.jpg|.gif|.png|.GIF|.jpeg|.JPG|.PNG');
$avatar_images = array_merge($av1,$av2);
if(count($avatar_images))
{
if ($just_check) return update_needed('Avatar paths require updating.');
foreach($avatar_images as $av)
{
@rename($av['path'].$av['fname'],e_MEDIA."avatars/".$av['fname']);
}
}
// -------------------------------
$med = e107::getMedia();
// Media Category Update