collation: Move first-letters-root to includes/collation/data
[lhc/web/wiklou.git] / includes / OutputPage.php
index 5965cbe..aa517e7 100644 (file)
@@ -55,9 +55,8 @@ class OutputPage extends ContextSource {
        protected $mCanonicalUrl = false;
 
        /**
-        * @var string Should be private - has getter and setter. Contains
-        *   the HTML title */
-       public $mPagetitle = '';
+        * @var string The contents of <h1> */
+       private $mPageTitle = '';
 
        /**
         * @var string Contains all of the "<body>" content. Should be private we
@@ -223,9 +222,6 @@ class OutputPage extends ContextSource {
         */
        public $mNoGallery = false;
 
-       /** @var string */
-       private $mPageTitleActionText = '';
-
        /** @var int Cache stuff. Looks like mEnableClientCache */
        protected $mCdnMaxage = 0;
        /** @var int Upper limit on mCdnMaxage */
@@ -404,18 +400,6 @@ class OutputPage extends ContextSource {
                return $this->mLinktags;
        }
 
-       /**
-        * Add a new \<link\> with "rel" attribute set to "meta"
-        *
-        * @param array $linkarr Associative array mapping attribute names to their
-        *                 values, both keys and values will be escaped, and the
-        *                 "rel" attribute will be automatically added
-        */
-       function addMetadataLink( array $linkarr ) {
-               $linkarr['rel'] = $this->getMetadataAttribute();
-               $this->addLink( $linkarr );
-       }
-
        /**
         * Set the URL to be used for the <link rel=canonical>. This should be used
         * in preference to addLink(), to avoid duplicate link tags.
@@ -436,22 +420,6 @@ class OutputPage extends ContextSource {
                return $this->mCanonicalUrl;
        }
 
-       /**
-        * Get the value of the "rel" attribute for metadata links
-        *
-        * @return string
-        */
-       public function getMetadataAttribute() {
-               # note: buggy CC software only reads first "meta" link
-               static $haveMeta = false;
-               if ( $haveMeta ) {
-                       return 'alternate meta';
-               } else {
-                       $haveMeta = true;
-                       return 'meta';
-               }
-       }
-
        /**
         * Add raw HTML to the list of scripts (including \<script\> tag, etc.)
         * Internal use only. Use OutputPage::addModules() or OutputPage::addJsConfigVars()
@@ -809,7 +777,7 @@ class OutputPage extends ContextSource {
                # this breaks strtotime().
                $clientHeader = preg_replace( '/;.*$/', '', $clientHeader );
 
-               Wikimedia\suppressWarnings(); // E_STRICT system time bitching
+               Wikimedia\suppressWarnings(); // E_STRICT system time warnings
                $clientHeaderTime = strtotime( $clientHeader );
                Wikimedia\restoreWarnings();
                if ( !$clientHeaderTime ) {
@@ -923,25 +891,6 @@ class OutputPage extends ContextSource {
                }
        }
 
-       /**
-        * Set the new value of the "action text", this will be added to the
-        * "HTML title", separated from it with " - ".
-        *
-        * @param string $text New value of the "action text"
-        */
-       public function setPageTitleActionText( $text ) {
-               $this->mPageTitleActionText = $text;
-       }
-
-       /**
-        * Get the value of the "action text"
-        *
-        * @return string
-        */
-       public function getPageTitleActionText() {
-               return $this->mPageTitleActionText;
-       }
-
        /**
         * "HTML title" means the contents of "<title>".
         * It is stored as plain, unescaped text and will be run through htmlspecialchars in the skin file.
@@ -992,7 +941,7 @@ class OutputPage extends ContextSource {
                # change "<script>foo&bar</script>" to "&lt;script&gt;foo&amp;bar&lt;/script&gt;"
                # but leave "<i>foobar</i>" alone
                $nameWithTags = Sanitizer::normalizeCharReferences( Sanitizer::removeHTMLtags( $name ) );
-               $this->mPagetitle = $nameWithTags;
+               $this->mPageTitle = $nameWithTags;
 
                # change "<i>foo&amp;bar</i>" to "foo&bar"
                $this->setHTMLTitle(
@@ -1007,7 +956,7 @@ class OutputPage extends ContextSource {
         * @return string
         */
        public function getPageTitle() {
-               return $this->mPagetitle;
+               return $this->mPageTitle;
        }
 
        /**
@@ -1263,7 +1212,7 @@ class OutputPage extends ContextSource {
         *                               (e.g. 'fr:Test page')
         */
        public function addLanguageLinks( array $newLinkArray ) {
-               $this->mLanguageLinks += $newLinkArray;
+               $this->mLanguageLinks = array_merge( $this->mLanguageLinks, $newLinkArray );
        }
 
        /**
@@ -1801,7 +1750,8 @@ class OutputPage extends ContextSource {
         * @param ParserOutput $parserOutput
         */
        public function addParserOutputMetadata( $parserOutput ) {
-               $this->mLanguageLinks += $parserOutput->getLanguageLinks();
+               $this->mLanguageLinks =
+                       array_merge( $this->mLanguageLinks, $parserOutput->getLanguageLinks() );
                $this->addCategoryLinks( $parserOutput->getCategories() );
                $this->setIndicators( $parserOutput->getIndicators() );
                $this->mNewSectionLink = $parserOutput->getNewSection();