[MediaWiki-CVS] SVN: [51783] trunk/phase3/languages/messages

2009-06-12 Thread shinjiman
Revision: 51783
Author:   shinjiman
Date: 2009-06-12 06:47:25 + (Fri, 12 Jun 2009)

Log Message:
---
Localisation updates Cantonese, Chinese and Literary Chinese

Modified Paths:
--
trunk/phase3/languages/messages/MessagesLzh.php
trunk/phase3/languages/messages/MessagesYue.php
trunk/phase3/languages/messages/MessagesZh_hans.php
trunk/phase3/languages/messages/MessagesZh_hant.php

Modified: trunk/phase3/languages/messages/MessagesLzh.php
===
--- trunk/phase3/languages/messages/MessagesLzh.php 2009-06-12 04:11:15 UTC 
(rev 51782)
+++ trunk/phase3/languages/messages/MessagesLzh.php 2009-06-12 06:47:25 UTC 
(rev 51783)
@@ -1066,7 +1066,7 @@
 'right-move-subpages' = '連遷子頁',
 'right-move-rootuserpages'= '遷根齋',
 'right-movefile'  = '遷檔',
-'right-suppressredirect'  = '遷頁時無增轉',
+'right-suppressredirect'  = '遷頁時無增源之轉',
 'right-upload'= '貢獻品物',
 'right-reupload'  = '蓋現之品物',
 'right-reupload-own'  = '蓋同簿之品物',

Modified: trunk/phase3/languages/messages/MessagesYue.php
===
--- trunk/phase3/languages/messages/MessagesYue.php 2009-06-12 04:11:15 UTC 
(rev 51782)
+++ trunk/phase3/languages/messages/MessagesYue.php 2009-06-12 06:47:25 UTC 
(rev 51783)
@@ -1224,7 +1224,7 @@
 'right-move-subpages' = '搬版同埋佢哋嘅細版',
 'right-move-rootuserpages'= '搬根用戶版',
 'right-movefile'  = '搬檔案',
-'right-suppressredirect'  = '搬版嗰陣唔開跳轉',
+'right-suppressredirect'  = '當搬版嗰陣唔開來源頁嘅跳轉',
 'right-upload'= '上載檔案',
 'right-reupload'  = '覆蓋現有嘅檔案',
 'right-reupload-own'  = '覆蓋由同一位上載嘅檔案',
@@ -1745,13 +1745,13 @@
 'listgrouprights-rights'   = '權',
 'listgrouprights-helppage' = 'Help:組權限',
 'listgrouprights-members'  = '(成員名單)',
-'listgrouprights-addgroup' = '可以加入嘅{{PLURAL:$2|一|多}}組: $1',
-'listgrouprights-removegroup'  = '可以拎走嘅{{PLURAL:$2|一|多}}組: $1',
-'listgrouprights-addgroup-all' = '可以加入全部組',
-'listgrouprights-removegroup-all'  = '可以拎走全部組',
-'listgrouprights-addgroup-self'= '可以加入嘅{{PLURAL:$2|一|多}}組到自己嘅戶口: $1',
-'listgrouprights-removegroup-self' = '可以響自己嘅戶口度拎走嘅{{PLURAL:$2|一|多}}組: $1',
-'listgrouprights-addgroup-self-all'= '可以加入全部組到自己嘅戶口度',
+'listgrouprights-addgroup' = '加入嘅{{PLURAL:$2|一|多}}組: $1',
+'listgrouprights-removegroup'  = '拎走嘅{{PLURAL:$2|一|多}}組: $1',
+'listgrouprights-addgroup-all' = '加入全部組',
+'listgrouprights-removegroup-all'  = '拎走全部組',
+'listgrouprights-addgroup-self'= '加入嘅{{PLURAL:$2|一|多}}組到自己嘅戶口: $1',
+'listgrouprights-removegroup-self' = '響自己嘅戶口度拎走嘅{{PLURAL:$2|一|多}}組: $1',
+'listgrouprights-addgroup-self-all'= '加入全部組到自己嘅戶口度',
 'listgrouprights-removegroup-self-all' = '響自己嘅戶口度可以拎走全部組',
 
 # E-mail user

Modified: trunk/phase3/languages/messages/MessagesZh_hans.php
===
--- trunk/phase3/languages/messages/MessagesZh_hans.php 2009-06-12 04:11:15 UTC 
(rev 51782)
+++ trunk/phase3/languages/messages/MessagesZh_hans.php 2009-06-12 06:47:25 UTC 
(rev 51783)
@@ -1263,7 +1263,7 @@
 'right-move-subpages' = '移动页面跟它的字页面',
 'right-move-rootuserpages'= '移动根用户页面',
 'right-movefile'  = '移动文件',
-'right-suppressredirect'  = '移动页面时不建立重定向',
+'right-suppressredirect'  = '当移动页面时不建立来源页面之重定向',
 'right-upload'= '上传文件',
 'right-reupload'  = '覆盖现有的文件',
 'right-reupload-own'  = '覆盖由同一位上传的文件',
@@ -1789,14 +1789,14 @@
 'listgrouprights-rights'   = '权限',
 'listgrouprights-helppage' = 'Help:群组权限',
 'listgrouprights-members'  = '(成员列表)',
-'listgrouprights-addgroup' = '可以加入的{{PLURAL:$2|一个|多个}}群组:$1',
-'listgrouprights-removegroup'  = '可以移除的{{PLURAL:$2|一个|多个}}群组:$1',
-'listgrouprights-addgroup-all' = '可以加入所有群组',
-'listgrouprights-removegroup-all'  = '可以移除所有群组',
-'listgrouprights-addgroup-self'= '在自己的账户中可以加入的{{PLURAL:$2|一个|多个}}群组: 
$1',
-'listgrouprights-removegroup-self' = '在自己的账户中可以移除的{{PLURAL:$2|一个|多个}}群组: 
$1',
-'listgrouprights-addgroup-self-all'= '在自己的账户中以加入所有群组',
-'listgrouprights-removegroup-self-all' = '在自己的账户中可以移除所有群组',
+'listgrouprights-addgroup' = '加入的{{PLURAL:$2|一个|多个}}群组:$1',
+'listgrouprights-removegroup'  = '移除的{{PLURAL:$2|一个|多个}}群组:$1',
+'listgrouprights-addgroup-all' = '加入所有群组',
+'listgrouprights-removegroup-all'  = '移除所有群组',
+'listgrouprights-addgroup-self'= '在自己的账户中加入的{{PLURAL:$2|一个|多个}}群组: 
$1',
+'listgrouprights-removegroup-self' = '在自己的账户中移除的{{PLURAL:$2|一个|多个}}群组: 
$1',
+'listgrouprights-addgroup-self-all'= '在自己的账户中加入所有群组',
+'listgrouprights-removegroup-self-all' = '在自己的账户中移除所有群组',
 
 # E-mail user
 'mailnologin'  = '无电邮地址',

Modified: 

[MediaWiki-CVS] SVN: [51784] trunk/phase3/includes/ProxyTools.php

2009-06-12 Thread ialex
Revision: 51784
Author:   ialex
Date: 2009-06-12 09:17:21 + (Fri, 12 Jun 2009)

Log Message:
---
Fixes for r51774:
* declare $ip and $ipchain so that it doesn't throw notices and warnings
* don't set $ip to false after getting it from $_SERVER['REMOTE_ADDR'], 
otherwise it won't work when there's no XFF header
* fix logic when throwing the exception: throw it when there's no IP

Modified Paths:
--
trunk/phase3/includes/ProxyTools.php

Modified: trunk/phase3/includes/ProxyTools.php
===
--- trunk/phase3/includes/ProxyTools.php2009-06-12 06:47:25 UTC (rev 
51783)
+++ trunk/phase3/includes/ProxyTools.php2009-06-12 09:17:21 UTC (rev 
51784)
@@ -74,6 +74,9 @@
return $wgIP;
}
 
+   $ipchain = array();
+   $ip = false;
+
/* collect the originating ips */
# Client connecting to this webserver
if ( isset( $_SERVER['REMOTE_ADDR'] ) ) {
@@ -82,8 +85,6 @@
if( $ip ) {
$ipchain[] = $ip;
}
-   
-   $ip = false;
 
# Append XFF on to $ipchain
$forwardedFor = wfGetForwardedFor();
@@ -108,7 +109,7 @@
}
}
 
-   if( $ip ) {
+   if( !$ip ) {
throw new MWException( Unable to determine IP );
}
 



___
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs


[MediaWiki-CVS] SVN: [51785] trunk/phase3/includes/ProxyTools.php

2009-06-12 Thread ialex
Revision: 51785
Author:   ialex
Date: 2009-06-12 09:34:49 + (Fri, 12 Jun 2009)

Log Message:
---
Fix for r51774, r51784: set '127.0.0.1' as IP for CLI, but with explicit check 
for $wgCommandLineMode so that the exception Unable to determine IP is not 
thrown in this case.

Modified Paths:
--
trunk/phase3/includes/ProxyTools.php

Modified: trunk/phase3/includes/ProxyTools.php
===
--- trunk/phase3/includes/ProxyTools.php2009-06-12 09:17:21 UTC (rev 
51784)
+++ trunk/phase3/includes/ProxyTools.php2009-06-12 09:34:49 UTC (rev 
51785)
@@ -67,7 +67,7 @@
  * @return string
  */
 function wfGetIP() {
-   global $wgIP, $wgUsePrivateIPs;
+   global $wgIP, $wgUsePrivateIPs, $wgCommandLineMode;
 
# Return cached result
if ( !empty( $wgIP ) ) {
@@ -81,6 +81,8 @@
# Client connecting to this webserver
if ( isset( $_SERVER['REMOTE_ADDR'] ) ) {
$ip = IP::canonicalize( $_SERVER['REMOTE_ADDR'] );
+   } elseif( $wgCommandLineMode ) {
+   $ip = '127.0.0.1';
}
if( $ip ) {
$ipchain[] = $ip;



___
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs


[MediaWiki-CVS] SVN: [51786] trunk/extensions

2009-06-12 Thread ialex
Revision: 51786
Author:   ialex
Date: 2009-06-12 10:26:06 + (Fri, 12 Jun 2009)

Log Message:
---
Consistent casing beetween $wgSpecialPages definition and alias list so that it 
doesn't throw E_NOTICE: Found Stalepages for StalePages with casefix (same 
for NewestPages) when linking to them

Modified Paths:
--
trunk/extensions/NewestPages/NewestPages.php
trunk/extensions/StalePages/StalePages.php

Modified: trunk/extensions/NewestPages/NewestPages.php
===
--- trunk/extensions/NewestPages/NewestPages.php2009-06-12 09:34:49 UTC 
(rev 51785)
+++ trunk/extensions/NewestPages/NewestPages.php2009-06-12 10:26:06 UTC 
(rev 51786)
@@ -28,4 +28,4 @@
 $wgExtensionMessagesFiles['NewestPages'] = $dir . 'NewestPages.i18n.php';
 $wgExtensionAliasesFiles['NewestPages'] = $dir . 'NewestPages.alias.php';
 $wgAutoloadClasses['NewestPages'] = $dir . 'NewestPages.page.php';
-$wgSpecialPages['Newestpages'] = 'NewestPages';
+$wgSpecialPages['NewestPages'] = 'NewestPages';

Modified: trunk/extensions/StalePages/StalePages.php
===
--- trunk/extensions/StalePages/StalePages.php  2009-06-12 09:34:49 UTC (rev 
51785)
+++ trunk/extensions/StalePages/StalePages.php  2009-06-12 10:26:06 UTC (rev 
51786)
@@ -23,7 +23,7 @@
 $wgExtensionMessagesFiles['Stalepages'] = $dir . 'StalePages.i18n.php';
 $wgExtensionAliasesFiles['Stalepages'] = $dir . 'Stalepages.alias.php';
 $wgAutoloadClasses['Stalepages'] = $dir . 'StalePages_body.php';
-$wgSpecialPages['Stalepages'] = 'Stalepages';
+$wgSpecialPages['StalePages'] = 'Stalepages';
 
 // If the last revision of a page is older than this number of days,
 // it will appear on Special:Stalepages



___
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs


[MediaWiki-CVS] SVN: [51787] trunk/extensions/ProofreadPage

2009-06-12 Thread thomasv
Revision: 51787
Author:   thomasv
Date: 2009-06-12 11:01:48 + (Fri, 12 Jun 2009)

Log Message:
---
adding from...to parameters to pagelist

Modified Paths:
--
trunk/extensions/ProofreadPage/ProofreadPage.i18n.php
trunk/extensions/ProofreadPage/ProofreadPage.php

Modified: trunk/extensions/ProofreadPage/ProofreadPage.i18n.php
===
--- trunk/extensions/ProofreadPage/ProofreadPage.i18n.php   2009-06-12 
10:26:06 UTC (rev 51786)
+++ trunk/extensions/ProofreadPage/ProofreadPage.i18n.php   2009-06-12 
11:01:48 UTC (rev 51787)
@@ -17,6 +17,7 @@
'proofreadpage_nosuch_index'  = 'Error: no such index',
'proofreadpage_number_expected'   = 'Error: numeric value expected',
'proofreadpage_interval_too_large'= 'Error: interval too large',
+   'proofreadpage_invalid_interval'  = 'Error: invalid interval',
'proofreadpage_nextpage'  = 'Next page',
'proofreadpage_prevpage'  = 'Previous page',
'proofreadpage_header'= 'Header (noinclude):',

Modified: trunk/extensions/ProofreadPage/ProofreadPage.php
===
--- trunk/extensions/ProofreadPage/ProofreadPage.php2009-06-12 10:26:06 UTC 
(rev 51786)
+++ trunk/extensions/ProofreadPage/ProofreadPage.php2009-06-12 11:01:48 UTC 
(rev 51787)
@@ -591,7 +591,17 @@
$page_ns_index = NS_MAIN;
}
 
-   for ( $i = 0; $i  $count ; $i++ ) {
+   $from = $args['from'];
+   $to = $args['to'];
+   if( !$from ) $from = 1;
+   if( !$to ) $to = $count;
+
+   if( !is_numeric($from) || !is_numeric($to) )
+   return 'strong class=error' . wfMsgForContent( 
'proofreadpage_number_expected' ) . '/strong';
+   if( ($from  $to) || ($from  1) || ($to  1 ) || ($to  
$count) )
+   return 'strong class=error' . wfMsgForContent( 
'proofreadpage_invalid_interval' ) . '/strong';
+
+   for ( $i = $from - 1; $i  $to; $i++ ) {
if ( !isset( $query ) ) {
$query =  SELECT page_id, page_title, 
page_namespace;
$query .=  FROM $pagetable WHERE 
(page_namespace= . intval( $page_ns_index ) .  AND page_title IN(;
@@ -616,7 +626,7 @@
 
$sk = $wgUser-getSkin();
 
-   for ( $i = 1; $i  $count + 1 ; $i++ ) {
+   for ( $i = $from; $i  $to + 1; $i++ ) {
$pdbk = $page_namespace:$name . '/' . $i ;
list( $view, $links, $mode ) = pr_pageNumber( $i, $args 
);
 



___
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs


[MediaWiki-CVS] SVN: [51788] trunk/extensions/ProofreadPage/ProofreadPage.php

2009-06-12 Thread thomasv
Revision: 51788
Author:   thomasv
Date: 2009-06-12 11:18:45 + (Fri, 12 Jun 2009)

Log Message:
---
the index page may contain several pagelists (follow-up to r51787)

Modified Paths:
--
trunk/extensions/ProofreadPage/ProofreadPage.php

Modified: trunk/extensions/ProofreadPage/ProofreadPage.php
===
--- trunk/extensions/ProofreadPage/ProofreadPage.php2009-06-12 11:01:48 UTC 
(rev 51787)
+++ trunk/extensions/ProofreadPage/ProofreadPage.php2009-06-12 11:18:45 UTC 
(rev 51788)
@@ -211,14 +211,18 @@
$text = $rev-getText();
 
//check if it is using pagelist
-   preg_match( /pagelist(.*?)\//is, $text, $m );
-   if( $m ){
-   preg_match_all( /([0-9a-z]*?)\=(.*?)\s/, $m[1] .  , $m2, 
PREG_PATTERN_ORDER );
+   preg_match_all( /pagelist(.*?)\//is, $text, $m, PREG_PATTERN_ORDER 
);
+   if( $m ) {
+
$params = array();
+   for( $k = 0; $k  count( $m[1] ); $k++) { 
+   preg_match_all( /([0-9a-z]*?)\=(.*?)\s/, $m[1][$k] . 
 , $m2, PREG_PATTERN_ORDER );
+   for( $i = 0; $i  count( $m2[1] ); $i++) { 
+   $params[ $m2[1][$i] ] = $m2[2][$i];
+   }
+   }
$links = null;
-   for( $i = 0; $i  count( $m2[1] ); $i++) { 
-   $params[ $m2[1][$i] ] = $m2[2][$i];
-   }
+
} else {
$params = null;
$tag_pattern = /\[\[($page_namespace:.*?)(\|(.*?)|)\]\]/i;



___
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs


[MediaWiki-CVS] SVN: [51789] trunk/extensions/ProofreadPage

2009-06-12 Thread thomasv
Revision: 51789
Author:   thomasv
Date: 2009-06-12 12:35:58 + (Fri, 12 Jun 2009)

Log Message:
---
handle more errors; use from..to params for pages

Modified Paths:
--
trunk/extensions/ProofreadPage/ProofreadPage.i18n.php
trunk/extensions/ProofreadPage/ProofreadPage.php

Modified: trunk/extensions/ProofreadPage/ProofreadPage.i18n.php
===
--- trunk/extensions/ProofreadPage/ProofreadPage.i18n.php   2009-06-12 
11:18:45 UTC (rev 51788)
+++ trunk/extensions/ProofreadPage/ProofreadPage.i18n.php   2009-06-12 
12:35:58 UTC (rev 51789)
@@ -15,6 +15,7 @@
'proofreadpage_index' = 'Index',
'proofreadpage_index_expected'= 'Error: index expected',
'proofreadpage_nosuch_index'  = 'Error: no such index',
+   'proofreadpage_nosuch_file'   = 'Error: no such file',
'proofreadpage_number_expected'   = 'Error: numeric value expected',
'proofreadpage_interval_too_large'= 'Error: interval too large',
'proofreadpage_invalid_interval'  = 'Error: invalid interval',

Modified: trunk/extensions/ProofreadPage/ProofreadPage.php
===
--- trunk/extensions/ProofreadPage/ProofreadPage.php2009-06-12 11:18:45 UTC 
(rev 51788)
+++ trunk/extensions/ProofreadPage/ProofreadPage.php2009-06-12 12:35:58 UTC 
(rev 51789)
@@ -571,91 +571,94 @@
 function pr_renderPageList( $input, $args ) {
global $wgUser, $wgTitle;
wfLoadExtensionMessages( 'ProofreadPage' );
+
$index_namespace = preg_quote( wfMsgForContent( 
'proofreadpage_index_namespace' ), '/' );
if ( !preg_match( /^$index_namespace:(.*?)(\/([0-9]*)|)$/, 
$wgTitle-getPrefixedText(), $m ) ) {
-   return true;
+   return ;
}
 
$imageTitle = Title::makeTitleSafe( NS_IMAGE, $m[1] );
if ( !$imageTitle ) {
-   return true;
+   return 'strong class=error' . wfMsgForContent( 
'proofreadpage_nosuch_file' ) . '/strong';
}
+
$image = wfFindFile( $imageTitle );
+   if ( ! ( $image  $image-isMultiPage()  $image-pageCount() ) ) {
+   return 'strong class=error' . wfMsgForContent( 
'proofreadpage_nosuch_file' ) . '/strong';
+   } 
+
$return = ;
+   $name = $imageTitle-getDBkey();
+   $count = $image-pageCount();
+   $dbr = wfGetDB( DB_SLAVE );
+   $pagetable = $dbr-tableName( 'page' );
 
-   if ( $image  $image-isMultiPage()  $image-pageCount() ) {
-   $name = $imageTitle-getDBkey();
-   $count = $image-pageCount();
-   $dbr = wfGetDB( DB_SLAVE );
-   $pagetable = $dbr-tableName( 'page' );
+   $page_namespace = preg_quote( wfMsgForContent( 
'proofreadpage_namespace' ), '/' );
+   $page_ns_index = MWNamespace::getCanonicalIndex( strtolower( 
$page_namespace ) );
+   if ( $page_ns_index == NULL ) {
+   $page_ns_index = NS_MAIN;
+   }
 
-   $page_namespace = preg_quote( wfMsgForContent( 
'proofreadpage_namespace' ), '/' );
-   $page_ns_index = MWNamespace::getCanonicalIndex( strtolower( 
$page_namespace ) );
-   if ( $page_ns_index == NULL ) {
-   $page_ns_index = NS_MAIN;
-   }
+   $from = $args['from'];
+   $to = $args['to'];
+   if( !$from ) $from = 1;
+   if( !$to ) $to = $count;
 
-   $from = $args['from'];
-   $to = $args['to'];
-   if( !$from ) $from = 1;
-   if( !$to ) $to = $count;
+   if( !is_numeric($from) || !is_numeric($to) )
+   return 'strong class=error' . wfMsgForContent( 
'proofreadpage_number_expected' ) . '/strong';
+   if( ($from  $to) || ($from  1) || ($to  1 ) || ($to  $count) )
+   return 'strong class=error' . wfMsgForContent( 
'proofreadpage_invalid_interval' ) . '/strong';
 
-   if( !is_numeric($from) || !is_numeric($to) )
-   return 'strong class=error' . wfMsgForContent( 
'proofreadpage_number_expected' ) . '/strong';
-   if( ($from  $to) || ($from  1) || ($to  1 ) || ($to  
$count) )
-   return 'strong class=error' . wfMsgForContent( 
'proofreadpage_invalid_interval' ) . '/strong';
-
-   for ( $i = $from - 1; $i  $to; $i++ ) {
-   if ( !isset( $query ) ) {
-   $query =  SELECT page_id, page_title, 
page_namespace;
-   $query .=  FROM $pagetable WHERE 
(page_namespace= . intval( $page_ns_index ) .  AND page_title IN(;
-   } else {
-   $query .= ', ';
-   }
-   $link_name = $name . '/' . ( $i + 1 ) ;
-   $query .= $dbr-addQuotes( $link_name );
+   for ( $i = $from - 1; $i  

[MediaWiki-CVS] SVN: [51790] trunk/extensions/ProofreadPage/ProofreadPage.php

2009-06-12 Thread thomasv
Revision: 51790
Author:   thomasv
Date: 2009-06-12 12:48:32 + (Fri, 12 Jun 2009)

Log Message:
---
fix

Modified Paths:
--
trunk/extensions/ProofreadPage/ProofreadPage.php

Modified: trunk/extensions/ProofreadPage/ProofreadPage.php
===
--- trunk/extensions/ProofreadPage/ProofreadPage.php2009-06-12 12:35:58 UTC 
(rev 51789)
+++ trunk/extensions/ProofreadPage/ProofreadPage.php2009-06-12 12:48:32 UTC 
(rev 51790)
@@ -212,7 +212,7 @@
 
//check if it is using pagelist
preg_match_all( /pagelist(.*?)\//is, $text, $m, PREG_PATTERN_ORDER 
);
-   if( $m ) {
+   if( $m[1] ) {
 
$params = array();
for( $k = 0; $k  count( $m[1] ); $k++) { 
@@ -690,20 +690,20 @@
if( ! $index_title || ! $index_title-exists() ) 
return 'strong class=error' . wfMsgForContent( 
'proofreadpage_nosuch_index' ) . '/strong';
 
-   $imageTitle = Title::makeTitleSafe( NS_IMAGE, $index );
-   if ( !$imageTitle ) {
-   return 'strong class=error' . wfMsgForContent( 
'proofreadpage_nosuch_file' ) . '/strong';
-   }
-   $image = wfFindFile( $imageTitle );
-   if ( ! ( $image  $image-isMultiPage()  $image-pageCount() ) ) {
-   return 'strong class=error' . wfMsgForContent( 
'proofreadpage_nosuch_file' ) . '/strong';
-   }
-   $count = $image-pageCount();
-
$out = 'span id=pr_index class=hiddenStructurea 
href='.$index_title-escapeFullUrl().''.$index_namespace.'/a /span';
list( $links, $params, $attributes ) = pr_parse_index( $index_title );
 
if( $params ) {
+   $imageTitle = Title::makeTitleSafe( NS_IMAGE, $index );
+   if ( !$imageTitle ) {
+   return 'strong class=error' . wfMsgForContent( 
'proofreadpage_nosuch_file' ) . '/strong';
+   }
+   $image = wfFindFile( $imageTitle );
+   if ( ! ( $image  $image-isMultiPage()  $image-pageCount() 
) ) {
+   return 'strong class=error' . wfMsgForContent( 
'proofreadpage_nosuch_file' ) . '/strong';
+   }
+   $count = $image-pageCount();
+
if( !$from ) $from = 1;
if( !$to ) $to = $count;
 



___
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs


[MediaWiki-CVS] SVN: [51791] trunk/extensions/ProofreadPage/ProofreadPage.php

2009-06-12 Thread thomasv
Revision: 51791
Author:   thomasv
Date: 2009-06-12 13:23:00 + (Fri, 12 Jun 2009)

Log Message:
---
style changes only; no functional change

Modified Paths:
--
trunk/extensions/ProofreadPage/ProofreadPage.php

Modified: trunk/extensions/ProofreadPage/ProofreadPage.php
===
--- trunk/extensions/ProofreadPage/ProofreadPage.php2009-06-12 12:48:32 UTC 
(rev 51790)
+++ trunk/extensions/ProofreadPage/ProofreadPage.php2009-06-12 13:23:00 UTC 
(rev 51791)
@@ -91,8 +91,9 @@
$pagenr = intval( array_pop( $parts ) );
}
$count = $image-pageCount();
-   if ( $pagenr  1 || $pagenr  $count || $count = 1 )
+   if ( $pagenr  1 || $pagenr  $count || $count = 1 ) {
return $err;
+   }
$name = $image-getTitle()-getText();
$index_name = $index_namespace:$name;
$prev_name = $page_namespace:$name/ . ( $pagenr - 1 );
@@ -604,10 +605,12 @@
if( !$from ) $from = 1;
if( !$to ) $to = $count;
 
-   if( !is_numeric($from) || !is_numeric($to) )
+   if( !is_numeric( $from ) || !is_numeric( $to ) ) {
return 'strong class=error' . wfMsgForContent( 
'proofreadpage_number_expected' ) . '/strong';
-   if( ($from  $to) || ($from  1) || ($to  1 ) || ($to  $count) )
+   }
+   if( ($from  $to) || ($from  1) || ($to  1 ) || ($to  $count) ) {
return 'strong class=error' . wfMsgForContent( 
'proofreadpage_invalid_interval' ) . '/strong';
+   }
 
for ( $i = $from - 1; $i  $to; $i++ ) {
if ( !isset( $query ) ) {
@@ -685,10 +688,13 @@
$from = $args['from'];
$to = $args['to'];
 
-   if( ! $index ) return 'strong class=error' . wfMsgForContent( 
'proofreadpage_index_expected' ) . '/strong';
+   if( ! $index ) { 
+   return 'strong class=error' . wfMsgForContent( 
'proofreadpage_index_expected' ) . '/strong';
+   }
$index_title = Title::newFromText( $index_namespace:$index );
-   if( ! $index_title || ! $index_title-exists() ) 
+   if( ! $index_title || ! $index_title-exists() ) {
return 'strong class=error' . wfMsgForContent( 
'proofreadpage_nosuch_index' ) . '/strong';
+   }
 
$out = 'span id=pr_index class=hiddenStructurea 
href='.$index_title-escapeFullUrl().''.$index_namespace.'/a /span';
list( $links, $params, $attributes ) = pr_parse_index( $index_title );
@@ -707,14 +713,17 @@
if( !$from ) $from = 1;
if( !$to ) $to = $count;
 
-   if(!is_numeric($from) || !is_numeric($to))
+   if( !is_numeric( $from ) || !is_numeric( $to ) ) {
return 'strong class=error' . wfMsgForContent( 
'proofreadpage_number_expected' ) . '/strong';
-   if( ($from  $to) || ($from  1) || ($to  1 ) || ($to  
$count) )
+   }
+   if( ($from  $to) || ($from  1) || ($to  1 ) || ($to  
$count) ) {
return 'strong class=error' . wfMsgForContent( 
'proofreadpage_invalid_interval' ) . '/strong';
-   if( $to - $from  1000 )
+   }
+   if( $to - $from  1000 ) {
return 'strong class=error' . wfMsgForContent( 
'proofreadpage_interval_too_large' ) . '/strong';
+   }
 
-   for($i=$from; $i=$to;$i++){
+   for( $i=$from; $i=$to;$i++ ) {
$text = $page_namespace:$index/ . $i;
list($pagenum, $links, $mode) = 
pr_pageNumber($i,$params);
$input = 
{{:MediaWiki:Proofreadpage_pagenum_template|page=.$text.|num=$pagenum}};



___
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs


[MediaWiki-CVS] SVN: [51792] trunk/WikiWord/WikiWord/src/main/php

2009-06-12 Thread daniel
Revision: 51792
Author:   daniel
Date: 2009-06-12 15:24:19 + (Fri, 12 Jun 2009)

Log Message:
---
wwFakeCommonsPlural

Modified Paths:
--
trunk/WikiWord/WikiWord/src/main/php/config.sample.php
trunk/WikiWord/WikiWord/src/main/php/wwutils.php

Modified: trunk/WikiWord/WikiWord/src/main/php/config.sample.php
===
--- trunk/WikiWord/WikiWord/src/main/php/config.sample.php  2009-06-12 
13:23:00 UTC (rev 51791)
+++ trunk/WikiWord/WikiWord/src/main/php/config.sample.php  2009-06-12 
15:24:19 UTC (rev 51792)
@@ -17,6 +17,7 @@
 $wwImagePageURL = http://commons.wikimedia.org/wiki/File:{name};;
 
 $wwFakeCommonsConcepts = true;
+$wwFakeCommonsPlural = true;
 $wwCommonsTablePrefix = commonswiki_p.;
 
 $wwWikiInfoTable = toolserver.wiki;

Modified: trunk/WikiWord/WikiWord/src/main/php/wwutils.php
===
--- trunk/WikiWord/WikiWord/src/main/php/wwutils.php2009-06-12 13:23:00 UTC 
(rev 51791)
+++ trunk/WikiWord/WikiWord/src/main/php/wwutils.php2009-06-12 15:24:19 UTC 
(rev 51792)
@@ -425,7 +425,7 @@
 }
 
 function getImagesAbout($id, $max = 0) {
-   global $wwFakeCommonsConcepts;
+   global $wwFakeCommonsConcepts, $wwFakeCommonsPlural;
 
$concepts = $this-getLocalConcepts($id);
 
@@ -455,7 +455,12 @@
return $images-listImages($max);
 
$img = $this-getImagesInCategory(commmons, $title); //FIXME: 
resource mapping
-   $images-addImages($img, commons: . $title, category, 0.5);
+   $images-addImages($img, commons:category: . $title, category, 
0.5);
+
+   if ($wwFakeCommonsConcepts  $wwFakeCommonsPlural) {
+   $img = $this-getImagesInCategory(commmons, $title); //FIXME: 
resource mapping
+   $images-addImages($img, commons:category: . $title, 
category(pl), 0.5);
+   }
}
 
return $images-listImages($max);



___
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs


[MediaWiki-CVS] SVN: [51793] trunk/WikiWord/WikiWord/src/main/php/wwutils.php

2009-06-12 Thread daniel
Revision: 51793
Author:   daniel
Date: 2009-06-12 15:24:43 + (Fri, 12 Jun 2009)

Log Message:
---
wwFakeCommonsPlural

Modified Paths:
--
trunk/WikiWord/WikiWord/src/main/php/wwutils.php

Modified: trunk/WikiWord/WikiWord/src/main/php/wwutils.php
===
--- trunk/WikiWord/WikiWord/src/main/php/wwutils.php2009-06-12 15:24:19 UTC 
(rev 51792)
+++ trunk/WikiWord/WikiWord/src/main/php/wwutils.php2009-06-12 15:24:43 UTC 
(rev 51793)
@@ -458,8 +458,8 @@
$images-addImages($img, commons:category: . $title, category, 
0.5);
 
if ($wwFakeCommonsConcepts  $wwFakeCommonsPlural) {
-   $img = $this-getImagesInCategory(commmons, $title); //FIXME: 
resource mapping
-   $images-addImages($img, commons:category: . $title, 
category(pl), 0.5);
+   $img = $this-getImagesInCategory(commmons, $title+s); 
//FIXME: resource mapping
+   $images-addImages($img, commons:category: . $title+s, 
category(pl), 0.5);
}
}
 



___
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs


[MediaWiki-CVS] SVN: [51794] trunk/phase3

2009-06-12 Thread tparscal
Revision: 51794
Author:   tparscal
Date: 2009-06-12 17:55:48 + (Fri, 12 Jun 2009)

Log Message:
---
Switched language of tabs from generic and monobook specific stuff to vector 
specific messages where possible

Modified Paths:
--
trunk/phase3/languages/messages/MessagesEn.php
trunk/phase3/maintenance/language/messages.inc
trunk/phase3/skins/Vector.php

Modified: trunk/phase3/languages/messages/MessagesEn.php
===
--- trunk/phase3/languages/messages/MessagesEn.php  2009-06-12 15:24:43 UTC 
(rev 51793)
+++ trunk/phase3/languages/messages/MessagesEn.php  2009-06-12 17:55:48 UTC 
(rev 51794)
@@ -650,6 +650,29 @@
 'sitetitle'  = '{{SITENAME}}', # do not translate or duplicate this 
message to other languages
 'sitesubtitle'   = '', # do not translate or duplicate this message to other 
languages
 
+'vector-action-addsection'   = 'Add Topic',
+'vector-action-delete'   = 'Delete',
+'vector-action-move' = 'Move',
+'vector-action-protect'  = 'Protect',
+'vector-action-undelete' = 'Undelete',
+'vector-action-unprotect'= 'Unprotect',
+'vector-namespace-category'  = 'Category',
+'vector-namespace-help'  = 'Help page',
+'vector-namespace-image' = 'File',
+'vector-namespace-main'  = 'Page',
+'vector-namespace-media' = 'Media page',
+'vector-namespace-mediawiki' = 'Message',
+'vector-namespace-project'   = 'Project page',
+'vector-namespace-special'   = 'Special page',
+'vector-namespace-talk'  = 'Discussion',
+'vector-namespace-template'  = 'Template',
+'vector-namespace-user'  = 'User page',
+'vector-view-create' = 'Create',
+'vector-view-edit'   = 'Edit',
+'vector-view-history'= 'View History',
+'vector-view-view'   = 'Read',
+'vector-view-viewsource' = 'View Source',
+
 # Metadata in edit box
 'metadata_help' = 'Metadata:',
 
@@ -669,7 +692,6 @@
 'permalink' = 'Permanent link',
 'print' = 'Print',
 'edit'  = 'Edit',
-'view'  = 'Read',
 'create'= 'Create',
 'editthispage'  = 'Edit this page',
 'create-this-page'  = 'Create this page',

Modified: trunk/phase3/maintenance/language/messages.inc
===
--- trunk/phase3/maintenance/language/messages.inc  2009-06-12 15:24:43 UTC 
(rev 51793)
+++ trunk/phase3/maintenance/language/messages.inc  2009-06-12 17:55:48 UTC 
(rev 51794)
@@ -164,6 +164,30 @@
'sitetitle',
'sitesubtitle',
),
+   'vector' = array(
+   'vector-action-addsection',
+   'vector-action-delete',
+   'vector-action-move',
+   'vector-action-protect',
+   'vector-action-undelete',
+   'vector-action-unprotect',
+   'vector-namespace-category',
+   'vector-namespace-help',
+   'vector-namespace-image',
+   'vector-namespace-main',
+   'vector-namespace-media',
+   'vector-namespace-mediawiki',
+   'vector-namespace-project',
+   'vector-namespace-special',
+   'vector-namespace-talk',
+   'vector-namespace-template',
+   'vector-namespace-user',
+   'vector-view-create',
+   'vector-view-edit',
+   'vector-view-history',
+   'vector-view-view',
+   'vector-view-viewsource',
+   ),
'metadata_help' = array(
'metadata_help',
),

Modified: trunk/phase3/skins/Vector.php
===
--- trunk/phase3/skins/Vector.php   2009-06-12 15:24:43 UTC (rev 51793)
+++ trunk/phase3/skins/Vector.php   2009-06-12 17:55:48 UTC (rev 51794)
@@ -83,20 +83,20 @@
 
// Adds namespace links
$links['namespaces'][$subjectId] = $this-tabAction(
-   $subjectPage, 'nstab-' . $subjectId, !$isTalk, 
'', true
+   $subjectPage, 'vector-namespace-' . $subjectId, 
!$isTalk, '', true
);
$links['namespaces'][$talkId] = $this-tabAction(
-   $talkPage, 'talk', $isTalk, '', true
+   $talkPage, 'vector-namespace-talk', $isTalk, 
'', true
);
 
// Adds view view link
if ( $this-mTitle-exists() ) {
$links['views']['view'] = $this-tabAction(
$isTalk ? $talkPage : $subjectPage,
-   'view', ( $action == 'view' ), 
'', true
+   'vector-view-view', ( $action 
== 'view' ), '', true

[MediaWiki-CVS] SVN: [51795] trunk

2009-06-12 Thread simetrical
Revision: 51795
Author:   simetrical
Date: 2009-06-12 17:59:04 + (Fri, 12 Jun 2009)

Log Message:
---
Make Database into abstract class DatabaseBase

All other databases were changed to extend DatabaseBase instead of
Database.  Database was kept as an alias for DatabaseMysql for
compatibility.  Existing explicit references to Database that I could
find were changed to DatabaseMysql for the sake of clarity.

Should cause no functional changes.

Modified Paths:
--
trunk/extensions/BoardVote/BoardVote_body.php
trunk/extensions/MWSearch/luceneUpdate.php
trunk/phase3/includes/AutoLoader.php
trunk/phase3/includes/db/Database.php
trunk/phase3/includes/db/DatabaseIbm_db2.php
trunk/phase3/includes/db/DatabaseMssql.php
trunk/phase3/includes/db/DatabaseOracle.php
trunk/phase3/includes/db/DatabasePostgres.php
trunk/phase3/includes/db/DatabaseSqlite.php
trunk/phase3/t/inc/Database.t
trunk/phase3/tests/MediaWiki_TestCase.php
trunk/tools/WikipediaStatistics/index.php
trunk/tools/switch-master/MasterSwitcher.php

Modified: trunk/extensions/BoardVote/BoardVote_body.php
===
--- trunk/extensions/BoardVote/BoardVote_body.php   2009-06-12 17:55:48 UTC 
(rev 51794)
+++ trunk/extensions/BoardVote/BoardVote_body.php   2009-06-12 17:59:04 UTC 
(rev 51795)
@@ -215,7 +215,7 @@
if ( !$this-mDb ) {
global $wgBoardVoteDBServer, $wgBoardVoteDB, $wgDBuser, 
$wgDBpassword;
 
-   $this-mDb = new Database( $wgBoardVoteDBServer, 
$wgDBuser, $wgDBpassword,
+   $this-mDb = new DatabaseMysql( $wgBoardVoteDBServer, 
$wgDBuser, $wgDBpassword,
$wgBoardVoteDB, /*failfn*/false, /*flags*/0, 
/*prefix*/'' );
if ( !$this-mDb-isOpen() ) {
// This should be handled inside the 
constructor, but we'll check just in case

Modified: trunk/extensions/MWSearch/luceneUpdate.php
===
--- trunk/extensions/MWSearch/luceneUpdate.php  2009-06-12 17:55:48 UTC (rev 
51794)
+++ trunk/extensions/MWSearch/luceneUpdate.php  2009-06-12 17:59:04 UTC (rev 
51795)
@@ -122,7 +122,7 @@

function streamingSlave( $db ) {
global $wgDBname;
-   $stream = new Database( $db-mServer, $db-mUser, 
$db-mPassword, $wgDBname );
+   $stream = new DatabaseMysql( $db-mServer, $db-mUser, 
$db-mPassword, $wgDBname );
$stream-bufferResults( false );

$timeout = 3600 * 24;

Modified: trunk/phase3/includes/AutoLoader.php
===
--- trunk/phase3/includes/AutoLoader.php2009-06-12 17:55:48 UTC (rev 
51794)
+++ trunk/phase3/includes/AutoLoader.php2009-06-12 17:59:04 UTC (rev 
51795)
@@ -303,6 +303,7 @@
'Blob' = 'includes/db/Database.php',
'ChronologyProtector' = 'includes/db/LBFactory.php',
'Database' = 'includes/db/Database.php',
+   'DatabaseBase' = 'includes/db/Database.php',
'DatabaseMssql' = 'includes/db/DatabaseMssql.php',
'DatabaseMysql' = 'includes/db/Database.php',
'DatabaseOracle' = 'includes/db/DatabaseOracle.php',

Modified: trunk/phase3/includes/db/Database.php
===
--- trunk/phase3/includes/db/Database.php   2009-06-12 17:55:48 UTC (rev 
51794)
+++ trunk/phase3/includes/db/Database.php   2009-06-12 17:59:04 UTC (rev 
51795)
@@ -19,7 +19,7 @@
  * Database abstraction object
  * @ingroup Database
  */
-class Database {
+abstract class DatabaseBase {
 
 #--
 # Variables
@@ -307,7 +307,7 @@
}
 
/**
-* Same as new Database( ... ), kept for backward compatibility
+* Same as new DatabaseMysql( ... ), kept for backward compatibility
 * @param $server String: database server host
 * @param $user String: database user name
 * @param $password String: database user password
@@ -317,7 +317,7 @@
 */
static function newFromParams( $server, $user, $password, $dbName, 
$failFunction = false, $flags = 0 )
{
-   return new Database( $server, $user, $password, $dbName, 
$failFunction, $flags );
+   return new DatabaseMysql( $server, $user, $password, $dbName, 
$failFunction, $flags );
}
 
/**
@@ -2426,10 +2426,15 @@
  * @ingroup Database
  * @see Database
  */
-class DatabaseMysql extends Database {
+class DatabaseMysql extends DatabaseBase {
# Inherit all
 }
 
+/**
+ * Legacy support: Database == DatabaseMysql
+ */
+class Database extends DatabaseMysql {}
+
 

[MediaWiki-CVS] SVN: [51796] trunk/phase3/includes

2009-06-12 Thread ialex
Revision: 51796
Author:   ialex
Date: 2009-06-12 18:31:07 + (Fri, 12 Jun 2009)

Log Message:
---
Kill some E_NOTICE when protecting a non-existing page

Modified Paths:
--
trunk/phase3/includes/ProtectionForm.php
trunk/phase3/includes/Title.php

Modified: trunk/phase3/includes/ProtectionForm.php
===
--- trunk/phase3/includes/ProtectionForm.php2009-06-12 17:59:04 UTC (rev 
51795)
+++ trunk/phase3/includes/ProtectionForm.php2009-06-12 18:31:07 UTC (rev 
51796)
@@ -258,7 +258,7 @@
#  to a semi-protected page.
global $wgGroupPermissions;
 
-   $edit_restriction = $this-mRestrictions['edit'];
+   $edit_restriction = isset( $this-mRestrictions['edit'] ) ? 
$this-mRestrictions['edit'] : '';
$this-mCascade = $wgRequest-getBool( 'mwProtect-cascade' );
if ($this-mCascade  ($edit_restriction != 'protect') 

!(isset($wgGroupPermissions[$edit_restriction]['protect'])  
$wgGroupPermissions[$edit_restriction]['protect'] ) )

Modified: trunk/phase3/includes/Title.php
===
--- trunk/phase3/includes/Title.php 2009-06-12 17:59:04 UTC (rev 51795)
+++ trunk/phase3/includes/Title.php 2009-06-12 18:31:07 UTC (rev 51796)
@@ -1447,7 +1447,7 @@
 
if( $create_perm ) {
$params = array([create=$create_perm] 
$expiry_description,'');
-   $log-addEntry( $this-mRestrictions['create'] ? 
'modify' : 'protect', $this, trim( $reason ), $params );
+   $log-addEntry( ( isset( $this-mRestrictions['create'] 
)  $this-mRestrictions['create'] ) ? 'modify' : 'protect', $this, trim( 
$reason ), $params );
} else {
$log-addEntry( 'unprotect', $this, $reason );
}



___
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs


[MediaWiki-CVS] SVN: [51797] branches/maintenance-work/maintenance

2009-06-12 Thread demon
Revision: 51797
Author:   demon
Date: 2009-06-12 19:05:55 + (Fri, 12 Jun 2009)

Log Message:
---
* Tweak getOption() to set the value in $mOptions so we don't have to 
re-provide the default again and again
* Port nextJobDB, renameDbPrefix.

Modified Paths:
--
branches/maintenance-work/maintenance/Maintenance.php
branches/maintenance-work/maintenance/nextJobDB.php
branches/maintenance-work/maintenance/renameDbPrefix.php

Modified: branches/maintenance-work/maintenance/Maintenance.php
===
--- branches/maintenance-work/maintenance/Maintenance.php   2009-06-12 
18:31:07 UTC (rev 51796)
+++ branches/maintenance-work/maintenance/Maintenance.php   2009-06-12 
19:05:55 UTC (rev 51797)
@@ -78,7 +78,13 @@
 * @return mixed
 */
protected function getOption( $name, $default = null ) {
-   return $this-hasOption($name) ? $this-mOptions[$name] : 
$default;
+   if( $this-hasOption($name) ) {
+   return $this-mOptions[$name];
+   } else {
+   // Set it so we don't have to provide the default again
+   $this-mOptions[$name] = $default;
+   return $this-mOptions[$name];
+   }
}

/**

Modified: branches/maintenance-work/maintenance/nextJobDB.php
===
--- branches/maintenance-work/maintenance/nextJobDB.php 2009-06-12 18:31:07 UTC 
(rev 51796)
+++ branches/maintenance-work/maintenance/nextJobDB.php 2009-06-12 19:05:55 UTC 
(rev 51797)
@@ -6,55 +6,71 @@
  * @ingroup Maintenance
  */
 
-$options = array( 'type'  );
+require_once( Maintenance.php );
 
-require_once( 'commandLine.inc' );
-
-$type = isset($options['type'])
-   ? $options['type']
-   : false;
-
-$mckey = $type === false
-? jobqueue:dbs
-: jobqueue:dbs:$type;
-
-$pendingDBs = $wgMemc-get( $mckey );
-if ( !$pendingDBs ) {
-   $pendingDBs = array();
-   # Cross-reference DBs by master DB server
-   $dbsByMaster = array();
-   foreach ( $wgLocalDatabases as $db ) {
-   $lb = wfGetLB( $db );
-   $dbsByMaster[$lb-getServerName(0)][] = $db;
+class nextJobDB extends Maintenance {
+   public function __construct() {
+   parent::__construct();
+   $this-mDescription = Pick a database that has pending jobs;
+   $this-addParam( 'type', The type of job to search for, 
false, true );
}
-
-   foreach ( $dbsByMaster as $master = $dbs ) {
-   $dbConn = wfGetDB( DB_MASTER, array(), $dbs[0] );
-   $stype = $dbConn-addQuotes($type);
-
-   # Padding row for MySQL bug
-   $sql = (SELECT '---');
-   foreach ( $dbs as $dbName ) {
-   if ( $sql != '' ) {
-   $sql .= ' UNION ';
-   }
-   if ($type === false)
-   $sql .= (SELECT '$dbName' FROM `$dbName`.job 
LIMIT 1);
-   else
-   $sql .= (SELECT '$dbName' FROM `$dbName`.job 
WHERE job_cmd=$stype LIMIT 1);
+   public function execute() {
+   global $wgMemc;
+   $type = $this-getParam( 'type', false );
+   $mckey = $type === false
+   ? jobqueue:dbs
+   : jobqueue:dbs:$type;
+   $pendingDBs = $wgMemcKey-get( $mckey );
+   
+   # If we didn't get it from the cache
+   if( !$pendingDBs ) {
+   $pendingDBs = $this-getPendingDbs( $type );
+   $wgMemc-get( $mckey, $pendingDBs, 300 )
}
-   $res = $dbConn-query( $sql, 'nextJobDB.php' );
-   $row = $dbConn-fetchRow( $res ); // discard padding row
-   while ( $row = $dbConn-fetchRow( $res ) ) {
-   $pendingDBs[] = $row[0];
+   # If we've got a pending job in a db, display it. 
+   if ( $pendingDBs ) {
+   $this-output( $pendingDBs[mt_rand(0, count( 
$pendingDBs ) - 1)] );
}
}
-
-   $wgMemc-set( $mckey, $pendingDBs, 300 );
+   
+   /**
+* Get all databases that have a pending job
+* @param $type String Job type
+* @return array
+*/
+   private function getPendingDbs( $type ) {
+   $pendingDBs = array();
+   # Cross-reference DBs by master DB server
+   $dbsByMaster = array();
+   foreach ( $wgLocalDatabases as $db ) {
+   $lb = wfGetLB( $db );
+   $dbsByMaster[$lb-getServerName(0)][] = $db;
+

[MediaWiki-CVS] SVN: [51799] trunk/extensions/UsabilityInitiative/EditToolbar/images/ loading.gif

2009-06-12 Thread tparscal
Revision: 51799
Author:   tparscal
Date: 2009-06-12 19:15:01 + (Fri, 12 Jun 2009)

Log Message:
---
Added spinner

Added Paths:
---
trunk/extensions/UsabilityInitiative/EditToolbar/images/loading.gif

Added: trunk/extensions/UsabilityInitiative/EditToolbar/images/loading.gif
===
(Binary files differ)


Property changes on: 
trunk/extensions/UsabilityInitiative/EditToolbar/images/loading.gif
___
Added: svn:mime-type
   + application/octet-stream



___
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs


[MediaWiki-CVS] SVN: [51800] trunk/extensions/UsabilityInitiative/EditToolbar/EditToolbar. css

2009-06-12 Thread tparscal
Revision: 51800
Author:   tparscal
Date: 2009-06-12 19:15:33 + (Fri, 12 Jun 2009)

Log Message:
---
Tweaked loading label color

Modified Paths:
--
trunk/extensions/UsabilityInitiative/EditToolbar/EditToolbar.css

Modified: trunk/extensions/UsabilityInitiative/EditToolbar/EditToolbar.css
===
--- trunk/extensions/UsabilityInitiative/EditToolbar/EditToolbar.css
2009-06-12 19:15:01 UTC (rev 51799)
+++ trunk/extensions/UsabilityInitiative/EditToolbar/EditToolbar.css
2009-06-12 19:15:33 UTC (rev 51800)
@@ -69,6 +69,7 @@
background-repeat: no-repeat;
padding-left: 32px;
float: left;
+   color: #66;
 }
 div#edittoolbar div.group  div.label {
float: left;



___
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs


[MediaWiki-CVS] SVN: [51802] trunk/extensions/UsabilityInitiative/EditToolbar/EditToolbar. php

2009-06-12 Thread demon
Revision: 51802
Author:   demon
Date: 2009-06-12 19:30:08 + (Fri, 12 Jun 2009)

Log Message:
---
Message is edittoolbar-desc.

Modified Paths:
--
trunk/extensions/UsabilityInitiative/EditToolbar/EditToolbar.php

Modified: trunk/extensions/UsabilityInitiative/EditToolbar/EditToolbar.php
===
--- trunk/extensions/UsabilityInitiative/EditToolbar/EditToolbar.php
2009-06-12 19:24:03 UTC (rev 51801)
+++ trunk/extensions/UsabilityInitiative/EditToolbar/EditToolbar.php
2009-06-12 19:30:08 UTC (rev 51802)
@@ -37,7 +37,7 @@
'author' = 'Trevor Parscal',
'version' = '0.1.1',
'url' = 'http://www.mediawiki.org/wiki/Extension:UsabilityInitiative',
-   'descriptionmsg' = 'toolbar-desc',
+   'descriptionmsg' = 'edittoolbar-desc',
 );
 
 // Adds Autoload Classes



___
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs


[MediaWiki-CVS] SVN: [51801] trunk/phase3/includes/AutoLoader.php

2009-06-12 Thread demon
Revision: 51801
Author:   demon
Date: 2009-06-12 19:24:03 + (Fri, 12 Jun 2009)

Log Message:
---
Put actual location of these two classes.

Modified Paths:
--
trunk/phase3/includes/AutoLoader.php

Modified: trunk/phase3/includes/AutoLoader.php
===
--- trunk/phase3/includes/AutoLoader.php2009-06-12 19:15:33 UTC (rev 
51800)
+++ trunk/phase3/includes/AutoLoader.php2009-06-12 19:24:03 UTC (rev 
51801)
@@ -210,7 +210,7 @@
'WikiErrorMsg' = 'includes/WikiError.php',
'WikiExporter' = 'includes/Export.php',
'WikiMap' = 'includes/WikiMap.php',
-   'WikiReference' = 'includes/WikiReference.php',
+   'WikiReference' = 'includes/WikiMap.php',
'WikiXmlError' = 'includes/WikiError.php',
'XCacheBagOStuff' = 'includes/BagOStuff.php',
'XmlDumpWriter' = 'includes/Export.php',
@@ -414,7 +414,7 @@
'CoreParserFunctions' = 'includes/parser/CoreParserFunctions.php',
'DateFormatter' = 'includes/parser/DateFormatter.php',
'LinkHolderArray' = 'includes/parser/LinkHolderArray.php',
-   'LinkMarkerReplacer' = 'includes/parser/LinkMarkerReplacer.php',
+   'LinkMarkerReplacer' = 'includes/parser/Parser_LinkHooks.php',
'OnlyIncludeReplacer' = 'includes/parser/Parser.php',
'PPDAccum_Hash' = 'includes/parser/Preprocessor_Hash.php',
'PPDPart' = 'includes/parser/Preprocessor_DOM.php',



___
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs


[MediaWiki-CVS] SVN: [51803] trunk/phase3/languages/messages/MessagesEn.php

2009-06-12 Thread siebrand
Revision: 51803
Author:   siebrand
Date: 2009-06-12 20:10:19 + (Fri, 12 Jun 2009)

Log Message:
---
Update casing on Vector skin messages

Modified Paths:
--
trunk/phase3/languages/messages/MessagesEn.php

Modified: trunk/phase3/languages/messages/MessagesEn.php
===
--- trunk/phase3/languages/messages/MessagesEn.php  2009-06-12 19:30:08 UTC 
(rev 51802)
+++ trunk/phase3/languages/messages/MessagesEn.php  2009-06-12 20:10:19 UTC 
(rev 51803)
@@ -650,7 +650,7 @@
 'sitetitle'  = '{{SITENAME}}', # do not translate or duplicate this 
message to other languages
 'sitesubtitle'   = '', # do not translate or duplicate this message to other 
languages
 
-'vector-action-addsection'   = 'Add Topic',
+'vector-action-addsection'   = 'Add topic',
 'vector-action-delete'   = 'Delete',
 'vector-action-move' = 'Move',
 'vector-action-protect'  = 'Protect',
@@ -669,9 +669,9 @@
 'vector-namespace-user'  = 'User page',
 'vector-view-create' = 'Create',
 'vector-view-edit'   = 'Edit',
-'vector-view-history'= 'View History',
+'vector-view-history'= 'View history',
 'vector-view-view'   = 'Read',
-'vector-view-viewsource' = 'View Source',
+'vector-view-viewsource' = 'View source',
 
 # Metadata in edit box
 'metadata_help' = 'Metadata:',



___
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs


[MediaWiki-CVS] SVN: [51804] branches/maintenance-work/maintenance/showStats.php

2009-06-12 Thread demon
Revision: 51804
Author:   demon
Date: 2009-06-12 20:37:12 + (Fri, 12 Jun 2009)

Log Message:
---
Port showStats.php

Modified Paths:
--
branches/maintenance-work/maintenance/showStats.php

Modified: branches/maintenance-work/maintenance/showStats.php
===
--- branches/maintenance-work/maintenance/showStats.php 2009-06-12 20:10:19 UTC 
(rev 51803)
+++ branches/maintenance-work/maintenance/showStats.php 2009-06-12 20:37:12 UTC 
(rev 51804)
@@ -14,35 +14,41 @@
  * @license GNU General Public License 2.0 or later
  */
 
-require_once( 'commandLine.inc' );
+require_once( Maintenance.php );
 
-#
-# Configuration
-#
-$fields = array(
-   'ss_total_views' = 'Total views',
-   'ss_total_edits' = 'Total edits',
-   'ss_good_articles' = 'Number of articles',
-   'ss_total_pages' = 'Total pages',
-   'ss_users' = 'Number of users',
-   'ss_admins' = 'Number of admins',
-   'ss_images' = 'Number of images',
-);
-
-// Get cached stats from slave database
-$dbr = wfGetDB( DB_SLAVE );
-$fname = 'showStats';
-$stats = $dbr-selectRow( 'site_stats', '*', '' );
-
-// Get maximum size for each column
-$max_length_value = $max_length_desc = 0;
-foreach( $fields as $field = $desc ) {
-   $max_length_value = max( $max_length_value, strlen( $stats-$field ) );
-   $max_length_desc  = max( $max_length_desc , strlen( $desc )) ;
+class ShowStats extends Maintenance {
+   public function __construct() {
+   $this-mDescription = Show the cached statistics;
+   }
+   public function execute() {
+   $fields = array(
+   'ss_total_views' = 'Total views',
+   'ss_total_edits' = 'Total edits',
+   'ss_good_articles' = 'Number of articles',
+   'ss_total_pages' = 'Total pages',
+   'ss_users' = 'Number of users',
+   'ss_admins' = 'Number of admins',
+   'ss_images' = 'Number of images',
+   );
+   
+   // Get cached stats from slave database
+   $dbr = wfGetDB( DB_SLAVE );
+   $stats = $dbr-selectRow( 'site_stats', '*', '', __METHOD__ );
+   
+   // Get maximum size for each column
+   $max_length_value = $max_length_desc = 0;
+   foreach( $fields as $field = $desc ) {
+   $max_length_value = max( $max_length_value, strlen( 
$stats-$field ) );
+   $max_length_desc  = max( $max_length_desc , strlen( 
$desc )) ;
+   }
+   
+   // Show them
+   foreach( $fields as $field = $desc ) {
+   $this-output( sprintf( %-{$max_length_desc}s: 
%{$max_length_value}d\n, $desc, $stats-$field ) );
+   }
+   }
 }
 
-// Show them
-foreach( $fields as $field = $desc ) {
-   printf( %-{$max_length_desc}s: %{$max_length_value}d\n, $desc, 
$stats-$field );
-}
+$maintClass = ShowStats;
+require_once( DO_MAINTENANCE );
 



___
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs


[MediaWiki-CVS] SVN: [51805] trunk

2009-06-12 Thread rotem
Revision: 51805
Author:   rotem
Date: 2009-06-12 20:38:32 + (Fri, 12 Jun 2009)

Log Message:
---
Localization update for he and fixing comment in en.

Modified Paths:
--
trunk/extensions/ProofreadPage/ProofreadPage.i18n.php
trunk/phase3/languages/messages/MessagesEn.php
trunk/phase3/languages/messages/MessagesHe.php
trunk/phase3/maintenance/language/messages.inc

Modified: trunk/extensions/ProofreadPage/ProofreadPage.i18n.php
===
--- trunk/extensions/ProofreadPage/ProofreadPage.i18n.php   2009-06-12 
20:37:12 UTC (rev 51804)
+++ trunk/extensions/ProofreadPage/ProofreadPage.i18n.php   2009-06-12 
20:38:32 UTC (rev 51805)
@@ -1086,8 +1086,10 @@
'proofreadpage_index' = 'אינדקס',
'proofreadpage_index_expected' = 'שגיאה: נדרש אינדקס',
'proofreadpage_nosuch_index' = 'שגיאה: אין אינדקס כזה',
+   'proofreadpage_nosuch_file' = 'שגיאה: אין קובץ כזה',
'proofreadpage_number_expected' = 'שגיאה: נדרש ערך מספרי',
'proofreadpage_interval_too_large' = 'שגיאה: המרווח גדול מדי',
+   'proofreadpage_invalid_interval' = 'שגיאה: מרווח בלתי תקין',
'proofreadpage_nextpage' = 'הדף הבא',
'proofreadpage_prevpage' = 'הדף הקודם',
'proofreadpage_header' = 'כותרת (לא להכללה):',

Modified: trunk/phase3/languages/messages/MessagesEn.php
===
--- trunk/phase3/languages/messages/MessagesEn.php  2009-06-12 20:37:12 UTC 
(rev 51804)
+++ trunk/phase3/languages/messages/MessagesEn.php  2009-06-12 20:38:32 UTC 
(rev 51805)
@@ -650,6 +650,7 @@
 'sitetitle'  = '{{SITENAME}}', # do not translate or duplicate this 
message to other languages
 'sitesubtitle'   = '', # do not translate or duplicate this message to other 
languages
 
+# Vector skin
 'vector-action-addsection'   = 'Add topic',
 'vector-action-delete'   = 'Delete',
 'vector-action-move' = 'Move',

Modified: trunk/phase3/languages/messages/MessagesHe.php
===
--- trunk/phase3/languages/messages/MessagesHe.php  2009-06-12 20:37:12 UTC 
(rev 51804)
+++ trunk/phase3/languages/messages/MessagesHe.php  2009-06-12 20:38:32 UTC 
(rev 51805)
@@ -470,6 +470,30 @@
 'faq'= 'שאלות ותשובות',
 'faqpage'= 'Project:שאלות ותשובות',
 
+# Vector skin
+'vector-action-addsection'   = 'הוספת נושא',
+'vector-action-delete'   = 'מחיקה',
+'vector-action-move' = 'העברה',
+'vector-action-protect'  = 'הגנה',
+'vector-action-undelete' = 'ביטול מחיקה',
+'vector-action-unprotect'= 'הסרת הגנה',
+'vector-namespace-category'  = 'קטגוריה',
+'vector-namespace-help'  = 'דף עזרה',
+'vector-namespace-image' = 'קובץ',
+'vector-namespace-main'  = 'דף',
+'vector-namespace-media' = 'דף מדיה',
+'vector-namespace-mediawiki' = 'הודעה',
+'vector-namespace-project'   = 'דף מיזם',
+'vector-namespace-special'   = 'דף מיוחד',
+'vector-namespace-talk'  = 'שיחה',
+'vector-namespace-template'  = 'תבנית',
+'vector-namespace-user'  = 'דף משתמש',
+'vector-view-create' = 'יצירה',
+'vector-view-edit'   = 'עריכה',
+'vector-view-history'= 'הצגת היסטוריה',
+'vector-view-view'   = 'קריאה',
+'vector-view-viewsource' = 'הצגת מקור',
+
 # Metadata in edit box
 'metadata_help' = 'מטא־דטה:',
 
@@ -489,7 +513,6 @@
 'permalink' = 'קישור קבוע',
 'print' = 'גרסה להדפסה',
 'edit'  = 'עריכה',
-'view'  = 'קריאה',
 'create'= 'יצירה',
 'editthispage'  = 'עריכת דף זה',
 'create-this-page'  = 'יצירת דף זה',

Modified: trunk/phase3/maintenance/language/messages.inc
===
--- trunk/phase3/maintenance/language/messages.inc  2009-06-12 20:37:12 UTC 
(rev 51804)
+++ trunk/phase3/maintenance/language/messages.inc  2009-06-12 20:38:32 UTC 
(rev 51805)
@@ -208,7 +208,6 @@
'permalink',
'print',
'edit',
-   'view',
'create',
'editthispage',
'create-this-page',
@@ -3056,6 +3055,7 @@
'mainpage'= '',
'miscellaneous1'  = '',
'cologneblue' = 'Cologne Blue skin',
+   'vector'  = 'Vector skin',
'metadata_help'   = 'Metadata in edit box',
'miscellaneous2'  = '',
'links'   = 'All link text and link target definitions of 
links into project namespace that get used by other message strings, with the 
exception of user group pages (see grouppage) and the disambiguation template 
definition (see disambiguations).',



___
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs


[MediaWiki-CVS] SVN: [51806] trunk/phase3/includes/db/Database.php

2009-06-12 Thread demon
Revision: 51806
Author:   demon
Date: 2009-06-12 21:54:29 + (Fri, 12 Jun 2009)

Log Message:
---
Expect DatabaseBase, not Database.

Modified Paths:
--
trunk/phase3/includes/db/Database.php

Modified: trunk/phase3/includes/db/Database.php
===
--- trunk/phase3/includes/db/Database.php   2009-06-12 20:38:32 UTC (rev 
51805)
+++ trunk/phase3/includes/db/Database.php   2009-06-12 21:54:29 UTC (rev 
51806)
@@ -2727,7 +2727,7 @@
 class DBQueryError extends DBError {
public $error, $errno, $sql, $fname;

-   function __construct( Database $db, $error, $errno, $sql, $fname ) {
+   function __construct( DatabaseBase $db, $error, $errno, $sql, $fname ) 
{
$message = A database error has occurred\n .
  Query: $sql\n .
  Function: $fname\n .



___
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs


[MediaWiki-CVS] SVN: [51807] trunk/phase3

2009-06-12 Thread tparscal
Revision: 51807
Author:   tparscal
Date: 2009-06-12 22:45:13 + (Fri, 12 Jun 2009)

Log Message:
---
Changed how the search UI is rendered.

Modified Paths:
--
trunk/phase3/includes/specials/SpecialSearch.php
trunk/phase3/skins/common/shared.css

Modified: trunk/phase3/includes/specials/SpecialSearch.php
===
--- trunk/phase3/includes/specials/SpecialSearch.php2009-06-12 21:54:29 UTC 
(rev 51806)
+++ trunk/phase3/includes/specials/SpecialSearch.php2009-06-12 22:45:13 UTC 
(rev 51807)
@@ -114,7 +114,7 @@
 * @param string $term
 */
public function showResults( $term ) {
-   global $wgOut, $wgUser, $wgDisableTextSearch, $wgContLang;
+   global $wgOut, $wgUser, $wgDisableTextSearch, $wgContLang, 
$wgScript;
wfProfileIn( __METHOD__ );
 
$sk = $wgUser-getSkin();
@@ -191,13 +191,22 @@
 
$this-didYouMeanHtml = 'div 
class=searchdidyoumean'.wfMsg('search-suggest',$suggestLink).'/div';
}
-
// start rendering the page
$wgOut-addHtml(
+   Xml::openElement(
+   'form',
+   array(
+   'id' = ( $this-searchAdvanced ? 
'powersearch' : 'search' ),
+   'method' = 'get',
+   'action' = $wgScript
+   )
+   )
+   );
+   $wgOut-addHtml(
Xml::openElement( 'table', array( 'border'=0, 
'cellpadding'=0, 'cellspacing'=0 ) ) .
Xml::openElement( 'tr' ) .
Xml::openElement( 'td' ) . \n .
-   ( $this-searchAdvanced ? $this-powerSearchBox( $term 
) : $this-shortDialog( $term ) ) .
+   $this-shortDialog( $term ) .
Xml::closeElement('td') .
Xml::closeElement('tr') .
Xml::closeElement('table')
@@ -212,14 +221,16 @@
 
$filePrefix = $wgContLang-getFormattedNsText(NS_FILE).':';
if( '' === trim( $term ) || $filePrefix === trim( $term ) ) {
-   $wgOut-addHTML( $this-searchAdvanced ? 
$this-powerSearchFocus() : $this-searchFocus() );
+   $wgOut-addHTML( $this-searchFocus() );
$wgOut-addHTML( $this-formHeader($term, 0, 0));
+   if( $this-searchAdvanced ) {
+   $wgOut-addHTML( $this-powerSearchBox( $term ) 
);
+   }
// Empty query -- straight view of search form
wfProfileOut( __METHOD__ );
return;
}
 
-
// Get number of results
$titleMatchesNum = $titleMatches ? $titleMatches-numRows() : 0;
$textMatchesNum = $textMatches ? $textMatches-numRows() : 0;
@@ -241,7 +252,11 @@

// show number of results and current offset
$wgOut-addHTML( $this-formHeader($term, $num, $totalRes));
+   if( $this-searchAdvanced ) {
+   $wgOut-addHTML( $this-powerSearchBox( $term ) );
+   }

+   $wgOut-addHtml( Xml::closeElement( 'form' ) );
$wgOut-addHtml( div class='searchresults' );

// show direct page/create link
@@ -266,7 +281,6 @@
wfRunHooks( 'SpecialSearchNoResults', array( $term ) );
} 
 
-   
if( $titleMatches ) {
if( $numTitleMatches  0 ) {
$wgOut-wrapWikiMsg( ==$1==\n, 'titlematches' 
);
@@ -299,7 +313,7 @@
}
$wgOut-addHtml( /div );
if( $num === 0 ) {
-   $wgOut-addHTML( $this-searchAdvanced ? 
$this-powerSearchFocus() : $this-searchFocus() );
+   $wgOut-addHTML( $this-searchFocus() );
}
 
if( $num || $this-offset ) {
@@ -690,58 +704,96 @@
 * @return $out string: HTML form
 */
protected function powerSearchBox( $term ) {
-   global $wgScript;
-
-   $namespaces = SearchEngine::searchableNamespaces();
-
-   $tables = $this-namespaceTables( $namespaces );
+   global $wgScript, $wgContLang;

-   // include redirects in the search
-   $redirect = Xml::check( 'redirs', $this-searchRedirects, 
array( 'value' = '1', 'id' = 'redirs' ) );
-   $redirectLabel = Xml::label( wfMsg( 'powersearch-redir' ), 
'redirs' );
-
-   $redirectText = '';
-  

[MediaWiki-CVS] SVN: [51808] trunk/phase3/includes/specials/SpecialSearch.php

2009-06-12 Thread rainman
Revision: 51808
Author:   rainman
Date: 2009-06-12 23:21:55 + (Fri, 12 Jun 2009)

Log Message:
---
Fix warning in r51807, $out is first used here so need = instead of .=

Modified Paths:
--
trunk/phase3/includes/specials/SpecialSearch.php

Modified: trunk/phase3/includes/specials/SpecialSearch.php
===
--- trunk/phase3/includes/specials/SpecialSearch.php2009-06-12 22:45:13 UTC 
(rev 51807)
+++ trunk/phase3/includes/specials/SpecialSearch.php2009-06-12 23:21:55 UTC 
(rev 51808)
@@ -907,7 +907,7 @@
protected function shortDialog( $term ) {
$searchTitle = SpecialPage::getTitleFor( 'Search' );
$searchable = SearchEngine::searchableNamespaces();
-   $out .= Xml::hidden( 'title', $searchTitle-getPrefixedText() ) 
. \n;
+   $out = Xml::hidden( 'title', $searchTitle-getPrefixedText() ) 
. \n;
// Keep redirect setting
$out .= Xml::hidden( redirs, (int)$this-searchRedirects );
// Term box



___
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs


[MediaWiki-CVS] SVN: [51811] trunk/phase3/includes/specials/SpecialSearch.php

2009-06-12 Thread rainman
Revision: 51811
Author:   rainman
Date: 2009-06-12 23:35:35 + (Fri, 12 Jun 2009)

Log Message:
---
Another follow-up for r51807: add a missing /form on pages without the 
advanced search

Modified Paths:
--
trunk/phase3/includes/specials/SpecialSearch.php

Modified: trunk/phase3/includes/specials/SpecialSearch.php
===
--- trunk/phase3/includes/specials/SpecialSearch.php2009-06-12 23:34:02 UTC 
(rev 51810)
+++ trunk/phase3/includes/specials/SpecialSearch.php2009-06-12 23:35:35 UTC 
(rev 51811)
@@ -225,7 +225,8 @@
$wgOut-addHTML( $this-formHeader($term, 0, 0));
if( $this-searchAdvanced ) {
$wgOut-addHTML( $this-powerSearchBox( $term ) 
);
-   }
+   } else
+   $wgOut-addHTML( '/form' );
// Empty query -- straight view of search form
wfProfileOut( __METHOD__ );
return;



___
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs


[MediaWiki-CVS] SVN: [51812] branches/new-upload/phase3

2009-06-12 Thread dale
Revision: 51812
Author:   dale
Date: 2009-06-12 23:45:20 + (Fri, 12 Jun 2009)

Log Message:
---
sequencer and add media wizard updates

Modified Paths:
--
branches/new-upload/phase3/includes/api/ApiUpload.php
branches/new-upload/phase3/js2/mwEmbed/libAddMedia/mvBaseUploadInterface.js
branches/new-upload/phase3/js2/mwEmbed/libAddMedia/remoteSearchDriver.js

branches/new-upload/phase3/js2/mwEmbed/libAddMedia/searchLibs/metavidSearch.js
branches/new-upload/phase3/js2/mwEmbed/libAddMedia/seqRemoteSearchDriver.js
branches/new-upload/phase3/js2/mwEmbed/libClipEdit/mvClipEdit.js
branches/new-upload/phase3/js2/mwEmbed/libEmbedVideo/embedVideo.js
branches/new-upload/phase3/js2/mwEmbed/libEmbedVideo/flashEmbed.js
branches/new-upload/phase3/js2/mwEmbed/libSequencer/mvSequencer.js
branches/new-upload/phase3/js2/mwEmbed/mv_embed.js
branches/new-upload/phase3/js2/mwEmbed/skins/mvpcf/styles.css

Modified: branches/new-upload/phase3/includes/api/ApiUpload.php
===
--- branches/new-upload/phase3/includes/api/ApiUpload.php   2009-06-12 
23:35:35 UTC (rev 51811)
+++ branches/new-upload/phase3/includes/api/ApiUpload.php   2009-06-12 
23:45:20 UTC (rev 51812)
@@ -75,7 +75,6 @@
$this-dieUsageMsg( $this-mUpload-status[ 
'error' ] );
 
}else if( $this-mParams['internalhttpsession'] ){
-   wfDebug(internalhttpsession:\n);
$sd =  $_SESSION['wsDownload'][ 
$this-mParams['internalhttpsession'] ];
 
//get the params from the init session:

Modified: 
branches/new-upload/phase3/js2/mwEmbed/libAddMedia/mvBaseUploadInterface.js
===
--- branches/new-upload/phase3/js2/mwEmbed/libAddMedia/mvBaseUploadInterface.js 
2009-06-12 23:35:35 UTC (rev 51811)
+++ branches/new-upload/phase3/js2/mwEmbed/libAddMedia/mvBaseUploadInterface.js 
2009-06-12 23:45:20 UTC (rev 51812)
@@ -343,7 +343,7 @@
}   
var bObj = {};
bObj[ gM('return-to-form') ] =  function(){
-   $(this).dialog('close');
+   $j(this).dialog('close');
 }; 
_this.updateProgressWin( gM('uploaderror'), 
gM('unknown-error') + 'br' + error_msg, bObj);
}else{
@@ -528,10 +528,11 @@
},
cancel_button:function(){
   var _this = this;
-  var cancel_txt = gM('cancel-button');
-  //@@todo should convice the jquery ui people to not use object keys 
as user msg's (or patch and move upstream) 
-  eval('var res = {' +gM('cancel-button') + ' : function(){  
_this.cancel_action(this); } }' );
-  return res;
+  var cancelBtn = new Array();
+  cancelBtn[ gM('cancel-button') ] =  function(){  
+   _this.cancel_action(this); 
+  };
+  return cancelBtn;
},  
cancel_action:function(dlElm){
//confirm:  

Modified: 
branches/new-upload/phase3/js2/mwEmbed/libAddMedia/remoteSearchDriver.js
===
--- branches/new-upload/phase3/js2/mwEmbed/libAddMedia/remoteSearchDriver.js
2009-06-12 23:35:35 UTC (rev 51811)
+++ branches/new-upload/phase3/js2/mwEmbed/libAddMedia/remoteSearchDriver.js
2009-06-12 23:45:20 UTC (rev 51812)
@@ -410,12 +410,12 @@
var _this = this;
//add the parent target_container if not provided or missing
if(!_this.target_container || 
$j(_this.target_container).length==0){
-   $j('body').append('div id=rsd_modal_target 
style=position:relative title=' + gM('add_media_wizard') + ' /div');
+   $j('body').append('div id=rsd_modal_target 
style=position:absolute;top:30px;left:0px;bottom:45px;right:0px title=' + 
gM('add_media_wizard') + ' /div');
_this.target_container = '#rsd_modal_target';
js_log('appended: #rsd_modal_target' + 
$j(_this.target_container).attr('id'));
js_log('added target id:' + 
$j(_this.target_container).attr('id'));
//get layout
-   //layout = _this.getMaxModalLayout();
+   //layout = _this.getMaxModalLayout();   
$j(_this.target_container).dialog({
bgiframe: true,
autoOpen: true,   
@@ -490,7 +490,7 @@
o+='/div';

//search provider tabs based on checked and enabled and 

[MediaWiki-CVS] SVN: [51813] trunk/phase3

2009-06-12 Thread siebrand
Revision: 51813
Author:   siebrand
Date: 2009-06-13 00:02:31 + (Sat, 13 Jun 2009)

Log Message:
---
Update Special:BrokenRedirects:
* add a message 'parentheses' ($1) so a parentheses enclosed list can be 
localised (hardcoded all over the place)
* put edit and delete link in parentheses together (changed messages 
'brokenredirects-delete' and 'brokenredirects-edit')
* convert deprecated makeBrokenLinkObj() to link()
* update indendation

Modified Paths:
--
trunk/phase3/includes/specials/SpecialBrokenRedirects.php
trunk/phase3/languages/messages/MessagesEn.php
trunk/phase3/maintenance/language/messageTypes.inc
trunk/phase3/maintenance/language/messages.inc

Modified: trunk/phase3/includes/specials/SpecialBrokenRedirects.php
===
--- trunk/phase3/includes/specials/SpecialBrokenRedirects.php   2009-06-12 
23:45:20 UTC (rev 51812)
+++ trunk/phase3/includes/specials/SpecialBrokenRedirects.php   2009-06-13 
00:02:31 UTC (rev 51813)
@@ -33,9 +33,9 @@
rd_namespace,
rd_title
   FROM $redirect AS rd
-   JOIN $page p1 ON (rd.rd_from=p1.page_id)
+ JOIN $page p1 ON (rd.rd_from=p1.page_id)
  LEFT JOIN $page AS p2 ON (rd_namespace=p2.page_namespace 
AND rd_title=p2.page_title )
- WHERE rd_namespace = 0
+ WHERE rd_namespace = 0
AND p2.page_namespace IS NULL;
return $sql;
}
@@ -45,7 +45,7 @@
}
 
function formatResult( $skin, $result ) {
-   global $wgUser, $wgContLang;
+   global $wgUser, $wgContLang, $wgLang;
 
$fromObj = Title::makeTitle( $result-namespace, $result-title 
);
if ( isset( $result-rd_title ) ) {
@@ -70,27 +70,34 @@
array(),
array( 'redirect' = 'no' )
);
-   $edit = $skin-linkKnown(
+   $links = array();
+   $links[] = $skin-linkKnown(
$fromObj,
wfMsgHtml( 'brokenredirects-edit' ),
array(),
array( 'action' = 'edit' )
);
-   $to   = $skin-makeBrokenLinkObj( $toObj );
+   $to   = $skin-link(
+   $toObj,
+   null,
+   array(),
+   array(),
+   array( 'broken' )
+   );
$arr = $wgContLang-getArrow();
 
-   $out = {$from} {$edit};
+   $out = $from . wfMsg( 'word-separator' );
 
if( $wgUser-isAllowed( 'delete' ) ) {
-   $delete = $skin-linkKnown(
+   $links[] = $skin-linkKnown(
$fromObj,
wfMsgHtml( 'brokenredirects-delete' ),
array(),
array( 'action' = 'delete' )
);
-   $out .=  {$delete};
}
 
+   $out .= wfMsg( 'parentheses', $wgLang-pipeList( $links ) );
$out .=  {$arr} {$to};
return $out;
}

Modified: trunk/phase3/languages/messages/MessagesEn.php
===
--- trunk/phase3/languages/messages/MessagesEn.php  2009-06-12 23:45:20 UTC 
(rev 51812)
+++ trunk/phase3/languages/messages/MessagesEn.php  2009-06-13 00:02:31 UTC 
(rev 51813)
@@ -2152,8 +2152,8 @@
 'brokenredirects' = 'Broken redirects',
 'brokenredirects-summary' = '', # do not translate or duplicate this message 
to other languages
 'brokenredirectstext' = 'The following redirects link to non-existent 
pages:',
-'brokenredirects-edit'= '(edit)',
-'brokenredirects-delete'  = '(delete)',
+'brokenredirects-edit'= 'edit',
+'brokenredirects-delete'  = 'delete',
 
 'withoutinterwiki' = 'Pages without language links',
 'withoutinterwiki-summary' = 'The following pages do not link to other 
language versions.',
@@ -3709,6 +3709,7 @@
 'word-separator'  = '#32;', # only translate this message to other 
languages if you have to change it
 'ellipsis'= '...', # only translate this message to other 
languages if you have to change it
 'percent' = '$1%', # only translate this message to other 
languages if you have to change it
+'parentheses' = '($1)', # only translate this message to other 
languages if you have to change it
 
 # Multipage image navigation
 'imgmultipageprev' = '← previous page',

Modified: trunk/phase3/maintenance/language/messageTypes.inc
===
---