Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-16579

Search backends are coupled with the acp

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 4.0.0-a1
    • None
    • Search
    • None

    Description

      In the search backend, is needed to send the object of the acp module to execute certain actions, so the search backend depends on the acp module that executes it. This makes they cannot be reused in other things like execute it as a command without having to hardcode things.

      I think the solution would be something like to make the search backend methods to return the current status of the action as an array or something each time they are executed, so who executes it handles how to act (continue or not), instead of the search backend.

      I think the result of the solution could be something like this:

      In acp:

       

      $result = $this->create_index(...);
      if($result[post_indexed] == $result['post_total']) {
         //finished, notify it somehow to the frontend (currently the search backend is who do it now)
         // save current status
      } else {
         // just continue, send the meta refresh or something to the frontend
         // save current status
      }
      

      And from the command line

       

      do {
          $result = $this->create_index(...);
      } while($result[post_indexed] == $result['post_total']);
      

       

       

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            rubencm rubencm
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: