fix phpdoc comment
authorAntoine Musso <hashar@users.mediawiki.org>
Thu, 27 Jan 2005 19:51:47 +0000 (19:51 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Thu, 27 Jan 2005 19:51:47 +0000 (19:51 +0000)
44 files changed:
includes/AuthPlugin.php
includes/CategoryPage.php
includes/ChangesList.php
includes/DifferenceEngine.php
includes/Group.php
includes/HTMLForm.php
includes/HistoryBlob.php
includes/Hooks.php
includes/Image.php
includes/ImagePage.php
includes/Linker.php
includes/LinksUpdate.php
includes/MessageCache.php
includes/MessageCacheHints.php
includes/RawPage.php
includes/Revision.php
includes/SearchEngine.php
includes/SearchMySQL3.php
includes/SearchMySQL4.php
includes/SearchTsearch2.php
includes/SearchUpdate.php
includes/SkinPHPTal.php
includes/SkinTemplate.php
includes/SpecialData.php
includes/SpecialExport.php
includes/SpecialForum.php
includes/SpecialGrouplevels.php
includes/SpecialListusers.php
includes/SpecialMycontributions.php
includes/SpecialMypage.php
includes/SpecialMytalk.php
includes/SpecialNewimages.php
includes/SpecialPage.php
includes/SpecialPreferences.php
includes/SpecialSearch.php
includes/SpecialUndelete.php
includes/SpecialUnusedimages.php
includes/SpecialUpload.php
includes/SpecialUserlevels.php
includes/UserMailer.php
includes/UserTalkUpdate.php
includes/ZhClient.php
includes/normal/CleanUpTest.php
includes/normal/RandomTest.php

index eb2d469..894b096 100644 (file)
@@ -1,4 +1,7 @@
 <?php
+/**
+ * @package MediaWiki
+ */
 # Copyright (C) 2004 Brion Vibber <brion@pobox.com>
 # http://www.mediawiki.org/
 # 
@@ -32,7 +35,6 @@
  *
  * @package MediaWiki
  */
-
 class AuthPlugin {
        /**
         * Check whether there exists a user account with the given name.
index a3e7a71..6160b4d 100644 (file)
@@ -9,7 +9,8 @@
 if( !defined( 'MEDIAWIKI' ) )
        die();
 
-if( $wgCategoryMagicGallery ) 
+if( $wgCategoryMagicGallery )
+       /** */
        require_once('ImageGallery.php');
 
 /**
index 3918eeb..887e6e1 100644 (file)
@@ -1,14 +1,23 @@
 <?php
+/**
+ * @package MediaWiki
+ */
 
+/**
+ * @package MediaWiki
+ */
 class ChangesList {
        # Called by history lists and recent changes
        #
 
+       /** @todo document */
        function ChangesList( &$skin ) {
                $this->skin =& $skin;
        }
        
-       # Returns text for the start of the tabular part of RC
+       /** 
+        * Returns text for the start of the tabular part of RC
+        */
        function beginRecentChangesList() {
                $this->rc_cache = array() ;
                $this->rcMoveIndex = 0;
@@ -587,6 +596,4 @@ class ChangesList {
        }
 
 }
-
-
-?>
+?>
\ No newline at end of file
index 758a6e0..7d910aa 100644 (file)
@@ -5,11 +5,14 @@
  * @subpackage DifferenceEngine
  */
 
+/** */
 require_once( 'Revision.php' );
 
 /**
  * @todo document
  * @access public
+ * @package MediaWiki 
+ * @subpackage DifferenceEngine
  */
 class DifferenceEngine {
        /* private */ var $mOldid, $mNewid;
@@ -315,6 +318,8 @@ define('USE_ASSERTS', function_exists('assert'));
 /**
  * @todo document
  * @access private
+ * @package MediaWiki 
+ * @subpackage DifferenceEngine
  */
 class _DiffOp {
        var $type;
@@ -337,6 +342,8 @@ class _DiffOp {
 /**
  * @todo document
  * @access private
+ * @package MediaWiki 
+ * @subpackage DifferenceEngine
  */
 class _DiffOp_Copy extends _DiffOp {
        var $type = 'copy';
@@ -356,6 +363,8 @@ class _DiffOp_Copy extends _DiffOp {
 /**
  * @todo document
  * @access private
+ * @package MediaWiki 
+ * @subpackage DifferenceEngine
  */
 class _DiffOp_Delete extends _DiffOp {
        var $type = 'delete';
@@ -373,6 +382,8 @@ class _DiffOp_Delete extends _DiffOp {
 /**
  * @todo document
  * @access private
+ * @package MediaWiki 
+ * @subpackage DifferenceEngine
  */
 class _DiffOp_Add extends _DiffOp {
        var $type = 'add';
@@ -390,6 +401,8 @@ class _DiffOp_Add extends _DiffOp {
 /**
  * @todo document
  * @access private
+ * @package MediaWiki 
+ * @subpackage DifferenceEngine
  */
 class _DiffOp_Change extends _DiffOp {
        var $type = 'change';
@@ -424,6 +437,8 @@ class _DiffOp_Change extends _DiffOp {
  *
  * @author Geoffrey T. Dairiki
  * @access private
+ * @package MediaWiki 
+ * @subpackage DifferenceEngine
  */
 class _DiffEngine
 {
@@ -829,6 +844,8 @@ class _DiffEngine
  * Class representing a 'diff' between two sequences of strings.
  * @todo document
  * @access private
+ * @package MediaWiki 
+ * @subpackage DifferenceEngine
  */
 class Diff
 {
@@ -969,6 +986,8 @@ class Diff
  * FIXME: bad name.
  * @todo document
  * @access private
+ * @package MediaWiki 
+ * @subpackage DifferenceEngine
  */
 class MappedDiff extends Diff
 {
@@ -1031,6 +1050,8 @@ class MappedDiff extends Diff
  * to obtain fancier outputs.
  * @todo document
  * @access private
+ * @package MediaWiki 
+ * @subpackage DifferenceEngine
  */
 class DiffFormatter
 {
@@ -1196,6 +1217,8 @@ define('NBSP', '&#160;');                 // iso-8859-x non-breaking space.
 /**
  * @todo document
  * @access private
+ * @package MediaWiki 
+ * @subpackage DifferenceEngine
  */
 class _HWLDF_WordAccumulator {
        function _HWLDF_WordAccumulator () {
@@ -1253,6 +1276,8 @@ class _HWLDF_WordAccumulator {
 /**
  * @todo document
  * @access private
+ * @package MediaWiki 
+ * @subpackage DifferenceEngine
  */
 class WordLevelDiff extends MappedDiff
 {
@@ -1319,6 +1344,8 @@ class WordLevelDiff extends MappedDiff
  *     Wikipedia Table style diff formatter.
  * @todo document
  * @access private
+ * @package MediaWiki 
+ * @subpackage DifferenceEngine
  */
 class TableDiffFormatter extends DiffFormatter
 {
index 9ae0718..1502eab 100644 (file)
@@ -5,6 +5,7 @@
 
 /**
  * Class to manage a group
+ * @package MediaWiki
  */
 class Group {
        /**#@+
@@ -20,7 +21,7 @@ class Group {
        var $dataLoaded;
        /** string $rights Contain rights values : "foo,bar,bla" */
        var $rights;
-       /**#@- */
+       /**#@-*/
        
        /** Constructor */
        function Group() {
@@ -185,4 +186,4 @@ class Group {
                $this->rights = $rights;
        }
 }
-?>
+?>
\ No newline at end of file
index 1441fe7..eb72179 100644 (file)
@@ -2,6 +2,7 @@
 /**
  * This file contain a class to easily build HTML forms as well as custom
  * functions used by SpecialUserlevels.php and SpecialGrouplevels.php
+ * @package MediaWiki
  */
 
 /**
index c416bdd..b9df3d6 100644 (file)
  */
 class HistoryBlob
 {
-       # setMeta and getMeta currently aren't used for anything, I just thought they might be useful in the future
-       # The meta value is a single string
+       /**
+        * setMeta and getMeta currently aren't used for anything, I just thought
+        * they might be useful in the future.
+        * @param string $meta a single string
+        */
        function setMeta( $meta ) {}
 
-       # Gets the meta-value
+       /**
+        * setMeta and getMeta currently aren't used for anything, I just thought
+        * they might be useful in the future.
+        * Gets the meta-value
+        */
        function getMeta() {}
 
-       # Adds an item of text, returns a stub object which points to the item
-       # You must call setLocation() on the stub object before storing it to the database
+       /**
+        * Adds an item of text, returns a stub object which points to the item.
+        * You must call setLocation() on the stub object before storing it to the
+        * database
+        */
        function addItem() {}
 
-       # Get item by hash
+       /** 
+        * Get item by hash
+        */
        function getItem( $hash ) {}
        
        # Set the "default text"
@@ -30,7 +42,9 @@ class HistoryBlob
        # be other revisions in the same object
        function setText() {}
 
-       # Get default text. This is called from Revision::getRevisionText()
+       /**
+        * Get default text. This is called from Revision::getRevisionText()
+        */
        function getText() {}
 }
 
@@ -48,17 +62,20 @@ class ConcatenatedGzipHistoryBlob extends HistoryBlob
                        die( "Need zlib support to read or write this kind of history object (ConcatenatedGzipHistoryBlob)\n" );
                }
        }
-       
+
+       /** @todo document */
        function setMeta( $metaData ) {
                $this->uncompress();
                $this->mItems['meta'] = $metaData;
        }
 
+       /** @todo document */
        function getMeta() {
                $this->uncompress();
                return $this->mItems['meta'];
        }
-       
+
+       /** @todo document */
        function addItem( $text ) {
                $this->uncompress();
                $hash = md5( $text );
@@ -69,6 +86,7 @@ class ConcatenatedGzipHistoryBlob extends HistoryBlob
                return $stub;
        }
 
+       /** @todo document */
        function getItem( $hash ) {
                $this->uncompress();
                if ( array_key_exists( $hash, $this->mItems ) ) {
@@ -78,11 +96,13 @@ class ConcatenatedGzipHistoryBlob extends HistoryBlob
                }
        }
 
+       /** @todo document */
        function removeItem( $hash ) {
                $this->mSize -= strlen( $this->mItems[$hash] );
                unset( $this->mItems[$hash] );
        }
-       
+
+       /** @todo document */
        function compress() {
                if ( !$this->mCompressed  ) {
                        $this->mItems = gzdeflate( serialize( $this->mItems ) );
@@ -90,6 +110,7 @@ class ConcatenatedGzipHistoryBlob extends HistoryBlob
                }
        }
 
+       /** @todo document */
        function uncompress() { 
                if ( $this->mCompressed ) {
                        $this->mItems = unserialize( gzinflate( $this->mItems ) );
@@ -97,27 +118,33 @@ class ConcatenatedGzipHistoryBlob extends HistoryBlob
                }
        }
 
+       /** @todo document */
        function getText() {
                $this->uncompress();
                return $this->getItem( $this->mDefaultHash );
        }
-       
+
+       /** @todo document */
        function setText( $text ) {
                $this->uncompress();
                $stub = $this->addItem( $text );
                $this->mDefaultHash = $stub->mHash;
        }
 
+       /** @todo document */
        function __sleep() {
                $this->compress();
                return array( 'mVersion', 'mCompressed', 'mItems', 'mDefaultHash' );
        }
 
+       /** @todo document */
        function __wakeup() {
                $this->uncompress();
        }
 
-       # Determines if this object is happy
+       /**
+        * Determines if this object is happy
+        */
        function isHappy( $maxFactor, $factorThreshold ) {
                if ( count( $this->mItems ) == 0 ) {
                        return true;
@@ -140,19 +167,26 @@ class ConcatenatedGzipHistoryBlob extends HistoryBlob
        }
 }
 
-class HistoryBlobStub
-{
+/**
+ * @package MediaWiki
+ */
+class HistoryBlobStub {
        var $mOldId, $mHash;
 
+       /** @todo document */
        function HistoryBlobStub( $hash = '', $oldid = 0 ) {
                $this->mHash = $hash;
        }
        
-       # Sets the location (old_id) of the main object to which this object points
+       /**
+        * Sets the location (old_id) of the main object to which this object
+        * points
+        */
        function setLocation( $id ) {
                $this->mOldId = $id;
        }
-       
+
+       /** @todo document */
        function getText() {
                $dbr =& wfGetDB( DB_SLAVE );
                $row = $dbr->selectRow( 'text', array( 'old_flags', 'old_text' ), array( 'old_id' => $this->mOldId ) );
@@ -166,8 +200,9 @@ class HistoryBlobStub
                return $obj->getItem( $this->mHash );
        }
 
+       /** @todo document */
        function getHash() {
                return $this->mHash;
        }
 }
-?>
+?>
\ No newline at end of file
index 5cfde41..b156a6a 100644 (file)
  *
  * @author <evan@wikitravel.org>
  * @package MediaWiki
- * @seealso hooks.doc
+ * @see hooks.doc
  */
 
 if (defined('MEDIAWIKI')) {
        
-       /* 
-        * Because programmers assign to $wgHooks, we need to be very
-        * careful about its contents. So, there's a lot more error-checking
-        * in here than would normally be necessary.
-        */
-       
-       function wfRunHooks() {
+/** 
+ * Because programmers assign to $wgHooks, we need to be very
+ * careful about its contents. So, there's a lot more error-checking
+ * in here than would normally be necessary.
+ */
+function wfRunHooks() {
                
-               global $wgHooks;
+       global $wgHooks;
 
-               if (!is_array($wgHooks)) {
-                       wfDieDebugBacktrace("Global hooks array is not an array!\n");
-                       return false;
-               }
+       if (!is_array($wgHooks)) {
+               wfDieDebugBacktrace("Global hooks array is not an array!\n");
+               return false;
+       }
 
-               $args = func_get_args();
+       $args = func_get_args();
 
-               if (count($args) < 1) {
-                       wfDieDebugBacktrace("No event name given for wfRunHooks().\n");
-                       return false;
-               }
+       if (count($args) < 1) {
+               wfDieDebugBacktrace("No event name given for wfRunHooks().\n");
+               return false;
+       }
 
-               $event = array_shift($args);
+       $event = array_shift($args);
 
-               if (!array_key_exists($event, $wgHooks)) {
-                       return true;
-               }
+       if (!array_key_exists($event, $wgHooks)) {
+               return true;
+       }
 
-               if (!is_array($wgHooks[$event])) {
-                       wfDieDebugBacktrace("Hooks array for event '$event' is not an array!\n");
-                       return false;
-               }
+       if (!is_array($wgHooks[$event])) {
+               wfDieDebugBacktrace("Hooks array for event '$event' is not an array!\n");
+               return false;
+       }
 
-               foreach ($wgHooks[$event] as $hook) {
-                       
-                       $object = NULL;
-                       $method = NULL;
-                       $func = NULL;
-                       $data = NULL;
-                       $have_data = false;
+       foreach ($wgHooks[$event] as $hook) {
+               
+               $object = NULL;
+               $method = NULL;
+               $func = NULL;
+               $data = NULL;
+               $have_data = false;
 
-                       /* $hook can be: a function, an object, an array of $function and $data,
-                        * an array of just a function, an array of object and method, or an
-                        * array of object, method, and data.
-                        */
-                       
-                       if (is_array($hook)) {
-                               if (count($hook) < 1) {
-                                       wfDieDebugBacktrace("Empty array in hooks for " . $event . "\n");
-                               } else if (is_object($hook[0])) {
-                                       $object = $hook[0];
-                                       if (count($hook) < 2) {
-                                               $method = "on" . $event;
-                                       } else {
-                                               $method = $hook[1];
-                                               if (count($hook) > 2) {
-                                                       $data = $hook[2];
-                                                       $have_data = true;
-                                               }
-                                       }
-                               } else if (is_string($hook[0])) {
-                                       $func = $hook[0];
-                                       if (count($hook) > 1) {
-                                               $data = $hook[1];
+               /* $hook can be: a function, an object, an array of $function and $data,
+                * an array of just a function, an array of object and method, or an
+                * array of object, method, and data.
+                */
+               
+               if (is_array($hook)) {
+                       if (count($hook) < 1) {
+                               wfDieDebugBacktrace("Empty array in hooks for " . $event . "\n");
+                       } else if (is_object($hook[0])) {
+                               $object = $hook[0];
+                               if (count($hook) < 2) {
+                                       $method = "on" . $event;
+                               } else {
+                                       $method = $hook[1];
+                                       if (count($hook) > 2) {
+                                               $data = $hook[2];
                                                $have_data = true;
                                        }
-                               } else {
-                                       wfDieDebugBacktrace("Unknown datatype in hooks for " . $event . "\n");
                                }
-                       } else if (is_string($hook)) { # functions look like strings, too
-                               $func = $hook;
-                       } else if (is_object($hook)) {
-                               $object = $hook;
-                               $method = "on" . $event;
+                       } else if (is_string($hook[0])) {
+                               $func = $hook[0];
+                               if (count($hook) > 1) {
+                                       $data = $hook[1];
+                                       $have_data = true;
+                               }
                        } else {
                                wfDieDebugBacktrace("Unknown datatype in hooks for " . $event . "\n");
                        }
+               } else if (is_string($hook)) { # functions look like strings, too
+                       $func = $hook;
+               } else if (is_object($hook)) {
+                       $object = $hook;
+                       $method = "on" . $event;
+               } else {
+                       wfDieDebugBacktrace("Unknown datatype in hooks for " . $event . "\n");
+               }
 
-                       if ($have_data) {
-                               $hook_args = array_merge(array($data), $args);
-                       } else {
-                               $hook_args = $args;
-                       }
-                       
-                       if ($object) {
-                               $retval = call_user_func_array(array($object, $method), $hook_args);
-                       } else {
-                               $retval = call_user_func_array($func, $hook_args);
-                       }
-                       
-                       if (is_string($retval)) {
-                               global $wgOut;
-                               $wgOut->fatalError($retval);
-                               return false;
-                       } else if (!$retval) {
-                               return false;
-                       }
+               if ($have_data) {
+                       $hook_args = array_merge(array($data), $args);
+               } else {
+                       $hook_args = $args;
                }
                
-               return true;
+               if ($object) {
+                       $retval = call_user_func_array(array($object, $method), $hook_args);
+               } else {
+                       $retval = call_user_func_array($func, $hook_args);
+               }
+               
+               if (is_string($retval)) {
+                       global $wgOut;
+                       $wgOut->fatalError($retval);
+                       return false;
+               } else if (!$retval) {
+                       return false;
+               }
        }
+       
+       return true;
 }
-
-?>
+} /* if defined(MEDIAWIKI) */ 
+?>
\ No newline at end of file
index ea1fc36..c42080b 100644 (file)
@@ -906,6 +906,7 @@ function getSVGsize( $filename ) {
 
 /**
  * Wrapper class for thumbnail images
+ * @package MediaWiki
  */
 class ThumbnailImage {
        /**
index 7bdfe8c..21dd58c 100644 (file)
@@ -403,6 +403,10 @@ class ImagePage extends Article {
        }
 }
 
+/**
+ * @todo document
+ * @package MediaWiki
+ */
 class ImageHistoryList {
        function ImageHistoryList( &$skin ) {
                $this->skin =& $skin;
index 3edca4b..d295841 100644 (file)
@@ -1,11 +1,13 @@
 <?php
-
 /**
  * Split off some of the internal bits from Skin.php.
  * These functions are used for primarily page content:
  * links, embedded images, table of contents. Links are
  * also used in the skin.
- *
+ * @package MediaWiki
+ */
+
+/**
  * For the moment, Skin is a descendent class of Linker.
  * In the future, it should probably be further split
  * so that ever other bit of the wiki doesn't have to
  *
  * @package MediaWiki
  */
-
 class Linker {
        var $linktrail ; # linktrail regexp
        var $postParseLinkColour = false;
 
+       /** @todo document */
        function Linker() {
                global $wgContLang;
                $this->linktrail = $wgContLang->linkTrail();
@@ -37,6 +39,7 @@ class Linker {
                return wfSetVar( $this->postParseLinkColour, $setting );
        }
 
+       /** @todo document */
        function getExternalLinkAttributes( $link, $text, $class='' ) {
                global $wgContLang;
 
@@ -54,6 +57,7 @@ class Linker {
                return $r;
        }
 
+       /** @todo document */
        function getInternalLinkAttributes( $link, $text, $broken = false ) {
                $link = urldecode( $link );
                $link = str_replace( '_', ' ', $link );
@@ -109,6 +113,7 @@ class Linker {
                return $result;
        }
 
+       /** @todo document */
        function makeKnownLink( $title, $text = '', $query = '', $trail = '', $prefix = '',$aprops = '') {
                $nt = Title::newFromText( $title );
                if ($nt) {
@@ -119,6 +124,7 @@ class Linker {
                }
        }
 
+       /** @todo document */
        function makeBrokenLink( $title, $text = '', $query = '', $trail = '' ) {
                $nt = Title::newFromText( $title );
                if ($nt) {
@@ -129,6 +135,7 @@ class Linker {
                }
        }
 
+       /** @todo document */
        function makeStubLink( $title, $text = '', $query = '', $trail = '' ) {
                $nt = Title::newFromText( $title );
                if ($nt) {
@@ -360,6 +367,7 @@ class Linker {
                return $s;
        }
 
+       /** @todo document */
        function makeSelfLinkObj( &$nt, $text = '', $query = '', $trail = '', $prefix = '' ) {
                $u = $nt->escapeLocalURL( $query );
                if ( '' == $text ) {
@@ -375,6 +383,7 @@ class Linker {
                return "<strong>{$prefix}{$text}{$inside}</strong>{$trail}";
        }
 
+       /** @todo document */
        function fnamePart( $url ) {
                $basename = strrchr( $url, '/' );
                if ( false === $basename ) {
@@ -385,6 +394,7 @@ class Linker {
                return htmlspecialchars( $basename );
        }
 
+       /** @todo document */
        function makeImage( $url, $alt = '' ) {
                global $wgOut;
                if ( '' == $alt ) {
@@ -394,11 +404,13 @@ class Linker {
                return $s;
        }
 
+       /** @todo document */
        function makeImageLink( $name, $url, $alt = '' ) {
                $nt = Title::makeTitleSafe( NS_IMAGE, $name );
                return $this->makeImageLinkObj( $nt, $alt );
        }
 
+       /** @todo document */
        function makeImageLinkObj( $nt, $alt = '' ) {
                global $wgContLang, $wgUseImageResize;
                $img   = Image::newFromTitle( $nt );
@@ -610,11 +622,13 @@ class Linker {
                return str_replace("\n", ' ', $s);
        }
 
+       /** @todo document */
        function makeMediaLink( $name, $url, $alt = '' ) {
                $nt = Title::makeTitleSafe( NS_IMAGE, $name );
                return $this->makeMediaLinkObj( $nt, $alt );
        }
 
+       /** @todo document */
        function makeMediaLinkObj( $nt, $alt = '', $nourl=false ) {             
                if ( ! isset( $nt ) )
                {
@@ -638,6 +652,7 @@ class Linker {
                return $s;
        }
 
+       /** @todo document */
        function specialLink( $name, $key = '' ) {
                global $wgContLang;
 
@@ -647,6 +662,7 @@ class Linker {
                  wfMsg( $key ) );
        }
 
+       /** @todo document */
        function makeExternalLink( $url, $text, $escape = true, $linktype = '' ) {
                $style = $this->getExternalLinkAttributes( $url, $text, 'external ' . $linktype );
                global $wgNoFollowLinks;
@@ -738,11 +754,13 @@ class Linker {
                wfProfileOut( $fname );
                return $comment;
        }
-       
+
+       /** @todo document */
        function tocIndent() {
                return "\n<ul>";
        }
 
+       /** @todo document */
        function tocUnindent($level) {
                return "</li>\n" . str_repeat( "</ul>\n</li>\n", $level>0 ? $level : 0 );
        }
@@ -754,11 +772,12 @@ class Linker {
                return "\n<li class='toclevel-$level'><a href=\"#" . $anchor . '"><span class="tocnumber">' . $tocnumber . '</span> <span class="toctext">' . $tocline . '</span></a>';
        }
 
-       function tocLineEnd()
-       {
+       /** @todo document */
+       function tocLineEnd() {
                return "</li>\n";
        }
 
+       /** @todo document */
        function tocList($toc) {
                return "<div id='toc'>\n" 
                           . "<div id='toctitle'><h2>" . wfMsg('toc') . "</h2></div>\n"
@@ -784,6 +803,7 @@ class Linker {
                return '<span oncontextmenu=\'document.location="'.$url.'";return false;\'>'.$head.'</span>';
        }
 
+       /** @todo document */
        function editSectionScript( $nt, $section, $head ) {
                global $wgRequest;
                if( $wgRequest->getInt( 'oldid' ) && ( $wgRequest->getVal( 'diff' ) != '0' ) ) {
@@ -793,6 +813,7 @@ class Linker {
                return '<span oncontextmenu=\'document.location="'.$url.'";return false;\'>'.$head.'</span>';
        }
 
+       /** @todo document */
        function editSectionLinkForOther( $title, $section ) {
                global $wgRequest;
                global $wgContLang;
@@ -812,6 +833,7 @@ class Linker {
 
        }
 
+       /** @todo document */
        function editSectionLink( $nt, $section ) {
                global $wgRequest;
                global $wgContLang;
@@ -834,9 +856,6 @@ class Linker {
                        $nearside = 'left';
                }
                return "<div class=\"editsection\" style=\"float:$farside;margin-$nearside:5px;\">[".$url."]</div>";
-
        }
-
 }
-
 ?>
\ No newline at end of file
index 08fad8b..8fcca3d 100644 (file)
@@ -14,7 +14,7 @@ class LinksUpdate {
         * @access private
         */
        var $mId, $mTitle;
-       /**#@- */
+       /**#@-*/
 
        /**
         * Constructor
@@ -297,5 +297,4 @@ class LinksUpdate {
                $dbw->delete( 'brokenlinks', array( 'bl_to' => $this->mTitle ), $fname );
        }
 }
-
-?>
+?>
\ No newline at end of file
index a099a04..25c2b19 100755 (executable)
@@ -4,6 +4,7 @@
  * @package MediaWiki
  */
 
+/** */
 require_once( 'Revision.php' );
 
 /**
index 582fec3..168a297 100644 (file)
@@ -1,15 +1,17 @@
 <?
+/**
+ * @package MediaWiki
+ */ 
 
-/* 
- *     @package Mediawiki
+/** 
+ * @package Mediawiki
  *
- *     This class should provide methods for message 
- *     cache key hints for various scopes */
-
+ * This class should provide methods for message cache key hints for various
+ * scopes
+ */
 class MessageCacheHints {
-       function get($scope="global") {
+       function get($scope='global') {
                return array('TODO');
        }
 }
-
-?>
+?>
\ No newline at end of file
index 2c9b8c5..f7791f4 100644 (file)
@@ -10,6 +10,7 @@
  * @package MediaWiki
  */
 
+/** */
 require_once( 'Revision.php' );
 
 /**
index 8561049..e7b6864 100644 (file)
@@ -1,8 +1,17 @@
 <?php
+/**
+ * @package MediaWiki
+ * @todo document
+ */
 
+/** */
 require_once( 'Database.php' );
 require_once( 'Article.php' );
 
+/**
+ * @package MediaWiki
+ * @todo document
+ */
 class Revision {
        /**
         * Load a page revision from a given revision ID number.
@@ -149,7 +158,7 @@ class Revision {
                $this->mText      = $this->getRevisionText( $row );
        }
        
-       /** @+
+       /**#@+
         * @access public
         */
        
@@ -246,7 +255,7 @@ class Revision {
                $next = $this->mTitle->getNextRevisionID( $this->mId );
                return Revision::newFromTitle( $this->mTitle, $next );
        }
-       /** @- */
+       /**#@-*/
 
        /**
          * Get revision text associated with an old or archive row
@@ -337,9 +346,5 @@ class Revision {
                }
                return implode( ',', $flags );
        }
-
-
 }
-
-
 ?>
\ No newline at end of file
index d368086..90e2671 100644 (file)
@@ -4,7 +4,9 @@
  * @package MediaWiki
  */
 
-/** */
+/**
+ * @package MediaWiki
+ */
 class SearchEngine {
        var $limit = 10;
        var $offset = 0;
@@ -238,7 +240,9 @@ class SearchEngine {
        
 }
 
-/** */
+/**
+ * @package MediaWiki
+ */
 class SearchEngineDummy {
        function search( $term ) {
                return null;
index 07b9810..d6b1b7e 100644 (file)
  * @subpackage Search
  */
 
+/** */
 require_once( 'SearchEngine.php' );
 
+/**
+ * @package MediaWiki
+ * @subpackage Search
+ */
 class SearchMySQL3 extends SearchEngine {
        function SearchMySQL3( &$db ) {
                $this->db =& $db;
index c0462c4..6847ac1 100644 (file)
  * @subpackage Search
  */
 
+/** */
 require_once( 'SearchEngine.php' );
 
+/**
+ * @package MediaWiki
+ * @subpackage Search
+ */
 class SearchMySQL4 extends SearchEngine {
        var $strictMatching = true;
        
+       /** @todo document */
        function SearchMySQL4( &$db ) {
                $this->db =& $db;
        }
-       
+
+       /** @todo document */
        function getIndexField( $fulltext ) {
                return $fulltext ? 'si_text' : 'si_title';
        }
 
+       /** @todo document */
        function parseQuery( $filteredText, $fulltext ) {
                global $wgContLang;
                $lc = SearchEngine::legalSearchChars();
@@ -70,6 +78,7 @@ class SearchMySQL4 extends SearchEngine {
                return " MATCH($field) AGAINST('$searchon' IN BOOLEAN MODE) ";
        }
 
+       /** @todo document */
        function queryMain( $filteredTerm, $fulltext ) {
                $match = $this->parseQuery( $filteredTerm, $fulltext );
                $page = $this->db->tableName( 'page' );
@@ -80,28 +89,28 @@ class SearchMySQL4 extends SearchEngine {
                        'WHERE page_id=si_page AND page_latest=old_id AND ' . $match;
        }
 
-        function update( $id, $title, $text ) {
-                $dbw=& wfGetDB(DB_MASTER);
-                $dbw->replace( 'searchindex', array(array('si_page')),
-                        array(
-                                'si_page' => $id,
-                                'si_title' => $title,
-                                'si_text' => $text
-                        ), 'SearchMySQL4::update' );
-        }
+       /** @todo document */
+    function update( $id, $title, $text ) {
+            $dbw=& wfGetDB(DB_MASTER);
+            $dbw->replace( 'searchindex', array(array('si_page')),
+                    array(
+                            'si_page' => $id,
+                            'si_title' => $title,
+                            'si_text' => $text
+                    ), 'SearchMySQL4::update' );
+    }
 
-        function updateTitle($id,$title) {
-                $dbw=& wfGetDB(DB_MASTER);
-                $lowpri=$dbw->lowPriorityOption();
-                $searchindex = $dbw->tableName( 'searchindex' );
+       /** @todo document */
+    function updateTitle($id,$title) {
+            $dbw=& wfGetDB(DB_MASTER);
+            $lowpri=$dbw->lowPriorityOption();
+            $searchindex = $dbw->tableName( 'searchindex' );
 
-                $sql = "UPDATE $lowpri $searchindex SET si_title='" .
-                          $dbw->strencode( $title ) .
-                          "' WHERE si_page={$id}";
-
-                $dbw->query( $sql, "SearchMySQL4::updateTitle" );
-        }
+            $sql = "UPDATE $lowpri $searchindex SET si_title='" .
+                      $dbw->strencode( $title ) .
+                      "' WHERE si_page={$id}";
 
+            $dbw->query( $sql, "SearchMySQL4::updateTitle" );
+    }
 }
-
-?>
+?>
\ No newline at end of file
index db303a6..655a48e 100644 (file)
  * @subpackage Search
  */
 
+/** */
 require_once( 'SearchEngine.php' );
 
+/**
+ * @todo document
+ * @package MediaWiki
+ * @subpackage Search
+ */
 class SearchTsearch2 extends SearchEngine {
        var $strictMatching = false;
        
index 8e0b74f..57f9911 100644 (file)
@@ -105,7 +105,10 @@ class SearchUpdate {
        }
 }
 
-/* Placeholder class */
+/**
+ * Placeholder class
+ * @package MediaWiki
+ */
 class SearchUpdateMyISAM extends SearchUpdate {
        # Inherits everything
 }
index a053203..3efb2e3 100644 (file)
@@ -108,6 +108,11 @@ class SkinPHPTal extends SkinTemplate {
        }
 }
 
+/**
+ * @todo document
+ * @package MediaWiki
+ * @subpackage Skins
+ */
 class PHPTAL_version_bridge {
        function PHPTAL_version_bridge( $file, $repository=false, $cache_dir=false ) {
                $this->tpl =& new PHPTAL( $file );
index c3ac8de..c54f7f1 100644 (file)
@@ -916,6 +916,8 @@ class SkinTemplate extends Skin {
 /**
  * Generic wrapper for template functions, with interface
  * compatible with what we use of PHPTAL 0.7.
+ * @package MediaWiki
+ * @subpackage Skins
  */
 class QuickTemplate {
        /**
@@ -1013,4 +1015,4 @@ class QuickTemplate {
 }
 
 } // end of if( defined( 'MEDIAWIKI' ) ) 
-?>
+?>
\ No newline at end of file
index b4dbb3a..1988ed2 100644 (file)
@@ -31,25 +31,26 @@ INDEX ( rev_masterkey )
 
 */
 
+/** @todo document */
 function wfDataPreview ( &$t , &$dk )
        {
-       $s = "" ;
-       $u = explode ( "((" , $t ) ;
+       $s = '' ;
+       $u = explode ( '((' , $t ) ;
        foreach ( $u AS $x )
                {
-               $y = explode ( "))" , $x ) ;
+               $y = explode ( '))' , $x ) ;
                if ( count ( $y ) == 2 )
                        {
-                       $z = explode ( "/" , $y[0] ) ;
+                       $z = explode ( '/' , $y[0] ) ;
                        $keyname = $z[0] ;
                        $isMasterKey = false ;
-                       if ( substr ( $keyname , 0 , 1 ) == "!" )
+                       if ( substr ( $keyname , 0 , 1 ) == '!' )
                                {
                                $keyname = substr ( $keyname , 1 ) ;
                                $isMasterKey = true ;
                                }
                        if ( isset ( $dk[$keyname] ) ) $value= $dk[$keyname] ;
-                       else $value = "" ;
+                       else $value = '' ;
                        if ( $isMasterKey ) $value = "<b>{$value}</b>" ;
                        $s .= $value . $y[1] ;
                        }
@@ -58,9 +59,10 @@ function wfDataPreview ( &$t , &$dk )
        return $s ;
        }
 
+/** @todo document */
 function wfDataView ( $dt ) # $dt = data type
        {
-       if ( $dt == "" ) return ;
+       if ( $dt == '' ) return ;
        global $wgParser, $wgTitle;
        global $wgOut , $wgUser ;
        $nsdata = 20 ;
@@ -84,9 +86,10 @@ function wfDataView ( $dt ) # $dt = data type
        $wgOut->AddHTML ( $s ) ;
        }
 
+/** @todo document */
 function wfDataEdit ( $dt ) # $dt = data type
        {
-       if ( $dt == "" ) return ;
+       if ( $dt == '' ) return ;
        global $wgParser, $wgTitle;
        global $wgOut , $wgUser ;
        $nsdata = 20 ;
@@ -100,7 +103,7 @@ function wfDataEdit ( $dt ) # $dt = data type
        else $masterkey = "" ;
        
        if ( isset ( $_POST['comment'] ) ) $comment = $_POST['comment'] ;
-       else $comment = "" ;
+       else $comment = '' ;
        
        # Read form source
        $dbr =& wfGetDB( DB_SLAVE );
@@ -124,8 +127,8 @@ function wfDataEdit ( $dt ) # $dt = data type
                $r = $dbw->query( $sql, "wfDataEdit" );
                $newrev = $dbr->fetchObject( $r ) ;
                if ( isset ( $newrev ) AND isset ( $newrev->m ) ) $newrev = $newrev->m ;
-               else $newrev = "" ;
-               if ( $newrev == "" ) $newrev = 1 ;
+               else $newrev = '' ;
+               if ( $newrev == '' ) $newrev = 1 ;
                
                # Generate SQL
                $dbw->query( "BEGIN", "wfDataEdit" );
@@ -161,11 +164,11 @@ function wfDataEdit ( $dt ) # $dt = data type
        if ( isset ( $_POST['preview'] ) ) $s .= wfDataPreview ( $t , $dk ) . "\n<hr>\n" ;
 
        # Editing
-       $t = explode ( "((" , $t ) ;
+       $t = explode ( '((' , $t ) ;
        $s .= "<form method=post href=\"index.php?title=Special:Data\">" ;
        foreach ( $t AS $x )
                {
-               $y = explode ( "))" , $x ) ;
+               $y = explode ( '))' , $x ) ;
                if ( count ( $y ) == 2 )
                        {
                        $z = explode ( "/" , $y[0] ) ;
@@ -177,7 +180,7 @@ function wfDataEdit ( $dt ) # $dt = data type
                                $isMasterKey = true ;
                                }
 
-                       $value = "" ;
+                       $value = '' ;
                        if ( isset ( $dk[$keyname] ) ) $value= $dk[$keyname] ;
                        if ( $isMasterKey )
                                {
@@ -185,8 +188,8 @@ function wfDataEdit ( $dt ) # $dt = data type
                                $masterkeyvalue = $value ;
                                }
                        
-                       $input = "" ;
-                       $name = "dk[" . $keyname . "]" ;
+                       $input = '' ;
+                       $name = 'dk[' . $keyname . ']' ;
                        
                        if ( count ( $z ) == 1 ) $z[] = "line" ; # Default
                        $type = strtolower ( $z[1] ) ;
@@ -205,7 +208,7 @@ function wfDataEdit ( $dt ) # $dt = data type
                                        }
                                $s .= "</select>" ;
                                }
-                       if ( $isMasterKey AND $revision != "" ) $input = "<b>{$value}</b>" ;
+                       if ( $isMasterKey AND $revision != '' ) $input = "<b>{$value}</b>" ;
                                
                        $s .= "{$input}" ;
                        $s .= $y[1] ;
@@ -224,27 +227,26 @@ function wfDataEdit ( $dt ) # $dt = data type
        $wgOut->AddHTML ( $s ) ;
        }
 
-
-function wfSpecialData()
-{
+/** @todo document */
+function wfSpecialData() {
        global $wgUseData ;
-       if ( !$wgUseData ) return "" ;
+       if ( !$wgUseData ) return '' ;
        
        global $wgOut ;
        if ( isset ( $_GET['data_action'] ) ) $data_action = $_GET['data_action'] ;
-       else $data_action = "" ;
+       else $data_action = '' ;
        if ( isset ( $_POST['add_data'] ) ) $data_action = "add_data" ;
        if ( isset ( $_POST['view_data'] ) ) $data_action = "view_data" ;
        $nsdata = 20 ;
        
        $last = "<hr><a href=\"index.php?title=Special:Data\">Back to data</a>" ;
        
-       if ( $data_action == "" )
+       if ( $data_action == '' )
                {
-               $s = "" ;
+               $s = '';
 
-               $s .= "<form method=post>" ;
-               $s .= "Data type " ;
+               $s .= '<form method=post>' ;
+               $s .= 'Data type ' ;
                $dbr =& wfGetDB( DB_SLAVE );
                $sql = "SELECT cur_id,cur_title FROM cur WHERE cur_namespace={$nsdata}";
                $res1 = $dbr->query( $sql, "wfSpecialData" );
@@ -260,20 +262,19 @@ function wfSpecialData()
                $s .= "</form>" ;
 
                $wgOut->AddHTML ( $s ) ;
-               $last = "" ;
+               $last = '' ;
                }
-       else if ( $data_action == "add_data" )
+       else if ( $data_action == 'add_data' )
                {
                wfDataEdit ( $_POST['data_type'] ) ;
                }
-       else if ( $data_action == "view_data" )
+       else if ( $data_action == 'view_data' )
                {
                wfDataView ( $_POST['data_type'] ) ;
                }
        
        if ( $last ) $wgOut->AddHTML ( $last ) ;
        
-       return "" ;
+       return '' ;
        }
-
-?>
+?>
\ No newline at end of file
index f23493f..368f345 100644 (file)
 # with this program; if not, write to the Free Software Foundation, Inc.,
 # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 # http://www.gnu.org/copyleft/gpl.html
-
-require_once( 'Revision.php' );
-
 /**
  *
  * @package MediaWiki
  * @subpackage SpecialPage
  */
 
+/** */
+require_once( 'Revision.php' );
+
 /**
  *
  */
@@ -208,5 +208,4 @@ function xmlsafe( $string ) {
        wfProfileOut( $fname );
        return $string;
 }
-
-?>
+?>
\ No newline at end of file
index c2009de..80d8edc 100644 (file)
@@ -14,123 +14,126 @@ function wfSpecialForum()
    echo $forum->Generate();
 }
 
-class Thread
-{
+/**
+ *
+ * @package MediaWiki
+ * @subpackage SpecialPage
+ */
+class Thread {
    var $title;
    var $comment;
    var $user;
    var $timestamp;
    var $count;
 }
-    
-class Forum
-{
-   var $mMainPage;
-   var $mMaxThread;
-   var $mMaxFullText;
-   var $mSumLength;
-
-   function Forum()
-   {
-      $this->SetMainPage( "Forum" );
-      $this->mMaxThread   = 50;
-      $this->mMaxFullText = 10;
-      $this->mSumLength   = 30;
-   }
-
-   function SetMainPage( $mp )
-   {
-      global $wgLang;
-      $this->mMainPage = $wgLang->getNsText( NS_WIKIPEDIA ) . ":$mp";
-   }
-
-   function Generate()
-   {
-      global $wgLang, $wgServer;
-
-      $fname = 'Forum::generate';
-
-      // Get last X modified thread
-      wfDebug("FORUM - START GENERATE\n");
-      $dbr =& wfGetDB( DB_SLAVE );
-      $cur = $dbr->tableName( 'cur' );
-      $sql = "SELECT cur_title, cur_comment, cur_user_text, cur_timestamp, cur_counter FROM $cur".
-             "WHERE cur_namespace = ".NS_THREAD.
-             "AND cur_is_redirect = 0".
-             "ORDER BY cur_timestamp DESC".
-             "LIMIT $this->mMaxThread";
-      $res = $dbr->query( $sql, $fname ) ;
-      $num = mysql_num_rows( $res );
-
-      // Generate forum's text
-      $text = "";
-      $text .= "<!-- This page was generated by forum.php -->\n";
-      $text .= "__NOEDITSECTION__\n";
-
-        $tab = array();
-        $cnt = 0;
-        while( $x = mysql_fetch_array( $res ) )
-        {
-            $cnt++;
-            $tab[$num-$cnt] = new Thread;
-            $tab[$num-$cnt]->title     = $x['cur_title'];
-            $tab[$num-$cnt]->comment   = $x['cur_comment'];
-            $tab[$num-$cnt]->user      = $x['cur_user_text'];
-            $tab[$num-$cnt]->timestamp = $x['cur_timestamp'];
-            $tab[$num-$cnt]->count     = $x['cur_counter'];
-            if(strlen($tab[$num-$cnt]->comment) > $this->mSumLength)
-                $tab[$num-$cnt]->comment = substr($tab[$num-$cnt]->comment, 0, $this->mSumLength) . "...";
-        }
-        mysql_free_result( $res );
-
-        $summary = $num - $this->mMaxFullText;
-
-        if($summary > 0)
-        {
-            //$text .= "==Last thread==\n";
-            $text .= "{| border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" style=\"border:1px solid black;\"\n";
-            $text .= "|- bgcolor=\"#D0D0D0\"\n";
-            $text .= "! Thread !! Cnt !! Last user !! Last comment !! Time\n";
-        }
-
-        for( $cnt=0; $cnt<$num; $cnt++ )
-        {
-            $t = $wgLang->getNsText( NS_THREAD );
-            if ( $t != '' ) 
-                $t .= ':' ;
-            $t .= $tab[$cnt]->title;
-
-            $title = Title::newFromText( $t );
-
-            if($cnt < $summary)
-            {
-                if($cnt & 1)
-                    $text .= "|- bgcolor=\"#F0F0F0\"\n";
-                else
-                    $text .= "|- bgcolor=\"#FFFFFF\"\n";
-                $text .= "| [[$t|". $tab[$cnt]->title ."]] || ". $tab[$cnt]->count ." || [[". 
-                    $wgLang->getNsText( NS_USER ) .":". $tab[$cnt]->user ."|" .$tab[$cnt]->user. "]] || ". $tab[$cnt]->comment ." || ". 
-                    $wgLang->timeanddate($tab[$cnt]->timestamp) ."\n";
-            }
-            else
-            {
-                $text .= "<h1>[[$t|". $tab[$cnt]->title ."]]</h1>\n";
-                $text .= "{{{$t}}}\n\n";
-                $text .= "'''> [$wgServer" . $title->getEditUrl() ." Add a message]'''\n\n";
-            }
-
-            if($cnt == $summary-1)
-            {
-                if($summary > 0)
-                {
-                    $text .= "|}\n\n";
-                }
-            }
-        }
-
-        $text .= "\n'''[[Create a new thread]]'''";
-
-        wfDebug( $text );
+
+/**
+ *
+ * @package MediaWiki
+ * @subpackage SpecialPage
+ */
+class Forum {
+       var $mMainPage;
+       var $mMaxThread;
+       var $mMaxFullText;
+       var $mSumLength;
+
+       /** @todo document */
+       function Forum() {
+       $this->SetMainPage( "Forum" );
+       $this->mMaxThread   = 50;
+       $this->mMaxFullText = 10;
+       $this->mSumLength   = 30;
+       }
+   
+       /** @todo document */
+       function SetMainPage( $mp ) {
+               global $wgLang;
+               $this->mMainPage = $wgLang->getNsText( NS_WIKIPEDIA ) . ":$mp";
+       }
+
+       function Generate() {
+               global $wgLang, $wgServer;
+
+               $fname = 'Forum::generate';
+
+               // Get last X modified thread
+               wfDebug("FORUM - START GENERATE\n");
+               $dbr =& wfGetDB( DB_SLAVE );
+               $cur = $dbr->tableName( 'cur' );
+               $sql = "SELECT cur_title, cur_comment, cur_user_text, cur_timestamp, cur_counter FROM $cur".
+                      "WHERE cur_namespace = ".NS_THREAD.
+                      "AND cur_is_redirect = 0".
+                      "ORDER BY cur_timestamp DESC".
+                      "LIMIT $this->mMaxThread";
+               $res = $dbr->query( $sql, $fname ) ;
+               $num = mysql_num_rows( $res );
+
+               // Generate forum's text
+               $text = '';
+               $text .= "<!-- This page was generated by forum.php -->\n";
+               $text .= "__NOEDITSECTION__\n";
+
+               $tab = array();
+               $cnt = 0;
+
+               while( $x = mysql_fetch_array( $res ) ) {
+                       $cnt++;
+                       $tab[$num-$cnt] = new Thread;
+                       $tab[$num-$cnt]->title     = $x['cur_title'];
+                       $tab[$num-$cnt]->comment   = $x['cur_comment'];
+                       $tab[$num-$cnt]->user      = $x['cur_user_text'];
+                       $tab[$num-$cnt]->timestamp = $x['cur_timestamp'];
+                       $tab[$num-$cnt]->count     = $x['cur_counter'];
+                       if(strlen($tab[$num-$cnt]->comment) > $this->mSumLength) {
+                               $tab[$num-$cnt]->comment = substr($tab[$num-$cnt]->comment, 0, $this->mSumLength) . "...";
+                       }
+               }
+
+               // FIXME !! Use database abastraction layer
+               mysql_free_result( $res );
+
+               $summary = $num - $this->mMaxFullText;
+
+               if($summary > 0) {
+                       //$text .= "==Last thread==\n";
+                       $text .= "{| border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" style=\"border:1px solid black;\"\n";
+                       $text .= "|- bgcolor=\"#D0D0D0\"\n";
+                       $text .= "! Thread !! Cnt !! Last user !! Last comment !! Time\n";
+               }
+
+               for( $cnt=0; $cnt<$num; $cnt++ ) {
+                       $t = $wgLang->getNsText( NS_THREAD );
+                       if ( $t != '' ) { $t .= ':' ; }
+                       $t .= $tab[$cnt]->title;
+
+                       $title = Title::newFromText( $t );
+
+                       if($cnt < $summary) {
+                               if($cnt & 1) {
+                                       $text .= "|- bgcolor=\"#F0F0F0\"\n";
+                               } else {
+                                       $text .= "|- bgcolor=\"#FFFFFF\"\n";
+                               }
+                               $text .= "| [[$t|". $tab[$cnt]->title ."]] || ". $tab[$cnt]->count ." || [[". 
+                                        $wgLang->getNsText( NS_USER ) .":". $tab[$cnt]->user ."|" .$tab[$cnt]->user. "]] || ". $tab[$cnt]->comment ." || ". 
+                                        $wgLang->timeanddate($tab[$cnt]->timestamp) ."\n";
+                       } else {
+                               $text .= "<h1>[[$t|". $tab[$cnt]->title ."]]</h1>\n";
+                               $text .= "{{{$t}}}\n\n";
+                               $text .= "'''> [$wgServer" . $title->getEditUrl() ." Add a message]'''\n\n";
+                       }
+
+                       if($cnt == $summary-1) {
+                               if($summary > 0) {
+                                       $text .= "|}\n\n";
+                               }
+                       }
+               }
+
+               $text .= "\n'''[[Create a new thread]]'''";
+
+               wfDebug( $text );
 /*
         // Generate forum's main page
         wfDebug("FORUM - CREATE PAGE <$this->mMainPage>\n");
@@ -142,10 +145,9 @@ class Forum
         else
             wfDebug("FORUM - UPDATE FAILED\n");
 */
-        wfDebug("FORUM - END GENERATE\n");
+               wfDebug("FORUM - END GENERATE\n");
 
-        return $text;
-    }
+               return $text;
+       }
 }
-
-?>
+?>
\ No newline at end of file
index 95411a1..3eb5968 100644 (file)
@@ -2,6 +2,8 @@
 /**
  * Provide an administration interface
  * DO NOT USE: INSECURE.
+ * @package MediaWiki
+ * @subpackage SpecialPage
  */
 
 /** */
@@ -19,6 +21,8 @@ function wfSpecialGrouplevels($par=null) {
 
 /**
  * A class to manage group levels rights.
+ * @package MediaWiki
+ * @subpackage SpecialPage
  */
 class GrouplevelsForm extends HTMLForm {
        var $mPosted, $mRequest, $mSaveprefs;
@@ -143,4 +147,4 @@ class GrouplevelsForm extends HTMLForm {
                $wgOut->addHTML( "</form>\n" );
        }
 } // end class GrouplevelsForm
-?>
+?>
\ No newline at end of file
index fb9b7e7..ddc77be 100644 (file)
@@ -49,7 +49,7 @@ class ListUsersPage extends QueryPage {
        /**
         * Show a drop down list to select a group as well as a user name
         * search box.
-        * @TODO: localize
+        * @todo localize
         */
        function getPageHeader( ) {
                global $wgScript;
index f75f375..b958fdc 100644 (file)
@@ -1,4 +1,11 @@
 <?php
+/**
+ *
+ * @package MediaWiki
+ * @subpackage SpecialPage
+ */
+
+/** @todo document */
 function wfSpecialMycontributions() {
        global $wgUser, $wgOut;
        $t = Title::makeTitle( NS_SPECIAL, 'Contributions' );
index edc1fd8..69e736f 100644 (file)
@@ -1,4 +1,11 @@
 <?php
+/**
+ *
+ * @package MediaWiki
+ * @subpackage SpecialPage
+ */
+
+/** @todo document */
 function wfSpecialMypage() {
        global $wgUser, $wgOut;
        $t = Title::makeTitle( NS_USER, $wgUser->getName() );
index 71e8bf7..7f92711 100644 (file)
@@ -1,4 +1,11 @@
 <?php
+/**
+ *
+ * @package MediaWiki
+ * @subpackage SpecialPage
+ */
+
+/** @todo document */
 function wfSpecialMytalk() {
        global $wgUser, $wgOut;
        $t = Title::makeTitle( NS_USER_TALK, $wgUser->getName() );
index 9d55f0b..f738348 100644 (file)
@@ -5,6 +5,7 @@
  * @subpackage SpecialPage
  */
 
+/** */
 require_once( 'ImageGallery.php' );
 
 /**
index 27bf4b1..24682af 100644 (file)
@@ -12,6 +12,7 @@
  * DO NOT manipulate this array at run-time.
  *
  * @package MediaWiki
+ * @subpackage SpecialPage
  */
 
 /**
@@ -137,7 +138,7 @@ class SpecialPage
         * File which needs to be included before the function above can be called
         */
        var $mFile;
-       /**#@- */
+       /**#@-*/
 
        /**
         * Add a page to the list of valid special pages
index d860d7c..1cbd335 100644 (file)
@@ -8,7 +8,7 @@
 if( !defined( 'MEDIAWIKI' ) )
        die();
 
-/* to get a list of languages in setting user's language preference */
+/** to get a list of languages in setting user's language preference */
 require_once('languages/Names.php');
 
 /**
index 948b789..93daf34 100644 (file)
@@ -23,6 +23,7 @@
  * @subpackage SpecialPage
  */
 
+/** */
 require_once( 'SearchEngine.php' );
 require_once( 'Revision.php' );
 
@@ -40,8 +41,13 @@ function wfSpecialSearch( $par='' ) {
        }
 }
 
-
+/**
+ * @todo document
+ * @package MediaWiki
+ * @subpackage SpecialPage
+ */
 class SpecialSearch {
+
        /**
         * Set up basic search parameters from the request and user settings.
         * Typically you'll pass $wgRequest and $wgUser.
index 3b5d385..dbfe7cc 100644 (file)
@@ -1,10 +1,11 @@
 <?php
 /**
- *
+ * @todo document
  * @package MediaWiki
  * @subpackage SpecialPage
  */
 
+/** */
 require_once( 'Revision.php' );
 
 /**
index 9a0f253..947ab7a 100644 (file)
@@ -9,7 +9,8 @@
 require_once("QueryPage.php");
 
 /**
- *
+ * @package MediaWiki
+ * @subpackage SpecialPage
  */
 class UnusedimagesPage extends QueryPage {
 
index 5497b50..1ac4a48 100644 (file)
@@ -32,7 +32,7 @@ class UploadForm {
        var $mUploadSaveName, $mUploadTempName, $mUploadSize, $mUploadOldVersion;
        var $mUploadCopyStatus, $mUploadSource, $mReUpload, $mAction, $mUpload;
        var $mOname, $mSessionKey;
-       /**#@- */
+       /**#@-*/
 
        /**
         * Constructor : initialise object
index d82f44e..1406347 100644 (file)
@@ -4,6 +4,8 @@
  * DO NOT USE: INSECURE.
  * 
  * TODO : remove everything related to group editing (SpecialGrouplevels.php)
+ * @package MediaWiki
+ * @subpackage SpecialPage
  */
 
 /** */
@@ -21,6 +23,8 @@ function wfSpecialUserlevels($par=null) {
 
 /**
  * A class to manage user levels rights.
+ * @package MediaWiki
+ * @subpackage SpecialPage
  */
 class UserlevelsForm extends HTMLForm {
        var $mPosted, $mRequest, $mSaveprefs;
index 0870839..aa37f4c 100644 (file)
@@ -48,8 +48,6 @@
  * case 3:     (should not happen)
  * input:      "name"
  * output:     "quoted-printable(name)"
- * 
- * @package MediaWiki
  */
 function wfQuotedPrintable_name_and_emailaddr( $string ) {
 
@@ -132,7 +130,7 @@ function userMailer( $to, $from, $subject, $body, $replyto=false ) {
 }
 
 /**
- * @package MediaWiki
+ * @todo document
  */
 function mailErrorHandler( $code, $string ) {
        global $wgErrorString;
index 584097e..8561388 100644 (file)
@@ -1,27 +1,26 @@
 <?php
 /** Copyright (C) 2004 Thomas Gries <mail@tgries.de>
-# http://www.mediawiki.org/
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-# http://www.gnu.org/copyleft/gpl.html
-**/
-
-/**
+ * http://www.mediawiki.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ * 
  * See deferred.doc
  *
  * @package MediaWiki
+ * @author <mail@tgries.de>
  */
 
 /**
index 4f1524f..6dacdc5 100644 (file)
@@ -1,10 +1,13 @@
 <?php
+/**
+ * @package MediaWiki
+ */
+
 /**
  * Client for querying zhdaemon
  *
  * @package MediaWiki
  */
-
 class ZhClient {
        var $mHost, $mPort, $mFP, $mConnected;
 
@@ -143,5 +146,4 @@ class ZhClient {
                fclose($this->mFP);
        }
 }
-
 ?>
\ No newline at end of file
index 219cc57..527c5ff 100644 (file)
@@ -41,22 +41,32 @@ if( isset( $_SERVER['argv'] ) && in_array( '--icu', $_SERVER['argv'] ) ) {
 require_once( 'PHPUnit.php' );
 require_once( 'UtfNormal.php' );
 
+/**
+ * @package UtfNormal
+ */
 class CleanUpTest extends PHPUnit_TestCase {
+       /**
+        * @param string $name ???
+        */
        function CleanUpTest( $name ) {
                $this->PHPUnit_TestCase( $name );
        }
 
+       /** @todo document */
        function setUp() {
        }
-       
+
+       /** @todo document */
        function tearDown() {
        }
-       
+
+       /** @todo document */
        function testAscii() {
                $text = 'This is plain ASCII text.';
                $this->assertEquals( $text, UtfNormal::cleanUp( $text ) );
        }
-       
+
+       /** @todo document */
        function testNull() {
                $text = "a \x00 null";
                $expect = "a \xef\xbf\xbd null";
@@ -64,19 +74,24 @@ class CleanUpTest extends PHPUnit_TestCase {
                        bin2hex( $expect ),
                        bin2hex( UtfNormal::cleanUp( $text ) ) );
        }
-       
+
+       /** @todo document */
        function testLatin() {
                $text = "L'\xc3\xa9cole";
                $this->assertEquals( $text, UtfNormal::cleanUp( $text ) );
        }
-       
+
+       /** @todo document */
        function testLatinNormal() {
                $text = "L'e\xcc\x81cole";
                $expect = "L'\xc3\xa9cole";
                $this->assertEquals( $expect, UtfNormal::cleanUp( $text ) );
        }
-       
-       # This test is *very* expensive!
+
+       /**
+        * This test is *very* expensive!
+        * @todo document
+        */
        function XtestAllChars() {
                $rep = UTF8_REPLACEMENT;
                global $utfCanonicalComp, $utfCanonicalDecomp;
@@ -108,14 +123,16 @@ class CleanUpTest extends PHPUnit_TestCase {
                        }
                }
        }
-       
+
+       /** @todo document */
        function testAllBytes() {
                $this->doTestBytes( '', '' );
                $this->doTestBytes( 'x', '' );
                $this->doTestBytes( '', 'x' );
                $this->doTestBytes( 'x', 'x' );
        }
-       
+
+       /** @todo document */
        function doTestBytes( $head, $tail ) {
                for( $i = 0x0; $i < 256; $i++ ) {
                        $char = $head . chr( $i ) . $tail;
@@ -140,14 +157,18 @@ class CleanUpTest extends PHPUnit_TestCase {
                        }
                }
        }
-       
+
+       /** @todo document */
        function testDoubleBytes() {
                $this->doTestDoubleBytes( '', '' );
                $this->doTestDoubleBytes( 'x', '' );
                $this->doTestDoubleBytes( '', 'x' );
                $this->doTestDoubleBytes( 'x', 'x' );
        }
-       
+
+       /**
+        * @todo document
+        */
        function doTestDoubleBytes( $head, $tail ) {
                for( $first = 0xc0; $first < 0x100; $first++ ) {
                        for( $second = 0x80; $second < 0x100; $second++ ) {
@@ -183,13 +204,15 @@ class CleanUpTest extends PHPUnit_TestCase {
                }
        }
 
+       /** @todo document */
        function testTripleBytes() {
                $this->doTestTripleBytes( '', '' );
                $this->doTestTripleBytes( 'x', '' );
                $this->doTestTripleBytes( '', 'x' );
                $this->doTestTripleBytes( 'x', 'x' );
        }
-       
+
+       /** @todo document */
        function doTestTripleBytes( $head, $tail ) {
                for( $first = 0xc0; $first < 0x100; $first++ ) {
                        for( $second = 0x80; $second < 0x100; $second++ ) {
@@ -254,7 +277,8 @@ class CleanUpTest extends PHPUnit_TestCase {
                        }
                }
        }
-       
+
+       /** @todo document */   
        function testChunkRegression() {
                # Check for regression against a chunking bug
                $text   = "\x46\x55\xb8" .
@@ -277,6 +301,7 @@ class CleanUpTest extends PHPUnit_TestCase {
                        bin2hex( UtfNormal::cleanUp( $text ) ) );
        }
 
+       /** @todo document */
        function testInterposeRegression() {
                $text   = "\x4e\x30" .
                          "\xb1" .              # bad tail
@@ -310,7 +335,8 @@ class CleanUpTest extends PHPUnit_TestCase {
                        bin2hex( $expect ),
                        bin2hex( UtfNormal::cleanUp( $text ) ) );
        }
-       
+
+       /** @todo document */   
        function testOverlongRegression() {
                $text   = "\x67" .
                          "\x1a" . # forbidden ascii
@@ -334,7 +360,8 @@ class CleanUpTest extends PHPUnit_TestCase {
                        bin2hex( $expect ),
                        bin2hex( UtfNormal::cleanUp( $text ) ) );
        }
-       
+
+       /** @todo document */   
        function testSurrogateRegression() {
                $text   = "\xed\xb4\x96" . # surrogate 0xDD16
                          "\x83" . # bad tail
@@ -348,7 +375,8 @@ class CleanUpTest extends PHPUnit_TestCase {
                        bin2hex( $expect ),
                        bin2hex( UtfNormal::cleanUp( $text ) ) );
        }
-       
+
+       /** @todo document */
        function testBomRegression() {
                $text   = "\xef\xbf\xbe" . # U+FFFE, illegal char
                          "\xb2" . # bad tail
@@ -363,6 +391,7 @@ class CleanUpTest extends PHPUnit_TestCase {
                        bin2hex( UtfNormal::cleanUp( $text ) ) );
        }
 
+       /** @todo document */
        function testForbiddenRegression() {
                $text   = "\xef\xbf\xbf"; # U+FFFF, illegal char
                $expect = "\xef\xbf\xbd";
@@ -370,7 +399,8 @@ class CleanUpTest extends PHPUnit_TestCase {
                        bin2hex( $expect ),
                        bin2hex( UtfNormal::cleanUp( $text ) ) );
        }
-       
+
+       /** @todo document */
        function testHangulRegression() {
                $text = "\xed\x9c\xaf" . # Hangul char
                                "\xe1\x87\x81";  # followed by another final jamo
index 562ead7..e85ec42 100644 (file)
@@ -30,6 +30,7 @@ if( php_sapi_name() != 'cli' ) {
        die( "Run me from the command line please.\n" );
 }
 
+/** */
 require_once( 'UtfNormal.php' );
 require_once( '../DifferenceEngine.php' );