Bladeren bron

Fixed warning on admin/bm.php

pecesama 16 jaren geleden
bovenliggende
commit
2e6b24f3a5
1 gewijzigde bestanden met toevoegingen van 3 en 7 verwijderingen
  1. 3 7
      admin/bm.php

+ 3 - 7
admin/bm.php Bestand weergeven

@@ -24,17 +24,13 @@ if ($user->isAdmin()) {
24 24
 
25 25
 		if ($_POST["type"]=="2") { // is Photo type
26 26
 			if (isset($_POST["url"]) && $_POST["url"]!="")  {
27
-				$photoName = getFileName($_POST["url"]);
27
+				$photoName = util::getFileName($_POST["url"]);
28 28
 				if (!$tumble->savePhoto($_POST["url"])) {
29 29
 					header("Location: ".$conf->urlGelato."/admin/index.php?photo=false");
30 30
 					die();
31 31
 				}
32 32
 				$_POST["url"] = "../uploads/".util::sanitizeName($photoName);
33
-			}
34
-
35
-			if ( move_uploaded_file( $_FILES['photo']['tmp_name'], "../uploads/".sanitizeName($_FILES['photo']['name']) ) ) {
36
-				$_POST["url"] = "../uploads/".util::sanitizeName($_FILES['photo']['name']);
37
-			}
33
+			} 
38 34
 
39 35
 			unset($_POST["photo"]);
40 36
 			unset($_POST["MAX_FILE_SIZE"]);
@@ -42,7 +38,7 @@ if ($user->isAdmin()) {
42 38
 
43 39
 		if ($_POST["type"]=="7") { // is MP3 type
44 40
 			set_time_limit(300);
45
-			$mp3Name = getFileName($_POST["url"]);
41
+			$mp3Name = util::getFileName($_POST["url"]);
46 42
 			if (!$tumble->saveMP3($_POST["url"])) {
47 43
 				header("Location: ".$conf->urlGelato."/admin/index.php?mp3=false");
48 44
 				die();