mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 03:40:37 +02:00
Newspost - inline editing was resetting datestamp. Imported media via URL now strips queries from filename.
This commit is contained in:
@@ -1585,6 +1585,12 @@ class media_admin_ui extends e_admin_ui
|
|||||||
if(vartrue($_POST['upload_remote_url']))
|
if(vartrue($_POST['upload_remote_url']))
|
||||||
{
|
{
|
||||||
$fileName = basename($_POST['upload_url']);
|
$fileName = basename($_POST['upload_url']);
|
||||||
|
|
||||||
|
if(strpos($fileName,'?')!==false)
|
||||||
|
{
|
||||||
|
list($fileName,$bla) = explode("?", $fileName);
|
||||||
|
}
|
||||||
|
|
||||||
if(!$fl->getRemoteFile($_POST['upload_url'], $fileName, 'import'))
|
if(!$fl->getRemoteFile($_POST['upload_url'], $fileName, 'import'))
|
||||||
{
|
{
|
||||||
$mes->addError("There was a problem grabbing the file");
|
$mes->addError("There was a problem grabbing the file");
|
||||||
|
@@ -470,7 +470,7 @@ class news_admin_ui extends e_admin_ui
|
|||||||
$new_data['news_thumbnail'] = $this->processThumbs($new_data['news_thumbnail']);
|
$new_data['news_thumbnail'] = $this->processThumbs($new_data['news_thumbnail']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(empty($new_data['news_datestamp']))
|
if(isset($new_data['news_datestamp']) && empty($new_data['news_datestamp']))
|
||||||
{
|
{
|
||||||
$new_data['news_datestamp'] = time();
|
$new_data['news_datestamp'] = time();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user