Merge remote-tracking branch 'upstream/4.5' into 4.5-master-2014-12-01-14-40-22
[civicrm-core.git] / CRM / Contact / Page / View / CustomData.php
index 2406084a6aac24137afc31b5c1eaaf072b930a7e..5b32014e8c574281069c475f8956e4a339444168 100644 (file)
@@ -89,8 +89,6 @@ class CRM_Contact_Page_View_CustomData extends CRM_Core_Page {
    *
    * @access public
    *
-   * @internal param object $page - the view page which created this one
-   *
    * @return void
    * @static
    */
@@ -128,9 +126,12 @@ class CRM_Contact_Page_View_CustomData extends CRM_Core_Page {
         'style'
       );
 
-      if ($displayStyle === 'Tab with table' && $this->_multiRecordDisplay != 'single') {
+      if ($this->_multiRecordDisplay != 'single') {
         $id = "custom_{$this->_groupId}";
         $this->ajaxResponse['tabCount'] = CRM_Contact_BAO_Contact::getCountComponent($id, $this->_contactId, $groupTree[$this->_groupId]['table_name']);
+      }
+
+      if ($displayStyle === 'Tab with table' && $this->_multiRecordDisplay != 'single') {
         $ctype = CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact',
           $this->_contactId,
           'contact_type'