<?PHP
#
#   FILE:  RemoveTag.php
#
#   Part of the Collection Workflow Integration System (CWIS)
#   Copyright 2011 Internet Scout Project
#   http://scout.wisc.edu/
#

# ----- MAIN -----------------------------------------------------------------

$AF->SuppressHTMLOutput();

# get URL parameters
$ResourceId = GetArrayValue($_POST, "ResourceId");
$Tag = GetArrayValue($_POST, "Tag");

# valid parameter values
if (!is_null($ResourceId) && !is_null($Tag))
{
    $Resource = new Resource($ResourceId);

    # valid resource ID
    if ($Resource->Status() === 1)
    {
        $AF->SignalEvent("TAGS_REMOVE_TAG", array($User, $Resource, $Tag));
    }
}
