1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-02 20:57:26 +02:00
Made category editable (dropdown)
Made screenshot not required on public upload
This commit is contained in:
Achim Ennenbach
2018-06-01 19:00:17 +02:00
parent 3a228c0181
commit 8d41cd6956
2 changed files with 7 additions and 10 deletions

View File

@@ -205,16 +205,13 @@ class upload_ui extends e_admin_ui
$new_data['upload_active'] = 0; $new_data['upload_active'] = 0;
return $new_data; return $new_data;
} }
// Make sure the upload_category contains only integers // Make sure the upload_category contains only integers
if (substr($new_data['upload_category'], 0, 10) == 'download__') // Make sure the owner correspondents to the category id
{ list($catOwner, $catID) = explode("__", $new_data['upload_category'], 2);
$new_data['upload_category'] = intval(substr($new_data['upload_category'], 10)); $new_data['upload_category'] = intval($catID);
} $new_data['upload_owner'] = $catOwner;
// Make sure the owner is not empty
if (trim($new_data['upload_owner']) == '')
{
$new_data['upload_owner'] = 'download';
}
return $new_data; return $new_data;
} }

View File

@@ -107,7 +107,7 @@ class userUpload
$catID = null; $catID = null;
$catOwner = null; $catOwner = null;
$file = null; $file = null;
$image = null; $image = '';
$filesize = 0; $filesize = 0;