Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
fivestar_fivestar_widgets()
should cache the usage of file_scan_directory()
not to call it multiple times on the same page load in case of several widgets.
Comment | File | Size | Author |
---|---|---|---|
#1 | fivestar-cache_file_scan_directory-1399780-0.patch | 1.12 KB | oxyc |
Comments
Comment #1
oxyc CreditAttribution: oxyc commentedA patch to implementing drupal_static to cache the $files variable. Haven't tested but I think this should work.
Comment #2
oxyc CreditAttribution: oxyc commentedComment #3
ericduran CreditAttribution: ericduran commentedYea, I haven't tested this neither but it looks good to me.
Comment #4
ericduran CreditAttribution: ericduran commentedThanks for this.
I committed this patch. I also made sure to use git am since you had a properly formatted patch and so you can get credit.
So yay for your First Drupal commit :) (or at least the 1st one that should be visible in your profile page).
Thanks again.
--
http://drupalcode.org/project/fivestar.git/commit/88f4303