Allow conact image file name length during upload up to 255 characters long
authorDilip Raj Baral <rajb.dilip@gmail.com>
Mon, 9 May 2016 11:29:03 +0000 (16:59 +0530)
committerDilip Raj Baral <rajb.dilip@gmail.com>
Mon, 9 May 2016 11:29:03 +0000 (16:59 +0530)
https://issues.civicrm.org/jira/browse/CRM-17967

Currently Add/Edit New Contact page restricts the length of the image file
to 60 characters.

CRM/Contact/Form/Contact.php
CRM/Upgrade/Incremental/sql/4.7.8.mysql.tpl
xml/schema/Contact/Contact.xml

index 32780cd8dab8ff04b49033cdc7cde3166fa5b9b9..40187f08ba266c1c772af4d042297a71108e28a8 100644 (file)
@@ -807,7 +807,7 @@ class CRM_Contact_Form_Contact extends CRM_Core_Form {
     CRM_Contact_Form_Location::buildQuickForm($this);
 
     // add attachment
-    $this->addField('image_URL', array('maxlength' => '60', 'label' => ts('Browse/Upload Image')));
+    $this->addField('image_URL', array('maxlength' => '255', 'label' => ts('Browse/Upload Image')));
 
     // add the dedupe button
     $this->addElement('submit',
index 9e42ffb7152ec0271f752bb5719378f7d3e53557..72f2182dfaff582e8e1641c8d66069d5968cf5f9 100644 (file)
@@ -1 +1,4 @@
 {* file to handle db changes in 4.7.8 during upgrade *}
+
+#CRM-17967 - Allow conact image file name length during upload up to 255 characters long
+ALTER TABLE `civicrm_contact` CHANGE `image_URL` `image_URL` VARCHAR(450) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT 'optional URL for preferred image (photo, logo, etc.) to display for this contact.';
\ No newline at end of file
index b1c570bff9a78aef8a2cc5ee510905365aa2754d..2d2966416e59f91340efe76b55d4ce59e9586402 100644 (file)
   <field>
     <name>image_URL</name>
     <type>varchar</type>
-    <length>255</length>
+    <length>450</length>
     <import>true</import>
     <comment>optional URL for preferred image (photo, logo, etc.) to display for this contact.</comment>
     <add>1.1</add>