Junk removal
This commit is contained in:
parent
1fdea22b0f
commit
2999a45a38
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue