1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-25 15:31:41 +02:00

Code cleanup

This commit is contained in:
Cameron
2016-12-01 15:38:40 -08:00
parent 3877c7b6b0
commit 126f89da9f
8 changed files with 21 additions and 466 deletions

View File

@@ -158,9 +158,9 @@ if (isset($_POST['updateuploadoptions']))
$targetFields = array('gen_datestamp', 'gen_user_id', 'gen_ip', 'gen_intdata', 'gen_chardata'); // Fields for download limits
if (isset($_POST['addlimit']))
if (!empty($_POST['addlimit']))
{
if ($sql->db_Select('generic','gen_id',"gen_type = 'download_limit' AND gen_datestamp = {$_POST['newlimit_class']}"))
if ($sql->select('generic','gen_id',"gen_type = 'download_limit' AND gen_datestamp = ".intval($_POST['newlimit_class'])))
{
$message = DOWLAN_116;
}
@@ -173,7 +173,7 @@ if (isset($_POST['addlimit']))
$vals[$targetFields[$k]] = intval($_POST[$lName]);
}
$valString = implode(',',$vals);
if ($sql->db_Insert('generic',$vals))
if ($sql->insert('generic',$vals))
{
$message = DOWLAN_117;
e107::getLog()->add('DOWNL_09',$valString,E_LOG_INFORMATIVE,'');