From 4ddc6588b697f1d098ae105f9c375fd6f62ee1af Mon Sep 17 00:00:00 2001 From: Momchil Bozhinov Date: Wed, 24 Feb 2021 10:52:04 +0200 Subject: [PATCH] * fixes --- php/cbsd.php | 2 +- php/clonos.php | 4 ++-- public/vnc.php | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/php/cbsd.php b/php/cbsd.php index f090a755..c2ce11b9 100644 --- a/php/cbsd.php +++ b/php/cbsd.php @@ -54,7 +54,7 @@ class CBSD { } } - function static register_media($path,$file,$ext) + static function register_media($path,$file,$ext) { $cmd='cbsd media mode=register name=%s path=%s type=%s'; $res=self::run($cmd, array($file, $path.$file, $ext)); diff --git a/php/clonos.php b/php/clonos.php index dee58e4b..1c2f28c3 100644 --- a/php/clonos.php +++ b/php/clonos.php @@ -79,7 +79,7 @@ class ClonOS { $this->server_name=$_SERVER['SERVER_ADDR']; } - if (is_null($uri_chunks) { # TODO Do we need this ? + if (is_null($uri_chunks)) { # TODO Do we need this ? $this->uri_chunks=Utils::gen_uri_chunks($uri); } else { $this->uri_chunks=$uri_chunks; @@ -799,7 +799,7 @@ class ClonOS { foreach($arr_copy as $a){ if(isset($form[$a]) && $form[$a]=='on'){ $arr[$a]=1; - } else-{ + } else { $arr[$a]=0; } } diff --git a/public/vnc.php b/public/vnc.php index 9dac824a..211762b1 100644 --- a/public/vnc.php +++ b/public/vnc.php @@ -1,4 +1,5 @@ selectOne("SELECT vnc_password FROM bhyve WHERE jname=?", array([$jname])); + $res=(new Db('base','local'))->selectOne("SELECT vnc_password FROM bhyve WHERE jname=?", array([$jname])); $pass='cbsd'; if($res!==false) $pass=$res['vnc_password'];