mirror of
https://github.com/e107inc/e107.git
synced 2025-08-31 10:01:56 +02:00
Code cleanup and optimization
This commit is contained in:
@@ -100,7 +100,7 @@ if (isset($_POST['update_catorder']))
|
||||
{
|
||||
if (is_numeric($_POST['catorder'][$key]))
|
||||
{
|
||||
$sql -> db_Update("download_category", "download_category_order='".intval($order)."' WHERE download_category_id='".intval($key)."'");
|
||||
$sql ->update("download_category", "download_category_order='".intval($order)."' WHERE download_category_id='".intval($key)."'");
|
||||
}
|
||||
}
|
||||
e107::getLog()->add('DOWNL_08',implode(',',array_keys($_POST['catorder'])),E_LOG_INFORMATIVE,'');
|
||||
@@ -206,7 +206,7 @@ if (isset($_POST['updatelimits']))
|
||||
if (!$_POST['count_num'][$idLim] && !$_POST['count_days'][$idLim] && !$_POST['bw_num'][$idLim] && !$_POST['bw_days'][$idLim])
|
||||
{
|
||||
//All entries empty - Remove record
|
||||
if ($sql->db_Delete('generic',"gen_id = {$idLim}"))
|
||||
if ($sql->delete('generic',"gen_id = {$idLim}"))
|
||||
{
|
||||
$message .= $idLim." - ".DOWLAN_119."<br/>";
|
||||
e107::getLog()->add('DOWNL_11','ID: '.$idLim,E_LOG_INFORMATIVE,'');
|
||||
|
@@ -111,7 +111,7 @@ class download_setup
|
||||
{
|
||||
if($needed == TRUE){ return "Incorrect download image paths"; } // Signal that an update is required.
|
||||
|
||||
if($sql->db_Update("download","download_image = CONCAT('{e_FILE}downloadimages/',download_image) WHERE download_image !='' "))
|
||||
if($sql->update("download","download_image = CONCAT('{e_FILE}downloadimages/',download_image) WHERE download_image !='' "))
|
||||
{
|
||||
$mes->addSuccess("Updated Download-Image paths");
|
||||
}
|
||||
@@ -120,7 +120,7 @@ class download_setup
|
||||
$mes->addError("Failed to update Download-Image paths");
|
||||
}
|
||||
|
||||
if($sql->db_Update("download"," download_thumb = CONCAT('{e_FILE}downloadthumbs/',download_thumb) WHERE download_thumb !='' "))
|
||||
if($sql->update("download"," download_thumb = CONCAT('{e_FILE}downloadthumbs/',download_thumb) WHERE download_thumb !='' "))
|
||||
{
|
||||
$mes->addSuccess("Updated Download-Thumbnail paths");
|
||||
}
|
||||
@@ -136,7 +136,7 @@ class download_setup
|
||||
// Signal that an update is required.
|
||||
if($needed == TRUE){ return "Downloads-Category icon paths need updating"; } // Must have a value if an update is needed. Text used for debug purposes.
|
||||
|
||||
if($sql->db_Update("download_category","download_category_icon = CONCAT('{e_IMAGE}icons/',download_category_icon) WHERE download_category_icon !='' "))
|
||||
if($sql->update("download_category","download_category_icon = CONCAT('{e_IMAGE}icons/',download_category_icon) WHERE download_category_icon !='' "))
|
||||
{
|
||||
$mes->addSuccess("Updated Download-Image paths");
|
||||
}
|
||||
|
@@ -46,7 +46,7 @@ class list_download
|
||||
WHERE dc.download_category_class REGEXP '".e_CLASS_REGEXP."' AND d.download_class REGEXP '".e_CLASS_REGEXP."' AND d.download_active != '0' ".$qry."
|
||||
ORDER BY download_datestamp DESC LIMIT 0,".intval($this->parent->settings['amount'])." ";
|
||||
|
||||
$downloads = $this->parent->e107->sql->db_Select_gen($qry);
|
||||
$downloads = $this->parent->e107->sql->gen($qry);
|
||||
if($downloads == 0)
|
||||
{
|
||||
$list_data = LIST_DOWNLOAD_2;
|
||||
@@ -54,7 +54,7 @@ class list_download
|
||||
else
|
||||
{
|
||||
$list_data = array();
|
||||
while($row = $this->parent->e107->sql->db_Fetch())
|
||||
while($row = $this->parent->e107->sql->fetch())
|
||||
{
|
||||
$record = array();
|
||||
$rowheading = $this->parent->parse_heading($row['download_name']);
|
||||
|
Reference in New Issue
Block a user