Exemplo n.º 1
0
 /**
  * Constructeur
  * Initialise le router et le dispatcher
  */
 public function __construct()
 {
     if (LOG_PATH === false) {
         $this->killApp('Path not found: LOG_PATH');
     }
     try {
         Minz_Configuration::init();
         Minz_Request::init();
         $this->router = new Minz_Router();
         $this->router->init();
     } catch (Minz_RouteNotFoundException $e) {
         Minz_Log::record($e->getMessage(), Minz_Log::ERROR);
         Minz_Error::error(404, array('error' => array($e->getMessage())));
     } catch (Minz_Exception $e) {
         Minz_Log::record($e->getMessage(), Minz_Log::ERROR);
         $this->killApp($e->getMessage());
     }
     $this->dispatcher = Minz_Dispatcher::getInstance($this->router);
 }
Exemplo n.º 2
0
<?php

require dirname(__FILE__) . '/../constants.php';
require LIB_PATH . '/lib_rss.php';
//Includes class autoloader
session_cache_limiter('');
ob_implicit_flush(false);
ob_start();
echo 'Results: ', "\n";
//Buffered
Minz_Configuration::init();
$users = listUsers();
shuffle($users);
//Process users in random order
array_unshift($users, Minz_Configuration::defaultUser());
//But always start with admin
$users = array_unique($users);
foreach ($users as $myUser) {
    syslog(LOG_INFO, 'FreshRSS actualize ' . $myUser);
    if (defined('STDOUT')) {
        fwrite(STDOUT, 'Actualize ' . $myUser . "...\n");
        //Unbuffered
    }
    echo $myUser, ' ';
    //Buffered
    $_GET['c'] = 'feed';
    $_GET['a'] = 'actualize';
    $_GET['ajax'] = 1;
    $_GET['force'] = true;
    $_SERVER['HTTP_HOST'] = '';
    $freshRSS = new FreshRSS();