Merge "Rename variable in RequestContext, $t => $title"
[lhc/web/wiklou.git] / includes / api / ApiQuerySiteinfo.php
index 30201fc..f17ac29 100644 (file)
@@ -166,7 +166,7 @@ class ApiQuerySiteinfo extends ApiQueryBase {
                if ( $wgContLang->linkPrefixExtension() ) {
                        $linkPrefixCharset = $wgContLang->linkPrefixCharset();
                        $data['linkprefixcharset'] = $linkPrefixCharset;
-                       // For backwards compatability
+                       // For backwards compatibility
                        $data['linkprefix'] = "/^((?>.*[^$linkPrefixCharset]|))(.+)$/sDu";
                } else {
                        $data['linkprefixcharset'] = '';
@@ -393,7 +393,7 @@ class ApiQuerySiteinfo extends ApiQueryBase {
                        $prefix = $row['iw_prefix'];
                        $val = array();
                        $val['prefix'] = $prefix;
-                       if ( $row['iw_local'] == '1' ) {
+                       if ( isset( $row['iw_local'] ) && $row['iw_local'] == '1' ) {
                                $val['local'] = '';
                        }
                        if ( $row['iw_trans'] == '1' ) {
@@ -862,13 +862,6 @@ class ApiQuerySiteinfo extends ApiQueryBase {
                return 'Return general information about the site.';
        }
 
-       public function getPossibleErrors() {
-               return array_merge( parent::getPossibleErrors(), array( array(
-                       'code' => 'includeAllDenied',
-                       'info' => 'Cannot view all servers info unless $wgShowHostnames is true'
-               ), ) );
-       }
-
        public function getExamples() {
                return array(
                        'api.php?action=query&meta=siteinfo&siprop=general|namespaces|namespacealiases|statistics',