Returning protections more consistently
authorRoan Kattouw <catrope@users.mediawiki.org>
Tue, 8 Jan 2008 16:42:18 +0000 (16:42 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Tue, 8 Jan 2008 16:42:18 +0000 (16:42 +0000)
includes/api/ApiQueryInfo.php

index 10ac813..1450ad1 100644 (file)
@@ -200,7 +200,8 @@ class ApiQueryInfo extends ApiQueryBase {
                                if($tok_protect)
                                        $res['query']['pages'][$pageid]['protecttoken'] = $wgUser->editToken();
                                if($fld_protection)
-                                       $res['query']['pages'][$pageid]['protection'] = $prottitles[$title->getNamespace()][$title->getDbKey()];
+                                       $res['query']['pages'][$pageid]['protection'][] = $prottitles[$title->getNamespace()][$title->getDbKey()];
+                               $result->setIndexedTagName($res['query']['pages'][$pageid]['protection'], 'pr');
                        }
                }
        }