Eileen has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/246450

Change subject: Remove custom quicksearch hook
......................................................................

Remove custom quicksearch hook

I disabled this on staging without a noticeable speed difference. There is a 
commit ported from
4.7 which makes the underlying improvement in core

Bug: T99838 T115426
Change-Id: Ib2be0a0b4e48b6ccc18ec719a0ed9d38a07c7ad9
---
M sites/all/modules/wmf_civicrm/wmf_civicrm.module
1 file changed, 0 insertions(+), 79 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/50/246450/1

diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module 
b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
index bf692ff..b3bec60 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
@@ -2094,85 +2094,6 @@
 }
 
 /**
- * Implementation of hook_civicrm_contactListQuery, this is short-circuiting
- * the normal quicksearch to workaround bad queries which take several 
minutes...
- * filesort...  This should be fixed upstream in this issue:
- *    http://issues.civicrm.org/jira/browse/CRM-12326
- */
-function wmf_civicrm_civicrm_contactListQuery( &$query, $name, $context, $id ) 
{
-    if (is_numeric($name)) {
-        $query = <<<EOS
-SELECT DISTINCT(id), data, sort_name, email
-FROM
-(
-    (
-        SELECT
-            civicrm_contact.id,
-            CONCAT_WS( ' :: ', CONCAT( 'Contact - ', sort_name ), email ) AS 
data,
-            sort_name,
-            email
-        FROM civicrm_contact
-        LEFT JOIN civicrm_email
-                       ON ( civicrm_email.contact_id = civicrm_contact.id AND 
civicrm_email.is_primary = 1 )
-        WHERE
-            civicrm_contact.id = {$name}
-            AND civicrm_contact.is_deleted = 0
-    ) UNION (
-        SELECT
-            civicrm_contact.id,
-            CONCAT_WS( ' :: ', CONCAT( 'Contribution - ', sort_name ), email ) 
AS data,
-            sort_name,
-            email
-        FROM civicrm_contribution
-        JOIN civicrm_contact
-            ON civicrm_contribution.contact_id = civicrm_contact.id
-        LEFT JOIN civicrm_email
-                       ON ( civicrm_email.contact_id = civicrm_contribution.id 
AND civicrm_email.is_primary = 1 )
-        WHERE
-            civicrm_contribution.id = {$name}
-            AND civicrm_contact.is_deleted = 0
-    )
-) AS t
-LIMIT 0, 10
-EOS;
-    } else if ( !empty( $name ) ) {
-        $query = <<<EOS
-SELECT DISTINCT(id), data, sort_name, email
-FROM
-(
-    (
-        SELECT
-            civicrm_contact.id,
-            CONCAT_WS( ' :: ', sort_name, email ) AS data,
-            sort_name,
-            email
-        FROM civicrm_contact
-        LEFT JOIN civicrm_email
-                       ON ( civicrm_email.contact_id = civicrm_contact.id AND 
civicrm_email.is_primary = 1 )
-        WHERE
-            civicrm_contact.sort_name LIKE '{$name}%'
-            AND civicrm_contact.is_deleted = 0
-    ) UNION (
-        SELECT
-            civicrm_contact.id,
-            CONCAT_WS( ' :: ', sort_name, email ) AS data,
-            sort_name,
-            email
-        FROM civicrm_email
-        JOIN civicrm_contact
-            ON civicrm_email.contact_id = civicrm_contact.id
-        WHERE
-            civicrm_email.email LIKE '{$name}%'
-            AND civicrm_contact.is_deleted = 0
-            AND civicrm_email.is_primary = 1
-    )
-) AS t
-LIMIT 0, 10
-EOS;
-    }
-}
-
-/**
  * Get a grip on multiple database connections.
  *
  * @return db_switcher

-- 
To view, visit https://gerrit.wikimedia.org/r/246450
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib2be0a0b4e48b6ccc18ec719a0ed9d38a07c7ad9
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: civi-4.6.9
Gerrit-Owner: Eileen <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to