Index: branches/5.2.x/core/install.php =================================================================== diff -u -N -r14585 -r14609 --- branches/5.2.x/core/install.php (.../install.php) (revision 14585) +++ branches/5.2.x/core/install.php (.../install.php) (revision 14609) @@ -1,6 +1,6 @@ stepsPreset = $preset; } - function GetVar($name) + /** + * Returns variable from request + * + * @param string $name + * @return string|bool + * @access private + */ + private function GetVar($name) { return array_key_exists($name, $_REQUEST) ? $_REQUEST[$name] : false; } - function SetVar($name, $value) + /** + * Sets new value for request variable + * + * @param string $name + * @param mixed $value + * @return void + * @access private + */ + private function SetVar($name, $value) { $_REQUEST[$name] = $value; } @@ -1177,6 +1192,8 @@ } $upgrade_object = new $upgrade_classes[$module_path](); + /* @var $upgrade_object CoreUpgrades */ + $upgrade_object->setToolkit($this->toolkit); return $upgrade_object; @@ -1254,17 +1271,12 @@ } $this->Conn = new kDBConnection($this->toolkit->getSystemConfig('Database', 'DBType'), Array(&$this, 'DBErrorHandler')); - $this->Conn->Connect( - $this->toolkit->getSystemConfig('Database', 'DBHost'), - $this->toolkit->getSystemConfig('Database', 'DBUser'), - $this->toolkit->getSystemConfig('Database', 'DBUserPassword'), - $this->toolkit->getSystemConfig('Database', 'DBName') - ); + $this->Conn->setup( $this->toolkit->systemConfig ); // setup toolkit too $this->toolkit->Conn =& $this->Conn; - return $this->Conn->errorCode == 0; + return !$this->Conn->hasError(); } /**