Пример #1
0
            //Unbuffered
        }
        continue;
    }
    Minz_Log::notice('FreshRSS actualize ' . $user, $log_file);
    if (defined('STDOUT')) {
        fwrite(STDOUT, 'Actualize ' . $user . "...\n");
        //Unbuffered
    }
    echo $user, ' ';
    //Buffered
    Minz_Session::_param('currentUser', $user);
    new Minz_ModelPdo($user);
    //TODO: FIXME: Quick-fix while waiting for a better FreshRSS() constructor/init
    FreshRSS_Auth::giveAccess();
    $app->init();
    $app->run();
    if (!invalidateHttpCache()) {
        Minz_Log::notice('FreshRSS write access problem in ' . join_path(USERS_PATH, $user, 'log.txt'), $log_file);
        if (defined('STDERR')) {
            fwrite(STDERR, 'Write access problem in ' . join_path(USERS_PATH, $user, 'log.txt') . "\n");
        }
    }
}
Minz_Log::notice('FreshRSS actualize done.', $log_file);
if (defined('STDOUT')) {
    fwrite(STDOUT, 'Done.' . "\n");
    $end_date = date_create('now');
    $duration = date_diff($end_date, $begin_date);
    fwrite(STDOUT, 'Ending feed actualization at ' . $end_date->format('c') . "\n");
    //Unbuffered
Пример #2
0
#
# ***** END LICENSE BLOCK *****
require '../../constants.php';
require LIB_PATH . '/lib_rss.php';
//Includes class autoloader
if (file_exists(DATA_PATH . '/do-install.txt')) {
    require APP_PATH . '/install.php';
} else {
    session_cache_limiter('');
    Minz_Session::init('FreshRSS');
    Minz_Session::_param('keepAlive', 1);
    //For Persona
    if (!file_exists(DATA_PATH . '/no-cache.txt')) {
        require LIB_PATH . '/http-conditional.php';
        $currentUser = Minz_Session::param('currentUser', '');
        $dateLastModification = $currentUser === '' ? time() : max(@filemtime(join_path(USERS_PATH, $currentUser, 'log.txt')), @filemtime(join_path(DATA_PATH, 'config.php')));
        if (httpConditional($dateLastModification, 0, 0, false, PHP_COMPRESSION, true)) {
            exit;
            //No need to send anything
        }
    }
    try {
        $front_controller = new FreshRSS();
        $front_controller->init();
        $front_controller->run();
    } catch (Exception $e) {
        echo '### Fatal error! ###<br />', "\n";
        Minz_Log::error($e->getMessage());
        echo 'See logs files.';
    }
}
Пример #3
0
        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();
    $freshRSS->_useOb(false);
    Minz_Configuration::_authType('none');
    Minz_Session::init('FreshRSS');
    Minz_Session::_param('currentUser', $myUser);
    $freshRSS->init();
    $freshRSS->run();
    if (!invalidateHttpCache()) {
        syslog(LOG_NOTICE, 'FreshRSS write access problem in ' . LOG_PATH . '/*.log!');
        if (defined('STDERR')) {
            fwrite(STDERR, 'Write access problem in ' . LOG_PATH . '/*.log!' . "\n");
        }
    }
    Minz_Session::unset_session(true);
    Minz_ModelPdo::clean();
}
syslog(LOG_INFO, 'FreshRSS actualize done.');
if (defined('STDOUT')) {
    fwrite(STDOUT, 'Done.' . "\n");
}
echo 'End.', "\n";