X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=api.php;h=370884dffc8bd22109c4d34472c9c520ab01c817;hb=3a24e09b1f07b72bd5c71510ad8ed0a30a59465f;hp=852a80816d805e73ed62ffadb78e2977e1c9c09d;hpb=8b36a2b9699d59c23b890da1bf7bb72a72d1be20;p=lhc%2Fweb%2Fwiklou.git diff --git a/api.php b/api.php index 852a80816d..370884dffc 100644 --- a/api.php +++ b/api.php @@ -17,7 +17,7 @@ * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * http://www.gnu.org/copyleft/gpl.html * * @file @@ -34,6 +34,9 @@ * in the URL. */ +// So extensions (and other code) can check whether they're running in API mode +define( 'MW_API', true ); + // Initialise common code require ( dirname( __FILE__ ) . '/includes/WebStart.php' ); @@ -99,12 +102,9 @@ if ( $wgCrossSiteAJAXdomains && isset( $_SERVER['HTTP_ORIGIN'] ) ) { } } -// So extensions can check whether they're running in API mode -define( 'MW_API', true ); - // Set a dummy $wgTitle, because $wgTitle == null breaks various things // In a perfect world this wouldn't be necessary -$wgTitle = Title::newFromText( 'API' ); +$wgTitle = Title::makeTitle( NS_MAIN, 'API' ); /* Construct an ApiMain with the arguments passed via the URL. What we get back * is some form of an ApiMain, possibly even one that produces an error message,