<?PHP

if (!CheckAuthorization(PRIV_SYSADMIN, PRIV_COLLECTIONADMIN)) {  return;  }

if ($_GET["AC"] == "Background")
{
    $SearchEngine = new SPTSearchEngine();
    $RFactory = new ResourceFactory();
    $Ids = $RFactory->GetItemIds();
    foreach ($Ids as $Id)
    {
        $SearchEngine->QueueUpdateForItem($Id,
                ApplicationFramework::PRIORITY_BACKGROUND);
    }
    $GLOBALS["ResourceCount"] = count($Ids);
}

?>
