+--------------------------------------------------------------------+
| CiviCRM version 5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2018 |
+ | Copyright CiviCRM LLC (c) 2004-2019 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2018
+ * @copyright CiviCRM LLC (c) 2004-2019
* $Id$
*
*/
/**
* @var array (string $name => mixed $value) a list of variables ot save temporarily
*/
- private $backupFrames = array();
+ private $backupFrames = [];
/**
* Class constructor.
$config = CRM_Core_Config::singleton();
if (isset($config->customTemplateDir) && $config->customTemplateDir) {
- $this->template_dir = array_merge(array($config->customTemplateDir),
+ $this->template_dir = array_merge([$config->customTemplateDir],
$config->templateDir
);
}
$pluginsDir = __DIR__ . DIRECTORY_SEPARATOR . 'Smarty' . DIRECTORY_SEPARATOR . 'plugins' . DIRECTORY_SEPARATOR;
if ($customPluginsDir) {
- $this->plugins_dir = array($customPluginsDir, $smartyDir . 'plugins', $pluginsDir);
+ $this->plugins_dir = [$customPluginsDir, $smartyDir . 'plugins', $pluginsDir];
}
else {
- $this->plugins_dir = array($smartyDir . 'plugins', $pluginsDir);
+ $this->plugins_dir = [$smartyDir . 'plugins', $pluginsDir];
}
// add the session and the config here
// CRM-7163 hack: we don’t display langSwitch on upgrades anyway
if (!CRM_Core_Config::isUpgradeMode()) {
- $this->assign('langSwitch', CRM_Core_I18n::languages(TRUE));
+ $this->assign('langSwitch', CRM_Core_I18n::uiLanguages());
}
- $this->register_function('crmURL', array('CRM_Utils_System', 'crmURL'));
+ $this->register_function('crmURL', ['CRM_Utils_System', 'crmURL']);
$this->load_filter('pre', 'resetExtScope');
$this->assign('crmPermissions', new CRM_Core_Smarty_Permissions());
array_unshift($this->template_dir, $path);
}
else {
- $this->template_dir = array($path, $this->template_dir);
+ $this->template_dir = [$path, $this->template_dir];
}
}
*/
public function pushScope($vars) {
$oldVars = $this->get_template_vars();
- $backupFrame = array();
+ $backupFrame = [];
foreach ($vars as $key => $value) {
$backupFrame[$key] = isset($oldVars[$key]) ? $oldVars[$key] : NULL;
}