Example #1
0
 //No Cron
 $password = JRequest::getVar('password', '', '', 'string');
 if (!empty($password)) {
     $decodepass = base64_decode($password);
     if ($decodepass == $GLOBALS[JNEWS . 'cron_pass']) {
         echo "<br/>jNews Cron launched";
         $status = jNews_Auto::execute(false);
         if ($status) {
             echo "<br/>Successfully processed queue!";
         }
     } else {
         return false;
     }
 } else {
     echo "<br/>jNews Cron launched";
     $status = jNews_Auto::execute(false);
     if ($status) {
         echo "<br/>Successfully processed queue!";
     }
 }
 //check if we have caching in Joomla
 $conf = JFactory::getConfig();
 $cacheTime = $conf->get('cachetime');
 if (!empty($cacheTime) && $cacheTime > $GLOBALS[JNEWS . 'cron_max_freq'] * 0.8) {
     //check if the cache plugin is published
     $db = JFactory::getDBO();
     if (version_compare(JVERSION, '1.6.0', '<')) {
         //j15
         $db->setQuery("SELECT `published` FROM `#__plugins` WHERE `element`='cache'  AND `folder`='system' ");
     } else {
         //j16