noosfero | hotspot: refactor profile_image_link hotspot (f5c2a127)

Bráulio Bhavamitra gitlab at mg.gitlab.com
Sat May 20 09:44:03 BRT 2017


Bráulio Bhavamitra started a new discussion on lib/noosfero/plugin/manager.rb:

> -      impl = plugin.send(event, *args)
> -      break if impl != default
> -    end
> -    impl
> -  end
> -
>    alias :dispatch_scopes :dispatch_without_flatten
>  
>    def dispatch_first(event, *args)
> -    result = nil
> +    default = Noosfero::Plugin.new.send(event, *args)
> +    result = default
>      each do |plugin|
>        result = plugin.send(event, *args)
> -      break if result.present?
> +      break if result != default

@diguliu unfortunetely this can't be done, as there are hotspots that execute code by default, for instance `== default` will run the like search at `find_by_contents` (which is very slow btw!!)

---
Reply to this email directly or view it on GitLab: https://gitlab.com/noosfero/noosfero/commit/f5c2a127d2e2de8bd51b558ed9a48098365584ad#note_30199467
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20170520/d73c3928/attachment-0001.html>


More information about the Noosfero-dev mailing list