1
0
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:
Cameron
2015-09-01 15:53:48 -07:00
parent 2bd75d426b
commit de4932d6da
2 changed files with 7 additions and 1 deletions

View File

@@ -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");

View 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();
} }