1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-12 17:44:37 +02:00

Code cleanup and optimization

This commit is contained in:
Cameron
2020-12-14 16:21:48 -08:00
parent c258b856f2
commit 44e260b121
81 changed files with 747 additions and 722 deletions

View File

@@ -523,8 +523,8 @@ if (e_QUERY)
if ($action == "dis" && isset($_POST['updelete']['upload_'.$id]) )
{
$res = $sql -> db_Select("upload", "*", "upload_id='".intval($id)."'");
$row = $sql -> db_Fetch();
$res = $sql ->select("upload", "*", "upload_id='".intval($id)."'");
$row = $sql ->fetch();
if (preg_match("#Binary (.*?)/#", $row['upload_file'], $match))
{
$sql -> db_Delete("rbinary", "binary_id='".$tp -> toDB($match[1])."'");
@@ -535,7 +535,7 @@ if ($action == "dis" && isset($_POST['updelete']['upload_'.$id]) )
}
if (preg_match("#Binary (.*?)/#", $row['upload_ss'], $match))
{
$sql -> db_Delete("rbinary", "binary_id='".$tp -> toDB($match[1])."'");
$sql ->delete("rbinary", "binary_id='".$tp -> toDB($match[1])."'");
}
else if ($row['upload_ss'] && file_exists(e_FILE."public/".$row['upload_ss']))
{