Fixed warning on admin/bm.php

More related util.class issues
master
pecesama 2008-11-09 07:22:36 +00:00
parent 8330c4613b
commit 2e6b24f3a5
1 changed files with 3 additions and 7 deletions

View File

@ -24,17 +24,13 @@ if ($user->isAdmin()) {
if ($_POST["type"]=="2") { // is Photo type if ($_POST["type"]=="2") { // is Photo type
if (isset($_POST["url"]) && $_POST["url"]!="") { if (isset($_POST["url"]) && $_POST["url"]!="") {
$photoName = getFileName($_POST["url"]); $photoName = util::getFileName($_POST["url"]);
if (!$tumble->savePhoto($_POST["url"])) { if (!$tumble->savePhoto($_POST["url"])) {
header("Location: ".$conf->urlGelato."/admin/index.php?photo=false"); header("Location: ".$conf->urlGelato."/admin/index.php?photo=false");
die(); die();
} }
$_POST["url"] = "../uploads/".util::sanitizeName($photoName); $_POST["url"] = "../uploads/".util::sanitizeName($photoName);
} }
if ( move_uploaded_file( $_FILES['photo']['tmp_name'], "../uploads/".sanitizeName($_FILES['photo']['name']) ) ) {
$_POST["url"] = "../uploads/".util::sanitizeName($_FILES['photo']['name']);
}
unset($_POST["photo"]); unset($_POST["photo"]);
unset($_POST["MAX_FILE_SIZE"]); unset($_POST["MAX_FILE_SIZE"]);
@ -42,7 +38,7 @@ if ($user->isAdmin()) {
if ($_POST["type"]=="7") { // is MP3 type if ($_POST["type"]=="7") { // is MP3 type
set_time_limit(300); set_time_limit(300);
$mp3Name = getFileName($_POST["url"]); $mp3Name = util::getFileName($_POST["url"]);
if (!$tumble->saveMP3($_POST["url"])) { if (!$tumble->saveMP3($_POST["url"])) {
header("Location: ".$conf->urlGelato."/admin/index.php?mp3=false"); header("Location: ".$conf->urlGelato."/admin/index.php?mp3=false");
die(); die();