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

Revision: 88531
Author:   reedy
Date:     2011-05-21 19:07:24 +0000 (Sat, 21 May 2011)
Log Message:
-----------
More adding, updating and tweaking of documentation

Modified Paths:
--------------
    trunk/extensions/LiquidThreads/classes/Threads.php
    trunk/phase3/includes/Namespace.php
    trunk/phase3/includes/OutputHandler.php
    trunk/phase3/includes/OutputPage.php

Modified: trunk/extensions/LiquidThreads/classes/Threads.php
===================================================================
--- trunk/extensions/LiquidThreads/classes/Threads.php  2011-05-21 18:56:00 UTC 
(rev 88530)
+++ trunk/extensions/LiquidThreads/classes/Threads.php  2011-05-21 19:07:24 UTC 
(rev 88531)
@@ -55,6 +55,8 @@
        /**
         * Create the talkpage if it doesn't exist so that links to it
         * will show up blue instead of red. For use upon new thread creation.
+        *
+        * @param $talkpage
         */
        public static function createTalkpageIfNeeded( $talkpage ) {
                if ( ! $talkpage->exists() ) {
@@ -126,6 +128,11 @@
                }
        }
 
+       /**
+        * @param $post
+        * @param $bulkLoad bool
+        * @return Thread
+        */
        static function withRoot( $post, $bulkLoad = true ) {
                if ( $post->getTitle()->getNamespace() != NS_LQT_THREAD ) {
                        // No articles outside the thread namespace have 
threads associated with them;
@@ -147,6 +154,11 @@
                return self::assertSingularity( $ts, 'thread_root', 
$post->getID() );
        }
 
+       /**
+        * @param $id
+        * @param $bulkLoad bool
+        * @return Thread
+        */
        static function withId( $id, $bulkLoad = true ) {
                if ( array_key_exists( $id, self::$cache_by_id ) ) {
                        return self::$cache_by_id[$id];
@@ -157,6 +169,11 @@
                return self::assertSingularity( $ts, 'thread_id', $id );
        }
 
+       /**
+        * @param $article
+        * @param $bulkLoad bool
+        * @return Thread
+        */
        static function withSummary( $article, $bulkLoad = true ) {
                $ts = Threads::where( array( 'thread_summary_page' => 
$article->getId() ),
                                        array(), $bulkLoad );

Modified: trunk/phase3/includes/Namespace.php
===================================================================
--- trunk/phase3/includes/Namespace.php 2011-05-21 18:56:00 UTC (rev 88530)
+++ trunk/phase3/includes/Namespace.php 2011-05-21 19:07:24 UTC (rev 88531)
@@ -30,7 +30,10 @@
         * Special namespaces are defined in includes/define.php and have
         * a value below 0 (ex: NS_SPECIAL = -1 , NS_MEDIA = -2)
         *
-        * @param $ns Int: namespace index
+        * @param $index
+        * @param $method
+        *
+        * @return true
         */
        private static function isMethodValidFor( $index, $method ) {
                if( $index < NS_MAIN ) {
@@ -124,6 +127,10 @@
 
        /**
         * Returns whether the specified namespace exists
+        *
+        * @param $index
+        * 
+        * @return bool
         */
        public static function exists( $index ) {
                $nslist = self::getCanonicalNamespaces();

Modified: trunk/phase3/includes/OutputHandler.php
===================================================================
--- trunk/phase3/includes/OutputHandler.php     2011-05-21 18:56:00 UTC (rev 
88530)
+++ trunk/phase3/includes/OutputHandler.php     2011-05-21 19:07:24 UTC (rev 
88531)
@@ -7,6 +7,8 @@
 
 /**
  * Standard output handler for use with ob_start
+ *
+ * @return string
  */
 function wfOutputHandler( $s ) {
        global $wgDisableOutputCompression, $wgValidateAllHtml;
@@ -40,6 +42,8 @@
  * the currently-requested URL.
  * This isn't on WebRequest because we need it when things aren't initialized
  * @private
+ *
+ * @return string
  */
 function wfRequestExtension() {
        /// @todo FIXME: this sort of dupes some code in 
WebRequest::getRequestUrl()
@@ -64,6 +68,10 @@
 /**
  * Handler that compresses data with gzip if allowed by the Accept header.
  * Unlike ob_gzhandler, it works for HEAD requests too.
+ * 
+ * @param $s string
+ *
+ * @return string
  */
 function wfGzipHandler( $s ) {
        if( !function_exists( 'gzencode' ) || headers_sent() ) {
@@ -105,6 +113,10 @@
 
 /**
  * Mangle flash policy tags which open up the site to XSS attacks.
+ *
+ * @param $s string
+ *
+ * @return string
  */
 function wfMangleFlashPolicy( $s ) {
        # Avoid weird excessive memory usage in PCRE on big articles
@@ -117,6 +129,8 @@
 
 /**
  * Add a Content-Length header if possible. This makes it cooperate with squid 
better.
+ *
+ * @param $length int
  */
 function wfDoContentLength( $length ) {
        if ( !headers_sent() && $_SERVER['SERVER_PROTOCOL'] == 'HTTP/1.0' ) {
@@ -126,6 +140,10 @@
 
 /**
  * Replace the output with an error if the HTML is not valid
+ *
+ * @param $s string
+ *
+ * @return string
  */
 function wfHtmlValidationHandler( $s ) {
 

Modified: trunk/phase3/includes/OutputPage.php
===================================================================
--- trunk/phase3/includes/OutputPage.php        2011-05-21 18:56:00 UTC (rev 
88530)
+++ trunk/phase3/includes/OutputPage.php        2011-05-21 19:07:24 UTC (rev 
88531)
@@ -391,6 +391,7 @@
         * which are no longer registered (eg a page is cached before an 
extension is disabled)
         * @param $modules Array
         * @param $position String if not null, only return modules with this 
position
+        * @param $type string
         * @return Array
         */
        protected function filterModules( $modules, $position = null, $type = 
ResourceLoaderModule::TYPE_COMBINED ){
@@ -413,6 +414,7 @@
         *
         * @param $filter Bool whether to filter out insufficiently trustworthy 
modules
         * @param $position String if not null, only return modules with this 
position
+        * @param $param string
         * @return Array of module names
         */
        public function getModules( $filter = false, $position = null, $param = 
'mModules' ) {
@@ -435,6 +437,10 @@
 
        /**
         * Get the list of module JS to include on this page
+        *
+        * @param $filter
+        * @param $position
+        *
         * @return array of module names
         */
        public function getModuleScripts( $filter = false, $position = null ) {
@@ -455,6 +461,9 @@
        /**
         * Get the list of module CSS to include on this page
         *
+        * @param $filter
+        * @param $position
+        * 
         * @return Array of module names
         */
        public function getModuleStyles( $filter = false, $position = null ) {
@@ -475,6 +484,9 @@
        /**
         * Get the list of module messages to include on this page
         *
+        * @param $filter
+        * @param $position
+        *
         * @return Array of module names
         */
        public function getModuleMessages( $filter = false, $position = null ) {
@@ -561,6 +573,8 @@
         *
         * Side effect: sets mLastModified for Last-Modified header
         *
+        * @param $timestamp string
+        *
         * @return Boolean: true iff cache-ok headers was sent.
         */
        public function checkLastModified( $timestamp ) {
@@ -724,6 +738,8 @@
        /**
         * "HTML title" means the contents of <title>.
         * It is stored as plain, unescaped text and will be run through 
htmlspecialchars in the skin file.
+        *
+        * @param $name string
         */
        public function setHTMLTitle( $name ) {
                $this->mHTMLtitle = $name;
@@ -743,6 +759,8 @@
         * This function allows good tags like \<sup\> in the \<h1\> tag, but 
not bad tags like \<script\>.
         * This function automatically sets \<title\> to the same content as 
\<h1\> but with all tags removed.
         * Bad tags that were escaped in \<h1\> will still be escaped in 
\<title\>, and good tags like \<i\> will be dropped entirely.
+        *
+        * @param $name string
         */
        public function setPageTitle( $name ) {
                # change "<script>foo&bar</script>" to 
"&lt;script&gt;foo&amp;bar&lt;/script&gt;"
@@ -1526,7 +1544,9 @@
        /**
         * Use enableClientCache(false) to force it to send nocache headers
         *
-        * @param $state ??
+        * @param $state bool
+        *
+        * @return bool
         */
        public function enableClientCache( $state ) {
                return wfSetVar( $this->mEnableClientCache, $state );
@@ -1678,6 +1698,8 @@
         *
         * This is the default for special pages. If you display a 
CSRF-protected
         * form on an ordinary view page, then you need to call this function.
+        *
+        * @param $enable bool
         */
        public function preventClickjacking( $enable = true ) {
                $this->mPreventClickjacking = $enable;
@@ -1696,6 +1718,8 @@
         * Get the X-Frame-Options header value (without the name part), or 
false
         * if there isn't one. This is used by Skin to determine whether to 
enable
         * JavaScript frame-breaking, for clients that don't support 
X-Frame-Options.
+        *
+        * @return string
         */
        public function getFrameOptions() {
                global $wgBreakFrames, $wgEditPageFrameOptions;
@@ -2203,7 +2227,7 @@
         * Add a "return to" link pointing to a specified title
         *
         * @param $title Title to link
-        * @param $query String: query string
+        * @param $query String query string
         * @param $text String text of the link (input is not escaped)
         */
        public function addReturnTo( $title, $query = array(), $text = null ) {
@@ -2564,6 +2588,10 @@
        /**
         * JS stuff to put at the bottom of the <body>: modules marked with 
position 'bottom',
         * legacy scripts ($this->mScripts), user preferences, site JS and user 
JS
+        *
+        * @param $sk Skin
+        *
+        * @return string
         */
        function getBottomScripts( Skin $sk ) {
                global $wgUseSiteJs, $wgAllowUserJs;
@@ -2667,6 +2695,9 @@
        }
 
        /**
+        * @param $sk Skin
+        * @param $addContentType bool
+        *
         * @return string HTML tag links to be put in the header.
         */
        public function getHeadLinks( Skin $sk, $addContentType = false ) {
@@ -2970,6 +3001,8 @@
         * Build a set of <link>s for the stylesheets specified in the 
$this->styles array.
         * These will be applied to various media & IE conditionals.
         * @param $sk Skin object
+        *
+        * @return string
         */
        public function buildCssLinks( $sk ) {
                $ret = '';
@@ -3117,6 +3150,10 @@
         * instead of a variable argument list.
         *
         * $options is passed through to wfMsgExt(), see that function for 
details.
+        *
+        * @param $name string
+        * @param $args array
+        * @param $options array
         */
        public function addWikiMsgArray( $name, $args, $options = array() ) {
                $options[] = 'parse';
@@ -3147,6 +3184,8 @@
         *    $wgOut->addWikiText( "<div class='error'>\n" . wfMsgNoTrans( 
'some-error' ) . "\n</div>" );
         *
         * The newline after opening div is needed in some wikitext. See bug 
19226.
+        *
+        * @param $wrap string
         */
        public function wrapWikiMsg( $wrap /*, ...*/ ) {
                $msgSpecs = func_get_args();


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

Reply via email to