From e00d3fc0ba3da807791267ae16a7aa40e7445023 Mon Sep 17 00:00:00 2001 From: Guillaume Mazoyer Date: Thu, 29 May 2014 16:58:54 +0200 Subject: Remove ugly includes. --- router.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/router.php b/router.php index 30187e3..f19e6d0 100644 --- a/router.php +++ b/router.php @@ -19,6 +19,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +require_once 'config.php'; require_once 'utils.php'; class Router { @@ -30,7 +31,7 @@ class Router { private $requester; public function __construct($id, $requester) { - include 'config.php'; + global $config; $this->id = $id; $this->host = $config['routers'][$id]['host']; @@ -40,14 +41,14 @@ class Router { } private function log_command($command) { - include 'config.php'; + global $config; file_put_contents($config['misc']['logs'], $command, FILE_APPEND | LOCK_EX); } public function connect() { - include 'config.php'; + global $config; switch ($this->auth) { case 'ssh-password': -- cgit v1.2.3