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

CheckAuthorization(PRIV_SYSADMIN);

$BlogPlugin = $GLOBALS["G_PluginManager"]->GetPluginForCurrentPage();

$H_Blogs = array();

foreach ($BlogPlugin->GetAvailableBlogs() as $BlogId => $BlogName)
{
    $H_Blogs []= array(
        "BlogId"   => $BlogId,
        "BlogName" => $BlogName,
        "BlogDescription" => $BlogPlugin->BlogSetting($BlogId, "BlogDescription"),
        );
}