Commit graph

4 commits

Author SHA1 Message Date
Russell Smith
1fcf0ca8a5 MDL-35628 performance: Remove dirname() where possible.
dirname() is a slow function compared with __DIR__ and using
'/../'.  Moodle has a large number of legacy files that are included
each time a page loads and is not able to use an autoloader as it is
functional code.  This allows those required includes to perform as
best as possible in this situation.
2016-06-10 08:06:49 +10:00
David Monllao
abc4e1efed MDL-52487 rss: PHP 7 compatible error supression
PHP5 used to update error_reporting to 0 on functions called with the
suppress errors operator (@). In PHP7 it is not updated.

Credit to Rajesh Taneja.
2015-12-14 15:28:37 +08:00
Eloy Lafuente (stronk7)
6573ba3e27 MDL-44273 block_rss: Prevent PHP notices in tests + whitespace fix 2015-08-05 00:55:28 +02:00
Neill Magill
83f215850e MDL-44273 block_rss: Back-off strategy for RSS feeds
Based on a patch by Davo Smith of Synergy Learning

RSS feeds can fail, either permanently or temporarily.
After this patch if a feed fails it will not be tried again in the next cron run.
If it continues to fail the delay between tries will be increased.
When a feed succeeds it will go back to being fetched on each cron run.

This should make the CRON process for RSS feeds finish faster when
there are lots of invalid feeds.
2015-08-04 11:04:29 +01:00