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

Bugfix, but still needs more work

This commit is contained in:
CaMer0n
2010-10-10 22:08:57 +00:00
parent 6be3e0bf94
commit c6a0fad36e

View File

@@ -386,8 +386,8 @@ class media_admin_ui extends e_admin_ui
$fl = e107::getFile(); $fl = e107::getFile();
$mes = e107::getMessage(); $mes = e107::getMessage();
if(vartrue($_POST['file_userfile'])) if(vartrue($_FILES['file_userfile']))
{ {
$pref['upload_storagetype'] = "1"; $pref['upload_storagetype'] = "1";
require_once(e_HANDLER."upload_handler.php"); //TODO - still not a class! require_once(e_HANDLER."upload_handler.php"); //TODO - still not a class!
@@ -484,7 +484,7 @@ class media_admin_ui extends e_admin_ui
if(!vartrue($this->mimePaths[$pmime])) if(!vartrue($this->mimePaths[$pmime]))
{ {
$mes->add("Couldn't detected mime-type($type). Upload failed.", E_MESSAGE_ERROR); $mes->add("Couldn't detect mime-type($mime). Upload failed.", E_MESSAGE_ERROR);
return FALSE; return FALSE;
} }
@@ -594,7 +594,15 @@ class media_admin_ui extends e_admin_ui
foreach($_POST['batch_selected'] as $file) foreach($_POST['batch_selected'] as $file)
{ {
$oldpath = "temp/".$file; $oldpath = "temp/".$file;
$f = $fl->get_file_info(e_MEDIA.$oldpath); $f = $fl->get_file_info(e_MEDIA.$oldpath);
if(!$f['mime'])
{
$mes->add("Couldn't get file info from : ".$oldpath, E_MESSAGE_ERROR);
}
$newpath = $this->getPath($f['mime']).'/'.$file; $newpath = $this->getPath($f['mime']).'/'.$file;
$f['fname'] = $file; $f['fname'] = $file;