Change some line comments to multi line comments
authorumherirrender <umherirrender_de.wp@web.de>
Wed, 14 Oct 2015 07:40:50 +0000 (09:40 +0200)
committerumherirrender <umherirrender_de.wp@web.de>
Wed, 14 Oct 2015 07:40:50 +0000 (09:40 +0200)
This allows empty lines inside the comment as found by the
MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.EmptyComment sniff

Change-Id: Iac155bbda4a84562db2b452baeae9b8973899453

includes/Collation.php
includes/GlobalFunctions.php
includes/OutputPage.php
maintenance/namespaceDupes.php
maintenance/storage/recompressTracked.php
opensearch_desc.php

index c1f0b38..40e8627 100644 (file)
@@ -406,14 +406,15 @@ class IcuCollation extends Collation {
                        }
                }
 
-               // Sort the letters.
-               //
-               // It's impossible to have the precompiled data file properly sorted,
-               // because the sort order changes depending on ICU version. If the
-               // array is not properly sorted, the binary search will return random
-               // results.
-               //
-               // We also take this opportunity to remove primary collisions.
+               /* Sort the letters.
+                *
+                * It's impossible to have the precompiled data file properly sorted,
+                * because the sort order changes depending on ICU version. If the
+                * array is not properly sorted, the binary search will return random
+                * results.
+                *
+                * We also take this opportunity to remove primary collisions.
+                */
                $letterMap = array();
                foreach ( $letters as $letter ) {
                        $key = $this->getPrimarySortKey( $letter );
@@ -428,38 +429,40 @@ class IcuCollation extends Collation {
                        }
                }
                ksort( $letterMap, SORT_STRING );
-               // Remove duplicate prefixes. Basically if something has a sortkey
-               // which is a prefix of some other sortkey, then it is an
-               // expansion and probably should not be considered a section
-               // header.
-               //
-               // For example 'þ' is sometimes sorted as if it is the letters
-               // 'th'. Other times it is its own primary element. Another
-               // example is '₨'. Sometimes its a currency symbol. Sometimes it
-               // is an 'R' followed by an 's'.
-               //
-               // Additionally an expanded element should always sort directly
-               // after its first element due to they way sortkeys work.
-               //
-               // UCA sortkey elements are of variable length but no collation
-               // element should be a prefix of some other element, so I think
-               // this is safe. See:
-               // * https://ssl.icu-project.org/repos/icu/icuhtml/trunk/design/collation/ICU_collation_design.htm
-               // * http://site.icu-project.org/design/collation/uca-weight-allocation
-               //
-               // Additionally, there is something called primary compression to
-               // worry about. Basically, if you have two primary elements that
-               // are more than one byte and both start with the same byte then
-               // the first byte is dropped on the second primary. Additionally
-               // either \x03 or \xFF may be added to mean that the next primary
-               // does not start with the first byte of the first primary.
-               //
-               // This shouldn't matter much, as the first primary is not
-               // changed, and that is what we are comparing against.
-               //
-               // tl;dr: This makes some assumptions about how icu implements
-               // collations. It seems incredibly unlikely these assumptions
-               // will change, but nonetheless they are assumptions.
+
+               /* Remove duplicate prefixes. Basically if something has a sortkey
+                * which is a prefix of some other sortkey, then it is an
+                * expansion and probably should not be considered a section
+                * header.
+                *
+                * For example 'þ' is sometimes sorted as if it is the letters
+                * 'th'. Other times it is its own primary element. Another
+                * example is '₨'. Sometimes its a currency symbol. Sometimes it
+                * is an 'R' followed by an 's'.
+                *
+                * Additionally an expanded element should always sort directly
+                * after its first element due to they way sortkeys work.
+                *
+                * UCA sortkey elements are of variable length but no collation
+                * element should be a prefix of some other element, so I think
+                * this is safe. See:
+                * - https://ssl.icu-project.org/repos/icu/icuhtml/trunk/design/collation/ICU_collation_design.htm
+                * - http://site.icu-project.org/design/collation/uca-weight-allocation
+                *
+                * Additionally, there is something called primary compression to
+                * worry about. Basically, if you have two primary elements that
+                * are more than one byte and both start with the same byte then
+                * the first byte is dropped on the second primary. Additionally
+                * either \x03 or \xFF may be added to mean that the next primary
+                * does not start with the first byte of the first primary.
+                *
+                * This shouldn't matter much, as the first primary is not
+                * changed, and that is what we are comparing against.
+                *
+                * tl;dr: This makes some assumptions about how icu implements
+                * collations. It seems incredibly unlikely these assumptions
+                * will change, but nonetheless they are assumptions.
+                */
 
                $prev = false;
                $duplicatePrefixes = array();
index 243df92..14327dc 100644 (file)
@@ -2856,16 +2856,17 @@ function wfShellExec( $cmd, &$retval = null, $environ = array(),
        $status = false;
        $logMsg = false;
 
-       // According to the documentation, it is possible for stream_select()
-       // to fail due to EINTR. I haven't managed to induce this in testing
-       // despite sending various signals. If it did happen, the error
-       // message would take the form:
-       //
-       // stream_select(): unable to select [4]: Interrupted system call (max_fd=5)
-       //
-       // where [4] is the value of the macro EINTR and "Interrupted system
-       // call" is string which according to the Linux manual is "possibly"
-       // localised according to LC_MESSAGES.
+       /* According to the documentation, it is possible for stream_select()
+        * to fail due to EINTR. I haven't managed to induce this in testing
+        * despite sending various signals. If it did happen, the error
+        * message would take the form:
+        *
+        * stream_select(): unable to select [4]: Interrupted system call (max_fd=5)
+        *
+        * where [4] is the value of the macro EINTR and "Interrupted system
+        * call" is string which according to the Linux manual is "possibly"
+        * localised according to LC_MESSAGES.
+        */
        $eintr = defined( 'SOCKET_EINTR' ) ? SOCKET_EINTR : 4;
        $eintrMessage = "stream_select(): unable to select [$eintr]";
 
@@ -3737,16 +3738,16 @@ function wfScript( $script = 'index' ) {
  */
 function wfGetScriptUrl() {
        if ( isset( $_SERVER['SCRIPT_NAME'] ) ) {
-               #
-               # as it was called, minus the query string.
-               #
-               # Some sites use Apache rewrite rules to handle subdomains,
-               # and have PHP set up in a weird way that causes PHP_SELF
-               # to contain the rewritten URL instead of the one that the
-               # outside world sees.
-               #
-               # If in this mode, use SCRIPT_URL instead, which mod_rewrite
-               # provides containing the "before" URL.
+               /* as it was called, minus the query string.
+                *
+                * Some sites use Apache rewrite rules to handle subdomains,
+                * and have PHP set up in a weird way that causes PHP_SELF
+                * to contain the rewritten URL instead of the one that the
+                * outside world sees.
+                *
+                * If in this mode, use SCRIPT_URL instead, which mod_rewrite
+                * provides containing the "before" URL.
+                */
                return $_SERVER['SCRIPT_NAME'];
        } else {
                return $_SERVER['URL'];
index 4f99f34..d29ec54 100644 (file)
@@ -3856,18 +3856,19 @@ class OutputPage extends ContextSource {
                                if ( $media == $targetMedia ) {
                                        $media = '';
                                } elseif ( preg_match( $screenMediaQueryRegex, $media ) === 1 ) {
-                                       // This regex will not attempt to understand a comma-separated media_query_list
-                                       //
-                                       // Example supported values for $media:
-                                       // 'screen', 'only screen', 'screen and (min-width: 982px)' ),
-                                       // Example NOT supported value for $media:
-                                       // '3d-glasses, screen, print and resolution > 90dpi'
-                                       //
-                                       // If it's a print request, we never want any kind of screen stylesheets
-                                       // If it's a handheld request (currently the only other choice with a switch),
-                                       // we don't want simple 'screen' but we might want screen queries that
-                                       // have a max-width or something, so we'll pass all others on and let the
-                                       // client do the query.
+                                       /* This regex will not attempt to understand a comma-separated media_query_list
+                                        *
+                                        * Example supported values for $media:
+                                        * 'screen', 'only screen', 'screen and (min-width: 982px)' ),
+                                        * Example NOT supported value for $media:
+                                        * '3d-glasses, screen, print and resolution > 90dpi'
+                                        *
+                                        * If it's a print request, we never want any kind of screen stylesheets
+                                        * If it's a handheld request (currently the only other choice with a switch),
+                                        * we don't want simple 'screen' but we might want screen queries that
+                                        * have a max-width or something, so we'll pass all others on and let the
+                                        * client do the query.
+                                        */
                                        if ( $targetMedia == 'print' || $media == 'screen' ) {
                                                return null;
                                        }
index 088f677..184cba8 100644 (file)
@@ -179,22 +179,22 @@ class NamespaceConflictChecker extends Maintenance {
 
                foreach ( $spaces as $name => $ns ) {
                        if ( $ns != 0 ) {
-                               // Fix up link destinations for non-interwiki links only.
-                               //
-                               // For example if a page has [[Foo:Bar]] and then a Foo namespace
-                               // is introduced, pagelinks needs to be updated to have
-                               // page_namespace = NS_FOO.
-                               //
-                               // If instead an interwiki prefix was introduced called "Foo",
-                               // the link should instead be moved to the iwlinks table. If a new
-                               // language is introduced called "Foo", or if there is a pagelink
-                               // [[fr:Bar]] when interlanguage magic links are turned on, the
-                               // link would have to be moved to the langlinks table. Let's put
-                               // those cases in the too-hard basket for now. The consequences are
-                               // not especially severe.
-                               //
-                               // @fixme Handle interwiki links, and pagelinks to Category:, File:
-                               // which probably need reparsing.
+                               /* Fix up link destinations for non-interwiki links only.
+                                *
+                                * For example if a page has [[Foo:Bar]] and then a Foo namespace
+                                * is introduced, pagelinks needs to be updated to have
+                                * page_namespace = NS_FOO.
+                                *
+                                * If instead an interwiki prefix was introduced called "Foo",
+                                * the link should instead be moved to the iwlinks table. If a new
+                                * language is introduced called "Foo", or if there is a pagelink
+                                * [[fr:Bar]] when interlanguage magic links are turned on, the
+                                * link would have to be moved to the langlinks table. Let's put
+                                * those cases in the too-hard basket for now. The consequences are
+                                * not especially severe.
+                                * @fixme Handle interwiki links, and pagelinks to Category:, File:
+                                * which probably need reparsing.
+                                */
 
                                $this->checkLinkTable( 'pagelinks', 'pl', $ns, $name, $options );
                                $this->checkLinkTable( 'templatelinks', 'tl', $ns, $name, $options );
@@ -592,14 +592,15 @@ class NamespaceConflictChecker extends Maintenance {
 
                $this->db->delete( 'page', array( 'page_id' => $id ), __METHOD__ );
 
-               // Call LinksDeletionUpdate to delete outgoing links from the old title,
-               // and update category counts.
-               //
-               // Calling external code with a fake broken Title is a fairly dubious
-               // idea. It's necessary because it's quite a lot of code to duplicate,
-               // but that also makes it fragile since it would be easy for someone to
-               // accidentally introduce an assumption of title validity to the code we
-               // are calling.
+               /* Call LinksDeletionUpdate to delete outgoing links from the old title,
+                * and update category counts.
+                *
+                * Calling external code with a fake broken Title is a fairly dubious
+                * idea. It's necessary because it's quite a lot of code to duplicate,
+                * but that also makes it fragile since it would be easy for someone to
+                * accidentally introduce an assumption of title validity to the code we
+                * are calling.
+                */
                $update = new LinksDeletionUpdate( $wikiPage );
                $update->doUpdate();
                $this->db->commit( __METHOD__ );
index 120ccb6..f7907ad 100644 (file)
@@ -757,13 +757,14 @@ class CgzCopyTransaction {
                        return;
                }
 
-               // Check to see if the target text_ids have been moved already.
-               //
-               // We originally read from the slave, so this can happen when a single
-               // text_id is shared between multiple pages. It's rare, but possible
-               // if a delete/move/undelete cycle splits up a null edit.
-               //
-               // We do a locking read to prevent closer-run race conditions.
+               /* Check to see if the target text_ids have been moved already.
+                *
+                * We originally read from the slave, so this can happen when a single
+                * text_id is shared between multiple pages. It's rare, but possible
+                * if a delete/move/undelete cycle splits up a null edit.
+                *
+                * We do a locking read to prevent closer-run race conditions.
+                */
                $dbw = wfGetDB( DB_MASTER );
                $dbw->begin( __METHOD__ );
                $res = $dbw->select( 'blob_tracking',
index 0b56972..0d6a76c 100644 (file)
@@ -44,16 +44,17 @@ print Xml::openElement( 'OpenSearchDescription',
                'xmlns' => 'http://a9.com/-/spec/opensearch/1.1/',
                'xmlns:moz' => 'http://www.mozilla.org/2006/browser/search/' ) );
 
-// The spec says the ShortName must be no longer than 16 characters,
-// but 16 is *realllly* short. In practice, browsers don't appear to care
-// when we give them a longer string, so we're no longer attempting to trim.
-//
-// Note: ShortName and the <link title=""> need to match; they are used as
-// a key for identifying if the search engine has been added already, *and*
-// as the display name presented to the end-user.
-//
-// Behavior seems about the same between Firefox and IE 7/8 here.
-// 'Description' doesn't appear to be used by either.
+/* The spec says the ShortName must be no longer than 16 characters,
+ * but 16 is *realllly* short. In practice, browsers don't appear to care
+ * when we give them a longer string, so we're no longer attempting to trim.
+ *
+ * Note: ShortName and the <link title=""> need to match; they are used as
+ * a key for identifying if the search engine has been added already, *and*
+ * as the display name presented to the end-user.
+ *
+ * Behavior seems about the same between Firefox and IE 7/8 here.
+ * 'Description' doesn't appear to be used by either.
+ */
 $fullName = wfMessage( 'opensearch-desc' )->inContentLanguage()->text();
 print Xml::element( 'ShortName', null, $fullName );
 print Xml::element( 'Description', null, $fullName );