- $readOnly = wfConfiguredReadOnlyReason();
- if ( $readOnly !== false ) {
- return $readOnly;
- }
-
- static $lbReadOnly = null;
- if ( $lbReadOnly === null ) {
- // Callers use this method to be aware that data presented to a user
- // may be very stale and thus allowing submissions can be problematic.
- $lbReadOnly = wfGetLB()->getReadOnlyReason();
- }
-
- return $lbReadOnly;