Beispiel #1
0
<?php

set_time_limit(0);
$path = dirname(realpath($argv[0]));
if (chdir($path)) {
    if (count($argv) > 1) {
        $_SERVER['REMOTE_USER'] = $argv[1];
    }
    require_once '../../php/lock.php';
    if ($lock = rLock::obtain('rss/update')) {
        require_once 'rss.php';
        $mngr = new rRSSManager();
        $mngr->update();
        $lock->release();
    }
}
Beispiel #2
0
<?php

require_once 'rss.php';
ob_start();
ignore_user_abort(true);
set_time_limit(0);
$val = null;
$cmd = "get";
if (isset($_REQUEST['mode'])) {
    $cmd = $_REQUEST['mode'];
}
$errorsReported = false;
$dataType = "application/json";
$mngr = new rRSSManager();
switch ($cmd) {
    case "setinterval":
        $mngr->setInterval($_REQUEST['interval']);
    case "getintervals":
        $val = $mngr->getIntervals();
        break;
    case "add":
        $lbl = null;
        if (isset($_REQUEST['label'])) {
            $lbl = $_REQUEST['label'];
        }
        if (isset($_REQUEST['url'])) {
            $mngr->add($_REQUEST['url'], $lbl);
        }
        break;
    case "addgroup":
        $lbl = "RSS Group";
Beispiel #3
0
<?php

eval(getPluginConf($plugin["name"]));
$st = getSettingsPath();
makeDirectory(array($st . '/rss', $st . '/rss/cache'));
$needStart = isLocalMode() && $theSettings->linkExist;
if ($needStart) {
    require_once $rootPath . '/plugins/rss/rss.php';
    $mngr = new rRSSManager();
    if ($mngr->setHandlers()) {
        $theSettings->registerPlugin($plugin["name"], $pInfo["perms"]);
    } else {
        $jResult .= "plugin.disable(); noty('rss: '+theUILang.pluginCantStart,'error');";
    }
} else {
    $theSettings->registerPlugin($plugin["name"], $pInfo["perms"]);
}