static function fromUUID($uuid) { $podcastid = podcast::podcastIdFromUUID($uuid); if ($podcastid == 0) { return null; } return new podcast($podcastid); }
public function getMediaPodcast() { if ($this->podcast != NULL) { return $this->podcast->getFilePodcast(); } }
if ($podcast->save()) { if ($redirect == '') { $redirect = 'viewcache.php?cacheid=' . urlencode($podcast->getCacheId()); } $tpl->redirect($redirect); } else { $tpl->assign('errorfile', ERROR_UPLOAD_UNKNOWN); $bError = true; } } } } } else { if ($action == 'edit' || $action == 'delete') { $uuid = isset($_REQUEST['uuid']) ? $_REQUEST['uuid'] : 0; $podcast = podcast::fromUUID($uuid); if ($podcast === null) { $tpl->error(ERROR_PODCAST_NOT_EXISTS); } if ($redirect == '') { $redirect = 'viewcache.php?cacheid=' . urlencode($podcast->getCacheId()); } if ($podcast->allowEdit() == false) { $tpl->error(ERROR_NO_ACCESS); } if ($action == 'edit') { if (isset($_REQUEST['ok'])) { // overwrite values $title = isset($_REQUEST['title']) ? $_REQUEST['title'] : $podcast->getTitle(); if ($title == '') { $tpl->assign('errortitle', true);
$podcast->loadPodcasts(); $podcast->runExt($f3, $extension); }, $f3->get('CDURATION')); } foreach ($firtz->extensions as $slug => $extension) { if ($extension->type != 'output') { continue; } $slug = $extension->slug; $f3->route("GET|HEAD /@podcast/{$slug}", function ($f3, $params) use($slug) { $firtz = $f3->get('firtz'); $extension = $firtz->extensions[$slug]; $arguments = array(); $arguments_ext = $extension->arguments; foreach ($arguments_ext as $argname) { $arguments[$argname] = ""; $f3->set($argname, ""); } $extension->arguments = $arguments; $podcastslug = $params['podcast']; if (!in_array($params['podcast'], $f3->get('podcasts'))) { $f3->error(404); } $BASEPATH = $f3->get('PODCASTDIR') . '/' . $params['podcast']; $podcastCONFIG = $BASEPATH . '/directory.cfg'; $podcast = new podcast($f3, $podcastslug, $podcastCONFIG); $podcast->findPodcasts(); $podcast->loadPodcasts(); $podcast->runExt($f3, $extension); }, $f3->get('CDURATION')); }
<?php $obj = new podcast(NULL, array('podcast')); $podcast = $obj->createFeedChannel(); echo $podcast;
dir_recurse_copy($src . '/' . $file, $dst . '/' . $file); } else { copy($src . '/' . $file, $dst . '/' . $file); } } } closedir($dir); } $f3->set('clonemode', true); $f3->set('extxml', '.xml'); $f3->set('exthtml', '.html'); # CLI mode... create static pages foreach ($f3->get('podcasts') as $slug) { $podcastPATH = $f3->get('PODCASTDIR') . '/' . $slug; $podcastCONFIG = $podcastPATH . '/directory.cfg'; $podcast = new podcast($f3, $slug, $podcastCONFIG); if ($podcast->attr['cloneurl'] == '' || $podcast->attr['clonepath'] == '') { continue; } $DEST = $podcast->attr['clonepath']; if (!file_exists($DEST)) { @mkdir($DEST); if (!file_exists($DEST)) { echo "could not create destination path {$DEST}"; exit; } } if (!is_writable($DEST)) { echo "no permissions to write to {$DEST}!"; exit; }