dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ca0bbe3
)
Export information about external image settings via siteinfo API.
author
C. Scott Ananian
<cscott@cscott.net>
Thu, 11 Jul 2013 17:56:35 +0000
(13:56 -0400)
committer
Anomie
<bjorsch@wikimedia.org>
Tue, 16 Jul 2013 14:06:32 +0000
(14:06 +0000)
This configuration information is needed in order for Parsoid to
appropriately parse external image URLs.
Bug: 51092
Change-Id: I17aae9512e0994222785c5edc9de644685b2498c
includes/api/ApiQuerySiteinfo.php
patch
|
blob
|
history
diff --git
a/includes/api/ApiQuerySiteinfo.php
b/includes/api/ApiQuerySiteinfo.php
index
09a0f3d
..
eb4569f
100644
(file)
--- a/
includes/api/ApiQuerySiteinfo.php
+++ b/
includes/api/ApiQuerySiteinfo.php
@@
-129,6
+129,21
@@
class ApiQuerySiteinfo extends ApiQueryBase {
$data['dbtype'] = $GLOBALS['wgDBtype'];
$data['dbversion'] = $this->getDB()->getServerVersion();
$data['dbtype'] = $GLOBALS['wgDBtype'];
$data['dbversion'] = $this->getDB()->getServerVersion();
+ $allowFrom = array( '' );
+ $allowException = true;
+ if ( !$GLOBALS['wgAllowExternalImages'] ) {
+ if ( $GLOBALS['wgEnableImageWhitelist'] ) {
+ $data['imagewhitelistenabled'] = '';
+ }
+ $allowFrom = $GLOBALS['wgAllowExternalImagesFrom'];
+ $allowException = !empty( $allowFrom );
+ }
+ if ( $allowException ) {
+ $data['externalimages'] = (array) $allowFrom;
+ $this->getResult()->setIndexedTagName( $data['externalimages'], 'prefix' );
+ }
+
+
if ( !$wgDisableLangConversion ) {
$data['langconversion'] = '';
}
if ( !$wgDisableLangConversion ) {
$data['langconversion'] = '';
}