Loading app/Controllers/Install.php +1 −3 Original line number Diff line number Diff line Loading @@ -44,7 +44,7 @@ class Install extends Controller $dotenv->load(); } catch (\Throwable $e) { return $this->createEnv(); $this->createEnv(); } // Check if the created .env file is writable to continue install process Loading Loading @@ -139,8 +139,6 @@ class Install extends Controller // Could not create the .env file, redirect to a view with manual instructions on how to add it return view('install/manual_config'); } return redirect()->back(); } public function instanceConfig() Loading app/Entities/AnalyticsWebsiteByEntryPage.php +0 −6 Original line number Diff line number Diff line Loading @@ -20,10 +20,4 @@ class AnalyticsWebsiteByEntryPage extends Entity 'date' => 'datetime', 'hits' => 'integer', ]; public function getLabels() { $split = explode('/', $this->attributes['labels']); return $split[count($split) - 1]; } } app/Helpers/url_helper.php +2 −2 Original line number Diff line number Diff line Loading @@ -8,13 +8,13 @@ if (!function_exists('host_url')) { */ function host_url() { if (isset($_SERVER['host'])) { if (isset($_SERVER['HTTP_HOST'])) { $protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || $_SERVER['SERVER_PORT'] == 443 ? 'https://' : 'http://'; return $protocol + $_SERVER['host']; return $protocol . $_SERVER['HTTP_HOST'] . '/'; } return false; Loading app/Models/AnalyticsPodcastByCountryModel.php +4 −6 Original line number Diff line number Diff line Loading @@ -32,10 +32,9 @@ class AnalyticsPodcastByCountryModel extends Model */ public function getDataWeekly(int $podcastId): array { $locale = service('request')->getLocale(); if ( !($found = cache( "{$podcastId}_analytics_podcast_by_country_weekly_{$locale}" "{$podcastId}_analytics_podcast_by_country_weekly" )) ) { $found = $this->select('`country_code` as `labels`') Loading @@ -49,7 +48,7 @@ class AnalyticsPodcastByCountryModel extends Model ->findAll(10); cache()->save( "{$podcastId}_analytics_podcast_by_country_weekly_{$locale}", "{$podcastId}_analytics_podcast_by_country_weekly", $found, 600 ); Loading @@ -66,10 +65,9 @@ class AnalyticsPodcastByCountryModel extends Model */ public function getDataYearly(int $podcastId): array { $locale = service('request')->getLocale(); if ( !($found = cache( "{$podcastId}_analytics_podcast_by_country_yearly_{$locale}" "{$podcastId}_analytics_podcast_by_country_yearly" )) ) { $found = $this->select('`country_code` as `labels`') Loading @@ -83,7 +81,7 @@ class AnalyticsPodcastByCountryModel extends Model ->findAll(10); cache()->save( "{$podcastId}_analytics_podcast_by_country_yearly_{$locale}", "{$podcastId}_analytics_podcast_by_country_yearly", $found, 600 ); Loading app/Models/AnalyticsPodcastByPlayerModel.php +1 −0 Original line number Diff line number Diff line Loading @@ -112,6 +112,7 @@ class AnalyticsPodcastByPlayerModel extends Model ->where([ '`podcast_id`' => $podcastId, '`app` !=' => '', '`os` !=' => '', '`bot`' => 0, '`date` >' => date('Y-m-d', strtotime('-1 week')), ]) Loading Loading
app/Controllers/Install.php +1 −3 Original line number Diff line number Diff line Loading @@ -44,7 +44,7 @@ class Install extends Controller $dotenv->load(); } catch (\Throwable $e) { return $this->createEnv(); $this->createEnv(); } // Check if the created .env file is writable to continue install process Loading Loading @@ -139,8 +139,6 @@ class Install extends Controller // Could not create the .env file, redirect to a view with manual instructions on how to add it return view('install/manual_config'); } return redirect()->back(); } public function instanceConfig() Loading
app/Entities/AnalyticsWebsiteByEntryPage.php +0 −6 Original line number Diff line number Diff line Loading @@ -20,10 +20,4 @@ class AnalyticsWebsiteByEntryPage extends Entity 'date' => 'datetime', 'hits' => 'integer', ]; public function getLabels() { $split = explode('/', $this->attributes['labels']); return $split[count($split) - 1]; } }
app/Helpers/url_helper.php +2 −2 Original line number Diff line number Diff line Loading @@ -8,13 +8,13 @@ if (!function_exists('host_url')) { */ function host_url() { if (isset($_SERVER['host'])) { if (isset($_SERVER['HTTP_HOST'])) { $protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || $_SERVER['SERVER_PORT'] == 443 ? 'https://' : 'http://'; return $protocol + $_SERVER['host']; return $protocol . $_SERVER['HTTP_HOST'] . '/'; } return false; Loading
app/Models/AnalyticsPodcastByCountryModel.php +4 −6 Original line number Diff line number Diff line Loading @@ -32,10 +32,9 @@ class AnalyticsPodcastByCountryModel extends Model */ public function getDataWeekly(int $podcastId): array { $locale = service('request')->getLocale(); if ( !($found = cache( "{$podcastId}_analytics_podcast_by_country_weekly_{$locale}" "{$podcastId}_analytics_podcast_by_country_weekly" )) ) { $found = $this->select('`country_code` as `labels`') Loading @@ -49,7 +48,7 @@ class AnalyticsPodcastByCountryModel extends Model ->findAll(10); cache()->save( "{$podcastId}_analytics_podcast_by_country_weekly_{$locale}", "{$podcastId}_analytics_podcast_by_country_weekly", $found, 600 ); Loading @@ -66,10 +65,9 @@ class AnalyticsPodcastByCountryModel extends Model */ public function getDataYearly(int $podcastId): array { $locale = service('request')->getLocale(); if ( !($found = cache( "{$podcastId}_analytics_podcast_by_country_yearly_{$locale}" "{$podcastId}_analytics_podcast_by_country_yearly" )) ) { $found = $this->select('`country_code` as `labels`') Loading @@ -83,7 +81,7 @@ class AnalyticsPodcastByCountryModel extends Model ->findAll(10); cache()->save( "{$podcastId}_analytics_podcast_by_country_yearly_{$locale}", "{$podcastId}_analytics_podcast_by_country_yearly", $found, 600 ); Loading
app/Models/AnalyticsPodcastByPlayerModel.php +1 −0 Original line number Diff line number Diff line Loading @@ -112,6 +112,7 @@ class AnalyticsPodcastByPlayerModel extends Model ->where([ '`podcast_id`' => $podcastId, '`app` !=' => '', '`os` !=' => '', '`bot`' => 0, '`date` >' => date('Y-m-d', strtotime('-1 week')), ]) Loading