Index: branches/REL1_17/phase3/maintenance/tests/parser/parserTests.txt |
— | — | @@ -6609,38 +6609,38 @@ |
6610 | 6610 | !! result |
6611 | 6611 | <ul class="gallery"> |
6612 | 6612 | <li class="gallerybox" style="width: 155px"><div style="width: 155px"> |
6613 | | - <div style="height: 152px;">Image1.png</div> |
| 6613 | + <div style="height: 150px;">Image1.png</div> |
6614 | 6614 | <div class="gallerytext"> |
6615 | 6615 | </div> |
6616 | 6616 | </div></li> |
6617 | 6617 | <li class="gallerybox" style="width: 155px"><div style="width: 155px"> |
6618 | | - <div style="height: 152px;">Image2.gif</div> |
| 6618 | + <div style="height: 150px;">Image2.gif</div> |
6619 | 6619 | <div class="gallerytext"> |
6620 | 6620 | <p>|||| |
6621 | 6621 | </p> |
6622 | 6622 | </div> |
6623 | 6623 | </div></li> |
6624 | 6624 | <li class="gallerybox" style="width: 155px"><div style="width: 155px"> |
6625 | | - <div style="height: 152px;">Image3</div> |
| 6625 | + <div style="height: 150px;">Image3</div> |
6626 | 6626 | <div class="gallerytext"> |
6627 | 6627 | </div> |
6628 | 6628 | </div></li> |
6629 | 6629 | <li class="gallerybox" style="width: 155px"><div style="width: 155px"> |
6630 | | - <div style="height: 152px;">Image4</div> |
| 6630 | + <div style="height: 150px;">Image4</div> |
6631 | 6631 | <div class="gallerytext"> |
6632 | 6632 | <p>300px| centre |
6633 | 6633 | </p> |
6634 | 6634 | </div> |
6635 | 6635 | </div></li> |
6636 | 6636 | <li class="gallerybox" style="width: 155px"><div style="width: 155px"> |
6637 | | - <div style="height: 152px;">Image5.svg</div> |
| 6637 | + <div style="height: 150px;">Image5.svg</div> |
6638 | 6638 | <div class="gallerytext"> |
6639 | 6639 | <p><a href="http://///////" class="external free" rel="nofollow">http://///////</a> |
6640 | 6640 | </p> |
6641 | 6641 | </div> |
6642 | 6642 | </div></li> |
6643 | 6643 | <li class="gallerybox" style="width: 155px"><div style="width: 155px"> |
6644 | | - <div style="height: 152px;">* image6</div> |
| 6644 | + <div style="height: 150px;">* image6</div> |
6645 | 6645 | <div class="gallerytext"> |
6646 | 6646 | </div> |
6647 | 6647 | </div></li> |
— | — | @@ -6661,26 +6661,26 @@ |
6662 | 6662 | <ul class="gallery" style="max-width: 220px;_width: 220px;"> |
6663 | 6663 | <li class='gallerycaption'>Foo <a href="https://www.mediawiki.org/wiki/Main_Page">Main Page</a></li> |
6664 | 6664 | <li class="gallerybox" style="width: 95px"><div style="width: 95px"> |
6665 | | - <div style="height: 52px;">Nonexistant.jpg</div> |
| 6665 | + <div style="height: 70px;">Nonexistant.jpg</div> |
6666 | 6666 | <div class="gallerytext"> |
6667 | 6667 | <p>caption |
6668 | 6668 | </p> |
6669 | 6669 | </div> |
6670 | 6670 | </div></li> |
6671 | 6671 | <li class="gallerybox" style="width: 95px"><div style="width: 95px"> |
6672 | | - <div style="height: 52px;">Nonexistant.jpg</div> |
| 6672 | + <div style="height: 70px;">Nonexistant.jpg</div> |
6673 | 6673 | <div class="gallerytext"> |
6674 | 6674 | </div> |
6675 | 6675 | </div></li> |
6676 | 6676 | <li class="gallerybox" style="width: 95px"><div style="width: 95px"> |
6677 | | - <div class="thumb" style="padding: 19px 0; width: 90px;"><div style="margin-left: auto; margin-right: auto; width: 60px;"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="60" height="7" /></a></div></div> |
| 6677 | + <div class="thumb" style="width: 90px; height: 70px;"><div style="margin:31px auto;"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="60" height="7" /></a></div></div> |
6678 | 6678 | <div class="gallerytext"> |
6679 | 6679 | <p>some <b>caption</b> <a href="https://www.mediawiki.org/wiki/Main_Page">Main Page</a> |
6680 | 6680 | </p> |
6681 | 6681 | </div> |
6682 | 6682 | </div></li> |
6683 | 6683 | <li class="gallerybox" style="width: 95px"><div style="width: 95px"> |
6684 | | - <div class="thumb" style="padding: 19px 0; width: 90px;"><div style="margin-left: auto; margin-right: auto; width: 60px;"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="60" height="7" /></a></div></div> |
| 6684 | + <div class="thumb" style="width: 90px; height: 70px;"><div style="margin:31px auto;"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="60" height="7" /></a></div></div> |
6685 | 6685 | <div class="gallerytext"> |
6686 | 6686 | </div> |
6687 | 6687 | </div></li> |
— | — | @@ -6700,7 +6700,7 @@ |
6701 | 6701 | !! result |
6702 | 6702 | <ul class="gallery"> |
6703 | 6703 | <li class="gallerybox" style="width: 155px"><div style="width: 155px"> |
6704 | | - <div style="height: 152px;">Nonexistant.jpg</div> |
| 6704 | + <div style="height: 150px;">Nonexistant.jpg</div> |
6705 | 6705 | <div class="gallerytext"> |
6706 | 6706 | <p><a href="https://www.mediawiki.org/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br /> |
6707 | 6707 | caption |
— | — | @@ -6708,14 +6708,14 @@ |
6709 | 6709 | </div> |
6710 | 6710 | </div></li> |
6711 | 6711 | <li class="gallerybox" style="width: 155px"><div style="width: 155px"> |
6712 | | - <div style="height: 152px;">Nonexistant.jpg</div> |
| 6712 | + <div style="height: 150px;">Nonexistant.jpg</div> |
6713 | 6713 | <div class="gallerytext"> |
6714 | 6714 | <p><a href="https://www.mediawiki.org/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br /> |
6715 | 6715 | </p> |
6716 | 6716 | </div> |
6717 | 6717 | </div></li> |
6718 | 6718 | <li class="gallerybox" style="width: 155px"><div style="width: 155px"> |
6719 | | - <div class="thumb" style="padding: 66px 0; width: 150px;"><div style="margin-left: auto; margin-right: auto; width: 120px;"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="120" height="14" /></a></div></div> |
| 6719 | + <div class="thumb" style="width: 150px; height: 150px;"><div style="margin:68px auto;"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="120" height="14" /></a></div></div> |
6720 | 6720 | <div class="gallerytext"> |
6721 | 6721 | <p><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br /> |
6722 | 6722 | some <b>caption</b> <a href="https://www.mediawiki.org/wiki/Main_Page">Main Page</a> |
— | — | @@ -6723,7 +6723,7 @@ |
6724 | 6724 | </div> |
6725 | 6725 | </div></li> |
6726 | 6726 | <li class="gallerybox" style="width: 155px"><div style="width: 155px"> |
6727 | | - <div class="thumb" style="padding: 66px 0; width: 150px;"><div style="margin-left: auto; margin-right: auto; width: 120px;"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="120" height="14" /></a></div></div> |
| 6727 | + <div class="thumb" style="width: 150px; height: 150px;"><div style="margin:68px auto;"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="120" height="14" /></a></div></div> |
6728 | 6728 | <div class="gallerytext"> |
6729 | 6729 | <p><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br /> |
6730 | 6730 | </p> |
Index: branches/REL1_17/phase3/includes/filerepo/ForeignAPIFile.php |
— | — | @@ -21,7 +21,13 @@ |
22 | 22 | $this->mInfo = $info; |
23 | 23 | $this->mExists = $exists; |
24 | 24 | } |
25 | | - |
| 25 | + |
| 26 | + /** |
| 27 | + * @static |
| 28 | + * @param $title Title |
| 29 | + * @param $repo ForeignApiRepo |
| 30 | + * @return ForeignAPIFile|null |
| 31 | + */ |
26 | 32 | static function newFromTitle( $title, $repo ) { |
27 | 33 | $data = $repo->fetchImageQuery( array( |
28 | 34 | 'titles' => 'File:' . $title->getDBKey(), |
— | — | @@ -30,11 +36,16 @@ |
31 | 37 | |
32 | 38 | $info = $repo->getImageInfo( $data ); |
33 | 39 | |
34 | | - if( $data && $info) { |
35 | | - if( isset( $data['query']['redirects'][0] ) ) { |
36 | | - $newtitle = Title::newFromText( $data['query']['redirects'][0]['to']); |
| 40 | + if( $info ) { |
| 41 | + $lastRedirect = isset( $data['query']['redirects'] ) |
| 42 | + ? count( $data['query']['redirects'] ) - 1 |
| 43 | + : -1; |
| 44 | + if( $lastRedirect >= 0 ) { |
| 45 | + $newtitle = Title::newFromText( $data['query']['redirects'][$lastRedirect]['to']); |
37 | 46 | $img = new ForeignAPIFile( $newtitle, $repo, $info, true ); |
38 | | - if( $img ) $img->redirectedFrom( $title->getDBkey() ); |
| 47 | + if( $img ) { |
| 48 | + $img->redirectedFrom( $title->getDBkey() ); |
| 49 | + } |
39 | 50 | } else { |
40 | 51 | $img = new ForeignAPIFile( $title, $repo, $info, true ); |
41 | 52 | } |
Property changes on: branches/REL1_17/phase3/includes/filerepo/ForeignAPIFile.php |
___________________________________________________________________ |
Added: svn:mergeinfo |
42 | 53 | Merged /branches/new-installer/phase3/includes/filerepo/ForeignAPIFile.php:r43664-66004 |
43 | 54 | Merged /branches/wmf-deployment/includes/filerepo/ForeignAPIFile.php:r53381 |
44 | 55 | Merged /branches/REL1_15/phase3/includes/filerepo/ForeignAPIFile.php:r51646 |
45 | 56 | Merged /branches/sqlite/includes/filerepo/ForeignAPIFile.php:r58211-58321 |
46 | 57 | Merged /trunk/phase3/includes/filerepo/ForeignAPIFile.php:r79708,79725 |
Index: branches/REL1_17/phase3/includes/api/ApiParse.php |
— | — | @@ -114,7 +114,7 @@ |
115 | 115 | $wgTitle = $titleObj; |
116 | 116 | |
117 | 117 | if ( $this->section !== false ) { |
118 | | - $text = $this->getSectionText( $text, 'r' . $rev ); |
| 118 | + $text = $this->getSectionText( $text, 'r' . $rev->getId() ); |
119 | 119 | } |
120 | 120 | |
121 | 121 | $p_result = $wgParser->parse( $text, $titleObj, $popts ); |
Property changes on: branches/REL1_17/phase3/includes/api/ApiParse.php |
___________________________________________________________________ |
Added: svn:mergeinfo |
122 | 122 | Merged /branches/wmf-deployment/includes/api/ApiParse.php:r53381,59952 |
123 | 123 | Merged /branches/REL1_15/phase3/includes/api/ApiParse.php:r51646 |
124 | 124 | Merged /branches/REL1_16/phase3/includes/api/ApiParse.php:r63621-63636,69357 |
125 | 125 | Merged /branches/wmf/1.16wmf4/includes/api/ApiParse.php:r69521 |
126 | 126 | Merged /branches/sqlite/includes/api/ApiParse.php:r58211-58321 |
127 | 127 | Merged /trunk/phase3/includes/api/ApiParse.php:r79762 |
Index: branches/REL1_17/phase3/includes/Title.php |
— | — | @@ -72,7 +72,7 @@ |
73 | 73 | var $mCascadeSources; ///< Where are the cascading restrictions coming from on this page? |
74 | 74 | var $mRestrictionsLoaded = false; ///< Boolean for initialisation on demand |
75 | 75 | var $mPrefixedText; ///< Text form including namespace/interwiki, initialised on demand |
76 | | - var $mTitleProtection; ///< Cached value of getTitleProtection |
| 76 | + var $mTitleProtection; ///< Cached value for getTitleProtection (create protection) |
77 | 77 | # Don't change the following default, NS_MAIN is hardcoded in several |
78 | 78 | # places. See bug 696. |
79 | 79 | var $mDefaultNamespace = NS_MAIN; // /< Namespace index when there is no namespace |
— | — | @@ -1624,6 +1624,7 @@ |
1625 | 1625 | |
1626 | 1626 | /** |
1627 | 1627 | * Is this title subject to title protection? |
| 1628 | + * Title protection is the one applied against creation of such title. |
1628 | 1629 | * |
1629 | 1630 | * @return \type{\mixed} An associative array representing any existent title |
1630 | 1631 | * protection, or false if there's none. |
— | — | @@ -1651,10 +1652,6 @@ |
1652 | 1653 | return $this->mTitleProtection; |
1653 | 1654 | } |
1654 | 1655 | |
1655 | | - private function invalidateTitleProtectionCache() { |
1656 | | - unset( $this->mTitleProtection ); |
1657 | | - } |
1658 | | - |
1659 | 1656 | /** |
1660 | 1657 | * Update the title protection status |
1661 | 1658 | * |
— | — | @@ -1688,8 +1685,7 @@ |
1689 | 1686 | |
1690 | 1687 | # Update protection table |
1691 | 1688 | if ( $create_perm != '' ) { |
1692 | | - $dbw->replace( 'protected_titles', array( array( 'pt_namespace', 'pt_title' ) ), |
1693 | | - array( |
| 1689 | + $this->mTitleProtection = array( |
1694 | 1690 | 'pt_namespace' => $namespace, |
1695 | 1691 | 'pt_title' => $title, |
1696 | 1692 | 'pt_create_perm' => $create_perm, |
— | — | @@ -1697,13 +1693,14 @@ |
1698 | 1694 | 'pt_expiry' => $encodedExpiry, |
1699 | 1695 | 'pt_user' => $wgUser->getId(), |
1700 | 1696 | 'pt_reason' => $reason, |
1701 | | - ), __METHOD__ |
1702 | | - ); |
| 1697 | + ); |
| 1698 | + $dbw->replace( 'protected_titles', array( array( 'pt_namespace', 'pt_title' ) ), |
| 1699 | + $this->mTitleProtection, __METHOD__ ); |
1703 | 1700 | } else { |
1704 | 1701 | $dbw->delete( 'protected_titles', array( 'pt_namespace' => $namespace, |
1705 | 1702 | 'pt_title' => $title ), __METHOD__ ); |
| 1703 | + $this->mTitleProtection = false; |
1706 | 1704 | } |
1707 | | - $this->invalidateTitleProtectionCache(); |
1708 | 1705 | |
1709 | 1706 | # Update the protection log |
1710 | 1707 | if ( $dbw->affectedRows() ) { |
— | — | @@ -1731,7 +1728,7 @@ |
1732 | 1729 | array( 'pt_namespace' => $this->getNamespace(), 'pt_title' => $this->getDBkey() ), |
1733 | 1730 | __METHOD__ |
1734 | 1731 | ); |
1735 | | - $this->invalidateTitleProtectionCache(); |
| 1732 | + $this->mTitleProtection = false; |
1736 | 1733 | } |
1737 | 1734 | |
1738 | 1735 | /** |
— | — | @@ -2105,7 +2102,6 @@ |
2106 | 2103 | } |
2107 | 2104 | if ( $purgeExpired ) { |
2108 | 2105 | Title::purgeExpiredRestrictions(); |
2109 | | - $this->invalidateTitleProtectionCache(); |
2110 | 2106 | } |
2111 | 2107 | |
2112 | 2108 | wfProfileOut( __METHOD__ ); |
— | — | @@ -2152,7 +2148,8 @@ |
2153 | 2149 | |
2154 | 2150 | /** |
2155 | 2151 | * Compiles list of active page restrictions from both page table (pre 1.10) |
2156 | | - * and page_restrictions table |
| 2152 | + * and page_restrictions table for this existing page. |
| 2153 | + * Public for usage by LiquidThreads. |
2157 | 2154 | * |
2158 | 2155 | * @param $rows array of db result objects |
2159 | 2156 | * @param $oldFashionedRestrictions string comma-separated list of page |
— | — | @@ -2225,7 +2222,6 @@ |
2226 | 2223 | |
2227 | 2224 | if ( $purgeExpired ) { |
2228 | 2225 | Title::purgeExpiredRestrictions(); |
2229 | | - $this->invalidateTitleProtectionCache(); |
2230 | 2226 | } |
2231 | 2227 | } |
2232 | 2228 | |
— | — | @@ -2260,7 +2256,7 @@ |
2261 | 2257 | $this->mRestrictions['create'] = explode( ',', trim( $title_protection['pt_create_perm'] ) ); |
2262 | 2258 | } else { // Get rid of the old restrictions |
2263 | 2259 | Title::purgeExpiredRestrictions(); |
2264 | | - $this->invalidateTitleProtectionCache(); |
| 2260 | + $this->mTitleProtection = false; |
2265 | 2261 | } |
2266 | 2262 | } else { |
2267 | 2263 | $this->mRestrictionsExpiry['create'] = Block::decodeExpiry( '' ); |
Property changes on: branches/REL1_17/phase3/includes/Title.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
2268 | 2264 | Merged /trunk/phase3/includes/Title.php:r79759,79764 |
Index: branches/REL1_17/phase3/includes/specials/SpecialUpload.php |
— | — | @@ -264,7 +264,7 @@ |
265 | 265 | |
266 | 266 | # Give a notice if the user is uploading a file that has been deleted or moved |
267 | 267 | # Note that this is independent from the message 'filewasdeleted' that requires JS |
268 | | - $desiredTitleObj = Title::newFromText( $this->mDesiredDestName, NS_FILE ); |
| 268 | + $desiredTitleObj = Title::makeTitleSafe( NS_FILE, $this->mDesiredDestName ); |
269 | 269 | $delNotice = ''; // empty by default |
270 | 270 | if ( $desiredTitleObj instanceof Title && !$desiredTitleObj->exists() ) { |
271 | 271 | LogEventsList::showLogExtract( $delNotice, array( 'delete', 'move' ), |
— | — | @@ -816,11 +816,11 @@ |
817 | 817 | |
818 | 818 | if ( $this->mSessionKey ) { |
819 | 819 | return array( |
820 | | - 'wpSessionKey' => array( |
| 820 | + 'SessionKey' => array( |
821 | 821 | 'type' => 'hidden', |
822 | 822 | 'default' => $this->mSessionKey, |
823 | 823 | ), |
824 | | - 'wpSourceType' => array( |
| 824 | + 'SourceType' => array( |
825 | 825 | 'type' => 'hidden', |
826 | 826 | 'default' => 'Stash', |
827 | 827 | ), |
Property changes on: branches/REL1_17/phase3/includes/specials/SpecialUpload.php |
___________________________________________________________________ |
Added: svn:mergeinfo |
828 | 828 | Merged /branches/wmf-deployment/includes/specials/SpecialUpload.php:r53381,56967 |
829 | 829 | Merged /branches/REL1_15/phase3/includes/specials/SpecialUpload.php:r51646 |
830 | 830 | Merged /branches/sqlite/includes/specials/SpecialUpload.php:r58211-58321 |
831 | 831 | Merged /trunk/phase3/includes/specials/SpecialUpload.php:r78560,79758 |
Index: branches/REL1_17/phase3/includes/specials/SpecialVersion.php |
— | — | @@ -89,18 +89,20 @@ |
90 | 90 | } |
91 | 91 | |
92 | 92 | /** |
93 | | - * Get the "Mediawiki is copyright 2001-20xx by lots of cool guys" text |
| 93 | + * Get the "MediaWiki is copyright 2001-20xx by lots of cool guys" text |
94 | 94 | * |
95 | 95 | * @return String |
96 | 96 | */ |
97 | 97 | public static function getCopyrightAndAuthorList() { |
98 | 98 | global $wgLang; |
99 | 99 | |
100 | | - $authorList = array( 'Magnus Manske', 'Brion Vibber', 'Lee Daniel Crocker', |
| 100 | + $authorList = array( |
| 101 | + 'Magnus Manske', 'Brion Vibber', 'Lee Daniel Crocker', |
101 | 102 | 'Tim Starling', 'Erik Möller', 'Gabriel Wicke', 'Ævar Arnfjörð Bjarmason', |
102 | 103 | 'Niklas Laxström', 'Domas Mituzas', 'Rob Church', 'Yuri Astrakhan', |
103 | 104 | 'Aryeh Gregor', 'Aaron Schulz', 'Andrew Garrett', 'Raimond Spekking', |
104 | 105 | 'Alexandre Emsenhuber', 'Siebrand Mazeland', 'Chad Horohoe', |
| 106 | + 'Roan Kattouw', 'Trevor Parscal', 'Bryan Tong Minh', 'Sam Reed', |
105 | 107 | wfMsg( 'version-poweredby-others' ) |
106 | 108 | ); |
107 | 109 | |
— | — | @@ -183,7 +185,7 @@ |
184 | 186 | |
185 | 187 | $info = self::getSvnInfo( $IP ); |
186 | 188 | |
187 | | - if ( isset( $info['checkout-rev'] ) ) { |
| 189 | + if ( isset( $info['checkout-rev'] ) ) { |
188 | 190 | $linkText = wfMsg( |
189 | 191 | 'version-svn-revision', |
190 | 192 | isset( $info['directory-rev'] ) ? $info['directory-rev'] : '', |
Property changes on: branches/REL1_17/phase3/includes/specials/SpecialVersion.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
191 | 193 | Merged /trunk/phase3/includes/specials/SpecialVersion.php:r79131,79713 |