Extension:Permissions

From MediaWiki.org

Jump to: navigation, search

This page is about the Permissions Extension for MediaWiki. For more general information about managing MediaWiki permissions see Help:User rights

  
This page was recently moved from MetaWiki.
The page probably requires cleanup - please feel free to help out. Remove this template once that is done.


Manual on MediaWiki Extensions
List of MediaWiki Extensions
Permissions

Release status: beta

Implementation Data extraction, User rights, Special page
Description
Author(s) Marc Meurrens (Marc.M Talk)
Version 1.5.104.9
Download no link

Contents


[edit] Introduction

Permissions is a special page extension by Marc Meurrens, Brussels (be).

This extension is designed for : mediawiki >= 1.5beta4
The current version of the extension is : 1.5.104.9 (2005-08-04)

The extension provides a meaningful dump of the mediawiki global variable $wgGroupPermissions.
Such dump may be useful to explain to users the differences between the miscellaneous groups of users.

The above screenshot shows the output of the extension (without the definition of aliases). In this example, the groups member, publisher and staff are non standard groups added in the $wgGroupPermissions. Similarly, the rights renameuser and release are non standards feature. We'll use the aliasing, as shown in another screenshot below, to distinguish standard and non standard features.

The screenshot below shows the output when links on rights and groups are allowed (this is the default behaviour), when the language preference is french (Oui means Yes) and for the most common settings (without non standard groups).

[edit] Installation

To install the extension, do the following :

  • create a file SpecialPermissions.php in your includes directory (the content is listed below)
  • modify your LocalSettings.php file

If you meet a problem, feel free to contact the authors thru the discussion page.

[edit] Content of the SpecialPermissions.php file

You absolutely don't need to understand this code to install, configure and use the extension. However, if you read it, you may be surprised, positively or not, by some coding conventions used here. These conventions are those used, in all their projects, by Marc Meurrens (be) and his team and are (or will be) explained in separate pages.

If you want to read the source code, it is suggested you first read the haDoc documentation provided below.

<?php
// !FILE : includes/SpecialPermissions.php
// !CLASS : Permissions // !INNER-CLASS
/**
 * Dump the global variable $wgGroupPermissions
 *
 * @package MediaWiki
 * @subpackage SpecialPage
 * @version  1.5.104.9 
 * @requires MediaWiki mw 1.5 , beta 4
 * @since 1.5.104.2 (2005-08-03)
 * @author marc.meurrens@ACM.org
 * @author nathan.meurrens@cassiopea.org
 * @copyright {@link http://www.meurrens.org}
 * @copyleft {@link http://www.meurrens.org}
 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
 
 *@fixed up by Adam1213.tk if is set on line 150 + 350 aprox + moved up checkign that Permissions_SHOW_RIGHTS_ON_META is defined
 
 */
 
 
// !ANTI-CRASH : mediawiki stuff + version stuff
 
if (!defined('MEDIAWIKI'))
{
        // die( "<h2>File ".__FILE__." is part of MediaWiki and is not a valid entry point</h2>\n" );
        // __FILE__ may be a privacy issue (reveals the linux user name, etc)
        die( "<h2>This file is part of MediaWiki and is not a valid entry point</h2>\n" );
}
 
// just in case the class has been defined in another file :
if( defined('Permissions_VERSION') || defined('Permissions_BACKWARD') )
{
        die("<h2>Attempt to include file <u>".__FILE__."</u> while
              <u>Permissions</u> class already defined with 
    <br />Permissions_VERSION = " 
        . Permissions_VERSION . "
    <br />Permissions_YYYY_MM_DD_TIME = " 
        . Permissions_YYYY_MM_DD_TIME . "
    <br />Permissions_BACKWARD = " 
        . Permissions_BACKWARD . "
    </h2>\n") ;
}
 
 
 
if(!defined('Permissions_SHOW_RIGHTS_ON_META'))
{
        /**
     * by default, links to groups are provided
     */
        define( 'Permissions_SHOW_GROUPS_ON_META' , true ) ;
 
}
 
 
// !VERSION // !DVRM  :
 
/**
 * current version in DVRM format
 */
define('Permissions_VERSION', '1.5.104.9')  ;
 
// modify Permissions_BACKWARD only if your changes may affect other classes!
/**
 * backward compatibility in DVRM format
 */
define('Permissions_BACKWARD', '1.5.104.8')  ;
 
/**
 * date of current version
 */
define('Permissions_YYYY_MM_DD_TIME', '2005-08-05 11:24')  ;
 
 
// !CONFIG : default values (to be eventually modified before include) :
 
if(! defined('Permissions_CONVENIENCE_LINKS'))
{
        /**
     * by default, convenience links are provided
     */
        define( 'Permissions_CONVENIENCE_LINKS' , true )  ;
}
 
if(!defined('Permissions_SHOW_RIGHTS_ON_META'))
{
        /**
     * by default, links to rights are provided
     */
        define( 'Permissions_SHOW_RIGHTS_ON_META' , true ) ;
}
 
 
 
if(!defined('Permissions_TH_STYLE'))
{
        /**
     * style definition for header cells
     * @internal use CSS !!!
     */
        define( 'Permissions_TH_STYLE' , " style=' background-color : #ff0 ; ' " ) ;
}
 
if(!defined('Permissions_TABLE_STYLE'))
{
        /**
     * style definition for HTML table
     * @internal use CSS !!!
     */
        define( 'Permissions_TABLE_STYLE' , " border='1' " ) ;
}
 
// !CONSTANT's : internal constants
 
define( 'Permissions_URL_SPECIAL' , "http://meta.wikimedia.org/wiki/Special_" ) ;
define( 'Permissions_URL_RIGHT' , "http://meta.wikimedia.org/wiki/Right_" ) ;
define( 'Permissions_URL_GROUP' , "http://meta.wikimedia.org/wiki/Group_" ) ;
 
 
// !INIT : pre-init stuff processed because of an include_once in the LocalSettings.php file :
 
$wgExtensionFunctions[] = 'wfSpecialPermissions' ;
 
$wgExtensionCredits['specialpage'][] = array(
'name'
=> 'Permissions' ,
'version'
=> ( '[http://meta.wikimedia.org/wiki/DVRM ' . Permissions_VERSION . '] ('
. Permissions_YYYY_MM_DD_TIME . ')' ) ,
'author'
=> '[http://www.meurrens.org/ Marc Meurrens, Brussels (be)]' ,
'url'
=> 'http://www.mediawiki.org/wiki/Extension:Permissions' ,
);
 
 
// !FUNCTION : wfSpecialPermissions()
/**
 * global entry point function 
 *
 * @version 1.5.104.4
 * @requires MediaWiki mw 1.5 , beta 4
 * @since 1.5.104.2 (2005-08-03) 
 */
function wfSpecialPermissions()
{
        // !STEP-1 OF wfSpecialPermissions() : complete the messages that will be used :
        global $wgMessageCache ;
        $wgMessageCache->addMessages(array(
        'permissions' => 'Permissions' ,
        ));
 
        // !STEP-2  OF wfSpecialPermissions()  : hooks for logs : none...
 
        // !STEP-3  OF wfSpecialPermissions() : include what should be included :
        global $IP ; // for include's or require's
        /**
     *
     */
        require_once( $IP . "/includes/SpecialPage.php") ;
 
        // !STEP-4  OF wfSpecialPermissions() : inner class definition(s) :
        // !CLASS: Permissions extends SpecialPage // !INNER-CLASS
        /**
     *
     */
        class Permissions extends SpecialPage
        {
                // !IV's : none
 
                // !CT
                /**
             * constructor
             */
                function Permissions()
                {
                        SpecialPage::SpecialPage('Permissions') ;
                }
 
                // !IM's : instance methods
                // !IM : execute() // !OVRDN
                /**
             * ovrdn of the abstract execute() function :
             * manage the output, relies on 2 static functions :
             * the big BuildHtmlTable() and the small BuildHtmlLink()
             *
         * @uses Global_DOC::$wg_zPermissionsWithConvenienceLinks
         * @uses Global_DOC::$wgOut
         * @uses OutputPage::addHTML()
             */
                function execute()
                {
                        global $wgOut , $wg_zPermissionsWithConvenienceLinks ;
                        $wg_zPermissionsWithConvenienceLinks = isSet($wg_zPermissionsWithConvenienceLinks) ?
                        $wg_zPermissionsWithConvenienceLinks : Permissions_CONVENIENCE_LINKS ;
                        $szhOut = Permissions::BuildHtmlTable() ;
                        // !TODO : rely on $wgValidSpecialPagesFr to translate...
                        if($wg_zPermissionsWithConvenienceLinks)
                        {
                                $szhOut .= Permissions::BuildHtmlLink() ;
                        }
                        $wgOut->addHTML( $szhOut );
                }
 
                // !SF's : begin static functions :
                /**#@+
                * @static
                */
 
                // the small workhorse :
                // !SF : function BuildHtmlLink()
                /**
             * @return htmlstring
             */
                function BuildHtmlLink()
                {
                        $szUrl = Permissions_URL_SPECIAL ;
                        return Permissions::Wiki_2_Html( "
 * [[Special:Permissions|Permissions]] <small>[{$szUrl}Permissions (help)]</small>          
 * [[Special:Listusers|Listusers]] <small>[{$szUrl}Listusers (help)]</small>                
 * ([[Special:Userrights|Userrights]]) <small>[{$szUrl}Userrights (help)]</small>
 * ([[Special:Renameuser|Renameuser]]) <small>[{$szUrl}Renameuser (help)]</small>           
                " ) ;
                }
 
                // the big workhorse :
                // !SF : function BuildHtmlTable()
                /**
        *
    * @return htmlstring $szhOut
    * @version 1.5.104.7 (mediawiki 1.5 , beta 4 , minor revision 7)
    * @since 1.5.104.6 (2005-08-03) 
    * @uses Global_DOC::$wgGroupPermissions
    * @uses Global_DOC::$wg_szGroup_2_szGroupMeaning
    * @uses Global_DOC::$wg_szRight_2_szRightMeaning
        */
                function BuildHtmlTable()
                {
                        // !STEP-1 OF BuildHtmlTable() : translate
                        $szhOut = '' ;
                        $szhYes = htmlspecialchars( Permissions::Translate( 'val_yes' ) );
 
                        // !STEP-2 OF BuildHtmlTable()  : init
                        global $wgGroupPermissions , $wgOut
                        , $wg_szGroup_2_szhGroupMeaning , $wg_szRight_2_szhRightMeaning
                        , $wg_szGroup_2_szwGroupMeaning , $wg_szRight_2_szwRightMeaning
                        // * @since 1.5.104.7 : zShow Groups/Rights on meta
                        , $wg_zShowRightsOnMeta , $wg_zShowGroupsOnMeta ;
 
                        // default values and config :
 
                        $wg_zShowRightsOnMeta = isSet($wg_zShowRightsOnMeta) ?
                        $wg_zShowRightsOnMeta : Permissions_SHOW_RIGHTS_ON_META ;
                        $wg_zShowGroupsOnMeta = isSet($wg_zShowGroupsOnMeta) ?
                        $wg_zShowGroupsOnMeta : Permissions_SHOW_GROUPS_ON_META ;
 
                        // !STEP-3 OF BuildHtmlTable()  : build the 2 sets
                        // $wgGroupPermissions , in our notation, should write :
                        // $wg_szGroup_2_szRight_2_zOk
 
                        reset($wgGroupPermissions) ;
                        $szGroup_2_iPower = array() ;
                        $szRight_2_rGranted = array() ;
                        foreach($wgGroupPermissions as $szGroup => $szRight_2_zOk)
                        {
                                $szGroup_2_iPower[$szGroup]   = count($szRight_2_zOk)  ;
                                reset($szRight_2_zOk) ;
                                foreach($szRight_2_zOk as $szRight => $zOk)
                                {
                                        $c="";
                        if (isset ($szRight_2_rGranted[$szRight])) $c=$szRight_2_rGranted[$szRight];
 
                                        $szRight_2_rGranted[$szRight] = $c. ($szGroup != 'bureaucrat') ? 1 : 0.9  ;
                                        // a trick to reduce the influence of less interesting rights
                                }
                        }
 
                        // !STEP-4 OF BuildHtmlTable()  : sort the 2 sets
                        // a few tricks to make sure of the order for some special features :
                        $szGroup_2_iPower['*'] = -2;
                        $szGroup_2_iPower['user'] = -1;
                        $szGroup_2_iPower['bureaucrat'] = 1789 ;
                        $szGroup_2_iPower['bot'] = 1968 ;
                        $szRight_2_rGranted['createaccount'] = 9999 ;
                        $szRight_2_rGranted['bot'] = -46 ;
                        // sort groups by increasing power :
                        asort($szGroup_2_iPower) ;
                        // sort rights by decreasing use :
                        arsort($szRight_2_rGranted) ;
 
                        // !STEP-5 OF BuildHtmlTable() : it's now time to prepare the HTML output
 
                        // equally divide HTML table :
                        $uW = floor(80 / count($szGroup_2_iPower) ) ;
                        $szStyle = Permissions_TH_STYLE ;
                        $szhOut .= "\n<p><table ".Permissions_TABLE_STYLE."><thead><tr><td></td>\n" ;
                        // !STEP-5-1 OF BuildHtmlTable() : HTML thead stuff
                        $szUrlGroup = Permissions_URL_GROUP ;
                        $szUrlRight = Permissions_URL_RIGHT ;
                        reset($szGroup_2_iPower) ;
                        foreach($szGroup_2_iPower as $szGroup => $iPower)
                        {
                                $szGroup = ($szGroup == '*') ? 'anonymous' : $szGroup ; // explicit anonymous
                                // aliasing mechanism :
                                if( $wg_szGroup_2_szwGroupMeaning[$szGroup] ) // WIKI has priority over HTML
                                {
                                        $szh = Permissions::Wiki_2_Html( $wg_szGroup_2_szwGroupMeaning[$szGroup] ) ;
                                }
                                elseif( $wg_szGroup_2_szhGroupMeaning[$szGroup] )
                                {
                                        $szh = $wg_szGroup_2_szhGroupMeaning[$szGroup];
                                }
                                elseif( $wg_zShowGroupsOnMeta )
                                {
                                        $szh = Permissions::Wiki_2_Html(
                                        "[{$szUrlGroup}{$szGroup} {$szGroup}]"
                                        ) ;
                                }
                                else
                                {
                                        $szh = $szGroup ;
                                }
                                // build the cell in thead :
                                $szhOut .= "  <th {$szStyle} width='{$uW}%'>{$szh}</th>\n" ;
                        }
                        $szhOut .= "</tr></thead><tbody>\n" ;
                        // !STEP-5-2 OF BuildHtmlTable() : HTML tbody stuff
                        arsort($szRight_2_rGranted) ;
                        foreach($szRight_2_rGranted as $szRight => $rGranted)
                        {
                                // alias mechanism :
                                if( $wg_szRight_2_szwRightMeaning[$szRight] ) // WIKI has priority over HTML
                                {
                                        $szh = Permissions::Wiki_2_Html( $wg_szRight_2_szwRightMeaning[$szRight] );
                                }
                                elseif( $wg_szRight_2_szhRightMeaning[$szRight] )
                                {
                                        $szh = $wg_szRight_2_szhRightMeaning[$szRight];
                                }
                                elseif( $wg_zShowRightsOnMeta )
                                {
                                        $szh = Permissions::Wiki_2_Html(
                                        "[{$szUrlRight}{$szRight} {$szRight}]"
                                        ) ;
                                }
                                else
                                {
                                        $szh = $szRight ;
                                }
                                // left cell :
                                $szhOut .= " <tr><td {$szStyle} ><b>{$szh}</b></td>" ;
                                // complete row :
                                reset($szGroup_2_iPower) ;
                                foreach($szGroup_2_iPower as $szGroup => $iPower)
                                {
                                        $c="";
                                        if(isset($wgGroupPermissions[$szGroup][$szRight])) $c=$wgGroupPermissions[$szGroup][$szRight];
                                        $szhOut .= ( "\n  <th>".( ( $c ) ? $szhYes : ' ' )."</th>" ) ;
                                }
                                $szhOut .= " </tr>\n" ;
                        }
                        $szhOut .= "</tbody></table><p>\n" ;
 
                        // !STEP-6 OF BuildHtmlTable() : returns the HTML string
                        return $szhOut ;
                }
 
                // the utilities :
                // could be private, but may be usefull elsewhere...
                // !SF : function Wiki_2_Html( $szwMessage )
                /**
     * @param wikistring $szwMessage
     * @return htmlstring $szhMessage
     * @uses parse()
     * @uses getText()
     * @version 1.5.104.6 
     * @requires (MediaWiki 1.5 , beta 4 , minor revision 6)
     * @since 1.5.104.6 (2005-08-03) 
     * @internal rather rely on standard stuff when integrating the patch in the whole project
     */
                function Wiki_2_Html( $szwMessage )
                {
                        global $wgParser, $wgTitle, $wgOut ;
 
                        $parserOutput = $wgParser->parse(
                        $szwMessage
                        , $wgTitle
                        , $wgOut->parserOptions()
                        , true
                        ) ;
 
                        return $parserOutput->getText()  ;
                }
 
                // !SF : function Translate($szOriginal)
                /**
     * a simplified version of MediaWiki_I18N::translate()
     * (does NOT support interpolation of variables)
     *
     * placed here to make this file standalone
     * (we just need to translate 'Yes' into 'Oui', 'Si', 'Ya', etc 
     *
     * @param string $szOriginal
     * @return string $szTranslated
     * @version 1.5.104.7
     * @internal rather rely on standard stuff when integrating the patch in the whole project
     */ 
                function Translate($szOriginal)
                {
                        $fname = 'SkinTemplate-translate';
                        wfProfileIn( $fname ) ; // open
                        // Hack for i18n:attributes in PHPTAL 1.0.0 dev version as of 2004-10-23
                        $szOriginal = preg_replace( '/^string:/', '', $szOriginal ); // clean
                        $szTranslated = wfMsg( $szOriginal );
                        // interpolate variables : removed in this simplified version !!!
                        wfProfileOut( $fname ) ; // release
                        return $szTranslated ;
                }
 
                // !SF : end static functions :
                /**#@+-*/
 
        }  // !END_OF_CLASS : Permissions
 
        // !STEP-5 OF wfSpecialPermissions() : register, make sure this special page is known
        SpecialPage::addPage ( new Permissions() ) ;
 
} // !END-FUNCTION : wfSpecialPermissions()
// !EOF : includes/SpecialPermissions.php
?>

[edit] Updating your LocalSettings.php file

Just put the statement:

include_once('includes/SpecialPermissions.php') ;

You may also want to use this file to configure aliases and links to clarify the meaning of the groups and rights. Configuration is described in the next section. It doesn't matter if you put the configuration statements before or after the include_once statement.

In rare cases, you may want to modify the default behaviour of the extensions. Full features are provided by default. If you want to modify this default behaviour, you should place one or more of the following statements, in your LocalSettings.php file, before the include_once statement.

define( 'Permissions_CONVENIENCE_LINKS' , false )  ;
define( 'Permissions_SHOW_RIGHTS_ON_META' , false ) ;
define( 'Permissions_SHOW_GROUPS_ON_META' , false ) ;

[edit] Configuration

[edit] Convenience Links

Image:Mw-special-permissions-convenience.png

You may decide if the extension special page must include, or not, links to

  • help page on http://meta.wikimedia.org/ related to the extension
  • a link to the special page List of users, and the related help
  • a link to the special page Users Rights, and the related help
  • a link to the special page Rename User, and the related help

Mind the two last special pages may be unavailable or the access may be forbidden.

Anyway, the Permissions extension will provide these 4 lines by default. To turn the feature off, you need to write the following statement anywhere in your LocalSettings.php file :

$wg_zPermissionsWithConvenienceLinks = false ;

or to include

define( 'Permissions_CONVENIENCE_LINKS' , false )  ;

as to change the default behaviour, before the include_once.

[edit] Aliasing the Groups and Rights

If you need to define aliases and links for groups or rights, you may define some variables in your LocalSettings.php file as suggested in this examples :

By default, the extension will try to link rights and groups to standard definitions. If you want to avoid this feature, you need to turn it off by including the corresponding statement anywhere in your LocalSettings.php file :

$wg_zShowRightsOnMeta = false ;
$wg_zShowGroupsOnMeta = false ;

or by including the corresponding statements :

define( 'Permissions_SHOW_RIGHTS_ON_META' , false ) ;
define( 'Permissions_SHOW_GROUPS_ON_META' , false ) ;

as to change the default behaviour, before the include_once.

The above feature does not apply to rights and groups for which you provide your own replacements. This is specially usefull for non standards rights and groups (for which there is obviously no help available on meta). Replacements may be defined in pure HTML or as a wiki text. In case of conflicts, the wiki definition has priority.

The HTML definitions are provided as in the example (in general, you'll prefer wiki links as shown below):

$wg_szGroup_2_szhGroupMeaning = array( // szh ==> HTML
 'member' => 'member<br><i>(étudiant)</i>' , // étudiant (fr) == student (en)
 'publisher' => 'publisher<br><i>(professeur)</i>' , // professeur (fr) == teacher (en)
 'staff' => "this will be ignored because of the wiki definition below" ,
) ;
$wg_szRight_2_szhRightMeaning = array(
 'renameuser' => '<strike>renameuser</strike>' ,
 'release' => '<strike>release</strike>' ,
) ;

Mind the szh...

The wiki definitions are provided as in the example (in general, you'll use this feature to link to some pages of your wiki explaining your groups, etc) :

$wg_szGroup_2_szwGroupMeaning = array(  // szw ==> WIKI
 'staff' => "staff<br>''(secrétariat)''" ,
) ;
$wg_szRight_2_szwRightMeaning = array() ;

Mind the szw...

With the above statements, the output becomes :

[edit] Where is your special page?

The Permissions special page is immediately available within your wiki pages when writing :

 [[Special:Permissions|Permissions]]

The page is also available at the URL :

 http://www.yourdomain.org/wiki/index.php/Special:Permissions

The page is listed, at the entry Permissions in the Special Pages alphabetical list.

[edit] Linking to or Using this extension in other pages

The Permissions special page provides (by default) wiki links to related other special pages.

[edit] Updating your includes/SpecialListusers.php file

You may eventually want to make a link back from Listusers to the Permissions page. To do this, replace :

function getPageHeader( ) {

by :

function getPageHeader( ) {
  $out = Permissions::BuildHtmlLink() ;

and do not forget to replace in the first next appearance of $out = by $out .= thus becoming :

  // form header
  $out .= '<form method="get" action="'.$action.'">' .

The above code will provide a link. It's a good idea as this may help interested visitors to understand who does what' and a link should be enough. However, if you want to immediately display the full table, replace :

  $out = Permissions::BuildHtmlLink() ;

by :

  $out = Permissions::BuildHtmlTable() ;

[edit] Updating your includes/SpecialUserrights.php file

Mind that the Userrights feature is only available for a very limited numbers of users.

You may eventually want to immediately show the Permissions table in this page. To do this, replace:

function execute() {

by :

function execute() {
  global $wgOut ;
  $wgOut->addHTML( Permissions::BuildHtmlTable() ) ;

The above code will provide the table. It's a good idea. However, if you just want a link, use instead:

  global $wgOut ;
  $wgOut->addHTML( Permissions::BuildHtmlLink() ) ;

[edit] Updating your includes/SpecialRenameuser.php file

If you installed the Renameuser extension, you may, with a similar approach, replace :

function execute() {
  global $wgOut, $wgUser, $wgTitle, $wgRequest, $wgContLang, $wgLang;
  global $wgVersion, $wgMaxNameChars;

by :

function execute() {
  global $wgOut, $wgUser, $wgTitle, $wgRequest, $wgContLang, $wgLang;
  $wgOut->addHTML( Permissions::BuildHtmlLink() );
  global $wgVersion, $wgMaxNameChars;

[edit] Hacking

Within this section, it's assumed you use a Unix or GNU/Linux operating system (other systems may eventually (?) be useful for other tasks (?), but developing or hacking under such systems is, anyway, not considered professional/serious by the authors of the extension)

While you can easily retrieve it yourself by a statement such as :

./haDoc.sh SpecialPermissions.php

where haDoc.sh is :

cat $1 | grep "// \!" > $1.hadoc

here is the content of the haDoc documentation :

// !FILE : includes/SpecialPermissions.php
// !CLASS : Permissions // !INNER-CLASS
// !ANTI-CRASH : mediawiki stuff + version stuff
// !VERSION // !DVRM  :
// !CONFIG : default values (to be eventually modified before include) :
// !CONSTANT's : internal constants 
// !INIT : pre-init stuff processed because of an include_once in the LocalSettings.php file :
// !FUNCTION : wfSpecialPermissions()
        // !STEP-1 OF wfSpecialPermissions() : complete the messages that will be used :
        // !STEP-2  OF wfSpecialPermissions()  : hooks for logs : none...
        // !STEP-3  OF wfSpecialPermissions() : include what should be included :
        // !STEP-4  OF wfSpecialPermissions() : inner class definition(s) :
        // !CLASS: Permissions extends SpecialPage // !INNER-CLASS
                // !IV's : none
                // !CT
                // !IM's : instance methods
                // !IM : execute() // !OVRDN
                        // !TODO : rely on $wgValidSpecialPagesFr to translate...
                // !SF's : begin static functions :
                // !SF : function BuildHtmlLink()
                // !SF : function BuildHtmlTable()
                        // !STEP-1 OF BuildHtmlTable() : translate
                        // !STEP-2 OF BuildHtmlTable()  : init
                        // !STEP-3 OF BuildHtmlTable()  : build the 2 sets
                        // !STEP-4 OF BuildHtmlTable()  : sort the 2 sets
                        // !STEP-5 OF BuildHtmlTable() : it's now time to prepare the HTML output
                        // !STEP-5-1 OF BuildHtmlTable() : HTML thead stuff
                        // !STEP-5-2 OF BuildHtmlTable() : HTML tbody stuff
                        // !STEP-6 OF BuildHtmlTable() : returns the HTML string
                // !SF : function Wiki_2_Html( $szwMessage )
                // !SF : function Translate($szOriginal)
                // !SF : end static functions :
        }  // !END_OF_CLASS : Permissions
        // !STEP-5 OF wfSpecialPermissions() : register, make sure this special page is known
} // !END-FUNCTION : wfSpecialPermissions()
// !EOF : includes/SpecialPermissions.php
Personal tools