//set address block defaults
CRM_Contact_Form_Edit_Address::setDefaultValues( $defaults, $this );
+
if (!empty($defaults['image_URL'])) {
- list($imageWidth, $imageHeight) = getimagesize($defaults['image_URL']);
+ list($imageWidth, $imageHeight) = getimagesize(CRM_Utils_String::unstupifyUrl($defaults['image_URL']));
list($imageThumbWidth, $imageThumbHeight) = CRM_Contact_BAO_Contact::getThumbSize($imageWidth, $imageHeight);
$this->assign('imageWidth', $imageWidth);
$this->assign('imageHeight', $imageHeight);
/**
* global validation rules for the form
*
- * @param array $fields posted values of the form
- * @param array $errors list of errors to be posted back to the form
- * @param int $contactId contact id if doing update.
+ * @param array $fields posted values of the form
+ * @param array $errors list of errors to be posted back to the form
+ * @param int $contactId contact id if doing update.
*
- * @return $primaryID email/openId
- * @static
+ * @return bool $primaryID email/openId@static
* @access public
*/
static function formRule($fields, &$errors, $contactId = NULL) {
/**
* Function to that checks for duplicate contacts
*
- * @param array $fields fields array which are submitted
- * @param array $error error message array
- * @param int $contactID contact id
- * @param string $contactType contact type
+ * @param array $fields fields array which are submitted
+ * @param $errors
+ * @param int $contactID contact id
+ * @param string $contactType contact type
+ *
+ * @internal param array $error error message array
*/
static function checkDuplicateContacts(&$fields, &$errors, $contactID, $contactType) {
// if this is a forced save, ignore find duplicate rule
}
}
+ /**
+ * Use the form name to create the tpl file name
+ *
+ * @return string
+ * @access public
+ */
+ /**
+ * @return string
+ */
function getTemplateFileName() {
if ($this->_contactSubType) {
$templateFile = "CRM/Contact/Form/Edit/SubType/{$this->_contactSubType}.tpl";
/**
* Parse all address blocks present in given params
- * and return parse result for all address blocks,
- * This function either parse street address in to child
- * elements or build street address from child elements.
- *
- * @params $params an array of key value consist of address blocks.
- *
- * @return $parseSuccess as array of sucess/fails for each address block
- * @static
- */
+ * and return parse result for all address blocks,
+ * This function either parse street address in to child
+ * elements or build street address from child elements.
+ *
+ * @params $params an array of key value consist of address blocks.
+ *
+ * @param $params
+ *
+ * @return array $parseSuccess as array of sucess/fails for each address block@static
+ */
function parseAddress(&$params) {
$parseSuccess = $parsedFields = array();
if (!is_array($params['address']) ||
*
* @param $parseResult an array of address blk instance and its status.
*
- * @return $statusMsg string status message for all address blocks.
- * @static
+ * @return null|string $statusMsg string status message for all address blocks.@static
*/
static function parseAddressStatusMsg($parseResult) {
$statusMsg = NULL;
*
* @param $deceasedParams array having contact id and deceased value.
*
- * @return $updateMembershipMsg string status message for updated membership.
+ * @return null|string $updateMembershipMsg string status message for updated membership.
*/
function updateMembershipStatus($deceasedParams) {
$updateMembershipMsg = NULL;