X-Git-Url: http://git.dj3c1t.com/?a=blobdiff_plain;f=mw%2Fapp%2Fdata%2Fimpl%2Fmw_mysql.php;fp=mw%2Fapp%2Fdata%2Fimpl%2Fmw_mysql.php;h=3d146c4fa7d7a3fa6133fcadb4e37b13ecc43986;hb=0ada6496e6c552c473a5816734b38896ccdd345b;hp=ba8f56a13a1a4c4e17f7c2c3c6b09f105f833e59;hpb=c8731e3a31f51a93cfff9fe7206dd6fb007bc733;p=mtweb diff --git a/mw/app/data/impl/mw_mysql.php b/mw/app/data/impl/mw_mysql.php index ba8f56a..3d146c4 100644 --- a/mw/app/data/impl/mw_mysql.php +++ b/mw/app/data/impl/mw_mysql.php @@ -13,11 +13,15 @@ function extention_ok(&$env) { return $this->EXTENTION_OK; } - function mw_mysql($host, $base, $user, $password){ - $this->host = $host; - $this->base = $base; - $this->user = $user; - $this->password = $password; + function authentication_required() { return true; } + + function sgbd_name() { return "MySql"; } + + function mw_mysql($params = array()){ + $this->host = isset($params["host"]) ? $params["host"] : "localhost"; + $this->base = isset($params["base"]) ? $params["base"] : "mtweb"; + $this->user = isset($params["user"]) ? $params["user"] : ""; + $this->password = isset($params["password"]) ? $params["password"] : ""; $this->EXTENTION_OK = function_exists("mysql_connect"); }