_uf = $config->userFramework; if ($this->_uf == 'WordPress') { $this->_settings = array('wpBasePage' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME); } CRM_Utils_System::setTitle( ts('Settings - %1 Integration', array(1 => $this->_uf)) ); $this->addElement('text', 'userFrameworkUsersTableName', ts('%1 Users Table Name', array(1 => $this->_uf))); if ( function_exists('module_exists') && module_exists('views') && $config->dsn != $config->userFrameworkDSN ) { $dsnArray = DB::parseDSN($config->dsn); $tableNames = CRM_Core_DAO::GetStorageValues(NULL, 0, 'Name'); $tablePrefixes = '$databases[\'default\'][\'default\'][\'prefix\']= array('; foreach ($tableNames as $tableName => $value) { $tablePrefixes .= "\n '" . str_pad($tableName . "'", 41) . " => '`{$dsnArray['database']}`.',"; } $tablePrefixes .= "\n);"; $this->assign('tablePrefixes', $tablePrefixes); } parent::buildQuickForm(); } }