APP_DEBUG
This commit is contained in:
parent
48fc63ac43
commit
90cfb5ca72
|
@ -35,7 +35,7 @@ class Downloader {
|
|||
'timeout' => 30,
|
||||
]);
|
||||
}
|
||||
if (env('DEBUG') && Cache::has($url)) {
|
||||
if (env('APP_DEBUG') && Cache::has($url)) {
|
||||
return Cache::get($url);
|
||||
}
|
||||
try {
|
||||
|
|
|
@ -39,7 +39,7 @@ class Wikipage {
|
|||
public function __construct($game) {
|
||||
$this->game = $game;
|
||||
|
||||
if (!env('DRY_RUN')) {
|
||||
if (!env('APP_DEBUG')) {
|
||||
try {
|
||||
// Log in to a wiki
|
||||
$api = new MediawikiApi( env('WIKI') );
|
||||
|
@ -80,7 +80,7 @@ class Wikipage {
|
|||
return;
|
||||
}
|
||||
$exists = $this->exists($pagetitle);
|
||||
if (!env('DRY_RUN') && !$exists) {
|
||||
if (!env('APP_DEBUG') && !$exists) {
|
||||
if (!empty($this->game->image_url) && isset($filename)) {
|
||||
if ($this->services->newPageGetter()->getFromTitle($this->covername)) {
|
||||
try {
|
||||
|
@ -102,7 +102,7 @@ class Wikipage {
|
|||
|
||||
$this->makeContent();
|
||||
|
||||
if (!env('DRY_RUN') && !$exists) {
|
||||
if (!env('APP_DEBUG') && !$exists) {
|
||||
$newContent = new Content( $this->content );
|
||||
$title = new Title($pagetitle);
|
||||
$identifier = new PageIdentifier($title);
|
||||
|
@ -115,7 +115,7 @@ class Wikipage {
|
|||
echo $this->content;
|
||||
return false;
|
||||
}
|
||||
if (env('DRY_RUN')) {
|
||||
if (env('APP_DEBUG')) {
|
||||
echo "Черновой режим. Автосоздание невозможно.\n";
|
||||
}
|
||||
echo $this->content;
|
||||
|
@ -201,7 +201,7 @@ class Wikipage {
|
|||
* @return boolean
|
||||
*/
|
||||
protected function exists($pagename) {
|
||||
if (env('DRY_RUN')) {
|
||||
if (env('APP_DEBUG')) {
|
||||
return false;
|
||||
}
|
||||
$page = $this->services->newPageGetter()->getFromTitle((string) $pagename);
|
||||
|
|
Loading…
Reference in a new issue