diff --git a/src/Aviat/AnimeClient/Dispatcher.php b/src/Aviat/AnimeClient/Dispatcher.php index deb9211c..9c6add5c 100644 --- a/src/Aviat/AnimeClient/Dispatcher.php +++ b/src/Aviat/AnimeClient/Dispatcher.php @@ -223,7 +223,7 @@ class Dispatcher extends RoutingBase { */ public function _setup_routes() { - $output_routes = []; + $routes = []; $route_type = $this->get_controller(); @@ -254,20 +254,20 @@ class Dispatcher extends RoutingBase { // Add the route to the router object if ( ! array_key_exists('tokens', $route)) { - $output_routes[] = $this->router->$add($name, $path)->addValues($route); + $routes[] = $this->router->$add($name, $path)->addValues($route); } else { $tokens = $route['tokens']; unset($route['tokens']); - $output_routes[] = $this->router->$add($name, $path) + $routes[] = $this->router->$add($name, $path) ->addValues($route) ->addTokens($tokens); } } - return $output_routes; + return $routes; } } // End of Dispatcher.php \ No newline at end of file diff --git a/src/Aviat/AnimeClient/Model/API.php b/src/Aviat/AnimeClient/Model/API.php index 335c1a29..dd406b43 100644 --- a/src/Aviat/AnimeClient/Model/API.php +++ b/src/Aviat/AnimeClient/Model/API.php @@ -63,8 +63,8 @@ class API extends BaseModel { 'User-Agent' => "Tim's Anime Client/2.0", 'Accept-Encoding' => 'application/json' ], - 'timeout' => 5, - 'connect_timeout' => 5 + 'timeout' => 25, + 'connect_timeout' => 25 ] ]); } diff --git a/src/Aviat/AnimeClient/Model/AnimeCollection.php b/src/Aviat/AnimeClient/Model/AnimeCollection.php index 796953c1..1bae0e5b 100644 --- a/src/Aviat/AnimeClient/Model/AnimeCollection.php +++ b/src/Aviat/AnimeClient/Model/AnimeCollection.php @@ -50,8 +50,15 @@ class AnimeCollection extends DB { $db_file_name = $this->db_config['collection']['file']; if ($db_file_name !== ':memory:') { - $db_file = @file_get_contents($db_file_name); - $this->valid_database = (strpos($db_file, 'SQLite format 3') === 0); + if (file_exists($db_file_name)) + { + $db_file = file_get_contents($db_file_name); + $this->valid_database = (strpos($db_file, 'SQLite format 3') === 0); + } + else + { + $this->valid_database = FALSE; + } } else { diff --git a/src/Aviat/Ion/View/HtmlView.php b/src/Aviat/Ion/View/HtmlView.php index 1a960c26..bacdd02f 100644 --- a/src/Aviat/Ion/View/HtmlView.php +++ b/src/Aviat/Ion/View/HtmlView.php @@ -51,7 +51,7 @@ class HtmlView extends HttpView { ob_start(); extract($data); - include $path; + include_once $path; $buffer = ob_get_contents(); ob_end_clean();