<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.6 |
+ | CiviCRM version 4.7 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
- * $Id$
- *
+ * @copyright CiviCRM LLC (c) 2004-2015
*/
/**
- * form helper class for an OpenID object
+ * Form helper class for an OpenID object.
*/
class CRM_Contact_Form_Inline_OpenID extends CRM_Contact_Form_Inline {
/**
- * Ims of the contact that is been viewed
+ * Ims of the contact that is been viewed.
*/
private $_openids = array();
/**
- * No of openid blocks for inline edit
+ * No of openid blocks for inline edit.
*/
private $_blockCount = 6;
/**
- * Call preprocess
+ * Call preprocess.
*/
public function preProcess() {
parent::preProcess();
}
/**
- * Build the form object elements for openID object
- *
- * @return void
+ * Build the form object elements for openID object.
*/
public function buildQuickForm() {
parent::buildQuickForm();
}
/**
- * Global validation rules for the form
+ * Global validation rules for the form.
*
* @param array $fields
* Posted values of the form.
}
/**
- * Set defaults for the form
+ * Set defaults for the form.
*
* @return array
*/
}
/**
- * Process the form
- *
- * @return void
+ * Process the form.
*/
public function postProcess() {
$params = $this->exportValues();
// Process / save openID
$params['contact_id'] = $this->_contactId;
$params['updateBlankLocInfo'] = TRUE;
+ $params['openid']['isIdSet'] = TRUE;
+ foreach ($this->_openids as $count => $value) {
+ if (!empty($value['id']) && isset($params['openid'][$count])) {
+ $params['openid'][$count]['id'] = $value['id'];
+ }
+ }
CRM_Core_BAO_Block::create('openid', $params);
$this->log();