コード例 #1
0
ファイル: action.php プロジェクト: Rapiddot/ruTorrent
                $rss->hash = $hash;
                if ($mngr->cache->get($rss)) {
                    foreach ($urls as $url) {
                        $mngr->getTorrents($rss, $url, $isStart, $isAddPath, $dir, $lbl, null, null, false);
                        if (WAIT_AFTER_LOADING) {
                            sleep(WAIT_AFTER_LOADING);
                        }
                    }
                }
            }
            $mngr->saveHistory();
        }
        break;
}
if ($val === null) {
    $val = $mngr->get();
    $errorsReported = true;
}
if ($dataType == "text/xml") {
    cachedEcho('<?xml version="1.0" encoding="UTF-8"?><data><![CDATA[' . $val . ']]></data>', "text/xml", true, false);
} else {
    cachedEcho(safe_json_encode($val), $dataType, true, false);
}
ob_flush();
flush();
if (connection_aborted()) {
    if ($mngr->isErrorsOccured()) {
        $mngr->saveState(false);
    }
} else {
    if ($errorsReported && $mngr->hasErrors()) {