http://www.mediawiki.org/wiki/Special:Code/MediaWiki/96587

Revision: 96587
Author:   ialex
Date:     2011-09-08 17:10:42 +0000 (Thu, 08 Sep 2011)
Log Message:
-----------
No need to use an extension function to define a new log type

Modified Paths:
--------------
    trunk/extensions/SignDocument/SignDocument.php

Modified: trunk/extensions/SignDocument/SignDocument.php
===================================================================
--- trunk/extensions/SignDocument/SignDocument.php      2011-09-08 17:08:04 UTC 
(rev 96586)
+++ trunk/extensions/SignDocument/SignDocument.php      2011-09-08 17:10:42 UTC 
(rev 96587)
@@ -23,8 +23,6 @@
  * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 
2.0 or later
  */
 
-$wgExtensionFunctions[] = 'wfCreateSignatureLog';
-
 $wgExtensionCredits['specialpage'][] = array(
        'path'           => __FILE__,
        'name'           => 'SignDocument',
@@ -52,21 +50,12 @@
 $wgGroupPermissions['*']['createsigndocument'] = false;
 $wgGroupPermissions['sigadmin']['createsigndocument'] = true;
 
-/**
- * Create the Signature log.
- */
-function wfCreateSignatureLog() {
-       
+# Add a new log type
+$wgLogTypes[]                      = 'signature';
+$wgLogNames['signature']           = 'signaturelogpage';
+$wgLogHeaders['signature']         = 'signaturelogpagetext';
+$wgLogActions['signature/sign']    = 'signaturelogentry';
 
-       # Add a new log type
-       global $wgLogTypes, $wgLogNames, $wgLogHeaders, $wgLogActions;
-
-       $wgLogTypes[]                      = 'signature';
-       $wgLogNames['signature']           = 'signaturelogpage';
-       $wgLogHeaders['signature']         = 'signaturelogpagetext';
-       $wgLogActions['signature/sign']    = 'signaturelogentry';
-}
-
 /**
  * Logs the addition of a signature to a document. If it's an anonymous user,
  * it will add it to the logging table but the entry won't display on 
Special:Log.


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to