1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-21 21:21:54 +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

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

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