function getParameters($id) { global $database, $mosConfig_offset, $mosConfig_live_site; $feed = new rdRssData($database); $feed->load($id); $params = new mosParameters($feed->params); $params->id = $id; $params->catids = $feed->catids; $params->published = $feed->published; if (method_exists($database, "getNullDate")) { $params->nullDate = $database->getNullDate(); } else { $params->nullDate = '0000-00-00 00:00:00'; } $params->now = date('Y-m-d H:i:s', time() + $mosConfig_offset * 60 * 60); $iso = split('=', _ISO); // parameter intilization $params->date = date('r'); $params->year = date('Y'); $params->encoding = $iso[1]; $params->link = htmlspecialchars($mosConfig_live_site); $params->cache = $params->def('cache', 1); $params->cache_time = $params->def('cache_time', 3600); $params->count = $params->def('count', 5); $params->orderby = $params->def('orderby', ''); $params->title = $params->def('title', 'Joomla! powered Site'); $params->description = $params->def('description', 'Joomla! site syndication'); $params->image_file = $params->def('image_file', 'joomla_rss.png'); if ($params->image_file == -1) { $params->image = NULL; } else { $params->image = $mosConfig_live_site . '/images/M_images/' . $params->image_file; } $params->image_alt = $params->def('image_alt', 'Powered by Joomla!'); $params->limit_text = $params->def('limit_text', 1); $params->text_length = $params->def('text_length', 20); // get feed type from url $params->feed = mosGetParam($_GET, 'feed', 'RSS2.0'); // live bookmarks $params->live_bookmark = $params->def('live_bookmark', ''); return $params; }
/** * * @param $option */ function cancel($option, $task, $id) { global $database; if ($id) { $row = new rdRssData($database); $row->load($id); $row->checkin(); } mosRedirect("index2.php?option={$option}&task=list"); }