Ejemplo n.º 1
0
                    $info['error'] = $feed['description'];
                }
                $info['newItems'] = array_keys($info['newItems']);
                $result['update'] = $info;
            }
        } else {
            $result['update'] = false;
        }
    }
    if ($needSave) {
        $kf->writeData();
    }
    if ($needStarSave) {
        $ks->writeData();
    }
    MyTool::renderJson($result);
} elseif (isset($_GET['help']) && ($kfc->isLogged() || $kfc->visibility === 'protected')) {
    $pb->assign('pagetitle', Intl::msg('Help') . ' - ' . strip_tags($kfc->title));
    $pb->renderPage('help');
} elseif (isset($_GET['update']) && ($kfc->isLogged() || isset($_GET['cron']) && $_GET['cron'] === sha1($kfc->salt . $kfc->hash)) || isset($argv) && count($argv) >= 3 && $argv[1] == 'update' && $argv[2] == sha1($kfc->salt . $kfc->hash)) {
    // Update
    $kf->loadData();
    $forceUpdate = false;
    if (isset($_GET['force'])) {
        $forceUpdate = true;
    }
    $feedsHash = array();
    $hash = 'all';
    if (isset($_GET['update'])) {
        $hash = $_GET['update'];
    }