Switch table mapping to square bracket array syntax.
authorMikey O'Toole <mikey@mjco.uk>
Mon, 7 Jun 2021 15:50:34 +0000 (16:50 +0100)
committerGitHub <noreply@github.com>
Mon, 7 Jun 2021 15:50:34 +0000 (16:50 +0100)
CRM/Admin/Form/Setting/UF.php

index 06acdb081ad7cba38fea4bb9fd630eb080a9ba56..c59013a076396498c19fd22c76251850acfa17cc 100644 (file)
@@ -71,9 +71,9 @@ class CRM_Admin_Form_Setting_UF extends CRM_Admin_Form_Setting {
       $dsnArray = DB::parseDSN($dsn);
       $tableNames = CRM_Core_DAO::getTableNames();
       asort($tableNames);
-      $tablePrefixes = '$databases[\'default\'][\'default\'][\'prefix\']= array(';
+      $tablePrefixes = '$databases[\'default\'][\'default\'][\'prefix\']= [';
       if ($config->userFramework === 'Backdrop') {
-        $tablePrefixes = '$database_prefix = array(';
+        $tablePrefixes = '$database_prefix = [';
       }
       // add default prefix: the drupal database prefix
       $tablePrefixes .= "\n  'default' => '$drupal_prefix',";
@@ -87,7 +87,7 @@ class CRM_Admin_Form_Setting_UF extends CRM_Admin_Form_Setting {
       foreach ($tableNames as $tableName) {
         $tablePrefixes .= "\n  '" . str_pad($tableName . "'", 41) . " => '{$prefix}',";
       }
-      $tablePrefixes .= "\n);";
+      $tablePrefixes .= "\n];";
       $this->assign('tablePrefixes', $tablePrefixes);
     }