1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-03 13:17:24 +02:00

Avatar path corrections.

This commit is contained in:
Cameron
2013-04-19 22:50:41 -07:00
parent 42c47b7742
commit 1500effbd7
13 changed files with 78 additions and 86 deletions

View File

@@ -1151,7 +1151,7 @@ function update_706_to_800($type='')
$root_media = str_replace(basename(e_MEDIA)."/","",e_MEDIA);
$user_media_dirs = array("images","avatars", "avatars/default", "avatars/uploaded", "files","temp","videos","icons");
$user_media_dirs = array("images","avatars", "avatars/default", "avatars/upload", "files","temp","videos","icons");
// check for old paths and rename.
if(is_dir($root_media."images") || is_dir($root_media."temp"))
@@ -1185,9 +1185,9 @@ function update_706_to_800($type='')
if ($just_check) return update_needed('Avatar paths require updating.');
foreach($avatar_images as $av)
{
$apath = (strstr($av['path'],'public/')) ? 'uploaded/' : 'default/';
$apath = (strstr($av['path'],'public/')) ? e_AVATAR_UPLOAD : e_AVATAR_DEFAULT;
@rename($av['path'].$av['fname'],e_MEDIA."avatars/".$apath. $av['fname']);
@rename($av['path'].$av['fname'], $apath. $av['fname']);
}
}