<?PHP
#
#   FILE:  NotifySubscribers.php
#
#   Part of the Collection Workflow Integration System (CWIS)
#   Copyright 2013 Edward Almasy and Internet Scout Research Group
#   http://scout.wisc.edu/cwis/
#

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

PageTitle("Notify Blog Subscribers");

# get the blog plugin and entry
$Blog = $GLOBALS["G_PluginManager"]->GetPluginForCurrentPage();
$Entry = new Blog_Entry(GetArrayValue($_GET, "ID"));

# don't allow unauthorized access
if (!$Blog->UserCanEditBlogEntries($GLOBALS["G_User"]))
{
    CheckAuthorization(FALSE);
    return;
}

# notify subscribers
$Blog->NotifySubscribers($Entry);

# go back to the page for the blog entry
$GLOBALS["AF"]->SetJumpToPage($Entry->EntryUrl());
