r81000 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r80999‎ | r81000 | r81001 >
Date:22:49, 25 January 2011
Author:catrope
Status:ok
Tags:
Comment:
Modified paths:
  • /branches/REL1_17/extensions/LiquidThreads/js/lqt.toolbar.js (modified) (history)
  • /branches/REL1_17/phase3/includes/User.php (modified) (history)
  • /branches/REL1_17/phase3/includes/ZhConversion.php (modified) (history)
  • /branches/REL1_17/phase3/includes/api/ApiQueryStashImageInfo.php (modified) (history)
  • /branches/REL1_17/phase3/includes/filerepo/FileRepo.php (modified) (history)
  • /branches/REL1_17/phase3/includes/libs/JavaScriptDistiller.php (modified) (history)
  • /branches/REL1_17/phase3/includes/resourceloader/ResourceLoader.php (modified) (history)
  • /branches/REL1_17/phase3/includes/specials/SpecialUploadStash.php (modified) (history)
  • /branches/REL1_17/phase3/includes/upload/UploadBase.php (modified) (history)
  • /branches/REL1_17/phase3/includes/upload/UploadStash.php (modified) (history)
  • /branches/REL1_17/phase3/includes/zhtable/toSimp.manual (modified) (history)
  • /branches/REL1_17/phase3/includes/zhtable/toTrad.manual (modified) (history)
  • /branches/REL1_17/phase3/includes/zhtable/tradphrases.manual (modified) (history)
  • /branches/REL1_17/phase3/includes/zhtable/tradphrases_exclude.manual (modified) (history)
  • /branches/REL1_17/phase3/resources/jquery/jquery.textSelection.js (modified) (history)
  • /branches/REL1_17/phase3/resources/mediawiki.action/mediawiki.action.edit.js (modified) (history)
  • /branches/REL1_17/phase3/resources/mediawiki.util/mediawiki.util.js (modified) (history)
  • /branches/REL1_17/phase3/resources/mediawiki.util/mediawiki.util.test.js (modified) (history)

Diff [purge]

Index: branches/REL1_17/extensions/LiquidThreads/js/lqt.toolbar.js
@@ -1339,7 +1339,7 @@
13401340 'wikieditor-toolbar-tool-link-cancel': function() {
13411341 // Clear any saved selection state
13421342 var context = $j(this).data( 'context' );
1343 - context.fn.restoreStuffForIE();
 1343+ context.fn.restoreSelection();
13441344 $j(this).dialog( 'close' );
13451345 }
13461346 },
@@ -1352,8 +1352,8 @@
13531353 // Pre-fill the text fields based on the current selection
13541354 var context = $j(this).data( 'context' );
13551355 // Restore and immediately save selection state, needed for inserting stuff later
1356 - context.fn.restoreStuffForIE();
1357 - context.fn.saveStuffForIE();
 1356+ context.fn.restoreSelection();
 1357+ context.fn.saveSelection();
13581358 var selection = context.$textarea.textSelection( 'getSelection' );
13591359 $j( '#wikieditor-toolbar-link-int-target' ).focus();
13601360 // Trigger the change event, so the link status indicator is up to date
@@ -1486,7 +1486,7 @@
14871487 'wikieditor-toolbar-tool-reference-cancel': function() {
14881488 // Clear any saved selection state
14891489 var context = $j( this ).data( 'context' );
1490 - context.fn.restoreStuffForIE();
 1490+ context.fn.restoreSelection();
14911491 $j( this ).dialog( 'close' );
14921492 }
14931493 },
@@ -1494,8 +1494,8 @@
14951495 // Pre-fill the text fields based on the current selection
14961496 var context = $j(this).data( 'context' );
14971497 // Restore and immediately save selection state, needed for inserting stuff later
1498 - context.fn.restoreStuffForIE();
1499 - context.fn.saveStuffForIE();
 1498+ context.fn.restoreSelection();
 1499+ context.fn.saveSelection();
15001500 var selection = context.$textarea.textSelection( 'getSelection' );
15011501 // set focus
15021502 $j( '#wikieditor-toolbar-reference-text' ).focus();
Index: branches/REL1_17/phase3/includes/upload/UploadBase.php
@@ -627,7 +627,7 @@
628628 * @return File: stashed file
629629 */
630630 public function stashSessionFile( $key = null ) {
631 - $stash = new UploadStash();
 631+ $stash = RepoGroup::singleton()->getLocalRepo()->getUploadStash();;
632632 $data = array(
633633 'mFileProps' => $this->mFileProps
634634 );
Property changes on: branches/REL1_17/phase3/includes/upload/UploadBase.php
___________________________________________________________________
Modified: svn:mergeinfo
635635 Merged /trunk/phase3/includes/upload/UploadBase.php:r80576,80583,80656,80842,80900,80913,80918-80920,80973-80974,80979,80993
Index: branches/REL1_17/phase3/includes/upload/UploadStash.php
@@ -33,12 +33,9 @@
3434 *
3535 * @param $repo FileRepo: optional -- repo in which to store files. Will choose LocalRepo if not supplied.
3636 */
37 - public function __construct( $repo = null ) {
 37+ public function __construct( $repo ) {
3838
39 - if ( is_null( $repo ) ) {
40 - $repo = RepoGroup::singleton()->getLocalRepo();
41 - }
42 -
 39+ // this might change based on wiki's configuration.
4340 $this->repo = $repo;
4441
4542 if ( ! isset( $_SESSION ) ) {
Property changes on: branches/REL1_17/phase3/includes/upload/UploadStash.php
___________________________________________________________________
Modified: svn:mergeinfo
4643 Merged /trunk/phase3/includes/upload/UploadStash.php:r80576,80583,80656,80842,80900,80913,80918-80920,80973-80974,80979,80993
Index: branches/REL1_17/phase3/includes/User.php
@@ -638,14 +638,28 @@
639639 /**
640640 * Does a string look like an e-mail address?
641641 *
642 - * There used to be a regular expression here, it got removed because it
643 - * rejected valid addresses. Actually just check if there is '@' somewhere
644 - * in the given address.
 642+ * This validates an email address using an HTML5 specification found at:
 643+ * http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#valid-e-mail-address
 644+ * Which as of 2011-01-24 says:
645645 *
646 - * @todo Check for RFC 2822 compilance (bug 959)
 646+ * A valid e-mail address is a string that matches the ABNF production
 647+ * 1*( atext / "." ) "@" ldh-str *( "." ldh-str ) where atext is defined
 648+ * in RFC 5322 section 3.2.3, and ldh-str is defined in RFC 1034 section
 649+ * 3.5.
647650 *
648 - * @param $addr \string E-mail address
649 - * @return \bool True or false
 651+ * This function is an implementation of the specification as requested in
 652+ * bug 22449.
 653+ *
 654+ * Client-side forms will use the same standard validation rules via JS or
 655+ * HTML 5 validation; additional restrictions can be enforced server-side
 656+ * by extensions via the 'isValidEmailAddr' hook.
 657+ *
 658+ * Note that this validation doesn't 100% match RFC 2822, but is believed
 659+ * to be liberal enough for wide use. Some invalid addresses will still
 660+ * pass validation here.
 661+ *
 662+ * @param $addr String E-mail address
 663+ * @return Bool
650664 */
651665 public static function isValidEmailAddr( $addr ) {
652666 $result = null;
Index: branches/REL1_17/phase3/includes/filerepo/FileRepo.php
@@ -695,4 +695,11 @@
696696 array_unshift( $args, 'filerepo', $this->getName() );
697697 return call_user_func_array( 'wfMemcKey', $args );
698698 }
 699+
 700+ /**
 701+ * Get an UploadStash associated with this repo.
 702+ */
 703+ function getUploadStash() {
 704+ return new UploadStash( $this );
 705+ }
699706 }
Index: branches/REL1_17/phase3/includes/api/ApiQueryStashImageInfo.php
@@ -42,7 +42,7 @@
4343 $result = $this->getResult();
4444
4545 try {
46 - $stash = new UploadStash();
 46+ $stash = RepoGroup::singleton()->getLocalRepo()->getUploadStash();
4747
4848 foreach ( $params['sessionkey'] as $sessionkey ) {
4949 $file = $stash->getFile( $sessionkey );
Index: branches/REL1_17/phase3/includes/resourceloader/ResourceLoader.php
@@ -333,14 +333,15 @@
334334
335335 wfProfileIn( __METHOD__.'-getModifiedTime' );
336336
 337+ $private = false;
337338 // To send Last-Modified and support If-Modified-Since, we need to detect
338339 // the last modified time
339340 $mtime = wfTimestamp( TS_UNIX, $wgCacheEpoch );
340341 foreach ( $modules as $module ) {
341342 try {
342 - // Bypass squid cache if the request includes any private modules
 343+ // Bypass Squid and other shared caches if the request includes any private modules
343344 if ( $module->getGroup() === 'private' ) {
344 - $smaxage = 0;
 345+ $private = true;
345346 }
346347 // Calculate maximum modified time
347348 $mtime = max( $mtime, $module->getModifiedTime( $context ) );
@@ -359,10 +360,18 @@
360361 }
361362 header( 'Last-Modified: ' . wfTimestamp( TS_RFC2822, $mtime ) );
362363 if ( $context->getDebug() ) {
363 - header( 'Cache-Control: must-revalidate' );
 364+ // Do not cache debug responses
 365+ header( 'Cache-Control: private, no-cache, must-revalidate' );
 366+ header( 'Pragma: no-cache' );
364367 } else {
365 - header( "Cache-Control: public, max-age=$maxage, s-maxage=$smaxage" );
366 - header( 'Expires: ' . wfTimestamp( TS_RFC2822, min( $maxage, $smaxage ) + time() ) );
 368+ if ( $private ) {
 369+ header( "Cache-Control: private, max-age=$maxage" );
 370+ $exp = $maxage;
 371+ } else {
 372+ header( "Cache-Control: public, max-age=$maxage, s-maxage=$smaxage" );
 373+ $exp = min( $maxage, $smaxage );
 374+ }
 375+ header( 'Expires: ' . wfTimestamp( TS_RFC2822, $exp + time() ) );
367376 }
368377
369378 // If there's an If-Modified-Since header, respond with a 304 appropriately
Property changes on: branches/REL1_17/phase3/includes/resourceloader/ResourceLoader.php
___________________________________________________________________
Modified: svn:mergeinfo
370379 Merged /trunk/phase3/includes/resourceloader/ResourceLoader.php:r80576,80583,80842,80900,80913,80918-80920,80973-80974,80979,80993
Index: branches/REL1_17/phase3/includes/libs/JavaScriptDistiller.php
@@ -19,7 +19,6 @@
2020 * @param $stripVerticalSpace Boolean: Try to remove as much vertical whitespace as possible
2121 */
2222 public static function stripWhiteSpace( $script, $stripVerticalSpace = false ) {
23 - $script = self::stripComments( $script );
2423 $script = self::stripHorizontalSpace( $script );
2524 // If requested, make some vertical whitespace collapsing as well
2625 if ( $collapseVertical ) {
@@ -29,15 +28,6 @@
3029 return $script;
3130 }
3231
33 - private static function stripComments( $script ) {
34 - $parser = self::createParser();
35 - // Remove comments
36 - $parser->add( '/\\/\\/[^\\r\\n]*[\\r\\n]/' );
37 - $parser->add( '/\\/\\*[^*]*\\*+([^\\/][^*]*\\*+)*\\//' );
38 - // Execute and return
39 - return $parser->exec( $script );
40 - }
41 -
4232 private static function stripHorizontalSpace( $script ) {
4333 $parser = self::createParser();
4434 // Collapse horizontal whitespaces between variable names into a single space
@@ -92,6 +82,9 @@
9383 // Protect regular expressions
9484 $parser->add( '/[ \\t]+(\\/[^\\/\\r\\n\\*][^\\/\\r\\n]*\\/g?i?)/', '$2' );
9585 $parser->add( '/[^\\w\\$\\/\'"*)\\?:]\\/[^\\/\\r\\n\\*][^\\/\\r\\n]*\\/g?i?/', '$1' );
 86+ // Remove comments
 87+ $parser->add( '/\\/\\*(.|[\\r\\n])*?\\*\\//' );
 88+ $parser->add( '/\\/\\/[^\\r\\n]*[\\r\\n]/' );
9689 return $parser;
9790 }
9891 }
Index: branches/REL1_17/phase3/includes/specials/SpecialUploadStash.php
@@ -41,7 +41,7 @@
4242
4343 parent::__construct( 'UploadStash', 'upload' );
4444 try {
45 - $this->stash = new UploadStash( );
 45+ $this->stash = RepoGroup::singleton()->getLocalRepo()->getUploadStash();
4646 } catch ( UploadStashNotAvailableException $e ) {
4747 return null;
4848 }
Property changes on: branches/REL1_17/phase3/includes/specials/SpecialUploadStash.php
___________________________________________________________________
Modified: svn:mergeinfo
4949 Merged /trunk/phase3/includes/specials/SpecialUploadStash.php:r80576,80583,80656,80842,80900,80913,80918-80920,80973-80974,80979,80993
Index: branches/REL1_17/phase3/includes/zhtable/toSimp.manual
@@ -158,4 +158,5 @@
159159 標誌著 标志着
160160 近角聪信 近角聪信
161161 修鍊 修炼
162 -米泽瑠美 米泽瑠美
\ No newline at end of file
 162+米泽瑠美 米泽瑠美
 163+太閤 太阁
Index: branches/REL1_17/phase3/includes/zhtable/tradphrases.manual
@@ -73,6 +73,7 @@
7474 多只是
7575 多只需
7676 多只會
 77+多只用
7778 大只能
7879 大只可
7980 大只在
@@ -915,6 +916,7 @@
916917 國歷代
917918 國歷任
918919 國歷屆
 920+國歷經
919921 新歷史
920922 夏歷史
921923 百花曆
@@ -4180,6 +4182,8 @@
41814183 千周後
41824184 萬周後
41834185 億周後
 4186+幾周後
 4187+多周後
41844188 前往
41854189 后瑞站
41864190 帝后臺
@@ -4193,7 +4197,6 @@
41944198 于立成
41954199 山谷道
41964200 李志喜
4197 -
41984201 于欣
41994202 于少保
42004203 于海
@@ -4221,3 +4224,36 @@
42224225 划算
42234226 總裁制
42244227 恒生
 4228+嚴云農
 4229+手裏劍
 4230+秦莊襄王
 4231+伊東怜
 4232+衛後莊公
 4233+餘量
 4234+並行
 4235+郁郁青青
 4236+協防
 4237+對表格
 4238+對表示
 4239+對表達
 4240+對表演
 4241+對表明
 4242+了然後
 4243+戴表元
 4244+張樂于張徐
 4245+余力為
 4246+葉叶琴
 4247+万俟
 4248+幾個
 4249+澀谷區
 4250+協調
 4251+選手
 4252+併發症
 4253+併發重症
 4254+併發模式
 4255+併發型模式
 4256+金色長髮
 4257+紅色長髮
 4258+一頭長髮
 4259+的長髮
 4260+黑色長髮
Index: branches/REL1_17/phase3/includes/zhtable/tradphrases_exclude.manual
@@ -326,3 +326,4 @@
327327 殺虫藥
328328 好家伙
329329 姦污
 330+併發
Index: branches/REL1_17/phase3/includes/zhtable/toTrad.manual
@@ -179,3 +179,4 @@
180180 黎吉雲 黎吉雲
181181 于飛島 于飛島
182182 鄉愿 鄉愿
 183+奇迹 奇蹟
Index: branches/REL1_17/phase3/includes/ZhConversion.php
@@ -2870,6 +2870,7 @@
28712871 '一锅面' => '一鍋麵',
28722872 '一只' => '一隻',
28732873 '一面食' => '一面食',
 2874+'一头长发' => '一頭長髮',
28742875 '一余' => '一餘',
28752876 '一发千钧' => '一髮千鈞',
28762877 '一哄而散' => '一鬨而散',
@@ -3013,6 +3014,7 @@
30143015 '并发布' => '並發布',
30153016 '并发现' => '並發現',
30163017 '并发表' => '並發表',
 3018+'并行' => '並行',
30173019 '中国国际信托投资公司' => '中國國際信托投資公司',
30183020 '中型钟' => '中型鐘',
30193021 '中型钟表面' => '中型鐘表面',
@@ -3236,6 +3238,7 @@
32373239 '乱哄' => '亂鬨',
32383240 '乱哄不过来' => '亂鬨不過來',
32393241 '了克制' => '了剋制',
 3242+'了然后' => '了然後',
32403243 '事情干脆' => '事情干脆',
32413244 '事有斗巧' => '事有鬥巧',
32423245 '事迹' => '事迹',
@@ -3542,6 +3545,7 @@
35433546 '伊斯兰教历史' => '伊斯蘭教歷史',
35443547 '伊斯兰历' => '伊斯蘭曆',
35453548 '伊斯兰历史' => '伊斯蘭歷史',
 3549+'伊东怜' => '伊東怜',
35463550 '伊尔汗历表' => '伊爾汗曆表',
35473551 '伊达里子' => '伊達里子',
35483552 '伊适杰' => '伊適杰',
@@ -3814,6 +3818,8 @@
38153819 '余三勝' => '余三勝',
38163820 '余光中' => '余光中',
38173821 '余光生' => '余光生',
 3822+'余力為' => '余力為',
 3823+'余力为' => '余力為',
38183824 '余姓' => '余姓',
38193825 '余威德' => '余威德',
38203826 '余子明' => '余子明',
@@ -3847,7 +3853,10 @@
38483854 '并产' => '併產',
38493855 '并当' => '併當',
38503856 '并叠' => '併疊',
3851 -'并发' => '併發',
 3857+'并发型模式' => '併發型模式',
 3858+'并发模式' => '併發模式',
 3859+'并发症' => '併發症',
 3860+'并发重症' => '併發重症',
38523861 '并科' => '併科',
38533862 '并网' => '併網',
38543863 '并线' => '併線',
@@ -4314,6 +4323,8 @@
43154324 '半只够' => '半只夠',
43164325 '半于' => '半於',
43174326 '半只' => '半隻',
 4327+'协调' => '協調',
 4328+'协防' => '協防',
43184329 '南京钟' => '南京鐘',
43194330 '南京钟表' => '南京鐘錶',
43204331 '南宫适' => '南宮适',
@@ -4591,6 +4602,7 @@
45924603 '向往' => '嚮往',
45934604 '向应' => '嚮應',
45944605 '向迩' => '嚮邇',
 4606+'严云农' => '嚴云農',
45954607 '严于' => '嚴於',
45964608 '严丝合缝' => '嚴絲合縫',
45974609 '嚼谷' => '嚼穀',
@@ -4646,6 +4658,7 @@
46474659 '国历任' => '國歷任',
46484660 '国历史' => '國歷史',
46494661 '国历届' => '國歷屆',
 4662+'国历经' => '國歷經',
46504663 '国仇' => '國讎',
46514664 '园里' => '園裡',
46524665 '园游会' => '園遊會',
@@ -4685,8 +4698,8 @@
46864699 '埋头寻钟表' => '埋頭尋鐘錶',
46874700 '城里' => '城裡',
46884701 '埔裡社撫墾局' => '埔裏社撫墾局',
 4702+'埔裏社撫墾局' => '埔裏社撫墾局',
46894703 '埔里社抚垦局' => '埔裏社撫墾局',
4690 -'埔裏社撫墾局' => '埔裏社撫墾局',
46914704 '基干' => '基幹',
46924705 '基于' => '基於',
46934706 '基准' => '基準',
@@ -4730,8 +4743,10 @@
47314744 '多只會' => '多只會',
47324745 '多只会' => '多只會',
47334746 '多只有' => '多只有',
 4747+'多只用' => '多只用',
47344748 '多只能' => '多只能',
47354749 '多只需' => '多只需',
 4750+'多周后' => '多周後',
47364751 '多天后' => '多天後',
47374752 '多于' => '多於',
47384753 '多冲' => '多衝',
@@ -4827,7 +4842,7 @@
48284843 '夸诞' => '夸誕',
48294844 '夸诞不经' => '夸誕不經',
48304845 '夸丽' => '夸麗',
4831 -'奇迹' => '奇迹',
 4846+'奇迹' => '奇蹟',
48324847 '奇丑' => '奇醜',
48334848 '奏折' => '奏摺',
48344849 '奥占' => '奧佔',
@@ -4971,8 +4986,10 @@
49724987 '对表中' => '對表中',
49734988 '对表扬' => '對表揚',
49744989 '对表明' => '對表明',
 4990+'对表格' => '對表格',
49754991 '对表演' => '對表演',
49764992 '对表现' => '對表現',
 4993+'对表示' => '對表示',
49774994 '对表达' => '對表達',
49784995 '对表' => '對錶',
49794996 '导游' => '導遊',
@@ -5102,7 +5119,6 @@
51035120 '并吞' => '并吞',
51045121 '并州' => '并州',
51055122 '并日而食' => '并日而食',
5106 -'并行' => '并行',
51075123 '并迭' => '并迭',
51085124 '幸免于难' => '幸免於難',
51095125 '幸于' => '幸於',
@@ -5162,6 +5178,8 @@
51635179 '干革命' => '幹革命',
51645180 '干头' => '幹頭',
51655181 '干么' => '幹麼',
 5182+'几个' => '幾個',
 5183+'几周后' => '幾周後',
51665184 '几天后' => '幾天後',
51675185 '几只' => '幾隻',
51685186 '几出' => '幾齣',
@@ -5250,6 +5268,7 @@
52515269 '张三丰' => '張三丰',
52525270 '張三丰' => '張三丰',
52535271 '张勋' => '張勳',
 5272+'张乐于张徐' => '張樂于張徐',
52545273 '强占' => '強佔',
52555274 '强制作用' => '強制作用',
52565275 '强奸' => '強姦',
@@ -5576,6 +5595,7 @@
55775596 '战斗' => '戰鬥',
55785597 '戏彩娱亲' => '戲綵娛親',
55795598 '戏里' => '戲裡',
 5599+'戴表元' => '戴表元',
55805600 '戴表' => '戴錶',
55815601 '戴发含齿' => '戴髮含齒',
55825602 '房里' => '房裡',
@@ -5599,6 +5619,7 @@
56005620 '手表达' => '手表達',
56015621 '手表露' => '手表露',
56025622 '手表面' => '手表面',
 5623+'手里剑' => '手裏劍',
56035624 '手里' => '手裡',
56045625 '手表' => '手錶',
56055626 '手松' => '手鬆',
@@ -6705,6 +6726,7 @@
67066727 '潭里' => '潭裡',
67076728 '潮涌' => '潮湧',
67086729 '溃于' => '潰於',
 6730+'涩谷区' => '澀谷區',
67096731 '澄澹精致' => '澄澹精致',
67106732 '澒蒙' => '澒濛',
67116733 '泽渗漓而下降' => '澤滲灕而下降',
@@ -6999,6 +7021,7 @@
70007022 '的克制' => '的剋制',
70017023 '的钟' => '的鐘',
70027024 '的钟表' => '的鐘錶',
 7025+'的长发' => '的長髮',
70037026 '皆可作淀' => '皆可作澱',
70047027 '皆准' => '皆準',
70057028 '皇后' => '皇后',
@@ -7161,6 +7184,7 @@
71627185 '秒表示' => '秒表示',
71637186 '秒表' => '秒錶',
71647187 '秒钟' => '秒鐘',
 7188+'秦庄襄王' => '秦莊襄王',
71657189 '移祸于' => '移禍於',
71667190 '稀松' => '稀鬆',
71677191 '棱台' => '稜台',
@@ -7337,6 +7361,7 @@
73387362 '纪历史' => '紀歷史',
73397363 '约占' => '約佔',
73407364 '红绳系足' => '紅繩繫足',
 7365+'红色长发' => '紅色長髮',
73417366 '红钟' => '紅鐘',
73427367 '红霉素' => '紅霉素',
73437368 '红发' => '紅髮',
@@ -7755,6 +7780,7 @@
77567781 '万余' => '萬餘',
77577782 '落腮胡' => '落腮鬍',
77587783 '落发' => '落髮',
 7784+'叶叶琴' => '葉叶琴',
77597785 '叶叶琹' => '葉叶琹',
77607786 '着儿' => '著兒',
77617787 '着克制' => '著剋制',
@@ -7935,6 +7961,7 @@
79367962 '行于' => '行於',
79377963 '行百里者半于九十' => '行百里者半於九十',
79387964 '胡同' => '衚衕',
 7965+'卫后庄公' => '衛後莊公',
79397966 '卫星钟' => '衛星鐘',
79407967 '冲上' => '衝上',
79417968 '冲下' => '衝下',
@@ -8531,6 +8558,7 @@
85328559 '遨游' => '遨遊',
85338560 '遮丑' => '遮醜',
85348561 '迁于' => '遷於',
 8562+'选手' => '選手',
85358563 '选手表明' => '選手表明',
85368564 '选手表决' => '選手表決',
85378565 '选手表现' => '選手表現',
@@ -8556,6 +8584,7 @@
85578585 '邱于庭' => '邱于庭',
85588586 '郁朴' => '郁樸',
85598587 '郁郁菲菲' => '郁郁菲菲',
 8588+'郁郁青青' => '郁郁青青',
85608589 '郊游' => '郊遊',
85618590 '郘钟' => '郘鐘',
85628591 '部落发' => '部落發',
@@ -8665,6 +8694,7 @@
86668695 '金仑溪' => '金崙溪',
86678696 '金布道' => '金布道',
86688697 '金范' => '金範',
 8698+'金色长发' => '金色長髮',
86698699 '金表情' => '金表情',
86708700 '金表态' => '金表態',
86718701 '金表扬' => '金表揚',
@@ -9177,6 +9207,7 @@
91789208 '余辉' => '餘輝',
91799209 '余辜' => '餘辜',
91809210 '余酲' => '餘酲',
 9211+'余量' => '餘量',
91819212 '余闰' => '餘閏',
91829213 '余闲' => '餘閒',
91839214 '余零' => '餘零',
@@ -9603,6 +9634,7 @@
96049635 '黎吉云' => '黎吉雲',
96059636 '黎吉雲' => '黎吉雲',
96069637 '黑奴吁天录' => '黑奴籲天錄',
 9638+'黑色长发' => '黑色長髮',
96079639 '黑发' => '黑髮',
96089640 '点半钟' => '點半鐘',
96099641 '点多钟' => '點多鐘',
@@ -13460,6 +13492,7 @@
1346113493 '覆核' => '复核',
1346213494 '天道为乾' => '天道为乾',
1346313495 '天道為乾' => '天道为乾',
 13496+'太閤' => '太阁',
1346413497 '夾著' => '夹着',
1346513498 '夾著書' => '夹著书',
1346613499 '夾著作' => '夹著作',
Index: branches/REL1_17/phase3/resources/jquery/jquery.textSelection.js
@@ -92,7 +92,7 @@
9393 // IE
9494 $(this).focus();
9595 if ( context ) {
96 - context.fn.restoreStuffForIE();
 96+ context.fn.restoreCursorAndScrollTop();
9797 }
9898 var selText = $(this).textSelection( 'getSelection' );
9999 var scrollTop = this.scrollTop;
Index: branches/REL1_17/phase3/resources/mediawiki.action/mediawiki.action.edit.js
@@ -2,28 +2,29 @@
33 * has not been jQuery-ized.
44 */
55
6 -//make sure edit summary does not exceed byte limit
7 -$( '#wpSummary' ).attr( 'maxLength', 250 ).keypress( function( e ) {
8 - // first check to see if this is actually a character key
9 - // being pressed.
10 - // Based on key-event info from http://unixpapa.com/js/key.html
11 - // JQuery should also normalize e.which to be consistent cross-browser,
12 - // however the same check is still needed regardless of jQuery.
 6+(function( $ ) {
 7+ //make sure edit summary does not exceed byte limit
 8+ $( '#wpSummary' ).attr( 'maxLength', 250 ).keypress( function( e ) {
 9+ // first check to see if this is actually a character key
 10+ // being pressed.
 11+ // Based on key-event info from http://unixpapa.com/js/key.html
 12+ // JQuery should also normalize e.which to be consistent cross-browser,
 13+ // however the same check is still needed regardless of jQuery.
1314
14 - if ( e.which === 0 || e.charCode === 0 || e.ctrlKey || e.altKey || e.metaKey ) {
15 - return true; //a special key (backspace, etc) so don't interfere.
16 - }
 15+ if ( e.which === 0 || e.charCode === 0 || e.ctrlKey || e.altKey || e.metaKey ) {
 16+ return true; //a special key (backspace, etc) so don't interfere.
 17+ }
1718
18 - // This basically figures out how many bytes a UTF-16 string (which is what js sees)
19 - // will take in UTF-8 by replacing a 2 byte character with 2 *'s, etc, and counting that.
20 - // Note, surrogate (\uD800-\uDFFF) characters are counted as 2 bytes, since there's two of them
21 - // and the actual character takes 4 bytes in UTF-8 (2*2=4). Might not work perfectly in edge cases
22 - // such as illegal sequences, but that should never happen.
 19+ // This basically figures out how many bytes a UTF-16 string (which is what js sees)
 20+ // will take in UTF-8 by replacing a 2 byte character with 2 *'s, etc, and counting that.
 21+ // Note, surrogate (\uD800-\uDFFF) characters are counted as 2 bytes, since there's two of them
 22+ // and the actual character takes 4 bytes in UTF-8 (2*2=4). Might not work perfectly in edge cases
 23+ // such as illegal sequences, but that should never happen.
2324
24 - var len = this.value.replace( /[\u0080-\u07FF\uD800-\uDFFF]/g, '**' ).replace( /[\u0800-\uD7FF\uE000-\uFFFF]/g, '***' ).length;
25 - //247 as this doesn't count character about to be inserted.
26 - if ( len > 247 ) {
27 - e.preventDefault();
28 - }
29 -});
30 -
 25+ var len = this.value.replace( /[\u0080-\u07FF\uD800-\uDFFF]/g, '**' ).replace( /[\u0800-\uD7FF\uE000-\uFFFF]/g, '***' ).length;
 26+ //247 as this doesn't count character about to be inserted.
 27+ if ( len > 247 ) {
 28+ e.preventDefault();
 29+ }
 30+ });
 31+})(jQuery);
Property changes on: branches/REL1_17/phase3/resources/mediawiki.action/mediawiki.action.edit.js
___________________________________________________________________
Deleted: svn:mergeinfo
3132 Reverse-merged /branches/new-installer/phase3/resources/mediawiki.action/mediawiki.action.edit.js:r43664-66004
3233 Reverse-merged /branches/REL1_15/phase3/resources/mediawiki.action/mediawiki.action.edit.js:r51646
3334 Reverse-merged /branches/sqlite/resources/mediawiki.action/mediawiki.action.edit.js:r58211-58321
Index: branches/REL1_17/phase3/resources/mediawiki.util/mediawiki.util.test.js
@@ -1,7 +1,7 @@
22 /**
33 * mediaWiki.util Test Suite
44 *
5 - * Available on "/Special:BlankPage?action=mwutiltest&debug=true")
 5+ * Available on Special:BlankPage?action=mwutiltest&debug=true
66 *
77 * @author Krinkle <krinklemail@gmail.com>
88 */
@@ -120,6 +120,8 @@
121121 '<hr/> (string)');
122122 mw.test.addTest('mw.html.element( \'img\', { \'src\': \'http://mw.org/?title=Main page&action=edit\' } )',
123123 '<img src="http://mw.org/?title=Main page&amp;action=edit"/> (string)');
 124+ // Try to roughly keep the order similar to the order in the files
 125+ // or alphabetical (depending on the context)
124126
125127 // Run tests and compare results
126128 var exec,
@@ -167,4 +169,4 @@
168170
169171 mediaWiki.test.init();
170172
171 -})(jQuery, mediaWiki);
 173+} )(jQuery, mediaWiki);
Index: branches/REL1_17/phase3/resources/mediawiki.util/mediawiki.util.js
@@ -379,8 +379,8 @@
380380 // Domain first part
381381 '[' + rfc1034_ldh_str + ']+'
382382 +
383 - // Second part and following are separated by a dot
384 - '(?:\\.[' + rfc1034_ldh_str + ']+)+'
 383+ // Optional second part and following are separated by a dot
 384+ '(?:\\.[' + rfc1034_ldh_str + ']+)*'
385385 +
386386 // End of string
387387 '$',

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r80576Followup r80554, r80575: wrap in (function( $ ) { ... })(jQuery);catrope17:50, 19 January 2011
r80583Followup r73686: make private modules really private (i.e. Cache-Control: pri...catrope19:31, 19 January 2011
r80656Resolved bug 26791 by replacing JSMin with a new library called JavaScriptDis...tparscal21:57, 20 January 2011
r80842(bug 26827) Fix JS error on IE caused by the rename of {save,restore}StuffFor...catrope02:58, 24 January 2011
r80900Resolves issue in r80656 where escaped quotes within strings are not handled ...tparscal19:47, 24 January 2011
r80913User::isValidEmailAddr comment update...hashar20:31, 24 January 2011
r80918Email validation for @localhost address + tests...hashar21:13, 24 January 2011
r80919Tweak comments on User::isValidEmailAddr to replace the old @todo for RFC 282...brion21:18, 24 January 2011
r80920moving tests to the mediawiki.util section + note about orderkrinkle21:22, 24 January 2011
r80973Update Chinese conversion tables.philip17:23, 25 January 2011
r80974Follow r80973, fix a tiny error.philip17:28, 25 January 2011
r80979Resolves bug 26931, where comments were not only not being properly stripped ...tparscal19:00, 25 January 2011
r80993Make the UploadStash repo specific by creating FileRepo::getUploadStash(). In...btongminh21:26, 25 January 2011

Status & tagging log