mirror of
https://github.com/e107inc/e107.git
synced 2025-08-04 13:47:31 +02:00
Fixes Media-Manager remote image import.
This commit is contained in:
@@ -2408,7 +2408,7 @@ class media_admin_ui extends e_admin_ui
|
|||||||
$fileName = empty($uploadCaption) ? str_replace(array(".php",".html",".asp",".htm"),'',$fileName)."_".time() : eHelper::dasherize(strtolower($uploadCaption));
|
$fileName = empty($uploadCaption) ? str_replace(array(".php",".html",".asp",".htm"),'',$fileName)."_".time() : eHelper::dasherize(strtolower($uploadCaption));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$fl->getRemoteFile($tp->filter($_POST['upload_url'], 'file'), $fileName, 'import'))
|
if(!$fl->getRemoteFile($tp->filter($_POST['upload_url'], 'url'), $fileName, 'import'))
|
||||||
{
|
{
|
||||||
$mes->addError(IMALAN_176);
|
$mes->addError(IMALAN_176);
|
||||||
}
|
}
|
||||||
|
@@ -1270,6 +1270,7 @@ while($row = $sql->fetch())
|
|||||||
*/
|
*/
|
||||||
public function testFilter()
|
public function testFilter()
|
||||||
{
|
{
|
||||||
|
$url = 'http://www.domain.com/folder/folder2//1234_1_0.jpg';
|
||||||
|
|
||||||
$tests = array(
|
$tests = array(
|
||||||
0 => array('input' => 'test123 xxx', 'mode' => 'w', 'expected' => 'test123xxx'),
|
0 => array('input' => 'test123 xxx', 'mode' => 'w', 'expected' => 'test123xxx'),
|
||||||
@@ -1278,6 +1279,7 @@ while($row = $sql->fetch())
|
|||||||
3 => array('input' => 'test123 xxx', 'mode' => 'wds', 'expected' => 'test123 xxx'),
|
3 => array('input' => 'test123 xxx', 'mode' => 'wds', 'expected' => 'test123 xxx'),
|
||||||
4 => array('input' => 'test123 xxx.jpg', 'mode' => 'file', 'expected' => 'test123-xxx.jpg'),
|
4 => array('input' => 'test123 xxx.jpg', 'mode' => 'file', 'expected' => 'test123-xxx.jpg'),
|
||||||
5 => array('input' => '2.1.4 (test)', 'mode' => 'version', 'expected' => '2.1.4'),
|
5 => array('input' => '2.1.4 (test)', 'mode' => 'version', 'expected' => '2.1.4'),
|
||||||
|
6 => array('input' => $url, 'mode'=>'url', 'expected' => $url),
|
||||||
);
|
);
|
||||||
|
|
||||||
foreach($tests as $var)
|
foreach($tests as $var)
|
||||||
|
Reference in New Issue
Block a user