Index: branches/REL1_17/extensions/Farmer/MediaWikiFarmer_Wiki.php |
— | — | @@ -412,7 +412,7 @@ |
413 | 413 | $user = $farmer->dbAdminUser; |
414 | 414 | $password = $farmer->dbAdminPassword; |
415 | 415 | $class = 'Database' . ucfirst( $wgDBtype ); |
416 | | - $object = new $class( $wgDBserver, $user, $password, $db, false, 0, $prefix ); |
| 416 | + $object = new $class( $wgDBserver, $user, $password, $db, 0, $prefix ); |
417 | 417 | if ( $selectDB ) |
418 | 418 | $this->_db = $object; |
419 | 419 | return $object; |
Index: branches/REL1_17/extensions/LabeledSectionTransclusion/lst.php |
— | — | @@ -21,7 +21,7 @@ |
22 | 22 | # Standard initialisation code |
23 | 23 | ## |
24 | 24 | |
25 | | -$wgExtensionFunctions[] = array( 'LabeledSectionTransclusion', "setup" ); |
| 25 | +$wgHooks['ParserFirstCallInit'][] = 'LabeledSectionTransclusion::setup'; |
26 | 26 | $wgHooks['LanguageGetMagic'][] = 'LabeledSectionTransclusion::setupMagic'; |
27 | 27 | |
28 | 28 | $wgExtensionCredits['parserhook'][] = array( |
— | — | @@ -40,17 +40,15 @@ |
41 | 41 | |
42 | 42 | class LabeledSectionTransclusion { |
43 | 43 | |
44 | | - static function setup() |
| 44 | + static function setup( $parser ) |
45 | 45 | { |
46 | | - global $wgParser; |
47 | | - |
48 | | - $wgParser->setHook( 'section', array( __CLASS__, 'noop' ) ); |
49 | | - if ( defined( get_class( $wgParser ) . '::SFH_OBJECT_ARGS' ) ) { |
50 | | - $wgParser->setFunctionHook( 'lst', array( __CLASS__, 'pfuncIncludeObj' ), SFH_OBJECT_ARGS ); |
51 | | - $wgParser->setFunctionHook( 'lstx', array( __CLASS__, 'pfuncExcludeObj' ), SFH_OBJECT_ARGS ); |
| 46 | + $parser->setHook( 'section', array( __CLASS__, 'noop' ) ); |
| 47 | + if ( defined( get_class( $parser ) . '::SFH_OBJECT_ARGS' ) ) { |
| 48 | + $parser->setFunctionHook( 'lst', array( __CLASS__, 'pfuncIncludeObj' ), SFH_OBJECT_ARGS ); |
| 49 | + $parser->setFunctionHook( 'lstx', array( __CLASS__, 'pfuncExcludeObj' ), SFH_OBJECT_ARGS ); |
52 | 50 | } else { |
53 | | - $wgParser->setFunctionHook( 'lst', array( __CLASS__, 'pfuncInclude' ) ); |
54 | | - $wgParser->setFunctionHook( 'lstx', array( __CLASS__, 'pfuncExclude' ) ); |
| 51 | + $parser->setFunctionHook( 'lst', array( __CLASS__, 'pfuncInclude' ) ); |
| 52 | + $parser->setFunctionHook( 'lstx', array( __CLASS__, 'pfuncExclude' ) ); |
55 | 53 | } |
56 | 54 | } |
57 | 55 | |
Index: branches/REL1_17/extensions/Wikidata/Database scripts/Incremental/ReadPatch.php |
— | — | @@ -158,7 +158,7 @@ |
159 | 159 | } |
160 | 160 | # Attempt to connect to the database as a privileged user |
161 | 161 | # This will vomit up an error if there are permissions problems |
162 | | -$wdDatabase = new $dbclass( $server, $user, $password, $database, 1 ); |
| 162 | +$wdDatabase = new $dbclass( $server, $user, $password, $database ); |
163 | 163 | |
164 | 164 | if ( !$wdDatabase->isOpen() ) { |
165 | 165 | # Appears to have failed |
Index: branches/REL1_17/extensions/Wikidata/Database scripts/Convenience/Create wikidata.php |
— | — | @@ -220,7 +220,7 @@ |
221 | 221 | } |
222 | 222 | # Attempt to connect to the database as a privileged user |
223 | 223 | # This will vomit up an error if there are permissions problems |
224 | | -$wdDatabase = new $dbclass( $server, $user, $password, $database, 1 ); |
| 224 | +$wdDatabase = new $dbclass( $server, $user, $password, $database ); |
225 | 225 | |
226 | 226 | if ( !$wdDatabase->isOpen() ) { |
227 | 227 | # Appears to have failed |
Index: branches/REL1_17/phase3/maintenance/archives/patch-categorylinks-better-collation.sql |
— | — | @@ -4,6 +4,10 @@ |
5 | 5 | -- Bugs 164, 1211, 23682. This is the second version of this patch; the |
6 | 6 | -- changes are also incorporated into patch-categorylinks-better-collation2.sql, |
7 | 7 | -- for the benefit of trunk users who applied the original. |
| 8 | +-- |
| 9 | +-- Due to bug 25254, the length limit of 255 bytes for cl_sortkey_prefix |
| 10 | +-- is also enforced in php. If you change the length of that field, make |
| 11 | +-- sure to also change the check in LinksUpdate.php. |
8 | 12 | ALTER TABLE /*$wgDBprefix*/categorylinks |
9 | 13 | CHANGE COLUMN cl_sortkey cl_sortkey varbinary(230) NOT NULL default '', |
10 | 14 | ADD COLUMN cl_sortkey_prefix varchar(255) binary NOT NULL default '', |
Index: branches/REL1_17/phase3/skins/common/config.css |
— | — | @@ -95,6 +95,7 @@ |
96 | 96 | .config-message { |
97 | 97 | display: list-item; |
98 | 98 | line-height: 1.5em; |
| 99 | + /* @embed */ |
99 | 100 | list-style-image: url(images/bullet.gif); |
100 | 101 | list-style-type: square; |
101 | 102 | } |
Index: branches/REL1_17/phase3/skins/common/shared.css |
— | — | @@ -577,6 +577,7 @@ |
578 | 578 | |
579 | 579 | /* feed links */ |
580 | 580 | a.feedlink { |
| 581 | + /* @embed */ |
581 | 582 | background: url("images/feed-icon.png") center left no-repeat; |
582 | 583 | padding-left: 16px; |
583 | 584 | } |
— | — | @@ -850,6 +851,7 @@ |
851 | 852 | |
852 | 853 | .mw-remove-category { |
853 | 854 | padding: 8px; |
| 855 | + /* @embed */ |
854 | 856 | background-image: url(images/remove.png); |
855 | 857 | background-position: center center; |
856 | 858 | background-repeat: no-repeat; |
— | — | @@ -857,12 +859,14 @@ |
858 | 860 | |
859 | 861 | .mw-ajax-addcategory { |
860 | 862 | padding-left: 20px; |
| 863 | + /* @embed */ |
861 | 864 | background-image: url(images/add.png); |
862 | 865 | background-position: left center; |
863 | 866 | background-repeat: no-repeat; |
864 | 867 | } |
865 | 868 | |
866 | 869 | .mw-ajax-loader { |
| 870 | + /* @embed */ |
867 | 871 | background-image: url(images/ajax-loader.gif); |
868 | 872 | background-position: center center; |
869 | 873 | background-repeat: no-repeat; |
— | — | @@ -874,6 +878,7 @@ |
875 | 879 | .mw-small-spinner { |
876 | 880 | padding: 10px !important; |
877 | 881 | margin-right: 0.6em; |
| 882 | + /* @embed */ |
878 | 883 | background-image: url(images/spinner.gif); |
879 | 884 | background-position: center center; |
880 | 885 | background-repeat: no-repeat; |
— | — | @@ -912,6 +917,7 @@ |
913 | 918 | padding-left: 15px; |
914 | 919 | margin-left: 2px; |
915 | 920 | margin-bottom: -8px; |
| 921 | + /* @embed */ |
916 | 922 | background-image: url('images/help-question.gif'); |
917 | 923 | background-position: left center; |
918 | 924 | background-repeat: no-repeat; |
— | — | @@ -921,6 +927,7 @@ |
922 | 928 | font-size: .8em; |
923 | 929 | } |
924 | 930 | .mw-help-field-hint:hover { |
| 931 | + /* @embed */ |
925 | 932 | background-image: url('images/help-question-hover.gif'); |
926 | 933 | } |
927 | 934 | .mw-help-field-data { |
— | — | @@ -932,7 +939,7 @@ |
933 | 940 | } |
934 | 941 | .tipsy { padding: 5px 5px 10px; font-size: 12px; position: absolute; z-index: 100000; overflow: visible; } |
935 | 942 | .tipsy-inner { padding: 5px 8px 4px 8px; background-color: #d6f3ff; color: black; border: 1px solid #5dc9f4; max-width: 300px; text-align: left; } |
936 | | -.tipsy-arrow { position: absolute; background: url( 'images/tipsy-arrow.gif' ) no-repeat top left; width: 13px; height: 13px; } |
| 943 | +.tipsy-arrow { position: absolute; /* @embed */ background: url( 'images/tipsy-arrow.gif' ) no-repeat top left; width: 13px; height: 13px; } |
937 | 944 | .tipsy-se .tipsy-arrow { bottom: -2px; right: 10px; background-position: 0% 100%; } |
938 | 945 | |
939 | 946 | |
Index: branches/REL1_17/phase3/includes/upload/UploadBase.php |
— | — | @@ -78,20 +78,12 @@ |
79 | 79 | } |
80 | 80 | |
81 | 81 | /** |
82 | | - * Returns an array of permissions that is required to upload a file |
83 | | - * |
84 | | - * @return array |
85 | | - */ |
86 | | - public static function getRequiredPermissions() { |
87 | | - return array( 'upload', 'edit' ); |
88 | | - } |
89 | | - /** |
90 | 82 | * Returns true if the user can use this upload module or else a string |
91 | 83 | * identifying the missing permission. |
92 | 84 | * Can be overriden by subclasses. |
93 | 85 | */ |
94 | 86 | public static function isAllowed( $user ) { |
95 | | - foreach ( self::getRequiredPermissions() as $permission ) { |
| 87 | + foreach ( array( 'upload', 'edit' ) as $permission ) { |
96 | 88 | if ( !$user->isAllowed( $permission ) ) { |
97 | 89 | return $permission; |
98 | 90 | } |
Property changes on: branches/REL1_17/phase3/includes/upload/UploadBase.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
99 | 91 | Merged /trunk/phase3/includes/upload/UploadBase.php:r79655,79706,79710 |
Index: branches/REL1_17/phase3/includes/filerepo/ForeignDBRepo.php |
— | — | @@ -37,7 +37,7 @@ |
38 | 38 | if ( !isset( $this->dbConn ) ) { |
39 | 39 | $class = 'Database' . ucfirst( $this->dbType ); |
40 | 40 | $this->dbConn = new $class( $this->dbServer, $this->dbUser, |
41 | | - $this->dbPassword, $this->dbName, false, $this->dbFlags, |
| 41 | + $this->dbPassword, $this->dbName, $this->dbFlags, |
42 | 42 | $this->tablePrefix ); |
43 | 43 | } |
44 | 44 | return $this->dbConn; |
Property changes on: branches/REL1_17/phase3/includes/filerepo/ForeignDBRepo.php |
___________________________________________________________________ |
Added: svn:mergeinfo |
45 | 45 | Merged /branches/new-installer/phase3/includes/filerepo/ForeignDBRepo.php:r43664-66004 |
46 | 46 | Merged /branches/wmf-deployment/includes/filerepo/ForeignDBRepo.php:r53381 |
47 | 47 | Merged /branches/REL1_15/phase3/includes/filerepo/ForeignDBRepo.php:r51646 |
48 | 48 | Merged /branches/sqlite/includes/filerepo/ForeignDBRepo.php:r58211-58321 |
49 | 49 | Merged /trunk/phase3/includes/filerepo/ForeignDBRepo.php:r79591,79655,79706 |
Index: branches/REL1_17/phase3/includes/api/ApiOpenSearch.php |
— | — | @@ -52,20 +52,39 @@ |
53 | 53 | |
54 | 54 | // MWSuggest or similar hit |
55 | 55 | if ( $suggest && !$wgEnableOpenSearchSuggest ) { |
56 | | - $srchres = array(); |
| 56 | + $searches = array(); |
57 | 57 | } else { |
58 | | - // Open search results may be stored for a very long |
59 | | - // time |
| 58 | + // Open search results may be stored for a very long time |
60 | 59 | $this->getMain()->setCacheMaxAge( $wgSearchSuggestCacheExpiry ); |
61 | 60 | $this->getMain()->setCacheMode( 'public' ); |
62 | 61 | |
63 | | - $srchres = PrefixSearch::titleSearch( $search, $limit, |
| 62 | + $searches = PrefixSearch::titleSearch( $search, $limit, |
64 | 63 | $namespaces ); |
| 64 | + |
| 65 | + // if the content language has variants, try to retrieve fallback results |
| 66 | + $fallbackLimit = $limit - count( $searches ); |
| 67 | + if ( $fallbackLimit > 0 ) { |
| 68 | + global $wgContLang; |
| 69 | + |
| 70 | + $fallbackSearches = $wgContLang->autoConvertToAllVariants( $search ); |
| 71 | + $fallbackSearches = array_diff( array_unique( $fallbackSearches ), array( $search ) ); |
| 72 | + |
| 73 | + foreach ( $fallbackSearches as $fbs ) { |
| 74 | + $fallbackSearchResult = PrefixSearch::titleSearch( $fbs, $fallbackLimit, |
| 75 | + $namespaces ); |
| 76 | + $searches = array_merge( $searches, $fallbackSearchResult ); |
| 77 | + $fallbackLimit -= count( $fallbackSearchResult ); |
| 78 | + |
| 79 | + if ( $fallbackLimit == 0 ) { |
| 80 | + break; |
| 81 | + } |
| 82 | + } |
| 83 | + } |
65 | 84 | } |
66 | 85 | // Set top level elements |
67 | 86 | $result = $this->getResult(); |
68 | 87 | $result->addValue( null, 0, $search ); |
69 | | - $result->addValue( null, 1, $srchres ); |
| 88 | + $result->addValue( null, 1, $searches ); |
70 | 89 | } |
71 | 90 | |
72 | 91 | public function getAllowedParams() { |
Property changes on: branches/REL1_17/phase3/includes/api/ApiOpenSearch.php |
___________________________________________________________________ |
Added: svn:mergeinfo |
73 | 92 | Merged /branches/wmf-deployment/includes/api/ApiOpenSearch.php:r53381,59952 |
74 | 93 | Merged /branches/REL1_15/phase3/includes/api/ApiOpenSearch.php:r51646 |
75 | 94 | Merged /branches/REL1_16/phase3/includes/api/ApiOpenSearch.php:r63621-63636,69357 |
76 | 95 | Merged /branches/wmf/1.16wmf4/includes/api/ApiOpenSearch.php:r69521 |
77 | 96 | Merged /branches/sqlite/includes/api/ApiOpenSearch.php:r58211-58321 |
78 | 97 | Merged /trunk/phase3/includes/api/ApiOpenSearch.php:r79649-79651,79655,79694,79706 |
Index: branches/REL1_17/phase3/includes/LinksUpdate.php |
— | — | @@ -67,6 +67,14 @@ |
68 | 68 | $this->mInterlangs[$key] = $title; |
69 | 69 | } |
70 | 70 | |
| 71 | + foreach ( $this->mCategories as $cat => &$sortkey ) { |
| 72 | + # If the sortkey is longer then 255 bytes, |
| 73 | + # it truncated by DB, and then doesn't get |
| 74 | + # matched when comparing existing vs current |
| 75 | + # categories, causing bug 25254. |
| 76 | + $sortkey = substr( $sortkey, 0, 255 ); |
| 77 | + } |
| 78 | + |
71 | 79 | $this->mRecursive = $recursive; |
72 | 80 | |
73 | 81 | wfRunHooks( 'LinksUpdateConstructed', array( &$this ) ); |
— | — | @@ -687,11 +695,15 @@ |
688 | 696 | * @private |
689 | 697 | */ |
690 | 698 | function getExistingCategories() { |
691 | | - $res = $this->mDb->select( 'categorylinks', array( 'cl_to', 'cl_sortkey' ), |
| 699 | + $res = $this->mDb->select( 'categorylinks', array( 'cl_to', 'cl_sortkey_prefix' ), |
692 | 700 | array( 'cl_from' => $this->mId ), __METHOD__, $this->mOptions ); |
693 | 701 | $arr = array(); |
694 | 702 | foreach ( $res as $row ) { |
695 | | - $arr[$row->cl_to] = $row->cl_sortkey; |
| 703 | + if ( $row->cl_sortkey_prefix !== '' ) { |
| 704 | + $arr[$row->cl_to] = $row->cl_sortkey_prefix; |
| 705 | + } else { |
| 706 | + $arr[$row->cl_to] = $this->mTitle->getCategorySortkey(); |
| 707 | + } |
696 | 708 | } |
697 | 709 | return $arr; |
698 | 710 | } |
Index: branches/REL1_17/phase3/includes/Title.php |
— | — | @@ -4191,14 +4191,15 @@ |
4192 | 4192 | */ |
4193 | 4193 | public function getRestrictionTypes() { |
4194 | 4194 | global $wgRestrictionTypes; |
| 4195 | + |
4195 | 4196 | $types = $this->exists() ? $wgRestrictionTypes : array( 'create' ); |
4196 | 4197 | |
4197 | | - if ( $this->getNamespace() == NS_FILE ) { |
4198 | | - $types[] = 'upload'; |
| 4198 | + if ( $this->getNamespace() != NS_FILE ) { |
| 4199 | + $types = array_diff( $types, array( 'upload' ) ); |
4199 | 4200 | } |
4200 | | - |
| 4201 | + |
4201 | 4202 | wfRunHooks( 'TitleGetRestrictionTypes', array( $this, &$types ) ); |
4202 | | - |
| 4203 | + |
4203 | 4204 | return $types; |
4204 | 4205 | } |
4205 | 4206 | |
Property changes on: branches/REL1_17/phase3/includes/Title.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
4206 | 4207 | Merged /trunk/phase3/includes/Title.php:r79655,79660,79706 |
Index: branches/REL1_17/phase3/includes/DefaultSettings.php |
— | — | @@ -3315,8 +3315,10 @@ |
3316 | 3316 | * Set of available actions that can be restricted via action=protect |
3317 | 3317 | * You probably shouldn't change this. |
3318 | 3318 | * Translated through restriction-* messages. |
| 3319 | + * Title::getRestrictionTypes() will remove restrictions that are not |
| 3320 | + * applicable to a specific title (upload currently) |
3319 | 3321 | */ |
3320 | | -$wgRestrictionTypes = array( 'edit', 'move' ); |
| 3322 | +$wgRestrictionTypes = array( 'edit', 'move', 'upload' ); |
3321 | 3323 | |
3322 | 3324 | /** |
3323 | 3325 | * Rights which can be required for each protection level (via action=protect) |
Index: branches/REL1_17/phase3/includes/specials/SpecialVersion.php |
— | — | @@ -242,7 +242,7 @@ |
243 | 243 | */ |
244 | 244 | public static function getExtensionTypeName( $type ) { |
245 | 245 | $types = self::getExtensionTypes(); |
246 | | - return $types[$type]; |
| 246 | + return isset( $types[$type] ) ? $types[$type] : $types['other']; |
247 | 247 | } |
248 | 248 | |
249 | 249 | /** |
Property changes on: branches/REL1_17/phase3/includes/specials/SpecialVersion.php |
___________________________________________________________________ |
Added: svn:mergeinfo |
250 | 250 | Merged /branches/wmf-deployment/includes/specials/SpecialVersion.php:r53381,56967 |
251 | 251 | Merged /branches/REL1_15/phase3/includes/specials/SpecialVersion.php:r51646 |
252 | 252 | Merged /branches/sqlite/includes/specials/SpecialVersion.php:r58211-58321 |
253 | 253 | Merged /trunk/phase3/includes/specials/SpecialVersion.php:r79655,79704,79706 |
Index: branches/REL1_17/phase3/includes/Skin.php |
— | — | @@ -441,7 +441,7 @@ |
442 | 442 | 'wgCurRevisionId' => isset( $wgArticle ) ? $wgArticle->getLatest() : 0, |
443 | 443 | 'wgCategories' => $wgOut->getCategories(), |
444 | 444 | ); |
445 | | - foreach ( $wgRestrictionTypes as $type ) { |
| 445 | + foreach ( $wgTitle->getRestrictionTypes() as $type ) { |
446 | 446 | $vars['wgRestriction' . ucfirst( $type )] = $wgTitle->getRestrictions( $type ); |
447 | 447 | } |
448 | 448 | if ( $wgUseAjax && $wgEnableMWSuggest && !$wgUser->getOption( 'disablesuggest', false ) ) { |
Index: branches/REL1_17/phase3/includes/extauth/MediaWiki.php |
— | — | @@ -78,7 +78,6 @@ |
79 | 79 | $wgExternalAuthConf['DBuser'], |
80 | 80 | $wgExternalAuthConf['DBpassword'], |
81 | 81 | $wgExternalAuthConf['DBname'], |
82 | | - false, |
83 | 82 | 0, |
84 | 83 | $wgExternalAuthConf['DBprefix'] |
85 | 84 | ); |
Property changes on: branches/REL1_17/phase3/includes/extauth/MediaWiki.php |
___________________________________________________________________ |
Added: svn:mergeinfo |
86 | 85 | Merged /branches/REL1_15/phase3/includes/extauth/MediaWiki.php:r51646 |
87 | 86 | Merged /branches/sqlite/includes/extauth/MediaWiki.php:r58211-58321 |
88 | 87 | Merged /trunk/phase3/includes/extauth/MediaWiki.php:r79593,79655,79706 |
89 | 88 | Merged /branches/new-installer/phase3/includes/extauth/MediaWiki.php:r43664-66004 |
90 | 89 | Merged /branches/wmf-deployment/includes/extauth/MediaWiki.php:r53381 |
Index: branches/REL1_17/phase3/languages/LanguageConverter.php |
— | — | @@ -980,7 +980,7 @@ |
981 | 981 | |
982 | 982 | /** |
983 | 983 | * Armour rendered math against conversion. |
984 | | - * Wrap math into rawoutput -{R| math }- syntax. |
| 984 | + * Escape special chars in parsed math text.(in most cases are img elements) |
985 | 985 | */ |
986 | 986 | public function armourMath( $text ) { |
987 | 987 | // convert '-{' and '}-' to '-{' and '}-' to prevent |
Property changes on: branches/REL1_17/phase3/languages/LanguageConverter.php |
___________________________________________________________________ |
Added: svn:mergeinfo |
988 | 988 | Merged /branches/new-installer/phase3/languages/LanguageConverter.php:r43664-66004 |
989 | 989 | Merged /branches/REL1_15/phase3/languages/LanguageConverter.php:r51646 |
990 | 990 | Merged /branches/sqlite/languages/LanguageConverter.php:r58211-58321 |
991 | 991 | Merged /trunk/phase3/languages/LanguageConverter.php:r79653,79655,79706 |
Index: branches/REL1_17/phase3/RELEASE-NOTES |
— | — | @@ -236,6 +236,9 @@ |
237 | 237 | * (bug 16019) $wgArticlePath = "/$1" no longer breaks API edit/watch actions |
238 | 238 | * (bug 18372) File types blacklisted by $wgFileBlacklist will no longer be shown as "Permitted file types" on the upload form |
239 | 239 | * (bug 26540) Fixed wrong call to applyPatch in MysqlUpdater |
| 240 | +* (bug 26574) Added 'upload' to $wgRestrictionTypes, allowing upload protected |
| 241 | + pages to be queried via the API and Special:ProtectedPages, and allowing |
| 242 | + disabling upload protection by removing it from $wgRestrictionTypes. |
240 | 243 | |
241 | 244 | === Bug fixes in 1.17 === |
242 | 245 | * (bug 17560) Half-broken deletion moved image files to deletion archive |
Index: branches/REL1_17/phase3/resources/jquery.tipsy/jquery.tipsy.css |
— | — | @@ -21,6 +21,7 @@ |
22 | 22 | } |
23 | 23 | .tipsy-arrow { |
24 | 24 | position: absolute; |
| 25 | + /* @embed */ |
25 | 26 | background: url('images/tipsy.png') no-repeat top left; |
26 | 27 | width: 9px; |
27 | 28 | height: 5px; |