Merge pull request #3905 from colemanw/Use
[civicrm-core.git] / CRM / Contact / Form / Contact.php
index 2445ba7299b4aeb207f2271c167dc5b8a4041ed8..2ca53a78969caa36deb6f003306714c64256a195 100644 (file)
@@ -435,8 +435,9 @@ class CRM_Contact_Form_Contact extends CRM_Core_Form {
     //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);
@@ -602,12 +603,11 @@ class CRM_Contact_Form_Contact extends CRM_Core_Form {
   /**
    * 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) {
@@ -1121,10 +1121,12 @@ class CRM_Contact_Form_Contact extends CRM_Core_Form {
   /**
    * 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
@@ -1186,6 +1188,15 @@ class CRM_Contact_Form_Contact extends CRM_Core_Form {
     }
   }
 
+  /**
+   * 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";
@@ -1199,15 +1210,16 @@ class CRM_Contact_Form_Contact extends CRM_Core_Form {
 
   /**
    * 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']) ||
@@ -1291,8 +1303,7 @@ class CRM_Contact_Form_Contact extends CRM_Core_Form {
    *
    * @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;
@@ -1358,7 +1369,7 @@ class CRM_Contact_Form_Contact extends CRM_Core_Form {
    *
    * @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;