checking file exist on cover photos
This commit is contained in:
parent
37b01e4bbc
commit
2dcefb3959
1 changed files with 8 additions and 4 deletions
|
@ -2776,11 +2776,15 @@ class userquery extends CBCategory{
|
|||
$userId = userid();
|
||||
}
|
||||
$coverPath = COVERS_DIR . "/{$userId}";
|
||||
|
||||
if (file_exists($coverPath))
|
||||
{
|
||||
$files = scandir($coverPath);
|
||||
array_shift($files); array_shift($files);
|
||||
$coverPhoto = array_shift($files);
|
||||
return BASEURL . "/files/cover_photos/{$userId}/$coverPhoto";
|
||||
}
|
||||
}
|
||||
|
||||
public function getImageExt($imageName = false){
|
||||
if($imageName){
|
||||
|
|
Loading…
Add table
Reference in a new issue