From a297fb1e38ce70a2c25f5dd9096fcfbf988ddf05 Mon Sep 17 00:00:00 2001 From: Maryana Rozhankivska Date: Thu, 3 Apr 2014 12:18:49 +0300 Subject: import w/o cron --- cron.php | 53 ----------------------------------------------------- 1 file changed, 53 deletions(-) delete mode 100644 cron.php (limited to 'cron.php') diff --git a/cron.php b/cron.php deleted file mode 100644 index 8fbf421a..00000000 --- a/cron.php +++ /dev/null @@ -1,53 +0,0 @@ -getConfigUser($user_id); - -if ($token != $config['token']) { - die(_('Uh, there is a problem with the cron.')); -} - -$items = $store->retrieveUnfetchedEntries($user_id, $limit); - -foreach ($items as $item) { - $url = new Url(base64_encode($item['url'])); - $content = Tools::getPageContent($url); - - $title = ($content['rss']['channel']['item']['title'] != '') ? $content['rss']['channel']['item']['title'] : _('Untitled'); - $body = $content['rss']['channel']['item']['description']; - - // // clean content from prevent xss attack - $config = HTMLPurifier_Config::createDefault(); - $purifier = new HTMLPurifier($config); - $title = $purifier->purify($title); - $body = $purifier->purify($body); - - - $store->updateContentAndTitle($item['id'], $title, $body, $user_id); -} \ No newline at end of file -- cgit v1.2.3