From 4d83a459e16a14681e7ff55fd65b6252cd63f121 Mon Sep 17 00:00:00 2001 From: Dilip Raj Baral Date: Mon, 9 May 2016 16:59:03 +0530 Subject: [PATCH] Allow conact image file name length during upload up to 255 characters long 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 | 2 +- CRM/Upgrade/Incremental/sql/4.7.8.mysql.tpl | 3 +++ xml/schema/Contact/Contact.xml | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CRM/Contact/Form/Contact.php b/CRM/Contact/Form/Contact.php index 32780cd8da..40187f08ba 100644 --- a/CRM/Contact/Form/Contact.php +++ b/CRM/Contact/Form/Contact.php @@ -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', diff --git a/CRM/Upgrade/Incremental/sql/4.7.8.mysql.tpl b/CRM/Upgrade/Incremental/sql/4.7.8.mysql.tpl index 9e42ffb715..72f2182dfa 100644 --- a/CRM/Upgrade/Incremental/sql/4.7.8.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/4.7.8.mysql.tpl @@ -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 diff --git a/xml/schema/Contact/Contact.xml b/xml/schema/Contact/Contact.xml index b1c570bff9..2d2966416e 100644 --- a/xml/schema/Contact/Contact.xml +++ b/xml/schema/Contact/Contact.xml @@ -265,7 +265,7 @@ image_URL varchar - 255 + 450 true optional URL for preferred image (photo, logo, etc.) to display for this contact. 1.1 -- 2.25.1