Skip to Content.
Sympa Menu

comanage-dev - Re: [comanage-dev] search

Subject: COmanage Developers List

List archive

Re: [comanage-dev] search


Chronological Thread 
  • From: Marie Huynh <>
  • To: Benn Oshrin <>
  • Cc: comanage-dev <>
  • Subject: Re: [comanage-dev] search
  • Date: Tue, 26 Mar 2013 11:52:01 -0700
  • Authentication-results: sfpop-ironport07.merit.edu; dkim=pass (signature verified)


On Mar 26, 2013 6:43 AM, "Benn Oshrin" <> wrote:
>
> On 3/26/13 11:19 AM, Marie Huynh wrote:
>>
>> To get the search function working, I put some of the code in index() in
>> StandardController.php.  It seems reusable should search be implemented
>> for other models.  Problem is, index() is already a pretty big function
>> and it would make more sense shifted into paginationConditions.
>
>
> What does the code that you're putting in StandardController do?

It modifies the pagination conditions to filter the items in index.

(I agree that search is a reusable concept, but there's a lot of crap in AppController and StandardContrller that probably shouldn't have been there in the first place.)
>
>> The problem with paginationConditions() is that it is only called if not
>> $this->requires_person.  Why?  HistoryRecordsController.php
>> and MVPAController.php (and subclasses) will skip
>> paginationConditions().  Subclasses include:
>>
>> AddressesController.php:class AddressesController extends MVPAController {
>> EmailAddressesController.php:class EmailAddressesController extends
>> MVPAController {
>> IdentifiersController.php:class IdentifiersController extends
>> MVPAController {
>> TelephoneNumbersController.php:class TelephoneNumbersController extends
>> MVPAController {
>>
>> Is there any reason why we wouldn't bother searching these, or can I go
>> ahead and have paginationConditions() run for all extensions of
>> Standardcontroller so I can shift my code there?
>
>
> I think this falls into the "crap" category, but I think we should first confirm where the search code goes before cleaning up this stuff. (This would also confirm if it should go in paginationConditions.)

I'm pretty sure it should go in paginationConditions. The real question was if there's anything that would break that I need to watch out for in popping the call to it out of the else.

>
> Thanks,
>
> -Benn-
>




Archive powered by MHonArc 2.6.16.

Top of Page