$content = $cache->load(); } else { $cache->start(); if (!isset($_REQUEST['id']) || !sensitiveIO::isPositiveInteger($_REQUEST['id'])) { $error = 1; } else { if (!CMS_poly_rss_definitions::exists($_REQUEST['id'])) { $error = 2; } else { $RSSDefinition = new CMS_poly_rss_definitions($_REQUEST['id']); if ($RSSDefinition->hasError()) { $error = 2; } //Create RSS Content ob_start(); eval(sensitiveIO::stripPHPTags($RSSDefinition->getValue('compiledDefinition'))); $data = ob_get_contents(); ob_end_clean(); if (!$data) { $error = 3; } $label = new CMS_object_i18nm($RSSDefinition->getValue("labelID")); $description = new CMS_object_i18nm($RSSDefinition->getValue("descriptionID")); $link = $RSSDefinition->getValue("link") ? $RSSDefinition->getValue("link") : CMS_websitesCatalog::getMainURL(); $categoriesTags = ''; if ($RSSDefinition->getValue("categories")) { $categories = array_map('trim', explode(',', $RSSDefinition->getValue("categories"))); foreach ($categories as $category) { $categoriesTags .= '<category>' . $category . '</category>' . "\n"; } }
define("MESSAGE_PAGE_FIELD_DAILY", 307); define("MESSAGE_PAGE_FIELD_WEEKLY", 308); define("MESSAGE_PAGE_FIELD_MONTHLY", 309); define("MESSAGE_PAGE_FIELD_YEARLY", 310); define("MESSAGE_PAGE_FIELD_NAMESPACE", 645); define("MESSAGE_PAGE_FIELD_NAMESPACE_EXPLANATION", 646); //checks rights if (!$cms_user->hasAdminClearance(CLEARANCE_ADMINISTRATION_EDITVALIDATEALL)) { header("Location: " . PATH_ADMIN_SPECIAL_ENTRY_WR . "?cms_message_id=" . MESSAGE_PAGE_CLEARANCE_ERROR . "&" . session_name() . "=" . session_id()); exit; } //load page objects and vars $moduleCodename = $_POST["moduleCodename"] ? $_POST["moduleCodename"] : $_GET["moduleCodename"]; $object = CMS_poly_object_catalog::getObjectDefinition($_POST["object"]); $RSSDefinition = new CMS_poly_rss_definitions($_POST["RSSDefinition"]); $label = new CMS_object_i18nm($RSSDefinition->getValue("labelID")); $description = new CMS_object_i18nm($RSSDefinition->getValue("descriptionID")); $availableLanguagesCodes = CMS_object_i18nm::getAvailableLanguages(); if ($moduleCodename) { $polymod = CMS_modulesCatalog::getByCodename($moduleCodename); } $cms_message = ""; // **************************************************************** // ** ACTIONS MANAGEMENT ** // **************************************************************** switch ($_POST["cms_action"]) { case "validate": case "switchexplanation": //checks and assignments $RSSDefinition->setDebug(false); //set objectID