mirror of
https://github.com/e107inc/e107.git
synced 2025-08-06 14:46:56 +02:00
Quick path fix.
This commit is contained in:
@@ -280,7 +280,7 @@ class media_admin_ui extends e_admin_ui
|
|||||||
'media_author' => array('title'=> LAN_USER, 'type' => 'user', 'data'=> 'int', 'width' => 'auto', 'thclass' => 'center', 'class'=>'center','readParms' => 'link=1', 'filter' => true, 'batch' => true, 'noedit'=>TRUE ),
|
'media_author' => array('title'=> LAN_USER, 'type' => 'user', 'data'=> 'int', 'width' => 'auto', 'thclass' => 'center', 'class'=>'center','readParms' => 'link=1', 'filter' => true, 'batch' => true, 'noedit'=>TRUE ),
|
||||||
'media_datestamp' => array('title'=> LAN_DATESTAMP, 'type' => 'datestamp', 'data'=> 'int', 'width' => '10%', 'noedit'=>TRUE), // User date
|
'media_datestamp' => array('title'=> LAN_DATESTAMP, 'type' => 'datestamp', 'data'=> 'int', 'width' => '10%', 'noedit'=>TRUE), // User date
|
||||||
'media_size' => array('title'=> "Size", 'type' => 'number', 'data'=> 'int', 'width' => 'auto', 'noedit'=>TRUE),
|
'media_size' => array('title'=> "Size", 'type' => 'number', 'data'=> 'int', 'width' => 'auto', 'noedit'=>TRUE),
|
||||||
'media_dimensions' => array('title'=> "Dimensions", 'type' => 'text', 'data'=> 'str', 'width' => '5%', 'readonly'=>TRUE, 'class'=>'nowrap'),
|
'media_dimensions' => array('title'=> "Dimensions", 'type' => 'text', 'data'=> 'str', 'width' => '5%', 'readonly'=>TRUE, 'class'=>'nowrap','noedit'=>TRUE),
|
||||||
'media_userclass' => array('title'=> LAN_USERCLASS, 'type' => 'userclass', 'data'=> 'str', 'width' => '10%', 'thclass' => 'center','filter'=>TRUE,'batch'=>TRUE ),
|
'media_userclass' => array('title'=> LAN_USERCLASS, 'type' => 'userclass', 'data'=> 'str', 'width' => '10%', 'thclass' => 'center','filter'=>TRUE,'batch'=>TRUE ),
|
||||||
'media_tags' => array('title'=> "Tags/Keywords", 'type' => 'text', 'data'=> 'str', 'width' => '10%', 'filter'=>TRUE,'batch'=>TRUE ),
|
'media_tags' => array('title'=> "Tags/Keywords", 'type' => 'text', 'data'=> 'str', 'width' => '10%', 'filter'=>TRUE,'batch'=>TRUE ),
|
||||||
'media_usedby' => array('title'=> '', 'type' => 'text', 'data'=> 'text', 'width' => 'auto', 'thclass' => 'center', 'class'=>'center', 'nolist'=>true, 'readonly'=>TRUE ),
|
'media_usedby' => array('title'=> '', 'type' => 'text', 'data'=> 'text', 'width' => 'auto', 'thclass' => 'center', 'class'=>'center', 'nolist'=>true, 'readonly'=>TRUE ),
|
||||||
@@ -432,12 +432,12 @@ class media_admin_ui extends e_admin_ui
|
|||||||
|
|
||||||
if(vartrue($_FILES['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!
|
||||||
$uploaded = process_uploaded_files(e_MEDIA.'temp/'); //FIXME doesn't handle xxx.JPG (uppercase)
|
$uploaded = process_uploaded_files(e_MEDIA.'temp/'); //FIXME doesn't handle xxx.JPG (uppercase)
|
||||||
$upload = array_shift($uploaded);
|
$upload = array_shift($uploaded);
|
||||||
if(vartrue($upload['error']))
|
if(vartrue($upload['error']))
|
||||||
{
|
|
||||||
{
|
{
|
||||||
$mes->add($upload['message'], E_MESSAGE_ERROR);
|
$mes->add($upload['message'], E_MESSAGE_ERROR);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@@ -472,12 +472,14 @@ class media_admin_ui extends e_admin_ui
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
};
|
};
|
||||||
|
|
||||||
$img_data = $this->mediaData('{e_MEDIA}'.$newpath);
|
$img_data = $this->mediaData($newpath);
|
||||||
if(!varset($new_data['media_name']))
|
if(!varset($new_data['media_name']))
|
||||||
{
|
{
|
||||||
$img_data['media_name'] = $upload['name'];
|
$img_data['media_name'] = $upload['name'];
|
||||||
}
|
}
|
||||||
}
|
$mes->addDebug(print_a($img_data,TRUE));
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -487,6 +489,8 @@ class media_admin_ui extends e_admin_ui
|
|||||||
|
|
||||||
if(!($typePath = $this->getPath($img_data['media_type'])))
|
if(!($typePath = $this->getPath($img_data['media_type'])))
|
||||||
{
|
{
|
||||||
|
$mes->addError("Couldn't get path ".$typePath);
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user