r22435 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r22434‎ | r22435 | r22436 >
Date:18:02, 25 May 2007
Author:brion
Status:old
Tags:
Comment:
Reverting r22430 for now; I don't really like this keyword creep, and even if I did the parameters on makeImageLinkObj are totally out of control.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Linker.php (modified) (history)
  • /trunk/phase3/includes/Parser.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Linker.php
@@ -414,7 +414,7 @@
415415
416416 /** @todo document */
417417 function makeImageLinkObj( $nt, $label, $alt, $align = '', $params = array(), $framed = false,
418 - $thumb = false, $manual_thumb = '', $valign = '', $upright = false, $upright_factor = 0, $border = false, $frameless = false )
 418+ $thumb = false, $manual_thumb = '', $valign = '', $upright = false, $upright_factor = 0, $border = false )
419419 {
420420 global $wgContLang, $wgUser, $wgThumbLimits, $wgThumbUpright;
421421
@@ -436,7 +436,7 @@
437437
438438 if ( !isset( $params['width'] ) ) {
439439 $params['width'] = $img->getWidth( $page );
440 - if( $thumb || $framed || $frameless ) {
 440+ if( $thumb || $framed ) {
441441 $wopt = $wgUser->getOption( 'thumbsize' );
442442
443443 if( !isset( $wgThumbLimits[$wopt] ) ) {
Index: trunk/phase3/includes/Parser.php
@@ -4412,7 +4412,6 @@
44134413 # * ___px scale to ___ pixels width, no aligning. e.g. use in taxobox
44144414 # * center center the image
44154415 # * framed Keep original image size, no magnify-button.
4416 - # * frameless like 'thumbnail' but without frame, enlarge-icon and caption. User preference thumb width is used
44174416 # * upright reduce width for upright images, rounded to full __0 px
44184417 # * border draw a 1px border around the image
44194418 # vertical-align values (no % or length right now):
@@ -4437,7 +4436,6 @@
44384437 $mwManualThumb =& MagicWord::get( 'img_manualthumb' );
44394438 $mwWidth =& MagicWord::get( 'img_width' );
44404439 $mwFramed =& MagicWord::get( 'img_framed' );
4441 - $mwFrameless =& MagicWord::get( 'img_frameless' );
44424440 $mwUpright =& MagicWord::get( 'img_upright' );
44434441 $mwBorder =& MagicWord::get( 'img_border' );
44444442 $mwPage =& MagicWord::get( 'img_page' );
@@ -4445,7 +4443,6 @@
44464444
44474445 $params = array();
44484446 $framed = $thumb = false;
4449 - $frameless = false;
44504447 $upright = false;
44514448 $upright_factor = 0;
44524449 $border = false;
@@ -4461,8 +4458,6 @@
44624459 $upright_factor = floatval( $match );
44634460 } elseif ( !is_null( $mwBorder->matchVariableStartToEnd( $val ) ) ) {
44644461 $border = true;
4465 - } elseif ( !is_null( $mwFrameless->matchVariableStartToEnd( $val ) ) ) {
4466 - $frameless = true;
44674462 } elseif ( ! is_null( $match = $mwManualThumb->matchVariableStartToEnd($val) ) ) {
44684463 # use manually specified thumbnail
44694464 $thumb=true;
@@ -4509,7 +4504,7 @@
45104505 $alt = Sanitizer::stripAllTags( $alt );
45114506
45124507 # Linker does the rest
4513 - return $sk->makeImageLinkObj( $nt, $caption, $alt, $align, $params, $framed, $thumb, $manual_thumb, $valign, $upright, $upright_factor, $border, $frameless );
 4508+ return $sk->makeImageLinkObj( $nt, $caption, $alt, $align, $params, $framed, $thumb, $manual_thumb, $valign, $upright, $upright_factor, $border );
45144509 }
45154510
45164511 /**
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -281,7 +281,6 @@
282282 'img_width' => array( 1, '$1px' ),
283283 'img_center' => array( 1, 'center', 'centre' ),
284284 'img_framed' => array( 1, 'framed', 'enframed', 'frame' ),
285 - 'img_frameless' => array( 1, 'frameless' ),
286285 'img_page' => array( 1, 'page=$1', 'page $1' ),
287286 'img_upright' => array( 1, 'upright', 'upright=$1', 'upright $1' ),
288287 'img_border' => array( 1, 'border' ),
Index: trunk/phase3/RELEASE-NOTES
@@ -34,15 +34,13 @@
3535 * (bug 9628) Show warnings about slave lag on Special:Contributions,
3636 Special:Watchlist
3737 * (bug 8818) Expose "wpDestFile" as parameter $1 to "uploaddisabledtext"
38 -* Introducing new image keyword 'upright' and corresponding variable
 38+* Introducing new image parameter 'upright' and corresponding variable
3939 $wgThumbUpright. This allows better proportional view of upright images
4040 related to landscape images on a page without nailing the width of upright
4141 images to a fix value which makes views for anon unproportional and user
4242 preferences useless
43 -* (bug 6072) Introducing 'border' keyword to the [[Image:]] syntax
44 -* Introducing 'frameless' keyword to [[Image:]] syntax which respects the
45 - user preferences for image width like 'thumb' but without a frame.
46 -
 43+* (bug 6072) Add a 'border' keyword to the image syntax
 44+
4745 == Bugfixes since 1.10 ==
4846
4947 * (bug 9712) Use Arabic comma in date/time formats for Arabic and Farsi

Follow-up revisions

RevisionCommit summaryAuthorDate
r22444Merged revisions 22413-22443 via svnmerge from...david00:06, 26 May 2007
r22511After revert of r22435 and talk with Brion on IRC previously introduced and n...raymond19:15, 28 May 2007
r22518Merged revisions 22484-22517 via svnmerge from...david22:22, 28 May 2007

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r22430Introducing 'frameless' keyword to [[Image:]] syntax which respects the user ...raymond16:32, 25 May 2007