From 2999a45a3812cc222dd034903ecbf254ea6a0cde Mon Sep 17 00:00:00 2001 From: Astrologies Date: Wed, 29 Dec 2021 06:58:24 -0500 Subject: [PATCH] Junk removal --- globals/functions.php | 64 ------------------------------------------- 1 file changed, 64 deletions(-) diff --git a/globals/functions.php b/globals/functions.php index bbd6f0b..e24f10f 100644 --- a/globals/functions.php +++ b/globals/functions.php @@ -870,70 +870,6 @@ function moderateAsset($id) //currently supports t-shirts, shirts and pants } return "Error Occurred"; } -/* -function moderateAsset($id) //currently supports t-shirts, shirts and pants -{ - //the logic behind this is it uses the asset id of the item, then + 1 to get to the texture. We need a way to be sure the texture is always next, or a new way to detect a situation where the texture isn't next (a queue system for uploading assets?) - - $rendercdn = $GLOBALS['renderCDNPath']; - $thumbscdn = $GLOBALS['thumbnailCDNPath']; - $assetscdn = $GLOBALS['assetCDNPath']; - - $assetinfo = getAssetInfo($id); - - if ($assetinfo->AssetTypeId == 2 or $assetinfo->AssetTypeId == 11 or $assetinfo->AssetTypeId == 12) //t-shirt, shirt or pants - { - //get the texture asset and hash - $textureid = $id + 1; - $textureinfo = $GLOBALS['pdo']->prepare("SELECT * FROM assets WHERE id = :i"); - $textureinfo->bindParam(":i", $textureid, PDO::PARAM_INT); - $textureinfo->execute(); - $textureinfo = $textureinfo->fetch(PDO::FETCH_OBJ); - $texturehash = $textureinfo->Hash; - // ... - - //update the texture hash to blank - $updatetexture = $GLOBALS['pdo']->prepare("UPDATE assets SET Hash = '' WHERE id = :i"); - $updatetexture->bindParam(":i", $textureid, PDO::PARAM_INT); - $updatetexture->execute(); - // ... - - //delete the texture from the cdn - unlink($thumbscdn . $texturehash); - // ... - - //update the shirt asset hash to blank and set the thumbhash to blank - $updatetexture = $GLOBALS['pdo']->prepare("UPDATE assets SET Hash = '', ThumbHash = '' WHERE id = :i"); - $updatetexture->bindParam(":i", $id, PDO::PARAM_INT); - $updatetexture->execute(); - // ... - - //delete the shirt asset from the cdn - $hash = $assetinfo->Hash; - unlink($assetscdn . $hash); - // ... - - //delete the shirt render from the cdn (if the shirt wasn't ever approved, this is useless. But keeping it for future moderation of an asset) - $renderhash = $assetinfo->ThumbHash; - unlink($rendercdn . $renderhash); - // ... - - //set the assets to moderated - setAssetModerated($id); - setAssetModerated($textureid); - // ... - return true; - } - else if ($assetinfo->AssetTypeId == 22) //reg imagesavealpha - { - //delete the texture from the cdn - unlink($thumbscdn . $assetinfo->Hash); - setAssetModerated($id); - return true; - } - return "Error occurred"; -} -*/ function isAssetApproved($id) {