Fix for Ia9baaf0b: Make previously public variables public again
authorStephan Gambke <s7eph4n@gmail.com>
Sat, 2 Aug 2014 23:48:54 +0000 (01:48 +0200)
committerStephan Gambke <s7eph4n@gmail.com>
Fri, 29 Aug 2014 21:01:53 +0000 (23:01 +0200)
Change Ia9baaf0b changed the visibility of member variables (many of which are not
otherwise exposed, e.g. by a method) and by that introduced a major API change
breaking extensions.

This patch explicitly marks affected variables as public again, keeping the intent
of the original patch of making phpcs-strict pass on includes/ directory.

Bug: 67522
Bug: 67984
Change-Id: I498512b2a1e615365bb477c1fd210aaa3241ca03

includes/CategoryViewer.php
includes/EditPage.php
includes/Export.php
includes/Feed.php
includes/HistoryBlob.php
includes/Import.php
includes/Linker.php
includes/page/Article.php

index 60694c9..7581ae4 100644 (file)
@@ -25,10 +25,10 @@ class CategoryViewer extends ContextSource {
        public $limit;
 
        /** @var array */
-       protected $from;
+       public $from;
 
        /** @var array */
-       protected $until;
+       public $until;
 
        /** @var string[] */
        public $articles;
@@ -37,37 +37,37 @@ class CategoryViewer extends ContextSource {
        public $articles_start_char;
 
        /** @var array */
-       protected $children;
+       public $children;
 
        /** @var array */
-       protected $children_start_char;
+       public $children_start_char;
 
        /** @var bool */
-       protected $showGallery;
+       public $showGallery;
 
        /** @var array */
-       protected $imgsNoGallery_start_char;
+       public $imgsNoGallery_start_char;
 
        /** @var array */
-       protected $imgsNoGallery;
+       public $imgsNoGallery;
 
        /** @var array */
-       protected $nextPage;
+       public $nextPage;
 
        /** @var array */
        protected $prevPage;
 
        /** @var array */
-       protected $flip;
+       public $flip;
 
        /** @var Title */
-       protected $title;
+       public $title;
 
        /** @var Collation */
-       protected $collation;
+       public $collation;
 
        /** @var ImageGallery */
-       protected $gallery;
+       public $gallery;
 
        /** @var Category Category object for this page. */
        private $cat;
index c3b0dad..b4f914e 100644 (file)
@@ -185,7 +185,7 @@ class EditPage {
        private $mContextTitle = null;
 
        /** @var string */
-       protected $action = 'submit';
+       public $action = 'submit';
 
        /** @var bool */
        public $isConflict = false;
@@ -200,13 +200,13 @@ class EditPage {
        public $isJsSubpage = false;
 
        /** @var bool */
-       protected $isWrongCaseCssJsPage = false;
+       public $isWrongCaseCssJsPage = false;
 
        /** @var bool New page or new section */
-       protected $isNew = false;
+       public $isNew = false;
 
        /** @var bool */
-       protected $deletedSinceEdit;
+       public $deletedSinceEdit;
 
        /** @var string */
        public $formtype;
@@ -215,39 +215,34 @@ class EditPage {
        public $firsttime;
 
        /** @var bool|stdClass */
-       protected $lastDelete;
+       public $lastDelete;
 
-       /** @var bool
-        * This is public because SemanticForms uses it (bug 67522).
-        * However, please consider using this property publicly
-        * to be deprecated.
-        * @protected
-        */
+       /** @var bool */
        public $mTokenOk = false;
 
        /** @var bool */
-       protected $mTokenOkExceptSuffix = false;
+       public $mTokenOkExceptSuffix = false;
 
        /** @var bool */
-       protected $mTriedSave = false;
+       public $mTriedSave = false;
 
        /** @var bool */
-       protected $incompleteForm = false;
+       public $incompleteForm = false;
 
        /** @var bool */
-       protected $tooBig = false;
+       public $tooBig = false;
 
        /** @var bool */
-       protected $kblength = false;
+       public $kblength = false;
 
        /** @var bool */
-       protected $missingComment = false;
+       public $missingComment = false;
 
        /** @var bool */
-       protected $missingSummary = false;
+       public $missingSummary = false;
 
        /** @var bool */
-       protected $allowBlankSummary = false;
+       public $allowBlankSummary = false;
 
        /** @var bool */
        protected $blankArticle = false;
@@ -256,19 +251,19 @@ class EditPage {
        protected $allowBlankArticle = false;
 
        /** @var string */
-       protected $autoSumm = '';
+       public $autoSumm = '';
 
        /** @var string */
        public $hookError = '';
 
        /** @var ParserOutput */
-       protected $mParserOutput;
+       public $mParserOutput;
 
        /** @var bool Has a summary been preset using GET parameter &summary= ? */
-       protected $hasPresetSummary = false;
+       public $hasPresetSummary = false;
 
        /** @var bool */
-       protected $mBaseRevision = false;
+       public $mBaseRevision = false;
 
        /** @var bool */
        public $mShowSummaryField = true;
@@ -282,16 +277,16 @@ class EditPage {
        public $preview = false;
 
        /** @var bool */
-       protected $diff = false;
+       public $diff = false;
 
        /** @var bool */
        public $minoredit = false;
 
        /** @var bool */
-       protected $watchthis = false;
+       public $watchthis = false;
 
        /** @var bool */
-       protected $recreate = false;
+       public $recreate = false;
 
        /** @var string */
        public $textbox1 = '';
@@ -303,7 +298,7 @@ class EditPage {
        public $summary = '';
 
        /** @var bool */
-       protected $nosummary = false;
+       public $nosummary = false;
 
        /** @var string */
        public $edittime = '';
@@ -315,13 +310,13 @@ class EditPage {
        public $sectiontitle = '';
 
        /** @var string */
-       protected $starttime = '';
+       public $starttime = '';
 
        /** @var int */
        public $oldid = 0;
 
        /** @var string */
-       protected $editintro = '';
+       public $editintro = '';
 
        /** @var null */
        public $scrolltop = null;
index 43dfd17..48a814d 100644 (file)
@@ -41,7 +41,7 @@ class WikiExporter {
        public $dumpUploadFileContents = false;
 
        /** @var string */
-       protected $author_list = "";
+       public $author_list = "";
 
        const FULL = 1;
        const CURRENT = 2;
@@ -56,13 +56,13 @@ class WikiExporter {
        const STUB = 1;
 
        /** @var int */
-       protected $buffer;
+       public $buffer;
 
        /** @var int */
-       protected $text;
+       public $text;
 
        /** @var DumpOutput */
-       protected $sink;
+       public $sink;
 
        /**
         * Returns the export schema version.
@@ -1370,10 +1370,10 @@ class DumpNotalkFilter extends DumpFilter {
  */
 class DumpNamespaceFilter extends DumpFilter {
        /** @var bool */
-       protected $invert = false;
+       public $invert = false;
 
        /** @var array */
-       protected $namespaces = array();
+       public $namespaces = array();
 
        /**
         * @param DumpOutput $sink
@@ -1437,13 +1437,13 @@ class DumpNamespaceFilter extends DumpFilter {
  * @ingroup Dump
  */
 class DumpLatestFilter extends DumpFilter {
-       protected $page;
+       public $page;
 
-       protected $pageString;
+       public $pageString;
 
-       protected $rev;
+       public $rev;
 
-       protected $revString;
+       public $revString;
 
        /**
         * @param object $page
index 03dd7f5..2fdfa42 100644 (file)
  */
 class FeedItem {
        /** @var Title */
-       protected $title;
+       public $title;
 
-       protected $description;
+       public $description;
 
-       protected $url;
+       public $url;
 
-       protected $date;
+       public $date;
 
-       protected $author;
+       public $author;
 
-       protected $uniqueId;
+       public $uniqueId;
 
-       protected $comments;
+       public $comments;
 
        public $rssIsPermalink = false;
 
index d2be9e9..69f1120 100644 (file)
@@ -351,10 +351,10 @@ class HistoryBlobCurStub {
  */
 class DiffHistoryBlob implements HistoryBlob {
        /** @var array Uncompressed item cache */
-       protected $mItems = array();
+       public $mItems = array();
 
        /** @var int Total uncompressed size */
-       protected $mSize = 0;
+       public $mSize = 0;
 
        /**
         * @var array Array of diffs. If a diff D from A to B is notated D = B - A,
@@ -364,20 +364,20 @@ class DiffHistoryBlob implements HistoryBlob {
         *    diff[i] = {
         *              { item[map[i]] - Z                where i = 0
         */
-       protected $mDiffs;
+       public $mDiffs;
 
        /** @var array The diff map, see above */
-       protected $mDiffMap;
+       public $mDiffMap;
 
        /** @var int The key for getText()
         */
-       protected $mDefaultKey;
+       public $mDefaultKey;
 
        /** @var string Compressed storage */
        public $mCompressed;
 
        /** @var bool True if the object is locked against further writes */
-       protected $mFrozen = false;
+       public $mFrozen = false;
 
        /**
         * @var int The maximum uncompressed size before the object becomes sad
index b3ca041..5319076 100644 (file)
@@ -891,7 +891,7 @@ class WikiImporter {
 /** This is a horrible hack used to keep source compatibility */
 class UploadSourceAdapter {
        /** @var array */
-       private static $sourceRegistrations = array();
+       public static $sourceRegistrations = array();
 
        /** @var string */
        private $mSource;
@@ -1015,13 +1015,13 @@ class UploadSourceAdapter {
  */
 class WikiRevision {
        /** @todo Unused? */
-       private $importer = null;
+       public $importer = null;
 
        /** @var Title */
        public $title = null;
 
        /** @var int */
-       private $id = 0;
+       public $id = 0;
 
        /** @var string */
        public $timestamp = "20010115000000";
@@ -1035,10 +1035,10 @@ class WikiRevision {
        public $user_text = "";
 
        /** @var string */
-       protected $model = null;
+       public $model = null;
 
        /** @var string */
-       protected $format = null;
+       public $format = null;
 
        /** @var string */
        public $text = "";
@@ -1047,7 +1047,7 @@ class WikiRevision {
        protected $size;
 
        /** @var Content */
-       protected $content = null;
+       public $content = null;
 
        /** @var ContentHandler */
        protected $contentHandler = null;
@@ -1056,31 +1056,31 @@ class WikiRevision {
        public $comment = "";
 
        /** @var bool */
-       protected $minor = false;
+       public $minor = false;
 
        /** @var string */
-       protected $type = "";
+       public $type = "";
 
        /** @var string */
-       protected $action = "";
+       public $action = "";
 
        /** @var string */
-       protected $params = "";
+       public $params = "";
 
        /** @var string */
-       protected $fileSrc = '';
+       public $fileSrc = '';
 
        /** @var bool|string */
-       protected $sha1base36 = false;
+       public $sha1base36 = false;
 
        /**
         * @var bool
         * @todo Unused?
         */
-       private $isTemp = false;
+       public $isTemp = false;
 
        /** @var string */
-       protected $archiveName = '';
+       public $archiveName = '';
 
        protected $filename;
 
@@ -1088,7 +1088,7 @@ class WikiRevision {
        protected $src;
 
        /** @todo Unused? */
-       private $fileIsTemp;
+       public $fileIsTemp;
 
        /** @var bool */
        private $mNoUpdates = false;
index f0b16ab..d9f4255 100644 (file)
@@ -2151,7 +2151,7 @@ class Linker {
                return $tooltip;
        }
 
-       private static $accesskeycache;
+       public static $accesskeycache;
 
        /**
         * Given the id of an interface element, constructs the appropriate
index 8970539..748c14e 100644 (file)
@@ -53,25 +53,25 @@ class Article implements Page {
         * @var Content Content of the revision we are working on
         * @since 1.21
         */
-       protected $mContentObject;
+       public $mContentObject;
 
        /** @var bool Is the content ($mContent) already loaded? */
-       protected $mContentLoaded = false;
+       public $mContentLoaded = false;
 
        /** @var int|null The oldid of the article that is to be shown, 0 for the current revision */
-       protected $mOldId;
+       public $mOldId;
 
        /** @var Title Title from which we were redirected here */
-       protected $mRedirectedFrom = null;
+       public $mRedirectedFrom = null;
 
        /** @var string|bool URL to redirect to or false if none */
-       protected $mRedirectUrl = false;
+       public $mRedirectUrl = false;
 
        /** @var int Revision ID of revision we are working on */
-       protected $mRevIdFetched = 0;
+       public $mRevIdFetched = 0;
 
        /** @var Revision Revision we are working on */
-       protected $mRevision = null;
+       public $mRevision = null;
 
        /** @var ParserOutput */
        public $mParserOutput;