<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.4 |
+ | CiviCRM version 4.5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013 |
+ | Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
* $Id$
*
*/
/**
* Function to build the form
*
- * @return None
+ * @return void
* @access public
*/
public function buildQuickForm() {
return $errors;
}
+ /**
+ * @return array
+ */
private function _getComponentSelectValues() {
$ret = array();
$this->_components = CRM_Core_Component::getComponents();
CRM_Core_BAO_Navigation::resetNavigation();
}
+ /**
+ * @param $dsn
+ * @param $fileName
+ * @param bool $lineMode
+ */
public static function loadCaseSampleData($dsn, $fileName, $lineMode = FALSE) {
global $crmPath;
die("Cannot open $dsn: " . $db->getMessage());
}
+ $domain = new CRM_Core_DAO_Domain();
+ $domain->find(TRUE);
+ $multiLingual = (bool) $domain->locales;
+ $smarty = CRM_Core_Smarty::singleton();
+ $smarty->assign('multilingual', $multiLingual);
+ $smarty->assign('locales', explode(CRM_Core_DAO::VALUE_SEPARATOR, $domain->locales));
+
if (!$lineMode) {
- $string = file_get_contents($fileName);
+ $string = $smarty->fetch($fileName);
// change \r\n to fix windows issues
$string = str_replace("\r\n", "\n", $string);