Make OutputPage::mPagetitle private
authorAryeh Gregor <ayg@aryeh.name>
Tue, 24 Jul 2018 13:38:44 +0000 (16:38 +0300)
committerAryeh Gregor <ayg@aryeh.name>
Tue, 24 Jul 2018 13:40:37 +0000 (16:40 +0300)
Code search revealed only one outside access, which I've submitted a patch for.

Depends-On: I001deecad241b091070483d882088d2d6361ed5a
Change-Id: I0f7e565f4eacc1074c619772b2d11a47a05e3584

includes/OutputPage.php

index 5965cbe..4e7c0bb 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
@@ -992,7 +991,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 +1006,7 @@ class OutputPage extends ContextSource {
         * @return string
         */
        public function getPageTitle() {
-               return $this->mPagetitle;
+               return $this->mPageTitle;
        }
 
        /**