/** * Full detection * * Make sure that everything is OK for full import. * Use $this->addMessage($html) to add status messages. * If you return false, remember also to fill $this->error * * @return bool */ public function detect() { // Initialize detection (calls $this->detectComponent() and $this->getVersion()) if (!parent::detect()) { return false; } return true; }
/** * Full detection * * Make sure that everything is OK for full import. * Use $this->addMessage($html) to add status messages. * If you return false, remember also to fill $this->error * * @return bool */ public function detect() { // Initialize detection (also calls $this->detectComponent()) if (!parent::detect()) { return false; } // Check RokBridge if ($this->rokbridge && $this->rokbridge->get('phpbb3_path')) { $this->addMessage('<div>RokBridge: <b style="color:green">detected</b></div>'); } // Check authentication method $query = "SELECT config_value FROM #__config WHERE config_name='auth_method'"; $this->ext_database->setQuery($query); $auth_method = $this->ext_database->loadResult() or die("<br />Invalid query:<br />{$query}<br />" . $this->ext_database->errorMsg()); $this->addMessage('<div>phpBB authentication method: <b style="color:green">' . $auth_method . '</b></div>'); // Find out which field is used as username $fields = $this->ext_database->getTableFields('#__users'); $this->login_field = isset($fields['#__users']['login_name']); return true; }