summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Mazoyer <respawneral@gmail.com>2014-05-29 16:58:54 +0200
committerGuillaume Mazoyer <respawneral@gmail.com>2014-05-29 16:58:54 +0200
commite00d3fc0ba3da807791267ae16a7aa40e7445023 (patch)
tree392d2d512c3e34663a9be6726d5f74b793544fe5
parent2d04c6386109fd44d53e6c0eb2166feea56522e3 (diff)
Remove ugly includes.
-rw-r--r--router.php7
1 files 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':