1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 03:40:37 +02:00

SubmitNews code cleanup. Admin can now set minimum dimensions for attached images.

This commit is contained in:
Cameron
2016-03-16 19:54:10 -07:00
parent 1202c72390
commit 7846015f85
4 changed files with 354 additions and 213 deletions

View File

@@ -191,6 +191,7 @@ function process_uploaded_files($uploaddir, $fileinfo = FALSE, $options = NULL)
$c = 0;
$tp = e107::getParser();
$uploadfile = null;
foreach ($files['name'] as $key=>$name)
{
@@ -299,6 +300,8 @@ function process_uploaded_files($uploaddir, $fileinfo = FALSE, $options = NULL)
if (!$first_error) // All tests passed - can store it somewhere
{
$uploaded[$c] = e107::getFile()->get_file_info($uploadfile,true);
$uploaded[$c]['name'] = $name;
$uploaded[$c]['rawname'] = $raw_name;
$uploaded[$c]['origname'] = $origname;
@@ -306,6 +309,8 @@ function process_uploaded_files($uploaddir, $fileinfo = FALSE, $options = NULL)
$uploaded[$c]['size'] = 0;
$uploaded[$c]['index'] = $key; // Store the actual index from the file_userfile array
// e107::getMessage()->addDebug(print_a($uploaded[$c],true));
// Store as flat file
if ((!$ul_temp_dir && @move_uploaded_file($uploadfile, $destination_file)) || ($ul_temp_dir && @rename($uploadfile, $destination_file))) // This should work on all hosts
{