Skip to content

Commit 47f9ce4

Browse files
committed
Fixed bug preventing deletion of custom background image
#495
1 parent 584c09f commit 47f9ce4

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

app/Http/Controllers/UserController.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -776,17 +776,6 @@ public function themeBackground(request $request)
776776
public function removeBackground()
777777
{
778778

779-
function findBackground($name){
780-
$directory = base_path('assets/img/background-img/');
781-
$files = scandir($directory);
782-
$pathinfo = "error.error";
783-
foreach($files as $file) {
784-
if (strpos($file, $name.'.') !== false) {
785-
$pathinfo = $name. "." . pathinfo($file, PATHINFO_EXTENSION);
786-
}}
787-
return $pathinfo;
788-
}
789-
790779
$user_id = Auth::user()->id;
791780
$path = findBackground($user_id);
792781
$path = base_path('assets/img/background-img/'.$path);

0 commit comments

Comments
 (0)