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.
* core_useragent: Introduce is_vendor methods to improve readability
when we are just detecting if a browser is from a vendor, rather than
the exact version
* Remove uncessary browser version checks when we are just detecting
vendors - this makes the intention of our sniffing clearer.
* Remove sniffing for browsers which we do not support, grades/ajax/tinymce
all support modern browsers so there is no need to sniff for them.
This commit moves user agent related functionality out of several
core libraries and combines it into a more manageable class.
All core uses are converted and functions deprecated in favor
of the new class.
This commit moves user agent related functionality out of several
core libraries and combines it into a more manageable class.
All core uses are converted and functions deprecated in favor
of the new class.
They now share most of the code again, this time via subclassing, and they
share some code with enrol/ldap. They have also gained some features and a few
fixes.
Use $nomoodlecookie global to avoid session troubles. Also
* Ensure we load the appropriate config.php, even if we are executing
under a strange environment (ie: with a user's credentials!)
* Test we have a spacer gif to open before we open it
These pages control the process of attempting an NTLM SSO login
safely. This is very draft and needs real-world testing and polish.
And string localisation too ;-)
* If NTLM SSO is enabled, and the user's IP addr is in the right
subnet, the loginpage_hook() of auth/ldap redirects to
ntlmsso_attempt.php
* ntlmsso_attempt.php will display a "redirect" msg with an img tag
pointing to ntlmsso_magic.php, a 3s wait, and a redirect to
ntlmsso_finish.php
* ntlmsso_magic.php should be configured to have "Integrated
Windows Authentication". If it does, it will serve a spacer gif
and call ntlmsso_magic()
* ntlmsso_finish.php calls ntlmsso_finish() to complete the SSO
and handles failures.