CRM-15732 : fix looking up deleted 'On behalf' orgs
[civicrm-core.git] / CRM / Contact / Form / Search.php
index 2f422efb05e8ed96f840595d77570b7291387234..64da4325b87a6c53d1168ab526a65dd20ff4078d 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
@@ -52,7 +52,7 @@ class CRM_Contact_Form_Search extends CRM_Core_Form_Search {
   static $_validContext = NULL;
 
   /**
-   * list of values used when we want to display other objects
+   * List of values used when we want to display other objects
    *
    * @var array
    * @static
@@ -68,7 +68,7 @@ class CRM_Contact_Form_Search extends CRM_Core_Form_Search {
   protected $_contextMenu;
 
   /**
-   * the groupId retrieved from the GET vars
+   * The groupId retrieved from the GET vars
    *
    * @var int
    * @access public
@@ -76,7 +76,7 @@ class CRM_Contact_Form_Search extends CRM_Core_Form_Search {
   public $_groupID;
 
   /**
-   * the Group ID belonging to Add Member to group ID
+   * The Group ID belonging to Add Member to group ID
    * retrieved from the GET vars
    *
    * @var int
@@ -85,7 +85,7 @@ class CRM_Contact_Form_Search extends CRM_Core_Form_Search {
   protected $_amtgID;
 
   /**
-   * the saved search ID retrieved from the GET vars
+   * The saved search ID retrieved from the GET vars
    *
    * @var int
    * @access protected
@@ -93,7 +93,7 @@ class CRM_Contact_Form_Search extends CRM_Core_Form_Search {
   protected $_ssID;
 
   /**
-   * the group elements
+   * The group elements
    *
    * @var array
    * @access public
@@ -103,7 +103,7 @@ class CRM_Contact_Form_Search extends CRM_Core_Form_Search {
   public $_groupIterator;
 
   /**
-   * the tag elements
+   * The tag elements
    *
    * @var array
    * @access protected
@@ -143,14 +143,13 @@ class CRM_Contact_Form_Search extends CRM_Core_Form_Search {
    */
   protected $_ufGroupID;
 
-  /*
-     * csv - common search values
-     *
-     * @var array
-     * @access protected
-     * @static
-     */
-
+  /**
+   * Csv - common search values
+   *
+   * @var array
+   * @access protected
+   * @static
+   */
   static $csv = array('contact_type', 'group', 'tag');
 
   /**
@@ -167,7 +166,7 @@ class CRM_Contact_Form_Search extends CRM_Core_Form_Search {
   protected $_modeValue;
 
   /**
-   * name of the selector to use
+   * Name of the selector to use
    */
   static $_selectorName = 'CRM_Contact_Selector';
   protected $_customSearchID = NULL;
@@ -176,7 +175,7 @@ class CRM_Contact_Form_Search extends CRM_Core_Form_Search {
   protected $_openedPanes = array();
 
   /**
-   * define the set of valid contexts that the search form operates on
+   * Define the set of valid contexts that the search form operates on
    *
    * @return array the valid context set and the titles
    * @access protected
@@ -461,7 +460,7 @@ class CRM_Contact_Form_Search extends CRM_Core_Form_Search {
     $selectedContactIds = array();
     $qfKeyParam = CRM_Utils_Array::value('qfKey', $this->_formValues);
     // We use ajax to handle selections only if the search results component_mode is set to "contacts"
-    if ($qfKeyParam && $this->get('component_mode') <= 1) {
+    if ($qfKeyParam && ($this->get('component_mode') <= 1 || $this->get('component_mode') == 7)) {
       $this->addClass('crm-ajax-selection-form');
       $qfKeyParam = "civicrm search {$qfKeyParam}";
       $selectedContactIdsArr = CRM_Core_BAO_PrevNextCache::getSelection($qfKeyParam);
@@ -479,7 +478,7 @@ class CRM_Contact_Form_Search extends CRM_Core_Form_Search {
   }
 
   /**
-   * processing needed for buildForm and later
+   * Processing needed for buildForm and later
    *
    * @return void
    * @access public