Index: branches/REL1_18/extensions/UploadWizard/resources/mw.UploadWizard.js |
— | — | @@ -358,11 +358,20 @@ |
359 | 359 | this.imageinfo.metadata.orientation = meta.tiff.Orientation.value; |
360 | 360 | } |
361 | 361 | if ( meta.general ) { |
| 362 | + var pixelHeightDim = 'height'; |
| 363 | + var pixelWidthDim = 'width'; |
| 364 | + // this must be called after orientation is set above. If no orientation set, defaults to 0 |
| 365 | + var degrees = this.getOrientationDegrees(); |
| 366 | + // jpegmeta reports pixelHeight & width |
| 367 | + if ( degrees == 90 || degrees == 270 ) { |
| 368 | + pixelHeightDim = 'width'; |
| 369 | + pixelWidthDim = 'height'; |
| 370 | + } |
362 | 371 | if ( meta.general.pixelHeight ) { |
363 | | - this.imageinfo.height = meta.general.pixelHeight.value; |
| 372 | + this.imageinfo[pixelHeightDim] = meta.general.pixelHeight.value; |
364 | 373 | } |
365 | 374 | if ( meta.general.pixelWidth ) { |
366 | | - this.imageinfo.width = meta.general.pixelWidth.value; |
| 375 | + this.imageinfo[pixelWidthDim] = meta.general.pixelWidth.value; |
367 | 376 | } |
368 | 377 | } |
369 | 378 | } |
Index: branches/REL1_18/extensions/WikimediaMessages/WikimediaMessages.php |
— | — | @@ -37,7 +37,7 @@ |
38 | 38 | } |
39 | 39 | |
40 | 40 | function efWikimediaEditPageCopyrightWarning( $title, &$msg ) { |
41 | | - $msg = 'wikimedia-copyrightwarning'; |
| 41 | + $msg = array( 'wikimedia-copyrightwarning' ); |
42 | 42 | return true; |
43 | 43 | } |
44 | 44 | |
Index: branches/REL1_18/extensions/TitleBlacklist/TitleBlacklist.hooks.php |
— | — | @@ -80,11 +80,10 @@ |
81 | 81 | * |
82 | 82 | * @return bool Acceptable |
83 | 83 | */ |
84 | | - private static function acceptNewUserName( $userName, &$err, $override = true ) { |
85 | | - global $wgTitleBlacklist, $wgUser; |
86 | | - efInitTitleBlacklist(); |
| 84 | + private static function acceptNewUserName( $userName, $permissionsUser, &$err, $override = true ) { |
87 | 85 | $title = Title::makeTitleSafe( NS_USER, $userName ); |
88 | | - $blacklisted = $wgTitleBlacklist->userCannot( $title, $wgUser, 'new-account', $override ); |
| 86 | + $blacklisted = TitleBlacklist::singleton()->userCannot( $title, $permissionsUser, |
| 87 | + 'new-account', $override ); |
89 | 88 | if( $blacklisted instanceof TitleBlacklistEntry ) { |
90 | 89 | $message = $blacklisted->getErrorMessage( 'new-account' ); |
91 | 90 | $err = wfMsgWikiHtml( $message, $blacklisted->getRaw(), $userName ); |
— | — | @@ -101,13 +100,15 @@ |
102 | 101 | public static function abortNewAccount( $user, &$message ) { |
103 | 102 | global $wgUser, $wgRequest; |
104 | 103 | $override = $wgRequest->getCheck( 'wpIgnoreTitleBlacklist' ); |
105 | | - return self::acceptNewUserName( $user->getName(), $message, $override ); |
| 104 | + return self::acceptNewUserName( $user->getName(), $wgUser, $message, $override ); |
106 | 105 | } |
107 | 106 | |
108 | 107 | /** CentralAuthAutoCreate hook */ |
109 | 108 | public static function centralAuthAutoCreate( $user, $userName ) { |
110 | 109 | $message = ''; # Will be ignored |
111 | | - return self::acceptNewUserName( $userName, $message ); |
| 110 | + $anon = new User; |
| 111 | + global $wgUser; |
| 112 | + return self::acceptNewUserName( $userName, $anon, $message ); |
112 | 113 | } |
113 | 114 | |
114 | 115 | /** EditFilter hook |
— | — | @@ -176,9 +177,9 @@ |
177 | 178 | |
178 | 179 | /** UserCreateForm hook based on the one from AntiSpoof extension */ |
179 | 180 | public static function addOverrideCheckbox( &$template ) { |
180 | | - global $wgRequest; |
| 181 | + global $wgRequest, $wgUser; |
181 | 182 | |
182 | | - if ( TitleBlacklist::userCanOverride( 'new-account' ) ) { |
| 183 | + if ( TitleBlacklist::userCanOverride( $wgUser, 'new-account' ) ) { |
183 | 184 | $template->addInputItem( 'wpIgnoreTitleBlacklist', |
184 | 185 | $wgRequest->getCheck( 'wpIgnoreTitleBlacklist' ), |
185 | 186 | 'checkbox', 'titleblacklist-override' ); |
Index: branches/REL1_18/extensions/TitleBlacklist/TitleBlacklist.list.php |
— | — | @@ -138,7 +138,7 @@ |
139 | 139 | * otherwise FALSE |
140 | 140 | */ |
141 | 141 | public function userCannot( $title, $user, $action = 'edit', $override = true ) { |
142 | | - if( $override && self::userCanOverride( $action ) ) |
| 142 | + if( $override && self::userCanOverride( $user, $action ) ) { |
143 | 143 | return false; |
144 | 144 | else |
145 | 145 | return $this->isBlacklisted( $title, $action ); |
— | — | @@ -266,10 +266,9 @@ |
267 | 267 | * |
268 | 268 | * @param $action Action |
269 | 269 | */ |
270 | | - public static function userCanOverride( $action ) { |
271 | | - global $wgUser; |
272 | | - return $wgUser->isAllowed( 'tboverride' ) || |
273 | | - ( $action == 'new-account' && $wgUser->isAllowed( 'tboverride-account' ) ); |
| 270 | + public static function userCanOverride( $user, $action ) { |
| 271 | + return $user->isAllowed( 'tboverride' ) || |
| 272 | + ( $action == 'new-account' && $user->isAllowed( 'tboverride-account' ) ); |
274 | 273 | } |
275 | 274 | } |
276 | 275 | |
Index: branches/REL1_18/extensions/FlaggedRevs/dataclasses/FlaggedRevs.class.php |
— | — | @@ -963,10 +963,10 @@ |
964 | 964 | # If this is an image page, store corresponding file info |
965 | 965 | $fileData = array( 'name' => null, 'timestamp' => null, 'sha1' => null ); |
966 | 966 | if ( $title->getNamespace() == NS_FILE ) { |
967 | | - # We must use ImagePage process cache on upload or get bitten by slave lag |
968 | | - $file = $article instanceof ImagePage |
969 | | - ? $article->getFile() |
970 | | - : wfFindFile( $title ); |
| 967 | + # We must use WikiFilePage process cache on upload or get bitten by slave lag |
| 968 | + $file = ( $article instanceof WikiFilePage || $article instanceof ImagePage ) |
| 969 | + ? $article->getFile() // uses up-to-date process cache on new uploads |
| 970 | + : wfFindFile( $title, array( 'bypassCache' => true ) ); // skip cache; bug 31056 |
971 | 971 | if ( is_object( $file ) && $file->exists() ) { |
972 | 972 | $fileData['name'] = $title->getDBkey(); |
973 | 973 | $fileData['timestamp'] = $file->getTimestamp(); |
Index: branches/REL1_18/extensions/WikiEditor/WikiEditor.php |
— | — | @@ -506,7 +506,6 @@ |
507 | 507 | 'scripts' => 'ext.wikiEditor.toolbar.hideSig.js', |
508 | 508 | 'dependencies' => array( |
509 | 509 | 'ext.wikiEditor', |
510 | | - 'ext.wikiEditor.toolbar', |
511 | 510 | ) |
512 | 511 | ), |
513 | 512 | ); |
Index: branches/REL1_18/extensions/Cite/SpecialCite.php |
— | — | @@ -59,17 +59,15 @@ |
60 | 60 | * @return bool |
61 | 61 | */ |
62 | 62 | function wfSpecialCiteToolbox( &$skin ) { |
63 | | - global $wgUser; |
64 | | - |
65 | 63 | if ( isset( $skin->data['nav_urls']['cite'] ) ) { |
66 | 64 | echo Html::rawElement( |
67 | 65 | 'li', |
68 | 66 | array( 'id' => 't-cite' ), |
69 | | - $skin->skin->link( |
| 67 | + Linker::link( |
70 | 68 | SpecialPage::getTitleFor( 'Cite' ), |
71 | 69 | wfMsg( 'cite_article_link' ), |
72 | 70 | # Used message keys: 'tooltip-cite-article', 'accesskey-cite-article' |
73 | | - $wgUser->getSkin()->tooltipAndAccessKeyAttribs( 'cite-article' ), |
| 71 | + Linker::tooltipAndAccessKeyAttribs( 'cite-article' ), |
74 | 72 | $skin->data['nav_urls']['cite']['args'] |
75 | 73 | ) |
76 | 74 | ); |