Add User::isSafeToLoad() and ParserOptions::newFromAnon()
[lhc/web/wiklou.git] / includes / parser / ParserOptions.php
index e6d5274..0e8d76d 100644 (file)
@@ -599,6 +599,15 @@ class ParserOptions {
                $this->initialiseFromUser( $user, $lang );
        }
 
+       /**
+        * Get a ParserOptions object for an anonymous user
+        * @return ParserOptions
+        */
+       public static function newFromAnon() {
+               global $wgContLang;
+               return new ParserOptions( new User, $wgContLang );
+       }
+
        /**
         * Get a ParserOptions object from a given user.
         * Language will be taken from $wgLang.