+--------------------------------------------------------------------+
| CiviCRM version 4.6 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
* $Id$
*
*/
public function run($file) {
// read xml file
$dom = new DomDocument();
- if (! $dom->load($file)) {
+ if (!$dom->load($file)) {
throw new CRM_Core_Exception("Failed to parse XML file \"$file\"");
}
$dom->xinclude();
}
}
- $fields = & $dao->fields();
+ $fields = &$dao->fields();
foreach ($fields as $name => $dontCare) {
if (isset($xml->$name)) {
$value = (string ) $xml->$name;
// fix extends stuff if it exists
if (isset($customGroupXML->extends_entity_column_value_option_group) &&
- isset($customGroupXML->extends_entity_column_value)) {
+ isset($customGroupXML->extends_entity_column_value)
+ ) {
$valueIDs = array();
$optionValues = explode(",", $customGroupXML->extends_entity_column_value);
$optValues = implode("','", $optionValues);
'String',
),
);
- $dao = & CRM_Core_DAO::executeQuery($sql, $params);
+ $dao = &CRM_Core_DAO::executeQuery($sql, $params);
while ($dao->fetch()) {
$valueIDs[] = $dao->value;
}
if (!empty($valueIDs)) {
$customGroup->extends_entity_column_value = CRM_Core_DAO::VALUE_SEPARATOR . implode(CRM_Core_DAO::VALUE_SEPARATOR,
- $valueIDs
- ) . CRM_Core_DAO::VALUE_SEPARATOR;
+ $valueIDs
+ ) . CRM_Core_DAO::VALUE_SEPARATOR;
unset($valueIDs);
if (is_array($optionIDs) && !empty($optionIDs)) {
$customGroup->extends_entity_column_value = CRM_Core_DAO::VALUE_SEPARATOR . implode(CRM_Core_DAO::VALUE_SEPARATOR,
- array_keys($optionIDs)
- ) . CRM_Core_DAO::VALUE_SEPARATOR;
+ array_keys($optionIDs)
+ ) . CRM_Core_DAO::VALUE_SEPARATOR;
$saveAgain = TRUE;
}
$cfID = CRM_Core_DAO::singleValueQuery($sql, $params);
if (!$cfID) {
CRM_Core_Error::fatal(ts("Could not find custom field for %1, %2, %3",
- array(
- 1 => $profileField->field_name,
- 2 => $tableName,
- 3 => $columnName,
- )
- ) . "<br />");
+ array(
+ 1 => $profileField->field_name,
+ 2 => $tableName,
+ 3 => $columnName,
+ )
+ ) . "<br />");
}
$profileField->field_name = "custom_{$cfID}";
}
}
}
}
+
}