Switch some HTMLForms in special pages to OOUI
[lhc/web/wiklou.git] / includes / api / ApiQueryInfo.php
index db28df7..eee5dae 100644 (file)
@@ -395,10 +395,10 @@ class ApiQueryInfo extends ApiQueryBase {
                        $pageInfo['length'] = intval( $this->pageLength[$pageid] );
 
                        if ( isset( $this->pageIsRedir[$pageid] ) && $this->pageIsRedir[$pageid] ) {
-                               $pageInfo['redirect'] = '';
+                               $pageInfo['redirect'] = true;
                        }
                        if ( $this->pageIsNew[$pageid] ) {
-                               $pageInfo['new'] = '';
+                               $pageInfo['new'] = true;
                        }
                }
 
@@ -431,8 +431,8 @@ class ApiQueryInfo extends ApiQueryBase {
                        ApiResult::setIndexedTagName( $pageInfo['restrictiontypes'], 'rt' );
                }
 
-               if ( $this->fld_watched && isset( $this->watched[$ns][$dbkey] ) ) {
-                       $pageInfo['watched'] = '';
+               if ( $this->fld_watched ) {
+                       $pageInfo['watched'] = isset( $this->watched[$ns][$dbkey] );
                }
 
                if ( $this->fld_watchers ) {
@@ -464,8 +464,8 @@ class ApiQueryInfo extends ApiQueryBase {
                        $pageInfo['editurl'] = wfExpandUrl( $title->getFullURL( 'action=edit' ), PROTO_CURRENT );
                        $pageInfo['canonicalurl'] = wfExpandUrl( $title->getFullURL(), PROTO_CANONICAL );
                }
-               if ( $this->fld_readable && $title->userCan( 'read', $this->getUser() ) ) {
-                       $pageInfo['readable'] = '';
+               if ( $this->fld_readable ) {
+                       $pageInfo['readable'] = $title->userCan( 'read', $this->getUser() );
                }
 
                if ( $this->fld_preload ) {
@@ -497,9 +497,7 @@ class ApiQueryInfo extends ApiQueryBase {
                        $pageInfo['actions'] = array();
                        foreach ( $this->params['testactions'] as $action ) {
                                $this->countTestedActions++;
-                               if ( $title->userCan( $action, $user ) ) {
-                                       $pageInfo['actions'][$action] = '';
-                               }
+                               $pageInfo['actions'][$action] = $title->userCan( $action, $user );
                        }
                }
 
@@ -532,7 +530,7 @@ class ApiQueryInfo extends ApiQueryBase {
                                        'expiry' => $wgContLang->formatExpiry( $row->pr_expiry, TS_ISO_8601 )
                                );
                                if ( $row->pr_cascade ) {
-                                       $a['cascade'] = '';
+                                       $a['cascade'] = true;
                                }
                                $this->protections[$title->getNamespace()][$title->getDBkey()][] = $a;
                        }
@@ -870,6 +868,6 @@ class ApiQueryInfo extends ApiQueryBase {
        }
 
        public function getHelpUrls() {
-               return 'https://www.mediawiki.org/wiki/API:Properties#info_.2F_in';
+               return 'https://www.mediawiki.org/wiki/API:Info';
        }
 }