X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiFormatBase.php;h=54c90a6eef415a00b4bd395d139662a5183df66a;hb=40edd09eb94a05e768eb4ec3fba482a7ddbe39cc;hp=7dfdffcf3a7f299d5f97d5277ba1487bd9ced6ae;hpb=9d19dd16e2fc1c0583524a097d4b5e2e09c4a42e;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiFormatBase.php b/includes/api/ApiFormatBase.php index 7dfdffcf3a..54c90a6eef 100644 --- a/includes/api/ApiFormatBase.php +++ b/includes/api/ApiFormatBase.php @@ -4,7 +4,7 @@ * * Created on Sep 19, 2006 * - * Copyright © 2006 Yuri Astrakhan @gmail.com + * Copyright © 2006 Yuri Astrakhan "@gmail.com" * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -143,6 +143,12 @@ abstract class ApiFormatBase extends ApiBase { $this->getMain()->getRequest()->response()->header( "Content-Type: $mime; charset=utf-8" ); + //Set X-Frame-Options API results (bug 39180) + global $wgApiFrameOptions; + if ( $wgApiFrameOptions ) { + $this->getMain()->getRequest()->response()->header( "X-Frame-Options: $wgApiFrameOptions" ); + } + if ( $isHtml ) { ?> @@ -326,7 +332,7 @@ class ApiFormatFeedWrapper extends ApiFormatBase { */ public static function setResult( $result, $feed, $feedItems ) { // Store output in the Result data. - // This way we can check during execution if any error has occured + // This way we can check during execution if any error has occurred // Disable size checking for this because we can't continue // cleanly; size checking would cause more problems than it'd // solve @@ -371,7 +377,7 @@ class ApiFormatFeedWrapper extends ApiFormatBase { } $feed->outFooter(); } else { - // Error has occured, print something useful + // Error has occurred, print something useful ApiBase::dieDebug( __METHOD__, 'Invalid feed class/item' ); } }