/**
  * Retrieve a list of packages which belong to the corresponding category
  *
  * @param category_id   this is passed via POST and is the category id of packages
  *                      we wish to retrieve
  * @return packages     xml string consisting of the packages and releases which belong to
  *                      the category
  */
 function getPackages()
 {
     $json = getJSONobj();
     $category_id = '';
     if (isset($_REQUEST['category_id'])) {
         $category_id = nl2br($_REQUEST['category_id']);
     }
     $xml = PackageManager::getPackages($category_id);
     echo 'result = ' . $json->encode(array('package_output' => $xml));
 }
 /**
  * Retrieve a list of packages which belong to the corresponding category
  * 
  * @param category_id   this is passed via POST and is the category id of packages
  *                      we wish to retrieve
  * @return packages     xml string consisting of the packages and releases which belong to
  *                      the category
  */
 function getPackages()
 {
     require_once 'include/json_config.php';
     $json_config = new json_config();
     $json = getJSONobj();
     $category_id = '';
     if (isset($_REQUEST['category_id'])) {
         $category_id = nl2br($_REQUEST['category_id']);
     }
     $xml = PackageManager::getPackages($category_id);
     echo 'result = ' . $json->encode(array('package_output' => $xml));
 }