[MediaWiki-CVS] SVN: [97235] trunk/extensions/CentralAuth/specials/SpecialMergeAccount.php

2011-09-16 Thread akshay
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97235

Revision: 97235
Author:   akshay
Date: 2011-09-16 06:05:39 + (Fri, 16 Sep 2011)
Log Message:
---
removed duplicate declaration of '' on line 31

Modified Paths:
--
trunk/extensions/CentralAuth/specials/SpecialMergeAccount.php

Property Changed:

trunk/extensions/CentralAuth/specials/SpecialMergeAccount.php

Modified: trunk/extensions/CentralAuth/specials/SpecialMergeAccount.php
===
--- trunk/extensions/CentralAuth/specials/SpecialMergeAccount.php   
2011-09-16 05:49:36 UTC (rev 97234)
+++ trunk/extensions/CentralAuth/specials/SpecialMergeAccount.php   
2011-09-16 06:05:39 UTC (rev 97235)
@@ -28,7 +28,7 @@
return;
}
 
-   global $wgUser, $wgRequest;
+   global $wgRequest;
$this-mUserName = $wgUser-getName();
 
$this-mAttemptMerge = $wgRequest-wasPosted();


Property changes on: 
trunk/extensions/CentralAuth/specials/SpecialMergeAccount.php
___
Added: eol-style
   + native


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


[MediaWiki-CVS] SVN: [97239] trunk/phase3/includes/revisiondelete/RevisionDeleter.php

2011-09-16 Thread nikerabbit
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97239

Revision: 97239
Author:   nikerabbit
Date: 2011-09-16 06:15:44 + (Fri, 16 Sep 2011)
Log Message:
---
* Fixed indentation
* Fixed assumption about message keys that was no longer true
* Ping r97207
* Clarified the part about null

Modified Paths:
--
trunk/phase3/includes/revisiondelete/RevisionDeleter.php

Modified: trunk/phase3/includes/revisiondelete/RevisionDeleter.php
===
--- trunk/phase3/includes/revisiondelete/RevisionDeleter.php2011-09-16 
06:13:57 UTC (rev 97238)
+++ trunk/phase3/includes/revisiondelete/RevisionDeleter.php2011-09-16 
06:15:44 UTC (rev 97239)
@@ -29,14 +29,17 @@
 
/**
 * Gets an array of message keys describing the changes made to the
- * visibility of the revision.
- *
- * If the resulting array is $arr, then $arr[0] will contain an array of
- * message keys describing the items that were hidden, $arr[1] will contain
-* an array of message keys describing the items that were unhidden, 
and $arr[2]
- * will contain an array with a single message key, which can be one of
- * revdelete-restricted, revdelete-unrestricted, or null, indicating 
(un)suppression.
+* visibility of the revision.
 *
+* If the resulting array is $arr, then $arr[0] will contain an array of
+* keys describing the items that were hidden, $arr[1] will contain
+* an array of keys describing the items that were unhidden, and $arr[2]
+* will contain an array with a single message key, which can be one of
+* revdelete-restricted, revdelete-unrestricted indicating 
(un)suppression
+* or null to indicate nothing in particular.
+* You can turn the keys in 0 and 1 into message keys by appendin -hid 
and
+* and -unhid to they keys respectively.
+*
 * @param $n Integer: the new bitfield.
 * @param $o Integer: the old bitfield.
 * @return An array as described above.


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


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

2011-09-16 Thread hashar
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97238

Revision: 97238
Author:   hashar
Date: 2011-09-16 06:13:57 + (Fri, 16 Sep 2011)
Log Message:
---
revert r97203

That code was not really meant to work :-D

Modified Paths:
--
trunk/phase3/RELEASE-NOTES-1.19
trunk/phase3/docs/hooks.txt
trunk/phase3/includes/ChangesList.php

Modified: trunk/phase3/RELEASE-NOTES-1.19
===
--- trunk/phase3/RELEASE-NOTES-1.19 2011-09-16 06:13:21 UTC (rev 97237)
+++ trunk/phase3/RELEASE-NOTES-1.19 2011-09-16 06:13:57 UTC (rev 97238)
@@ -61,9 +61,6 @@
   to stop it from replace an already existing default sort, and suppress error.
 * (bug 18578) Rewrote revision delete related messages to allow better
   localisation
-* New hook RecentChangesListRecentChangesLine which let you customize an
-  entire recent changes line for user with 'Enhanced recent changes' option
-  It is equivalent to the existing hook OldChangesListRecentChangesLine
 
 === Bug fixes in 1.19 ===
 * $wgUploadNavigationUrl should be used for file redlinks if

Modified: trunk/phase3/docs/hooks.txt
===
--- trunk/phase3/docs/hooks.txt 2011-09-16 06:13:21 UTC (rev 97237)
+++ trunk/phase3/docs/hooks.txt 2011-09-16 06:13:57 UTC (rev 97238)
@@ -1303,19 +1303,10 @@
in the message (bool)
 
 'OldChangesListRecentChangesLine': Customize entire Recent Changes line.
-you will also need to use the EnhancedChangesListRecentChangesLine to alter
-the output for user of enhanced recent changes.
 $changeslist: The OldChangesList instance.
 $s: HTML of the form li.../li containing one RC entry.
 $rc: The RecentChange object.
 
-'RecentChangesListRecentChangesLine': Customize entire Recent Changes line.
-you will also need to use the OldChangesListRecentChangesLine to alter
-the output for user of regular recent changes.
-$changeslist: The EnhancedChangesList instance.
-$s: HTML of the form li.../li containing one RC entry.
-$rc: The RecentChange object.
-
 'OpenSearchUrls': Called when constructing the OpenSearch description XML.
 Hooks can alter or append to the array of URLs for search  suggestion formats.
 $urls: array of associative arrays with Url element attributes

Modified: trunk/phase3/includes/ChangesList.php
===
--- trunk/phase3/includes/ChangesList.php   2011-09-16 06:13:21 UTC (rev 
97237)
+++ trunk/phase3/includes/ChangesList.php   2011-09-16 06:13:57 UTC (rev 
97238)
@@ -741,8 +741,6 @@
array_push( $this-rc_cache[$secureName], $rc );
}
 
-   wfRunHooks( 'EnhancedChangesListRecentChangesLine', 
array($this, $s, $rc) );
-
wfProfileOut( __METHOD__ );
 
return $ret;


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


[MediaWiki-CVS] SVN: [97236] branches/lqt-updates/extensions/LiquidThreads

2011-09-16 Thread werdna
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97236

Revision: 97236
Author:   werdna
Date: 2011-09-16 06:11:12 + (Fri, 16 Sep 2011)
Log Message:
---
LiquidThreads: instead of reloading the page, actually show changes in-place. 
TODO: replies currently show up threaded before refresh, but that does not 
reflect current behaviour

Modified Paths:
--
branches/lqt-updates/extensions/LiquidThreads/api/ApiLqtForm.php
branches/lqt-updates/extensions/LiquidThreads/classes/view/EditForm.php
branches/lqt-updates/extensions/LiquidThreads/classes/view/NewTopicForm.php
branches/lqt-updates/extensions/LiquidThreads/classes/view/PostEditForm.php
branches/lqt-updates/extensions/LiquidThreads/classes/view/ReplyForm.php
branches/lqt-updates/extensions/LiquidThreads/lqt.js

Modified: branches/lqt-updates/extensions/LiquidThreads/api/ApiLqtForm.php
===
--- branches/lqt-updates/extensions/LiquidThreads/api/ApiLqtForm.php
2011-09-16 06:05:39 UTC (rev 97235)
+++ branches/lqt-updates/extensions/LiquidThreads/api/ApiLqtForm.php
2011-09-16 06:11:12 UTC (rev 97236)
@@ -33,6 +33,9 @@
if ( $formResult ) {
$formOutput = array( 'submit' = 'success' );

+   $object = $form-getModifiedObject();
+   $formOutput['object'] = 
$object-getUniqueIdentifier();
+   
$result-addValue( null, 'form', $formOutput );
}
} else {
@@ -71,7 +74,8 @@
}

try {
-   $channel = LiquidThreadsChannel::newFromID( 
$params['channel'] );
+   $id = $params['channel'];
+   $channel = self::getObject( $id, 
'LiquidThreadsChannel' );
} catch ( MWException $excep ) {
$this-dieUsage( You must specify a valid 
channel, 'invalid-param' );
}
@@ -85,14 +89,16 @@
$replyPost = null;

try {
-   $topic = LiquidThreadsTopic::newFromID( 
$params['topic'] );
+   $topicID = $params['topic'];
+   $topic = self::getObject( $topicID, 
'LiquidThreadsTopic' );
} catch ( MWException $e ) {
$this-dieUsage( You must specify a valid 
topic, 'invalid-param' );
}

if ( $params['reply-post'] ) {
+   $replyPostID = $params['reply-post'];
try {
-   $replyPost = 
LiquidThreadsPost::newFromID( $params['reply-post'] );
+   $replyPost = self::getObject( 
$replyPostID, 'LiquidThreadsPost' );
} catch ( MWException $e ) {
$this-dieUsage( Invalid reply-post, 
'invalid-param' );
}
@@ -105,7 +111,7 @@
}

try {
-   $post = LiquidThreadsPost::newFromID( 
$params['post'] );
+   $post = self::getObject( $params['post'], 
'LiquidThreadsPost' );
} catch ( MWException $e ) {
$this-dieUsage( Invalid post, 
'invalid-param' );
}
@@ -116,6 +122,27 @@
}
}

+   /**
+* Retrieves an object by user-supplied ID
+* @param $id The object ID, may be either an integer ID specific
+* to the given class or a LiquidThreads unique identifier suitable for
+* passing to LiquidThreadsObject::retrieve()
+* @param $class The class of object to retrieve.
+*/
+   protected static function getObject( $id, $class ) {
+   if ( is_numeric($id) ) {
+   $object = $class::newFromId( $id );
+   } else {
+   $object = LiquidThreadsObject::retrieve($id);
+   
+   if ( ! $object instanceof $class ) {
+   throw new MWException( $id does not represent 
a $class );
+   }
+   }
+   
+   return $object;
+   }
+   
public function getAllowedParams() {
return array(
'form' = array(

Modified: 
branches/lqt-updates/extensions/LiquidThreads/classes/view/EditForm.php

[MediaWiki-CVS] SVN: [97241] branches/lqt-updates/extensions/LiquidThreads/classes/view/ PostToolbar.php

2011-09-16 Thread werdna
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97241

Revision: 97241
Author:   werdna
Date: 2011-09-16 06:23:49 + (Fri, 16 Sep 2011)
Log Message:
---
Fix typo

Modified Paths:
--
branches/lqt-updates/extensions/LiquidThreads/classes/view/PostToolbar.php

Modified: 
branches/lqt-updates/extensions/LiquidThreads/classes/view/PostToolbar.php
===
--- branches/lqt-updates/extensions/LiquidThreads/classes/view/PostToolbar.php  
2011-09-16 06:23:48 UTC (rev 97240)
+++ branches/lqt-updates/extensions/LiquidThreads/classes/view/PostToolbar.php  
2011-09-16 06:23:49 UTC (rev 97241)
@@ -169,10 +169,10 @@
$version = $context-get('version');
 
// TODO make this link operate properly
-   $history_url = SpecialPage::getTitleFor( 'PostHistory', 
$post-getID() );
+   $history = SpecialPage::getTitleFor( 'PostHistory', 
$post-getID() );
$commands['history'] = array(
'label' = wfMsgExt( 'history_short', 'parseinline' ),
-   'href' = $history_url,
+   'href' = $history-getFullURL(),
'enabled' = true,
);



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


[MediaWiki-CVS] SVN: [97237] branches/lqt-updates/extensions/LiquidThreads/lqt.js

2011-09-16 Thread werdna
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97237

Revision: 97237
Author:   werdna
Date: 2011-09-16 06:13:21 + (Fri, 16 Sep 2011)
Log Message:
---
Make comments always threaded instead of always not, for now.

Modified Paths:
--
branches/lqt-updates/extensions/LiquidThreads/lqt.js

Modified: branches/lqt-updates/extensions/LiquidThreads/lqt.js
===
--- branches/lqt-updates/extensions/LiquidThreads/lqt.js2011-09-16 
06:11:12 UTC (rev 97236)
+++ branches/lqt-updates/extensions/LiquidThreads/lqt.js2011-09-16 
06:13:21 UTC (rev 97237)
@@ -47,10 +47,8 @@
var topicID = liquidThreads.removePrefix( topicContainer.id, 
'lqt-topic_' );
var params = { 'form' : 'reply', 'topic' : topicID };

-   if ( $j(postContainer).parent()[0] != topicContainer ) {
-   var postID = liquidThreads.removePrefix( 
postContainer.id, 'lqt-post_' );
-   params['reply-post'] = postID;
-   }
+   var postID = liquidThreads.removePrefix( postContainer.id, 
'lqt-post_' );
+   params['reply-post'] = postID;
 
var repliesElement = 
$j(postContainer).contents().filter('.lqt-replies');
var replyDiv = 
repliesElement.contents().filter('.lqt-reply-form');


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


[MediaWiki-CVS] SVN: [97240] trunk/phase3/includes/revisiondelete/RevisionDeleter.php

2011-09-16 Thread nikerabbit
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97240

Revision: 97240
Author:   nikerabbit
Date: 2011-09-16 06:23:48 + (Fri, 16 Sep 2011)
Log Message:
---
Improve r97239 with comments from Aaron. Also fixed another typo that was 
lurking there.

Modified Paths:
--
trunk/phase3/includes/revisiondelete/RevisionDeleter.php

Modified: trunk/phase3/includes/revisiondelete/RevisionDeleter.php
===
--- trunk/phase3/includes/revisiondelete/RevisionDeleter.php2011-09-16 
06:15:44 UTC (rev 97239)
+++ trunk/phase3/includes/revisiondelete/RevisionDeleter.php2011-09-16 
06:23:48 UTC (rev 97240)
@@ -37,8 +37,8 @@
 * will contain an array with a single message key, which can be one of
 * revdelete-restricted, revdelete-unrestricted indicating 
(un)suppression
 * or null to indicate nothing in particular.
-* You can turn the keys in 0 and 1 into message keys by appendin -hid 
and
-* and -unhid to they keys respectively.
+* You can turn the keys in $arr[0] and $arr[1] into message keys by
+* appending -hid and and -unhid to the keys respectively.
 *
 * @param $n Integer: the new bitfield.
 * @param $o Integer: the old bitfield.


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


[MediaWiki-CVS] SVN: [97244] branches/lqt-updates/extensions/LiquidThreads/classes/view

2011-09-16 Thread werdna
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97244

Revision: 97244
Author:   werdna
Date: 2011-09-16 06:51:27 + (Fri, 16 Sep 2011)
Log Message:
---
LiquidThreads: Fix a few more URLs, implement non-AJAX edit form

Modified Paths:
--
branches/lqt-updates/extensions/LiquidThreads/classes/view/PostEditForm.php
branches/lqt-updates/extensions/LiquidThreads/classes/view/PostFormatter.php
branches/lqt-updates/extensions/LiquidThreads/classes/view/PostToolbar.php

Modified: 
branches/lqt-updates/extensions/LiquidThreads/classes/view/PostEditForm.php
===
--- branches/lqt-updates/extensions/LiquidThreads/classes/view/PostEditForm.php 
2011-09-16 06:34:00 UTC (rev 97243)
+++ branches/lqt-updates/extensions/LiquidThreads/classes/view/PostEditForm.php 
2011-09-16 06:51:27 UTC (rev 97244)
@@ -39,7 +39,7 @@
protected function getSummaryBox() {
$label = wfMsg( 'summary' );
return Xml::inputLabel( $label, 'lqt-summary',
-   'lqt-summary', 60, $subject ) .
+   'lqt-summary', 60 ) .
Xml::element( 'br' );
}


Modified: 
branches/lqt-updates/extensions/LiquidThreads/classes/view/PostFormatter.php
===
--- 
branches/lqt-updates/extensions/LiquidThreads/classes/view/PostFormatter.php
2011-09-16 06:34:00 UTC (rev 97243)
+++ 
branches/lqt-updates/extensions/LiquidThreads/classes/view/PostFormatter.php
2011-09-16 06:51:27 UTC (rev 97244)
@@ -157,7 +157,23 @@
if ( $showAnything  $this-runCallback( $object, $context ) ) 
{
$html .= Xml::openElement( 'div', array( 'class' = 
$divClass ) );

-   $text = $version-getContentHTML();
+   if ( $context-getActionFor( $object ) == 'edit' ) {
+   $form = new LiquidThreadsPostEditForm(
+   $context-get('user'),
+   $object
+   );
+   $formResult = $form-show();
+   
+   if ( $formResult === true ) {
+   $object = $form-getModifiedObject();
+   $version = $object-getCurrentVersion();
+   $text .= $version-getContentHTML();
+   } else {
+   $text = $formResult;
+   }
+   } else {
+   $text = $version-getContentHTML();
+   }

$html .= $text;
 

Modified: 
branches/lqt-updates/extensions/LiquidThreads/classes/view/PostToolbar.php
===
--- branches/lqt-updates/extensions/LiquidThreads/classes/view/PostToolbar.php  
2011-09-16 06:34:00 UTC (rev 97243)
+++ branches/lqt-updates/extensions/LiquidThreads/classes/view/PostToolbar.php  
2011-09-16 06:51:27 UTC (rev 97244)
@@ -124,7 +124,6 @@
 
$replyLink = wfAppendQuery( $context-get('base-url'), 
$replyQuery );
 
-   // TODO permissions checking, proper URL
$commands['reply'] = array(
'label' = wfMsgExt( 'lqt_reply', 'parseinline' ),
 'href' = $replyLink,
@@ -172,12 +171,18 @@
$history = SpecialPage::getTitleFor( 'PostHistory', 
$post-getID() );
$commands['history'] = array(
'label' = wfMsgExt( 'history_short', 'parseinline' ),
-   'href' = $history-getFullURL(),
+   'href' = $history-getLocalURL(),
'enabled' = true,
);

// TODO permissions checking
-   $edit_url = SpecialPage::getTitleFor( 'EditPost', 
$post-getID() );
+   $editQuery = array(
+   'lqt_action' = 'edit',
+   'lqt_target' = $post-getUniqueIdentifier(),
+   );
+   
+   $edit_url = wfAppendQuery( $context-get('base-url'), 
$editQuery );
+   
$commands['edit'] = array(
'label' = wfMsgExt( 'edit', 'parseinline' ),
'href' = $edit_url,
@@ -188,7 +193,7 @@
$splitUrl = SpecialPage::getTitleFor( 'SplitThread', 
$post-getID() )-getFullURL();
$commands['split'] = array(
'label' = wfMsgExt( 'lqt-thread-split', 
'parseinline' ),
-

[MediaWiki-CVS] SVN: [97245] branches/ariel/xmldumps-backup/worker.py

2011-09-16 Thread ariel
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97245

Revision: 97245
Author:   ariel
Date: 2011-09-16 07:40:24 + (Fri, 16 Sep 2011)
Log Message:
---
redo checkpoint file for history 7z step

Modified Paths:
--
branches/ariel/xmldumps-backup/worker.py

Modified: branches/ariel/xmldumps-backup/worker.py
===
--- branches/ariel/xmldumps-backup/worker.py2011-09-16 06:51:27 UTC (rev 
97244)
+++ branches/ariel/xmldumps-backup/worker.py2011-09-16 07:40:24 UTC (rev 
97245)
@@ -609,7 +609,7 @@
  metahistory7zdump,
  All pages with complete edit history 
(.7z),
  These dumps can be *very* large, 
uncompressing up to 100 times the archive download size.  +
- Suitable for archival and 
statistical use, most mirror sites won't want or need this., 
self.findItemByName('metahistorybz2dump'), self.wiki, 
self._getChunkToDo(metahistory7zdump), 
self.chunkInfo.getPagesPerChunkHistory(), self.checkpointFile))
+ Suitable for archival and 
statistical use, most mirror sites won't want or need this., 
self.findItemByName('metahistorybz2dump'), self.wiki, 
self._getChunkToDo(metahistory7zdump), 
self.chunkInfo.getPagesPerChunkHistory(), checkpoints, self.checkpointFile))
if (self.chunkInfo.chunksEnabled() and 
self.chunkInfo.recombineHistory()):
self.dumpItems.append(

RecombineXmlRecompressDump(metahistory7zdumprecombine,
@@ -1814,9 +1814,7 @@
# of that very file. meh. how likely is 
it that we 
# have one? these files are time based 
and the start/end pageids
# are going to fluctuate. whatever
-   cf = DumpFilename(self.wiki)
-   cf.newFromFilename(item.checkpointFile)
-   checkpoint = cf.checkpoint
+   checkpoint = 
item.checkpointFile.checkpoint
 
for d in dumpNames:

self.symLinks.removeSymLinksFromOldRuns(self.wiki.date, d, chunk, checkpoint )
@@ -3135,7 +3133,7 @@
 class XmlRecompressDump(Dump):
Take a .bz2 and recompress it as 7-Zip.
 
-   def __init__(self, subset, name, desc, detail, itemForRecompression, 
wiki, chunkToDo, chunks = False, checkpoints = False):
+   def __init__(self, subset, name, desc, detail, itemForRecompression, 
wiki, chunkToDo, chunks = False, checkpoints = False, checkpointFile = None):
self._subset = subset
self._detail = detail
self._chunks = chunks
@@ -3146,6 +3144,7 @@
self.itemForRecompression = itemForRecompression
if checkpoints:
self._checkpointsEnabled = True
+   self.checkpointFile = checkpointFile
Dump.__init__(self, name, desc)
 
def getDumpName(self):
@@ -3182,7 +3181,11 @@
commands = []
# Remove prior 7zip attempts; 7zip will try to append to an 
existing archive
self.cleanupOldFiles(runner.dumpDir)
-   if self._chunksEnabled and not self._chunkToDo:
+   if self.checkpointFile:
+   outputFile = DumpFilename(self.wiki, None, 
self.checkpointFile.dumpName, self.checkpointFile.fileType, self.fileExt, 
self.checkpointFile.chunk, self.checkpointFile.checkpoint) 
+   series = self.buildCommand(runner, [ outputFile ])
+   commands.append(series)
+   elif self._chunksEnabled and not self._chunkToDo:
# must set up each parallel job separately, they may 
have checkpoint files that
# need to be processed in series, it's a special case
for i in range(1, len(self._chunks)+1):


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


[MediaWiki-CVS] SVN: [97246] trunk/extensions/Translate/TranslateEditAddons.php

2011-09-16 Thread nikerabbit
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97246

Revision: 97246
Author:   nikerabbit
Date: 2011-09-16 07:43:44 + (Fri, 16 Sep 2011)
Log Message:
---
Pass the correct variable (revision number instead of rev object/null) to the 
hook

Modified Paths:
--
trunk/extensions/Translate/TranslateEditAddons.php

Modified: trunk/extensions/Translate/TranslateEditAddons.php
===
--- trunk/extensions/Translate/TranslateEditAddons.php  2011-09-16 07:40:24 UTC 
(rev 97245)
+++ trunk/extensions/Translate/TranslateEditAddons.php  2011-09-16 07:43:44 UTC 
(rev 97246)
@@ -339,7 +339,7 @@
MessageGroupStats::clear( $handle );
 
if ( $fuzzy === false ) {
-   wfRunHooks( 'Translate:newTranslation', array( $handle, 
$revision, $text, $user ) );
+   wfRunHooks( 'Translate:newTranslation', array( $handle, 
$rev, $text, $user ) );
}
 
return true;


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


[MediaWiki-CVS] SVN: [97242] branches/lqt-updates/extensions/LiquidThreads/api

2011-09-16 Thread werdna
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97242

Revision: 97242
Author:   werdna
Date: 2011-09-16 06:32:57 + (Fri, 16 Sep 2011)
Log Message:
---
svn:keywords -- Id for api modules

Modified Paths:
--
branches/lqt-updates/extensions/LiquidThreads/api/ApiLqtForm.php
branches/lqt-updates/extensions/LiquidThreads/api/ApiLqtFormatter.php

Property Changed:

branches/lqt-updates/extensions/LiquidThreads/api/ApiLqtForm.php
branches/lqt-updates/extensions/LiquidThreads/api/ApiLqtFormatter.php

Modified: branches/lqt-updates/extensions/LiquidThreads/api/ApiLqtForm.php
===
--- branches/lqt-updates/extensions/LiquidThreads/api/ApiLqtForm.php
2011-09-16 06:23:49 UTC (rev 97241)
+++ branches/lqt-updates/extensions/LiquidThreads/api/ApiLqtForm.php
2011-09-16 06:32:57 UTC (rev 97242)
@@ -175,6 +175,6 @@
}
 
public function getVersion() {
-   return __CLASS__ . ': $Id: ApiLqtForm.php 79941 2011-01-10 
17:18:57Z hartman $';
+   return __CLASS__ . ': $Id$';
}   
 }


Property changes on: 
branches/lqt-updates/extensions/LiquidThreads/api/ApiLqtForm.php
___
Added: svn:keywords
   + Id

Modified: branches/lqt-updates/extensions/LiquidThreads/api/ApiLqtFormatter.php
===
--- branches/lqt-updates/extensions/LiquidThreads/api/ApiLqtFormatter.php   
2011-09-16 06:23:49 UTC (rev 97241)
+++ branches/lqt-updates/extensions/LiquidThreads/api/ApiLqtFormatter.php   
2011-09-16 06:32:57 UTC (rev 97242)
@@ -84,6 +84,6 @@
}
 
public function getVersion() {
-   return __CLASS__ . ': $Id: ApiLqtForm.php 79941 2011-01-10 
17:18:57Z hartman $';
+   return __CLASS__ . ': $Id$';
}   
 }


Property changes on: 
branches/lqt-updates/extensions/LiquidThreads/api/ApiLqtFormatter.php
___
Added: svn:keywords
   + Id


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


[MediaWiki-CVS] SVN: [97247] trunk/extensions/Translate/utils/MessageGroupStats.php

2011-09-16 Thread nikerabbit
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97247

Revision: 97247
Author:   nikerabbit
Date: 2011-09-16 08:02:39 + (Fri, 16 Sep 2011)
Log Message:
---
Check for empty arrays to prevent fatal errors

Modified Paths:
--
trunk/extensions/Translate/utils/MessageGroupStats.php

Modified: trunk/extensions/Translate/utils/MessageGroupStats.php
===
--- trunk/extensions/Translate/utils/MessageGroupStats.php  2011-09-16 
07:43:44 UTC (rev 97246)
+++ trunk/extensions/Translate/utils/MessageGroupStats.php  2011-09-16 
08:02:39 UTC (rev 97247)
@@ -107,12 +107,14 @@
}
 
public static function clearGroup( $id ) {
+   if ( !count( $id ) ) return;
$dbw = wfGetDB( DB_MASTER );
$conds = array( 'tgs_group' = $id );
$dbw-delete( self::TABLE, $conds, __METHOD__ );
}
 
public static function clearLanguage( $code ) {
+   if ( !count( $code ) ) return;
$dbw = wfGetDB( DB_MASTER );
$conds = array( 'tgs_lang' = $code );
$dbw-delete( self::TABLE, $conds, __METHOD__ );


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


[MediaWiki-CVS] SVN: [97248] trunk/extensions/CentralAuth

2011-09-16 Thread nikerabbit
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97248

Revision: 97248
Author:   nikerabbit
Date: 2011-09-16 08:27:54 + (Fri, 16 Sep 2011)
Log Message:
---
Followup r96653. Reduced the amount of constant markup in the message.

Modified Paths:
--
trunk/extensions/CentralAuth/CentralAuth.i18n.php
trunk/extensions/CentralAuth/specials/SpecialMergeAccount.php

Modified: trunk/extensions/CentralAuth/CentralAuth.i18n.php
===
--- trunk/extensions/CentralAuth/CentralAuth.i18n.php   2011-09-16 08:02:39 UTC 
(rev 97247)
+++ trunk/extensions/CentralAuth/CentralAuth.i18n.php   2011-09-16 08:27:54 UTC 
(rev 97248)
@@ -18,7 +18,7 @@
'centralauth-desc'   = '[[Special:MergeAccount|Merge 
account]] across wikis of {{int:Centralauth-groupname}}',
'centralauth-mergeaccount-desc'  = '[[Special:MergeAccount|Merges 
multiple accounts]] for Single User Login',
'centralauth-merge-denied'   = 'Sorry, you do not have permission 
to access this page.',
-   'centralauth-merge-notlogged'= 'Please span 
class=plainlinks[{{fullurl:{{#special:UserLogin}}|returnto={{urlencode:{{#special:MergeAccount}}|WIKI
 log in]/span to check if your accounts have been fully merged.',
+   'centralauth-merge-notlogged'= 'Please span 
class=plainlinks[$1 log in]/span to check if your accounts have been fully 
merged.',
'centralauth-merge-welcome'  = '''Your user account has not yet 
been migrated to the unified login system of {{int:Centralauth-groupname}}.'''
 
 If you choose to migrate your accounts, you will be able to use the same 
username and password to log in to all wikis of {{int:Centralauth-groupname}} 
in all available languages.

Modified: trunk/extensions/CentralAuth/specials/SpecialMergeAccount.php
===
--- trunk/extensions/CentralAuth/specials/SpecialMergeAccount.php   
2011-09-16 08:02:39 UTC (rev 97247)
+++ trunk/extensions/CentralAuth/specials/SpecialMergeAccount.php   
2011-09-16 08:27:54 UTC (rev 97248)
@@ -16,7 +16,9 @@
}
 
if ( !$wgUser-isLoggedIn() ) {
-   $wgOut-addWikiMsg( 'centralauth-merge-notlogged' );
+   $loginpage = SpecialPage::getTitleFor( 'Userlogin' );
+   $loginurl = $loginpage-getFullUrl( array( 'returnto' 
= $this-getTitle-getPrefixedText() ) );
+   $wgOut-addWikiMsg( 'centralauth-merge-notlogged', 
$loginurl );
$wgOut-addWikiMsg( 'centralauth-readmore-text' );
 
return;


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


[MediaWiki-CVS] SVN: [97249] trunk/extensions/Translate/specials/SpecialTranslationStats. php

2011-09-16 Thread nikerabbit
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97249

Revision: 97249
Author:   nikerabbit
Date: 2011-09-16 09:50:33 + (Fri, 16 Sep 2011)
Log Message:
---
Allow specifying start date for graphs. Adapted from Wikia code.

Modified Paths:
--
trunk/extensions/Translate/specials/SpecialTranslationStats.php

Modified: trunk/extensions/Translate/specials/SpecialTranslationStats.php
===
--- trunk/extensions/Translate/specials/SpecialTranslationStats.php 
2011-09-16 08:27:54 UTC (rev 97248)
+++ trunk/extensions/Translate/specials/SpecialTranslationStats.php 
2011-09-16 09:50:33 UTC (rev 97249)
@@ -37,6 +37,7 @@
$opts-add( 'height', 400 );
$opts-add( 'group', '' );
$opts-add( 'uselang', '' );
+   $opts-add( 'start', '' );
$opts-fetchValuesFromRequest( $wgRequest );
 
$pars = explode( ';', $par );
@@ -55,6 +56,9 @@
$opts-validateIntBounds( 'days', 1, 1 );
$opts-validateIntBounds( 'width', 200, 1000 );
$opts-validateIntBounds( 'height', 200, 1000 );
+   if ( $opts['start'] !== '' ) {
+   $opts['start'] = strval( wfTimestamp( TS_MW, 
$opts['start'] ) );
+   }
 
$validScales = array( 'months', 'weeks', 'days', 'hours' );
if ( !in_array( $opts['scale'], $validScales ) ) {
@@ -126,6 +130,7 @@
$this-eInput( 'width', $opts ) .
$this-eInput( 'height', $opts ) .
'trtd colspan=2hr //td/tr' .
+   $this-eInput( 'start', $opts, 12 ) .
$this-eInput( 'days', $opts ) .
$this-eRadio( 'scale', $opts, array( 'months', 
'weeks', 'days', 'hours' ) ) .
$this-eRadio( 'count', $opts, array( 'edits', 'users', 
'registrations' ) ) .
@@ -182,12 +187,12 @@
 * @param $opts FormOptions
 * @return \string Html.
 */
-   protected function eInput( $name, FormOptions $opts ) {
+   protected function eInput( $name, FormOptions $opts, $width = 4 ) {
$value = $opts[$name];
 
return
'trtd' . $this-eLabel( $name ) . '/tdtd' .
-   Xml::input( $name, 4, $value, array( 'id' = $name ) ) .
+   Xml::input( $name, $width, $value, array( 'id' = $name 
) ) .
'/td/tr' . \n;
}
 
@@ -354,37 +359,33 @@
$so = new TranslatePerLanguageStats( $opts );
}
 
+   $fixedStart = $opts-getValue( 'start' ) !== '';
+
$now = time();
+   $period = 3600 * 24 * $opts-getValue( 'days' );
 
-   /* Ensure that the first item in the graph has full data even
-* if it doesn't align with the given 'days' boundary */
-   $cutoff = $now - ( 3600 * 24 * $opts-getValue( 'days' ) );
-   if ( $opts['scale'] === 'hours' ) {
-   $cutoff -= ( $cutoff % 3600 );
-   } elseif ( $opts['scale'] === 'days' ) {
-   $cutoff -= ( $cutoff % 86400 );
-   } elseif ( $opts['scale'] === 'weeks' ) {
-   /* Here we assume that week starts on monday, which 
does not
-* always hold true. Go backwards day by day until we 
are on monday */
-   while ( date( 'D', $cutoff ) !== Mon ) {
-   $cutoff -= 86400;
-   }
-   $cutoff -= ( $cutoff % 86400 );
-   } elseif ( $opts['scale'] === 'months' ) {
-   // Go backwards day by day until we are on the first 
day of the month
-   while ( date( 'j', $cutoff ) !== 1 ) {
-   $cutoff -= 86400;
-   }
-   $cutoff -= ( $cutoff % 86400 );
+   if ( $fixedStart ) {
+   $cutoff = wfTimestamp( TS_UNIX, $opts-getValue( 
'start' ) );
+   } else {
+   $cutoff = $now - $period;
}
+   $cutoff = self::roundTimestampToCutoff( $opts['scale'], 
$cutoff, 'earlier' );
 
+   $start = $cutoff;
+
+   if ( $fixedStart ) {
+   $end = self::roundTimestampToCutoff( $opts['scale'], 
$start + $period, 'later' ) -1;
+   } else {
+   $end = null;
+   }
+
$tables = array();
$fields = array();
$conds = array();
$type = __METHOD__;
$options = array();
 
-   $so-preQuery( $tables, $fields, $conds, $type, $options, 
$cutoff );
+   $so-preQuery( $tables, 

[MediaWiki-CVS] SVN: [97250] trunk/extensions/Narayam

2011-09-16 Thread junaidpv
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97250

Revision: 97250
Author:   junaidpv
Date: 2011-09-16 09:58:55 + (Fri, 16 Sep 2011)
Log Message:
---
Adds Assamese support in Narayam. Adds four schemes: transliteration, Avro, 
Bornona and Inscript.

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

Added Paths:
---
trunk/extensions/Narayam/js/ext.narayam.rules.as-avro.js
trunk/extensions/Narayam/js/ext.narayam.rules.as-bornona.js
trunk/extensions/Narayam/js/ext.narayam.rules.as-inscript.js
trunk/extensions/Narayam/js/ext.narayam.rules.as.js

Modified: trunk/extensions/Narayam/Narayam.i18n.php
===
--- trunk/extensions/Narayam/Narayam.i18n.php   2011-09-16 09:50:33 UTC (rev 
97249)
+++ trunk/extensions/Narayam/Narayam.i18n.php   2011-09-16 09:58:55 UTC (rev 
97250)
@@ -22,6 +22,10 @@
'narayam-help-page' = 'Help:Typing',
'narayam-checkbox-tooltip' = 'To toggle input method on and off', // 
FIXME: better message
'narayam-disable-preference' = 'Disable Narayam Input Method Editor 
(IME)',
+   'narayam-as' = 'Assamese Transliteration',
+   'narayam-as-avro' = 'Assamese Avro',
+   'narayam-as-bornona' = 'Assamese Bornona',
+   'narayam-as-inscript' = 'Assamese InScript',
'narayam-eo' = 'Esperanto',
'narayam-hi-inscript' = 'Hindi InScript',
'narayam-kn' = 'Kannada Transliteration',

Modified: trunk/extensions/Narayam/Narayam.php
===
--- trunk/extensions/Narayam/Narayam.php2011-09-16 09:50:33 UTC (rev 
97249)
+++ trunk/extensions/Narayam/Narayam.php2011-09-16 09:58:55 UTC (rev 
97250)
@@ -44,6 +44,12 @@
 // Array mapping language codes and scheme names to module names
 // Custom schemes can be added here
 $wgNarayamSchemes = array(
+   'as' = array(
+   'as' = 'ext.narayam.rules.as',
+   'as-avro' = 'ext.narayam.rules.as-avro',
+   'as-bornona' = 'ext.narayam.rules.as-bornona',
+   'as-inscript' = 'ext.narayam.rules.as-inscript',
+   ),
'bn' = array(
'bn-avro' = 'ext.narayam.rules.bn-avro',
'bn-inscript' = 'ext.narayam.rules.bn-inscript',
@@ -140,6 +146,26 @@
),
'dependencies' = array( 'mediawiki.util', 'jquery.textSelection' ),
 );
+$wgResourceModules['ext.narayam.rules.as'] = $narayamTpl + array(
+   'scripts' = 'js/ext.narayam.rules.as.js',
+   'messages' = array( 'narayam-as' ),
+   'dependencies' = 'ext.narayam.core',
+);
+$wgResourceModules['ext.narayam.rules.as-avro'] = $narayamTpl + array(
+   'scripts' = 'js/ext.narayam.rules.as-avro.js',
+   'messages' = array( 'narayam-as-avro' ),
+   'dependencies' = 'ext.narayam.core',
+);
+$wgResourceModules['ext.narayam.rules.as-bornona'] = $narayamTpl + array(
+   'scripts' = 'js/ext.narayam.rules.as-bornona.js',
+   'messages' = array( 'narayam-as-bornona' ),
+   'dependencies' = 'ext.narayam.core',
+);
+$wgResourceModules['ext.narayam.rules.as-inscript'] = $narayamTpl + array(
+   'scripts' = 'js/ext.narayam.rules.as-inscript.js',
+   'messages' = array( 'narayam-as-inscript' ),
+   'dependencies' = 'ext.narayam.core',
+);
 $wgResourceModules['ext.narayam.rules.bn-avro'] = $narayamTpl + array(
'scripts' = 'js/ext.narayam.rules.bn-avro.js',
'messages' = array( 'narayam-bn-avro' ),

Added: trunk/extensions/Narayam/js/ext.narayam.rules.as-avro.js
===
--- trunk/extensions/Narayam/js/ext.narayam.rules.as-avro.js
(rev 0)
+++ trunk/extensions/Narayam/js/ext.narayam.rules.as-avro.js2011-09-16 
09:58:55 UTC (rev 97250)
@@ -0,0 +1,168 @@
+/**
+ * Avro layout regular expression rules table for Assamese script
+ * @author Junaid P V ([[user:Junaidpv]])
+ * @date 2010-12-05
+ * @credits Derived from Bengali Avro layout by changing the characters for 
Assamese
+ * License: GPLv3, CC-BY-SA 3.0
+ */
+
+var rules = [
+['([ক-হড়ঢ়য়ৰ])্?ৰৰi','[^o`]', '$1ৃ'],
+['ৰৰi','[^o`]', 'ঋ'],
+
+['(([ক-হড়ঢ়য়ৰ])|য়)o','[^o`]', '$1'], // য় cannot be included in the range, why? 
everywhere else it is OK!
+['([ক-হড়ঢ়য়ৰ])a','[^o`]', '$1া'],
+['([ক-হড়ঢ়য়ৰ])i','[^o`]', '$1ি'],
+['([ক-হড়ঢ়য়ৰ])I','[^o`]', '$1ী'],
+['([ক-হড়ঢ়য়ৰ])u','[^o`]', '$1ু'],
+['([ক-হড়ঢ়য়ৰ])U','[^o`]', '$1ূ'],
+['([ক-হড়ঢ়য়ৰ])o','[o`]', '$1ু'],
+['([ক-হড়ঢ়য়ৰ])e','[^o`]', '$1ে'],
+['([ক-হড়ঢ়য়ৰ])োI','[^o`]', '$1ৈ'],
+['([ক-হড়ঢ়য়ৰ])O','[^o`]', '$1ো'],
+['([ক-হড়ঢ়য়ৰ])োU','[^o`]', '$1ৌ'],
+
+//'চচh','[^o`]', 'চ্চ'],
+
+['([কঙলষস])(k|K)','[^o`]','$1্ক'],
+['([ঙদল])(g|G)','[^o`]','$1্গ'],
+['গg','[^o`]','জ্ঞ'],
+['([চশ])c','[^o`]','$1্চ'],
+['([জঞব])j','[^o`]','$1্জ'],
+['নj','[^o`]','ঞ্জ'],
+['([কটণনপলষস])T','[^o`]','$1্ট'],
+['([ডণনল])D','[^o`]','$1্ড'],

[MediaWiki-CVS] SVN: [97251] trunk/phase3/languages/messages/MessagesHe.php

2011-09-16 Thread rotem
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97251

Revision: 97251
Author:   rotem
Date: 2011-09-16 10:04:32 + (Fri, 16 Sep 2011)
Log Message:
---
Localization update for he.

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

Modified: trunk/phase3/languages/messages/MessagesHe.php
===
--- trunk/phase3/languages/messages/MessagesHe.php  2011-09-16 09:58:55 UTC 
(rev 97250)
+++ trunk/phase3/languages/messages/MessagesHe.php  2011-09-16 10:04:32 UTC 
(rev 97251)
@@ -215,6 +215,8 @@
'url_path'  = array( '0', 'נתיב', 'PATH' ),
'url_wiki'  = array( '0', 'ויקי', 'WIKI' ),
'url_query' = array( '0', 'שאילתה', 'QUERY' ),
+   'defaultsort_noerror'   = array( '0', 'ללא שגיאה', 'noerror' ),
+   'defaultsort_noreplace' = array( '0', 'ללא החלפה', 'noreplace' ),
 );
 
 $specialPageAliases = array(
@@ -1459,7 +1461,8 @@
 'prefs-registration'= 'זמן ההרשמה:',
 'yourrealname'  = 'שם אמיתי:',
 'yourlanguage'  = 'שפת הממשק:',
-'yourvariant'   = 'גרסה:',
+'yourvariant'   = 'סוג הכתב בשפת התוכן:',
+'prefs-help-variant'= 'סוג הכתב המועדף להצגת דפי התוכן באתר ויקי 
זה.',
 'yournick'  = 'חתימה:',
 'prefs-help-signature'  = 'על הודעות בדפי שיחה יש לחתום באמצעות הטקסט 
nowiki/nowiki, שיומר לחתימה שלכם ואחריה תאריך ושעה.',
 'badsig'= 'חתימה מסוגננת שגויה.
@@ -2929,7 +2932,7 @@
 'tooltip-t-recentchangeslinked'   = 'השינויים האחרונים שבוצעו בדפים המקושרים 
לכאן',
 'tooltip-feed-rss'= 'הוספת עדכון אוטומטי על ידי RSS',
 'tooltip-feed-atom'   = 'הוספת עדכון אוטומטי על ידי Atom',
-'tooltip-t-contributions' = 'צפייה בתרומותיו של משתמש זה',
+'tooltip-t-contributions' = 'תרומותיו של משתמש זה',
 'tooltip-t-emailuser' = 'שליחת דואר אלקטרוני למשתמש זה',
 'tooltip-t-upload'= 'העלאת קבצים',
 'tooltip-t-specialpages'  = 'רשימת כל הדפים המיוחדים',
@@ -3088,7 +3091,7 @@
 'svg-long-desc'  = 'קובץ SVG, הגודל המקורי: $1 × $2 פיקסלים, גודל 
הקובץ: $3',
 'show-big-image' = 'תמונה ברזולוציה גבוהה יותר',
 'show-big-image-preview' = 'גודל תצוגה זו: $1.',
-'show-big-image-other'   = 'רזולוציות אחרות: $1.',
+'show-big-image-other'   = '{{PLURAL:$2|רזולוציה אחרת|רזולוציות אחרות}}: $1.',
 'show-big-image-size'= '$1 × $2 פיקסלים',
 'file-info-gif-looped'   = 'בלולאה',
 'file-info-gif-frames'   = '{{PLURAL:$1|תמונה אחת|$1 תמונות}}',
@@ -3870,7 +3873,6 @@
 'globalfileusage-text'= 'חיפוש שימוש גלובלי בקובץ',
 'globalfileusage-no-results'  = '[[$1]] אינו בשימוש באתרי ויקי אחרים.',
 'globalfileusage-on-wiki' = 'שימוש ב{{grammar:תחילית|{{SITENAME$2',
-'globalfileusage-of-file' = 'אתרי הוויקי האחרים הבאים משתמשים בקובץ זה:',
 'globalfileusage-more'= 'הצגת [[{{#Special:GlobalUsage}}/$1|שימושים 
גלובליים נוספים]] בקובץ זה.',
 'globalfileusage-filterlocal' = 'הסתרת השימוש המקומי',
 
@@ -3881,7 +3883,6 @@
 'globaltemplateusage-text'= 'חיפוש שימוש גלובלי בתבנית',
 'globaltemplateusage-no-results'  = '[[$1]] אינה בשימוש באתרי ויקי אחרים.',
 'globaltemplateusage-on-wiki' = 'שימוש 
ב{{grammar:תחילית|{{SITENAME$2',
-'globaltemplateusage-of-file' = 'אתרי הוויקי האחרים הבאים משתמשים בתבנית 
זו:',
 'globaltemplateusage-more'= 'הצגת 
[[{{#Special:GlobalUsage}}/$1|שימושים גלובליים נוספים]] בתבנית זו.',
 'globaltemplateusage-filterlocal' = 'הסתרת השימוש המקומי',
 
@@ -3911,11 +3912,28 @@
 'sqlite-no-fts'  = '$1 ללא תמיכה בחיפוש בטקסט מלא',
 
 # New logging system
+'logentry-delete-delete'  = '$1 {{GENDER:$2|מחק|מחקה}} את הדף $3',
+'logentry-delete-restore' = '$1 {{GENDER:$2|שחזר|שחזרה}} את הדף 
$3',
+'logentry-delete-event'   = '$1 {{GENDER:$2|שינה|שינתה}} הסתרה של 
{{PLURAL:$5|פעולת יומן|$5 פעולות יומן}} של $3: $4',
+'logentry-delete-revision'= '$1 {{GENDER:$2|שינה|שינתה}} הסתרה של 
{{PLURAL:$5|גרסה|$5 גרסאות}} של הדף $3: $4',
+'logentry-delete-event-legacy'= '$1 {{GENDER:$2|שינה|שינתה}} הסתרתה 
של פעולות יומן של $3',
+'logentry-delete-revision-legacy' = '$1 {{GENDER:$2|שינה|שינתה}} הסתרה של 
גרסאות בדף $3',
+'logentry-suppress-delete'= '$1 {{GENDER:$2|הסתיר|הסתירה}} 
לחלוטין את הדף $3',
+'logentry-suppress-event' = '$1 {{GENDER:$2|שינה|שינתה}} בסודיות 
הסתרה של {{PLURAL:$5|פעולת יומן|$5 פעולות יומן}} של $3: $4',
+'logentry-suppress-revision'  = '$1 {{GENDER:$2|שינה|שינתה}} בסודיות 
הסתרה של {{PLURAL:$5|גרסה|$5 גרסאות}} של הדף $3: $4',
+'logentry-suppress-event-legacy'  = '$1 {{GENDER:$2|שינה|שינתה}} בסודיות 
הסתרה של פעולות יומן של $3',
+'logentry-suppress-revision-legacy'   = '$1 {{GENDER:$2|שינה|שינתה}} בסודיות 
הסתרה של גרסאות של הדף $3',
+'revdelete-content-hid'   = 'התוכן הוסתר',

[MediaWiki-CVS] SVN: [97252] trunk/extensions/Narayam/js

2011-09-16 Thread reedy
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97252

Revision: 97252
Author:   reedy
Date: 2011-09-16 11:35:19 + (Fri, 16 Sep 2011)
Log Message:
---
Fix svn:eol-style native from r97250

Property Changed:

trunk/extensions/Narayam/js/ext.narayam.rules.as-avro.js
trunk/extensions/Narayam/js/ext.narayam.rules.as-bornona.js
trunk/extensions/Narayam/js/ext.narayam.rules.as-inscript.js
trunk/extensions/Narayam/js/ext.narayam.rules.as.js


Property changes on: trunk/extensions/Narayam/js/ext.narayam.rules.as-avro.js
___
Added: svn:eol-style
   + native


Property changes on: trunk/extensions/Narayam/js/ext.narayam.rules.as-bornona.js
___
Added: svn:eol-style
   + native


Property changes on: 
trunk/extensions/Narayam/js/ext.narayam.rules.as-inscript.js
___
Added: svn:eol-style
   + native


Property changes on: trunk/extensions/Narayam/js/ext.narayam.rules.as.js
___
Added: svn:eol-style
   + native


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


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

2011-09-16 Thread reedy
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97253

Revision: 97253
Author:   reedy
Date: 2011-09-16 11:35:56 + (Fri, 16 Sep 2011)
Log Message:
---
Fix indenting of a couple of braces

Modified Paths:
--
trunk/phase3/includes/WikiPage.php
trunk/phase3/maintenance/deleteBatch.php

Modified: trunk/phase3/includes/WikiPage.php
===
--- trunk/phase3/includes/WikiPage.php  2011-09-16 11:35:19 UTC (rev 97252)
+++ trunk/phase3/includes/WikiPage.php  2011-09-16 11:35:56 UTC (rev 97253)
@@ -1720,8 +1720,8 @@
array(  'gtl_from_wiki' 
= wfGetID(),

'gtl_from_page' = $id )
);
+   }
}
-   }
 
# If using cleanup triggers, we can skip some manual deletes
if ( !$dbw-cleanupTriggers() ) {

Modified: trunk/phase3/maintenance/deleteBatch.php
===
--- trunk/phase3/maintenance/deleteBatch.php2011-09-16 11:35:19 UTC (rev 
97252)
+++ trunk/phase3/maintenance/deleteBatch.php2011-09-16 11:35:56 UTC (rev 
97253)
@@ -104,7 +104,7 @@
sleep( $interval );
}
wfWaitForSlaves();
-}
+   }
}
 }
 


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


[MediaWiki-CVS] SVN: [97255] trunk/extensions/Maps/includes/manipulations/ Maps_ParamGeoService.php

2011-09-16 Thread jeroendedauw
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97255

Revision: 97255
Author:   jeroendedauw
Date: 2011-09-16 12:24:22 + (Fri, 16 Sep 2011)
Log Message:
---
Follow up to r97223; 

Modified Paths:
--
trunk/extensions/Maps/includes/manipulations/Maps_ParamGeoService.php

Modified: trunk/extensions/Maps/includes/manipulations/Maps_ParamGeoService.php
===
--- trunk/extensions/Maps/includes/manipulations/Maps_ParamGeoService.php   
2011-09-16 11:48:38 UTC (rev 97254)
+++ trunk/extensions/Maps/includes/manipulations/Maps_ParamGeoService.php   
2011-09-16 12:24:22 UTC (rev 97255)
@@ -28,7 +28,6 @@
 */
public function __construct( $mappingServiceParam = false ) {
parent::__construct();
-   
$this-mappingServiceParam = $mappingServiceParam;  
}

@@ -49,7 +48,9 @@
$value = $this-getMainIndentifier( $value );   

// Override the defaulting.
-   if ( $parameter-wasSetToDefault()  
$this-mappingServiceParam !== false ) {
+   if ( $parameter-wasSetToDefault() 
+is_string( $this-mappingServiceParam )
+array_key_exists( $this-mappingServiceParam, 
$parameters ) ) {
$value = self::resolveOverrides( $value, 
$parameters[$this-mappingServiceParam]-getValue() );
}



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


[MediaWiki-CVS] SVN: [97256] trunk/extensions/SemanticMaps/includes/queryprinters/ SM_MapPrinter.php

2011-09-16 Thread jeroendedauw
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97256

Revision: 97256
Author:   jeroendedauw
Date: 2011-09-16 12:24:46 + (Fri, 16 Sep 2011)
Log Message:
---
Follow up to r97223; 

Modified Paths:
--
trunk/extensions/SemanticMaps/includes/queryprinters/SM_MapPrinter.php

Modified: trunk/extensions/SemanticMaps/includes/queryprinters/SM_MapPrinter.php
===
--- trunk/extensions/SemanticMaps/includes/queryprinters/SM_MapPrinter.php  
2011-09-16 12:24:22 UTC (rev 97255)
+++ trunk/extensions/SemanticMaps/includes/queryprinters/SM_MapPrinter.php  
2011-09-16 12:24:46 UTC (rev 97256)
@@ -27,13 +27,6 @@
protected $fatalErrorMsg = false;

/**
-* @since 1.0
-* 
-* @var array
-*/
-   protected $parameters;
-   
-   /**
 * Constructor.
 * 
 * @param $format String
@@ -341,31 +334,7 @@
 // TODO: this can probably be done cleaner with some changes in Maps
 unset( $paramInfo['mappingservice'] );
 
-if ( version_compare( SMW_VERSION, '1.6', '' ) ) {
-   // Go through the descriptions, and convert them from 
Validator- to SMW-style.
-   // This if for b/c with SMW 1.5.x; SMW 1.6 directly 
accepts Parameter objects.
-   foreach ( $paramInfo as $paramDesc ) {
-   $param = array(
-   'name' = $paramDesc-getName(),
-   'type' = $this-getMappedParamType( 
$paramDesc-getType() ),
-   'description' = 
$paramDesc-getDescription() ? $paramDesc-getDescription() : '',
-   'default' = $paramDesc-isRequired() ? 
'' : $paramDesc-getDefault()
-   );
-   
-   foreach ( $paramDesc-getCriteria() as $criterion ) {
-   if ( $criterion instanceof CriterionInArray ) {
-   $param['values'] = 
$criterion-getAllowedValues();
-   $param['type'] = $paramDesc-isList() ? 
'enum-list' : 'enumeration';
-   break;
-   }
-   }
-   
-   $params[] = $param;
-   }
-}
-else {
-   $params = array_merge( $params, $paramInfo );
-}
+$params = array_merge( $params, $paramInfo );
 
return $params;
 }


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


[MediaWiki-CVS] SVN: [97257] trunk/phase3/includes/db/DatabaseMysql.php

2011-09-16 Thread reedy
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97257

Revision: 97257
Author:   reedy
Date: 2011-09-16 12:25:45 + (Fri, 16 Sep 2011)
Log Message:
---
* (bug 30927) Omission of MySQLField::maxLength

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

Modified: trunk/phase3/includes/db/DatabaseMysql.php
===
--- trunk/phase3/includes/db/DatabaseMysql.php  2011-09-16 12:24:46 UTC (rev 
97256)
+++ trunk/phase3/includes/db/DatabaseMysql.php  2011-09-16 12:25:45 UTC (rev 
97257)
@@ -786,6 +786,10 @@
function isMultipleKey() {
return $this-is_multiple;
}
+
+   function maxLength() {
+   return $this-max_length;
+   }
 }
 
 class MySQLMasterPos implements DBMasterPos {


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


[MediaWiki-CVS] SVN: [97258] trunk/extensions/SemanticMediaWiki/includes/dataitems/ SMW_DI_URI.php

2011-09-16 Thread jeroendedauw
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97258

Revision: 97258
Author:   jeroendedauw
Date: 2011-09-16 12:44:09 + (Fri, 16 Sep 2011)
Log Message:
---
fix bug 30912

Modified Paths:
--
trunk/extensions/SemanticMediaWiki/includes/dataitems/SMW_DI_URI.php

Modified: trunk/extensions/SemanticMediaWiki/includes/dataitems/SMW_DI_URI.php
===
--- trunk/extensions/SemanticMediaWiki/includes/dataitems/SMW_DI_URI.php
2011-09-16 12:25:45 UTC (rev 97257)
+++ trunk/extensions/SemanticMediaWiki/includes/dataitems/SMW_DI_URI.php
2011-09-16 12:44:09 UTC (rev 97258)
@@ -67,9 +67,15 @@
 
/// @todo This should be changed to the spelling getUri().
public function getURI() {
-   return $this-m_scheme . '://' . $this-m_hierpart .
-   ( $this-m_query ? '?' . $this-m_query : '' ) . 
-   ( $this-m_fragment ? '#' . $this-m_fragment : '' );
+   $schemesWithDoubleslesh = array(
+   'http', 'https', 'ftp'
+   );
+   
+   return $this-m_scheme . ':'
+   . ( in_array( $this-m_scheme, $schemesWithDoubleslesh 
) ? '//' : '' )
+   . $this-m_hierpart
+   . ( $this-m_query ? '?' . $this-m_query : '' )
+   . ( $this-m_fragment ? '#' . $this-m_fragment : '' );
}
 
public function getScheme() {


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


[MediaWiki-CVS] SVN: [97259] branches/REL1_18/extensions/Math

2011-09-16 Thread reedy
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97259

Revision: 97259
Author:   reedy
Date: 2011-09-16 13:06:02 + (Fri, 16 Sep 2011)
Log Message:
---
REL1_18 MFT r97001, r97002, r97007, r97014, r97018, r97034

Modified Paths:
--
branches/REL1_18/extensions/Math/Math.hooks.php
branches/REL1_18/extensions/Math/Math.php
branches/REL1_18/extensions/Math/math/lexer.mll
branches/REL1_18/extensions/Math/math/texutil.ml
branches/REL1_18/extensions/Math/mathParserTests.txt

Property Changed:

branches/REL1_18/extensions/Math/


Property changes on: branches/REL1_18/extensions/Math
___
Added: svn:mergeinfo
   + /trunk/extensions/Math:97001-97002,97007,97014,97018,97034

Modified: branches/REL1_18/extensions/Math/Math.hooks.php
===
--- branches/REL1_18/extensions/Math/Math.hooks.php 2011-09-16 12:44:09 UTC 
(rev 97258)
+++ branches/REL1_18/extensions/Math/Math.hooks.php 2011-09-16 13:06:02 UTC 
(rev 97259)
@@ -136,4 +136,18 @@
$tables[] = 'math';
return true;
}
+
+   /**
+* Hack to fake a default $wgMathPath value so parser test output
+* that renders to images doesn't vary by who runs it.
+*
+* @global string $wgMathPath
+* @param Parser $parser
+* @return bool
+*/
+   static function onParserTestParser( $parser ) {
+   global $wgMathPath;
+   $wgMathPath = '/images/math';
+   return true;
+   }
 }

Modified: branches/REL1_18/extensions/Math/Math.php
===
--- branches/REL1_18/extensions/Math/Math.php   2011-09-16 12:44:09 UTC (rev 
97258)
+++ branches/REL1_18/extensions/Math/Math.php   2011-09-16 13:06:02 UTC (rev 
97259)
@@ -89,6 +89,7 @@
 $wgHooks['GetPreferences'][] = 'MathHooks::onGetPreferences';
 $wgHooks['LoadExtensionSchemaUpdates'][] = 
'MathHooks::onLoadExtensionSchemaUpdates';
 $wgHooks['ParserTestTables'][] = 'MathHooks::onParserTestTables';
+$wgHooks['ParserTestParser'][] = 'MathHooks::onParserTestParser';
 
 $dir = dirname( __FILE__ ) . '/';
 $wgAutoloadClasses['MathHooks'] = $dir . 'Math.hooks.php';

Modified: branches/REL1_18/extensions/Math/math/lexer.mll
===
--- branches/REL1_18/extensions/Math/math/lexer.mll 2011-09-16 12:44:09 UTC 
(rev 97258)
+++ branches/REL1_18/extensions/Math/math/lexer.mll 2011-09-16 13:06:02 UTC 
(rev 97259)
@@ -11,8 +11,10 @@
 let delimiter_uf_lt = ['(' ')' '.']
 let literal_uf_op = ['+' '-' '*' '=']
 let delimiter_uf_op = ['/' '|']
-let boxchars  = ['0'-'9' 'a'-'z' 'A'-'Z' '+' '-' '*' ',' '=' '(' ')' ':' '/' 
';' '?' '.' '!' ' ' '\128'-'\255']
-let aboxchars = ['0'-'9' 'a'-'z' 'A'-'Z' '+' '-' '*' ',' '=' '(' ')' ':' '/' 
';' '?' '.' '!' ' ']
+let boxchars  = ['0'-'9' 'a'-'z' 'A'-'Z' '+' '-' '*' ',' '=' '(' ')' ':' '/' 
';' '?' '.' '!' '\'' '`' ' ' '\128'-'\255']
+let aboxchars = ['0'-'9' 'a'-'z' 'A'-'Z' '+' '-' '*' ',' '=' '(' ')' ':' '/' 
';' '?' '.' '!' '\'' '`' ' ']
+let latex_function_names = arccos | arcsin | arctan | arg | cos | 
cosh | cot | coth | csc| deg | det | dim | exp | gcd | hom 
| inf | ker | lg | lim | liminf | limsup | ln | log | max | 
min | Pr | sec | sin | sinh | sup | tan | tanh
+let mediawiki_function_names = arccot | arcsec | arccsc | sgn | sen
 
 rule token = parse
 space +{ token lexbuf }
@@ -54,10 +56,18 @@
   | -{ let str = Lexing.lexeme lexbuf in 
LITERAL (MHTMLABLEC (FONT_UFH,-, minus; ,MO,str))}
   | literal_uf_op  { let str = Lexing.lexeme lexbuf in LITERAL 
(MHTMLABLEC (FONT_UFH, str, ^str^ ,MO,str)) }
   | delimiter_uf_op{ let str = Lexing.lexeme lexbuf in DELIMITER 
(MHTMLABLEC (FONT_UFH, str, ^str^ ,MO,str)) }
-  | \\ alpha +   { Texutil.find (Lexing.lexeme lexbuf) }
   | \\sqrt space * [   { FUN_AR1opt \\sqrt }
   | \\xleftarrow space * [ { Texutil.tex_use_ams(); FUN_AR1opt 
\\xleftarrow }
   | \\xrightarrow space * [{ Texutil.tex_use_ams(); FUN_AR1opt 
\\xrightarrow }
+  | \\ (latex_function_names as name) space * (  { LITERAL 
(HTMLABLEC(FONT_UFH,\\ ^ name ^ (, name ^ ()) }
+  | \\ (latex_function_names as name) space * [  { LITERAL 
(HTMLABLEC(FONT_UFH,\\ ^ name ^ [, name ^ [)) }  
+  | \\ (latex_function_names as name) space * \\{  { LITERAL 
(HTMLABLEC(FONT_UFH,\\ ^ name ^ \\{, name ^ {)) }
+  | \\ (latex_function_names as name) space * { LITERAL 
(HTMLABLEC(FONT_UFH,\\ ^ name ^  , name ^ nbsp;)) }
+  | \\ (mediawiki_function_names as name) space * ({ 
(Texutil.tex_use_ams(); LITERAL (HTMLABLEC(FONT_UFH,\\operatorname{ ^ name ^ 
}(, name^ ())) }  
+  | \\ (mediawiki_function_names as name) space * [{ 
(Texutil.tex_use_ams(); LITERAL 

[MediaWiki-CVS] SVN: [97260] trunk/extensions/Translate

2011-09-16 Thread nikerabbit
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97260

Revision: 97260
Author:   nikerabbit
Date: 2011-09-16 13:13:06 + (Fri, 16 Sep 2011)
Log Message:
---
Introduced Special:MessageGroupStats
Required refactoring lots of code, including the new StatsTable class

Modified Paths:
--
trunk/extensions/Translate/Translate.alias.php
trunk/extensions/Translate/Translate.i18n.php
trunk/extensions/Translate/Translate.php
trunk/extensions/Translate/_autoload.php
trunk/extensions/Translate/specials/SpecialLanguageStats.php
trunk/extensions/Translate/utils/MessageGroupStats.php

Added Paths:
---
trunk/extensions/Translate/utils/StatsTable.php

Modified: trunk/extensions/Translate/Translate.alias.php
===
--- trunk/extensions/Translate/Translate.alias.php  2011-09-16 13:06:02 UTC 
(rev 97259)
+++ trunk/extensions/Translate/Translate.alias.php  2011-09-16 13:13:06 UTC 
(rev 97260)
@@ -16,6 +16,7 @@
'TranslationStats' = array( 'TranslationStats', 
'TranslationStatistics' ),
'Translations' = array( 'Translations' ),
'LanguageStats' = array( 'LanguageStats' ),
+   'MessageGroupStats' = array( 'MessageGroupStats' ),
'PageTranslation' = array( 'PageTranslation' ),
'ImportTranslations' = array( 'ImportTranslations' ),
'ManageMessageGroups' = array( 'ManageMessageGroups' ),

Modified: trunk/extensions/Translate/Translate.i18n.php
===
--- trunk/extensions/Translate/Translate.i18n.php   2011-09-16 13:06:02 UTC 
(rev 97259)
+++ trunk/extensions/Translate/Translate.i18n.php   2011-09-16 13:13:06 UTC 
(rev 97260)
@@ -48,8 +48,6 @@
'translate-page-settings-legend' = 'Settings',
'translate-page-task'= 'I want to',
'translate-page-group'   = 'Group',
-   'translate-page-group-tooltip'   = 'The name of a group of messages.
-If the group consists of a subset or superset of messages from other groups, 
it is displayed in bold.',
'translate-page-language'= 'Language',
'translate-page-limit'   = 'Limit',
'translate-page-limit-option'= '$1 {{PLURAL:$1|message|messages}} 
per page',
@@ -182,6 +180,7 @@
'translate-statsf-width' = 'Width in pixels:',
'translate-statsf-height' = 'Height in pixels:',
'translate-statsf-days' = 'Time period in days:',
+   'translate-statsf-days' = 'Starting date:',
'translate-statsf-scale' = 'Granularity:',
'translate-statsf-scale-months' = 'Months',
'translate-statsf-scale-weeks' = 'Weeks',
@@ -228,24 +227,33 @@
'translate-language-code' = 'Language code',
'translate-language-code-field-name' = 'Language code:',
'translate-suppress-complete' = 'Suppress completely translated 
message groups',
+   'translate-ls-noempty' = 'Suppress completely untranslated message 
groups',
'translate-language' = 'Language',
'translate-total' = 'Messages',
-   'translate-total-tooltip' = 'The total number of messages in this 
message group.',
'translate-untranslated' = 'Untranslated',
-   'translate-untranslated-tooltip' = 'The total number of untranslated 
messages in this message group.
-This includes the messages that have been tagged as outdated.',
'translate-percentage-complete' = 'Completion',
-   'translate-percentage-complete-tooltip' = 'The percentage of messages 
in the group that have been translated and not marked as outdated.',
'translate-percentage-fuzzy' = 'Outdated',
-   'translate-percentage-fuzzy-tooltip' = 'The percentage of messages in 
the group that have been translated and have been marked as outdated.
-Messages are marked outdated because the English language source message has 
changed, because an automated check for the message failed, or because someone 
marked it as outdated.',
'translate-nothing-to-do' = 'All possible translations appear to have 
been made.
 You are encouraged to review messages through 
[[Special:Translate|{{int:translate}}]].',
'translate-languagestats-groups' = ' # Add message group IDs, one per 
line to restrict the message groups that
  # are shown on Special:LanguageStats. Non-existing message group IDs will
  # be ignored.', # do not duplicate this message to other languages
'translate-languagestats-overall' = 'All message groups together',
+   'translate-ls-submit' = 'Show statistics',
+   'translate-ls-column-group' = 'Message group',
 
+   # Special:GroupStats
+   'translate-mgs-pagename' = 'Message group statistics',
+   'translate-mgs-fieldset' = 'Display preferences',
+   'translate-mgs-group' = 'Message group:',
+   'translate-mgs-nocomplete' = 'Do not display languages which have 
completed translation',
+   'translate-mgs-noempty' 

[MediaWiki-CVS] SVN: [97261] trunk/extensions/Translate/specials/SpecialMessageGroupStats. php

2011-09-16 Thread nikerabbit
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97261

Revision: 97261
Author:   nikerabbit
Date: 2011-09-16 13:15:33 + (Fri, 16 Sep 2011)
Log Message:
---
Actually add the file, missing from r97260

Added Paths:
---
trunk/extensions/Translate/specials/SpecialMessageGroupStats.php

Added: trunk/extensions/Translate/specials/SpecialMessageGroupStats.php
===
--- trunk/extensions/Translate/specials/SpecialMessageGroupStats.php
(rev 0)
+++ trunk/extensions/Translate/specials/SpecialMessageGroupStats.php
2011-09-16 13:15:33 UTC (rev 97261)
@@ -0,0 +1,195 @@
+?php
+/**
+ * Contains logic for special page Special:MessageGroupStats.
+ *
+ * @file
+ * @author Niklas Laxström
+ * @copyright Copyright © 2011 Niklas Laxström
+ * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 
2.0 or later
+ */
+
+/**
+ * Implements includable special page Special:MessageGroupStats which provides
+ * translation statistics for all languages for a group.
+ *
+ * @ingroup SpecialPage TranslateSpecialPage Stats
+ */
+class SpecialMessageGroupStats extends SpecialLanguageStats {
+   /// Overwritten from SpecialLanguageStats
+   protected $targetValueName = 'group';
+   /// Overwritten from SpecialLanguageStats
+   protected $noComplete = false;
+   /// Overwritten from SpecialLanguageStats
+   protected $noEmpty = true;
+
+   public function __construct() {
+   SpecialPage::__construct( 'MessageGroupStats' );
+   }
+
+   /// Overwritten from SpecialPage
+   public function getDescription() {
+   return wfMessage( 'translate-mgs-pagename' )-text();
+   }
+   
+   /// Overwritten from SpecialLanguageStats
+   protected function getAllowedValues() {
+   $groups = MessageGroups::getAllGroups();
+   return array_keys( $groups );
+   }
+
+   /// Overwritten from SpecialLanguageStats
+   protected function invalidTarget() {
+   global $wgOut;
+   $wgOut-wrapWikiMsg( div class='error'$1/div, 
'translate-mgs-invalid-group', $this-target );
+   }
+
+   /// Overwritten from SpecialLanguageStats
+   protected function outputIntroduction() {
+   return '';
+   }
+
+   /// @todo duplicated code
+   protected function groupSelector( $default ) {
+   $groups = MessageGroups::getAllGroups();
+   $selector = new HTMLSelector( 'group', 'group', $default );
+
+   foreach ( $groups as $id = $class ) {
+   if ( MessageGroups::getGroup( $id )-exists() ) {
+   $selector-addOption( $class-getLabel(), $id );
+   }
+   }
+
+   return $selector-getHTML();
+   }
+
+   /// Overwriten from SpecialLanguageStats
+   function getform() {
+   global $wgScript;
+
+   $out = Html::openElement( 'div' );
+   $out .= Html::openElement( 'form', array( 'method' = 'get', 
'action' = $wgScript ) );
+   $out .= Html::hidden( 'title', 
$this-getTitle()-getPrefixedText() );
+   $out .= Html::hidden( 'x', 'D' ); // To detect submission
+   $out .= Html::openElement( 'fieldset' );
+   $out .= Html::element( 'legend', null, wfMsg( 
'translate-mgs-fieldset' ) );
+   $out .= Html::openElement( 'table' );
+
+   $out .= Html::openElement( 'tr' );
+   $out .= Html::openElement( 'td', array( 'class' = 'mw-label' ) 
);
+   $out .= Xml::label( wfMsg( 'translate-mgs-group' ), 'group' );
+   $out .= Html::closeElement( 'td' );
+   $out .= Html::openElement( 'td', array( 'class' = 'mw-input' ) 
);
+   $out .= $this-groupSelector( $this-target );
+   $out .= Html::closeElement( 'td' );
+   $out .= Html::closeElement( 'tr' );
+
+   $out .= Html::openElement( 'tr' );
+   $out .= Html::openElement( 'td', array( 'colspan' = 2 ) );
+   $out .= Xml::checkLabel( wfMsg( 'translate-mgs-nocomplete' ), 
'suppresscomplete', 'suppresscomplete', $this-noComplete );
+   $out .= Html::closeElement( 'td' );
+   $out .= Html::closeElement( 'tr' );
+
+   $out .= Html::openElement( 'tr' );
+   $out .= Html::openElement( 'td', array( 'colspan' = 2 ) );
+   $out .= Xml::checkLabel( wfMsg( 'translate-mgs-noempty' ), 
'suppressempty', 'suppressempty', $this-noEmpty );
+   $out .= Html::closeElement( 'td' );
+   $out .= Html::closeElement( 'tr' );
+
+   $out .= Html::openElement( 'tr' );
+   $out .= Html::openElement( 'td', array( 'class' = 'mw-input', 
'colspan' = 2 ) );
+   $out .= Xml::submitButton( wfMsg( 

[MediaWiki-CVS] SVN: [97262] trunk/extensions/Translate/specials/SpecialLanguageStats.php

2011-09-16 Thread nikerabbit
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97262

Revision: 97262
Author:   nikerabbit
Date: 2011-09-16 13:18:40 + (Fri, 16 Sep 2011)
Log Message:
---
First bugfix to r97260

Modified Paths:
--
trunk/extensions/Translate/specials/SpecialLanguageStats.php

Modified: trunk/extensions/Translate/specials/SpecialLanguageStats.php
===
--- trunk/extensions/Translate/specials/SpecialLanguageStats.php
2011-09-16 13:15:33 UTC (rev 97261)
+++ trunk/extensions/Translate/specials/SpecialLanguageStats.php
2011-09-16 13:18:40 UTC (rev 97262)
@@ -122,7 +122,7 @@
$wgOut-wrapWikiMsg( div 
class='error'$1/div, 'translate-mgs-nothing' );
}
$wgOut-addHTML( $output );
-   } elseif ( $target !== null ) {
+   } elseif ( $submitted ) {
$this-invalidTarget();
}
 


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


[MediaWiki-CVS] SVN: [97263] branches/REL1_18/phase3/includes

2011-09-16 Thread reedy
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97263

Revision: 97263
Author:   reedy
Date: 2011-09-16 13:19:04 + (Fri, 16 Sep 2011)
Log Message:
---
REL1_18 MFT r93626, r96562, r96640, r96978, r97050

Modified Paths:
--
branches/REL1_18/phase3/includes/HttpFunctions.php
branches/REL1_18/phase3/includes/cache/MessageCache.php
branches/REL1_18/phase3/includes/parser/ParserOutput.php
branches/REL1_18/phase3/includes/resourceloader/ResourceLoader.php
branches/REL1_18/phase3/includes/resourceloader/ResourceLoaderFileModule.php
branches/REL1_18/phase3/includes/resourceloader/ResourceLoaderModule.php

branches/REL1_18/phase3/includes/resourceloader/ResourceLoaderStartUpModule.php

Property Changed:

branches/REL1_18/phase3/includes/cache/MessageCache.php
branches/REL1_18/phase3/includes/resourceloader/ResourceLoader.php

Modified: branches/REL1_18/phase3/includes/HttpFunctions.php
===
--- branches/REL1_18/phase3/includes/HttpFunctions.php  2011-09-16 13:18:40 UTC 
(rev 97262)
+++ branches/REL1_18/phase3/includes/HttpFunctions.php  2011-09-16 13:19:04 UTC 
(rev 97263)
@@ -32,7 +32,6 @@
 * @return Mixed: (bool)false on failure or a string on success
 */
public static function request( $method, $url, $options = array() ) {
-   $url = wfExpandUrl( $url, PROTO_HTTP );
wfDebug( HTTP: $method: $url\n );
$options['method'] = strtoupper( $method );
 
@@ -178,14 +177,14 @@
public $status;
 
/**
-* @param $url String: url to use
+* @param $url String: url to use. If protocol-relative, will be 
expanded to an http:// URL
 * @param $options Array: (optional) extra params to pass (see 
Http::request())
 */
function __construct( $url, $options = array() ) {
global $wgHTTPTimeout;
 
-   $this-url = $url;
-   $this-parsedUrl = parse_url( $url );
+   $this-url = wfExpandUrl( $url, PROTO_HTTP );
+   $this-parsedUrl = parse_url( $this-url );
 
if ( !Http::isValidURI( $this-url ) ) {
$this-status = Status::newFatal( 'http-invalid-url' );

Modified: branches/REL1_18/phase3/includes/cache/MessageCache.php
===
--- branches/REL1_18/phase3/includes/cache/MessageCache.php 2011-09-16 
13:18:40 UTC (rev 97262)
+++ branches/REL1_18/phase3/includes/cache/MessageCache.php 2011-09-16 
13:19:04 UTC (rev 97263)
@@ -764,15 +764,23 @@
$popts-setTargetLanguage( $language );
}
 
+   wfProfileIn( __METHOD__ );
if ( !$title || !$title instanceof Title ) {
global $wgTitle;
$title = $wgTitle;
}
+   // Sometimes $wgTitle isn't set either...
+   if ( !$title ) {
+   # It's not uncommon having a null $wgTitle in scripts. 
See r80898
+   # Create a ghost title in such case
+   $title = Title::newFromText( 'Dwimmerlaik' );
+   }
 
$this-mInParser = true;
$res = $parser-parse( $text, $title, $popts, $linestart );
$this-mInParser = false;
 
+   wfProfileOut( __METHOD__ );
return $res;
}
 


Property changes on: branches/REL1_18/phase3/includes/cache/MessageCache.php
___
Modified: svn:mergeinfo
   - /branches/REL1_15/phase3/includes/cache/MessageCache.php:51646
/branches/REL1_17/phase3/includes/MessageCache.php:81444
/branches/REL1_17/phase3/includes/cache/MessageCache.php:81444
/branches/new-installer/phase3/includes/cache/MessageCache.php:43664-66004
/branches/sqlite/includes/cache/MessageCache.php:58211-58321
/branches/wmf-deployment/includes/cache/MessageCache.php:53381
/trunk/phase3/includes/cache/MessageCache.php:92580,92713,92765,92884,92886-92887,92894,92898,92907,92932,93149,93151,93233-93234,93258,93266,93516-93518,93818-93822,93847,93858,93891,93935-93936,94068,94155,94235,94346,94372,94422,94425,9,94448,94456,94498,94601,94728,94825,94862,94995-94997
   + /branches/REL1_15/phase3/includes/cache/MessageCache.php:51646
/branches/REL1_17/phase3/includes/MessageCache.php:81444
/branches/REL1_17/phase3/includes/cache/MessageCache.php:81444
/branches/new-installer/phase3/includes/cache/MessageCache.php:43664-66004
/branches/sqlite/includes/cache/MessageCache.php:58211-58321
/branches/wmf-deployment/includes/cache/MessageCache.php:53381

[MediaWiki-CVS] SVN: [97264] branches/REL1_18/phase3

2011-09-16 Thread reedy
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97264

Revision: 97264
Author:   reedy
Date: 2011-09-16 13:31:58 + (Fri, 16 Sep 2011)
Log Message:
---
REL1_18 MFT r97141, r97143. r97177

Modified Paths:
--
branches/REL1_18/phase3/RELEASE-NOTES-1.18
branches/REL1_18/phase3/languages/messages/MessagesKk_cyrl.php
branches/REL1_18/phase3/languages/messages/MessagesMl.php

Property Changed:

branches/REL1_18/phase3/RELEASE-NOTES-1.18

Modified: branches/REL1_18/phase3/RELEASE-NOTES-1.18
===
--- branches/REL1_18/phase3/RELEASE-NOTES-1.18  2011-09-16 13:19:04 UTC (rev 
97263)
+++ branches/REL1_18/phase3/RELEASE-NOTES-1.18  2011-09-16 13:31:58 UTC (rev 
97264)
@@ -618,6 +618,7 @@
 * Aromanian (rup) (renamed from rua-rup).
 * Kashmiri (ks) split into Kashmiri (Perso-Arabic) (ks-arab) and Kashmiri
   (Devanagari) (ks-deva). Defaults to ks-arab.
+* (bug 30817) Restored linktrail for kk (Kazakh)
 
 === Other changes in 1.18 ===
 * Removed legacy wgAjaxWatch javascript global object, no longer in use.


Property changes on: branches/REL1_18/phase3/RELEASE-NOTES-1.18
___
Modified: svn:mergeinfo
   - /branches/REL1_15/phase3/RELEASE-NOTES-1.18:51646
/branches/REL1_17/phase3/RELEASE-NOTES-1.18:81445,81448
/branches/new-installer/phase3/RELEASE-NOTES-1.18:43664-66004
/branches/sqlite/RELEASE-NOTES-1.18:58211-58321
/trunk/phase3/RELEASE-NOTES-1.18:92580,92634,92713,92762,92765,92791,92854,92884,92886-92887,92894,92898,92907,92932,92958,93141,93149,93151,93233-93234,93258,93266,93303,93382-93383,93516-93518,93520,93818-93822,93847,93858,93891,93916,93935-93936,94058,94062,94068,94107,94155,94235-94236,94277,94346,94372,94422,94425,9,94448,94456,94498,94517,94601,94630,94728,94738,94825,94862,94995-94997,95014,95016-95017,95023,95042,95072-95073,95155,95171,95327,95332,95409-95410,95422,95426,95436,95442,95458,95467-95468,95470,95475,95493,95521,95525,95540,95562,95570,95597,95601,95608,95627,95647-95648,95651-95653,95655-95656,95659,95663,95674,95790,95812,95855,95899,95999,96087,96180,96227-96228,96286,96297,96386,96393,96405,96427,96460,96472,96509,96522,96606,96643,96645,96655,96659,96687,96762,96764,96829
/trunk/phase3/RELEASE-NOTES-1.19:95655,95999
   + /branches/REL1_15/phase3/RELEASE-NOTES-1.18:51646
/branches/REL1_17/phase3/RELEASE-NOTES-1.18:81445,81448
/branches/new-installer/phase3/RELEASE-NOTES-1.18:43664-66004
/branches/sqlite/RELEASE-NOTES-1.18:58211-58321
/trunk/phase3/RELEASE-NOTES-1.18:92580,92634,92713,92762,92765,92791,92854,92884,92886-92887,92894,92898,92907,92932,92958,93141,93149,93151,93233-93234,93258,93266,93303,93382-93383,93516-93518,93520,93818-93822,93847,93858,93891,93916,93935-93936,94058,94062,94068,94107,94155,94235-94236,94277,94346,94372,94422,94425,9,94448,94456,94498,94517,94601,94630,94728,94738,94825,94862,94995-94997,95014,95016-95017,95023,95042,95072-95073,95155,95171,95327,95332,95409-95410,95422,95426,95436,95442,95458,95467-95468,95470,95475,95493,95521,95525,95540,95562,95570,95597,95601,95608,95627,95647-95648,95651-95653,95655-95656,95659,95663,95674,95790,95812,95855,95899,95999,96087,96180,96227-96228,96286,96297,96386,96393,96405,96427,96460,96472,96509,96522,96606,96643,96645,96655,96659,96687,96762,96764,96829,97141,97143,97177
/trunk/phase3/RELEASE-NOTES-1.19:95655,95999

Modified: branches/REL1_18/phase3/languages/messages/MessagesKk_cyrl.php
===
--- branches/REL1_18/phase3/languages/messages/MessagesKk_cyrl.php  
2011-09-16 13:19:04 UTC (rev 97263)
+++ branches/REL1_18/phase3/languages/messages/MessagesKk_cyrl.php  
2011-09-16 13:31:58 UTC (rev 97264)
@@ -34,6 +34,8 @@
 
 $fallback8bitEncoding = 'windows-1251';
 
+$linkTrail = 
'/^([a-zäçéğıïñöşüýʺʹа-яёәғіқңөұүһٴابپتجحدرزسشعفقكلمنڭەوۇۋۆىيچھ“»]+)(.*)$/sDu';
+
 $namespaceNames = array(
NS_MEDIA= 'Таспа',
NS_SPECIAL  = 'Арнайы',

Modified: branches/REL1_18/phase3/languages/messages/MessagesMl.php
===
--- branches/REL1_18/phase3/languages/messages/MessagesMl.php   2011-09-16 
13:19:04 UTC (rev 97263)
+++ branches/REL1_18/phase3/languages/messages/MessagesMl.php   2011-09-16 
13:31:58 UTC (rev 97264)
@@ -44,8 +44,8 @@
NS_TEMPLATE_TALK= 'ഫലകത്തിന്റെ_സംവാദം',
NS_HELP = 'സഹായം',
NS_HELP_TALK= 'സഹായത്തിന്റെ_സംവാദം',
-   NS_CATEGORY = 'വര്‍ഗ്ഗം',
-   NS_CATEGORY_TALK= 'വര്‍ഗ്ഗത്തിന്റെ_സംവാദം',
+   NS_CATEGORY = 'വർഗ്ഗം',
+   NS_CATEGORY_TALK= 'വർഗ്ഗത്തിന്റെ_സംവാദം',
 );
 
 $namespaceAliases = array(


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


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

2011-09-16 Thread reedy
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97265

Revision: 97265
Author:   reedy
Date: 2011-09-16 13:32:40 + (Fri, 16 Sep 2011)
Log Message:
---
Followup r97264 move RELEASE-NOTES-1.19 to RELEASE-NOTES-1.18 from r97177 in 
trunk

Modified Paths:
--
trunk/phase3/RELEASE-NOTES-1.18
trunk/phase3/RELEASE-NOTES-1.19

Modified: trunk/phase3/RELEASE-NOTES-1.18
===
--- trunk/phase3/RELEASE-NOTES-1.18 2011-09-16 13:31:58 UTC (rev 97264)
+++ trunk/phase3/RELEASE-NOTES-1.18 2011-09-16 13:32:40 UTC (rev 97265)
@@ -625,6 +625,7 @@
 * Kashmiri (ks) split into Kashmiri (Perso-Arabic) (ks-arab) and Kashmiri
   (Devanagari) (ks-deva). Defaults to ks-arab.
 * (bug 30864) Use bengali numerals for ol for Assamese
+* (bug 30817) Restored linktrail for kk (Kazakh)
 
 === Other changes in 1.18 ===
 * Removed legacy wgAjaxWatch javascript global object, no longer in use.

Modified: trunk/phase3/RELEASE-NOTES-1.19
===
--- trunk/phase3/RELEASE-NOTES-1.19 2011-09-16 13:31:58 UTC (rev 97264)
+++ trunk/phase3/RELEASE-NOTES-1.19 2011-09-16 13:32:40 UTC (rev 97265)
@@ -115,7 +115,6 @@
 
 * Uighur (Latin) (ug-latn) was incorrectly marked as right-to-left language.
 * (bug 30217) Make pt-br a fallback of pt
-* (bug 30817) Restored linktrail for kk (Kazakh)
 
 === Other changes in 1.19 ===
 * jquery.mwPrototypes module was renamed to jquery.mwExtension.


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


[MediaWiki-CVS] SVN: [97266] trunk/extensions/SemanticMediaWiki/includes

2011-09-16 Thread jeroendedauw
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97266

Revision: 97266
Author:   jeroendedauw
Date: 2011-09-16 13:40:14 + (Fri, 16 Sep 2011)
Log Message:
---
fix unserialization bug

Modified Paths:
--
trunk/extensions/SemanticMediaWiki/includes/SMW_CompatibilityHelpers.php
trunk/extensions/SemanticMediaWiki/includes/dataitems/SMW_DI_URI.php
trunk/extensions/SemanticMediaWiki/includes/datavalues/SMW_DV_Types.php
trunk/extensions/SemanticMediaWiki/includes/datavalues/SMW_DV_URI.php

Modified: 
trunk/extensions/SemanticMediaWiki/includes/SMW_CompatibilityHelpers.php
===
--- trunk/extensions/SemanticMediaWiki/includes/SMW_CompatibilityHelpers.php
2011-09-16 13:32:40 UTC (rev 97265)
+++ trunk/extensions/SemanticMediaWiki/includes/SMW_CompatibilityHelpers.php
2011-09-16 13:40:14 UTC (rev 97266)
@@ -48,7 +48,7 @@
if ( $typeid == '__typ'  $dbkeys[0]{0} == '_' 
) { // b/c: old data stored as type ids
return 
SMWTypesValue::getTypeUriFromTypeId( $dbkeys[0] );
} else {
-   return SMWDIUri::doUnserialize( 
$dbkeys[0]);
+   return SMWDIUri::doUnserialize( 
$dbkeys[0] );
}
case SMWDataItem::TYPE_TIME:
$timedate = explode( 'T', $dbkeys[0], 2 );

Modified: trunk/extensions/SemanticMediaWiki/includes/dataitems/SMW_DI_URI.php
===
--- trunk/extensions/SemanticMediaWiki/includes/dataitems/SMW_DI_URI.php
2011-09-16 13:32:40 UTC (rev 97265)
+++ trunk/extensions/SemanticMediaWiki/includes/dataitems/SMW_DI_URI.php
2011-09-16 13:40:14 UTC (rev 97266)
@@ -71,11 +71,13 @@
'http', 'https', 'ftp'
);

-   return $this-m_scheme . ':'
+   $uri = $this-m_scheme . ':'
. ( in_array( $this-m_scheme, $schemesWithDoubleslesh 
) ? '//' : '' )
. $this-m_hierpart
. ( $this-m_query ? '?' . $this-m_query : '' )
. ( $this-m_fragment ? '#' . $this-m_fragment : '' );
+
+   return $uri;
}
 
public function getScheme() {
@@ -125,6 +127,9 @@
$hierpart = $parts[0];
$fragment = ( count( $parts ) == 2 ) ? $parts[1] : '';
}
+   
+   $hierpart = ltrim( $hierpart, '/' );
+   
return new SMWDIUri( $scheme, $hierpart, $query, $fragment );
}
 

Modified: 
trunk/extensions/SemanticMediaWiki/includes/datavalues/SMW_DV_Types.php
===
--- trunk/extensions/SemanticMediaWiki/includes/datavalues/SMW_DV_Types.php 
2011-09-16 13:32:40 UTC (rev 97265)
+++ trunk/extensions/SemanticMediaWiki/includes/datavalues/SMW_DV_Types.php 
2011-09-16 13:40:14 UTC (rev 97266)
@@ -34,7 +34,7 @@
}
 
public static function getTypeUriFromTypeId( $typeId ) {
-   return new SMWDIUri( 'http', 
'//semantic-mediawiki.org/swivt/1.0', '', $typeId );
+   return new SMWDIUri( 'http', 
'semantic-mediawiki.org/swivt/1.0', '', $typeId );
}
 
protected function parseUserValue( $value ) {
@@ -82,7 +82,7 @@
 */
protected function loadDataItem( SMWDataItem $dataItem ) {
if ( ( $dataItem instanceof SMWDIUri )  ( 
$dataItem-getScheme() == 'http' ) 
-( $dataItem-getHierpart() == 
'//semantic-mediawiki.org/swivt/1.0' ) 
+( $dataItem-getHierpart() == 
'semantic-mediawiki.org/swivt/1.0' ) 
 ( $dataItem-getQuery() == '' ) ) {
$this-m_isAlias = false;
$this-m_typeId = $dataItem-getFragment();

Modified: trunk/extensions/SemanticMediaWiki/includes/datavalues/SMW_DV_URI.php
===
--- trunk/extensions/SemanticMediaWiki/includes/datavalues/SMW_DV_URI.php   
2011-09-16 13:32:40 UTC (rev 97265)
+++ trunk/extensions/SemanticMediaWiki/includes/datavalues/SMW_DV_URI.php   
2011-09-16 13:40:14 UTC (rev 97266)
@@ -141,7 +141,7 @@
 
// Now create the URI data item:
try {
-   $this-m_dataitem = new SMWDIUri( $scheme, $hierpart, 
$query, $fragment, $this-m_typeid);
+   $this-m_dataitem = new SMWDIUri( $scheme, $hierpart, 
$query, $fragment, $this-m_typeid );
} catch ( SMWDataItemException $e ) {
$this-addError( wfMsgForContent( 'smw_baduri', 
$this-m_wikitext ) );
$this-m_dataitem = 

[MediaWiki-CVS] SVN: [97267] trunk/extensions/Translate/utils/StatsTable.php

2011-09-16 Thread nikerabbit
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97267

Revision: 97267
Author:   nikerabbit
Date: 2011-09-16 13:41:23 + (Fri, 16 Sep 2011)
Log Message:
---
There is no getTitle in this class, ping r97260

Modified Paths:
--
trunk/extensions/Translate/utils/StatsTable.php

Modified: trunk/extensions/Translate/utils/StatsTable.php
===
--- trunk/extensions/Translate/utils/StatsTable.php 2011-09-16 13:40:14 UTC 
(rev 97266)
+++ trunk/extensions/Translate/utils/StatsTable.php 2011-09-16 13:41:23 UTC 
(rev 97267)
@@ -238,7 +238,7 @@
global $wgMessageCache;
$mc = $wgMessageCache;
}
-   $desc = $mc-transform( $group-getDescription(), true, 
$this-lang, $this-getTitle() );
+   $desc = $mc-transform( $group-getDescription(), true, 
$this-lang );
$cache-set( $key, $desc );
return $desc;
}


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


[MediaWiki-CVS] SVN: [97268] trunk/extensions/Translate/specials/SpecialTranslationStats. php

2011-09-16 Thread nikerabbit
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97268

Revision: 97268
Author:   nikerabbit
Date: 2011-09-16 13:48:58 + (Fri, 16 Sep 2011)
Log Message:
---
Typofix in variable name

Modified Paths:
--
trunk/extensions/Translate/specials/SpecialTranslationStats.php

Modified: trunk/extensions/Translate/specials/SpecialTranslationStats.php
===
--- trunk/extensions/Translate/specials/SpecialTranslationStats.php 
2011-09-16 13:41:23 UTC (rev 97267)
+++ trunk/extensions/Translate/specials/SpecialTranslationStats.php 
2011-09-16 13:48:58 UTC (rev 97268)
@@ -497,7 +497,7 @@
}
 
protected static function roundingAddition( $ts, $amount, $dir ) {
-   if ( $direction === -1 ) {
+   if ( $dir === -1 ) {
return -1 * ( $ts % $amount );
} else {
return $amount - ( $ts % $amount );


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


[MediaWiki-CVS] SVN: [97269] branches/REL1_18/phase3/skins/common/shared.css

2011-09-16 Thread reedy
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97269

Revision: 97269
Author:   reedy
Date: 2011-09-16 14:04:18 + (Fri, 16 Sep 2011)
Log Message:
---
Manually merge r93576

Modified Paths:
--
branches/REL1_18/phase3/skins/common/shared.css

Modified: branches/REL1_18/phase3/skins/common/shared.css
===
--- branches/REL1_18/phase3/skins/common/shared.css 2011-09-16 13:48:58 UTC 
(rev 97268)
+++ branches/REL1_18/phase3/skins/common/shared.css 2011-09-16 14:04:18 UTC 
(rev 97269)
@@ -603,6 +603,20 @@
padding: 0;
 }
 
+/* Correct directionality when page dir is different from site/user dir */
+/* @noflip */.mw-content-ltr ul, .mw-content-rtl .mw-content-ltr ul {
+   margin: .3em 0 0 1.5em;
+}
+/* @noflip */.mw-content-rtl ul, .mw-content-ltr .mw-content-rtl ul {
+   margin: .3em 1.5em 0 0;
+}
+/* @noflip */.mw-content-ltr ol, .mw-content-rtl .mw-content-ltr ol {
+   margin: .3em 0 0 3.2em;
+}
+/* @noflip */.mw-content-rtl ol, .mw-content-ltr .mw-content-rtl ol {
+   margin: .3em 3.2em 0 0;
+}
+
 /* Galleries */
 /* These display attributes look nonsensical, but are needed to support IE and 
FF2 */
 /* Don't forget to update commonPrint.css */
@@ -669,20 +683,6 @@
background-repeat: no-repeat;
 }
 
-/* Correct directionality when page dir is different from site/user dir */
-/* @noflip */.mw-content-ltr ul, .mw-content-rtl .mw-content-ltr ul {
-   margin: .3em 0 0 1.5em;
-}
-/* @noflip */.mw-content-rtl ul, .mw-content-ltr .mw-content-rtl ul {
-   margin: .3em 1.5em 0 0;
-}
-/* @noflip */.mw-content-ltr ol, .mw-content-rtl .mw-content-ltr ol {
-   margin: .3em 0 0 3.2em;
-}
-/* @noflip */.mw-content-rtl ol, .mw-content-ltr .mw-content-rtl ol {
-   margin: .3em 3.2em 0 0;
-}
-
 /* Localised ordered list numbering for some languages */
 ol:lang(bcc) li,
 ol:lang(bqi) li,


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


[MediaWiki-CVS] SVN: [97270] trunk/extensions/Translate/utils/MessageGroupStats.php

2011-09-16 Thread nikerabbit
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97270

Revision: 97270
Author:   nikerabbit
Date: 2011-09-16 14:11:41 + (Fri, 16 Sep 2011)
Log Message:
---
Fixed two bugs in Stats code:
* Stats for subgroups of aggregate groups were not loaded - those would be 
calculated again and inserted into database, which would fail with duplicate key
* Calculated stats was assigned into wrong place, which lead to duplicate 
calculation of stats for same group, again failing with db error

Modified Paths:
--
trunk/extensions/Translate/utils/MessageGroupStats.php

Modified: trunk/extensions/Translate/utils/MessageGroupStats.php
===
--- trunk/extensions/Translate/utils/MessageGroupStats.php  2011-09-16 
14:04:18 UTC (rev 97269)
+++ trunk/extensions/Translate/utils/MessageGroupStats.php  2011-09-16 
14:11:41 UTC (rev 97270)
@@ -176,13 +176,26 @@
return $stats;
}
 
+   protected static function expandAggregates( MessageGroup $group ) {
+   $flattened = array( $group-getId() );
+   if ( $group instanceof AggregateMessageGroup ) {
+   foreach ( $group-getGroups() as $subgroup ) {
+   $flattened = array_merge( $flattened, 
self::expandAggregates( $subgroup ) );
+   }
+   }
+   return $flattened;
+   }
+
+   
+
protected static function forGroupInternal( $group, $stats = array() ) {
-   $id = $group-getId();
-   $res = self::selectRowsIdLang( $id, null );
+   $ids = array_unique( self::expandAggregates( $group ) );
+   $res = self::selectRowsIdLang( $ids, null );
$stats = self::extractResults( $res, $stats );
 
# Go over each language filling missing entries
-   $languages = array_keys( Language::getLanguageNames() );
+   $id = $group-getId();
+   $languages = array_keys( Language::getLanguageNames( false ) );
foreach ( $languages as $code ) {
if ( isset( $stats[$id][$code] ) ) continue;
$stats[$id][$code] = self::forItemInternal( $stats, 
$group, $code );
@@ -210,14 +223,9 @@
$id = $group-getId();
 
if ( self::$timeStart !== null  ( microtime( true ) - 
self::$timeStart )  self::$limit ) {
-   return array( null, null, null );
+   return $stats[$id][$code] = array( null, null, null );
}
 
-   // Might happen when called recursively
-   if ( isset( $stats[$id][$code] ) ) {
-   return $stats[$id][$code];
-   }
-
if ( $group instanceof AggregateMessageGroup ) {
$aggregates = array( 0, 0, 0 );
foreach ( $group-getGroups() as $sid = $sgroup ) {
@@ -226,7 +234,7 @@
}
$aggregates = self::multiAdd( $aggregates, 
$stats[$sid][$code] );
}
-   $stats[$id] = $aggregates;
+   $stats[$id][$code] = $aggregates;
} else {
$aggregates = self::calculateGroup( $group, $code );
}


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


[MediaWiki-CVS] SVN: [97271] branches/REL1_18

2011-09-16 Thread reedy
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97271

Revision: 97271
Author:   reedy
Date: 2011-09-16 14:12:52 + (Fri, 16 Sep 2011)
Log Message:
---
REL1_18 MFT r96406

Modified Paths:
--
branches/REL1_18/extensions/Collection/Collection.hooks.php
branches/REL1_18/extensions/Collection/Collection.templates.php
branches/REL1_18/extensions/Collection/js/bookcreator.css
branches/REL1_18/phase3/includes/HistoryPage.php
branches/REL1_18/phase3/includes/specials/SpecialFileDuplicateSearch.php
branches/REL1_18/phase3/skins/common/shared.css

Property Changed:

branches/REL1_18/phase3/includes/HistoryPage.php

Modified: branches/REL1_18/extensions/Collection/Collection.hooks.php
===
--- branches/REL1_18/extensions/Collection/Collection.hooks.php 2011-09-16 
14:11:41 UTC (rev 97270)
+++ branches/REL1_18/extensions/Collection/Collection.hooks.php 2011-09-16 
14:12:52 UTC (rev 97271)
@@ -245,7 +245,7 @@
'alt' = '',
'width' = '80',
'height' = '45',
-   'class' = 'mw-float-start 
collection-creatorbox-book',
+   'class' = 'collection-creatorbox-book',
),
'',
true
@@ -253,8 +253,7 @@
 
$html .= Xml::tags( 'div',
array( 'class' = 'collection-creatorbox-row' ),
-   Xml::tags( 'div',
-   array( 'class' = 'mw-float-end' ),
+   Xml::tags( 'div', null,
$skin-link(
Title::newFromText( wfMsg( 
'coll-helppage' ) ),
Xml::element( 'img',
@@ -263,7 +262,6 @@
'alt' = '',
'width' = '16',
'height' = '16',
-   'style' = 
'vertical-align: text-bottom;',
)
)
. '#160;' . wfMsgHtml( 'coll-help' ),

Modified: branches/REL1_18/extensions/Collection/Collection.templates.php
===
--- branches/REL1_18/extensions/Collection/Collection.templates.php 
2011-09-16 14:11:41 UTC (rev 97270)
+++ branches/REL1_18/extensions/Collection/Collection.templates.php 
2011-09-16 14:12:52 UTC (rev 97271)
@@ -15,7 +15,7 @@
$mediapath = $GLOBALS['wgScriptPath'] . 
'/extensions/Collection/images/';
 ?
 
-div class=mw-float-start collection-column collection-column-left
+div class=collection-column collection-column-left
 
 form action=?php echo htmlspecialchars( SkinTemplate::makeSpecialUrl( 
'Book' ) ) ? method=post id=mw-collection-title-form
table id=mw-collection-title-table style=width: 80%; 
background-color: transparent; align=center
@@ -51,7 +51,7 @@
 
 /div
 
-div class=mw-float-start collection-column collection-column-right
+div class=collection-column collection-column-right
 
div class=collection-column-right-box
h2span class=mw-headline?php $this-msg( 
'coll-book_title' ) ?/span/h2
@@ -60,7 +60,7 @@
 $this-msgWiki( 'coll-book_text' );
?
div
-   div class=mw-float-end
+   div id=collection-order-button
form action=?php echo htmlspecialchars( 
SkinTemplate::makeSpecialUrl( 'Book' ) ) ? method=post
input type=hidden name=bookcmd 
value=post_zip /
input type=hidden name=partner 
value=pediapress /
@@ -112,7 +112,7 @@
?php   } ?
/select
?php } ?
-   /tdtd class=mw-align-end 
style=vertical-align:bottom;
+   /tdtd id=collection-download-button
input type=hidden name=bookcmd value=render /
input id=downloadButton type=submit value=?php 
echo $buttonLabel ??php if ( count( $this-data['collection']['items'] ) == 
0 ) { ? disabled=disabled?php } ? /
/td/tr/tbody/table
@@ -146,7 +146,7 @@
?php } ?
label for=personalCollTitlea href=?php 
echo htmlspecialchars( SkinTemplate::makeSpecialUrl( 'Prefixindex', 'prefix=' . 
wfUrlencode( $this-data['user-book-prefix'] ) ) ) ??php echo 
htmlspecialchars( $this-data['user-book-prefix'] ) ?/a/label
/td
-

[MediaWiki-CVS] SVN: [97272] branches/REL1_18/extensions

2011-09-16 Thread reedy
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97272

Revision: 97272
Author:   reedy
Date: 2011-09-16 14:17:57 + (Fri, 16 Sep 2011)
Log Message:
---
REL1_18 MFT r96560, r96630

Modified Paths:
--
branches/REL1_18/extensions/FlaggedRevs/presentation/FlaggedPageView.php
branches/REL1_18/extensions/FlaggedRevs/presentation/FlaggedRevsUI.hooks.php
branches/REL1_18/extensions/OggHandler/OggHandler_body.php
branches/REL1_18/extensions/OggHandler/OggPlayer.js

Modified: 
branches/REL1_18/extensions/FlaggedRevs/presentation/FlaggedPageView.php
===
--- branches/REL1_18/extensions/FlaggedRevs/presentation/FlaggedPageView.php
2011-09-16 14:12:52 UTC (rev 97271)
+++ branches/REL1_18/extensions/FlaggedRevs/presentation/FlaggedPageView.php
2011-09-16 14:17:57 UTC (rev 97272)
@@ -12,7 +12,6 @@
protected $isDiffFromStable = false;
protected $isMultiPageDiff = false;
protected $reviewNotice = '';
-   protected $reviewNotes = '';
protected $diffNoticeBox = '';
protected $reviewFormRev = false;
 
@@ -44,20 +43,20 @@
* Load the global FlaggedPage instance
*/
protected function load() {
-   global $wgOut;
if ( !$this-loaded ) {
$this-loaded = true;
$this-article = self::globalArticleInstance();
if ( $this-article == null ) {
throw new MWException( 'FlaggedPageView has no 
context article!' );
}
-   $this-out = $wgOut;
+   $this-out = RequestContext::getMain()-getOutput();
}
}
 
/**
 * Get the FlaggedPage instance associated with $wgTitle,
 * or false if there isn't such a title
+* @return FlaggedPage|null
 */
public static function globalArticleInstance() {
$title = RequestContext::getMain()-getTitle();
@@ -67,6 +66,14 @@
return null;
}
 
+   /*
+* Check if the old and new diff revs are set for this page view
+* @return bool
+*/
+   public function diffRevsAreSet() {
+   return (bool)$this-diffRevs;
+   }
+
/**
 * Is this web response for a request to view a page where both:
 * (a) no specific page version was requested via URL params
@@ -1044,10 +1051,12 @@
}
 
 /**
-* Add review form to pages when necessary
-* on a regular page view (action=view)
+* Add review form to pages when necessary on a regular page view 
(action=view).
+* If $output is an OutputPage then this prepends the form onto it.
+* If $output is a string then this appends the review form to it.
+* @param mixed string|OutputPage
 */
-   public function addReviewForm( $data ) {
+   public function addReviewForm( $output ) {
global $wgRequest, $wgUser;
$this-load();
if ( $this-out-isPrintable() ) {
@@ -1099,11 +1108,11 @@
 
list( $html, $status ) = $form-getHtml();
# Diff action: place the form at the top of the page
-   if ( $this-diffRevs ) {
-   $this-out-prependHTML( $html );
+   if ( $output instanceof OutputPage ) {
+   $output-prependHTML( $html );
# View action: place the form at the bottom of the page
} else {
-   $data .= $html;
+   $output .= $html;
}
}
return true;
@@ -1112,7 +1121,7 @@
 /**
 * Add link to stable version setting to protection form
 */
-   public function addStabilizationLink( $data ) {
+   public function addStabilizationLink() {
global $wgRequest;
$this-load();
if ( FlaggedRevs::useProtectionLevels() ) {
@@ -1876,16 +1885,4 @@
}
return $editPage-fr_baseRevId;
}
-
-/**
-* Adds brief review notes to a page.
-* @param OutputPage $out
-*/
-   public function addReviewNotes( $data ) {
-   $this-load();
-   if ( $this-reviewNotes ) {
-   $data .= $this-reviewNotes;
-   }
-   return true;
-   }
 }

Modified: 
branches/REL1_18/extensions/FlaggedRevs/presentation/FlaggedRevsUI.hooks.php
===
--- 
branches/REL1_18/extensions/FlaggedRevs/presentation/FlaggedRevsUI.hooks.php
2011-09-16 14:12:52 UTC (rev 97271)
+++ 

[MediaWiki-CVS] SVN: [97273] trunk/extensions/PageSchemas/specials/PS_GeneratePages.php

2011-09-16 Thread yaron
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97273

Revision: 97273
Author:   yaron
Date: 2011-09-16 14:24:28 + (Fri, 16 Sep 2011)
Log Message:
---
Improved display of lists of categories, and pages

Modified Paths:
--
trunk/extensions/PageSchemas/specials/PS_GeneratePages.php

Modified: trunk/extensions/PageSchemas/specials/PS_GeneratePages.php
===
--- trunk/extensions/PageSchemas/specials/PS_GeneratePages.php  2011-09-16 
14:17:57 UTC (rev 97272)
+++ trunk/extensions/PageSchemas/specials/PS_GeneratePages.php  2011-09-16 
14:24:28 UTC (rev 97273)
@@ -25,14 +25,14 @@
}
 
if ( $category == ) {
-   // No category listed - show a list of links to all 
categories with a page
-   // schema defined.
+   // No category listed - show a list of links to all
+   // categories with a page schema defined.
$text = ;
-   $cat_titles = PageSchemas::getCategoriesWithPSDefined();
-   foreach( $cat_titles as $cat_text ) {
-   $generatePagesPage = SpecialPage::getTitleFor( 
'GeneratePages' );
-   $url = $generatePagesPage-getFullURL() . '/' . 
$cat_text;
-   $text .= 'a href=' . $url . '' . $cat_text 
. '/a br / ';
+   $categoryNames = 
PageSchemas::getCategoriesWithPSDefined();
+   $generatePagesPage = SpecialPage::getTitleFor( 
'GeneratePages' );
+   foreach( $categoryNames as $categoryName ) {
+   $url = $generatePagesPage-getFullURL() . '/' . 
$categoryName;
+   $text .= 'a href=' . $url . '' . 
$categoryName . '/a br / ';
}
$wgOut-addHTML( $text );
return true;
@@ -47,24 +47,22 @@
return true;
}
 
-   $generate_page_desc = wfMsg( 'ps-generatepages-desc' );
-   $text = p$generate_page_desc/p\n;
-   $text = 'form method=postinput type=hidden name=param 
value='.$category.' /br /' . \n;
-   //add code to generate a list of check-box for pages to be 
generated.
+   $text = Html::element( 'p', null,  wfMsg( 
'ps-generatepages-desc' ) ) . \n;
+   $text .= 'form method=postinput type=hidden name=param 
value='.$category.' /' . \n;
+   // Display a list of checkboxes for pages to be generated.
$pageList = array();
 
-   // This hook will return an array of strings, with each value 
as a title of
-   // the page to be created.
+   // This hook will set an array of strings, with each value
+   // as a title of a page to be created.
wfRunHooks( 'PageSchemasGetPageList', array( $pageSchemaObj, 
$pageList ) );
+   $skin = $this-getSkin();
foreach( $pageList as $page ){
-   $pageURL = $page-getFullUrl();
$pageName = PageSchemas::titleString( $page );
-   $pageLink = Html::element( 'a', array( 'href' = 
$pageURL ), $pageName );
$text .= Html::input( 'page[]', $pageName, 'checkbox', 
array( 'checked' = true ) );
-   $text .= \n . $pageLink . br /\n;
+   $text .= \n . $skin-link( $page ) . br /\n;
}
$generate_page_text = wfMsg( 'generatepages' );
-   $text .= 'br / input type=submit 
value='.$generate_page_text.' / br / br //form';
+   $text .= 'br / input type=submit 
value='.$generate_page_text.' / /form';
$wgOut-addHTML( $text );
return true;
}


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


[MediaWiki-CVS] SVN: [97275] branches/REL1_18/phase3/resources/mediawiki/mediawiki.js

2011-09-16 Thread reedy
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97275

Revision: 97275
Author:   reedy
Date: 2011-09-16 14:31:12 + (Fri, 16 Sep 2011)
Log Message:
---
REL1_18 MFT r96964

Modified Paths:
--
branches/REL1_18/phase3/resources/mediawiki/mediawiki.js

Modified: branches/REL1_18/phase3/resources/mediawiki/mediawiki.js
===
--- branches/REL1_18/phase3/resources/mediawiki/mediawiki.js2011-09-16 
14:24:52 UTC (rev 97274)
+++ branches/REL1_18/phase3/resources/mediawiki/mediawiki.js2011-09-16 
14:31:12 UTC (rev 97275)
@@ -519,28 +519,31 @@
}
// Execute script
try {
-   var script = registry[module].script;
-   var markModuleReady = function() {
-   registry[module].state = 'ready';
-   handlePending( module );
-   if ( $.isFunction( callback ) ) {
-   callback();
-   }
-   };
+   var script = registry[module].script,
+   markModuleReady = function() {
+   registry[module].state = 
'ready';
+   handlePending( module );
+   if ( $.isFunction( callback ) ) 
{
+   callback();
+   }
+   },
+   nestedAddScript = function( arr, 
callback, i ) {
+   // Recursively call addScript() 
in its own callback
+   // for each element of arr.
+   if ( i = arr.length ) {
+   // We're at the end of 
the array
+   callback();
+   return;
+   }
+   
+   addScript( arr[i], function() {
+   nestedAddScript( arr, 
callback, i + 1 );
+   } );
+   };
+
if ( $.isArray( script ) ) {
-   var done = 0;
-   if ( script.length === 0 ) {
-   // No scripts in this module? 
Let's dive out early.
-   markModuleReady();
-   }
-   for ( var i = 0; i  script.length; i++ 
) {
-   registry[module].state = 
'loading';
-   addScript( script[i], 
function() {
-   if ( ++done == 
script.length ) {
-   
markModuleReady();
-   }
-   } );
-   }
+   registry[module].state = 'loading';
+   nestedAddScript( script, 
markModuleReady, 0 );
} else if ( $.isFunction( script ) ) {
script( jQuery );
markModuleReady();
@@ -677,7 +680,7 @@
 */
function addScript( src, callback ) {
if ( ready ) {
-   // jQuery's getScript method is NOT better than 
doing this the old-fassioned way
+   // jQuery's getScript method is NOT better than 
doing this the old-fashioned way
// because jQuery will eval the script's code, 
and errors will not have sane
// line numbers.
var script = document.createElement( 'script' );


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


[MediaWiki-CVS] SVN: [97276] branches/REL1_18/phase3

2011-09-16 Thread reedy
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97276

Revision: 97276
Author:   reedy
Date: 2011-09-16 14:41:14 + (Fri, 16 Sep 2011)
Log Message:
---
REL1_18 MFT r97144, r97146, r97192

Modified Paths:
--
branches/REL1_18/phase3/includes/cache/MessageCache.php
branches/REL1_18/phase3/includes/specials/SpecialCategories.php
branches/REL1_18/phase3/maintenance/updateCollation.php

Property Changed:

branches/REL1_18/phase3/includes/cache/MessageCache.php
branches/REL1_18/phase3/maintenance/updateCollation.php

Modified: branches/REL1_18/phase3/includes/cache/MessageCache.php
===
--- branches/REL1_18/phase3/includes/cache/MessageCache.php 2011-09-16 
14:31:12 UTC (rev 97275)
+++ branches/REL1_18/phase3/includes/cache/MessageCache.php 2011-09-16 
14:41:14 UTC (rev 97276)
@@ -547,6 +547,11 @@
function get( $key, $useDB = true, $langcode = true, $isFullKey = false 
) {
global $wgLanguageCode, $wgContLang;
 
+   if ( is_int( $key ) ) {
+   // Non-string key given exception sometimes happens 
for numerical strings that become ints somewhere on their way here
+   $key = strval( $key );
+   }
+
if ( !is_string( $key ) ) {
throw new MWException( 'Non-string key given' );
}


Property changes on: branches/REL1_18/phase3/includes/cache/MessageCache.php
___
Modified: svn:mergeinfo
   - /branches/REL1_15/phase3/includes/cache/MessageCache.php:51646
/branches/REL1_17/phase3/includes/MessageCache.php:81444
/branches/REL1_17/phase3/includes/cache/MessageCache.php:81444
/branches/new-installer/phase3/includes/cache/MessageCache.php:43664-66004
/branches/sqlite/includes/cache/MessageCache.php:58211-58321
/branches/wmf-deployment/includes/cache/MessageCache.php:53381
/trunk/phase3/includes/cache/MessageCache.php:92580,92713,92765,92884,92886-92887,92894,92898,92907,92932,93149,93151,93233-93234,93258,93266,93516-93518,93626,93818-93822,93847,93858,93891,93935-93936,94068,94155,94235,94346,94372,94422,94425,9,94448,94456,94498,94601,94728,94825,94862,94995-94997,96562,96640,96978,97050
   + /branches/REL1_15/phase3/includes/cache/MessageCache.php:51646
/branches/REL1_17/phase3/includes/MessageCache.php:81444
/branches/REL1_17/phase3/includes/cache/MessageCache.php:81444
/branches/new-installer/phase3/includes/cache/MessageCache.php:43664-66004
/branches/sqlite/includes/cache/MessageCache.php:58211-58321
/branches/wmf/1.17wmf1/includes/MessageCache.php:82361
/branches/wmf-deployment/includes/cache/MessageCache.php:53381
/trunk/phase3/includes/cache/MessageCache.php:92580,92713,92765,92884,92886-92887,92894,92898,92907,92932,93149,93151,93233-93234,93258,93266,93516-93518,93626,93818-93822,93847,93858,93891,93935-93936,94068,94155,94235,94346,94372,94422,94425,9,94448,94456,94498,94601,94728,94825,94862,94995-94997,96562,96640,96978,97050,97144,97146,97148,97192

Modified: branches/REL1_18/phase3/includes/specials/SpecialCategories.php
===
--- branches/REL1_18/phase3/includes/specials/SpecialCategories.php 
2011-09-16 14:31:12 UTC (rev 97275)
+++ branches/REL1_18/phase3/includes/specials/SpecialCategories.php 
2011-09-16 14:41:14 UTC (rev 97276)
@@ -120,10 +120,10 @@
function formatRow($result) {
global $wgLang;
$title = Title::makeTitle( NS_CATEGORY, $result-cat_title );
-   $titleText = $this-getSkin()-link( $title, htmlspecialchars( 
$title-getText() ) );
+   $titleText = Linker::link( $title, htmlspecialchars( 
$title-getText() ) );
$count = wfMsgExt( 'nmembers', array( 'parsemag', 'escape' ),
$wgLang-formatNum( $result-cat_pages ) );
-   return Xml::tags('li', null, $titleText ($count) ) . \n;
+   return Xml::tags('li', null, wfSpecialList( $titleText, $count 
) ) . \n;
}
 
public function getStartForm( $from ) {

Modified: branches/REL1_18/phase3/maintenance/updateCollation.php
===
--- branches/REL1_18/phase3/maintenance/updateCollation.php 2011-09-16 
14:31:12 UTC (rev 97275)
+++ branches/REL1_18/phase3/maintenance/updateCollation.php 2011-09-16 
14:41:14 UTC (rev 97276)
@@ -29,7 +29,8 @@
 require_once( dirname( __FILE__ ) . '/Maintenance.php' );
 
 class UpdateCollation extends Maintenance {
-   const BATCH_SIZE = 50;
+   const BATCH_SIZE = 50; // Number of rows to process in one batch
+   const SYNC_INTERVAL = 20; // Wait for slaves after this many batches
 
public function __construct() {
parent::__construct();
@@ -44,18 +45,12 @@
 
  

[MediaWiki-CVS] SVN: [97277] trunk/extensions/PageSchemas/specials/PS_EditSchema.php

2011-09-16 Thread yaron
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97277

Revision: 97277
Author:   yaron
Date: 2011-09-16 14:42:34 + (Fri, 16 Sep 2011)
Log Message:
---
Made extension sections collapsible (and collapsed by default)

Modified Paths:
--
trunk/extensions/PageSchemas/specials/PS_EditSchema.php

Modified: trunk/extensions/PageSchemas/specials/PS_EditSchema.php
===
--- trunk/extensions/PageSchemas/specials/PS_EditSchema.php 2011-09-16 
14:41:14 UTC (rev 97276)
+++ trunk/extensions/PageSchemas/specials/PS_EditSchema.php 2011-09-16 
14:42:34 UTC (rev 97277)
@@ -69,6 +69,20 @@

jQuery(this).closest('.fieldBox').find('.delimiterInput').css('display', 
'none');
}
});
+   jQuery('.sectionCheckbox').each(function() {
+   if (jQuery(this).is(:checked)) {
+   
jQuery(this).closest('.sectionBox').find('.extensionInputs').css('display', 
'').removeClass('hiddenSection');
+   } else {
+   
jQuery(this).closest('.sectionBox').find('.extensionInputs').css('display', 
'none').addClass('hiddenSection');
+   }
+   });
+   jQuery('.sectionCheckbox').click(function() {
+   if (jQuery(this).is(:checked)) {
+   
jQuery(this).closest('.sectionBox').find('.extensionInputs').css('display', 
'').removeClass('hiddenSection');
+   } else {
+   
jQuery(this).closest('.sectionBox').find('.extensionInputs').css('display', 
'none').addClass('hiddenSection');
+   }
+   });
 }
 
 jQuery(document).ready(function() {
@@ -85,6 +99,7 @@
addjQueryToCheckboxes();
jQuery('#editPageSchemaForm').submit( function() {
jQuery('#starterTemplate').find(input, select, 
textarea).attr('disabled', 'disabled');
+   jQuery('.hiddenSection').find(input, select, 
textarea).attr('disabled', 'disabled');
return true;
} );
 });
@@ -109,7 +124,7 @@
$fieldName = ;
$fieldNum = -1;
$templateNum = -1;
-   //This var. will save the xml text returned by the extensions
+   // Arrays to store the extension-specific XML entered in the 
form
$schemaXMLFromExtensions = array();
$fieldXMLFromExtensions = array();
wfRunHooks( 'PageSchemasGetSchemaXML', array( $wgRequest, 
$schemaXMLFromExtensions ));
@@ -203,19 +218,28 @@
/*
 * Returns the HTML for one section of the EditSchema form.
 */
-   static function printFormSection( $label, $topColor, $html, $bgColor = 
'white' ) {
-   return  div style=\background: $bgColor; border: 1px #999 
solid; padding: 0px; margin-bottom: 10px; margin-top: 10px;\\n .
-   div style=\font-weight: bold; background: $topColor; 
padding: 4px 7px; border-bottom: 1px #bbb solid;\$label/div\n .
-   div style=\padding: 5px 15px;\$html/div\n .
-   /div\n;
+   static function printFormSection( $label, $topColor, $html, $bgColor = 
'white', $isCollapsible = false, $hasExistingValues = true ) {
+   $className = $isCollapsible ? 'sectionBox' : '';
+   $text =  div class=\$className\ style=\background: 
$bgColor; border: 1px #999 solid; padding: 0px; margin-bottom: 10px; 
margin-top: 10px;\\n;
+   $text .= div style=\font-weight: bold; background: 
$topColor; padding: 4px 7px; border-bottom: 1px #bbb solid;\;
+   if ( $isCollapsible ) {
+   $checkboxAttrs =  array( 'class' = 'sectionCheckbox' );
+   if ( $hasExistingValues ) {
+   $checkboxAttrs['checked'] = true;
+   }
+   $text .=   . Html::input( 'show_section', null, 
'checkbox', $checkboxAttrs );
+   }
+   $className = $isCollapsible ? 'extensionInputs' : '';
+   $text .= $label/div . div class=\$className\ 
style=\padding: 5px 15px;\$html/div\n . /div\n;
+   return $text;
}
 
/*
 * Returns the HTML for a form section coming from a specific extension.
 */
static function printFieldHTMLForExtension( $valuesFromExtension ) {
-   list( $label, $color, $html ) = $valuesFromExtension;
-   return self::printFormSection( $label, $color, $html );
+   list( $label, $color, $html, $hasExistingValues ) = 
$valuesFromExtension;
+   return self::printFormSection( $label, $color, $html, 'white', 
true, $hasExistingValues );
}
 
/**


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


[MediaWiki-CVS] SVN: [97278] trunk/extensions/SemanticForms/includes/SF_FormField.php

2011-09-16 Thread yaron
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97278

Revision: 97278
Author:   yaron
Date: 2011-09-16 14:45:56 + (Fri, 16 Sep 2011)
Log Message:
---
Added more setter functions

Modified Paths:
--
trunk/extensions/SemanticForms/includes/SF_FormField.php

Modified: trunk/extensions/SemanticForms/includes/SF_FormField.php
===
--- trunk/extensions/SemanticForms/includes/SF_FormField.php2011-09-16 
14:42:34 UTC (rev 97277)
+++ trunk/extensions/SemanticForms/includes/SF_FormField.php2011-09-16 
14:45:56 UTC (rev 97278)
@@ -118,10 +118,22 @@
$this-template_field = $templateField;
}
 
+   public function setInputType( $inputType ) {
+   $this-mInputType = $inputType;
+   }
+
+   public function setIsMandatory( $isMandatory ) {
+   $this-mIsMandatory = $isMandatory;
+   }
+
public function setIsHidden( $isHidden ) {
$this-mIsHidden = $isHidden;
}
 
+   public function setIsRestricted( $isRestricted ) {
+   $this-mIsRestricted = $isRestricted;
+   }
+
public function setFieldArg( $key, $value ) {
$this-mFieldArgs[$key] = $value;
}


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


[MediaWiki-CVS] SVN: [97279] trunk/extensions/SemanticForms/includes/SF_TemplateInForm.php

2011-09-16 Thread yaron
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97279

Revision: 97279
Author:   yaron
Date: 2011-09-16 14:46:54 + (Fri, 16 Sep 2011)
Log Message:
---
Added ability to directly pass in form fields to create() function, for use by 
Page Schemas extension

Modified Paths:
--
trunk/extensions/SemanticForms/includes/SF_TemplateInForm.php

Modified: trunk/extensions/SemanticForms/includes/SF_TemplateInForm.php
===
--- trunk/extensions/SemanticForms/includes/SF_TemplateInForm.php   
2011-09-16 14:45:56 UTC (rev 97278)
+++ trunk/extensions/SemanticForms/includes/SF_TemplateInForm.php   
2011-09-16 14:46:54 UTC (rev 97279)
@@ -130,14 +130,18 @@
return $templateFields;
}
 
-   static function create( $name, $label = null, $allowMultiple = null, 
$maxAllowed = null ) {
+   static function create( $name, $label = null, $allowMultiple = null, 
$maxAllowed = null, $formFields = null ) {
$tif = new SFTemplateInForm();
$tif-mTemplateName = str_replace( '_', ' ', $name );
$tif-mFields = array();
-   $fields = $tif-getAllFields();
-   $field_num = 0;
-   foreach ( $fields as $field ) {
-   $tif-mFields[] = SFFormField::create( $field_num++, 
$field );
+   if ( is_null( $formFields ) ) {
+   $fields = $tif-getAllFields();
+   $field_num = 0;
+   foreach ( $fields as $field ) {
+   $tif-mFields[] = SFFormField::create( 
$field_num++, $field );
+   }
+   } else {
+   $tif-mFields = $formFields;
}
$tif-mLabel = $label;
$tif-mAllowMultiple = $allowMultiple;


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


[MediaWiki-CVS] SVN: [97280] trunk/extensions/SemanticForms/includes/SF_Utils.php

2011-09-16 Thread yaron
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97280

Revision: 97280
Author:   yaron
Date: 2011-09-16 14:50:48 + (Fri, 16 Sep 2011)
Log Message:
---
Changes for Page Schemas extension: fixed creation of forms (wasn't fully 
working before), added support for new collapsing-of-sections feature in 'edit 
schema' page, other fixes

Modified Paths:
--
trunk/extensions/SemanticForms/includes/SF_Utils.php

Modified: trunk/extensions/SemanticForms/includes/SF_Utils.php
===
--- trunk/extensions/SemanticForms/includes/SF_Utils.php2011-09-16 
14:46:54 UTC (rev 97279)
+++ trunk/extensions/SemanticForms/includes/SF_Utils.php2011-09-16 
14:50:48 UTC (rev 97280)
@@ -167,10 +167,10 @@
foreach ($child-children() as $tag = 
$formelem) {
$sfarray[(string)$tag] = 
(string)$formelem;
}
+   $object['sf'] = $sfarray;
+   return true;
}
}
-   $object['sf'] = $sfarray;
-   return true;
}
if ( $objectName == semanticforms_FormInput ) {
foreach ( $xmlForField-children() as $tag = $child ) {
@@ -184,10 +184,11 @@

$sfarray[(string)$prop-attributes()-name] = (string)$prop;
}
}
+   // Setting value specific to SF in 'sf' 
index.
+   $object['sf'] = $sfarray;
+   return true;
}
}
-   // Setting value specific to SF in 'sf' index.
-   $object['sf'] = $sfarray;
}
return true;
}
@@ -211,12 +212,14 @@
 
public static function getFieldXMLForPS( $request, $xmlArray ) {
$xmlPerField = array();
-   $templateNum = -1;
+   $fieldNum = -1;
foreach ( $request-getValues() as $var = $val ) {
-   if ( substr( $var, 0, 14 ) == 'sf_input_type_') {
-   $templateNum = substr( $var, 14, 1 );
+   if ( substr( $var, 0, 14 ) == 'sf_input_type_' ) {
+   $fieldNum = substr( $var, 14 );
$xml = 'semanticforms_FormInput';
-   $xml .= 'InputType'.$val.'/InputType';
+   if ( !empty( $val ) ) {
+   $xml .= 'InputType' . $val . 
'/InputType';
+   }
} elseif ( substr( $var, 0, 14 ) == 'sf_key_values_' ) {
if ( $val != '' ) {
// replace the comma substitution 
character that has no chance of
@@ -236,9 +239,9 @@
$xml .= 'Parameter 
name='.$param_value[0].'/';
}
}
-   $xml .= '/semanticforms_FormInput';
-   $xmlPerField[] = $xml;
}
+   $xml .= '/semanticforms_FormInput';
+   $xmlPerField[$fieldNum] = $xml;
}
}
$xmlArray['sf'] = $xmlPerField;
@@ -246,11 +249,14 @@
}
 
public static function getSchemaHTMLForPS( $pageSchemaObj, 
$text_extensions ) {
-   if ( is_null( $pageSchemaObj ) ) {
-   $form_array = array();
-   } else {
+   $form_array = array();
+   $hasExistingValues = false;
+   if ( !is_null( $pageSchemaObj ) ) {
$obj = $pageSchemaObj-getObject('semanticforms_Form');
-   $form_array = $obj['sf'];
+   if ( array_key_exists( 'sf', $obj ) ) {
+   $form_array = $obj['sf'];
+   $hasExistingValues = true;
+   }
}
if ( array_key_exists( 'name', $form_array ) ) {
$formName = $form_array['name'];
@@ -276,11 +282,15 @@
$editTitle = '';
}
$text .= \tp . 'Title of form for existing pages:' . ' ' . 
Html::input( 'sf_edit_title', $editTitle, 'text', array( 'size' = 25 ) ) . 
/p\n;
-   $text_extensions['sf'] = array( 'Form', 

[MediaWiki-CVS] SVN: [97281] trunk/extensions/SemanticDrilldown/includes/SD_Utils.php

2011-09-16 Thread yaron
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97281

Revision: 97281
Author:   yaron
Date: 2011-09-16 14:52:51 + (Fri, 16 Sep 2011)
Log Message:
---
Added support for new collapsed-sections feature in Page Schemas extension's 
'edit schema' page

Modified Paths:
--
trunk/extensions/SemanticDrilldown/includes/SD_Utils.php

Modified: trunk/extensions/SemanticDrilldown/includes/SD_Utils.php
===
--- trunk/extensions/SemanticDrilldown/includes/SD_Utils.php2011-09-16 
14:50:48 UTC (rev 97280)
+++ trunk/extensions/SemanticDrilldown/includes/SD_Utils.php2011-09-16 
14:52:51 UTC (rev 97281)
@@ -28,9 +28,10 @@
$sdarray[$prop] = 
(string)$value;
}
}
+   $object['sd'] = $sdarray;
+   return true;
}
}
-   $object['sd'] = $sdarray;
}
return true;
}
@@ -47,11 +48,15 @@
// from wiki's
//$require_filter_label = wfMsg( 
'sd_createfilter_requirefilter' );
 
+   $filter_array = array();
if ( !is_null( $field ) ) {
$sd_array = 
$field-getObject('semanticdrilldown_Filter');
-   $filter_array = $sd_array['sd'];
-   } else {
-   $filter_array = array();
+   if ( array_key_exists( 'sd', $sd_array ) ) {
+   $filter_array = $sd_array['sd'];
+   $hasExistingValues = true;
+   } else {
+   $hasExistingValues = false;
+   }
}
 
if ( array_key_exists( 'Label', $filter_array ) ) {
@@ -159,26 +164,26 @@
$html_text .= Html::rawElement( 'select', array( 'name' = 
'sd_input_type_num', 'id' = 'input_type_dropdown' ), $inputTypeOptionsHTML ) . 
\n;
$html_text .= /p\n;
 
-   $text_extensions['sd'] = array( 'Filter', '#FDD', $html_text );
+   $text_extensions['sd'] = array( 'Filter', '#FDD', $html_text, 
$hasExistingValues );
 
return true;
}
 
public static function getFieldXMLForPS( $request, $xmlArray ) {
-   $templateNum = -1;
+   $fieldNum = -1;
$xmlPerField = array();
foreach ( $request-getValues() as $var = $val ) {
if ( substr( $var, 0, 15 ) == 'sd_filter_name_' ) {
$xml = 'semanticdrilldown_Filter';
-   $templateNum = substr( $var, 15 );
+   $fieldNum = substr( $var, 15 );
$xml .= 'Label'.$val.'/Label';
} elseif ( substr( $var, 0, 17 ) == 
'sd_values_source_') {
if ( $val == 'category' ) {
-   $xml .= 'ValuesFromCategory' . 
$request-getText('sd_category_name_' . $templateNum) . '/ValuesFromCategory';
+   $xml .= 'ValuesFromCategory' . 
$request-getText('sd_category_name_' . $fieldNum) . '/ValuesFromCategory';
} elseif ( $val == 'dates' ) {
-$xml .= 'TimePeriod' . 
$request-getText('sd_time_period_' . $templateNum) . '/TimePeriod';
+$xml .= 'TimePeriod' . 
$request-getText('sd_time_period_' . $fieldNum) . '/TimePeriod';
} elseif ( $val == 'manual' ) {
-   $filter_manual_values_str = 
$request-getText('sd_filter_values_'.$templateNum);
+   $filter_manual_values_str = 
$request-getText('sd_filter_values_' . $fieldNum);
// replace the comma substitution 
character that has no chance of
// being included in the values list - 
namely, the ASCII beep
$listSeparator = ',';
@@ -197,7 +202,7 @@
$xml .= 'InputType' . $val . 
'/InputType';
}
$xml .= '/semanticdrilldown_Filter';
-   $xmlPerField[] = $xml;
+   $xmlPerField[$fieldNum] = $xml;
}
}
 
@@ -224,7 +229,7 @@
$text .= 
PageSchemas::tableMessageRowHTML(paramAttrMsg, $prop, $value );
}
}
- 

[MediaWiki-CVS] SVN: [97282] trunk/extensions/SemanticMediaWiki/includes/SMW_PageSchemas. php

2011-09-16 Thread yaron
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97282

Revision: 97282
Author:   yaron
Date: 2011-09-16 14:55:40 + (Fri, 16 Sep 2011)
Log Message:
---
Added support for new collapsed-sections feature in Page Schemas extension's 
'edit schema' page

Modified Paths:
--
trunk/extensions/SemanticMediaWiki/includes/SMW_PageSchemas.php

Modified: trunk/extensions/SemanticMediaWiki/includes/SMW_PageSchemas.php
===
--- trunk/extensions/SemanticMediaWiki/includes/SMW_PageSchemas.php 
2011-09-16 14:52:51 UTC (rev 97281)
+++ trunk/extensions/SemanticMediaWiki/includes/SMW_PageSchemas.php 
2011-09-16 14:55:40 UTC (rev 97282)
@@ -47,15 +47,19 @@
return true;
}
 
+   /**
+* Constructs XML for the SMW property, based on what was submitted
+* in the 'edit schema' form.
+*/
function getFieldXML( $request, $xmlArray ) {
-   $templateNum = -1;
+   $fieldNum = -1;
$xmlPerField = array();
foreach ( $request-getValues() as $var = $val ) {
if ( substr( $var, 0, 18 ) == 'smw_property_name_' ) {
-   $templateNum = substr($var,18,1);
-   $xml = 'semanticmediawiki_Property 
name='.$val.' ';
+   $fieldNum = substr( $var, 18 );
+   $xml = 'semanticmediawiki_Property name=' . 
$val . ' ';
} elseif ( substr( $var, 0, 18 ) == 
'smw_property_type_'){
-   $xml .= 'Type'.$val.'/Type';
+   $xml .= 'Type' . $val . '/Type';
} elseif ( substr( $var, 0, 11 ) == 'smw_values_') {
if ( $val != '' ) {
// replace the comma substitution 
character that has no chance of
@@ -66,11 +70,11 @@
foreach ( $allowed_values_array as $i 
= $value ) {
// replace beep back with 
comma, trim
$value = str_replace( \a, 
$listSeparator, trim( $value ) );
-   $xml .= 
'AllowedValue'.$value.'/AllowedValue';
+   $xml .= 'AllowedValue' . 
$value . '/AllowedValue';
}
}
$xml .= '/semanticmediawiki_Property';
-   $xmlPerField[] = $xml;
+   $xmlPerField[$fieldNum] = $xml;
}
}
$xmlArray['smw'] = $xmlPerField;
@@ -80,11 +84,15 @@
function getFieldHTML( $field, $text_extensions ) {
global $smwgContLang;
$datatype_labels = $smwgContLang-getDatatypeLabels();
+   $prop_array = array();
if ( !is_null( $field ) ) {
$smw_array = 
$field-getObject('semanticmediawiki_Property'); //this returns an array with 
property values filled
-   $prop_array = $smw_array['smw'];
-   } else {
-   $prop_array = array();
+   if ( array_key_exists( 'smw', $smw_array ) ) {
+   $prop_array = $smw_array['smw'];
+   $hasExistingValues = true;
+   } else {
+   $hasExistingValues = false;
+   }
}
$html_text = 'pProperty name: ';
if ( array_key_exists( 'name', $prop_array ) ) {
@@ -123,7 +131,7 @@
}
$html_text .= 'p' . Html::input( 'smw_values_num', 
$allowed_val_string, 'text', $allowedValsInputAttrs ) . /p\n;
 
-   $text_extensions['smw'] = array( 'Property', '#DEF', $html_text 
);
+   $text_extensions['smw'] = array( 'Semantic property', '#DEF', 
$html_text, $hasExistingValues );
 
return true;
}
@@ -207,9 +215,10 @@
}
}
$smw_array['allowed_value_array'] = 
$allowed_value_array;
+   $object['smw'] = $smw_array;
+   return true;
}
}
-   $object['smw'] = $smw_array;
}
return true;
}


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


[MediaWiki-CVS] SVN: [97283] branches/REL1_18/phase3/includes

2011-09-16 Thread reedy
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97283

Revision: 97283
Author:   reedy
Date: 2011-09-16 15:01:15 + (Fri, 16 Sep 2011)
Log Message:
---
REL1_18 MFT r97159 where appropriate

Modified Paths:
--
branches/REL1_18/phase3/includes/Action.php
branches/REL1_18/phase3/includes/Article.php
branches/REL1_18/phase3/includes/ChangesList.php
branches/REL1_18/phase3/includes/HTMLForm.php
branches/REL1_18/phase3/includes/OutputPage.php
branches/REL1_18/phase3/includes/RequestContext.php
branches/REL1_18/phase3/includes/RevisionList.php
branches/REL1_18/phase3/includes/SpecialPage.php
branches/REL1_18/phase3/includes/SpecialPageFactory.php
branches/REL1_18/phase3/includes/Wiki.php
branches/REL1_18/phase3/includes/revisiondelete/RevisionDeleteAbstracts.php

Property Changed:

branches/REL1_18/phase3/includes/ChangesList.php
branches/REL1_18/phase3/includes/OutputPage.php
branches/REL1_18/phase3/includes/SpecialPage.php
branches/REL1_18/phase3/includes/SpecialPageFactory.php

Modified: branches/REL1_18/phase3/includes/Action.php
===
--- branches/REL1_18/phase3/includes/Action.php 2011-09-16 14:55:40 UTC (rev 
97282)
+++ branches/REL1_18/phase3/includes/Action.php 2011-09-16 15:01:15 UTC (rev 
97283)
@@ -32,8 +32,8 @@
protected $page;
 
/**
-* RequestContext if specified; otherwise we'll use the Context from 
the Page
-* @var RequestContext
+* IContextSource if specified; otherwise we'll use the Context from 
the Page
+* @var IContextSource
 */
protected $context;
 
@@ -96,11 +96,11 @@
}
 
/**
-* Get the RequestContext in use here
-* @return RequestContext
+* Get the IContextSource in use here
+* @return IContextSource
 */
protected final function getContext() {
-   if ( $this-context instanceof RequestContext ) {
+   if ( $this-context instanceof IContextSource ) {
return $this-context;
}
return $this-page-getContext();

Modified: branches/REL1_18/phase3/includes/Article.php
===
--- branches/REL1_18/phase3/includes/Article.php2011-09-16 14:55:40 UTC 
(rev 97282)
+++ branches/REL1_18/phase3/includes/Article.php2011-09-16 15:01:15 UTC 
(rev 97283)
@@ -23,7 +23,7 @@
 */
 
/**
-* @var RequestContext
+* @var IContextSource
 */
protected $mContext;
 
@@ -88,10 +88,10 @@
 * Create an Article object of the appropriate class for the given page.
 *
 * @param $title Title
-* @param $context RequestContext
+* @param $context IContextSource
 * @return Article object
 */
-   public static function newFromTitle( $title, RequestContext $context ) {
+   public static function newFromTitle( $title, IContextSource $context ) {
if ( NS_MEDIA == $title-getNamespace() ) {
// FIXME: where should this go?
$title = Title::makeTitle( NS_FILE, $title-getDBkey() 
);
@@ -1852,7 +1852,7 @@
/**
 * Sets the context this Article is executed in
 *
-* @param $context RequestContext
+* @param $context IContextSource
 * @since 1.18
 */
public function setContext( $context ) {
@@ -1862,11 +1862,11 @@
/**
 * Gets the context this Article is executed in
 *
-* @return RequestContext
+* @return IContextSource
 * @since 1.18
 */
public function getContext() {
-   if ( $this-mContext instanceof RequestContext ) {
+   if ( $this-mContext instanceof IContextSource ) {
return $this-mContext;
} else {
wfDebug( __METHOD__ .  called and \$mContext is null. 
Return RequestContext::getMain(); for sanity\n );

Modified: branches/REL1_18/phase3/includes/ChangesList.php
===
--- branches/REL1_18/phase3/includes/ChangesList.php2011-09-16 14:55:40 UTC 
(rev 97282)
+++ branches/REL1_18/phase3/includes/ChangesList.php2011-09-16 15:01:15 UTC 
(rev 97283)
@@ -45,10 +45,10 @@
/**
 * Changeslist contructor
 *
-* @param $obj Skin or RequestContext
+* @param $obj Skin or IContextSource
 */
public function __construct( $obj ) {
-   if ( $obj instanceof RequestContext ) {
+   if ( $obj instanceof IContextSource ) {
$this-setContext( $obj );
$this-skin = $obj-getSkin();
} else {
@@ -74,10 +74,10 @@
 * Fetch an 

[MediaWiki-CVS] SVN: [97284] trunk/extensions/Maps/includes

2011-09-16 Thread jeroendedauw
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97284

Revision: 97284
Author:   jeroendedauw
Date: 2011-09-16 15:04:49 + (Fri, 16 Sep 2011)
Log Message:
---
use style args that are escaped; not strictrly needed here as the vars have 
already been sanitized, but good practice won't hurt

Modified Paths:
--
trunk/extensions/Maps/includes/features/Maps_BaseMap.php
trunk/extensions/Maps/includes/features/Maps_BasePointMap.php
trunk/extensions/Maps/includes/services/OSM/Maps_OSMDispMap.php

Modified: trunk/extensions/Maps/includes/features/Maps_BaseMap.php
===
--- trunk/extensions/Maps/includes/features/Maps_BaseMap.php2011-09-16 
15:01:15 UTC (rev 97283)
+++ trunk/extensions/Maps/includes/features/Maps_BaseMap.php2011-09-16 
15:04:49 UTC (rev 97284)
@@ -100,7 +100,12 @@
'div',
array(
'id' = $mapName,
-   'style' = width: {$params['width']}; height: 
{$params['height']}; background-color: #cc; overflow: hidden;,
+   'style' = array(
+   'width' = $params['width'],
+   'height' = $params['height'],
+   'background-color' = '#cc',
+   'overflow' = 'hidden'
+   )
),
wfMsg( 'maps-loading-map' )
);

Modified: trunk/extensions/Maps/includes/features/Maps_BasePointMap.php
===
--- trunk/extensions/Maps/includes/features/Maps_BasePointMap.php   
2011-09-16 15:01:15 UTC (rev 97283)
+++ trunk/extensions/Maps/includes/features/Maps_BasePointMap.php   
2011-09-16 15:04:49 UTC (rev 97284)
@@ -76,7 +76,12 @@
'div',
array(
'id' = $mapName,
-   'style' = width: {$params['width']}; height: 
{$params['height']}; background-color: #cc; overflow: hidden;,
+   'style' = array(
+   'width' = $params['width'],
+   'height' = $params['height'],
+   'background-color' = '#cc',
+   'overflow' = 'hidden'
+   )
),
wfMsg( 'maps-loading-map' )
);

Modified: trunk/extensions/Maps/includes/services/OSM/Maps_OSMDispMap.php
===
--- trunk/extensions/Maps/includes/services/OSM/Maps_OSMDispMap.php 
2011-09-16 15:01:15 UTC (rev 97283)
+++ trunk/extensions/Maps/includes/services/OSM/Maps_OSMDispMap.php 
2011-09-16 15:04:49 UTC (rev 97284)
@@ -27,7 +27,11 @@
'iframe',
array(
'id' = $mapName,
-   'style' = width: {$params['width']}; height: 
{$params['height']}; clear: both;,
+   'style' = array(
+   'width' = $params['width'],
+   'height' = $params['height'],
+   'clear' = 'both'
+   ),
'src' = 
http://toolserver.org/~kolossos/openlayers/kml-on-ol.php?zoom={$params['zoom']}lat={$params['centre']['lat']}lon={$params['centre']['lon']}lang=$langthumbs=$thumbsphoto=$photos
),
wfMsg( 'maps-loading-map' )


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


[MediaWiki-CVS] SVN: [97285] trunk/extensions/SemanticMaps/includes/queryprinters/ SM_MapPrinter.php

2011-09-16 Thread jeroendedauw
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97285

Revision: 97285
Author:   jeroendedauw
Date: 2011-09-16 15:05:00 + (Fri, 16 Sep 2011)
Log Message:
---
use style args that are escaped; not strictrly needed here as the vars have 
already been sanitized, but good practice won't hurt

Modified Paths:
--
trunk/extensions/SemanticMaps/includes/queryprinters/SM_MapPrinter.php

Modified: trunk/extensions/SemanticMaps/includes/queryprinters/SM_MapPrinter.php
===
--- trunk/extensions/SemanticMaps/includes/queryprinters/SM_MapPrinter.php  
2011-09-16 15:04:49 UTC (rev 97284)
+++ trunk/extensions/SemanticMaps/includes/queryprinters/SM_MapPrinter.php  
2011-09-16 15:05:00 UTC (rev 97285)
@@ -207,7 +207,12 @@
'div',
array(
'id' = $mapName,
-   'style' = width: {$params['width']}; height: 
{$params['height']}; background-color: #cc; overflow: hidden;,
+   'style' = array(
+   'width' = $params['width'],
+   'height' = $params['height'],
+   'background-color' = '#cc',
+   'overflow' = 'hidden'
+   )
),
wfMsg( 'maps-loading-map' )
);


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


[MediaWiki-CVS] SVN: [97286] trunk/extensions/SemanticResultFormats/TagCloud/SRF_TagCloud. php

2011-09-16 Thread jeroendedauw
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97286

Revision: 97286
Author:   jeroendedauw
Date: 2011-09-16 15:05:25 + (Fri, 16 Sep 2011)
Log Message:
---
use style args that are escaped; not strictrly needed here as the vars have 
already been sanitized, but good practice won't hurt

Modified Paths:
--
trunk/extensions/SemanticResultFormats/TagCloud/SRF_TagCloud.php

Modified: trunk/extensions/SemanticResultFormats/TagCloud/SRF_TagCloud.php
===
--- trunk/extensions/SemanticResultFormats/TagCloud/SRF_TagCloud.php
2011-09-16 15:05:00 UTC (rev 97285)
+++ trunk/extensions/SemanticResultFormats/TagCloud/SRF_TagCloud.php
2011-09-16 15:05:25 UTC (rev 97286)
@@ -219,7 +219,7 @@
foreach ( $tags as $name = $size ) {
$htmlTags[] = Html::rawElement(
'span',
-   array( 'style' = font-size:$size% ),
+   array( 'style' = array( 'font-size' = 
$size% ) ),
$this-tagsHtml[$name]
);
}


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


[MediaWiki-CVS] SVN: [97287] branches/wmf/1.17wmf1

2011-09-16 Thread reedy
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97287

Revision: 97287
Author:   reedy
Date: 2011-09-16 15:12:10 + (Fri, 16 Sep 2011)
Log Message:
---
1.17wmf1 MFT r96562, r97177

Modified Paths:
--
branches/wmf/1.17wmf1/includes/HttpFunctions.php
branches/wmf/1.17wmf1/languages/messages/MessagesKk_cyrl.php

Modified: branches/wmf/1.17wmf1/includes/HttpFunctions.php
===
--- branches/wmf/1.17wmf1/includes/HttpFunctions.php2011-09-16 15:05:25 UTC 
(rev 97286)
+++ branches/wmf/1.17wmf1/includes/HttpFunctions.php2011-09-16 15:12:10 UTC 
(rev 97287)
@@ -32,7 +32,6 @@
 * @return Mixed: (bool)false on failure or a string on success
 */
public static function request( $method, $url, $options = array() ) {
-   $url = wfExpandUrl( $url, PROTO_HTTP );
wfDebug( HTTP: $method: $url\n );
$options['method'] = strtoupper( $method );
 
@@ -165,14 +164,14 @@
public $status;
 
/**
-* @param $url String: url to use
+* @param $url String: url to use. If protocol-relative, will be 
expanded to an http:// URL
 * @param $options Array: (optional) extra params to pass (see 
Http::request())
 */
function __construct( $url, $options = array() ) {
global $wgHTTPTimeout;
 
-   $this-url = $url;
-   $this-parsedUrl = parse_url( $url );
+   $this-url = wfExpandUrl( $url, PROTO_HTTP );
+   $this-parsedUrl = parse_url( $this-url );
 
if ( !Http::isValidURI( $this-url ) ) {
$this-status = Status::newFatal( 'http-invalid-url' );

Modified: branches/wmf/1.17wmf1/languages/messages/MessagesKk_cyrl.php
===
--- branches/wmf/1.17wmf1/languages/messages/MessagesKk_cyrl.php
2011-09-16 15:05:25 UTC (rev 97286)
+++ branches/wmf/1.17wmf1/languages/messages/MessagesKk_cyrl.php
2011-09-16 15:12:10 UTC (rev 97287)
@@ -33,6 +33,8 @@
 
 $fallback8bitEncoding = 'windows-1251';
 
+$linkTrail = 
'/^([a-zäçéğıïñöşüýʺʹа-яёәғіқңөұүһٴابپتجحدرزسشعفقكلمنڭەوۇۋۆىيچھ“»]+)(.*)$/sDu';
+
 $namespaceNames = array(
NS_MEDIA= 'Таспа',
NS_SPECIAL  = 'Арнайы',


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


[MediaWiki-CVS] SVN: [97288] trunk/extensions/SemanticMediaWiki

2011-09-16 Thread jeroendedauw
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97288

Revision: 97288
Author:   jeroendedauw
Date: 2011-09-16 15:12:40 + (Fri, 16 Sep 2011)
Log Message:
---
use style args that are escaped; not strictrly needed here as the vars have 
already been sanitized, but good practice won't hurt

Modified Paths:
--

trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_Category.php
trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_List.php
trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUI.php

Modified: 
trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_Category.php
===
--- 
trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_Category.php   
2011-09-16 15:12:10 UTC (rev 97287)
+++ 
trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_Category.php   
2011-09-16 15:12:40 UTC (rev 97288)
@@ -69,9 +69,14 @@
$cur_first_char = $wgContLang-firstChar( $sortkey == 
'' ? $content[0]-getDBkey() : $sortkey );

if ( $rowindex % $rows_per_column == 0 ) {
-   $result .= \n  div 
style=\float: left; width: $column_width%;\\n;
-   if ( $cur_first_char == $prev_first_char )
+   $result .= Html::openElement( 'div', array( 
'style' = array(
+   'float' = 'left',
+   'width' = $column_width%
+   ) ) );
+   
+   if ( $cur_first_char == $prev_first_char ) {
$result .= 
h3$cur_first_char  . wfMsg( 'listingcontinuesabbrev' ) . /h3\n
ul\n;
+   }
}

// if we're at a new first letter, end

Modified: 
trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_List.php
===
--- trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_List.php   
2011-09-16 15:12:10 UTC (rev 97287)
+++ trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_List.php   
2011-09-16 15:12:40 UTC (rev 97288)
@@ -106,7 +106,14 @@
// Set up floating divs, if there's more than one column
if ( $this-mColumns  1 ) {
$column_width = floor( 100 / $this-mColumns );
-   $result .= 'div style=float: left; width: ' . 
$column_width . '%' . \n;
+   
+   $result .= Html::openElement(
+   'div',
+   array(
+   'style' = array( 'float' = 'left', 
'width' = $column_width% )
+   )
+   );
+   
$rows_per_column = ceil( $res-getCount() / 
$this-mColumns );
$rows_in_cur_column = 0;
}

Modified: trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUI.php
===
--- trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUI.php  
2011-09-16 15:12:10 UTC (rev 97287)
+++ trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUI.php  
2011-09-16 15:12:40 UTC (rev 97288)
@@ -525,9 +525,11 @@
}
$result .= Html::openElement(
'div',
-   array( 'id' = 'smwmainlabel',
+   array(
+   'id' = 'smwmainlabel',
'class' = 'smwsort',
-   'style' = display:$formDisplay; )
+   'style' = array( 'display' = 
$formDisplay )
+   )
) .
Html::openElement( 'span',
array( 'class' = 'smwquisortlabel' ) ) .
@@ -1728,7 +1730,7 @@
$resultHtml .= Html::rawElement(
'div',
array(
-   'style' = 'background: ' . ( 
$flipStyle ? 'white' : '#dd' ) . ';'
+   'style' = array( 'background' = 
$flipStyle ? 'white' : '#dd' ) )
),
$rowHtml
);


___
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org

[MediaWiki-CVS] SVN: [97289] branches/wmf/1.17wmf1/extensions/OggHandler

2011-09-16 Thread reedy
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97289

Revision: 97289
Author:   reedy
Date: 2011-09-16 15:17:57 + (Fri, 16 Sep 2011)
Log Message:
---
1.17wmf1 Revert r96400, MFT r96560

Modified Paths:
--
branches/wmf/1.17wmf1/extensions/OggHandler/OggHandler_body.php
branches/wmf/1.17wmf1/extensions/OggHandler/OggPlayer.js

Modified: branches/wmf/1.17wmf1/extensions/OggHandler/OggHandler_body.php
===
--- branches/wmf/1.17wmf1/extensions/OggHandler/OggHandler_body.php 
2011-09-16 15:12:40 UTC (rev 97288)
+++ branches/wmf/1.17wmf1/extensions/OggHandler/OggHandler_body.php 
2011-09-16 15:17:57 UTC (rev 97289)
@@ -418,12 +418,12 @@
}
 
static function getMyScriptPath() {
-   global $wgScriptPath;
-   return $wgScriptPath/extensions/OggHandler;
+   global $wgExtensionAssetsPath;
+   return $wgExtensionAssetsPath/OggHandler;
}
 
function setHeaders( $out ) {
-   global $wgOggScriptVersion, $wgCortadoJarFile, $wgServer;
+   global $wgOggScriptVersion, $wgCortadoJarFile;
 
if ( $out-hasHeadItem( 'OggHandlerScript' )  
$out-hasHeadItem( 'OggHandlerInlineScript' ) 
$out-hasHeadItem( 'OggHandlerInlineCSS' ) ) {
@@ -441,8 +441,9 @@
$cortadoUrl = $wgCortadoJarFile;
$scriptPath = self::getMyScriptPath();
if( substr( $cortadoUrl, 0, 1 ) != '/'
-substr( $cortadoUrl, 0, 4 ) != 'http' ) {
-   $cortadoUrl = $wgServer$scriptPath/$cortadoUrl;
+substr( $cortadoUrl, 0, 4 ) != 'http' )
+   {
+   $cortadoUrl = wfExpandUrl( $scriptPath/$cortadoUrl, 
PROTO_CURRENT );
}
$encCortadoUrl = Xml::encodeJsVar( $cortadoUrl );
$encExtPathUrl = Xml::encodeJsVar( $scriptPath );
@@ -514,11 +515,7 @@
 
OggTransformOutput::$serial++;
 
-   if ( substr( $this-videoUrl, 0, 4 ) != 'http' ) {
-   $url = wfExpandUrl( $this-videoUrl, PROTO_CURRENT );
-   } else {
-   $url = $this-videoUrl;
-   }
+   $url = wfExpandUrl( $this-videoUrl, PROTO_RELATIVE );
// Normalize values
$length = floatval( $this-length );
$width = intval( $this-width );

Modified: branches/wmf/1.17wmf1/extensions/OggHandler/OggPlayer.js
===
--- branches/wmf/1.17wmf1/extensions/OggHandler/OggPlayer.js2011-09-16 
15:12:40 UTC (rev 97288)
+++ branches/wmf/1.17wmf1/extensions/OggHandler/OggPlayer.js2011-09-16 
15:17:57 UTC (rev 97289)
@@ -51,6 +51,11 @@
 * Parameters are: id, videoUrl, width, height, length, linkUrl, isVideo
 */
'init': function ( player, params ) {
+   // Expand params.videoUrl if protocol-relative
+   if ( params.videoUrl.substr( 0, 2 ) == '//' ) {
+   // window.location.protocol is something like 'http:'
+   params.videoUrl = window.location.protocol + 
params.videoUrl;
+   }
elt = document.getElementById( params.id );
 
// Save still image HTML


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


[MediaWiki-CVS] SVN: [97290] trunk/extensions/SemanticMediaWiki

2011-09-16 Thread jeroendedauw
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97290

Revision: 97290
Author:   jeroendedauw
Date: 2011-09-16 15:20:21 + (Fri, 16 Sep 2011)
Log Message:
---
revert r97288; interface is proposed but does not exist yet - I failed

Modified Paths:
--

trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_Category.php
trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_List.php
trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUI.php

Modified: 
trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_Category.php
===
--- 
trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_Category.php   
2011-09-16 15:17:57 UTC (rev 97289)
+++ 
trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_Category.php   
2011-09-16 15:20:21 UTC (rev 97290)
@@ -69,14 +69,9 @@
$cur_first_char = $wgContLang-firstChar( $sortkey == 
'' ? $content[0]-getDBkey() : $sortkey );

if ( $rowindex % $rows_per_column == 0 ) {
-   $result .= Html::openElement( 'div', array( 
'style' = array(
-   'float' = 'left',
-   'width' = $column_width%
-   ) ) );
-   
-   if ( $cur_first_char == $prev_first_char ) {
+   $result .= \n  div 
style=\float: left; width: $column_width%;\\n;
+   if ( $cur_first_char == $prev_first_char )
$result .= 
h3$cur_first_char  . wfMsg( 'listingcontinuesabbrev' ) . /h3\n
ul\n;
-   }
}

// if we're at a new first letter, end

Modified: 
trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_List.php
===
--- trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_List.php   
2011-09-16 15:17:57 UTC (rev 97289)
+++ trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_List.php   
2011-09-16 15:20:21 UTC (rev 97290)
@@ -106,14 +106,7 @@
// Set up floating divs, if there's more than one column
if ( $this-mColumns  1 ) {
$column_width = floor( 100 / $this-mColumns );
-   
-   $result .= Html::openElement(
-   'div',
-   array(
-   'style' = array( 'float' = 'left', 
'width' = $column_width% )
-   )
-   );
-   
+   $result .= 'div style=float: left; width: ' . 
$column_width . '%' . \n;
$rows_per_column = ceil( $res-getCount() / 
$this-mColumns );
$rows_in_cur_column = 0;
}

Modified: trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUI.php
===
--- trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUI.php  
2011-09-16 15:17:57 UTC (rev 97289)
+++ trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUI.php  
2011-09-16 15:20:21 UTC (rev 97290)
@@ -525,11 +525,9 @@
}
$result .= Html::openElement(
'div',
-   array(
-   'id' = 'smwmainlabel',
+   array( 'id' = 'smwmainlabel',
'class' = 'smwsort',
-   'style' = array( 'display' = 
$formDisplay )
-   )
+   'style' = display:$formDisplay; )
) .
Html::openElement( 'span',
array( 'class' = 'smwquisortlabel' ) ) .
@@ -1730,7 +1728,7 @@
$resultHtml .= Html::rawElement(
'div',
array(
-   'style' = array( 'background' = 
$flipStyle ? 'white' : '#dd' ) )
+   'style' = 'background: ' . ( 
$flipStyle ? 'white' : '#dd' ) . ';'
),
$rowHtml
);


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


[MediaWiki-CVS] SVN: [97291] trunk/phase3/includes/Exception.php

2011-09-16 Thread demon
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97291

Revision: 97291
Author:   demon
Date: 2011-09-16 15:21:06 + (Fri, 16 Sep 2011)
Log Message:
---
Don't attempt to get a request url from a FauxRequest

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

Modified: trunk/phase3/includes/Exception.php
===
--- trunk/phase3/includes/Exception.php 2011-09-16 15:20:21 UTC (rev 97290)
+++ trunk/phase3/includes/Exception.php 2011-09-16 15:21:06 UTC (rev 97291)
@@ -150,7 +150,7 @@
$line = $this-getLine();
$message = $this-getMessage();
 
-   if ( isset( $wgRequest ) ) {
+   if ( isset( $wgRequest )  !$wgRequest instanceof FauxRequest 
) {
$url = $wgRequest-getRequestURL();
if ( !$url ) {
$url = '[no URL]';


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


[MediaWiki-CVS] SVN: [97292] trunk/extensions/SemanticResultFormats/TagCloud/SRF_TagCloud. php

2011-09-16 Thread jeroendedauw
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97292

Revision: 97292
Author:   jeroendedauw
Date: 2011-09-16 15:21:49 + (Fri, 16 Sep 2011)
Log Message:
---
revert r97286; interface is proposed but does not exist yet - I failed

Modified Paths:
--
trunk/extensions/SemanticResultFormats/TagCloud/SRF_TagCloud.php

Modified: trunk/extensions/SemanticResultFormats/TagCloud/SRF_TagCloud.php
===
--- trunk/extensions/SemanticResultFormats/TagCloud/SRF_TagCloud.php
2011-09-16 15:21:06 UTC (rev 97291)
+++ trunk/extensions/SemanticResultFormats/TagCloud/SRF_TagCloud.php
2011-09-16 15:21:49 UTC (rev 97292)
@@ -219,7 +219,7 @@
foreach ( $tags as $name = $size ) {
$htmlTags[] = Html::rawElement(
'span',
-   array( 'style' = array( 'font-size' = 
$size% ) ),
+   array( 'style' = font-size:$size% ),
$this-tagsHtml[$name]
);
}


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


[MediaWiki-CVS] SVN: [97293] trunk/extensions/SemanticMaps/includes/queryprinters/ SM_MapPrinter.php

2011-09-16 Thread jeroendedauw
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97293

Revision: 97293
Author:   jeroendedauw
Date: 2011-09-16 15:23:57 + (Fri, 16 Sep 2011)
Log Message:
---
revert r97285; interface is proposed but does not exist yet - I failed

Modified Paths:
--
trunk/extensions/SemanticMaps/includes/queryprinters/SM_MapPrinter.php

Modified: trunk/extensions/SemanticMaps/includes/queryprinters/SM_MapPrinter.php
===
--- trunk/extensions/SemanticMaps/includes/queryprinters/SM_MapPrinter.php  
2011-09-16 15:21:49 UTC (rev 97292)
+++ trunk/extensions/SemanticMaps/includes/queryprinters/SM_MapPrinter.php  
2011-09-16 15:23:57 UTC (rev 97293)
@@ -207,12 +207,7 @@
'div',
array(
'id' = $mapName,
-   'style' = array(
-   'width' = $params['width'],
-   'height' = $params['height'],
-   'background-color' = '#cc',
-   'overflow' = 'hidden'
-   )
+   'style' = width: {$params['width']}; height: 
{$params['height']}; background-color: #cc; overflow: hidden;,
),
wfMsg( 'maps-loading-map' )
);


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


[MediaWiki-CVS] SVN: [97294] trunk/extensions/Maps/includes

2011-09-16 Thread jeroendedauw
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97294

Revision: 97294
Author:   jeroendedauw
Date: 2011-09-16 15:24:57 + (Fri, 16 Sep 2011)
Log Message:
---
revert r97284; interface is proposed but does not exist yet - I failed

Modified Paths:
--
trunk/extensions/Maps/includes/features/Maps_BaseMap.php
trunk/extensions/Maps/includes/features/Maps_BasePointMap.php
trunk/extensions/Maps/includes/services/OSM/Maps_OSMDispMap.php

Modified: trunk/extensions/Maps/includes/features/Maps_BaseMap.php
===
--- trunk/extensions/Maps/includes/features/Maps_BaseMap.php2011-09-16 
15:23:57 UTC (rev 97293)
+++ trunk/extensions/Maps/includes/features/Maps_BaseMap.php2011-09-16 
15:24:57 UTC (rev 97294)
@@ -100,12 +100,7 @@
'div',
array(
'id' = $mapName,
-   'style' = array(
-   'width' = $params['width'],
-   'height' = $params['height'],
-   'background-color' = '#cc',
-   'overflow' = 'hidden'
-   )
+   'style' = width: {$params['width']}; height: 
{$params['height']}; background-color: #cc; overflow: hidden;,
),
wfMsg( 'maps-loading-map' )
);

Modified: trunk/extensions/Maps/includes/features/Maps_BasePointMap.php
===
--- trunk/extensions/Maps/includes/features/Maps_BasePointMap.php   
2011-09-16 15:23:57 UTC (rev 97293)
+++ trunk/extensions/Maps/includes/features/Maps_BasePointMap.php   
2011-09-16 15:24:57 UTC (rev 97294)
@@ -76,12 +76,7 @@
'div',
array(
'id' = $mapName,
-   'style' = array(
-   'width' = $params['width'],
-   'height' = $params['height'],
-   'background-color' = '#cc',
-   'overflow' = 'hidden'
-   )
+   'style' = width: {$params['width']}; height: 
{$params['height']}; background-color: #cc; overflow: hidden;,
),
wfMsg( 'maps-loading-map' )
);

Modified: trunk/extensions/Maps/includes/services/OSM/Maps_OSMDispMap.php
===
--- trunk/extensions/Maps/includes/services/OSM/Maps_OSMDispMap.php 
2011-09-16 15:23:57 UTC (rev 97293)
+++ trunk/extensions/Maps/includes/services/OSM/Maps_OSMDispMap.php 
2011-09-16 15:24:57 UTC (rev 97294)
@@ -27,11 +27,7 @@
'iframe',
array(
'id' = $mapName,
-   'style' = array(
-   'width' = $params['width'],
-   'height' = $params['height'],
-   'clear' = 'both'
-   ),
+   'style' = width: {$params['width']}; height: 
{$params['height']}; clear: both;,
'src' = 
http://toolserver.org/~kolossos/openlayers/kml-on-ol.php?zoom={$params['zoom']}lat={$params['centre']['lat']}lon={$params['centre']['lon']}lang=$langthumbs=$thumbsphoto=$photos
),
wfMsg( 'maps-loading-map' )


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


[MediaWiki-CVS] SVN: [97295] branches/ariel/xmldumps-backup

2011-09-16 Thread ariel
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97295

Revision: 97295
Author:   ariel
Date: 2011-09-16 15:44:53 + (Fri, 16 Sep 2011)
Log Message:
---
fix typo in error message; make ListOutputFilesToPublish for xml stub recombine 
step work; rerun xml dump step from given pageid (poorly); remove commented out 
try stanzas frmo debugging

Modified Paths:
--
branches/ariel/xmldumps-backup/worker.py
branches/ariel/xmldumps-backup/writeuptopageid.c

Modified: branches/ariel/xmldumps-backup/worker.py
===
--- branches/ariel/xmldumps-backup/worker.py2011-09-16 15:24:57 UTC (rev 
97294)
+++ branches/ariel/xmldumps-backup/worker.py2011-09-16 15:44:53 UTC (rev 
97295)
@@ -485,7 +485,7 @@
self._toBeRun = toBeRun
 
 class DumpItemList(object):
-   def __init__(self, wiki, prefetch, spawn, chunkToDo, checkpointFile, 
singleJob, chunkInfo, runInfoFile, dumpDir):
+   def __init__(self, wiki, prefetch, spawn, chunkToDo, checkpointFile, 
singleJob, chunkInfo, pageIDRange, runInfoFile, dumpDir):
self.wiki = wiki
self._hasFlaggedRevs = self.wiki.hasFlaggedRevs()
self._prefetch = prefetch
@@ -496,6 +496,8 @@
self._singleJob = singleJob
self._runInfoFile = runInfoFile
self.dumpDir = dumpDir
+   self.pageIDRange = pageIDRange
+
if self.wiki.config.checkpointTime:
checkpoints = True
else:
@@ -570,7 +572,7 @@
XmlDump(articles,
articlesdump,
bigbArticles, templates, image 
descriptions, and primary meta-pages./b/big,
-   This contains current versions of article 
content, and is the archive most mirror sites will probably want., 
self.findItemByName('xmlstubsdump'), self._prefetch, self._spawn, self.wiki, 
self._getChunkToDo(articlesdump), self.chunkInfo.getPagesPerChunkHistory(), 
checkpoints, self.checkpointFile))
+   This contains current versions of article 
content, and is the archive most mirror sites will probably want., 
self.findItemByName('xmlstubsdump'), self._prefetch, self._spawn, self.wiki, 
self._getChunkToDo(articlesdump), self.chunkInfo.getPagesPerChunkHistory(), 
checkpoints, self.checkpointFile, self.pageIDRange))
if (self.chunkInfo.chunksEnabled()):

self.dumpItems.append(RecombineXmlDump(articlesdumprecombine, 
bigbRecombine articles, templates, image descriptions, and primary 
meta-pages./b/big,This contains current versions of article content, and 
is the archive most mirror sites will probably want.,  
self.findItemByName('articlesdump')))

@@ -578,7 +580,7 @@
XmlDump(meta-current,
metacurrentdump,
All pages, current versions only.,
-   Discussion and user pages are included in this 
complete archive. Most mirrors won't want this extra material., 
self.findItemByName('xmlstubsdump'), self._prefetch, self._spawn, self.wiki, 
self._getChunkToDo(metacurrentdump), 
self.chunkInfo.getPagesPerChunkHistory(), checkpoints, self.checkpointFile))
+   Discussion and user pages are included in this 
complete archive. Most mirrors won't want this extra material., 
self.findItemByName('xmlstubsdump'), self._prefetch, self._spawn, self.wiki, 
self._getChunkToDo(metacurrentdump), 
self.chunkInfo.getPagesPerChunkHistory(), checkpoints, self.checkpointFile, 
self.pageIDRange))

if (self.chunkInfo.chunksEnabled()):

self.dumpItems.append(RecombineXmlDump(metacurrentdumprecombine, Recombine 
all pages, current versions only.,Discussion and user pages are included in 
this complete archive. Most mirrors won't want this extra material., 
self.findItemByName('metacurrentdump')))
@@ -597,7 +599,7 @@
   metahistorybz2dump,
   All pages with complete page edit history 
(.bz2),
   These dumps can be *very* large, 
uncompressing up to 20 times the archive download size.  +
-  Suitable for archival and statistical use, 
most mirror sites won't want or need this., 
self.findItemByName('xmlstubsdump'), self._prefetch, self._spawn, self.wiki, 
self._getChunkToDo(metahistorybz2dump), 
self.chunkInfo.getPagesPerChunkHistory(), checkpoints, self.checkpointFile))
+  Suitable for archival and statistical use, 
most mirror sites won't want or need this., 
self.findItemByName('xmlstubsdump'), self._prefetch, self._spawn, self.wiki, 
self._getChunkToDo(metahistorybz2dump), 

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

2011-09-16 Thread nikerabbit
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97296

Revision: 97296
Author:   nikerabbit
Date: 2011-09-16 16:11:54 + (Fri, 16 Sep 2011)
Log Message:
---
* (bug 27398) Add $wgExtraGenderNamespaces for configured gendered namespaces

Modified Paths:
--
trunk/phase3/RELEASE-NOTES-1.18
trunk/phase3/includes/DefaultSettings.php
trunk/phase3/languages/Language.php

Modified: trunk/phase3/RELEASE-NOTES-1.18
===
--- trunk/phase3/RELEASE-NOTES-1.18 2011-09-16 15:44:53 UTC (rev 97295)
+++ trunk/phase3/RELEASE-NOTES-1.18 2011-09-16 16:11:54 UTC (rev 97296)
@@ -626,6 +626,7 @@
   (Devanagari) (ks-deva). Defaults to ks-arab.
 * (bug 30864) Use bengali numerals for ol for Assamese
 * (bug 30817) Restored linktrail for kk (Kazakh)
+* (bug 27398) Add $wgExtraGenderNamespaces for configured gendered namespaces
 
 === Other changes in 1.18 ===
 * Removed legacy wgAjaxWatch javascript global object, no longer in use.

Modified: trunk/phase3/includes/DefaultSettings.php
===
--- trunk/phase3/includes/DefaultSettings.php   2011-09-16 15:44:53 UTC (rev 
97295)
+++ trunk/phase3/includes/DefaultSettings.php   2011-09-16 16:11:54 UTC (rev 
97296)
@@ -2631,6 +2631,11 @@
 $wgExtraNamespaces = array();
 
 /**
+ * Same as above, but for namespaces with gender distinction.
+ */
+$wgExtraGenderNamespaces = array();
+
+/**
  * Namespace aliases
  * These are alternate names for the primary localised namespace names, which
  * are defined by $wgExtraNamespaces and the language file. If a page is

Modified: trunk/phase3/languages/Language.php
===
--- trunk/phase3/languages/Language.php 2011-09-16 15:44:53 UTC (rev 97295)
+++ trunk/phase3/languages/Language.php 2011-09-16 16:11:54 UTC (rev 97296)
@@ -409,7 +409,9 @@
 * @since 1.18
 */
function getGenderNsText( $index, $gender ) {
-   $ns = self::$dataCache-getItem( $this-mCode, 
'namespaceGenderAliases' );
+   global $wgExtraGenderNamespaces;
+   
+   $ns = $wgExtraGenderNamespaces + self::$dataCache-getItem( 
$this-mCode, 'namespaceGenderAliases' );
return isset( $ns[$index][$gender] ) ? $ns[$index][$gender] : 
$this-getNsText( $index );
}
 
@@ -420,7 +422,8 @@
 * @since 1.18
 */
function needsGenderDistinction() {
-   $aliases = self::$dataCache-getItem( $this-mCode, 
'namespaceGenderAliases' );
+   global $wgExtraGenderNamespaces;
+   $aliases = $wgExtraGenderNamespaces + 
self::$dataCache-getItem( $this-mCode, 'namespaceGenderAliases' );
return count( $aliases )  0;
}
 
@@ -456,7 +459,8 @@
}
}
 
-   $genders = self::$dataCache-getItem( $this-mCode, 
'namespaceGenderAliases' );
+   global $wgExtraGenderNamespaces;
+   $genders = $wgExtraGenderNamespaces + 
self::$dataCache-getItem( $this-mCode, 'namespaceGenderAliases' );
foreach ( $genders as $index = $forms ) {
foreach ( $forms as $alias ) {
$aliases[$alias] = $index;


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


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

2011-09-16 Thread reedy
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97297

Revision: 97297
Author:   reedy
Date: 2011-09-16 16:55:39 + (Fri, 16 Sep 2011)
Log Message:
---
Revert r91561

Modified Paths:
--
trunk/phase3/RELEASE-NOTES-1.18
trunk/phase3/includes/Skin.php
trunk/phase3/includes/SkinTemplate.php
trunk/phase3/includes/Title.php
trunk/phase3/includes/specials/SpecialUndelete.php
trunk/phase3/includes/specials/SpecialUpload.php
trunk/phase3/languages/Language.php

Modified: trunk/phase3/RELEASE-NOTES-1.18
===
--- trunk/phase3/RELEASE-NOTES-1.18 2011-09-16 16:11:54 UTC (rev 97296)
+++ trunk/phase3/RELEASE-NOTES-1.18 2011-09-16 16:55:39 UTC (rev 97297)
@@ -338,8 +338,6 @@
   environments
 * (bug 14977) Fixed $wgServer detection in cases where an IPv6 address is used
   as the server name.
-* (bug 19725) Do not list suppressed edits in the View X deleted edits link
-  if user cannot view suppressed edits.
 * The View X deleted revisions is now shown again on Special:Upload.
 * (bug 29071) mediawiki.action.watch.ajax.js should pass uselang to API.
 * (bug 28868) Show total pages in the subtitle of an image on the

Modified: trunk/phase3/includes/Skin.php
===
--- trunk/phase3/includes/Skin.php  2011-09-16 16:11:54 UTC (rev 97296)
+++ trunk/phase3/includes/Skin.php  2011-09-16 16:55:39 UTC (rev 97297)
@@ -638,9 +638,8 @@
 
if ( $this-getUser()-isAllowed( 'deletedhistory' )  
!$this-getUser()-isBlocked() 
( $this-getTitle()-getArticleId() == 0 || $action == 
'history' ) ) {
+   $n = $this-getTitle()-isDeleted();
 
-   $includeSuppressed = $this-getUser()-isAllowed( 
'suppressrevision' );
-   $n = $this-getTitle()-isDeleted( $includeSuppressed );
 
if ( $n ) {
if ( $this-getUser()-isAllowed( 'undelete' ) 
) {

Modified: trunk/phase3/includes/SkinTemplate.php
===
--- trunk/phase3/includes/SkinTemplate.php  2011-09-16 16:11:54 UTC (rev 
97296)
+++ trunk/phase3/includes/SkinTemplate.php  2011-09-16 16:55:39 UTC (rev 
97297)
@@ -951,9 +951,8 @@
}
} else {
// article doesn't exist or is deleted
-   if ( $user-isAllowed( 'deletedhistory' )  
!$user-isBlocked() ) {
-   $includeSuppressed = $user-isAllowed( 
'suppressrevision' );
-   $n = $title-isDeleted( 
$includeSuppressed );
+   if ( $user-isAllowed( 'deletedhistory' ) ) {
+   $n = $title-isDeleted();
if( $n ) {
$undelTitle = 
SpecialPage::getTitleFor( 'Undelete' );
// If the user can't undelete 
but can view deleted history show them a View .. deleted tab instead

Modified: trunk/phase3/includes/Title.php
===
--- trunk/phase3/includes/Title.php 2011-09-16 16:11:54 UTC (rev 97296)
+++ trunk/phase3/includes/Title.php 2011-09-16 16:55:39 UTC (rev 97297)
@@ -2391,37 +2391,21 @@
/**
 * Is there a version of this page in the deletion archive?
 *
-* @param $includeSuppressed Boolean Include suppressed revisions?
 * @return Int the number of archived revisions
 */
-   public function isDeleted( $includeSuppressed = false ) {
+   public function isDeleted() {
if ( $this-getNamespace()  0 ) {
$n = 0;
} else {
$dbr = wfGetDB( DB_SLAVE );
-   $conditions = array( 'ar_namespace' = 
$this-getNamespace(), 'ar_title' = $this-getDBkey() );
 
-   if( !$includeSuppressed ) {
-   $suppressedTextBits = Revision::DELETED_TEXT | 
Revision::DELETED_RESTRICTED;
-   $conditions[] = $dbr-bitAnd('ar_deleted', 
$suppressedTextBits ) .
-   ' != ' . $suppressedTextBits;
-   }
-
$n = $dbr-selectField( 'archive', 'COUNT(*)',
-   $conditions,
+   array( 'ar_namespace' = $this-getNamespace(), 
'ar_title' = $this-getDBkey() ),
__METHOD__
);
if ( $this-getNamespace() == NS_FILE ) {
-   $fconditions = array( 'fa_name' = 
$this-getDBkey() );
-   if( 

[MediaWiki-CVS] SVN: [97298] trunk/phase3/includes/DefaultSettings.php

2011-09-16 Thread nikerabbit
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97298

Revision: 97298
Author:   nikerabbit
Date: 2011-09-16 16:59:10 + (Fri, 16 Sep 2011)
Log Message:
---
Amend documentation for r97296

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

Modified: trunk/phase3/includes/DefaultSettings.php
===
--- trunk/phase3/includes/DefaultSettings.php   2011-09-16 16:55:39 UTC (rev 
97297)
+++ trunk/phase3/includes/DefaultSettings.php   2011-09-16 16:59:10 UTC (rev 
97298)
@@ -2632,6 +2632,9 @@
 
 /**
  * Same as above, but for namespaces with gender distinction.
+ * Note: the default form for the namespace should also be set
+ * using $wgExtraNamespaces for the same index.
+ * @since 1.18
  */
 $wgExtraGenderNamespaces = array();
 


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


[MediaWiki-CVS] SVN: [97299] branches/REL1_18/phase3

2011-09-16 Thread reedy
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97299

Revision: 97299
Author:   reedy
Date: 2011-09-16 17:00:26 + (Fri, 16 Sep 2011)
Log Message:
---
Revert r91561 out of REL1_18 (essentially merging r97297, but it wasn't, as it 
was cleaner to revert in the local tree)

Modified Paths:
--
branches/REL1_18/phase3/RELEASE-NOTES-1.18
branches/REL1_18/phase3/includes/Skin.php
branches/REL1_18/phase3/includes/SkinTemplate.php
branches/REL1_18/phase3/includes/Title.php
branches/REL1_18/phase3/includes/specials/SpecialUndelete.php
branches/REL1_18/phase3/includes/specials/SpecialUpload.php

Modified: branches/REL1_18/phase3/RELEASE-NOTES-1.18
===
--- branches/REL1_18/phase3/RELEASE-NOTES-1.18  2011-09-16 16:59:10 UTC (rev 
97298)
+++ branches/REL1_18/phase3/RELEASE-NOTES-1.18  2011-09-16 17:00:26 UTC (rev 
97299)
@@ -330,8 +330,6 @@
   environments
 * (bug 14977) Fixed $wgServer detection in cases where an IPv6 address is used
   as the server name.
-* (bug 19725) Do not list suppressed edits in the View X deleted edits link
-  if user cannot view suppressed edits.
 * The View X deleted revisions is now shown again on Special:Upload.
 * (bug 29071) mediawiki.action.watch.ajax.js should pass uselang to API.
 * (bug 28868) Show total pages in the subtitle of an image on the

Modified: branches/REL1_18/phase3/includes/Skin.php
===
--- branches/REL1_18/phase3/includes/Skin.php   2011-09-16 16:59:10 UTC (rev 
97298)
+++ branches/REL1_18/phase3/includes/Skin.php   2011-09-16 17:00:26 UTC (rev 
97299)
@@ -727,9 +727,8 @@
 
if ( $this-getUser()-isAllowed( 'deletedhistory' ) 
( $this-getTitle()-getArticleId() == 0 || $action == 
'history' ) ) {
+   $n = $this-getTitle()-isDeleted();
 
-   $includeSuppressed = $this-getUser()-isAllowed( 
'suppressrevision' );
-   $n = $this-getTitle()-isDeleted( $includeSuppressed );
 
if ( $n ) {
if ( $this-getUser()-isAllowed( 'undelete' ) 
) {

Modified: branches/REL1_18/phase3/includes/SkinTemplate.php
===
--- branches/REL1_18/phase3/includes/SkinTemplate.php   2011-09-16 16:59:10 UTC 
(rev 97298)
+++ branches/REL1_18/phase3/includes/SkinTemplate.php   2011-09-16 17:00:26 UTC 
(rev 97299)
@@ -976,8 +976,7 @@
} else {
// article doesn't exist or is deleted
if ( $wgUser-isAllowed( 'deletedhistory' ) ) {
-   $includeSuppressed = 
$wgUser-isAllowed( 'suppressrevision' );
-   $n = $title-isDeleted( 
$includeSuppressed );
+   $n = $title-isDeleted();
if( $n ) {
$undelTitle = 
SpecialPage::getTitleFor( 'Undelete' );
// If the user can't undelete 
but can view deleted history show them a View .. deleted tab instead

Modified: branches/REL1_18/phase3/includes/Title.php
===
--- branches/REL1_18/phase3/includes/Title.php  2011-09-16 16:59:10 UTC (rev 
97298)
+++ branches/REL1_18/phase3/includes/Title.php  2011-09-16 17:00:26 UTC (rev 
97299)
@@ -2373,37 +2373,21 @@
/**
 * Is there a version of this page in the deletion archive?
 *
-* @param $includeSuppressed Boolean Include suppressed revisions?
 * @return Int the number of archived revisions
 */
-   public function isDeleted( $includeSuppressed = false ) {
+   public function isDeleted() {
if ( $this-getNamespace()  0 ) {
$n = 0;
} else {
$dbr = wfGetDB( DB_SLAVE );
-   $conditions = array( 'ar_namespace' = 
$this-getNamespace(), 'ar_title' = $this-getDBkey() );
 
-   if( !$includeSuppressed ) {
-   $suppressedTextBits = Revision::DELETED_TEXT | 
Revision::DELETED_RESTRICTED;
-   $conditions[] = $dbr-bitAnd('ar_deleted', 
$suppressedTextBits ) .
-   ' != ' . $suppressedTextBits;
-   }
-
$n = $dbr-selectField( 'archive', 'COUNT(*)',
-   $conditions,
+   array( 'ar_namespace' = $this-getNamespace(), 
'ar_title' = $this-getDBkey() ),
__METHOD__
);
if ( $this-getNamespace() == NS_FILE ) {
-   

[MediaWiki-CVS] SVN: [97300] trunk/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi. class.php

2011-09-16 Thread brion
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97300

Revision: 97300
Author:   brion
Date: 2011-09-16 17:52:28 + (Fri, 16 Sep 2011)
Log Message:
---
* (bug 30930) Fix bad tab-to-space conversion in SyntaxHighlight_GeSHi when 
$wgUseTidy on

Tidy always converts tabs to spaces on input; on a big pre section this is ok 
but it tends to fail on syntax-highlighted output, where the spacing should 
depend on the *output* not the *input markup*.
As a workaround, when $wgUseTidy is enabled we now apply our own tab-to-space 
conversion preemptively on the input before feeding it into GeSHi for 
highlighting; this keeps the right spacing through to output.

Modified Paths:
--
trunk/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.class.php

Modified: trunk/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.class.php
===
--- trunk/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.class.php  
2011-09-16 17:00:26 UTC (rev 97299)
+++ trunk/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.class.php  
2011-09-16 17:52:28 UTC (rev 97300)
@@ -21,12 +21,19 @@
 * @return string
 */
public static function parserHook( $text, $args = array(), $parser ) {
-   global $wgSyntaxHighlightDefaultLang;
+   global $wgSyntaxHighlightDefaultLang, $wgUseTidy;
wfProfileIn( __METHOD__ );
self::initialise();
$text = rtrim( $text );
// Don't trim leading spaces away, just the linefeeds
$text = preg_replace( '/^\n+/', '', $text );
+
+   if( $wgUseTidy ) {
+   // HTML Tidy will convert tabs to spaces incorrectly 
(bug 30930).
+   // Preemptively replace the spaces in a more controlled 
fashion.
+   $text = self::tabsToSpaces( $text );
+   }
+
// Validate language
if( isset( $args['lang'] )  $args['lang'] ) {
$lang = $args['lang'];
@@ -377,5 +384,34 @@
public static function hOldSpecialVersion_GeSHi( $sp, $extensionTypes 
) {
return self::hSpecialVersion_GeSHi( $extensionTypes );
}
-   
+
+   /**
+* Convert tabs to spaces
+*
+* @param string $text
+* @return string
+*/
+   private static function tabsToSpaces( $text ) {
+   $lines = explode( \n, $text );
+   $lines = array_map( array( __CLASS__, 'tabsToSpacesLine' ), 
$lines );
+   return implode( \n, $lines );
+   }
+
+   /**
+* Convert tabs to spaces for a single line
+*
+* @param string $text
+* @return string
+*/
+   private static function tabsToSpacesLine( $line ) {
+   $parts = explode( \t, $line );
+   $width = 8; // To match tidy's config  typical browser defaults
+   $out = $parts[0];
+   foreach( array_slice( $parts, 1 ) as $chunk ) {
+   $spaces = $width - (strlen( $out ) % $width);
+   $out .= str_repeat( ' ', $spaces );
+   $out .= $chunk;
+   }
+   return $out;
+   }
 }


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


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

2011-09-16 Thread reedy
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97301

Revision: 97301
Author:   reedy
Date: 2011-09-16 17:58:50 + (Fri, 16 Sep 2011)
Log Message:
---
Moar documentations

Modified Paths:
--
trunk/phase3/includes/GlobalFunctions.php
trunk/phase3/includes/db/Database.php
trunk/phase3/includes/db/DatabaseError.php
trunk/phase3/includes/db/DatabaseMysql.php
trunk/phase3/includes/db/DatabaseUtility.php
trunk/phase3/includes/db/LBFactory_Multi.php
trunk/phase3/includes/db/LBFactory_Single.php
trunk/phase3/includes/db/LoadBalancer.php

Modified: trunk/phase3/includes/GlobalFunctions.php
===
--- trunk/phase3/includes/GlobalFunctions.php   2011-09-16 17:52:28 UTC (rev 
97300)
+++ trunk/phase3/includes/GlobalFunctions.php   2011-09-16 17:58:50 UTC (rev 
97301)
@@ -3153,6 +3153,8 @@
  *
  * @param $wiki String
  * @param $bits String
+ *
+ * @return array
  */
 function wfSplitWikiID( $wiki ) {
$bits = explode( '-', $wiki, 2 );

Modified: trunk/phase3/includes/db/Database.php
===
--- trunk/phase3/includes/db/Database.php   2011-09-16 17:52:28 UTC (rev 
97300)
+++ trunk/phase3/includes/db/Database.php   2011-09-16 17:58:50 UTC (rev 
97301)
@@ -224,6 +224,8 @@
protected $mDefaultBigSelects = null;
protected $mSchemaVars = false;
 
+   protected $preparedArgs;
+
 # 
--
 # Accessors
 # 
--
@@ -290,7 +292,7 @@
 * code should use lastErrno() and lastError() to handle the
 * situation as appropriate.
 *
-* @param $ignoreErrors
+* @param $ignoreErrors bool|null
 *
 * @return The previous value of the flag.
 */
@@ -433,6 +435,8 @@
/**
 * Returns true if this database does an implicit order by when the 
column has an index
 * For example: SELECT page_title FROM page LIMIT 1
+*
+* @return bool
 */
function implicitOrderby() {
return true;
@@ -530,6 +534,10 @@
 
/**
 * General read-only accessor
+*
+* @param $name string
+*
+* @return string
 */
function getProperty( $name ) {
return $this-$name;
@@ -707,7 +715,7 @@
 * The DBMS-dependent part of query()
 *
 * @param  $sql String: SQL query.
-* @return Result object to feed to fetchObject, fetchRow, ...; or 
false on failure
+* @return ResultWrapper Result object to feed to fetchObject, 
fetchRow, ...; or false on failure
 */
protected abstract function doQuery( $sql );
 
@@ -1182,7 +1190,6 @@
 * @param $options Array Query options
 * @param $join_conds Array Join conditions
 *
-*
 * @param $table string|array
 *
 * May be either an array of table names, or a single string holding a 
table
@@ -1429,8 +1436,8 @@
 * Takes the same arguments as DatabaseBase::select().
 *
 * @param $table String: table name
-* @param $vars Array: unused
-* @param $conds Array: filters on the table
+* @param Array|string $vars : unused
+* @param Array|string $conds : filters on the table
 * @param $fname String: function name for profiling
 * @param $options Array: options for select
 * @return Integer: row count

Modified: trunk/phase3/includes/db/DatabaseError.php
===
--- trunk/phase3/includes/db/DatabaseError.php  2011-09-16 17:52:28 UTC (rev 
97300)
+++ trunk/phase3/includes/db/DatabaseError.php  2011-09-16 17:58:50 UTC (rev 
97301)
@@ -87,6 +87,11 @@
return false;
}
 
+   /**
+* @param $key
+* @param $fallback
+* @return string
+*/
function msg( $key, $fallback /*[, params...] */ ) {
global $wgLang;
 

Modified: trunk/phase3/includes/db/DatabaseMysql.php
===
--- trunk/phase3/includes/db/DatabaseMysql.php  2011-09-16 17:52:28 UTC (rev 
97300)
+++ trunk/phase3/includes/db/DatabaseMysql.php  2011-09-16 17:58:50 UTC (rev 
97301)
@@ -14,6 +14,10 @@
  * @see Database
  */
 class DatabaseMysql extends DatabaseBase {
+
+   /**
+* @return string
+*/
function getType() {
return 'mysql';
}
@@ -138,6 +142,9 @@
return $success;
}
 
+   /**
+* @return bool
+*/
function close() {
$this-mOpened = false;
if ( $this-mConn ) {
@@ -188,6 +195,11 @@
return $row;
}
 
+   

[MediaWiki-CVS] SVN: [97302] trunk/parsers/wikidom/lib/synth

2011-09-16 Thread tparscal
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97302

Revision: 97302
Author:   tparscal
Date: 2011-09-16 18:04:03 + (Fri, 16 Sep 2011)
Log Message:
---
Removed dynamic property names from base container and container item classes

Modified Paths:
--
trunk/parsers/wikidom/lib/synth/bases/es.ModelContainer.js
trunk/parsers/wikidom/lib/synth/bases/es.ModelContainerItem.js
trunk/parsers/wikidom/lib/synth/bases/es.ViewContainer.js
trunk/parsers/wikidom/lib/synth/models/es.DocumentModel.js
trunk/parsers/wikidom/lib/synth/models/es.ListBlockItemModel.js
trunk/parsers/wikidom/lib/synth/models/es.TableBlockCellModel.js
trunk/parsers/wikidom/lib/synth/models/es.TableBlockRowModel.js
trunk/parsers/wikidom/lib/synth/views/es.DocumentView.js
trunk/parsers/wikidom/lib/synth/views/es.ListBlockView.js
trunk/parsers/wikidom/lib/synth/views/es.TableBlockRowView.js
trunk/parsers/wikidom/lib/synth/views/es.TableBlockView.js

Modified: trunk/parsers/wikidom/lib/synth/bases/es.ModelContainer.js
===
--- trunk/parsers/wikidom/lib/synth/bases/es.ModelContainer.js  2011-09-16 
17:58:50 UTC (rev 97301)
+++ trunk/parsers/wikidom/lib/synth/bases/es.ModelContainer.js  2011-09-16 
18:04:03 UTC (rev 97302)
@@ -6,16 +6,11 @@
  * @class
  * @constructor
  * @extends {es.EventEmitter}
- * @param listName {String} Property name for list of items
- * @property [listName] {Array} list of items
+ * @property items {Array} list of items
  */
-es.ModelContainer = function( listName ) {
+es.ModelContainer = function() {
es.EventEmitter.call( this );
-   if ( typeof listName !== 'string' ) {
-   listName = 'items';
-   }
-   this._listName = listName;
-   this[this._listName] = new es.AggregateArray();
+   this.items = new es.AggregateArray();
var container = this;
this.relayUpdate = function() {
container.emit( 'update' );
@@ -31,7 +26,7 @@
  * @returns {Object} Child object at index
  */
 es.ModelContainer.prototype.get = function( index ) {
-   return this[this._listName][index] || null;
+   return this.items[index] || null;
 };
 
 /**
@@ -41,7 +36,7 @@
  * @returns {Array} List of all items.
  */
 es.ModelContainer.prototype.all = function() {
-   return this[this._listName];
+   return this.items;
 };
 
 /**
@@ -51,7 +46,7 @@
  * @returns {Integer} Number of items in container
  */
 es.ModelContainer.prototype.getLength = function() {
-   return this[this._listName].length
+   return this.items.length
 };
 
 /**
@@ -61,7 +56,7 @@
  * @returns {Integer} Index of item, -1 if item is not in container
  */
 es.ModelContainer.prototype.indexOf = function( item ) {
-   return this[this._listName].indexOf( item );
+   return this.items.indexOf( item );
 };
 
 /**
@@ -71,7 +66,7 @@
  * @returns {Object} First item
  */
 es.ModelContainer.prototype.first = function() {
-   return this[this._listName].length ? this[this._listName][0] : null;
+   return this.items.length ? this.items[0] : null;
 };
 
 /**
@@ -81,8 +76,8 @@
  * @returns {Object} Last item
  */
 es.ModelContainer.prototype.last = function() {
-   return this[this._listName].length
-   ? this[this._listName][this[this._listName].length - 1] : null;
+   return this.items.length
+   ? this.items[this.items.length - 1] : null;
 };
 
 /**
@@ -94,8 +89,8 @@
  * @param callback {Function} Function to call on each item which takes item 
and index arguments
  */
 es.ModelContainer.prototype.each = function( callback ) {
-   for ( var i = 0; i  this[this._listName].length; i++ ) {
-   if ( callback( this[this._listName][i], i ) === false ) {
+   for ( var i = 0; i  this.items.length; i++ ) {
+   if ( callback( this.items[i], i ) === false ) {
break;
}
}
@@ -113,11 +108,11 @@
 es.ModelContainer.prototype.append = function( item ) {
var parent = item.parent();
if ( parent === this ) {
-   this[this._listName].splice( this.indexOf( item ), 1 );
+   this.items.splice( this.indexOf( item ), 1 );
} else if ( parent ) {
parent.remove( item );
}
-   this[this._listName].push( item );
+   this.items.push( item );
item.on( 'update', this.relayUpdate );
item.attach( this );
this.emit( 'append', item );
@@ -136,11 +131,11 @@
 es.ModelContainer.prototype.prepend = function( item ) {
var parent = item.parent();
if ( parent === this ) {
-   this[this._listName].splice( this.indexOf( item ), 1 );
+   this.items.splice( this.indexOf( item ), 1 );
} else if ( parent ) {
parent.remove( item );
}
-   this[this._listName].unshift( item );
+   this.items.unshift( item );

[MediaWiki-CVS] SVN: [97303] trunk/phase3/includes/api

2011-09-16 Thread reedy
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97303

Revision: 97303
Author:   reedy
Date: 2011-09-16 18:11:47 + (Fri, 16 Sep 2011)
Log Message:
---
Give a list of modules to query and action into paraminfo

Modified Paths:
--
trunk/phase3/includes/api/ApiParamInfo.php
trunk/phase3/includes/api/ApiQuery.php

Modified: trunk/phase3/includes/api/ApiParamInfo.php
===
--- trunk/phase3/includes/api/ApiParamInfo.php  2011-09-16 18:04:03 UTC (rev 
97302)
+++ trunk/phase3/includes/api/ApiParamInfo.php  2011-09-16 18:11:47 UTC (rev 
97303)
@@ -34,15 +34,21 @@
  */
 class ApiParamInfo extends ApiBase {
 
+   /**
+* @var ApiQuery
+*/
+   protected $queryObj;
+
public function __construct( $main, $action ) {
parent::__construct( $main, $action );
+   $this-queryObj = new ApiQuery( $this-getMain(), 'query' );
}
 
public function execute() {
// Get parameters
$params = $this-extractRequestParams();
$result = $this-getResult();
-   $queryObj = new ApiQuery( $this-getMain(), 'query' );
+
$r = array();
if ( is_array( $params['modules'] ) ) {
$modArr = $this-getMain()-getModules();
@@ -60,7 +66,7 @@
$result-setIndexedTagName( $r['modules'], 'module' );
}
if ( is_array( $params['querymodules'] ) ) {
-   $qmodArr = $queryObj-getModules();
+   $qmodArr = $this-queryObj-getModules();
$r['querymodules'] = array();
foreach ( $params['querymodules'] as $qm ) {
if ( !isset( $qmodArr[$qm] ) ) {
@@ -70,7 +76,7 @@
$obj = new $qmodArr[$qm]( $this, $qm );
$a = $this-getClassInfo( $obj );
$a['name'] = $qm;
-   $a['querytype'] = $queryObj-getModuleType( $qm 
);
+   $a['querytype'] = 
$this-queryObj-getModuleType( $qm );
$r['querymodules'][] = $a;
}
$result-setIndexedTagName( $r['querymodules'], 
'module' );
@@ -79,7 +85,7 @@
$r['mainmodule'] = $this-getClassInfo( 
$this-getMain() );
}
if ( $params['pagesetmodule'] ) {
-   $pageSet = new ApiPageSet( $queryObj );
+   $pageSet = new ApiPageSet( $this-queryObj );
$r['pagesetmodule'] = $this-getClassInfo( $pageSet );
}
$result-addValue( null, $this-getModuleName(), $r );
@@ -219,12 +225,15 @@
}
 
public function getAllowedParams() {
+
return array(
'modules' = array(
-   ApiBase::PARAM_ISMULTI = true
+   ApiBase::PARAM_ISMULTI = true,
+   ApiBase::PARAM_TYPE = array_keys( 
$this-getMain()-getModules() ),
),
'querymodules' = array(
-   ApiBase::PARAM_ISMULTI = true
+   ApiBase::PARAM_ISMULTI = true,
+   ApiBase::PARAM_TYPE = array_keys( 
$this-queryObj-getModules() ),
),
'mainmodule' = false,
'pagesetmodule' = false,

Modified: trunk/phase3/includes/api/ApiQuery.php
===
--- trunk/phase3/includes/api/ApiQuery.php  2011-09-16 18:04:03 UTC (rev 
97302)
+++ trunk/phase3/includes/api/ApiQuery.php  2011-09-16 18:11:47 UTC (rev 
97303)
@@ -179,7 +179,7 @@
 
/**
 * Get the array mapping module names to class names
-* @return array(modulename = classname)
+* @return array (modulename = classname)
 */
function getModules() {
return array_merge( $this-mQueryPropModules, 
$this-mQueryListModules, $this-mQueryMetaModules );


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


[MediaWiki-CVS] SVN: [97304] trunk/extensions/CentralNotice/special/SpecialBannerController .php

2011-09-16 Thread kaldari
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97304

Revision: 97304
Author:   kaldari
Date: 2011-09-16 18:12:06 + (Fri, 16 Sep 2011)
Log Message:
---
adding missing linebreak

Modified Paths:
--
trunk/extensions/CentralNotice/special/SpecialBannerController.php

Modified: trunk/extensions/CentralNotice/special/SpecialBannerController.php
===
--- trunk/extensions/CentralNotice/special/SpecialBannerController.php  
2011-09-16 18:11:47 UTC (rev 97303)
+++ trunk/extensions/CentralNotice/special/SpecialBannerController.php  
2011-09-16 18:12:06 UTC (rev 97304)
@@ -164,7 +164,7 @@
if ( bannerJson.fundraising ) {
 JAVASCRIPT;
$script .= \n\t\tvar url = ' . 
-   Xml::escapeJsString( $wgNoticeFundraisingUrl ) . ';;
+   Xml::escapeJsString( $wgNoticeFundraisingUrl ) . ';\n;
$script .= JAVASCRIPT
if ( ( bannerJson.landingPages !== null )  
bannerJson.landingPages.length ) {
targets = String( bannerJson.landingPages ).split(',');


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


[MediaWiki-CVS] SVN: [97305] trunk/extensions/MobileFrontend/views/layout/application.html. php

2011-09-16 Thread preilly
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97305

Revision: 97305
Author:   preilly
Date: 2011-09-16 18:18:36 + (Fri, 16 Sep 2011)
Log Message:
---
add a version to js to bust cache

Modified Paths:
--
trunk/extensions/MobileFrontend/views/layout/application.html.php

Modified: trunk/extensions/MobileFrontend/views/layout/application.html.php
===
--- trunk/extensions/MobileFrontend/views/layout/application.html.php   
2011-09-16 18:12:06 UTC (rev 97304)
+++ trunk/extensions/MobileFrontend/views/layout/application.html.php   
2011-09-16 18:18:36 UTC (rev 97305)
@@ -34,7 +34,7 @@
 }
   //]]
 /script
-script type=text/javascript language=javascript 
src={$wgExtensionAssetsPath}/MobileFrontend/javascripts/application.js/script
+script type=text/javascript language=javascript 
src={$wgExtensionAssetsPath}/MobileFrontend/javascripts/application.js?version=20110912T172820Z/script
   /head
   body
{$searchWebkitHtml}


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


[MediaWiki-CVS] SVN: [97306] branches/wmf/1.17wmf1/extensions/MobileFrontend/views/layout/ application.html.php

2011-09-16 Thread preilly
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97306

Revision: 97306
Author:   preilly
Date: 2011-09-16 18:19:27 + (Fri, 16 Sep 2011)
Log Message:
---
mft r97305

Modified Paths:
--

branches/wmf/1.17wmf1/extensions/MobileFrontend/views/layout/application.html.php

Modified: 
branches/wmf/1.17wmf1/extensions/MobileFrontend/views/layout/application.html.php
===
--- 
branches/wmf/1.17wmf1/extensions/MobileFrontend/views/layout/application.html.php
   2011-09-16 18:18:36 UTC (rev 97305)
+++ 
branches/wmf/1.17wmf1/extensions/MobileFrontend/views/layout/application.html.php
   2011-09-16 18:19:27 UTC (rev 97306)
@@ -34,7 +34,7 @@
 }
   //]]
 /script
-script type=text/javascript language=javascript 
src={$wgExtensionAssetsPath}/MobileFrontend/javascripts/application.js/script
+script type=text/javascript language=javascript 
src={$wgExtensionAssetsPath}/MobileFrontend/javascripts/application.js?version=20110912T172820Z/script
   /head
   body
{$searchWebkitHtml}


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


[MediaWiki-CVS] SVN: [97307] trunk/phase3/includes/api/ApiParamInfo.php

2011-09-16 Thread reedy
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97307

Revision: 97307
Author:   reedy
Date: 2011-09-16 18:25:02 + (Fri, 16 Sep 2011)
Log Message:
---
Add handling of format modules to ApiParamInfo

Modified Paths:
--
trunk/phase3/includes/api/ApiParamInfo.php

Modified: trunk/phase3/includes/api/ApiParamInfo.php
===
--- trunk/phase3/includes/api/ApiParamInfo.php  2011-09-16 18:19:27 UTC (rev 
97306)
+++ trunk/phase3/includes/api/ApiParamInfo.php  2011-09-16 18:25:02 UTC (rev 
97307)
@@ -88,6 +88,21 @@
$pageSet = new ApiPageSet( $this-queryObj );
$r['pagesetmodule'] = $this-getClassInfo( $pageSet );
}
+   if ( is_array( $params['formatmodules'] ) ) {
+   $formats = $this-getMain()-getFormats();
+   $r['formatmodules'] = array();
+   foreach ( $params['formatmodules'] as $f ) {
+   if ( !isset( $formats[$f] ) ) {
+   $r['formatmodules'][] = array( 'name' 
= $f, 'missing' = '' );
+   continue;
+   }
+   $obj = new $formats[$f]( $this, $f );
+   $a = $this-getClassInfo( $obj );
+   $a['name'] = $f;
+   $r['formatmodules'][] = $a;
+   }
+   $result-setIndexedTagName( $r['formatmodules'], 
'module' );
+   }
$result-addValue( null, $this-getModuleName(), $r );
}
 
@@ -237,6 +252,10 @@
),
'mainmodule' = false,
'pagesetmodule' = false,
+   'formatmodules' = array(
+   ApiBase::PARAM_ISMULTI = true,
+   ApiBase::PARAM_TYPE = array_keys( 
$this-getMain()-getFormats() ),
+   )
);
}
 
@@ -246,6 +265,7 @@
'querymodules' = 'List of query module names (value of 
prop=, meta= or list= parameter)',
'mainmodule' = 'Get information about the main 
(top-level) module as well',
'pagesetmodule' = 'Get information about the pageset 
module (providing titles= and friends) as well',
+   'formatmodules' = 'List of format module names (value 
of format= parameter)',
);
}
 


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


[MediaWiki-CVS] SVN: [97308] trunk/phase3/includes/api

2011-09-16 Thread reedy
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97308

Revision: 97308
Author:   reedy
Date: 2011-09-16 18:28:24 + (Fri, 16 Sep 2011)
Log Message:
---
Refactor variables to give somewhat useful names

Modified Paths:
--
trunk/phase3/includes/api/ApiParamInfo.php
trunk/phase3/includes/api/ApiQuery.php

Modified: trunk/phase3/includes/api/ApiParamInfo.php
===
--- trunk/phase3/includes/api/ApiParamInfo.php  2011-09-16 18:25:02 UTC (rev 
97307)
+++ trunk/phase3/includes/api/ApiParamInfo.php  2011-09-16 18:28:24 UTC (rev 
97308)
@@ -49,61 +49,66 @@
$params = $this-extractRequestParams();
$result = $this-getResult();
 
-   $r = array();
+   $res = array();
if ( is_array( $params['modules'] ) ) {
-   $modArr = $this-getMain()-getModules();
-   $r['modules'] = array();
-   foreach ( $params['modules'] as $m ) {
-   if ( !isset( $modArr[$m] ) ) {
-   $r['modules'][] = array( 'name' = $m, 
'missing' = '' );
+   $modules = $this-getMain()-getModules();
+   $res['modules'] = array();
+   foreach ( $params['modules'] as $mod ) {
+   if ( !isset( $modules[$mod] ) ) {
+   $res['modules'][] = array( 'name' = 
$mod, 'missing' = '' );
continue;
}
-   $obj = new $modArr[$m]( $this-getMain(), $m );
-   $a = $this-getClassInfo( $obj );
-   $a['name'] = $m;
-   $r['modules'][] = $a;
+   $obj = new $modules[$mod]( $this-getMain(), 
$mod );
+
+   $item = $this-getClassInfo( $obj );
+   $item['name'] = $mod;
+   $res['modules'][] = $item;
}
-   $result-setIndexedTagName( $r['modules'], 'module' );
+   $result-setIndexedTagName( $res['modules'], 'module' );
}
+
if ( is_array( $params['querymodules'] ) ) {
-   $qmodArr = $this-queryObj-getModules();
-   $r['querymodules'] = array();
+   $queryModules = $this-queryObj-getModules();
+   $res['querymodules'] = array();
foreach ( $params['querymodules'] as $qm ) {
-   if ( !isset( $qmodArr[$qm] ) ) {
-   $r['querymodules'][] = array( 'name' = 
$qm, 'missing' = '' );
+   if ( !isset( $queryModules[$qm] ) ) {
+   $res['querymodules'][] = array( 'name' 
= $qm, 'missing' = '' );
continue;
}
-   $obj = new $qmodArr[$qm]( $this, $qm );
-   $a = $this-getClassInfo( $obj );
-   $a['name'] = $qm;
-   $a['querytype'] = 
$this-queryObj-getModuleType( $qm );
-   $r['querymodules'][] = $a;
+   $obj = new $queryModules[$qm]( $this, $qm );
+   $item = $this-getClassInfo( $obj );
+   $item['name'] = $qm;
+   $item['querytype'] = 
$this-queryObj-getModuleType( $qm );
+   $res['querymodules'][] = $item;
}
-   $result-setIndexedTagName( $r['querymodules'], 
'module' );
+   $result-setIndexedTagName( $res['querymodules'], 
'module' );
}
+
if ( $params['mainmodule'] ) {
-   $r['mainmodule'] = $this-getClassInfo( 
$this-getMain() );
+   $res['mainmodule'] = $this-getClassInfo( 
$this-getMain() );
}
+
if ( $params['pagesetmodule'] ) {
$pageSet = new ApiPageSet( $this-queryObj );
-   $r['pagesetmodule'] = $this-getClassInfo( $pageSet );
+   $res['pagesetmodule'] = $this-getClassInfo( $pageSet );
}
+
if ( is_array( $params['formatmodules'] ) ) {
$formats = $this-getMain()-getFormats();
-   $r['formatmodules'] = array();
+   $res['formatmodules'] = array();
foreach ( $params['formatmodules'] as $f ) {
if ( !isset( $formats[$f] ) ) {
-

[MediaWiki-CVS] SVN: [97309] trunk/extensions/Translate/specials

2011-09-16 Thread nikerabbit
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97309

Revision: 97309
Author:   nikerabbit
Date: 2011-09-16 18:29:54 + (Fri, 16 Sep 2011)
Log Message:
---
Fix stupid bug in total counting - ignore languages not displayed

Modified Paths:
--
trunk/extensions/Translate/specials/SpecialLanguageStats.php
trunk/extensions/Translate/specials/SpecialMessageGroupStats.php

Modified: trunk/extensions/Translate/specials/SpecialLanguageStats.php
===
--- trunk/extensions/Translate/specials/SpecialLanguageStats.php
2011-09-16 18:28:24 UTC (rev 97308)
+++ trunk/extensions/Translate/specials/SpecialLanguageStats.php
2011-09-16 18:29:54 UTC (rev 97309)
@@ -276,9 +276,6 @@
}
 
$stats = $cache[$group-getId()];
-   if ( !$group instanceof AggregateMessageGroup ) {
-   $this-totals = MessageGroupStats::multiAdd( 
$this-totals, $stats );
-   }
 
list( $total, $translated, $fuzzy ) = $stats;
if ( $total === null ) {
@@ -300,6 +297,10 @@
}
}
 
+   if ( !$group instanceof AggregateMessageGroup ) {
+   $this-totals = MessageGroupStats::multiAdd( 
$this-totals, $stats );
+   }
+
$rowParams = array();
$rowParams['data-groupid'] = $group-getId();
if ( is_string( $parent ) ) {

Modified: trunk/extensions/Translate/specials/SpecialMessageGroupStats.php
===
--- trunk/extensions/Translate/specials/SpecialMessageGroupStats.php
2011-09-16 18:28:24 UTC (rev 97308)
+++ trunk/extensions/Translate/specials/SpecialMessageGroupStats.php
2011-09-16 18:29:54 UTC (rev 97309)
@@ -146,7 +146,6 @@
 
protected function makeRow( $code, $cache ) {
$stats = $cache[$code];
-   $this-totals = MessageGroupStats::multiAdd( $this-totals, 
$stats );
 
list( $total, $translated, $fuzzy ) = $stats;
if ( $total === null ) {
@@ -168,6 +167,8 @@
}
}
 
+   $this-totals = MessageGroupStats::multiAdd( $this-totals, 
$stats );
+
$out  = \t . Html::openElement( 'tr' );
$out .= \n\t\t . $this-getMainColumnCell( $code, $extra );
$out .= $this-table-makeNumberColumns( $fuzzy, $translated, 
$total );


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


[MediaWiki-CVS] SVN: [97310] trunk/extensions/DonationInterface/payflowpro_gateway/forms/ rapidhtml/html

2011-09-16 Thread pgehres
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97310

Revision: 97310
Author:   pgehres
Date: 2011-09-16 18:33:19 + (Fri, 16 Sep 2011)
Log Message:
---
Fixes for IE, redirect IE6 people to old forms

Modified Paths:
--

trunk/extensions/DonationInterface/payflowpro_gateway/forms/rapidhtml/html/webitects_1.html

trunk/extensions/DonationInterface/payflowpro_gateway/forms/rapidhtml/html/webitects_1a.html

trunk/extensions/DonationInterface/payflowpro_gateway/forms/rapidhtml/html/webitects_2.html

Modified: 
trunk/extensions/DonationInterface/payflowpro_gateway/forms/rapidhtml/html/webitects_1.html
===
--- 
trunk/extensions/DonationInterface/payflowpro_gateway/forms/rapidhtml/html/webitects_1.html
 2011-09-16 18:29:54 UTC (rev 97309)
+++ 
trunk/extensions/DonationInterface/payflowpro_gateway/forms/rapidhtml/html/webitects_1.html
 2011-09-16 18:33:19 UTC (rev 97310)
@@ -22,9 +22,16 @@
.clear { clear: both; }
#donate { float: left; margin-left: -350px; width: 350px; }
 
-   #zip { width: 2em; }
+   .txt-sm2 { width: 2em; }
 /style
-
+   !--[if lt IE 7]style
+   /* style for IE6 + IE5.5 + IE5.0 */
+   .gainlayout { height: 0; }
+   /style![endif]--
+
+   !--[if IE 7]style
+   .gainlayout { zoom: 1; height: 1%; }
+   /style![endif]--
 div class=ltr 
   div id=appeal 
 div id=appeal-content 
@@ -109,14 +116,14 @@
   /dd 
 /dl 
 
-div id=payment 
-  dl class=form 
+div id=payment class=gainlayout 
+  dl class=form class=gainlayout 
 dtspan class=labellabel for=card_numCard 
number/label/span/dt 
 dd class=fieldinput class=txt id=card_num 
name=card_num value=@card_num//dd 
 
 dt/dt 
-dd class=field 
-  div class=l style=margin-right: 5%; 
+dd class=field class=gainlayout 
+  div class=l style=margin-right: 5%; 
class=gainlayout 
 span class=labelExpiration date/span 
 select id=mos name=mos 
   option value=Month/option 
@@ -134,7 +141,7 @@
   option value=1212 - December/option 
 /select 
  
-select id=year name=year 
+select id=year name=year  
   option value=Year/option 
   option value=20112011/option 
   option value=20122012/option 
@@ -148,9 +155,9 @@
   option value=20202020/option 
 /select 
   /div 
-  div class=l 
+  div class=l class=gainlayout 
 label class=label for=cvvSecurity code/label 
-input class=txt-sm id=cvv name=cvv  
value=@cvv/ 
+input class=txt-sm2 id=cvv name=cvv  
value=@cvv/ 
 a class=mute href=# id=whereWhere?/a 
   /div 
   
@@ -214,6 +221,13 @@
$(#accordion).accordion({
  autoHeight: false
});
+   
+   if (jQuery.browser.msie  
jQuery.browser.version.substr(0,1)7){
+   //get the current querystring
+   var qs = window.location.search.substring(1);
+   // redirect IE6 people to another form
+   
window.location.replace(http://wikimediafoundation.org/wiki/Special:LandingCheck?language=enlanding_page=L11_ExtraInfo_0902_Nutm_campaign=C_0916_Webitects_US_ie6utm_source=B_BR_0916_UScountry_code=USreferrer=webitects1;);
+   }

// check for RapidHtml errors and display, if any
var errors = 
['#general','#retryMsg','#amount','#card_num','#card','#cvv','#fname',
@@ -236,7 +250,7 @@
showAmount( $(input[name=amount]) );

// hacks for IE6/IE7
-   if (jQuery.browser.msie  
jQuery.browser.version.substr(0,1)8){
+   if (jQuery.browser.msie  
jQuery.browser.version.substr(0,1)9){
$(#change-amount).click( 
function(){

$(#donate).css(width,335px);

$(#step1accordion).show();
@@ -257,7 +271,7 @@

[MediaWiki-CVS] SVN: [97311] trunk/extensions/DonationInterface/payflowpro_gateway/forms/ rapidhtml/html

2011-09-16 Thread pgehres
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97311

Revision: 97311
Author:   pgehres
Date: 2011-09-16 18:45:26 + (Fri, 16 Sep 2011)
Log Message:
---
Changed redirect URL for IE6

Modified Paths:
--

trunk/extensions/DonationInterface/payflowpro_gateway/forms/rapidhtml/html/webitects_1.html

trunk/extensions/DonationInterface/payflowpro_gateway/forms/rapidhtml/html/webitects_1a.html

trunk/extensions/DonationInterface/payflowpro_gateway/forms/rapidhtml/html/webitects_2.html

Modified: 
trunk/extensions/DonationInterface/payflowpro_gateway/forms/rapidhtml/html/webitects_1.html
===
--- 
trunk/extensions/DonationInterface/payflowpro_gateway/forms/rapidhtml/html/webitects_1.html
 2011-09-16 18:33:19 UTC (rev 97310)
+++ 
trunk/extensions/DonationInterface/payflowpro_gateway/forms/rapidhtml/html/webitects_1.html
 2011-09-16 18:45:26 UTC (rev 97311)
@@ -226,7 +226,7 @@
//get the current querystring
var qs = window.location.search.substring(1);
// redirect IE6 people to another form
-   
window.location.replace(http://wikimediafoundation.org/wiki/Special:LandingCheck?language=enlanding_page=L11_ExtraInfo_0902_Nutm_campaign=C_0916_Webitects_US_ie6utm_source=B_BR_0916_UScountry_code=USreferrer=webitects1;);
+   
window.location.replace(https://wikimediafoundation.org/wiki/Special:LandingCheck?language=enlanding_page=L11_ExtraInfo_0902_Nutm_campaign=C_0916_Webitects_US_ie6utm_source=B_BR_0916_UScountry_code=USreferrer=webitects1;);
}

// check for RapidHtml errors and display, if any

Modified: 
trunk/extensions/DonationInterface/payflowpro_gateway/forms/rapidhtml/html/webitects_1a.html
===
--- 
trunk/extensions/DonationInterface/payflowpro_gateway/forms/rapidhtml/html/webitects_1a.html
2011-09-16 18:33:19 UTC (rev 97310)
+++ 
trunk/extensions/DonationInterface/payflowpro_gateway/forms/rapidhtml/html/webitects_1a.html
2011-09-16 18:45:26 UTC (rev 97311)
@@ -227,7 +227,7 @@
//get the current querystring
var qs = window.location.search.substring(1);
// redirect IE6 people to another form
-   
window.location.replace(http://wikimediafoundation.org/wiki/Special:LandingCheck?language=enlanding_page=L11_ExtraInfo_0902_Nutm_campaign=C_0916_Webitects_US_ie6utm_source=B_BR_0916_UScountry_code=USreferrer=webitects1a;);
+   
window.location.replace(https://wikimediafoundation.org/wiki/Special:LandingCheck?language=enlanding_page=L11_ExtraInfo_0902_Nutm_campaign=C_0916_Webitects_US_ie6utm_source=B_BR_0916_UScountry_code=USreferrer=webitects1a;);
}

// check for RapidHtml errors and display, if any

Modified: 
trunk/extensions/DonationInterface/payflowpro_gateway/forms/rapidhtml/html/webitects_2.html
===
--- 
trunk/extensions/DonationInterface/payflowpro_gateway/forms/rapidhtml/html/webitects_2.html
 2011-09-16 18:33:19 UTC (rev 97310)
+++ 
trunk/extensions/DonationInterface/payflowpro_gateway/forms/rapidhtml/html/webitects_2.html
 2011-09-16 18:45:26 UTC (rev 97311)
@@ -237,7 +237,7 @@
//get the current querystring
var qs = window.location.search.substring(1);
// redirect IE6 people to another form
-   
window.location.replace(http://wikimediafoundation.org/wiki/Special:LandingCheck?language=enlanding_page=L11_ExtraInfo_0902_Nutm_campaign=C_0916_Webitects_US_ie6utm_source=B_BR_0916_UScountry_code=USreferrer=webitects2;);
+   
window.location.replace(https://wikimediafoundation.org/wiki/Special:LandingCheck?language=enlanding_page=L11_ExtraInfo_0902_Nutm_campaign=C_0916_Webitects_US_ie6utm_source=B_BR_0916_UScountry_code=USreferrer=webitects2;);
}

// check for RapidHtml errors and display, if any


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


[MediaWiki-CVS] SVN: [97312] trunk/extensions/Survey/Survey.i18n.php

2011-09-16 Thread siebrand
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97312

Revision: 97312
Author:   siebrand
Date: 2011-09-16 18:47:01 + (Fri, 16 Sep 2011)
Log Message:
---
Tweak 'surveys-surveystats-nosuchsurvey'

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

Modified: trunk/extensions/Survey/Survey.i18n.php
===
--- trunk/extensions/Survey/Survey.i18n.php 2011-09-16 18:45:26 UTC (rev 
97311)
+++ trunk/extensions/Survey/Survey.i18n.php 2011-09-16 18:47:01 UTC (rev 
97312)
@@ -83,7 +83,7 @@
'surveys-takesurvey-surveynotenabled' = 'The requested survey has not 
been enabled yet.',
 
// Special:SurveyStats
-   'surveys-surveystats-nosuchsurvey' = 'The requested survey does not 
exist. A list of available surveys can be found on [[Special:Surveys]]',
+   'surveys-surveystats-nosuchsurvey' = 'The requested survey does not 
exist. You can view a [[Special:Surveys|list of available surveys]].',
'surveys-surveystats-name' = 'Survey ID',
'surveys-surveystats-title' = 'Survey title',
'surveys-surveystats-status' = 'Survey status',


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


[MediaWiki-CVS] SVN: [97313] trunk/extensions/Translate/utils/MessageGroupStats.php

2011-09-16 Thread nikerabbit
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97313

Revision: 97313
Author:   nikerabbit
Date: 2011-09-16 18:49:56 + (Fri, 16 Sep 2011)
Log Message:
---
Don't add nulls to the database...

Modified Paths:
--
trunk/extensions/Translate/utils/MessageGroupStats.php

Modified: trunk/extensions/Translate/utils/MessageGroupStats.php
===
--- trunk/extensions/Translate/utils/MessageGroupStats.php  2011-09-16 
18:47:01 UTC (rev 97312)
+++ trunk/extensions/Translate/utils/MessageGroupStats.php  2011-09-16 
18:49:56 UTC (rev 97313)
@@ -241,6 +241,11 @@
 
list( $total, $translated, $fuzzy ) = $aggregates;
 
+   // Don't add nulls to the database, causes annoying warnings
+   if ( $total === null ) {
+   return $aggregates;
+   }
+
$data = array(
'tgs_group' = $id,
'tgs_lang' = $code,


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


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

2011-09-16 Thread ialex
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97314

Revision: 97314
Author:   ialex
Date: 2011-09-16 18:50:13 + (Fri, 16 Sep 2011)
Log Message:
---
* Added HttpError exception as replacement for wfHttpError(); changed alls core 
calls to it except AjaxDispatcher.php
* Changed FeedUtils' call to it to be similar than feeds are completely disabled
* Use local context instead of global variables in Special:Userlogout

Modified Paths:
--
trunk/phase3/includes/Exception.php
trunk/phase3/includes/FeedUtils.php
trunk/phase3/includes/Metadata.php
trunk/phase3/includes/WebRequest.php
trunk/phase3/includes/Wiki.php
trunk/phase3/includes/specials/SpecialUploadStash.php
trunk/phase3/includes/specials/SpecialUserlogout.php

Modified: trunk/phase3/includes/Exception.php
===
--- trunk/phase3/includes/Exception.php 2011-09-16 18:49:56 UTC (rev 97313)
+++ trunk/phase3/includes/Exception.php 2011-09-16 18:50:13 UTC (rev 97314)
@@ -367,6 +367,55 @@
 }
 
 /**
+ * Show an error that looks like an HTTP server error.
+ * Replacement for wfHttpError().
+ *
+ * @ingroup Exception
+ */
+class HttpError extends MWException {
+   private $httpCode, $header, $content;
+
+   /**
+* Constructor
+*
+* @param $httpCode Integer: HTTP status code to send to the client
+* @param $content String|Message: content of the message
+* @param $header String|Message: content of the header (\title\ and 
\h1\)
+*/
+   public function __construct( $httpCode, $content, $header = null ){
+   parent::__construct( $content );
+   $this-httpCode = (int)$httpCode;
+   $this-header = $header;
+   $this-content = $content;
+   }
+
+   public function reportHTML() {
+   $httpMessage = HttpStatus::getMessage( $this-httpCode );
+
+   header( Status: {$this-httpCode} {$httpMessage} );
+   header( 'Content-type: text/html; charset=utf-8' );
+
+   if ( $this-header === null ) {
+   $header = $httpMessage;
+   } elseif ( $this-header instanceof Message ) {
+   $header = $this-header-escaped();
+   } else {
+   $header = htmlspecialchars( $this-header );
+   }
+
+   if ( $this-content instanceof Message ) {
+   $content = $this-content-escaped();
+   } else {
+   $content = htmlspecialchars( $this-content );
+   }
+
+   print !DOCTYPE HTML PUBLIC \-//IETF//DTD HTML 2.0//EN\\n.
+   htmlheadtitle$header/title/head\n .
+   bodyh1$header/h1p$content/p/body/html\n;
+   }
+}
+
+/**
  * Handler class for MWExceptions
  * @ingroup Exception
  */

Modified: trunk/phase3/includes/FeedUtils.php
===
--- trunk/phase3/includes/FeedUtils.php 2011-09-16 18:49:56 UTC (rev 97313)
+++ trunk/phase3/includes/FeedUtils.php 2011-09-16 18:50:13 UTC (rev 97314)
@@ -31,16 +31,15 @@
 * @return Boolean
 */
public static function checkFeedOutput( $type ) {
-   global $wgFeed, $wgFeedClasses;
+   global $wgOut, $wgFeed, $wgFeedClasses;
 
if ( !$wgFeed ) {
-   global $wgOut;
$wgOut-addWikiMsg( 'feed-unavailable' );
return false;
}
 
if( !isset( $wgFeedClasses[$type] ) ) {
-   wfHttpError( 500, Internal Server Error, Unsupported 
feed type. );
+   $wgOut-addWikiMsg( 'feed-invalid' );
return false;
}
 

Modified: trunk/phase3/includes/Metadata.php
===
--- trunk/phase3/includes/Metadata.php  2011-09-16 18:49:56 UTC (rev 97313)
+++ trunk/phase3/includes/Metadata.php  2011-09-16 18:50:13 UTC (rev 97314)
@@ -41,14 +41,13 @@
$rdftype = wfNegotiateType( wfAcceptToPrefs( $httpaccept ), 
wfAcceptToPrefs( self::RDF_TYPE_PREFS ) );
 
if( !$rdftype ){
-   wfHttpError( 406, 'Not Acceptable', wfMsg( 
'notacceptable' ) );
-   return false;
-   } else {
-   $wgOut-disable();
-   $wgRequest-response()-header( Content-type: 
{$rdftype}; charset=utf-8 );
-   $wgOut-sendCacheControl();
-   return true;
+   throw new HttpError( 406, wfMessage( 'notacceptable' ) 
);
}
+
+   $wgOut-disable();
+   $wgRequest-response()-header( Content-type: {$rdftype}; 
charset=utf-8 );
+   $wgOut-sendCacheControl();
+   

[MediaWiki-CVS] SVN: [97315] trunk/tools/mwmultiversion/multiversion/checkoutMediaWiki

2011-09-16 Thread aaron
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97315

Revision: 97315
Author:   aaron
Date: 2011-09-16 18:53:19 + (Fri, 16 Sep 2011)
Log Message:
---
Handle the lib/ directory for things like geshi

Modified Paths:
--
trunk/tools/mwmultiversion/multiversion/checkoutMediaWiki

Modified: trunk/tools/mwmultiversion/multiversion/checkoutMediaWiki
===
--- trunk/tools/mwmultiversion/multiversion/checkoutMediaWiki   2011-09-16 
18:50:13 UTC (rev 97314)
+++ trunk/tools/mwmultiversion/multiversion/checkoutMediaWiki   2011-09-16 
18:53:19 UTC (rev 97315)
@@ -86,7 +86,7 @@
print Created AdminSettings.php symlink.\n;
}
} else {
-   print File already exists: $path\n;
+   print Symlink file already exists: $path\n;
}
 
# Create symlink to wmf-config/StartProfiler.php...
@@ -96,7 +96,7 @@
print Created StartProfiler.php symlink.\n;
}
} else {
-   print File already exists: $path\n;
+   print Symlink file already exists: $path\n;
}
 
# Create bits.wikimedia.org symlinks...
@@ -106,7 +106,7 @@
print Created skins-$dstVersionNum symlink.\n;
}
} else {
-   print File already exists: $path\n;
+   print Symlink file already exists: $path\n;
}
$path = $commonHomeDir/docroot/bits/w/extensions-$dstVersionNum;
if ( !file_exists( $path ) ) {
@@ -114,17 +114,17 @@
print Created w/extensions-$dstVersionNum symlink.\n;
}
} else {
-   print File already exists: $path\n;
+   print Symlink file already exists: $path\n;
}
 
-   # Create skins/resources symlinks
+   # Create skins/resources symlinks...
$path = $commonHomeDir/live-1.5/extensions-$dstVersionNum;
if ( !file_exists( $path ) ) {
if ( symlink( $commonLocalDir/php-$dstVersionNum/extensions, 
$path ) ) {
print Created live-1.5/extensions-$dstVersionNum 
symlink.\n;
}
} else {
-   print File already exists: $path\n;
+   print Symlink file already exists: $path\n;
}
$path = $commonHomeDir/live-1.5/skins-$dstVersionNum;
if ( !file_exists( $path ) ) {
@@ -132,7 +132,7 @@
print Created live-1.5/skins-$dstVersionNum 
symlink.\n;
}
} else {
-   print File already exists: $path\n;
+   print Symlink file already exists: $path\n;
}
$path = $commonHomeDir/live-1.5/resources-$dstVersionNum;
if ( !file_exists( $path ) ) {
@@ -140,9 +140,23 @@
print Created live-1.5/resources-$dstVersionNum 
symlink.\n;
}
} else {
-   print File already exists: $path\n;
+   print Symlink file already exists: $path\n;
}
 
+   # Create libs symlinks...
+   $libDir = $commonHomeDir/php-$dstVersionNum/lib;
+   if ( !file_exists( $libDir ) ) {
+   mkdir( $libDir, 0775 );
+   }
+   $path = $libDir/geshi;
+   if ( !file_exists( $path ) ) {
+   if ( symlink( ../../lib/geshi, $path ) ) {
+   print Created php-$dstVersionNum/lib/geshi symlink.\n;
+   }
+   } else {
+   print Symlink file already exists: $path\n;
+   }
+
print MediaWiki $dstVersionNum, from $svnVersion, successfully checked 
out.\n;
 }
 


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


[MediaWiki-CVS] SVN: [97316] trunk/extensions/Translate/specials/SpecialMessageGroupStats. php

2011-09-16 Thread nikerabbit
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97316

Revision: 97316
Author:   nikerabbit
Date: 2011-09-16 18:53:31 + (Fri, 16 Sep 2011)
Log Message:
---
Parameter was not passed correctly to the message

Modified Paths:
--
trunk/extensions/Translate/specials/SpecialMessageGroupStats.php

Modified: trunk/extensions/Translate/specials/SpecialMessageGroupStats.php
===
--- trunk/extensions/Translate/specials/SpecialMessageGroupStats.php
2011-09-16 18:53:19 UTC (rev 97315)
+++ trunk/extensions/Translate/specials/SpecialMessageGroupStats.php
2011-09-16 18:53:31 UTC (rev 97316)
@@ -40,7 +40,7 @@
/// Overwritten from SpecialLanguageStats
protected function invalidTarget() {
global $wgOut;
-   $wgOut-wrapWikiMsg( div class='error'$1/div, 
'translate-mgs-invalid-group', $this-target );
+   $wgOut-wrapWikiMsg( div class='error'$1/div, array( 
'translate-mgs-invalid-group', $this-target ) );
}
 
/// Overwritten from SpecialLanguageStats


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


[MediaWiki-CVS] SVN: [97317] trunk/extensions/MobileFrontend/MobileFrontend.php

2011-09-16 Thread preilly
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97317

Revision: 97317
Author:   preilly
Date: 2011-09-16 19:03:39 + (Fri, 16 Sep 2011)
Log Message:
---
$wgRequest-getQueryValues(); does not exist until r82694

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

Modified: trunk/extensions/MobileFrontend/MobileFrontend.php
===
--- trunk/extensions/MobileFrontend/MobileFrontend.php  2011-09-16 18:53:31 UTC 
(rev 97316)
+++ trunk/extensions/MobileFrontend/MobileFrontend.php  2011-09-16 19:03:39 UTC 
(rev 97317)
@@ -727,7 +727,7 @@
// before the output buffer callback function executes.
// Thus, globalized objects will not be available as expected 
in the function.
// This is stated to be intended behavior, as per the 
following: [http://bugs.php.net/bug.php?id=40104]
-   $mDefaultQuery = $wgRequest-getQueryValues();
+   $mDefaultQuery = $_GET;
unset( $mDefaultQuery['seg'] );
unset( $mDefaultQuery['useformat'] );



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


[MediaWiki-CVS] SVN: [97318] trunk/phase3/includes/specials/SpecialUndelete.php

2011-09-16 Thread reedy
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97318

Revision: 97318
Author:   reedy
Date: 2011-09-16 19:03:47 + (Fri, 16 Sep 2011)
Log Message:
---
Fix extra brace

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

Modified: trunk/phase3/includes/specials/SpecialUndelete.php
===
--- trunk/phase3/includes/specials/SpecialUndelete.php  2011-09-16 19:03:39 UTC 
(rev 97317)
+++ trunk/phase3/includes/specials/SpecialUndelete.php  2011-09-16 19:03:47 UTC 
(rev 97318)
@@ -77,7 +77,6 @@
'ar_namespace' = $ns,
'ar_title' . $dbr-buildLike( $prefix, 
$dbr-anyString() ),
);
-}
return self::listPages( $dbr, $conds );
}
 


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


[MediaWiki-CVS] SVN: [97319] branches/wmf/1.17wmf1/extensions/MobileFrontend/MobileFrontend .php

2011-09-16 Thread preilly
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97319

Revision: 97319
Author:   preilly
Date: 2011-09-16 19:04:14 + (Fri, 16 Sep 2011)
Log Message:
---
mft r97317

Modified Paths:
--
branches/wmf/1.17wmf1/extensions/MobileFrontend/MobileFrontend.php

Modified: branches/wmf/1.17wmf1/extensions/MobileFrontend/MobileFrontend.php
===
--- branches/wmf/1.17wmf1/extensions/MobileFrontend/MobileFrontend.php  
2011-09-16 19:03:47 UTC (rev 97318)
+++ branches/wmf/1.17wmf1/extensions/MobileFrontend/MobileFrontend.php  
2011-09-16 19:04:14 UTC (rev 97319)
@@ -727,7 +727,7 @@
// before the output buffer callback function executes.
// Thus, globalized objects will not be available as expected 
in the function.
// This is stated to be intended behavior, as per the 
following: [http://bugs.php.net/bug.php?id=40104]
-   $mDefaultQuery = $wgRequest-getQueryValues();
+   $mDefaultQuery = $_GET;
unset( $mDefaultQuery['seg'] );
unset( $mDefaultQuery['useformat'] );



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


[MediaWiki-CVS] SVN: [97320] branches/REL1_18/phase3/includes/specials/SpecialUndelete.php

2011-09-16 Thread reedy
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97320

Revision: 97320
Author:   reedy
Date: 2011-09-16 19:05:22 + (Fri, 16 Sep 2011)
Log Message:
---
Fix extra brace from r97299

Modified Paths:
--
branches/REL1_18/phase3/includes/specials/SpecialUndelete.php

Modified: branches/REL1_18/phase3/includes/specials/SpecialUndelete.php
===
--- branches/REL1_18/phase3/includes/specials/SpecialUndelete.php   
2011-09-16 19:04:14 UTC (rev 97319)
+++ branches/REL1_18/phase3/includes/specials/SpecialUndelete.php   
2011-09-16 19:05:22 UTC (rev 97320)
@@ -77,7 +77,6 @@
'ar_namespace' = $ns,
'ar_title' . $dbr-buildLike( $prefix, 
$dbr-anyString() ),
);
-}
return self::listPages( $dbr, $conds );
}
 


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


[MediaWiki-CVS] SVN: [97321] trunk/debs/wikidiff2/debian/changelog

2011-09-16 Thread py
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97321

Revision: 97321
Author:   py
Date: 2011-09-16 19:07:09 + (Fri, 16 Sep 2011)
Log Message:
---
holy annoying type, batman

Modified Paths:
--
trunk/debs/wikidiff2/debian/changelog

Modified: trunk/debs/wikidiff2/debian/changelog
===
--- trunk/debs/wikidiff2/debian/changelog   2011-09-16 19:05:22 UTC (rev 
97320)
+++ trunk/debs/wikidiff2/debian/changelog   2011-09-16 19:07:09 UTC (rev 
97321)
@@ -1,4 +1,4 @@
-wikidiff2 (0.0.1wm1) lucid-wikipedia; urgency=low
+wikidiff2 (0.0.1wm1) lucid-wikimedia; urgency=low
 
   * initial wikimedia build
 


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


[MediaWiki-CVS] SVN: [97322] trunk/extensions/Translate/utils/StatsTable.php

2011-09-16 Thread nikerabbit
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97322

Revision: 97322
Author:   nikerabbit
Date: 2011-09-16 19:07:39 + (Fri, 16 Sep 2011)
Log Message:
---
We were not getting enough of significant digits to sort 0.02% and 0.05% 
correctly

Modified Paths:
--
trunk/extensions/Translate/utils/StatsTable.php

Modified: trunk/extensions/Translate/utils/StatsTable.php
===
--- trunk/extensions/Translate/utils/StatsTable.php 2011-09-16 19:07:09 UTC 
(rev 97321)
+++ trunk/extensions/Translate/utils/StatsTable.php 2011-09-16 19:07:39 UTC 
(rev 97322)
@@ -153,11 +153,11 @@
 
$out .= \n\t\t . $this-element( $this-formatPercentage( 
$translated / $total ),
$this-getBackgroundColour( $translated, $total ),
-   sprintf( '%1.3f', $translated / $total ) );
+   sprintf( '%1.5f', $translated / $total ) );
 
$out .= \n\t\t . $this-element( $this-formatPercentage( 
$fuzzy / $total ),
$this-getBackgroundColour( $fuzzy, $total, true ),
-   sprintf( '%1.3f', $fuzzy / $total ) );
+   sprintf( '%1.5f', $fuzzy / $total ) );
 
$out .= \n\t . Xml::closeElement( 'tr' ) . \n;
return $out;


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


[MediaWiki-CVS] SVN: [97323] branches/wmf/1.17wmf1/extensions/FlaggedRevs/FlaggedRevision. php

2011-09-16 Thread aaron
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97323

Revision: 97323
Author:   aaron
Date: 2011-09-16 19:09:10 + (Fri, 16 Sep 2011)
Log Message:
---
Patch to support new fr_rev_timestamp column if it either exists or not

Modified Paths:
--
branches/wmf/1.17wmf1/extensions/FlaggedRevs/FlaggedRevision.php

Modified: branches/wmf/1.17wmf1/extensions/FlaggedRevs/FlaggedRevision.php
===
--- branches/wmf/1.17wmf1/extensions/FlaggedRevs/FlaggedRevision.php
2011-09-16 19:07:39 UTC (rev 97322)
+++ branches/wmf/1.17wmf1/extensions/FlaggedRevs/FlaggedRevision.php
2011-09-16 19:09:10 UTC (rev 97323)
@@ -310,6 +310,10 @@
'fr_img_timestamp' = $dbw-timestampOrNull( 
$this-getFileTimestamp() ),
'fr_img_sha1'  = $this-getFileSha1()
);
+   # Intermediate code for wmf schema change
+   if ( $dbw-fieldExists( 'flaggedrevs', 'fr_rev_timestamp' ) ) {
+   $revRow['fr_rev_timestamp'] = $dbw-timestamp( 
$this-getRevTimestamp() );
+   }
# Update flagged revisions table
$dbw-replace( 'flaggedrevs',
array( array( 'fr_page_id', 'fr_rev_id' ) ), $revRow, 
__METHOD__ );


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


[MediaWiki-CVS] SVN: [97324] trunk/extensions/SemanticMediaWiki/includes

2011-09-16 Thread jeroendedauw
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97324

Revision: 97324
Author:   jeroendedauw
Date: 2011-09-16 19:23:52 + (Fri, 16 Sep 2011)
Log Message:
---
some work on ask api

Modified Paths:
--
trunk/extensions/SemanticMediaWiki/includes/SMW_Setup.php
trunk/extensions/SemanticMediaWiki/includes/api/ApiAsk.php
trunk/extensions/SemanticMediaWiki/includes/api/ApiAskArgs.php
trunk/extensions/SemanticMediaWiki/includes/api/ApiSMWQuery.php
trunk/extensions/SemanticMediaWiki/includes/storage/SMW_QueryResult.php

Modified: trunk/extensions/SemanticMediaWiki/includes/SMW_Setup.php
===
--- trunk/extensions/SemanticMediaWiki/includes/SMW_Setup.php   2011-09-16 
19:09:10 UTC (rev 97323)
+++ trunk/extensions/SemanticMediaWiki/includes/SMW_Setup.php   2011-09-16 
19:23:52 UTC (rev 97324)
@@ -45,6 +45,8 @@
smwfRegisterSpecialPages();
 
$wgAPIModules['smwinfo'] = 'ApiSMWInfo';
+   $wgAPIModules['ask'] = 'ApiAsk';
+   $wgAPIModules['askargs'] = 'ApiAskArgs';
 
$wgFooterIcons['poweredby']['semanticmediawiki'] = array(
'src' = null,
@@ -339,9 +341,10 @@
$wgAutoloadClasses['SMWRefreshJob'] = $smwgIP . 
'includes/jobs/SMW_RefreshJob.php';
 
// API modules
-   //$wgAutoloadClasses['ApiSMWQuery'] = $smwgIP . 
'includes/api/ApiSMWQuery.php';
-   //$wgAPIModules['smwquery'] = 'ApiSMWQuery';
-   $wgAutoloadClasses['ApiSMWInfo']= $smwgIP . 
'includes/api/ApiSMWInfo.php';
+   $wgAutoloadClasses['ApiSMWQuery'] = $smwgIP . 
'includes/api/ApiSMWQuery.php';
+   $wgAutoloadClasses['ApiAsk'] = $smwgIP . 'includes/api/ApiAsk.php';
+   $wgAutoloadClasses['ApiAskArgs'] = $smwgIP . 
'includes/api/ApiAskArgs.php';
+   $wgAutoloadClasses['ApiSMWInfo'] = $smwgIP . 
'includes/api/ApiSMWInfo.php';
 
// Other extensions
$wgAutoloadClasses['SMWPageSchemas'] = $smwgIP . 
'includes/SMW_PageSchemas.php';

Modified: trunk/extensions/SemanticMediaWiki/includes/api/ApiAsk.php
===
--- trunk/extensions/SemanticMediaWiki/includes/api/ApiAsk.php  2011-09-16 
19:09:10 UTC (rev 97323)
+++ trunk/extensions/SemanticMediaWiki/includes/api/ApiAsk.php  2011-09-16 
19:23:52 UTC (rev 97324)
@@ -17,6 +17,8 @@
public function execute() {
$params = $this-extractRequestParams();
$this-requireParameters( $params, array( 'query' ) );
+
+   // SMWQueryProcessor::processFunctionParams( $rawparams, 
$queryString, $m_params, $m_printouts);

$queryResult = $this-getQueryResult( $this-getQuery( 
$params['query'] ) );
$this-addQueryResult( $queryResult );

Modified: trunk/extensions/SemanticMediaWiki/includes/api/ApiAskArgs.php
===
--- trunk/extensions/SemanticMediaWiki/includes/api/ApiAskArgs.php  
2011-09-16 19:09:10 UTC (rev 97323)
+++ trunk/extensions/SemanticMediaWiki/includes/api/ApiAskArgs.php  
2011-09-16 19:23:52 UTC (rev 97324)
@@ -18,11 +18,27 @@
public function execute() {
$params = $this-extractRequestParams();
$this-requireParameters( $params, array( 'conditions' ) );
+   $this-parameters = $params['parameters'];

-   $query = $this-getQuery(  ); // TODO
+   $query = $this-getQuery( 
+   implode( array_map( array( __CLASS__, 'wrapCondition' 
), $params['conditions'] ) ),
+   array_map( array( __CLASS__, 'printeoutFromString' ), 
$params['printeouts'] )
+   );

$this-addQueryResult( $this-getQueryResult( $query ) );
}
+   
+   public static function wrapCondition( $c ) {
+   return [[$c]]; 
+   }
+   
+   public static function printeoutFromString( $printeout ) {
+   return new SMWPrintRequest(
+   SMWPrintRequest::PRINT_PROP,
+   $printeout,
+   SMWPropertyValue::makeUserProperty( $printeout )
+   );
+   }
 
public function getAllowedParams() {
return array(
@@ -64,7 +80,7 @@
 
protected function getExamples() {
return array(
-   'api.php?action=askargsconditions=Modification 
date::+printeouts=Modification dateparameters=|sort%3DModification 
date|order%3Ddesc',
+   'api.php?action=askargsconditions=Modification 
date::%2Bprinteouts=Modification dateparameters=|sort%3DModification 
date|order%3Ddesc',
);
}   


Modified: trunk/extensions/SemanticMediaWiki/includes/api/ApiSMWQuery.php
===
--- 

[MediaWiki-CVS] SVN: [97326] trunk/phase3/includes/api

2011-09-16 Thread ialex
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97326

Revision: 97326
Author:   ialex
Date: 2011-09-16 19:35:14 + (Fri, 16 Sep 2011)
Log Message:
---
Call Linker methods statically

Modified Paths:
--
trunk/phase3/includes/api/ApiParse.php
trunk/phase3/includes/api/ApiQueryDeletedrevs.php
trunk/phase3/includes/api/ApiQueryFilearchive.php
trunk/phase3/includes/api/ApiQueryImageInfo.php
trunk/phase3/includes/api/ApiQueryLogEvents.php
trunk/phase3/includes/api/ApiQueryProtectedTitles.php
trunk/phase3/includes/api/ApiQueryRecentChanges.php
trunk/phase3/includes/api/ApiQueryRevisions.php
trunk/phase3/includes/api/ApiQueryUserContributions.php
trunk/phase3/includes/api/ApiQueryWatchlist.php

Modified: trunk/phase3/includes/api/ApiParse.php
===
--- trunk/phase3/includes/api/ApiParse.php  2011-09-16 19:31:56 UTC (rev 
97325)
+++ trunk/phase3/includes/api/ApiParse.php  2011-09-16 19:35:14 UTC (rev 
97326)
@@ -216,7 +216,7 @@
 
if ( !is_null( $params['summary'] ) ) {
$result_array['parsedsummary'] = array();
-   $result-setContent( $result_array['parsedsummary'], 
$wgUser-getSkin()-formatComment( $params['summary'], $titleObj ) );
+   $result-setContent( $result_array['parsedsummary'], 
Linker::formatComment( $params['summary'], $titleObj ) );
}
 
if ( isset( $prop['langlinks'] ) ) {

Modified: trunk/phase3/includes/api/ApiQueryDeletedrevs.php
===
--- trunk/phase3/includes/api/ApiQueryDeletedrevs.php   2011-09-16 19:31:56 UTC 
(rev 97325)
+++ trunk/phase3/includes/api/ApiQueryDeletedrevs.php   2011-09-16 19:35:14 UTC 
(rev 97326)
@@ -230,7 +230,7 @@
$title = Title::makeTitle( $row-ar_namespace, 
$row-ar_title );
 
if ( $fld_parsedcomment ) {
-   $rev['parsedcomment'] = 
$wgUser-getSkin()-formatComment( $row-ar_comment, $title );
+   $rev['parsedcomment'] = Linker::formatComment( 
$row-ar_comment, $title );
}
if ( $fld_minor  $row-ar_minor_edit == 1 ) {
$rev['minor'] = '';

Modified: trunk/phase3/includes/api/ApiQueryFilearchive.php
===
--- trunk/phase3/includes/api/ApiQueryFilearchive.php   2011-09-16 19:31:56 UTC 
(rev 97325)
+++ trunk/phase3/includes/api/ApiQueryFilearchive.php   2011-09-16 19:35:14 UTC 
(rev 97326)
@@ -166,7 +166,7 @@
if ( $fld_description ) {
$file['description'] = $row-fa_description;
if ( isset( $prop['parseddescription'] ) ) {
-   $file['parseddescription'] = 
$wgUser-getSkin()-formatComment(
+   $file['parseddescription'] = 
Linker::formatComment(
$row-fa_description, $title );
}
}

Modified: trunk/phase3/includes/api/ApiQueryImageInfo.php
===
--- trunk/phase3/includes/api/ApiQueryImageInfo.php 2011-09-16 19:31:56 UTC 
(rev 97325)
+++ trunk/phase3/includes/api/ApiQueryImageInfo.php 2011-09-16 19:35:14 UTC 
(rev 97326)
@@ -318,8 +318,7 @@
$vals['commenthidden'] = '';
} else {
if ( $pcomment ) {
-   global $wgUser;
-   $vals['parsedcomment'] = 
$wgUser-getSkin()-formatComment(
+   $vals['parsedcomment'] = 
Linker::formatComment(
$file-getDescription(), 
$file-getTitle() );
}
if ( $comment ) {

Modified: trunk/phase3/includes/api/ApiQueryLogEvents.php
===
--- trunk/phase3/includes/api/ApiQueryLogEvents.php 2011-09-16 19:31:56 UTC 
(rev 97325)
+++ trunk/phase3/includes/api/ApiQueryLogEvents.php 2011-09-16 19:35:14 UTC 
(rev 97326)
@@ -323,8 +323,7 @@
}
 
if ( $this-fld_parsedcomment ) {
-   global $wgUser;
-   $vals['parsedcomment'] = 
$wgUser-getSkin()-formatComment( $row-log_comment, $title );
+   $vals['parsedcomment'] = 
Linker::formatComment( $row-log_comment, $title );
}
}
}

Modified: 

[MediaWiki-CVS] SVN: [97327] trunk/phase3/includes/actions/CreditsAction.php

2011-09-16 Thread ialex
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97327

Revision: 97327
Author:   ialex
Date: 2011-09-16 19:39:53 + (Fri, 16 Sep 2011)
Log Message:
---
Removed useless check since the variable always exists and null would be 
catched by the second part

Modified Paths:
--
trunk/phase3/includes/actions/CreditsAction.php

Modified: trunk/phase3/includes/actions/CreditsAction.php
===
--- trunk/phase3/includes/actions/CreditsAction.php 2011-09-16 19:35:14 UTC 
(rev 97326)
+++ trunk/phase3/includes/actions/CreditsAction.php 2011-09-16 19:39:53 UTC 
(rev 97327)
@@ -67,7 +67,7 @@
wfProfileIn( __METHOD__ );
$s = '';
 
-   if ( isset( $cnt )  $cnt != 0 ) {
+   if ( $cnt != 0 ) {
$s = self::getAuthor( $this-page );
if ( $cnt  1 || $cnt  0 ) {
$s .= ' ' . $this-getContributors( $cnt - 1, 
$showIfMax );


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


[MediaWiki-CVS] SVN: [97328] trunk/phase3/includes/GlobalFunctions.php

2011-09-16 Thread reedy
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97328

Revision: 97328
Author:   reedy
Date: 2011-09-16 20:08:33 + (Fri, 16 Sep 2011)
Log Message:
---
Noticed in apache error logs (see below). If the length of the message is 
longer than the maximum length, only send what will fit

Sep 16 20:07:28 10.0.2.193 apache2[28441]: PHP Warning:  socket_sendto() [a 
href='function.socket-sendto'function.socket-sendto/a]: unable to write to 
socket [90]: Message too long in 
/home/wikipedia/common/php-1.17-test/includes/GlobalFunctions.php on line 464
Sep 16 20:07:29 10.0.2.193 apache2[26511]: PHP Warning:  socket_sendto() [a 
href='function.socket-sendto'function.socket-sendto/a]: unable to write to 
socket [90]: Message too long in 
/home/wikipedia/common/php-1.17-test/includes/GlobalFunctions.php on line 464

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

Modified: trunk/phase3/includes/GlobalFunctions.php
===
--- trunk/phase3/includes/GlobalFunctions.php   2011-09-16 19:39:53 UTC (rev 
97327)
+++ trunk/phase3/includes/GlobalFunctions.php   2011-09-16 20:08:33 UTC (rev 
97328)
@@ -867,7 +867,14 @@
if ( !$sock ) {
return;
}
-   socket_sendto( $sock, $text, strlen( $text ), 0, $host, $port );
+
+   $len = strlen( $text );
+   $maxLen = socket_get_option( $sock, SOL_UDP, SO_SNDBUF );
+
+   if ( $len  $maxLen ) {
+   $len = $maxLen - 1;
+   }
+   socket_sendto( $sock, $text, $len, 0, $host, $port );
socket_close( $sock );
} else {
wfSuppressWarnings();


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


[MediaWiki-CVS] SVN: [97329] trunk/phase3/skins/common/commonPrint.css

2011-09-16 Thread raymond
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97329

Revision: 97329
Author:   raymond
Date: 2011-09-16 20:27:09 + (Fri, 16 Sep 2011)
Log Message:
---
Remove the pseudo TOC, part of file descripton pages, from printing. Useless 
and confusing if a really TOC exists

Modified Paths:
--
trunk/phase3/skins/common/commonPrint.css

Modified: trunk/phase3/skins/common/commonPrint.css
===
--- trunk/phase3/skins/common/commonPrint.css   2011-09-16 20:08:33 UTC (rev 
97328)
+++ trunk/phase3/skins/common/commonPrint.css   2011-09-16 20:27:09 UTC (rev 
97329)
@@ -129,7 +129,8 @@
 #footer-places,
 .mw-hidden-catlinks,
 tr.mw-metadata-show-hide-extended,
-span.mw-filepage-other-resolutions {
+span.mw-filepage-other-resolutions,
+ul#filetoc {
/* Hides all the elements irrelevant for printing */
display: none;
 }


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


[MediaWiki-CVS] SVN: [97330] trunk/phase3/includes/WebStart.php

2011-09-16 Thread sean_colombo
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97330

Revision: 97330
Author:   sean_colombo
Date: 2011-09-16 20:31:37 + (Fri, 16 Sep 2011)
Log Message:
---
Additional register_globals vulnerability check. Merged in from big Wikia 
merge: http://www.mediawiki.org/wiki/Wikia_code

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

Modified: trunk/phase3/includes/WebStart.php
===
--- trunk/phase3/includes/WebStart.php  2011-09-16 20:27:09 UTC (rev 97329)
+++ trunk/phase3/includes/WebStart.php  2011-09-16 20:31:37 UTC (rev 97330)
@@ -26,7 +26,7 @@
 # Protect against register_globals
 # This must be done before any globals are set by the code
 if ( ini_get( 'register_globals' ) ) {
-   if ( isset( $_REQUEST['GLOBALS'] ) ) {
+   if ( isset( $_REQUEST['GLOBALS'] ) || isset( $_FILES['GLOBALS'] ) ) {
die( 'a 
href=http://www.hardened-php.net/globals-problem;$GLOBALS overwrite 
vulnerability/a');
}
$verboten = array(


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


[MediaWiki-CVS] SVN: [97331] branches/wmf/1.17wmf1/extensions/FlaggedRevs

2011-09-16 Thread aaron
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97331

Revision: 97331
Author:   aaron
Date: 2011-09-16 20:37:55 + (Fri, 16 Sep 2011)
Log Message:
---
MFT changes from r87606

Modified Paths:
--
branches/wmf/1.17wmf1/extensions/FlaggedRevs/api/FlaggedRevsApi.hooks.php

branches/wmf/1.17wmf1/extensions/FlaggedRevs/specialpages/ReviewedVersions_body.php

Modified: 
branches/wmf/1.17wmf1/extensions/FlaggedRevs/api/FlaggedRevsApi.hooks.php
===
--- branches/wmf/1.17wmf1/extensions/FlaggedRevs/api/FlaggedRevsApi.hooks.php   
2011-09-16 20:31:37 UTC (rev 97330)
+++ branches/wmf/1.17wmf1/extensions/FlaggedRevs/api/FlaggedRevsApi.hooks.php   
2011-09-16 20:37:55 UTC (rev 97331)
@@ -58,7 +58,7 @@
'fr_rev_id' = array_keys( $revids ) ), 
LIST_AND );
}
$module-addWhere( $db-makeList( $where, LIST_OR ) );
-   $module-addOption( 'USE INDEX', array( 'flaggedrevs' = 
'PRIMARY' ) );
+   //$module-addOption( 'USE INDEX', array( 'flaggedrevs' = 
'page_rev' ) );
 
$res = $module-select( __METHOD__ );
 

Modified: 
branches/wmf/1.17wmf1/extensions/FlaggedRevs/specialpages/ReviewedVersions_body.php
===
--- 
branches/wmf/1.17wmf1/extensions/FlaggedRevs/specialpages/ReviewedVersions_body.php
 2011-09-16 20:31:37 UTC (rev 97330)
+++ 
branches/wmf/1.17wmf1/extensions/FlaggedRevs/specialpages/ReviewedVersions_body.php
 2011-09-16 20:37:55 UTC (rev 97331)
@@ -106,7 +106,7 @@
'tables'  = array( 'flaggedrevs', 'revision', 'user' ),
'fields'  = 
'fr_rev_id,fr_timestamp,rev_timestamp,fr_quality,fr_user,user_name',
'conds'   = $conds,
-   'options' = array( 'USE INDEX' = array( 'flaggedrevs' 
= 'PRIMARY' ) )
+   //'options' = array( 'USE INDEX' = array( 
'flaggedrevs' = 'page_rev' ) 
);
}
 


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


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

2011-09-16 Thread raymond
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97334

Revision: 97334
Author:   raymond
Date: 2011-09-16 21:03:46 + (Fri, 16 Sep 2011)
Log Message:
---
Per initial commit r96356: Some tweaks to the i18n file: Uppercase - lowercase 
for consisteny, like in core
Add extension to translatewiki.net 

Modified Paths:
--
trunk/extensions/Translate/groups/mediawiki-defines.txt
trunk/extensions/skins/Nimbus/Nimbus.i18n.php

Modified: trunk/extensions/Translate/groups/mediawiki-defines.txt
===
--- trunk/extensions/Translate/groups/mediawiki-defines.txt 2011-09-16 
21:00:07 UTC (rev 97333)
+++ trunk/extensions/Translate/groups/mediawiki-defines.txt 2011-09-16 
21:03:46 UTC (rev 97334)
@@ -899,6 +899,9 @@
 
 New Users List
 
+Nimbus
+ignored = morewikis, nimbus-advertise-url
+
 Notificator
 aliasfile = Notificator/Notificator.alias.php
 

Modified: trunk/extensions/skins/Nimbus/Nimbus.i18n.php
===
--- trunk/extensions/skins/Nimbus/Nimbus.i18n.php   2011-09-16 21:00:07 UTC 
(rev 97333)
+++ trunk/extensions/skins/Nimbus/Nimbus.i18n.php   2011-09-16 21:03:46 UTC 
(rev 97334)
@@ -12,21 +12,21 @@
'nimbus-advertise' = 'Advertise',
'nimbus-advertise-url' = '', // set this to an URL if you want an 
Advertise link to show up in the footer
'nimbus-contribute' = 'Contribute',
-   'nimbus-didyouknow' = 'Did You Know',
-   'nimbus-featuredimage' = 'Featured Image',
-   'nimbus-featureduser' = 'Featured User',
+   'nimbus-didyouknow' = 'Did you know',
+   'nimbus-featuredimage' = 'Featured image',
+   'nimbus-featureduser' = 'Featured user',
'nimbus-login' = 'Login',
-   'nimbus-logout' = 'Log Out?',
-   'nimbus-more-actions' = 'More Actions',
-   'nimbus-more-wikis' = 'More Wikis',
-   'nimbus-pages-can-be-edited' = {{SITENAME}}'s pages can be edited. 
br /
-Is this page incomplete?  Is there anything wrong?br /
+   'nimbus-logout' = 'Log out?',
+   'nimbus-more-actions' = 'More actions',
+   'nimbus-more-wikis' = 'More wikis',
+   'nimbus-pages-can-be-edited' = {{SITENAME}}'s pages can be edited.br 
/
+Is this page incomplete? Is there anything wrong?br /
 bChange it!/b,
'nimbus-profile' = 'Profile',
'nimbus-recent-contributors' = 'Recent contributors to this page',
'nimbus-recent-contributors-info' = 'The following people recently 
contributed to this article.',
'nimbus-search' = 'enter search',
-   'nimbus-signup' = 'Sign Up',
+   'nimbus-signup' = 'Sign up',
'nimbus-welcome' = 'Welcome $1', // b/b tags are passed as $1 
along with the actual username
 );
 
@@ -92,4 +92,4 @@
'nimbus-search' = 'Wpisz szukane wyrażenie',
'nimbus-signup' = 'Zarejestruj się',
'nimbus-welcome' = 'Witaj, $1',
-);
\ No newline at end of file
+);


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


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

2011-09-16 Thread raymond
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97335

Revision: 97335
Author:   raymond
Date: 2011-09-16 21:08:14 + (Fri, 16 Sep 2011)
Log Message:
---
Forgot to press Ctrl-S: r97334 (was: Per initial commit r96356)

Modified Paths:
--
trunk/extensions/Translate/groups/mediawiki-defines.txt
trunk/extensions/skins/Nimbus/Nimbus.i18n.php
trunk/extensions/skins/Nimbus/Nimbus.php

Modified: trunk/extensions/Translate/groups/mediawiki-defines.txt
===
--- trunk/extensions/Translate/groups/mediawiki-defines.txt 2011-09-16 
21:03:46 UTC (rev 97334)
+++ trunk/extensions/Translate/groups/mediawiki-defines.txt 2011-09-16 
21:08:14 UTC (rev 97335)
@@ -900,6 +900,7 @@
 New Users List
 
 Nimbus
+file = skins/Nimbus/Nimbus.i18n.php
 ignored = morewikis, nimbus-advertise-url
 
 Notificator

Modified: trunk/extensions/skins/Nimbus/Nimbus.i18n.php
===
--- trunk/extensions/skins/Nimbus/Nimbus.i18n.php   2011-09-16 21:03:46 UTC 
(rev 97334)
+++ trunk/extensions/skins/Nimbus/Nimbus.i18n.php   2011-09-16 21:08:14 UTC 
(rev 97335)
@@ -9,6 +9,7 @@
 /** English */
 $messages['en'] = array(
'morewikis' = '', // format for this message is *Page name/Interwiki 
link/URL|Text to show
+   'nimbus-desc' = 'Nimbus skin for MediaWiki',
'nimbus-advertise' = 'Advertise',
'nimbus-advertise-url' = '', // set this to an URL if you want an 
Advertise link to show up in the footer
'nimbus-contribute' = 'Contribute',

Modified: trunk/extensions/skins/Nimbus/Nimbus.php
===
--- trunk/extensions/skins/Nimbus/Nimbus.php2011-09-16 21:03:46 UTC (rev 
97334)
+++ trunk/extensions/skins/Nimbus/Nimbus.php2011-09-16 21:08:14 UTC (rev 
97335)
@@ -27,7 +27,7 @@
'name' = 'Nimbus',
'version' = '2.0',
'author' = array( 'Aaron Wright', 'David Pean', 'Inez Korczyński', 
'Jack Phoenix' ),
-   'description' = 'Nimbus skin for MediaWiki',
+   'descriptionmsg' = 'nimbus-desc',
'url' = 'http://www.mediawiki.org/wiki/Nimbus_skin',
 );
 


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


[MediaWiki-CVS] SVN: [97336] trunk/extensions/SemanticDrilldown

2011-09-16 Thread yaron
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97336

Revision: 97336
Author:   yaron
Date: 2011-09-16 21:14:49 + (Fri, 16 Sep 2011)
Log Message:
---
Moved all Page Schemas-related static function from SD_Utils.php into a new 
file, SD_PageSchemas.php

Modified Paths:
--
trunk/extensions/SemanticDrilldown/SemanticDrilldown.php
trunk/extensions/SemanticDrilldown/includes/SD_Utils.php

Added Paths:
---
trunk/extensions/SemanticDrilldown/includes/SD_PageSchemas.php

Modified: trunk/extensions/SemanticDrilldown/SemanticDrilldown.php
===
--- trunk/extensions/SemanticDrilldown/SemanticDrilldown.php2011-09-16 
21:08:14 UTC (rev 97335)
+++ trunk/extensions/SemanticDrilldown/SemanticDrilldown.php2011-09-16 
21:14:49 UTC (rev 97336)
@@ -58,22 +58,21 @@
 $wgAutoloadClasses['SDFilter'] = $sdgIP . '/includes/SD_Filter.php';
 $wgAutoloadClasses['SDFilterValue'] = $sdgIP . '/includes/SD_FilterValue.php';
 $wgAutoloadClasses['SDAppliedFilter'] = $sdgIP . 
'/includes/SD_AppliedFilter.php';
+$wgAutoloadClasses['SDPageSchemas'] = $sdgIP . '/includes/SD_PageSchemas.php';
 
 $wgHooks['smwInitProperties'][] = 'sdfInitProperties';
 $wgHooks['AdminLinks'][] = 'SDUtils::addToAdminLinks';
 $wgHooks['MagicWordwgVariableIDs'][] = 'SDUtils::addMagicWordVariableIDs';
 $wgHooks['LanguageGetMagic'][] = 'SDUtils::addMagicWordLanguage';
 $wgHooks['ParserBeforeTidy'][] = 'SDUtils::handleShowAndHide';
+$wgHooks['PSParseFieldElements'][] = 'SDPageSchemas::parseFieldElements';
+$wgHooks['PageSchemasGetObject'][] = 'SDPageSchemas::createPageSchemasObject';
+$wgHooks['PageSchemasGetFieldHTML'][] = 'SDPageSchemas::getFieldHTML';
+$wgHooks['PageSchemasGetFieldXML'][] = 'SDPageSchemas::getFieldXML';
 
 $wgPageProps['hidefromdrilldown'] = 'Whether or not the page is set as 
HIDEFROMDRILLDOWN';
 $wgPageProps['showindrilldown'] = 'Whether or not the page is set as 
SHOWINDRILLDOWN';
-$wgHooks['PSParseFieldElements'][] = 'SDUtils::parseFieldElements';
-$wgHooks['PageSchemasGetObject'][] = 'SDUtils::createPageSchemasObject';
-$wgHooks['PageSchemasGetFieldHTML'][] = 'SDUtils::getFieldHTMLForPS';
-$wgHooks['PageSchemasGetStarterFieldHTML'][] = 
'SDUtils::getStarterFieldHTMLForPS';
-$wgHooks['PageSchemasGetFieldXML'][] = 'SDUtils::getFieldXMLForPS';
 
-
 # ##
 # This is the path to your installation of Semantic Drilldown as
 # seen from the web. Change it if required ($wgScriptPath is the

Added: trunk/extensions/SemanticDrilldown/includes/SD_PageSchemas.php
===
--- trunk/extensions/SemanticDrilldown/includes/SD_PageSchemas.php  
(rev 0)
+++ trunk/extensions/SemanticDrilldown/includes/SD_PageSchemas.php  
2011-09-16 21:14:49 UTC (rev 97336)
@@ -0,0 +1,239 @@
+?php
+/**
+ * Static functions for Semantic Drilldown, for use by the Page Schemas
+ * extension.
+ *
+ * @author Yaron Koren
+ * @author Ankit Garg
+ */
+
+class SDPageSchemas {
+
+   /**
+* Return an object containing information on a filter, based on XML
+* from the Page Schemas extensions
+   */
+   public static function createPageSchemasObject( $objectName, 
$xmlForField, $object ) {
+   $sdarray = array();
+   if ( $objectName == semanticdrilldown_Filter ) {
+   foreach ( $xmlForField-children() as $tag = $child ) {
+   if ( $tag == $objectName ) {
+   foreach ( $child-children() as $prop 
= $value) {
+   if( $prop == Values ){
+   $l_values = array();
+   foreach ( 
$value-children() as $val_i = $val ) {
+   $l_values[] = 
(string)$val;
+   }
+   $sdarray['Values'] = 
$l_values;
+   } else {
+   $sdarray[$prop] = 
(string)$value;
+   }
+   }
+   $object['sd'] = $sdarray;
+   return true;
+   }
+   }
+   }
+   return true;
+   }
+
+   /**
+* Returns the HTML for setting the filter options, for the
+* Semantic Drilldown section in Page Schemas' edit schema page
+*/
+   public static function getFieldHTML( $field, $text_extensions ){
+   // TODO - add these options to the XML and HTML
+   //$property_label = wfMsg( 'sd_createfilter_property' );
+   

[MediaWiki-CVS] SVN: [97337] trunk/extensions/SemanticForms

2011-09-16 Thread yaron
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97337

Revision: 97337
Author:   yaron
Date: 2011-09-16 21:18:36 + (Fri, 16 Sep 2011)
Log Message:
---
Moved all Page Schemas-related static functions from SF_Utils.php into a new 
file, SF_PageSchemas.php

Modified Paths:
--
trunk/extensions/SemanticForms/SemanticForms.php
trunk/extensions/SemanticForms/includes/SF_Utils.php

Added Paths:
---
trunk/extensions/SemanticForms/includes/SF_PageSchemas.php

Modified: trunk/extensions/SemanticForms/SemanticForms.php
===
--- trunk/extensions/SemanticForms/SemanticForms.php2011-09-16 21:14:49 UTC 
(rev 97336)
+++ trunk/extensions/SemanticForms/SemanticForms.php2011-09-16 21:18:36 UTC 
(rev 97337)
@@ -92,15 +92,14 @@
 $wgHooks['MakeGlobalVariablesScript'][] = 'SFFormUtils::setGlobalJSVariables';
 
 // Page Schemas extension hooks
-$wgHooks['PageSchemasGetObject'][] = 'SFUtils::createPageSchemasObject' ;
-$wgHooks['PageSchemasGeneratePages'][] = 'SFUtils::generatePages' ;
-$wgHooks['PSParseFieldElements'][] = 'SFUtils::parseFieldElements' ;
-$wgHooks['PageSchemasGetPageList'][] = 'SFUtils::getPageList' ; 
-$wgHooks['PageSchemasGetSchemaHTML'][] = 'SFUtils::getSchemaHTMLForPS' ;
-$wgHooks['PageSchemasGetFieldHTML'][] = 'SFUtils::getFieldHTMLForPS' ;
-$wgHooks['PageSchemasGetSchemaXML'][] = 'SFUtils::getSchemaXMLForPS';
-$wgHooks['PageSchemasGetFieldXML'][] = 'SFUtils::getFieldXMLForPS';
-//$wgHooks['getFilledHtmlTextForFieldInputs'][] = 
'SFUtils::getFilledHtmlTextForPS' ;
+$wgHooks['PageSchemasGetObject'][] = 'SFPageSchemas::createPageSchemasObject' ;
+$wgHooks['PageSchemasGeneratePages'][] = 'SFPageSchemas::generatePages' ;
+$wgHooks['PSParseFieldElements'][] = 'SFPageSchemas::parseFieldElements' ;
+$wgHooks['PageSchemasGetPageList'][] = 'SFPageSchemas::getPageList' ; 
+$wgHooks['PageSchemasGetSchemaHTML'][] = 'SFPageSchemas::getSchemaHTML' ;
+$wgHooks['PageSchemasGetFieldHTML'][] = 'SFPageSchemas::getFieldHTML' ;
+$wgHooks['PageSchemasGetSchemaXML'][] = 'SFPageSchemas::getSchemaXML';
+$wgHooks['PageSchemasGetFieldXML'][] = 'SFPageSchemas::getFieldXML';
 
 $wgAPIModules['sfautocomplete'] = 'SFAutocompleteAPI';
 $wgAPIModules['sfautoedit'] = 'SFAutoeditAPI';
@@ -154,6 +153,7 @@
 $wgAutoloadClasses['SFFormEditPage'] = $sfgIP . 
'/includes/SF_FormEditPage.php';
 $wgAutoloadClasses['SFUtils'] = $sfgIP . '/includes/SF_Utils.php';
 $wgAutoloadClasses['SFFormLinker'] = $sfgIP . '/includes/SF_FormLinker.php';
+$wgAutoloadClasses['SFPageSchemas'] = $sfgIP . '/includes/SF_PageSchemas.php';
 $wgAutoloadClasses['SFParserFunctions'] = $sfgIP . 
'/includes/SF_ParserFunctions.php';
 $wgAutoloadClasses['SFAutocompleteAPI'] = $sfgIP . 
'/includes/SF_AutocompleteAPI.php';
 $wgAutoloadClasses['SFAutoeditAPI'] = $sfgIP . '/includes/SF_AutoeditAPI.php';

Added: trunk/extensions/SemanticForms/includes/SF_PageSchemas.php
===
--- trunk/extensions/SemanticForms/includes/SF_PageSchemas.php  
(rev 0)
+++ trunk/extensions/SemanticForms/includes/SF_PageSchemas.php  2011-09-16 
21:18:36 UTC (rev 97337)
@@ -0,0 +1,375 @@
+?php
+/**
+ * Static functions for Semantic Forms, for use by the Page Schemas extension.
+ *
+ * @author Yaron Koren
+ * @author Ankit Garg
+ * @file
+ * @ingroup SF
+ */
+
+class SFPageSchemas {
+
+   /**
+* Function to return the property based on the XML passed from the 
Page Schemas extension
+*/
+   public static function createPageSchemasObject( $objectName, 
$xmlForField, $object ) {
+   $sfarray = array();
+   $formName=;
+   if ( $objectName == semanticforms_Form ) {
+   foreach ( $xmlForField-children() as $tag = $child ) {
+   if ( $tag == $objectName ) {
+   $formName = (string) 
$child-attributes()-name;
+   $sfarray['name'] = $formName;
+   foreach ($child-children() as $tag = 
$formelem) {
+   $sfarray[(string)$tag] = 
(string)$formelem;
+   }
+   $object['sf'] = $sfarray;
+   return true;
+   }
+   }
+   }
+   if ( $objectName == semanticforms_FormInput ) {
+   foreach ( $xmlForField-children() as $tag = $child ) {
+   if ( $tag == $objectName ) {
+   foreach ( $child-children() as $prop ) 
{
+   if ( $prop-getName() == 
'InputType' ) {
+   
$sfarray[$prop-getName()] = (string)$prop;
+

[MediaWiki-CVS] SVN: [97338] trunk/tools/ToolserverI18N/TsIntuition.php

2011-09-16 Thread platonides
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97338

Revision: 97338
Author:   platonides
Date: 2011-09-16 21:41:33 + (Fri, 16 Sep 2011)
Log Message:
---
Classical usage pattern for a ifsetor.
Don't produce a warning if there's no language file for this domain.

Modified Paths:
--
trunk/tools/ToolserverI18N/TsIntuition.php

Modified: trunk/tools/ToolserverI18N/TsIntuition.php
===
--- trunk/tools/ToolserverI18N/TsIntuition.php  2011-09-16 21:18:36 UTC (rev 
97337)
+++ trunk/tools/ToolserverI18N/TsIntuition.php  2011-09-16 21:41:33 UTC (rev 
97338)
@@ -626,7 +626,7 @@
if ( $domain === false )
$domain = $this-getDomain();

-   $from = $this-messageBlob[$domain];
+   $from = isset( $this-messageBlob[$domain] ) ? 
$this-messageBlob[$domain] : array();
}

$return = array();


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


[MediaWiki-CVS] SVN: [97339] trunk

2011-09-16 Thread reedy
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97339

Revision: 97339
Author:   reedy
Date: 2011-09-16 21:50:30 + (Fri, 16 Sep 2011)
Log Message:
---
Code cleanup

Add README

Fix php4 style constructor in backup.inc

Modified Paths:
--
trunk/extensions/ActiveAbstract/AbstractFilter.php
trunk/phase3/maintenance/backup.inc

Added Paths:
---
trunk/extensions/ActiveAbstract/README

Modified: trunk/extensions/ActiveAbstract/AbstractFilter.php
===
--- trunk/extensions/ActiveAbstract/AbstractFilter.php  2011-09-16 21:41:33 UTC 
(rev 97338)
+++ trunk/extensions/ActiveAbstract/AbstractFilter.php  2011-09-16 21:50:30 UTC 
(rev 97339)
@@ -22,7 +22,6 @@
/**
 * Register the filter function with the dump manager
 * @param BackupDumper $dumper
-* @static
 */
function register( $dumper ) {
$dumper-registerFilter( 'abstract', 'AbstractFilter' );
@@ -237,11 +236,10 @@
__METHOD__ );
 
$links = array();
-   while ( $row = $dbr-fetchObject( $result ) ) {
+   foreach( $result as $row ) {
$category = Title::makeTitle( NS_CATEGORY, $row-cl_to 
);
$links[$category-getText()] = 
$category-getCanonicalUrl();
}
-   $dbr-freeResult( $result );
 
return $links;
}

Added: trunk/extensions/ActiveAbstract/README
===
--- trunk/extensions/ActiveAbstract/README  (rev 0)
+++ trunk/extensions/ActiveAbstract/README  2011-09-16 21:50:30 UTC (rev 
97339)
@@ -0,0 +1 @@
+This extension is a plugin for dumpBackup
\ No newline at end of file


Property changes on: trunk/extensions/ActiveAbstract/README
___
Added: svn:eol-style
   + native

Modified: trunk/phase3/maintenance/backup.inc
===
--- trunk/phase3/maintenance/backup.inc 2011-09-16 21:41:33 UTC (rev 97338)
+++ trunk/phase3/maintenance/backup.inc 2011-09-16 21:50:30 UTC (rev 97339)
@@ -56,7 +56,14 @@
var $revCountLast = 0;
var $ID = 0;
 
-   function BackupDumper( $args ) {
+   var $outputTypes = array(), $filterTypes = array();
+
+   /**
+* @var LoadBalancer
+*/
+   protected $lb;
+
+   function __construct( $args ) {
$this-stderr = fopen( php://stderr, wt );
 
// Built-in output and filter plugins


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


[MediaWiki-CVS] SVN: [97340] trunk

2011-09-16 Thread reedy
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97340

Revision: 97340
Author:   reedy
Date: 2011-09-16 21:54:35 + (Fri, 16 Sep 2011)
Log Message:
---
Fix another old constructor

Documentation

Modified Paths:
--
trunk/extensions/ActiveAbstract/AbstractFilter.php
trunk/extensions/ActiveAbstract/GoogleCoopFilter.php
trunk/phase3/maintenance/backup.inc

Modified: trunk/extensions/ActiveAbstract/AbstractFilter.php
===
--- trunk/extensions/ActiveAbstract/AbstractFilter.php  2011-09-16 21:50:30 UTC 
(rev 97339)
+++ trunk/extensions/ActiveAbstract/AbstractFilter.php  2011-09-16 21:54:35 UTC 
(rev 97340)
@@ -28,6 +28,10 @@
$dumper-registerFilter( 'noredirect', 'NoredirectFilter' );
}
 
+   /**
+* @param $sink ExportProgressFilter
+* @param $params string
+*/
function __construct( $sink, $params = '' ) {
$this-sink = $sink;
 
@@ -98,7 +102,6 @@
 * Extract an abstract from the page
 * @params object $rev Database rows with revision data
 * @return string
-* @access private
 */
function _abstract( $rev ) {
$text = Revision::getRevisionText( $rev ); // FIXME cache this
@@ -114,7 +117,6 @@
 * Convert text to the preferred output language variant, if set.
 * @param string $text
 * @return string
-* @access private
 */
function _variant( $text ) {
if ( $this-variant ) {
@@ -129,7 +131,6 @@
 * Strip markup to show plaintext
 * @param string $text
 * @return string
-* @access private
 */
function _stripMarkup( $text ) {
global $wgContLang;
@@ -166,7 +167,6 @@
 * Extract the first two sentences, if detectable, from the text.
 * @param string $text
 * @return string
-* @access private
 */
function _extractStart( $text ) {
$endchars = array(
@@ -196,7 +196,6 @@
 * Extract a list of TOC links
 * @param object $rev Database rows with revision data
 * @return array of URL strings, indexed by name/title
-* @access private
 *
 * @fixme extract TOC items properly
 * @fixme check for explicit __NOTOC__
@@ -225,7 +224,6 @@
 * Fetch the list of category links for this page
 * @param object $rev Database rows with revision data
 * @return array of URL strings, indexed by category name
-* @access private
 */
function _categoryLinks( $rev ) {
$id = $rev-page_id;
@@ -253,9 +251,8 @@
 *
 * @param string $url
 * @param string $anchor Human-readable link text; eg title or fragment
-* @param string $linktype nav or image
+* @param string $type nav or image
 * @return string XML fragment
-* @access private
 */
function _formatLink( $url, $anchor, $type ) {
$maxUrlLength = 1024; // as defined in Yahoo's .xsd
@@ -267,6 +264,12 @@
 }
 
 class NoredirectFilter extends DumpFilter {
+
+   /**
+* @param $page
+* @param $string
+* @return bool
+*/
function pass( $page, $string ) {
return !$page-page_is_redirect;
}

Modified: trunk/extensions/ActiveAbstract/GoogleCoopFilter.php
===
--- trunk/extensions/ActiveAbstract/GoogleCoopFilter.php2011-09-16 
21:50:30 UTC (rev 97339)
+++ trunk/extensions/ActiveAbstract/GoogleCoopFilter.php2011-09-16 
21:54:35 UTC (rev 97340)
@@ -48,6 +48,9 @@
parent::register( $dumper );
}
 
+   /**
+* @param $sink ExportProgressFilter
+*/
function __construct( $sink ) {
$this-sink = $sink;
}
@@ -115,6 +118,9 @@
 *
 * This code needs a cleanup, it became rather ugly after adding 
exception
 * handling :-(
+*
+* @param $str
+* @return array|string
 */
function _threeLines( $str ) {
$s = array();

Modified: trunk/phase3/maintenance/backup.inc
===
--- trunk/phase3/maintenance/backup.inc 2011-09-16 21:50:30 UTC (rev 97339)
+++ trunk/phase3/maintenance/backup.inc 2011-09-16 21:54:35 UTC (rev 97340)
@@ -337,7 +337,7 @@
 }
 
 class ExportProgressFilter extends DumpFilter {
-   function ExportProgressFilter( $sink, $progress ) {
+   function __construct( $sink, $progress ) {
parent::__construct( $sink );
$this-progress = $progress;
}


___
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org

  1   2   >