Changes by CLaude
Build and Deploy / build (push) Failing after 44s

This commit is contained in:
root
2026-08-18 09:31:05 -01:00
parent 9bee381f6c
commit 30893eb7a7
21 changed files with 276 additions and 85 deletions
+4 -4
View File
@@ -9,19 +9,19 @@ class CalendarController extends Controller
public function show(Request $request, $id)
{
parent::registerView($request, 'agenda', $id);
$apiResult = $this->API('agenda/item/' . (int)$id);
$calendarEvent = new \Model\CalendarEvent($apiResult->news);
$apiResult = (object) $this->API('agenda/item/' . (int)$id);
$calendarEvent = new \Model\CalendarEvent((object) $apiResult->news);
return view('calendarevent', array_merge($this->getSidebareData(), ['event' => $calendarEvent, 'metadata' => $calendarEvent->metadata]));
}
public function overview(Request $request)
{
$apiResult = $this->API('agenda/overzicht?aantal=100');
$apiResult = (object) $this->API('agenda/overzicht?aantal=100');
$calendar = [];
foreach($apiResult->events as $calendarItem)
{
$calendar[] = new \Model\CalendarEvent($calendarItem);
$calendar[] = new \Model\CalendarEvent((object) $calendarItem);
}
return view('calendarlist', array_merge($this->getSidebareData(), ['events' => $calendar]));
+1 -1
View File
@@ -12,7 +12,7 @@ class ContactController extends Controller
{
public function show()
{
$page = $this->API('statisch/contact');
$page = (object) $this->API('statisch/contact');
if ($page == null) {
return abort(404);
}
+18 -11
View File
@@ -10,24 +10,31 @@ class HomeController extends Controller
public function show(Request $request)
{
$page = (int) $request->get('pagina', 1);
$apiResult = $this->API('nieuws/overzicht?pagina=' . (int) max(1, $page) . '&aantal=10');
$apiResult = (object) $this->API('nieuws/overzicht?pagina=' . (int) max(1, $page) . '&aantal=10');
$news = [];
foreach ($apiResult->news as $newsItem) {
$news[] = new \Model\NewsItem($newsItem);
if ($apiResult && isset($apiResult->news)) {
foreach ($apiResult->news as $newsItem) {
$news[] = new \Model\NewsItem((object) $newsItem);
}
}
$apiResult = $this->API('nieuws/liveblogs');
$liveblogs = $apiResult->liveblogs;
$apiResult = (object) $this->API('nieuws/liveblogs');
$liveblogs = $apiResult && isset($apiResult->liveblogs) ? $apiResult->liveblogs : [];
$populair = [];
$apiResult = $this->API('nieuws/populair?pagina=' . (int) max(1, $page) . '&aantal=5');
foreach ($apiResult->news as $newsItem) {
$populair[] = new \Model\NewsItem($newsItem);
$apiResult = (object) $this->API('nieuws/populair?pagina=' . (int) max(1, $page) . '&aantal=5');
if ($apiResult && isset($apiResult->news)) {
foreach ($apiResult->news as $newsItem) {
$populair[] = new \Model\NewsItem((object) $newsItem);
}
}
$apiResult = $this->API('podcast/overzicht?aantal=15');
$index = array_rand($apiResult->podcasts);
$podcast = new \Model\Podcast($apiResult->podcasts[$index]);
$podcast = null;
$apiResult = (object) $this->API('podcast/overzicht?aantal=15');
if ($apiResult && isset($apiResult->podcasts) && !empty($apiResult->podcasts)) {
$index = array_rand($apiResult->podcasts);
$podcast = new \Model\Podcast((object) $apiResult->podcasts[$index]);
}
return view('home', ['populair' => $populair, 'podcast' => $podcast, 'title' => 'Home', 'news' => $news, 'liveblogs' => $liveblogs, 'searchURL' => 'nieuws/zoeken']);
}
}
+2 -2
View File
@@ -15,7 +15,7 @@ class ImagesController extends Controller
public function show(Request $request, $id)
{
$apiResult = $this->API('beelden/details/' . $id);
$apiResult = (object) $this->API('beelden/details/' . $id);
$imagesItem = new \Model\NewsItem($apiResult->images);
return view('imagesitem', ['images' => $imagesItem, 'metadata' => $imagesItem->metadata]);
@@ -39,7 +39,7 @@ class ImagesController extends Controller
private function listImages(Request $request, $url, $title = null)
{
$page = (int)$request->get('pagina', 1);
$apiResult = $this->API('beelden/' . $url . '?pagina=' . (int)max(1, $page));
$apiResult = (object) $this->API('beelden/' . $url . '?pagina=' . (int)max(1, $page));
$images = [];
foreach($apiResult->items as $imagesItem)
{
+1 -1
View File
@@ -16,7 +16,7 @@ class JobsController extends Controller
public function show(Request $request, $id)
{
parent::registerView($request, 'nieuws', $id);
$apiResult = $this->API('vacatures/details/' . $id);
$apiResult = (object) $this->API('vacatures/details/' . $id);
$jobsItem = new \Model\JobOpening($apiResult->item);
return view('jobsitem', array_merge($this->getSidebareData(), ['job' => $jobsItem, 'metadata' => $jobsItem->metadata]));
}
@@ -10,7 +10,7 @@ class KerkdienstController extends Controller
public function main(Request $request)
{
parent::registerView($request, 'kerkdienst', 0);
$apiResult = $this->API('kerkdienst');
return view('kerkdienst', ['kerkdienst' => new \Model\Kerkdienst($apiResult)]);
$apiResult = (object) $this->API('kerkdienst');
return view('kerkdienst', ['kerkdienst' => new \Model\Kerkdienst((object) $apiResult)]);
}
}
+22 -22
View File
@@ -21,8 +21,8 @@ class NewsController extends Controller
if (request()->get('preview', null) != null) {
$preview = "?preview=" . request()->get('preview');
}
$apiResult = $this->API('nieuws/bericht/' . $id . $preview);
$newsItem = new \Model\NewsItem($apiResult->news);
$apiResult = (object) $this->API('nieuws/bericht/' . $id . $preview);
$newsItem = new \Model\NewsItem((object) $apiResult->news);
switch ($apiResult->version) {
case 1:
@@ -54,10 +54,10 @@ class NewsController extends Controller
{
$page = (int) $request->get('pagina', 1);
$id = $request->get('id', '');
$apiResult = $this->API('nieuws/overzicht?pagina=' . (int) max(1, $page) . '&aantal=5');
$apiResult = (object) $this->API('nieuws/overzicht?pagina=' . (int) max(1, $page) . '&aantal=5');
$news = [];
foreach ($apiResult->news as $newsItem) {
$news[] = new \Model\NewsItem($newsItem);
$news[] = new \Model\NewsItem((object) $newsItem);
}
return view('partial/newslist_small', ['id' => $id, 'news' => $news]);
@@ -68,9 +68,9 @@ class NewsController extends Controller
$page = (int) $request->get('pagina', 1);
$id = $request->get('id', '');
$populair = [];
$apiResult = $this->API('nieuws/populair?pagina=' . (int) max(1, $page) . '&aantal=5');
$apiResult = (object) $this->API('nieuws/populair?pagina=' . (int) max(1, $page) . '&aantal=5');
foreach ($apiResult->news as $_newsItem) {
$populair[] = new \Model\NewsItem($_newsItem);
$populair[] = new \Model\NewsItem((object) $_newsItem);
}
return view('partial/newslist_small', ['id' => $id, 'news' => $populair]);
@@ -99,9 +99,9 @@ class NewsController extends Controller
public function activeblog()
{
$apiResult = $this->API('blog/overzicht');
if (count($apiResult)) {
$blog = new \Model\Blog($apiResult[0]);
$apiResult = (object) $this->API('blog/overzicht');
if (count((array) $apiResult)) {
$blog = new \Model\Blog((object) $apiResult[0]);
if ($blog->is_active) {
return redirect($blog->url);
}
@@ -115,9 +115,9 @@ class NewsController extends Controller
parent::registerView($request, 'blog', $id);
$blog = $this->API('nieuws/liveblog/' . (int) $id);
$blog = (object) $this->API('nieuws/liveblog/' . (int) $id);
foreach ($blog->artikelen as &$item) {
$item = new \Model\NewsItem($item);
$item = new \Model\NewsItem((object) $item);
}
if (request()->ajax()) {
@@ -140,38 +140,38 @@ class NewsController extends Controller
if ($url == 'overzicht' && $request->get('dateStart', null) && $request->get('dateEnd', null)) {
$url = 'datum/' . $request->get('dateStart', null) . '/' . $request->get('dateEnd', null);
}
$apiResult = $this->API('nieuws/' . $url . '?pagina=' . (int) max(1, $page) . ($total ? '&aantal=' . $total : ''));
$apiResult = (object) $this->API('nieuws/' . $url . '?pagina=' . (int) max(1, $page) . ($total ? '&aantal=' . $total : ''));
$news = [];
foreach ($apiResult->news ?? [] as $newsItem) {
$news[] = new \Model\NewsItem($newsItem);
$news[] = new \Model\NewsItem((object) $newsItem);
}
$populair = [];
if ($title == null) {
$total = 5;
}
$apiResult = $this->API('nieuws/populair?pagina=' . (int) max(
$apiResult = (object) $this->API('nieuws/populair?pagina=' . (int) max(
1,
$page
) . ($total ? '&aantal=' . $total : ''));
foreach ($apiResult->news as $newsItem) {
$populair[] = new \Model\NewsItem($newsItem);
$populair[] = new \Model\NewsItem((object) $newsItem);
}
$podcast = null;
$podcasts = [];
if ($title == null) {
$apiResult = $this->API('podcast/overzicht?aantal=3');
$podcast = new \Model\Podcast($apiResult->podcasts[0]);
$apiResult = (object) $this->API('podcast/overzicht?aantal=3');
$podcast = new \Model\Podcast((object) $apiResult->podcasts[0]);
foreach ($apiResult->podcasts as $_podcast) {
$podcasts[] = new \Model\Podcast($_podcast);
$podcasts[] = new \Model\Podcast((object) $_podcast);
}
}
$newsItems = [];
$apiResult = $this->API('nieuws/overzicht?aantal=5');
$apiResult = (object) $this->API('nieuws/overzicht?aantal=5');
foreach ($apiResult->news as $_newsItem) {
$newsItems[] = new \Model\NewsItem($_newsItem);
$newsItems[] = new \Model\NewsItem((object) $_newsItem);
}
return view($request->ajax() ? ($title == null ? 'partial/home_newslist_small' : 'partial/newslist_small') : ($title == null ? 'news' : 'newslist'), ['populair' => $populair, 'newsItems' => $newsItems, 'podcasts' => $podcasts, 'podcast' => $podcast, 'id' => $id, 'title' => $title, 'news' => $news, 'searchURL' => 'nieuws/zoeken']);
@@ -179,7 +179,7 @@ class NewsController extends Controller
public function popular()
{
$apiResult = $this->API('nieuws/populair');
$apiResult = (object) $this->API('nieuws/populair');
$news = [];
foreach ($apiResult->news as $newsItem) {
$news[] = new \Model\NewsItem($newsItem);
@@ -190,7 +190,7 @@ class NewsController extends Controller
public function regionieuws()
{
$data = $this->API('nieuws/regionieuws.json');
$data = (object) $this->API('nieuws/regionieuws.json');
return view('listen', [
'source' => $this->API_URL . 'nieuws/regionieuws.mp3',
'title' => 'Regionieuws',
+6 -6
View File
@@ -13,7 +13,7 @@ class PodcastController extends Controller
$viewData = [];
if((int)$programma > 0) {
$action = 'programma/' . (int)$programma;
$viewData['program'] = new \Model\Program($this->API('programma/details/' . (int)$programma));
$viewData['program'] = new \Model\Program((object) $this->API('programma/details/' . (int)$programma));
}
return $this->getPodcastList($request, $action, $viewData);
@@ -22,7 +22,7 @@ class PodcastController extends Controller
private function getPodcastList(Request $request, $action, $viewData = [])
{
$page = (int)$request->get('pagina', 1);
$apiResult = $this->API('podcast/' . $action . '?pagina=' . (int)max(1, $page) . '&aantal=8');
$apiResult = (object) $this->API('podcast/' . $action . '?pagina=' . (int)max(1, $page) . '&aantal=8');
$podcasts = [];
foreach($apiResult->podcasts as $podcast)
{
@@ -35,15 +35,15 @@ class PodcastController extends Controller
public function podcast(Request $request, $id)
{
parent::registerView($request, 'podcast', $id);
$apiResult = $this->API('podcast/details/' . (int)$id);
$podcast = new \Model\Podcast($apiResult);
$apiResult = (object) $this->API('podcast/details/' . (int)$id);
$podcast = new \Model\Podcast((object) $apiResult);
$podcasts = [];
if($podcast->program) {
$apiResult = $this->API('podcast/programma/' . (int)$podcast->program->id . '?pagina=1&aantal=5');
$apiResult = (object) $this->API('podcast/programma/' . (int)$podcast->program->id . '?pagina=1&aantal=5');
$podcasts = [];
foreach($apiResult->podcasts as $p)
{
$podcasts[] = new \Model\Podcast($p);
$podcasts[] = new \Model\Podcast((object) $p);
}
}
return view('podcastitem', ['podcast' => $podcast, 'metadata' => $podcast->metadata, 'podcasts' => $podcasts, 'isPodcast' => true]);
+12 -12
View File
@@ -11,7 +11,7 @@ class RadioController extends Controller
{
$start = $date ? (new \DateTime($date))->format('Y-m-d') : (new \DateTime("-2 day"))->format('Y-m-d');
$end = $date ? (new \DateTime($date))->modify('+1 day')->format('Y-m-d') : (new \DateTime("+3 day"))->format('Y-m-d');
$apiResult = $this->API('programma/schema/periode/' . $start . '/' . $end);
$apiResult = (object) $this->API('programma/schema/periode/' . $start . '/' . $end);
$schedule = [];
foreach($apiResult->schedule as $program)
{
@@ -19,7 +19,7 @@ class RadioController extends Controller
'starttime' => self::JsonToDateTime($program->start),
'endtime' => self::JsonToDateTime($program->end),
'shift' => 0,
'program' => new \Model\Program($program->program)
'program' => new \Model\Program((object) $program->program)
];
}
@@ -49,11 +49,11 @@ class RadioController extends Controller
public function program($id)
{
$apiResult = $this->API('programma/details/' . (int)$id);
$apiResult = (object) $this->API('programma/details/' . (int)$id);
if($apiResult == null) {
return abort(404);
}
return view('radioprogram', ['program' => new \Model\Program($apiResult)]);
return view('radioprogram', ['program' => new \Model\Program((object) $apiResult)]);
}
public function podcast(Request $request, $id, $title = '')
@@ -63,11 +63,11 @@ class RadioController extends Controller
}
parent::registerView($request, 'podcast', $id);
$apiResult = $this->API('podcast/details/' . (int)$id);
$podcast = new \Model\Podcast($apiResult);
$apiResult = (object) $this->API('podcast/details/' . (int)$id);
$podcast = new \Model\Podcast((object) $apiResult);
$page = (int)$request->get('pagina', 1);
$apiResult = $this->API('podcast/overzicht?pagina=' . (int)max(1, $page) . '&aantal=6');
$apiResult = (object) $this->API('podcast/overzicht?pagina=' . (int)max(1, $page) . '&aantal=6');
$podcasts = [];
foreach($apiResult->podcasts as $_podcast)
{
@@ -83,7 +83,7 @@ class RadioController extends Controller
$viewData = [];
if((int)$programma > 0) {
$action = 'programma/' . (int)$programma;
$viewData['program'] = new \Model\Program($this->API('programma/details/' . (int)$programma));
$viewData['program'] = new \Model\Program((object) $this->API('programma/details/' . (int)$programma));
}
return $this->getPodcastList($request, $action, array_merge($this->getSidebareData(), $viewData));
@@ -99,13 +99,13 @@ class RadioController extends Controller
$programs = [];
$now = new \DateTimeImmutable('2 minutes ago');
$page = (int)$request->get('pagina', 1);
$apiResult = $this->API('programma/schema/recent?pagina=' . (int)max(1, $page) . '&aantal=12');
$apiResult = (object) $this->API('programma/schema/recent?pagina=' . (int)max(1, $page) . '&aantal=12');
foreach($apiResult->schedule as $item) {
if(!$item->program->nonstop && !$item->program->rerun) {
$item->start = self::JsonToDateTime($item->start);
$item->end = self::JsonToDateTime($item->end);
$item->current = $item->end >= $now;
$item->program = new \Model\Program($item->program);
$item->program = new \Model\Program((object) $item->program);
$programs[] = $item;
}
}
@@ -116,11 +116,11 @@ class RadioController extends Controller
private function getPodcastList(Request $request, $action, $viewData = [])
{
$page = (int)$request->get('pagina', 1);
$apiResult = $this->API('podcast/' . $action . '?pagina=' . (int)max(1, $page) . '&aantal=12');
$apiResult = (object) $this->API('podcast/' . $action . '?pagina=' . (int)max(1, $page) . '&aantal=12');
$podcasts = [];
foreach($apiResult->podcasts as $podcast)
{
$podcasts[] = new \Model\Podcast($podcast);
$podcasts[] = new \Model\Podcast((object) $podcast);
}
return view($request->ajax() ? 'partial/podcastitems' : 'podcastlist', array_merge($viewData, ['id' => 'items-podcasts', 'podcasts' => $podcasts, 'searchURL' => 'gemist/zoeken', 'isPodcast' => false]));
+2 -2
View File
@@ -61,11 +61,11 @@ class SpecialController extends Controller
public function bart(Request $request)
{
$page = (int)$request->get('pagina', 1);
$apiResult = $this->API('blog/overzicht/2019-07-01/2019-07-10?pagina=' . (int)max(1, $page));
$apiResult = (object) $this->API('blog/overzicht/2019-07-01/2019-07-10?pagina=' . (int)max(1, $page));
$blog = [];
foreach($apiResult->items as $blogItem)
{
$blog[] = new \Model\NewsItem($blogItem);
$blog[] = new \Model\NewsItem((object) $blogItem);
}
return view($request->ajax() ? 'bloglistitems' : 'bloglist', ['title' => 'De Nacht van Bart - 6 juli 2019', 'items' => $blog]);