Skip to content

Commit

Permalink
Merge pull request civicrm#13803 from herbdool/issue-13788-alt
Browse files Browse the repository at this point in the history
 civicrm/admin/setting/uf - Fix advice about Backdrop Views ($database_prefix)
  • Loading branch information
eileenmcnaughton authored Mar 13, 2019
2 parents d873b01 + 8ea02f9 commit 983f062
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CRM/Admin/Form/Setting/UF.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ function_exists('module_exists') &&
$dsnArray = DB::parseDSN($config->dsn);
$tableNames = CRM_Core_DAO::getTableNames();
$tablePrefixes = '$databases[\'default\'][\'default\'][\'prefix\']= array(';
if ($config->userFramework === 'Backdrop') {
$tablePrefixes = '$database_prefix = array(';
}
$tablePrefixes .= "\n 'default' => '$drupal_prefix',"; // add default prefix: the drupal database prefix
$prefix = "";
if ($config->dsn != $config->userFrameworkDSN) {
Expand Down
2 changes: 1 addition & 1 deletion templates/CRM/Admin/Form/Setting/UF.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<div class="form-item">
<fieldset>
<legend>{ts}Views integration settings{/ts}</legend>
<div>{ts}To enable CiviCRM Views integration, add the following to the site <code>settings.php</code> file:{/ts}</div>
<div>{ts}To enable CiviCRM Views integration, add or update the following item in the <code>settings.php</code> file:{/ts}</div>
<pre>{$tablePrefixes}</pre>
</fieldset>
</div>
Expand Down

0 comments on commit 983f062

Please sign in to comment.