diff --git a/app/Downloader.php b/app/Downloader.php index 3be8ed8..ad8122f 100644 --- a/app/Downloader.php +++ b/app/Downloader.php @@ -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 { diff --git a/app/Wikipage.php b/app/Wikipage.php index e452e78..f3f9c5f 100644 --- a/app/Wikipage.php +++ b/app/Wikipage.php @@ -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);