Recommiting.
authorAntoine Musso <hashar@users.mediawiki.org>
Sun, 13 Jun 2004 01:53:14 +0000 (01:53 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Sun, 13 Jun 2004 01:53:14 +0000 (01:53 +0000)
* new special page to list admins

includes/SpecialListadmins.php [new file with mode: 0644]

diff --git a/includes/SpecialListadmins.php b/includes/SpecialListadmins.php
new file mode 100644 (file)
index 0000000..8f37118
--- /dev/null
@@ -0,0 +1,30 @@
+<?php
+
+require_once("QueryPage.php");
+
+class ListAdminsPage extends PageQueryPage {
+
+       function getName() {
+               return 'Listadmins';
+       }
+
+       function getSQL() {
+               global $wgIsPg;
+               $usertable = $wgIsPg?'"user"':'user';
+               $userspace = Namespace::getUser();
+               return 'SELECT user_rights as type,'.$userspace.' as namespace,'.
+                      'user_name as title, user_name as value '.
+                      "FROM $usertable ".
+                          'WHERE user_rights = "sysop"';
+       }
+}
+
+function wfSpecialListadmins() {
+       list( $limit, $offset ) = wfCheckLimits();
+
+       $sla = new ListAdminsPage();
+
+       return $sla->doQuery( $offset, $limit );
+}
+
+?>