* Authors: András Micsik, Máté Pataki, Tamás Déri * at MTA SZTAKI DSD, http://dsd.sztaki.hu * Update Topic Tree by Martin Schmidt, FH St. Poelten */ require "init.inc.php"; // may contain long jobs set_time_limit(300); $smarty->assign('PAGETITLE', $page->getlocalized('AdminPage')); $page->forceLogin(); //$page->errorURL = "admin.php"; checkPerm('node', 'change', 'authorize'); // import XBMF $xbmfFile = sotf_Utils::getParameter('import_xbmf'); if ($xbmfFile) { $file = $config['xbmfInDir'] . "/{$xbmfFile}"; $id = sotf_Programme::importXBMF($file, $config['publishXbmf'], true); if ($id) { echo "Import succesful: <a target=\"_opener\" href=\"editMeta.php?id={$id}\">click here</a>"; unlink($file); } else { echo "Import failed"; } $page->logRequest(); exit; } // update CVS if (sotf_Utils::getParameter('updatecvs')) { die("doesn't work this way, sorry"); checkPerm('node', 'change'); chdir($config['basedir']); header("Content-type: text/plain\n");
} } //********* IMPORT ARRIVED XBMF $dirPath = $config['xbmfInDir']; $dir = dir($dirPath); while ($entry = $dir->read()) { if ($entry != "." && $entry != "..") { $currentFile = $dirPath . "/" . $entry; if (!is_dir($currentFile)) { $XBMF[] = basename($currentFile); } } } $dir->close(); foreach ($XBMF as $xbmfFile) { $id = sotf_Programme::importXBMF($config['xbmfInDir'] . "/{$xbmfFile}", $config['publishXbmf']); if ($id) { debug("CRON", "Imported new XBMF: {$xbmfFile}"); unlink($config['xbmfInDir'] . "/{$xbmfFile}"); } else { logger("CRON", "Import FAILED for XBMF: {$xbmfFile}"); } } //******** Expire old programmes // *** regenerate metadata files?? //******** Update topic counts //******** Clean caches adn tmp dirs // remove m3us and pngs from tmpdir // update subject tree language availability stopTiming(); $page->logRequest();