diff options
author | Guillaume Mazoyer <respawneral@gmail.com> | 2014-05-29 16:58:54 +0200 |
---|---|---|
committer | Guillaume Mazoyer <respawneral@gmail.com> | 2014-05-29 16:58:54 +0200 |
commit | e00d3fc0ba3da807791267ae16a7aa40e7445023 (patch) | |
tree | 392d2d512c3e34663a9be6726d5f74b793544fe5 | |
parent | 2d04c6386109fd44d53e6c0eb2166feea56522e3 (diff) |
Remove ugly includes.
-rw-r--r-- | router.php | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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': |