Archived
1
0
Fork 0

Фикс парсера Квестбука (появились игры без авторов)

This commit is contained in:
Alexander Yakovlev 2019-02-08 23:45:35 +07:00
parent 6ad58558e2
commit 026e716025
Signed by: oreolek
GPG key ID: 1CDC4B7820C93BD3
2 changed files with 5 additions and 5 deletions

View file

@ -50,11 +50,11 @@ class Questbook extends Source {
$date = strtotime($gameBlock['pubDate']);
if ($date < $this->period) continue;
$game = new Game;
$game->title = trim($gameBlock['title']);
$game->url = trim($gameBlock['link']);
$game->title = trim($gameBlock['title'] ?? '');
$game->url = trim($gameBlock['link'] ?? '');
$game->url = str_replace('http://', 'https://', $game->url);
$game->description = trim($gameBlock['description']);
$game->author = trim($gameBlock['author']);
$game->description = trim($gameBlock['description'] ?? '');
$game->author = trim($gameBlock['author'] ?? '');
$this->output .= $game->print();
}
}

View file

@ -1,7 +1,7 @@
#!/usr/bin/php
<?php
/*
A set of utilities for tracking text-based game releases
* Скрипт для того, чтобы заводить страницы русской IFWiki играм КРИЛа
Copyright (C) 2017-2018 Alexander Yakovlev
This program is free software: you can redistribute it and/or modify