[MediaWiki-CVS] SVN: [93514] trunk/tools/mwmultiversion/multiversion/switchAllMediaWikis

2011-07-30 Thread aaron
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93514

Revision: 93514
Author:   aaron
Date: 2011-07-30 06:00:35 + (Sat, 30 Jul 2011)
Log Message:
---
Added some feedback and a dir sanity check

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

Modified: trunk/tools/mwmultiversion/multiversion/switchAllMediaWikis
===
--- trunk/tools/mwmultiversion/multiversion/switchAllMediaWikis 2011-07-30 
05:17:37 UTC (rev 93513)
+++ trunk/tools/mwmultiversion/multiversion/switchAllMediaWikis 2011-07-30 
06:00:35 UTC (rev 93514)
@@ -29,6 +29,10 @@
die( Usage: upgradeMediaWikis php-X.XX php-X.XX\n );
}
 
+   if ( !file_exists( $common/$newVersion ) ) {
+   die( The directory `$common/$newVersion` does not exist.\n );
+   }
+
$path = $common/wikiversions.dat;
$verList = array_filter( explode( \n, file_get_contents( $path ) ) );
if ( !count( $verList ) ) {
@@ -36,6 +40,7 @@
}
 
$datList = ;
+   $count = 0;
foreach ( $verList as $item ) {
$items = explode( ' ', $row );
# Existing values...
@@ -45,6 +50,7 @@
# Update this wiki?
if ( $version === $oldVersion || $oldVersion === 'all' ) {
$version = $newVersion; // switch!
+   $count++;
}
if ( $extVersion !== '' ) {
$datList .= {$dbName} {$version} {$extVersion}\n;
@@ -59,6 +65,8 @@
}
# Rebuild wikiversions.cdb...
shell_exec( cd $common/multiversion  ./refreshWikiversionsCDB );
+
+   echo Re-configured $count wiki(s) from $oldVersion to $newVersion.\n;
 }
 
 switchAllMediaWikis();


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


[MediaWiki-CVS] SVN: [93515] trunk/phase3/resources/mediawiki/mediawiki.js

2011-07-30 Thread krinkle
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93515

Revision: 93515
Author:   krinkle
Date: 2011-07-30 06:33:46 + (Sat, 30 Jul 2011)
Log Message:
---
mediawiki.js request() caching deep level object member access.
- Instead of requesting index 0 of dependancies-argument, and the value of that 
of the registry, and the dependancies object in that of which we read the 
length property is very deep. Even worse when doing that both in the head and 
in the body of a for()-loop.
- Instead caching reference access to dependancies object of the registry item.
- Plus a simple by-value of the length property 

Modified Paths:
--
trunk/phase3/resources/mediawiki/mediawiki.js

Modified: trunk/phase3/resources/mediawiki/mediawiki.js
===
--- trunk/phase3/resources/mediawiki/mediawiki.js   2011-07-30 06:00:35 UTC 
(rev 93514)
+++ trunk/phase3/resources/mediawiki/mediawiki.js   2011-07-30 06:33:46 UTC 
(rev 93515)
@@ -630,8 +630,12 @@
if ( typeof dependencies === 'string' ) {
dependencies = [dependencies];
if ( dependencies[0] in registry ) {
-   for ( var n = 0; n  
registry[dependencies[0]].dependencies.length; n++ ) {
-   
dependencies[dependencies.length] = registry[dependencies[0]].dependencies[n];
+   // Cache repetitively accessed deep 
level object member
+   var regItemDeps = 
registry[dependencies[0]].dependencies,
+   // Cache to avoid looped access to 
length property
+   regItemDepLen = regItemDeps.length;
+   for ( var n = 0; n  regItemDepLen; n++ 
) {
+   
dependencies[dependencies.length] = regItemDeps[n];
}
}
}


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


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

2011-07-30 Thread krinkle
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93516

Revision: 93516
Author:   krinkle
Date: 2011-07-30 07:38:01 + (Sat, 30 Jul 2011)
Log Message:
---
Adding unit test for bug 27427. Currently broken. Fix (provided by Michael M. 
through BugZilla) will be committed afterwards.

* (bug 27427) mw.util.getParamValue shouldn't return value from hash even if 
param is only present in hash

Modified Paths:
--
trunk/phase3/CREDITS
trunk/phase3/tests/qunit/suites/resources/mediawiki/mediawiki.util.js

Modified: trunk/phase3/CREDITS
===
--- trunk/phase3/CREDITS2011-07-30 06:33:46 UTC (rev 93515)
+++ trunk/phase3/CREDITS2011-07-30 07:38:01 UTC (rev 93516)
@@ -122,6 +122,7 @@
 * Max Sikström
 * Michael Dale
 * Michael De La Rue
+* Michael M.
 * Michael Walsh
 * Mike Horvath
 * Mormegil

Modified: trunk/phase3/tests/qunit/suites/resources/mediawiki/mediawiki.util.js
===
--- trunk/phase3/tests/qunit/suites/resources/mediawiki/mediawiki.util.js   
2011-07-30 06:33:46 UTC (rev 93515)
+++ trunk/phase3/tests/qunit/suites/resources/mediawiki/mediawiki.util.js   
2011-07-30 07:38:01 UTC (rev 93516)
@@ -107,12 +107,15 @@
 });
 
 test( 'getParamValue', function() {
-   expect(2);
+   expect(3);
 
-   var url = 'http://mediawiki.org/?foo=wrongfoo=right#foo=bad';
+   var url1 = 'http://mediawiki.org/?foo=wrongfoo=right#foo=bad';
 
-   equal( mw.util.getParamValue( 'foo', url ), 'right', 'Use latest one, 
ignore hash' );
-   strictEqual( mw.util.getParamValue( 'bar', url ), null, 'Return null 
when not found' );
+   equal( mw.util.getParamValue( 'foo', url1 ), 'right', 'Use latest one, 
ignore hash' );
+   strictEqual( mw.util.getParamValue( 'bar', url1 ), null, 'Return null 
when not found' );
+
+   var url2 = 'http://mediawiki.org/#foo=bad';
+   strictEqual( mw.util.getParamValue( 'foo', url2 ), null, 'Ignore hash 
if param is not in querystring but in hash (bug 27427)' );
 });
 
 test( 'tooltipAccessKey', function() {


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


[MediaWiki-CVS] SVN: [93517] trunk/phase3/resources/mediawiki/mediawiki.util.js

2011-07-30 Thread krinkle
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93517

Revision: 93517
Author:   krinkle
Date: 2011-07-30 07:39:01 + (Sat, 30 Jul 2011)
Log Message:
---
Adding fix for bug 27427. Fixes unit test. Patch provided by Michael M. through 
BugZilla.

* (bug 27427) mw.util.getParamValue shouldn't return value from hash even if 
param is only present in hash.

(Follows-up r93516)

Modified Paths:
--
trunk/phase3/resources/mediawiki/mediawiki.util.js

Modified: trunk/phase3/resources/mediawiki/mediawiki.util.js
===
--- trunk/phase3/resources/mediawiki/mediawiki.util.js  2011-07-30 07:38:01 UTC 
(rev 93516)
+++ trunk/phase3/resources/mediawiki/mediawiki.util.js  2011-07-30 07:39:01 UTC 
(rev 93517)
@@ -223,7 +223,7 @@
'getParamValue' : function( param, url ) {
url = url ? url : document.location.href;
// Get last match, stop at hash
-   var re = new RegExp( '[^#]*[?]' + $.escapeRE( param ) 
+ '=([^#]*)' );
+   var re = new RegExp( '^[^#]*[?]' + $.escapeRE( param ) 
+ '=([^#]*)' );
var m = re.exec( url );
if ( m  m.length  1 ) {
return decodeURIComponent( m[1] );


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


[MediaWiki-CVS] SVN: [93518] trunk/phase3/RELEASE-NOTES-1.18

2011-07-30 Thread krinkle
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93518

Revision: 93518
Author:   krinkle
Date: 2011-07-30 07:41:57 + (Sat, 30 Jul 2011)
Log Message:
---
Release-notes for r93517

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

Modified: trunk/phase3/RELEASE-NOTES-1.18
===
--- trunk/phase3/RELEASE-NOTES-1.18 2011-07-30 07:39:01 UTC (rev 93517)
+++ trunk/phase3/RELEASE-NOTES-1.18 2011-07-30 07:41:57 UTC (rev 93518)
@@ -428,7 +428,9 @@
   to the FCKEditor extension.
 * (bug 28762) Resizing to specified height broken for very thin images
 * (bug 29959) Installer fatal when cURL and allow_url_fopen is disabled and 
user
-  tries to subsribe to mediawiki-announce
+  tries to subsribe to mediawiki-announce.
+* (bug 27427) mw.util.getParamValue shouldn't return value from hash even if
+  param is only present in hash.
 
 === API changes in 1.18 ===
 * BREAKING CHANGE: action=watch now requires POST and token.


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


[MediaWiki-CVS] SVN: [93519] trunk/phase3/tests/qunit/suites/resources/mediawiki/mediawiki. Title.js

2011-07-30 Thread krinkle
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93519

Revision: 93519
Author:   krinkle
Date: 2011-07-30 08:08:24 + (Sat, 30 Jul 2011)
Log Message:
---
Increasing coverage of mw.Title with unit tests.

* QUnit Completeness Test ?\226?\128?\147 Before:
Title.prototype.getNamespaceId
Title.prototype.getPrefixedText
Title.prototype.getExtension
Title.prototype.setNameAndExtension
Title.prototype.getUrl
Title.prototype.exists

* QUnit Completeness Test ?\226?\128?\147 After:
Title.prototype.getNamespaceId
Title.prototype.getPrefixedText
Title.prototype.getExtension

Modified Paths:
--
trunk/phase3/tests/qunit/suites/resources/mediawiki/mediawiki.Title.js

Modified: trunk/phase3/tests/qunit/suites/resources/mediawiki/mediawiki.Title.js
===
--- trunk/phase3/tests/qunit/suites/resources/mediawiki/mediawiki.Title.js  
2011-07-30 07:41:57 UTC (rev 93518)
+++ trunk/phase3/tests/qunit/suites/resources/mediawiki/mediawiki.Title.js  
2011-07-30 08:08:24 UTC (rev 93519)
@@ -134,3 +134,63 @@
title.setNamespace( 'Entirely Unknown' );
});
 });
+
+test( 'Case-sensivity', function() {
+   expect(3);
+   _titleConfig();
+
+   var title;
+
+   // Default config
+   mw.config.set( 'wgCaseSensitiveNamespaces', [] );
+
+   title = new mw.Title( 'article' );
+   equal( title.toString(), 'Article', 'Default config: No sensitive 
namespaces by default. First-letter becomes uppercase' );
+
+   // $wgCapitalLinks = false;
+   mw.config.set( 'wgCaseSensitiveNamespaces', [0, -2, 1, 4, 5, 6, 7, 10, 
11, 12, 13, 14, 15] );
+
+   title = new mw.Title( 'article' );
+   equal( title.toString(), 'article', '$wgCapitalLinks=false: Article 
namespace is sensitive, first-letter case stays lowercase' );
+
+   title = new mw.Title( 'john', 2 );
+   equal( title.toString(), 'User:John', '$wgCapitalLinks=false: User 
namespace is insensitive, first-letter becomes uppercase' );
+});
+
+test( 'Exists', function() {
+   expect(3);
+   _titleConfig();
+
+   var title;
+
+   // Empty registry, checks default to null
+
+   title = new mw.Title( 'Some random page', 4 );
+   strictEqual( title.exists(), null, 'Return null with empty existance 
registry' );
+
+   // Basic registry, checks default to boolean
+   mw.Title.exist.set( ['Does_exist', 'User_talk:NeilK', 
'Wikipedia:Sandbox_rules'], true );
+   mw.Title.exist.set( ['Does_not_exist', 'User:John', 'Foobar'], false );
+
+   title = new mw.Title( 'Project:Sandbox rules' );
+   assertTrue( title.exists(), 'Return true for page titles marked as 
existing' );
+   title = new mw.Title( 'Foobar' );
+   assertFalse( title.exists(), 'Return false for page titles marked as 
inexisting' );
+
+});
+
+test( 'Url', function() {
+   expect(2);
+   _titleConfig();
+
+   var title;
+
+   // Config
+   mw.config.set( 'wgArticlePath', '/wiki/$1' );
+
+   title = new mw.Title( 'Foobar' );
+   equal( title.getUrl(), '/wiki/Foobar', 'Basic functionally, toString 
passing to wikiGetlink' );
+
+   title = new mw.Title( 'John Doe', 3 );
+   equal( title.getUrl(), '/wiki/User_talk:John_Doe', 'Escaping in title 
and namespace for urls' );
+});
\ 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: [93521] branches/REL1_18/phase3

2011-07-30 Thread maxsem
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93521

Revision: 93521
Author:   maxsem
Date: 2011-07-30 10:17:15 + (Sat, 30 Jul 2011)
Log Message:
---
MFT r93520 to 1.18: Installer checked for magic_quotes_runtime instead of 
register_globals

Modified Paths:
--
branches/REL1_18/phase3/RELEASE-NOTES-1.18
branches/REL1_18/phase3/includes/installer/Installer.php

Property Changed:

branches/REL1_18/phase3/


Property changes on: branches/REL1_18/phase3
___
Modified: svn:mergeinfo
   - /branches/REL1_15/phase3:51646
/branches/REL1_17/phase3:81445,81448
/branches/new-installer/phase3:43664-66004
/branches/sqlite:58211-58321
/trunk/phase3:92634,92762,92791,92854,92958,93141,93303
   + /branches/REL1_15/phase3:51646
/branches/REL1_17/phase3:81445,81448
/branches/new-installer/phase3:43664-66004
/branches/sqlite:58211-58321
/trunk/phase3:92634,92762,92791,92854,92958,93141,93303,93520

Modified: branches/REL1_18/phase3/RELEASE-NOTES-1.18
===
--- branches/REL1_18/phase3/RELEASE-NOTES-1.18  2011-07-30 09:52:10 UTC (rev 
93520)
+++ branches/REL1_18/phase3/RELEASE-NOTES-1.18  2011-07-30 10:17:15 UTC (rev 
93521)
@@ -420,6 +420,7 @@
 * (bug 28762) Resizing to specified height broken for very thin images
 * (bug 29959) Installer fatal when cURL and allow_url_fopen is disabled and 
user
   tries to subsribe to mediawiki-announce
+* Installer checked for magic_quotes_runtime instead of register_globals.
 
 === API changes in 1.18 ===
 * BREAKING CHANGE: action=watch now requires POST and token.

Modified: branches/REL1_18/phase3/includes/installer/Installer.php
===
--- branches/REL1_18/phase3/includes/installer/Installer.php2011-07-30 
09:52:10 UTC (rev 93520)
+++ branches/REL1_18/phase3/includes/installer/Installer.php2011-07-30 
10:17:15 UTC (rev 93521)
@@ -652,7 +652,7 @@
 * Environment check for register_globals.
 */
protected function envCheckRegisterGlobals() {
-   if( wfIniGetBool( magic_quotes_runtime ) ) {
+   if( wfIniGetBool( 'register_globals' ) ) {
$this-showMessage( 'config-register-globals' );
}
}


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


[MediaWiki-CVS] SVN: [93522] branches/REL1_17/phase3

2011-07-30 Thread maxsem
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93522

Revision: 93522
Author:   maxsem
Date: 2011-07-30 10:20:12 + (Sat, 30 Jul 2011)
Log Message:
---
MFT r93520 to 1.17: Installer checked for magic_quotes_runtime instead of 
register_globals

Modified Paths:
--
branches/REL1_17/phase3/RELEASE-NOTES
branches/REL1_17/phase3/includes/installer/Installer.php

Modified: branches/REL1_17/phase3/RELEASE-NOTES
===
--- branches/REL1_17/phase3/RELEASE-NOTES   2011-07-30 10:17:15 UTC (rev 
93521)
+++ branches/REL1_17/phase3/RELEASE-NOTES   2011-07-30 10:20:12 UTC (rev 
93522)
@@ -48,7 +48,8 @@
   multiple dots, was broken by the fix for bug 28840.
 * In the maintenance script purgeList.php, fixed a fatal error when a page 
   title is given, instead of a URL.
- * (bug 19514) Unordered list list-style-image should be IE6-compatible (8-bit)
+* (bug 19514) Unordered list list-style-image should be IE6-compatible (8-bit).
+* Installer checked for magic_quotes_runtime instead of register_globals.
 
 === Changes since 1.17.0rc1 ===
 

Modified: branches/REL1_17/phase3/includes/installer/Installer.php
===
--- branches/REL1_17/phase3/includes/installer/Installer.php2011-07-30 
10:17:15 UTC (rev 93521)
+++ branches/REL1_17/phase3/includes/installer/Installer.php2011-07-30 
10:20:12 UTC (rev 93522)
@@ -643,7 +643,7 @@
 * Environment check for register_globals.
 */
protected function envCheckRegisterGlobals() {
-   if( wfIniGetBool( magic_quotes_runtime ) ) {
+   if( wfIniGetBool( 'register_globals' ) ) {
$this-showMessage( 'config-register-globals' );
}
}


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


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

2011-07-30 Thread ashley
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93523

Revision: 93523
Author:   ashley
Date: 2011-07-30 13:55:27 + (Sat, 30 Jul 2011)
Log Message:
---
Automatic Board Welcome extension -- automatically posts a welcome message on 
new users' user boards on account creation.
The message is sent by a randomly-chosen administrator (one who is a member of 
the 'sysop' group), who is not blocked.
Requires SocialProfile, obviously.

Added Paths:
---
trunk/extensions/AutomaticBoardWelcome/
trunk/extensions/AutomaticBoardWelcome/AutomaticBoardWelcome.php

Added: trunk/extensions/AutomaticBoardWelcome/AutomaticBoardWelcome.php
===
--- trunk/extensions/AutomaticBoardWelcome/AutomaticBoardWelcome.php
(rev 0)
+++ trunk/extensions/AutomaticBoardWelcome/AutomaticBoardWelcome.php
2011-07-30 13:55:27 UTC (rev 93523)
@@ -0,0 +1,84 @@
+?php
+/**
+ * Automatic Board Welcome -- automatically posts a welcome message on new
+ * users' user boards on account creation.
+ * The message is sent by a randomly-chosen administrator (one who is a member
+ * of the 'sysop' group).
+ *
+ * @file
+ * @ingroup Extensions
+ * @version 0.1
+ * @date 20 July 2011
+ * @author Jack Phoenix j...@countervandalism.net
+ * @license http://en.wikipedia.org/wiki/Public_domain Public domain
+ */
+if ( !defined( 'MEDIAWIKI' ) ) {
+   die( 'This is not a valid entry point to MediaWiki.' );
+}
+
+// Extension credits that will show up on Special:Version
+$wgExtensionCredits['other'][] = array(
+   'name' = 'Automatic Board Welcome',
+   'version' = '0.1',
+   'author' = 'Jack Phoenix',
+   'description' = 'Automatically posts 
[[MediaWiki:User-board-welcome-message|a welcome message]] on new users\' user 
boards after account creation',
+   'url' = 
'http://www.mediawiki.org/wiki/Extension:Automatic_Board_Welcome',
+);
+
+$wgHooks['AddNewAccount'][] = 'wfSendUserBoardMessageOnRegistration';
+/**
+ * Send the message if the UserBoard class exists (duh!) and the welcome
+ * message has some content.
+ *
+ * @param $user User: the new User object being created
+ * @param $byEmail Boolean: true if the account was created by e-mail
+ * @return Boolean: true
+ */
+function wfSendUserBoardMessageOnRegistration( $user, $byEmail ) {
+   if ( class_exists( 'UserBoard' )  $user instanceof User ) {
+   $message = trim( wfMsgForContent( 'user-board-welcome-message' 
) );
+
+   // If the welcome message is empty, short-circuit right away.
+   if( wfEmptyMsg( 'user-board-welcome-message', $message ) ) {
+   return true;
+   }
+
+   $dbr = wfGetDB( DB_SLAVE );
+   // Get all users who are in the 'sysop' group from the database
+   $res = $dbr-select(
+   'user_groups',
+   array( 'ug_group', 'ug_user' ),
+   array( 'ug_group' = 'sysop' ),
+   __METHOD__
+   );
+
+   $adminUids = array();
+   foreach ( $res as $row ) {
+   $adminUids[] = $row-ug_user;
+   }
+
+   // Pick one UID from the array of admin user IDs
+   $random = array_rand( array_flip( $adminUids ), 1 );
+   $sender = User::newFromId( $random );
+
+   // Ignore blocked users who have +sysop and only send out the 
message
+   // when we can, i.e. when the DB is *not* locked
+   if ( !$sender-isBlocked()  !wfReadOnly() ) {
+   $senderUid = $sender-getId();
+   $senderName = $sender-getName();
+
+   $b = new UserBoard();
+   $b-sendBoardMessage(
+   $senderUid, // sender's UID
+   $senderName, // sender's name
+   $user-getId(),
+   $user-getName(),
+   // passing the senderName as an argument here 
so that we can do
+   // stuff like [[User talk:$1|contact me]] or 
w/e in the message
+   wfMsgForContent( 'user-board-welcome-message', 
$senderName )
+   // the final argument is message type: 0 
(default) for public
+   );
+   }
+   }
+   return true;
+}
\ No newline at end of file


Property changes on: 
trunk/extensions/AutomaticBoardWelcome/AutomaticBoardWelcome.php
___
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: [93524] trunk/extensions/MobileFrontend

2011-07-30 Thread hartman
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93524

Revision: 93524
Author:   hartman
Date: 2011-07-30 14:27:42 + (Sat, 30 Jul 2011)
Log Message:
---
* Fix content-type response header for wml
* Fix content-type in wml head
* Fix an issue where the card index for wml was not wrapped in p
* Make some notes about things we should and could do in the future.

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

Modified: trunk/extensions/MobileFrontend/DeviceDetection.php
===
--- trunk/extensions/MobileFrontend/DeviceDetection.php 2011-07-30 13:55:27 UTC 
(rev 93523)
+++ trunk/extensions/MobileFrontend/DeviceDetection.php 2011-07-30 14:27:42 UTC 
(rev 93524)
@@ -364,6 +364,7 @@

if ( $formatName === '' ) {
if ( strpos( $acceptHeader, 
'application/vnd.wap.xhtml+xml' ) !== false ) {
+   // Should be wap2 or in WURFL xhtmlmp
$formatName = 'html';
} elseif ( strpos( $acceptHeader, 'vnd.wap.wml' ) !== 
false ) {
$formatName = 'wml';
@@ -373,4 +374,4 @@
}
return $formatName;
}
-}
\ No newline at end of file
+}

Modified: trunk/extensions/MobileFrontend/MobileFrontend.php
===
--- trunk/extensions/MobileFrontend/MobileFrontend.php  2011-07-30 13:55:27 UTC 
(rev 93523)
+++ trunk/extensions/MobileFrontend/MobileFrontend.php  2011-07-30 14:27:42 UTC 
(rev 93524)
@@ -218,6 +218,29 @@
//  ob_start( array( $this, 'DOMParse' ) );
// }
 
+   // WURFL documentation: 
http://wurfl.sourceforge.net/help_doc.php
+   // Determine the kind of markup
+   if( is_array($props)  $props['preferred_markup'] ) {
+   wfDebug( __METHOD__ . : preferred markup for this 
device:  . $props['preferred_markup'] );
+   // xhtml/html: html_web_3_2, html_web_4_0
+   // xthml basic/xhtmlmp (wap 2.0): html_wi_w3_xhtmlbasic 
html_wi_oma_xhtmlmp_1_0
+   // chtml (imode): html_wi_imode_*
+   // wml (wap 1): wml_1_1, wml_1_2, wml_1_3
+   }
+   // WML options that might influence our 'style' of output
+   // $props['access_key_support'] (for creating easy keypad 
navigation)
+   // $props['softkey_support'] ( for creating your own menu)
+
+   // WAP2/XHTML MP
+   // xhtmlmp_preferred_mime_type ( the mime type with which you 
should serve your xhtml to this device
+
+   // HTML
+   // $props['pointing_method'] == touchscreen
+   // ajax_support_javascript
+   // html_preferred_dtd
+
+   // Determine  
+
if (self::$useFormat === 'mobile' ||
self::$useFormat === 'mobile-wap' ) {
$this-disableCaching();
@@ -340,7 +363,7 @@
$card .= card id='{$idx}' 
title='{$title}'p{$segments[$requestedSegment]}/p;
$idx = $requestedSegment + 1;
$segmentsCount = count($segments);
-   $card .= $idx . / . $segmentsCount;
+   $card .= p . $idx . / . $segmentsCount . /p;
 
$useFormatParam = ( isset( self::$useFormat ) ) ? '' . 
'useFormat=' . self::$useFormat : '';
 
@@ -489,7 +512,18 @@
 empty( self::$search ) ) {
$contentHtml =  $this-javascriptize( $contentHtml );
} elseif ( $this-contentFormat == 'WML' ) {
-   $contentHtml = $this-javascriptize( $contentHtml );
+   header( 'Content-Type: text/vnd.wap.wml' );
+
+   // TODO: Content transformations required
+   // WML Validator:
+   // http://validator.w3.org
+   // 
+   // div - p
+   // no style, no class, no h1-h6, sup, sub, ol, ul, li 
etc.
+   // table requires columns property
+   // lang and dir officially unsupported (but often work 
on rtl phones)
+
+   // Content wrapping
$contentHtml = $this-createWMLCard( $contentHtml, 
$title );
require( 'views/layout/application.wml.php' );
}

Modified: trunk/extensions/MobileFrontend/views/layout/application.wml.php
===
--- trunk/extensions/MobileFrontend/views/layout/application.wml.php
2011-07-30 

[MediaWiki-CVS] SVN: [93526] trunk/extensions/MobileFrontend

2011-07-30 Thread reedy
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93526

Revision: 93526
Author:   reedy
Date: 2011-07-30 15:02:56 + (Sat, 30 Jul 2011)
Log Message:
---
Move hard coded message mobile view into MobileFrontend.i18n.php

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

Modified: trunk/extensions/MobileFrontend/MobileFrontend.i18n.php
===
--- trunk/extensions/MobileFrontend/MobileFrontend.i18n.php 2011-07-30 
14:59:11 UTC (rev 93525)
+++ trunk/extensions/MobileFrontend/MobileFrontend.i18n.php 2011-07-30 
15:02:56 UTC (rev 93526)
@@ -43,6 +43,7 @@
'mobile-frontend-author-link' = 'View this media file on regular 
Wikipedia to see information about authorship, licensing, and additional 
descriptions.',
'mobile-frontend-download-full-version' = 'Download full version',
'mobile-frontend-file-namespace' = 'File',
+   'mobile-frontend-view' = 'Mobile View',
 );
 
 /** Moroccan Spoken Arabic (Maġribi) */

Modified: trunk/extensions/MobileFrontend/MobileFrontend.php
===
--- trunk/extensions/MobileFrontend/MobileFrontend.php  2011-07-30 14:59:11 UTC 
(rev 93525)
+++ trunk/extensions/MobileFrontend/MobileFrontend.php  2011-07-30 15:02:56 UTC 
(rev 93526)
@@ -111,7 +111,7 @@
$delimiter = ( strpos( $mobileViewUrl, ? ) !== false ) ?  
: ?;
$mobileViewUrl .= $delimiter . 'useFormat=mobile';
 
-   $tpl-set('mobileview', a href='{$mobileViewUrl}'Mobile 
View/a);
+   $tpl-set('mobileview', a href='{$mobileViewUrl}'{wfMsg( 
'mobile-frontend-view' )}/a);
$footerlinks['places'][] = 'mobileview';
$tpl-set('footerlinks', $footerlinks);
 
@@ -396,7 +396,7 @@
}
 
public function DOMParse( $html ) {
-   $html = mb_convert_encoding($html, 'HTML-ENTITIES', UTF-8);   
+   $html = mb_convert_encoding($html, 'HTML-ENTITIES', UTF-8);
libxml_use_internal_errors( true );
$this-doc = new DOMDocument();
$this-doc-loadHTML( '?xml encoding=UTF-8' . $html );


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


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

2011-07-30 Thread ialex
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93527

Revision: 93527
Author:   ialex
Date: 2011-07-30 15:03:21 + (Sat, 30 Jul 2011)
Log Message:
---
In Special:ComparePages:
* Validate title and revision when passed
* Don't display the diff if a field is not valid
* Pass the context to the HTMLForm and removed the setTitle() call

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

Modified: trunk/phase3/includes/specials/SpecialComparePages.php
===
--- trunk/phase3/includes/specials/SpecialComparePages.php  2011-07-30 
15:02:56 UTC (rev 93526)
+++ trunk/phase3/includes/specials/SpecialComparePages.php  2011-07-30 
15:03:21 UTC (rev 93527)
@@ -57,6 +57,7 @@
'label-message' = 'compare-page1',
'size' = '40',
'section' = 'page1',
+   'validation-callback' = array( $this, 
'checkExistingTitle' ),
),
'Revision1' = array(
'type' = 'int',
@@ -64,6 +65,7 @@
'label-message' = 'compare-rev1',
'size' = '8',
'section' = 'page1',
+   'validation-callback' = array( $this, 
'checkExistingRevision' ),
),
'Page2' = array(
'type' = 'text',
@@ -71,6 +73,7 @@
'label-message' = 'compare-page2',
'size' = '40',
'section' = 'page2',
+   'validation-callback' = array( $this, 
'checkExistingTitle' ),
),
'Revision2' = array(
'type' = 'int',
@@ -78,6 +81,7 @@
'label-message' = 'compare-rev2',
'size' = '8',
'section' = 'page2',
+   'validation-callback' = array( $this, 
'checkExistingRevision' ),
),
'Action' = array(
'type' = 'hidden',
@@ -87,16 +91,15 @@
'type' = 'hidden',
'name' = 'diffonly',
),
-   ), 'compare' );
+   ), $this-getContext(), 'compare' );
$form-setSubmitText( wfMsg( 'compare-submit' ) );
$form-suppressReset();
$form-setMethod( 'get' );
-   $form-setTitle( $this-getTitle() );
+   $form-setSubmitCallback( array( __CLASS__, 'showDiff' ) );
 
$form-loadData();
$form-displayForm( '' );
-
-   self::showDiff( $form-mFieldData );
+   $form-trySubmit();
}
 
public static function showDiff( $data ){
@@ -125,4 +128,29 @@
}
return null;
}
+
+   public function checkExistingTitle( $value, $alldata ) {
+   if ( $value === '' ) {
+   return true;
+   }
+   $title = Title::newFromText( $value );
+   if ( !$title instanceof Title ) {
+   return wfMsgExt( 'compare-invalid-title', 'parse' );
+   }
+   if ( !$title-exists() ) {
+   return wfMsgExt( 'compare-title-not-exists', 'parse' );
+   }
+   return true;
+   }
+
+   public function checkExistingRevision( $value, $alldata ) {
+   if ( $value === '' ) {
+   return true;
+   }
+   $revision = Revision::newFromId( $value );
+   if ( $revision === null ) {
+   return wfMsgExt( 'compare-revision-not-exists', 'parse' 
);
+   }
+   return true;
+   }
 }

Modified: trunk/phase3/languages/messages/MessagesEn.php
===
--- trunk/phase3/languages/messages/MessagesEn.php  2011-07-30 15:02:56 UTC 
(rev 93526)
+++ trunk/phase3/languages/messages/MessagesEn.php  2011-07-30 15:03:21 UTC 
(rev 93527)
@@ -4567,13 +4567,16 @@
 'tags-hitcount'   = '$1 {{PLURAL:$1|change|changes}}',
 
 # Special:ComparePages
-'comparepages' = 'Compare pages',
-'compare-selector' = 'Compare page revisions',
-'compare-page1'= 'Page 1',
-'compare-page2'= 'Page 2',
-'compare-rev1' = 'Revision 1',
-'compare-rev2' = 'Revision 2',
-'compare-submit'   = 'Compare',
+'comparepages'= 'Compare pages',

[MediaWiki-CVS] SVN: [93528] trunk/extensions/TitleBlacklist

2011-07-30 Thread ialex
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93528

Revision: 93528
Author:   ialex
Date: 2011-07-30 15:13:28 + (Sat, 30 Jul 2011)
Log Message:
---
Added TitleBlacklist::singleton() to get an instance of the TitleBlacklist 
instead of having to use $wgTitleBlacklist and call efInitTitleBlacklist()

Modified Paths:
--
trunk/extensions/TitleBlacklist/TitleBlacklist.hooks.php
trunk/extensions/TitleBlacklist/TitleBlacklist.list.php
trunk/extensions/TitleBlacklist/TitleBlacklist.php
trunk/extensions/TitleBlacklist/api/ApiQueryTitleBlacklist.php

Modified: trunk/extensions/TitleBlacklist/TitleBlacklist.hooks.php
===
--- trunk/extensions/TitleBlacklist/TitleBlacklist.hooks.php2011-07-30 
15:03:21 UTC (rev 93527)
+++ trunk/extensions/TitleBlacklist/TitleBlacklist.hooks.php2011-07-30 
15:13:28 UTC (rev 93528)
@@ -24,8 +24,6 @@
 * @return bool
 */
public static function userCan( $title, $user, $action, $result ) {
-   global $wgTitleBlacklist;
-
# Some places check createpage, while others check create.
# As it stands, upload does createpage, but normalize both
# to the same action, to stop future similar bugs.
@@ -33,8 +31,7 @@
$action = 'create';
}
if( $action == 'create' || $action == 'edit' || $action == 
'upload' ) {
-   efInitTitleBlacklist();
-   $blacklisted = $wgTitleBlacklist-userCannot( $title, 
$user, $action );
+   $blacklisted = TitleBlacklist::singleton()-userCannot( 
$title, $user, $action );
if( $blacklisted instanceof TitleBlacklistEntry ) {
$result = array( $blacklisted-getErrorMessage( 
'edit' ),
htmlspecialchars( 
$blacklisted-getRaw() ),
@@ -56,11 +53,10 @@
 * @return bool
 */
public static function abortMove( $old, $nt, $user, $err ) {
-   global $wgTitleBlacklist;
-   efInitTitleBlacklist();
-   $blacklisted = $wgTitleBlacklist-userCannot( $nt, $user, 
'move' );
+   $titleBlacklist = TitleBlacklist::singleton();
+   $blacklisted = $titleBlacklist-userCannot( $nt, $user, 'move' 
);
if( !$blacklisted ) {
-   $blacklisted = $wgTitleBlacklist-userCannot( $old, 
$user, 'edit' );
+   $blacklisted = $titleBlacklist-userCannot( $old, 
$user, 'edit' );
}
if( $blacklisted instanceof TitleBlacklistEntry ) {
$err = wfMsgWikiHtml( $blacklisted-getErrorMessage( 
'move' ),
@@ -81,10 +77,9 @@
 * @return bool Acceptable
 */
private static function acceptNewUserName( $userName, $err, $override 
= true ) {
-   global $wgTitleBlacklist, $wgUser;
-   efInitTitleBlacklist();
+   global $wgUser;
$title = Title::makeTitleSafe( NS_USER, $userName );
-   $blacklisted = $wgTitleBlacklist-userCannot( $title, $wgUser, 
'new-account', $override );
+   $blacklisted = TitleBlacklist::singleton()-userCannot( $title, 
$wgUser, 'new-account', $override );
if( $blacklisted instanceof TitleBlacklistEntry ) {
$message = $blacklisted-getErrorMessage( 'new-account' 
);
$err = wfMsgWikiHtml( $message, $blacklisted-getRaw(), 
$userName );
@@ -115,14 +110,14 @@
 * @param EditPage $editor
 */
public static function validateBlacklist( $editor, $text, $section, 
$error ) {
-   global $wgTitleBlacklist, $wgUser;
-   efInitTitleBlacklist();
+   global $wgUser;
$title = $editor-mTitle;
 
if( $title-getNamespace() == NS_MEDIAWIKI  
$title-getDBkey() == 'Titleblacklist' ) {
 
-   $bl = $wgTitleBlacklist-parseBlacklist( $text );
-   $ok = $wgTitleBlacklist-validate( $bl );
+   $blackList = TitleBlacklist::singleton();
+   $bl = $blackList-parseBlacklist( $text );
+   $ok = $blackList-validate( $bl );
if( count( $ok ) == 0 ) {
return true;
}
@@ -142,7 +137,7 @@
# Block redirects to nonexistent blacklisted titles
$retitle = Title::newFromRedirect( $text );
if( $retitle !== null  !$retitle-exists() )  {
-   $blacklisted = $wgTitleBlacklist-userCannot( 
$retitle, $wgUser, 'create' );
+   $blacklisted = 
TitleBlacklist::singleton()-userCannot( $retitle, $wgUser, 'create' );
 

[MediaWiki-CVS] SVN: [93529] branches/iwtransclusion/phase3v3/includes/parser/Parser.php

2011-07-30 Thread reedy
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93529

Revision: 93529
Author:   reedy
Date: 2011-07-30 15:14:25 + (Sat, 30 Jul 2011)
Log Message:
---
Seems a couple of functions got killed accidentally

Modified Paths:
--
branches/iwtransclusion/phase3v3/includes/parser/Parser.php

Modified: branches/iwtransclusion/phase3v3/includes/parser/Parser.php
===
--- branches/iwtransclusion/phase3v3/includes/parser/Parser.php 2011-07-30 
15:13:28 UTC (rev 93528)
+++ branches/iwtransclusion/phase3v3/includes/parser/Parser.php 2011-07-30 
15:14:25 UTC (rev 93529)
@@ -3523,6 +3523,50 @@
'deps' = $deps );
}
 
+   /**
+* Fetch a file and its title and register a reference to it.
+* @param Title $title
+* @param string $time MW timestamp
+* @param string $sha1 base 36 SHA-1
+* @return mixed File or false
+*/
+   function fetchFile( $title, $time = false, $sha1 = false ) {
+   $res = $this-fetchFileAndTitle( $title, $time, $sha1 );
+   return $res[0];
+   }
+
+   /**
+* Fetch a file and its title and register a reference to it.
+* @param Title $title
+* @param string $time MW timestamp
+* @param string $sha1 base 36 SHA-1
+* @return Array ( File or false, Title of file )
+*/
+   function fetchFileAndTitle( $title, $time = false, $sha1 = false ) {
+   if ( $time === '0' ) {
+   $file = false; // broken thumbnail forced by hook
+   } elseif ( $sha1 ) { // get by (sha1,timestamp)
+   $file = RepoGroup::singleton()-findFileFromKey( $sha1, 
array( 'time' = $time ) );
+   } else { // get by (name,timestamp)
+   $file = wfFindFile( $title, array( 'time' = $time ) );
+   }
+   $time = $file ? $file-getTimestamp() : false;
+   $sha1 = $file ? $file-getSha1() : false;
+   # Register the file as a dependency...
+   $this-mOutput-addImage( $title-getDBkey(), $time, $sha1 );
+   if ( $file  !$title-equals( $file-getTitle() ) ) {
+   # Update fetched file title
+   $title = $file-getTitle();
+   if ( is_null( $file-getRedirectedTitle() ) ) {
+   # This file was not a redirect, but the title 
does not match.
+   # Register under the new name because otherwise 
the link will
+   # get lost.
+   $this-mOutput-addImage( $title-getDBkey(), 
$time, $sha1 );
+   }
+   }
+   return array( $file, $title );
+   }
+
static function distantTemplateCallback( $title, $parser=false ) {
$text = '';
$rev_id = null;


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


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

2011-07-30 Thread reedy
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93531

Revision: 93531
Author:   reedy
Date: 2011-07-30 15:41:39 + (Sat, 30 Jul 2011)
Log Message:
---
Followup r93530

Fix SqliteUpdater

Fix Undefined index: globaltemplatelinks in LinksUpdate

Modified Paths:
--
trunk/phase3/includes/LinksUpdate.php
trunk/phase3/includes/installer/MysqlUpdater.php
trunk/phase3/includes/installer/SqliteUpdater.php

Modified: trunk/phase3/includes/LinksUpdate.php
===
--- trunk/phase3/includes/LinksUpdate.php   2011-07-30 15:30:01 UTC (rev 
93530)
+++ trunk/phase3/includes/LinksUpdate.php   2011-07-30 15:41:39 UTC (rev 
93531)
@@ -378,9 +378,15 @@
$this-mDb-delete( $table, $where, __METHOD__ );
}
if ( count( $insertions ) ) {
-   $this-mDb-insert( 'globaltemplatelinks', 
$insertions['globaltemplatelinks'], __METHOD__, 'IGNORE' );
-   $this-mDb-insert( 'globalnamespaces', 
$insertions['globalnamespaces'], __METHOD__, 'IGNORE' );
-   $this-mDb-insert( 'globalinterwiki', 
$insertions['globalinterwiki'], __METHOD__, 'IGNORE' );
+   if ( isset( $insertions['globaltemplatelinks'] ) ) {
+   $this-mDb-insert( 'globaltemplatelinks', 
$insertions['globaltemplatelinks'], __METHOD__, 'IGNORE' );
+   }
+   if ( isset( $insertions['globalnamespaces'] ) ) {
+   $this-mDb-insert( 'globalnamespaces', 
$insertions['globalnamespaces'], __METHOD__, 'IGNORE' );
+   }
+   if ( isset( $insertions['globalinterwiki'] ) ) {
+   $this-mDb-insert( 'globalinterwiki', 
$insertions['globalinterwiki'], __METHOD__, 'IGNORE' );
+   }
}
}
 

Modified: trunk/phase3/includes/installer/MysqlUpdater.php
===
--- trunk/phase3/includes/installer/MysqlUpdater.php2011-07-30 15:30:01 UTC 
(rev 93530)
+++ trunk/phase3/includes/installer/MysqlUpdater.php2011-07-30 15:41:39 UTC 
(rev 93531)
@@ -186,8 +186,6 @@
// 1.19
array( 'addTable', 'config',
'patch-config.sql' ),
array( 'addIndex', 'logging',   'type_action',  
'patch-logging-type-action-index.sql'),
-
-   // 1.19
array( 'addTable', 'globaltemplatelinks', 
'patch-globaltemplatelinks.sql' ),
array( 'addTable', 'globalnamespaces', 
'patch-globalnamespaces.sql' ),
array( 'addTable', 'globalinterwiki', 
'patch-globalinterwiki.sql' ),

Modified: trunk/phase3/includes/installer/SqliteUpdater.php
===
--- trunk/phase3/includes/installer/SqliteUpdater.php   2011-07-30 15:30:01 UTC 
(rev 93530)
+++ trunk/phase3/includes/installer/SqliteUpdater.php   2011-07-30 15:41:39 UTC 
(rev 93531)
@@ -63,6 +63,9 @@
// 1.19
array( 'addTable', 'config',
'patch-config.sql' ),
array( 'addIndex', 'logging',   'type_action',  
'patch-logging-type-action-index.sql'),
+   array( 'addTable', 'globaltemplatelinks', 
'patch-globaltemplatelinks.sql' ),
+   array( 'addTable', 'globalnamespaces', 
'patch-globalnamespaces.sql' ),
+   array( 'addTable', 'globalinterwiki', 
'patch-globalinterwiki.sql' ),
);
}
 


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


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

2011-07-30 Thread hartman
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93532

Revision: 93532
Author:   hartman
Date: 2011-07-30 15:43:52 + (Sat, 30 Jul 2011)
Log Message:
---
Rename javascriptize to headingTransform, to more accurately describe what it 
does. Restore use in WML.

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

Modified: trunk/extensions/MobileFrontend/MobileFrontend.php
===
--- trunk/extensions/MobileFrontend/MobileFrontend.php  2011-07-30 15:41:39 UTC 
(rev 93531)
+++ trunk/extensions/MobileFrontend/MobileFrontend.php  2011-07-30 15:43:52 UTC 
(rev 93532)
@@ -284,7 +284,7 @@
}
}
 
-   private function showHideCallbackWML( $matches ) {
+   private function headingTransformCallbackWML( $matches ) {
static $headings = 0;
++$headings;
 
@@ -296,7 +296,7 @@
return $base;
}
 
-   private function showHideCallbackXHTML( $matches ) {
+   private function headingTransformCallbackXHTML( $matches ) {
 
if ( isset( $matches[0] ) ) {
preg_match('/id=([^]*)/', $matches[0], 
$headlineMatches);
@@ -329,8 +329,8 @@
return $base;
}
 
-   public function javascriptize( $s ) {
-   $callback = 'showHideCallback';
+   public function headingTransform( $s ) {
+   $callback = 'headingTransformCallback';
$callback .= $this-contentFormat;
 
// Closures are a PHP 5.3 feature.
@@ -510,7 +510,7 @@
if ( strlen( $contentHtml )  4000  $this-contentFormat == 
'XHTML'
 self::$device['supports_javascript'] === true
 empty( self::$search ) ) {
-   $contentHtml =  $this-javascriptize( $contentHtml );
+   $contentHtml =  $this-headingTransform( $contentHtml );
} elseif ( $this-contentFormat == 'WML' ) {
header( 'Content-Type: text/vnd.wap.wml' );
 
@@ -523,6 +523,9 @@
// table requires columns property
// lang and dir officially unsupported (but often work 
on rtl phones)
 
+   // Add segmentation markers
+   $contentHtml = $this-headingTransform( $contentHtml );
+
// Content wrapping
$contentHtml = $this-createWMLCard( $contentHtml, 
$title );
require( 'views/layout/application.wml.php' );


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


[MediaWiki-CVS] SVN: [93533] trunk/phase3/includes/LinksUpdate.php

2011-07-30 Thread reedy
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93533

Revision: 93533
Author:   reedy
Date: 2011-07-30 15:51:58 + (Sat, 30 Jul 2011)
Log Message:
---
Add FIXME on undefined variable

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

Modified: trunk/phase3/includes/LinksUpdate.php
===
--- trunk/phase3/includes/LinksUpdate.php   2011-07-30 15:43:52 UTC (rev 
93532)
+++ trunk/phase3/includes/LinksUpdate.php   2011-07-30 15:51:58 UTC (rev 
93533)
@@ -490,7 +490,7 @@
);
$arr['globalinterwiki'][] = array(
'giw_wikiid' = 
$wikiid,
-   'giw_prefix' = 
$prefix
+   'giw_prefix' = 
$prefix, // FIXME: $prefix ix undefined
);
$arr['globalnamespaces'][] = array(
'gn_wiki'   
 = wfWikiID( ),


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


[MediaWiki-CVS] SVN: [93535] branches/iwtransclusion/phase3v4/

2011-07-30 Thread reedy
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93535

Revision: 93535
Author:   reedy
Date: 2011-07-30 15:58:44 + (Sat, 30 Jul 2011)
Log Message:
---
Rebranching iwtransclusion from r93533 in trunk

Gives stable working point for working from

Breaks unit tests as below, not going to be able to fix them before I disappear 
for the evening, so might aswell leave trunk clean

ArticleTablesTest testbug14404

Error:
ArticleTablesTest::testbug14404
Undefined offset: 0

/home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/tests/phpunit/includes/ArticleTablesTest.php:31
/home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/tests/phpunit/MediaWikiTestCase.php:60
/home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/tests/phpunit/MediaWikiPHPUnitCommand.php:20
/home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/tests/phpunit/phpunit.php:60

ParserTests testParserTest #552 - testParserTest with data set #551

Failure:
ParserTests::testParserTest with data set #551 ('RAW magic word', 
'{{RAW:QUERTY}}', 'pa 
href=/index.php?title=Template:QUERTYamp;action=editamp;redlink=1 
class=new title=Template:QUERTY (page does not exist)Template:QUERTY/a
/p', '', '')
RAW magic word
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-pa href=/index.php?title=Template:QUERTYamp;action=editamp;redlink=1 
class=new title=Template:QUERTY (page does not exist)Template:QUERTY/a
+pa 
href=/index.php?title=Template:RAW:QUERTYamp;action=editamp;redlink=1 
class=new title=Template:RAW:QUERTY (page does not 
exist)Template:RAW:QUERTY/a
/p

/home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/tests/phpunit/includes/parser/NewParserTest.php:545
/home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/tests/phpunit/MediaWikiTestCase.php:60
/home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/tests/phpunit/MediaWikiPHPUnitCommand.php:20
/home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/tests/phpunit/phpunit.php:60

Added Paths:
---
branches/iwtransclusion/phase3v4/


Property changes on: branches/iwtransclusion/phase3v4
___
Added: svn:ignore
   + *~
.classpath
.idea
.metadata*
.project
.settings
AdminSettings.php
LocalSettings.php
StartProfiler.php
cscope.files
cscope.out
favicon.ico
nbproject*
project.index
static*
tags

Added: svn:mergeinfo
   + /branches/REL1_15/phase3:51646
/branches/REL1_17/phase3:81445,81448
/branches/new-installer/phase3:43664-66004
/branches/sqlite:58211-58321


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


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

2011-07-30 Thread hartman
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93536

Revision: 93536
Author:   hartman
Date: 2011-07-30 15:59:04 + (Sat, 30 Jul 2011)
Log Message:
---
Make Back, Continue translatable.

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

Modified: trunk/extensions/MobileFrontend/MobileFrontend.php
===
--- trunk/extensions/MobileFrontend/MobileFrontend.php  2011-07-30 15:58:44 UTC 
(rev 93535)
+++ trunk/extensions/MobileFrontend/MobileFrontend.php  2011-07-30 15:59:04 UTC 
(rev 93536)
@@ -370,12 +370,12 @@
$basePage = htmlspecialchars( $_SERVER['PHP_SELF'] );
 
if ( $idx  $segmentsCount ) {
-   $card .= pa 
href=\{$basePage}?seg={$idx}{$useFormatParam}\Continue .../a/p;
+   $card .= pa 
href=\{$basePage}?seg={$idx}{$useFormatParam}\ . wfMsg( 
'mobile-frontend-wml-continue' ) . /a/p;
}
 
if ( $idx  1 ) {
$back_idx = $requestedSegment - 1;
-   $card .= pa 
href=\{$basePage}?seg={$back_idx}{$useFormatParam}\Back .../a/p;
+   $card .= pa 
href=\{$basePage}?seg={$back_idx}{$useFormatParam}\ . wfMsg( 
'mobile-frontend-wml-back' ) . /a/p;
}
 
$card .= '/card';


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


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

2011-07-30 Thread hartman
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93537

Revision: 93537
Author:   hartman
Date: 2011-07-30 16:01:58 + (Sat, 30 Jul 2011)
Log Message:
---
Follow up to r93536. 

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

Modified: trunk/extensions/MobileFrontend/MobileFrontend.i18n.php
===
--- trunk/extensions/MobileFrontend/MobileFrontend.i18n.php 2011-07-30 
15:59:04 UTC (rev 93536)
+++ trunk/extensions/MobileFrontend/MobileFrontend.i18n.php 2011-07-30 
16:01:58 UTC (rev 93537)
@@ -43,6 +43,8 @@
'mobile-frontend-author-link' = 'View this media file on regular 
Wikipedia to see information about authorship, licensing, and additional 
descriptions.',
'mobile-frontend-download-full-version' = 'Download full version',
'mobile-frontend-file-namespace' = 'File',
+   'mobile-frontend-wml-continue' = 'Continue ...',
+   'mobile-frontend-wml-back' = 'Back ...',
'mobile-frontend-view' = 'Mobile View',
 );
 


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


[MediaWiki-CVS] SVN: [93538] trunk/extensions/AutomaticBoardWelcome/AutomaticBoardWelcome. php

2011-07-30 Thread ashley
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93538

Revision: 93538
Author:   ashley
Date: 2011-07-30 16:10:57 + (Sat, 30 Jul 2011)
Log Message:
---
AutomaticBoardWelcome: follow-up to r93523: ignore blocked sysops (thanks iAlex 
for catching this and thanks Skizzerz for helping me with the DB query) and 
move wfReadOnly() check above any DB queries (thanks Skizzerz)

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

Modified: trunk/extensions/AutomaticBoardWelcome/AutomaticBoardWelcome.php
===
--- trunk/extensions/AutomaticBoardWelcome/AutomaticBoardWelcome.php
2011-07-30 16:01:58 UTC (rev 93537)
+++ trunk/extensions/AutomaticBoardWelcome/AutomaticBoardWelcome.php
2011-07-30 16:10:57 UTC (rev 93538)
@@ -8,7 +8,7 @@
  * @file
  * @ingroup Extensions
  * @version 0.1
- * @date 20 July 2011
+ * @date 30 July 2011
  * @author Jack Phoenix j...@countervandalism.net
  * @license http://en.wikipedia.org/wiki/Public_domain Public domain
  */
@@ -43,13 +43,23 @@
return true;
}
 
+   // Just quit if we're in read-only mode
+   if ( wfReadOnly() ) {
+   return true;
+   }
+
$dbr = wfGetDB( DB_SLAVE );
-   // Get all users who are in the 'sysop' group from the database
+   // Get all users who are in the 'sysop' group and aren't 
blocked from
+   // the database
$res = $dbr-select(
-   'user_groups',
+   array( 'user_groups', 'ipblocks' ),
array( 'ug_group', 'ug_user' ),
-   array( 'ug_group' = 'sysop' ),
-   __METHOD__
+   array( 'ug_group' = 'sysop', 'ipb_user' = null ),
+   __METHOD__,
+   array(),
+   array(
+   'ipblocks' = array( 'LEFT JOIN', 'ipb_user = 
ug_user' )
+   )
);
 
$adminUids = array();
@@ -61,24 +71,21 @@
$random = array_rand( array_flip( $adminUids ), 1 );
$sender = User::newFromId( $random );
 
-   // Ignore blocked users who have +sysop and only send out the 
message
-   // when we can, i.e. when the DB is *not* locked
-   if ( !$sender-isBlocked()  !wfReadOnly() ) {
-   $senderUid = $sender-getId();
-   $senderName = $sender-getName();
+   $senderUid = $sender-getId();
+   $senderName = $sender-getName();
 
-   $b = new UserBoard();
-   $b-sendBoardMessage(
-   $senderUid, // sender's UID
-   $senderName, // sender's name
-   $user-getId(),
-   $user-getName(),
-   // passing the senderName as an argument here 
so that we can do
-   // stuff like [[User talk:$1|contact me]] or 
w/e in the message
-   wfMsgForContent( 'user-board-welcome-message', 
$senderName )
-   // the final argument is message type: 0 
(default) for public
-   );
-   }
+   // Send the message
+   $b = new UserBoard();
+   $b-sendBoardMessage(
+   $senderUid, // sender's UID
+   $senderName, // sender's name
+   $user-getId(),
+   $user-getName(),
+   // passing the senderName as an argument here so that 
we can do
+   // stuff like [[User talk:$1|contact me]] or w/e in the 
message
+   wfMsgForContent( 'user-board-welcome-message', 
$senderName )
+   // the final argument is message type: 0 (default) for 
public
+   );
}
return true;
 }
\ 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: [93539] branches/iwtransclusion/phase3v4/

2011-07-30 Thread reedy
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93539

Revision: 93539
Author:   reedy
Date: 2011-07-30 16:14:34 + (Sat, 30 Jul 2011)
Log Message:
---
That branch isn't doing what I thought it might let me, typical

Kill it

Removed Paths:
-
branches/iwtransclusion/phase3v4/


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


[MediaWiki-CVS] SVN: [93540] branches/iwtransclusion/phase3v3/includes

2011-07-30 Thread reedy
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93540

Revision: 93540
Author:   reedy
Date: 2011-07-30 16:38:46 + (Sat, 30 Jul 2011)
Log Message:
---
Merge in r93533, r93531

Modified Paths:
--
branches/iwtransclusion/phase3v3/includes/LinksUpdate.php
branches/iwtransclusion/phase3v3/includes/installer/SqliteUpdater.php

Modified: branches/iwtransclusion/phase3v3/includes/LinksUpdate.php
===
--- branches/iwtransclusion/phase3v3/includes/LinksUpdate.php   2011-07-30 
16:14:34 UTC (rev 93539)
+++ branches/iwtransclusion/phase3v3/includes/LinksUpdate.php   2011-07-30 
16:38:46 UTC (rev 93540)
@@ -378,9 +378,15 @@
$this-mDb-delete( $table, $where, __METHOD__ );
}
if ( count( $insertions ) ) {
-   $this-mDb-insert( 'globaltemplatelinks', 
$insertions['globaltemplatelinks'], __METHOD__, 'IGNORE' );
-   $this-mDb-insert( 'globalnamespaces', 
$insertions['globalnamespaces'], __METHOD__, 'IGNORE' );
-   $this-mDb-insert( 'globalinterwiki', 
$insertions['globalinterwiki'], __METHOD__, 'IGNORE' );
+   if ( isset( $insertions['globaltemplatelinks'] ) ) {
+   $this-mDb-insert( 'globaltemplatelinks', 
$insertions['globaltemplatelinks'], __METHOD__, 'IGNORE' );
+   }
+   if ( isset( $insertions['globalnamespaces'] ) ) {
+   $this-mDb-insert( 'globalnamespaces', 
$insertions['globalnamespaces'], __METHOD__, 'IGNORE' );
+   }
+   if ( isset( $insertions['globalinterwiki'] ) ) {
+   $this-mDb-insert( 'globalinterwiki', 
$insertions['globalinterwiki'], __METHOD__, 'IGNORE' );
+   }
}
}
 
@@ -484,7 +490,7 @@
);
$arr['globalinterwiki'][] = array(
'giw_wikiid' = 
$wikiid,
-   'giw_prefix' = 
$prefix
+   'giw_prefix' = 
$prefix // FIXME: $prefix ix undefined
);
$arr['globalnamespaces'][] = array(
'gn_wiki'   
 = wfWikiID( ),

Modified: branches/iwtransclusion/phase3v3/includes/installer/SqliteUpdater.php
===
--- branches/iwtransclusion/phase3v3/includes/installer/SqliteUpdater.php   
2011-07-30 16:14:34 UTC (rev 93539)
+++ branches/iwtransclusion/phase3v3/includes/installer/SqliteUpdater.php   
2011-07-30 16:38:46 UTC (rev 93540)
@@ -60,6 +60,11 @@
array( 'addIndex', 'user',  'user_email',   
'patch-user_email_index.sql' ),
array( 'addTable', 'config', 'patch-config.sql' ),
array( 'addTable', 'uploadstash', 
'patch-uploadstash.sql' ),
+
+   // 1.19
+   array( 'addTable', 'globaltemplatelinks', 
'patch-globaltemplatelinks.sql' ),
+   array( 'addTable', 'globalnamespaces', 
'patch-globalnamespaces.sql' ),
+   array( 'addTable', 'globalinterwiki', 
'patch-globalinterwiki.sql' ),
);
}
 


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


[MediaWiki-CVS] SVN: [93541] trunk/extensions/SocialProfile

2011-07-30 Thread zhenya
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93541

Revision: 93541
Author:   zhenya
Date: 2011-07-30 16:52:13 + (Sat, 30 Jul 2011)
Log Message:
---
Added SpecialUserStatus.php where u (soon only admin) can delete messages.
Made some changes for the i like system(not implemented yet). Fixed some 
things

Modified Paths:
--
trunk/extensions/SocialProfile/SocialProfile.php
trunk/extensions/SocialProfile/UserProfile/UserProfilePage.php
trunk/extensions/SocialProfile/UserStatus/UserStatus.css
trunk/extensions/SocialProfile/UserStatus/UserStatus.js
trunk/extensions/SocialProfile/UserStatus/UserStatusClass.php
trunk/extensions/SocialProfile/UserStatus/UserStatus_AjaxFunctions.php
trunk/extensions/SocialProfile/UserStatus/userstatus.sql

Added Paths:
---
trunk/extensions/SocialProfile/UserStatus/SpecialUserStatus.php

Modified: trunk/extensions/SocialProfile/SocialProfile.php
===
--- trunk/extensions/SocialProfile/SocialProfile.php2011-07-30 16:38:46 UTC 
(rev 93540)
+++ trunk/extensions/SocialProfile/SocialProfile.php2011-07-30 16:52:13 UTC 
(rev 93541)
@@ -38,7 +38,7 @@
 $wgAutoloadClasses['SpecialViewRelationshipRequests'] = $dir . 
'UserRelationship/SpecialViewRelationshipRequests.php';
 $wgAutoloadClasses['SpecialViewRelationships'] = $dir . 
'UserRelationship/SpecialViewRelationships.php';
 $wgAutoloadClasses['SpecialViewUserBoard'] = $dir . 
'UserBoard/SpecialUserBoard.php';
-
+$wgAutoloadClasses['SpecialUserStatus'] = $dir . 
'UserStatus/SpecialUserStatus.php';
 $wgAutoloadClasses['RemoveAvatar'] = $dir . 
'UserProfile/SpecialRemoveAvatar.php';
 $wgAutoloadClasses['UpdateEditCounts'] = $dir . 
'UserStats/SpecialUpdateEditCounts.php';
 $wgAutoloadClasses['UserBoard'] = $dir . 'UserBoard/UserBoardClass.php';
@@ -73,6 +73,7 @@
 $wgSpecialPages['UserBoard'] = 'SpecialViewUserBoard';
 $wgSpecialPages['ViewRelationshipRequests'] = 
'SpecialViewRelationshipRequests';
 $wgSpecialPages['ViewRelationships'] = 'SpecialViewRelationships';
+$wgSpecialPages['UserStatus'] = 'SpecialUserStatus';
 
 // Special page groups for MW 1.13+
 $wgSpecialPageGroups['AddRelationship'] = 'users';

Modified: trunk/extensions/SocialProfile/UserProfile/UserProfilePage.php
===
--- trunk/extensions/SocialProfile/UserProfile/UserProfilePage.php  
2011-07-30 16:38:46 UTC (rev 93540)
+++ trunk/extensions/SocialProfile/UserProfile/UserProfilePage.php  
2011-07-30 16:52:13 UTC (rev 93541)
@@ -1785,7 +1785,7 @@
function getStatus( $userId ) {
global $wgUser;
 
-   $us_class = new UserStatusClass( $userId );
+   $us_class = new UserStatusClass();
$user_status_array = $us_class-getStatus( $userId );
if ( empty( $user_status_array ) ) {
$buf = '';
@@ -1806,7 +1806,7 @@
 
return 
scriptUserStatus.toShowMode('$buf','$userId');/script;
} else {
-   return $buf;
+   return 
$buf.scriptUserStatus.publicHistoryButton('$userId');/script;
}
}
 

Copied: trunk/extensions/SocialProfile/UserStatus/SpecialUserStatus.php (from 
rev 92938, trunk/extensions/SocialProfile/UserBoard/SpecialSendBoardBlast.php)
===
--- trunk/extensions/SocialProfile/UserStatus/SpecialUserStatus.php 
(rev 0)
+++ trunk/extensions/SocialProfile/UserStatus/SpecialUserStatus.php 
2011-07-30 16:52:13 UTC (rev 93541)
@@ -0,0 +1,25 @@
+?php
+
+class SpecialUserStatus extends UnlistedSpecialPage {
+
+   /**
+* Constructor
+*/
+   public function __construct() {
+   global $wgOut, $wgScriptPath;
+   
+   parent::__construct( 'UserStatus' );
+   $wgOut-addScriptFile( $wgScriptPath . 
'/extensions/SocialProfile/UserStatus/UserStatus.js' );
+   }
+
+   public function execute( $params ) {
+   global $wgOut;
+   
+   $output = Enter username: input type=\text\  
id=\us-name-input\ ;
+   $output .= input type=\button\ value=\Find\ 
onclick=\javascript:UserStatus.specialGetHistory();\;
+   $output .= div id=\us-special\ /div;
+   $wgOut-addHTML($output);
+   return;
+   }
+   
+}

Modified: trunk/extensions/SocialProfile/UserStatus/UserStatus.css
===
--- trunk/extensions/SocialProfile/UserStatus/UserStatus.css2011-07-30 
16:38:46 UTC (rev 93540)
+++ trunk/extensions/SocialProfile/UserStatus/UserStatus.css2011-07-30 
16:52:13 UTC (rev 93541)
@@ -1,5 +1,5 @@
 #status-box {
-   width : 400px;
+   width : 440px;
padding: 0px;
  

[MediaWiki-CVS] SVN: [93542] tags/extensions/SemanticResultFormats/REL_1_6/

2011-07-30 Thread jeroendedauw
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93542

Revision: 93542
Author:   jeroendedauw
Date: 2011-07-30 17:06:37 + (Sat, 30 Jul 2011)
Log Message:
---
Tag for version 1.6.

Added Paths:
---
tags/extensions/SemanticResultFormats/REL_1_6/


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


[MediaWiki-CVS] SVN: [93543] tags/extensions/SemanticMediaWiki/REL_1_6/

2011-07-30 Thread jeroendedauw
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93543

Revision: 93543
Author:   jeroendedauw
Date: 2011-07-30 17:07:38 + (Sat, 30 Jul 2011)
Log Message:
---
Tag for version 1.6.

Added Paths:
---
tags/extensions/SemanticMediaWiki/REL_1_6/


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


[MediaWiki-CVS] SVN: [93544] trunk/extensions/SemanticMediaWiki/RELEASE-NOTES

2011-07-30 Thread jeroendedauw
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93544

Revision: 93544
Author:   jeroendedauw
Date: 2011-07-30 17:48:53 + (Sat, 30 Jul 2011)
Log Message:
---
typo fix

Modified Paths:
--
trunk/extensions/SemanticMediaWiki/RELEASE-NOTES

Modified: trunk/extensions/SemanticMediaWiki/RELEASE-NOTES
===
--- trunk/extensions/SemanticMediaWiki/RELEASE-NOTES2011-07-30 17:07:38 UTC 
(rev 93543)
+++ trunk/extensions/SemanticMediaWiki/RELEASE-NOTES2011-07-30 17:48:53 UTC 
(rev 93544)
@@ -39,7 +39,7 @@
 * Added UNIX-style DSV (Delimiter-separated values) result format.
 * Reworked internal data model, cleaning up and re-implementing SMWDataValue 
and
   all of its subclasses, and introducing new data item classes to handle data.
-  The class SMWCompatibilityHelpers provides temporal help for extensions that
+  The class SMWCompatibilityHelpers provides temporary help for extensions that
   still depend on the old format and APIs.
 * Fixed PostgreSQL issues with the installation and upgrade code.
 * Added API module (smwinfo) via which statistics about the semantic data can


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


[MediaWiki-CVS] SVN: [93545] trunk/extensions/SocialProfile

2011-07-30 Thread zhenya
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93545

Revision: 93545
Author:   zhenya
Date: 2011-07-30 17:53:57 + (Sat, 30 Jul 2011)
Log Message:
---
allows only admins to delete messages

Modified Paths:
--
trunk/extensions/SocialProfile/SocialProfile.php
trunk/extensions/SocialProfile/UserStatus/SpecialUserStatus.php

Modified: trunk/extensions/SocialProfile/SocialProfile.php
===
--- trunk/extensions/SocialProfile/SocialProfile.php2011-07-30 17:48:53 UTC 
(rev 93544)
+++ trunk/extensions/SocialProfile/SocialProfile.php2011-07-30 17:53:57 UTC 
(rev 93545)
@@ -101,7 +101,8 @@
 
 // Should we enable UserStatus feature (currently is under development)
 $wgEnableUserStatus = false;
-
+// Permission to delete other Users' Status Messages
+$wgGroupPermissions['sysop']['delete-status-update'] = true;
 // Extension credits that show up on Special:Version
 $wgExtensionCredits['other'][] = array(
'path' = __FILE__,

Modified: trunk/extensions/SocialProfile/UserStatus/SpecialUserStatus.php
===
--- trunk/extensions/SocialProfile/UserStatus/SpecialUserStatus.php 
2011-07-30 17:48:53 UTC (rev 93544)
+++ trunk/extensions/SocialProfile/UserStatus/SpecialUserStatus.php 
2011-07-30 17:53:57 UTC (rev 93545)
@@ -13,12 +13,13 @@
}
 
public function execute( $params ) {
-   global $wgOut;
-   
-   $output = Enter username: input type=\text\  
id=\us-name-input\ ;
-   $output .= input type=\button\ value=\Find\ 
onclick=\javascript:UserStatus.specialGetHistory();\;
-   $output .= div id=\us-special\ /div;
-   $wgOut-addHTML($output);
+   global $wgOut,$wgUser;
+   if ( $wgUser-isAllowed( 'delete-status-update' ) ) {
+   $output = Enter username: input type=\text\  
id=\us-name-input\ ;
+   $output .= input type=\button\ value=\Find\ 
onclick=\javascript:UserStatus.specialGetHistory();\;
+   $output .= div id=\us-special\ /div;
+   $wgOut-addHTML($output);
+   }
return;
}



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


[MediaWiki-CVS] SVN: [93546] trunk/extensions/Wikidata/OmegaWiki/SpecialSuggest.php

2011-07-30 Thread kipcool
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93546

Revision: 93546
Author:   kipcool
Date: 2011-07-30 17:58:29 + (Sat, 30 Jul 2011)
Log Message:
---
useless join removed

Modified Paths:
--
trunk/extensions/Wikidata/OmegaWiki/SpecialSuggest.php

Modified: trunk/extensions/Wikidata/OmegaWiki/SpecialSuggest.php
===
--- trunk/extensions/Wikidata/OmegaWiki/SpecialSuggest.php  2011-07-30 
17:53:57 UTC (rev 93545)
+++ trunk/extensions/Wikidata/OmegaWiki/SpecialSuggest.php  2011-07-30 
17:58:29 UTC (rev 93546)
@@ -248,12 +248,8 @@
// this first query returns the language_id
$sql = 'SELECT language_id' .
 FROM {$dc}_syntrans .
-JOIN {$dc}_expression ON 
{$dc}_expression.expression_id = {$dc}_syntrans.expression_id .
 WHERE {$dc}_syntrans.syntrans_sid =  . 
$syntransId .
 LIMIT 1  ;
-   // not needed: syntransId is unique
-   // ' AND ' . getLatestTransactionRestriction( 
{$dc}_syntrans ) .
-   // ' AND ' . getLatestTransactionRestriction( 
{$dc}_expression );
$lang_res = $dbr-query( $sql );
$language_id = $dbr-fetchObject( $lang_res 
)-language_id;
 


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


[MediaWiki-CVS] SVN: [93547] trunk/extensions/Wikidata/OmegaWiki/SpecialSuggest.php

2011-07-30 Thread kipcool
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93547

Revision: 93547
Author:   kipcool
Date: 2011-07-30 18:03:45 + (Sat, 30 Jul 2011)
Log Message:
---
oops

Modified Paths:
--
trunk/extensions/Wikidata/OmegaWiki/SpecialSuggest.php

Modified: trunk/extensions/Wikidata/OmegaWiki/SpecialSuggest.php
===
--- trunk/extensions/Wikidata/OmegaWiki/SpecialSuggest.php  2011-07-30 
17:58:29 UTC (rev 93546)
+++ trunk/extensions/Wikidata/OmegaWiki/SpecialSuggest.php  2011-07-30 
18:03:45 UTC (rev 93547)
@@ -247,8 +247,9 @@
// find the language of the syntrans and add attributes 
of that language by adding the language DM to the list of default classes
// this first query returns the language_id
$sql = 'SELECT language_id' .
-FROM {$dc}_syntrans .
+FROM {$dc}_syntrans, {$dc}_expression .
 WHERE {$dc}_syntrans.syntrans_sid =  . 
$syntransId .
+AND {$dc}_expression.expression_id = 
{$dc}_syntrans.expression_id  .
 LIMIT 1  ;
$lang_res = $dbr-query( $sql );
$language_id = $dbr-fetchObject( $lang_res 
)-language_id;


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


[MediaWiki-CVS] SVN: [93548] trunk/extensions/SocialProfile/SocialProfile.alias.php

2011-07-30 Thread raymond
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93548

Revision: 93548
Author:   raymond
Date: 2011-07-30 18:35:05 + (Sat, 30 Jul 2011)
Log Message:
---
fu r93541: Add new special page to the corresponding alias file

Modified Paths:
--
trunk/extensions/SocialProfile/SocialProfile.alias.php

Modified: trunk/extensions/SocialProfile/SocialProfile.alias.php
===
--- trunk/extensions/SocialProfile/SocialProfile.alias.php  2011-07-30 
18:03:45 UTC (rev 93547)
+++ trunk/extensions/SocialProfile/SocialProfile.alias.php  2011-07-30 
18:35:05 UTC (rev 93548)
@@ -25,6 +25,7 @@
'UpdateProfile' = array( 'UpdateProfile' ),
'UploadAvatar' = array( 'UploadAvatar' ),
'UserBoard' = array( 'UserBoard' ),
+   'UserStatus' = array( 'UserStatus' ),
'ViewRelationshipRequests' = array( 'ViewRelationshipRequests' ),
'ViewRelationships' = array( 'ViewRelationships' ),
 );


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


[MediaWiki-CVS] SVN: [93549] trunk/extensions/SocialProfile/UserStatus/UserStatus.i18n.php

2011-07-30 Thread raymond
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93549

Revision: 93549
Author:   raymond
Date: 2011-07-30 18:37:55 + (Sat, 30 Jul 2011)
Log Message:
---
fu r93545: Add message for the new user right

Modified Paths:
--
trunk/extensions/SocialProfile/UserStatus/UserStatus.i18n.php

Modified: trunk/extensions/SocialProfile/UserStatus/UserStatus.i18n.php
===
--- trunk/extensions/SocialProfile/UserStatus/UserStatus.i18n.php   
2011-07-30 18:35:05 UTC (rev 93548)
+++ trunk/extensions/SocialProfile/UserStatus/UserStatus.i18n.php   
2011-07-30 18:37:55 UTC (rev 93549)
@@ -19,6 +19,7 @@
'userstatus-letters-left' = 'letters left',
'userstatus-blocked' = 'You are blocked',
'userstatus-readonly' = 'The database is locked',
+   'right-delete-status-update' = Delete other users' status messages,
 );
 
 /** Message documentation (Message documentation)


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


[MediaWiki-CVS] SVN: [93550] trunk/tools/ToolserverI18N/language/messages

2011-07-30 Thread raymond
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93550

Revision: 93550
Author:   raymond
Date: 2011-07-30 18:42:35 + (Sat, 30 Jul 2011)
Log Message:
---
Localisation updates for ToolserverI18N messages from translatewiki.net 
(2011-07-30 18:35:00)

Modified Paths:
--
trunk/tools/ToolserverI18N/language/messages/Commonshelper2.i18n.php
trunk/tools/ToolserverI18N/language/messages/General.i18n.php
trunk/tools/ToolserverI18N/language/messages/Krinkle.i18n.php
trunk/tools/ToolserverI18N/language/messages/Orphantalk2.i18n.php

trunk/tools/ToolserverI18N/language/messages/Recentanonymousactivity.i18n.php
trunk/tools/ToolserverI18N/language/messages/Svgtranslate.i18n.php
trunk/tools/ToolserverI18N/language/messages/Templatecount.i18n.php

Modified: trunk/tools/ToolserverI18N/language/messages/Commonshelper2.i18n.php
===
--- trunk/tools/ToolserverI18N/language/messages/Commonshelper2.i18n.php
2011-07-30 18:37:55 UTC (rev 93549)
+++ trunk/tools/ToolserverI18N/language/messages/Commonshelper2.i18n.php
2011-07-30 18:42:35 UTC (rev 93550)
@@ -141,11 +141,13 @@
 );
 
 /** Arabic (العربية)
+ * @author Abanima
  * @author Meno25
  * @author OsamaK
  */
 $messages['ar'] = array(
'attention' = 'انتباه',
+   'description' = 'أداة لنقل الملفات من مشاريع ويكيميديا إلى ويكيميديا 
كومونز',
'jira_link' = 'بلغ عن علة أو اقترح خاصية',
'language' = 'اللغة',
'project' = 'المشروع',
@@ -161,6 +163,8 @@
'do_it' = 'افعلها',
'error_transfer_usr' = 'أنت لم تضبط اسم مستخدم ويكيميديا كومنز',
'error_not_exists' = 'الملف المصدر غير موجود!',
+   'error_file_exists' = 'الملف موجود حالياً في $3 باسم $1$4$2!',
+   'error_diff_exists' = 'يوجد ملف مستهدف مختلف على ويكي الهدف تحت نفس 
الاسم!',
'original_wikitext' = 'نص الويكي الأصلي',
'new_wikitext' = 'نص الويكي الجديد',
'new_filename' = 'اسم الملف الجديد:',
@@ -1235,6 +1239,7 @@
'original_wikitext' = 'Originale Wiki-Text',
'new_wikitext' = 'Neie Wiki-Text',
'new_filename' = 'Neien Numm vum Fichier:',
+   'output_information' = 'Fir manuell Eropzelueden, den Text 
uewendriwwer änneren (wann néideg), späichert $1de Fichier$2 op Ärem Computer, 
deen Dir dann $3eroplued$4.',
'upload_submit' = 'Eroplueden!',
'target_wiki' = d'Zilwiki,
'standard_language' = 'lb',
@@ -1750,11 +1755,14 @@
'target_file' = 'File de destinazione',
'commons_username' = Nome de l'utende de Uicchimedia Commons,
'categories' = 'Categorije',
+   'tusc_user' = 'Nome utende TUSC',
+   'tusc_pass' = 'Passuord TUSC',
'do_it' = 'Falle',
'original_wikitext' = 'Teste de Uicchi origgenale',
'new_wikitext' = 'Teste de Uicchi nuève',
'new_filename' = Nome d'u file nuève:,
'upload_submit' = 'Careche!',
+   'standard_language' = 'en',
 );
 
 /** Sinhala (සිංහල)

Modified: trunk/tools/ToolserverI18N/language/messages/General.i18n.php
===
--- trunk/tools/ToolserverI18N/language/messages/General.i18n.php   
2011-07-30 18:37:55 UTC (rev 93549)
+++ trunk/tools/ToolserverI18N/language/messages/General.i18n.php   
2011-07-30 18:42:35 UTC (rev 93550)
@@ -302,12 +302,12 @@
'namespace' = 'Navnerum',
'form-submit' = 'Gå',
'form-reset' = 'Nulstil',
-   'years' = 'år',
-   'weeks' = 'uger',
-   'days' = 'dage',
-   'hours' = 'timer',
-   'minutes' = 'minutter',
-   'seconds' = 'sekunder',
+   'years' = '{{PLURAL: $1|år|år}}',
+   'weeks' = '{{PLURAL: $1|uge|uger}}',
+   'days' = '{{PLURAL: $1|dag|dage}}',
+   'hours' = '{{PLURAL: $1|time|timer}}',
+   'minutes' = '{{PLURAL: $1|minut|minutter}}',
+   'seconds' = '{{PLURAL: $1|sekund|sekunder}}',
'last-modified-date' = 'Senest ændret: $1',
'view-source' = 'Vis kildekode',
 );
@@ -968,10 +968,12 @@
'namespace' = 'Namespace',
'form-submit' = 'Veje',
'form-reset' = 'Azzere',
-   'years' = 'anne',
-   'weeks' = 'sumàne',
-   'days' = 'sciurne',
-   'hours' = 'ore',
+   'years' = '{{PLURAL: $1|anne|anne}}',
+   'weeks' = '{{PLURAL: $1|sumàne|sumàne}}',
+   'days' = '{{PLURAL: $1|sciurne|sciurne}}',
+   'hours' = '{{PLURAL: $1|ore|ore}}',
+   'minutes' = '{{PLURAL:$1|minute|minute}}',
+   'seconds' = '{{PLURAL:$1|seconde|seconde}}',
'last-modified-date' = 'Urteme cangiamende: $1',
'view-source' = Vide 'u sorgende,
 );

Modified: trunk/tools/ToolserverI18N/language/messages/Krinkle.i18n.php
===
--- trunk/tools/ToolserverI18N/language/messages/Krinkle.i18n.php   
2011-07-30 18:37:55 UTC (rev 93549)
+++ 

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

2011-07-30 Thread ankitgarg833
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93551

Revision: 93551
Author:   ankitgarg833
Date: 2011-07-30 18:56:07 + (Sat, 30 Jul 2011)
Log Message:
---
cheking in getXMLTextForPS

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

Modified: trunk/extensions/SemanticForms/includes/SF_Utils.php
===
--- trunk/extensions/SemanticForms/includes/SF_Utils.php2011-07-30 
18:42:35 UTC (rev 93550)
+++ trunk/extensions/SemanticForms/includes/SF_Utils.php2011-07-30 
18:56:07 UTC (rev 93551)
@@ -176,6 +176,41 @@
}
return true;
}
+   public static function getXMLTextForPS( $wgRequest, $text_extensions ){
+   
+   $Xmltext = ;
+   $templateNum = -1;
+   foreach ( $wgRequest-getValues() as $var = $val ) {
+   if(substr($var,0,14) == 'sf_input_type_'){
+   $templateNum = substr($var,14,1);
+   $Xmltext .= 'FormInput';
+   $Xmltext .= 'InputType'.$val.'/InputType';
+   }else if(substr($var,0,14) == 'sf_key_values_'){
+   if ( $val != '' ) {
+   // replace the comma substitution 
character that has no chance of
+   // being included in the values list - 
namely, the ASCII beep
+   $listSeparator = ',';
+   $key_values_str = str_replace( 
\\$listSeparator, \a, $val );
+   $key_values_array = explode( 
$listSeparator, $key_values_str );
+   foreach ( $key_values_array as $i = 
$value ) {
+   // replace beep back with 
comma, trim
+   $value = str_replace( \a, 
$listSeparator, trim( $value ) );
+   $param_value = explode( =, 
$value );
+   if($param_value[1] != null ) {
+   //handles Parameter 
name=size20/Parameter
+   $Xmltext .= 'Parameter 
name='.$param_value[0].''.$param_value[1].'/Parameter';
+   }else{
+   //handlers Parameter 
name=mandatory /
+   $Xmltext .= 'Parameter 
name='.$param_value[0].'/';
+   }
+   }
+   }   
+   }   
+   }
+   $Xmltext .= '/FormInput';
+   $text_extensions['sf'] = $Xmltext;
+   return true;
+   }
public static function getHtmlTextForPS( $js_extensions 
,$text_extensions ) { 
$html_text = ;
$html_text .= 'plegendsemanticForms:FormInput/legend /p


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


[MediaWiki-CVS] SVN: [93552] trunk/extensions/SemanticForms/SemanticForms.php

2011-07-30 Thread ankitgarg833
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93552

Revision: 93552
Author:   ankitgarg833
Date: 2011-07-30 18:56:54 + (Sat, 30 Jul 2011)
Log Message:
---
hooks for getXMLTextForPS

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

Modified: trunk/extensions/SemanticForms/SemanticForms.php
===
--- trunk/extensions/SemanticForms/SemanticForms.php2011-07-30 18:56:07 UTC 
(rev 93551)
+++ trunk/extensions/SemanticForms/SemanticForms.php2011-07-30 18:56:54 UTC 
(rev 93552)
@@ -93,8 +93,8 @@
 $wgHooks['PSParseFieldElements'][] = 'SFUtils::parseFieldElements' ; //Hook 
for  creating Pages
 $wgHooks['PageSchemasGetPageList'][] = 'SFUtils::getPageList' ; //Hook for  
creating Pages
 $wgHooks['getHtmlTextForFieldInputs'][] = 'SFUtils::getHtmlTextForPS' ; //Hook 
for  retuning html text to PS schema
+$wgHooks['getXmlTextForFieldInputs'][] = 'SFUtils::getXMLTextForPS' ; //Hook 
for  retuning html text to PS schema
 
-
 $wgAPIModules['sfautocomplete'] = 'SFAutocompleteAPI';
 $wgAPIModules['sfautoedit'] = 'SFAutoeditAPI';
 


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


[MediaWiki-CVS] SVN: [93554] trunk/phase3/skins/Standard.php

2011-07-30 Thread ialex
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93554

Revision: 93554
Author:   ialex
Date: 2011-07-30 19:06:43 + (Sat, 30 Jul 2011)
Log Message:
---
* Call Linker methods statically
* Factorised calls to Skin::getTitle() in StandardTemplate::quickBar()

Modified Paths:
--
trunk/phase3/skins/Standard.php

Modified: trunk/phase3/skins/Standard.php
===
--- trunk/phase3/skins/Standard.php 2011-07-30 19:06:20 UTC (rev 93553)
+++ trunk/phase3/skins/Standard.php 2011-07-30 19:06:43 UTC (rev 93554)
@@ -23,7 +23,7 @@
 */
function setupSkinUserCss( OutputPage $out ){
parent::setupSkinUserCss( $out );
-   $out-AddModuleStyles( 'skins.standard' );
+   $out-addModuleStyles( 'skins.standard' );
 
$qb = $this-qbSetting();
$rules = array();
@@ -111,7 +111,8 @@
 
$action = $wgRequest-getText( 'action' );
$wpPreview = $wgRequest-getBool( 'wpPreview' );
-   $tns = $this-getSkin()-getTitle()-getNamespace();
+   $title = $this-getSkin()-getTitle();
+   $tns = $title-getNamespace();
 
$s = \ndiv id='quickbar';
$s .= \n . $this-getSkin()-logoText() . \nhr class='sep' 
/;
@@ -151,7 +152,7 @@
}
 
$s .= \nhr class='sep' /;
-   $articleExists = $this-getSkin()-getTitle()-getArticleId();
+   $articleExists = $title-getArticleId();
if ( $wgOut-isArticle() || $action == 'edit' || $action == 
'history' || $wpPreview ) {
if( $wgOut-isArticle() ) {
$s .= 'strong' . $this-editThisPage() . 
'/strong';
@@ -196,14 +197,14 @@
$text = wfMsg( 
'articlepage' );
}
 
-   $link = 
$this-getSkin()-getTitle()-getText();
+   $link = $title-getText();
$nstext = $wgContLang-getNsText( $tns 
);
if( $nstext ) { # add namespace if 
necessary
$link = $nstext . ':' . $link;
}
 
$s .= Linker::link( Title::newFromText( 
$link ), $text );
-   } elseif( 
$this-getSkin()-getTitle()-getNamespace() != NS_SPECIAL ) {
+   } elseif( $title-getNamespace() != NS_SPECIAL 
) {
# we just throw in a New page text to 
tell the user that he's in edit mode,
# and to avoid messing with the 
separator that is prepended to the next item
$s .= 'strong' . wfMsg( 'newpage' ) . 
'/strong';
@@ -211,16 +212,15 @@
}
 
# Post a comment link
-   if( ( $this-getSkin()-getTitle()-isTalkPage() || 
$wgOut-showNewSectionLink() )  $action != 'edit'  !$wpPreview )
-   $s .= 'br /' . $this-getSkin()-link(
-   $this-getSkin()-getTitle(),
+   if( ( $title-isTalkPage() || 
$wgOut-showNewSectionLink() )  $action != 'edit'  !$wpPreview )
+   $s .= 'br /' . Linker::link(
+   $title,
wfMsg( 'postcomment' ),
array(),
array(
'action' = 'edit',
'section' = 'new'
-   ),
-   array( 'known', 'noclasses' )
+   )
);
 
/*
@@ -233,7 +233,7 @@
if( $action != 'edit'  $action != 'submit' ) {
$s .= $sep . $this-watchThisPage();
}
-   if ( $this-getSkin()-getTitle()-userCan( 
'edit' ) )
+   if ( $title-userCan( 'edit' ) )
$s .= $sep . $this-moveThisPage();
}
if ( $wgUser-isAllowed( 'delete' )  $articleExists ) 
{
@@ -251,12 +251,12 @@
}
 
if (
-   NS_USER == 
$this-getSkin()-getTitle()-getNamespace() ||
-   $this-getSkin()-getTitle()-getNamespace() == 
NS_USER_TALK
+   NS_USER == $title-getNamespace() 

[MediaWiki-CVS] SVN: [93555] trunk/extensions/SemanticDrilldown/SemanticDrilldown.php

2011-07-30 Thread ankitgarg833
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93555

Revision: 93555
Author:   ankitgarg833
Date: 2011-07-30 19:20:57 + (Sat, 30 Jul 2011)
Log Message:
---
hook for getXMLTextForPS

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

Modified: trunk/extensions/SemanticDrilldown/SemanticDrilldown.php
===
--- trunk/extensions/SemanticDrilldown/SemanticDrilldown.php2011-07-30 
19:06:43 UTC (rev 93554)
+++ trunk/extensions/SemanticDrilldown/SemanticDrilldown.php2011-07-30 
19:20:57 UTC (rev 93555)
@@ -70,6 +70,7 @@
 $wgHooks['PSParseFieldElements'][] = 'SDUtils::parseFieldElements' ; //Hook 
for  creating Pages
 $wgHooks['PageSchemasGetObject'][] = 'SDUtils::createPageSchemasObject' ; 
//Hook for  returning PageSchema(extension)  object from a given xml 
 $wgHooks['getHtmlTextForFieldInputs'][] = 'SDUtils::getHtmlTextForPS' ; //Hook 
for  retuning html text to PS schema
+$wgHooks['getXmlTextForFieldInputs'][] = 'SDUtils::getXMLTextForPS' ; //Hook 
for  retuning html text to PS schema
 
 # ##
 # This is the path to your installation of Semantic Drilldown as


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


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

2011-07-30 Thread ankitgarg833
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93556

Revision: 93556
Author:   ankitgarg833
Date: 2011-07-30 19:21:31 + (Sat, 30 Jul 2011)
Log Message:
---
function getXMLTextForPS

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

Modified: trunk/extensions/SemanticDrilldown/includes/SD_Utils.php
===
--- trunk/extensions/SemanticDrilldown/includes/SD_Utils.php2011-07-30 
19:20:57 UTC (rev 93555)
+++ trunk/extensions/SemanticDrilldown/includes/SD_Utils.php2011-07-30 
19:21:31 UTC (rev 93556)
@@ -35,7 +35,42 @@
}
return true;
 }
-   
+   public static function getXMLTextForPS( $wgRequest, $text_extensions 
){
+   $Xmltext = ;
+   $templateNum = -1;
+   $Xmltext .= 'Filter';
+   foreach ( $wgRequest-getValues() as $var = $val ) {
+   if(substr($var,0,15) == 'sd_filter_name_'){
+   $templateNum = substr($var,15,1);   

+   $Xmltext .= 'Label'.$val.'/Label';
+   }else if(substr($var,0,17) == 'sd_values_source_'){
+   if ( $val == 'category' ) {
+   $Xmltext .= 
'ValuesFromCategory'.$wgRequest-getText('sd_category_name_'.$templateNum).'/ValuesFromCategory';
+   }else if ( $val == 'dates' ) {
+$Xmltext .= 
'TimePeriod'.$wgRequest-getText('sd_time_period_'.$templateNum).'/TimePeriod';
+   }else if ( $val == 'manual' ) {
+   $filter_mannual_values_str = 
$wgRequest-getText('sd_filter_values_'.$templateNum);
+   // replace the comma substitution 
character that has no chance of
+   // being included in the values list - 
namely, the ASCII beep
+   $listSeparator = ',';
+   $filter_mannual_values_str = 
str_replace( \\$listSeparator, \a, $filter_mannual_values_str );
+   $filter_mannual_values_array = explode( 
$listSeparator, $filter_mannual_values_str );
+   $Xmltext .= 'Values';
+   foreach ( $filter_mannual_values_array 
as $i = $value ) {
+   // replace beep back with 
comma, trim
+   $value = str_replace( \a, 
$listSeparator, trim( $value ) );
+   $Xmltext .= 
'Value'.$value.'/Value';
+   }
+   $Xmltext .= '/Values';
+   }
+   }else if( substr($var,0,14) == 'sd_input_type_'){
+   $Xmltext .= 'InputType'.$val.'/InputType';
+   }
+   }
+   $Xmltext .= '/Filter';
+   $text_extensions['sd'] = $Xmltext;
+   return true;
+   }
public static function getHtmlTextForPS( $js_extensions 
,$text_extensions ) { 
global $wgContLang;



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


[MediaWiki-CVS] SVN: [93557] trunk/phase3/includes/OutputPage.php

2011-07-30 Thread ialex
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93557

Revision: 93557
Author:   ialex
Date: 2011-07-30 19:37:19 + (Sat, 30 Jul 2011)
Log Message:
---
* Made OutputPage extend ContextSource instead of duplicating its code; this 
also adds getLang() that was missing
* Use getLang() instead of $wgLang

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

Modified: trunk/phase3/includes/OutputPage.php
===
--- trunk/phase3/includes/OutputPage.php2011-07-30 19:21:31 UTC (rev 
93556)
+++ trunk/phase3/includes/OutputPage.php2011-07-30 19:37:19 UTC (rev 
93557)
@@ -18,7 +18,7 @@
  *
  * @todo document
  */
-class OutputPage {
+class OutputPage extends ContextSource {
/// Should be private. Used with addMeta() which adds meta
var $mMetatags = array();
 
@@ -196,8 +196,6 @@
 
var $mFileVersion = null;
 
-   private $mContext;
-
/**
 * An array of stylesheet filenames (relative from skins path), with 
options
 * for CSS media, IE conditions, and RTL/LTR direction.
@@ -226,11 +224,12 @@
 * a OutputPage tied to that context.
 */
function __construct( RequestContext $context = null ) {
-   if ( !isset($context) ) {
+   if ( $context === null ) {
# Extensions should use `new RequestContext` instead of 
`new OutputPage` now.
wfDeprecated( __METHOD__ );
+   } else {
+   $this-setContext( $context );
}
-   $this-mContext = $context;
}
 
/**
@@ -788,29 +787,6 @@
}
 
/**
-* Get the RequestContext used in this instance
-*
-* @return RequestContext
-*/
-   private function getContext() {
-   if ( !isset($this-mContext) ) {
-   wfDebug( __METHOD__ .  called and \$mContext is null. 
Using RequestContext::getMain(); for sanity\n );
-   $this-mContext = RequestContext::getMain();
-   }
-   return $this-mContext;
-   }
-
-   /**
-* Get the WebRequest being used for this instance
-*
-* @return WebRequest
-* @since 1.18
-*/
-   public function getRequest() {
-   return $this-getContext()-getRequest();
-   }
-
-   /**
 * Set the Title object to use
 *
 * @param $t Title object
@@ -819,36 +795,8 @@
$this-getContext()-setTitle( $t );
}
 
-   /**
-* Get the Title object used in this instance
-*
-* @return Title
-*/
-   public function getTitle() {
-   return $this-getContext()-getTitle();
-   }
 
/**
-* Get the User object used in this instance
-*
-* @return User
-* @since 1.18
-*/
-   public function getUser() {
-   return $this-getContext()-getUser();
-   }
-
-   /**
-* Get the Skin object used to render this instance
-*
-* @return Skin
-* @since 1.18
-*/
-   public function getSkin() {
-   return $this-getContext()-getSkin();
-   }
-
-   /**
 * Replace the subtile with $str
 *
 * @param $str String: new value of the subtitle
@@ -2262,15 +2210,15 @@
 * @return String: The doctype, opening html, and head element.
 */
public function headElement( Skin $sk, $includeStyle = true ) {
-   global $wgLang, $wgContLang, $wgUseTrackbacks;
-   $userdir = $wgLang-getDir();
+   global $wgContLang, $wgUseTrackbacks;
+   $userdir = $this-getLang()-getDir();
$sitedir = $wgContLang-getDir();
 
if ( $sk-commonPrintStylesheet() ) {
$this-addModuleStyles( 
'mediawiki.legacy.wikiprintable' );
}
 
-   $ret = Html::htmlHeader( array( 'lang' = $wgLang-getCode(), 
'dir' = $userdir ) );
+   $ret = Html::htmlHeader( array( 'lang' = 
$this-getLang()-getCode(), 'dir' = $userdir ) );
 
if ( $this-getHTMLTitle() == '' ) {
$this-setHTMLTitle( wfMsg( 'pagetitle', 
$this-getPageTitle() ) );
@@ -3088,8 +3036,7 @@
 */
protected function styleLink( $style, $options ) {
if( isset( $options['dir'] ) ) {
-   global $wgLang;
-   if( $wgLang-getDir() != $options['dir'] ) {
+   if( $this-getLang()-getDir() != $options['dir'] ) {
return '';
}
}


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


[MediaWiki-CVS] SVN: [93558] trunk/extensions/Wikidata/OmegaWiki/SpecialSuggest.php

2011-07-30 Thread kipcool
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93558

Revision: 93558
Author:   kipcool
Date: 2011-07-30 19:52:35 + (Sat, 30 Jul 2011)
Log Message:
---
an other attempt at optimized query...

Modified Paths:
--
trunk/extensions/Wikidata/OmegaWiki/SpecialSuggest.php

Modified: trunk/extensions/Wikidata/OmegaWiki/SpecialSuggest.php
===
--- trunk/extensions/Wikidata/OmegaWiki/SpecialSuggest.php  2011-07-30 
19:37:19 UTC (rev 93557)
+++ trunk/extensions/Wikidata/OmegaWiki/SpecialSuggest.php  2011-07-30 
19:52:35 UTC (rev 93558)
@@ -247,10 +247,10 @@
// find the language of the syntrans and add attributes 
of that language by adding the language DM to the list of default classes
// this first query returns the language_id
$sql = 'SELECT language_id' .
-FROM {$dc}_syntrans, {$dc}_expression .
-WHERE {$dc}_syntrans.syntrans_sid =  . 
$syntransId .
-AND {$dc}_expression.expression_id = 
{$dc}_syntrans.expression_id  .
+FROM {$dc}_expression .
+WHERE {$dc}_expression.expression_id = 
(SELECT expression_id FROM {$dc}_syntrans WHERE {$dc}_syntrans.syntrans_sid = 
{$syntransId} LIMIT 1)  .
 LIMIT 1  ;
+
$lang_res = $dbr-query( $sql );
$language_id = $dbr-fetchObject( $lang_res 
)-language_id;
 


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


[MediaWiki-CVS] SVN: [93559] trunk/phase3/includes/specials/SpecialComparePages.php

2011-07-30 Thread ialex
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93559

Revision: 93559
Author:   ialex
Date: 2011-07-30 20:27:32 + (Sat, 30 Jul 2011)
Log Message:
---
Follow-up r93527: $value can also be null when not set

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

Modified: trunk/phase3/includes/specials/SpecialComparePages.php
===
--- trunk/phase3/includes/specials/SpecialComparePages.php  2011-07-30 
19:52:35 UTC (rev 93558)
+++ trunk/phase3/includes/specials/SpecialComparePages.php  2011-07-30 
20:27:32 UTC (rev 93559)
@@ -130,7 +130,7 @@
}
 
public function checkExistingTitle( $value, $alldata ) {
-   if ( $value === '' ) {
+   if ( $value === '' || $value === null ) {
return true;
}
$title = Title::newFromText( $value );
@@ -144,7 +144,7 @@
}
 
public function checkExistingRevision( $value, $alldata ) {
-   if ( $value === '' ) {
+   if ( $value === '' || $value === null ) {
return true;
}
$revision = Revision::newFromId( $value );


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


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

2011-07-30 Thread reedy
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93560

Revision: 93560
Author:   reedy
Date: 2011-07-30 23:31:06 + (Sat, 30 Jul 2011)
Log Message:
---
Per validation errors reported in #wikimedia-tech, urlencode the url

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-07-30 20:27:32 UTC (rev 93559)
+++ branches/wmf/1.17wmf1/extensions/MobileFrontend/MobileFrontend.php  
2011-07-30 23:31:06 UTC (rev 93560)
@@ -110,6 +110,7 @@
$mobileViewUrl = $wgRequest-getRequestURL();
$delimiter = ( strpos( $mobileViewUrl, ? ) !== false ) ?  
: ?;
$mobileViewUrl .= $delimiter . 'useFormat=mobile';
+   $mobileViewUrl = urlencode( $mobileViewUrl );

$tpl-set('mobileview', a href='{$mobileViewUrl}'Mobile 
View/a);
$footerlinks['places'][] = 'mobileview';


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


[MediaWiki-CVS] SVN: [93561]

2011-07-30 Thread reedy
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93561

Revision: 93561
Author:   reedy
Date: 2011-07-31 00:00:08 + (Sun, 31 Jul 2011)
Log Message:
---
htmlspecialchars() on urls outputted to pages

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

Modified: branches/wmf/1.17wmf1/extensions/MobileFrontend/MobileFrontend.php
===
--- branches/wmf/1.17wmf1/extensions/MobileFrontend/MobileFrontend.php  
2011-07-30 23:31:06 UTC (rev 93560)
+++ branches/wmf/1.17wmf1/extensions/MobileFrontend/MobileFrontend.php  
2011-07-31 00:00:08 UTC (rev 93561)
@@ -110,7 +110,7 @@
$mobileViewUrl = $wgRequest-getRequestURL();
$delimiter = ( strpos( $mobileViewUrl, ? ) !== false ) ?  
: ?;
$mobileViewUrl .= $delimiter . 'useFormat=mobile';
-   $mobileViewUrl = urlencode( $mobileViewUrl );
+   $mobileViewUrl = htmlspecialchars( $mobileViewUrl );

$tpl-set('mobileview', a href='{$mobileViewUrl}'Mobile 
View/a);
$footerlinks['places'][] = 'mobileview';

Modified: trunk/extensions/MobileFrontend/MobileFrontend.php
===
--- trunk/extensions/MobileFrontend/MobileFrontend.php  2011-07-30 23:31:06 UTC 
(rev 93560)
+++ trunk/extensions/MobileFrontend/MobileFrontend.php  2011-07-31 00:00:08 UTC 
(rev 93561)
@@ -110,6 +110,7 @@
$mobileViewUrl = $wgRequest-getRequestURL();
$delimiter = ( strpos( $mobileViewUrl, ? ) !== false ) ?  
: ?;
$mobileViewUrl .= $delimiter . 'useFormat=mobile';
+   $mobileViewUrl = htmlspecialchars( $mobileViewUrl );
 
$tpl-set('mobileview', a href='{$mobileViewUrl}'{wfMsg( 
'mobile-frontend-view' )}/a);
$footerlinks['places'][] = 'mobileview';
@@ -239,7 +240,7 @@
// ajax_support_javascript
// html_preferred_dtd
 
-   // Determine  
+   // Determine
 
if (self::$useFormat === 'mobile' ||
self::$useFormat === 'mobile-wap' ) {
@@ -517,7 +518,7 @@
// TODO: Content transformations required
// WML Validator:
// http://validator.w3.org
-   // 
+   //
// div - p
// no style, no class, no h1-h6, sup, sub, ol, ul, li 
etc.
// table requires columns property


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


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

2011-07-30 Thread brion
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93563

Revision: 93563
Author:   brion
Date: 2011-07-31 01:52:38 + (Sun, 31 Jul 2011)
Log Message:
---
* (bug 30131) XCache with variable caching disabled no longer used for variable 
caching (CACHE_ACCEL)

Patch from John Du Hart: 
https://bugzilla.wikimedia.org/attachment.cgi?id=8849action=diff

If XCache is present, but the xcache.var_size setting is off, we'll now 
consider it as xcache being disabled for CACHE_ACCEL purposes. It won't trigger 
view of the accelerator option in the installer, and at runtime if using 
CACHE_ACCEL and no other modules are available, it'll throw an error so you 
know that it doesn't work!

Modified Paths:
--
trunk/phase3/RELEASE-NOTES-1.18
trunk/phase3/includes/installer/Installer.php
trunk/phase3/includes/objectcache/ObjectCache.php

Modified: trunk/phase3/RELEASE-NOTES-1.18
===
--- trunk/phase3/RELEASE-NOTES-1.18 2011-07-31 01:32:19 UTC (rev 93562)
+++ trunk/phase3/RELEASE-NOTES-1.18 2011-07-31 01:52:38 UTC (rev 93563)
@@ -432,6 +432,7 @@
 * (bug 27427) mw.util.getParamValue shouldn't return value from hash even if
   param is only present in hash.
 * Installer checked for magic_quotes_runtime instead of register_globals.
+* (bug 30131) XCache with variable caching disabled no longer used for 
variable caching (CACHE_ACCEL)
 
 === API changes in 1.18 ===
 * BREAKING CHANGE: action=watch now requires POST and token.

Modified: trunk/phase3/includes/installer/Installer.php
===
--- trunk/phase3/includes/installer/Installer.php   2011-07-31 01:32:19 UTC 
(rev 93562)
+++ trunk/phase3/includes/installer/Installer.php   2011-07-31 01:52:38 UTC 
(rev 93563)
@@ -791,6 +791,9 @@
$caches = array();
foreach ( $this-objectCaches as $name = $function ) {
if ( function_exists( $function ) ) {
+   if ( $name == 'xcache'  !wfIniGetBool( 
'xcache.var_size' ) ) {
+   continue;
+   }
$caches[$name] = true;
}
}

Modified: trunk/phase3/includes/objectcache/ObjectCache.php
===
--- trunk/phase3/includes/objectcache/ObjectCache.php   2011-07-31 01:32:19 UTC 
(rev 93562)
+++ trunk/phase3/includes/objectcache/ObjectCache.php   2011-07-31 01:52:38 UTC 
(rev 93563)
@@ -93,7 +93,7 @@
$id = 'eaccelerator';
} elseif ( function_exists( 'apc_fetch') ) {
$id = 'apc';
-   } elseif( function_exists( 'xcache_get' ) ) {
+   } elseif( function_exists( 'xcache_get' )  wfIniGetBool( 
'xcache.var_size' ) ) {
$id = 'xcache';
} elseif( function_exists( 'wincache_ucache_get' ) ) {
$id = 'wincache';


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


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

2011-07-30 Thread brion
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93564

Revision: 93564
Author:   brion
Date: 2011-07-31 02:02:51 + (Sun, 31 Jul 2011)
Log Message:
---
MFT r93563: (bug 30131) XCache with variable caching disabled no longer used 
for variable caching (CACHE_ACCEL)

Modified Paths:
--
branches/REL1_18/phase3/RELEASE-NOTES-1.18
branches/REL1_18/phase3/includes/installer/Installer.php
branches/REL1_18/phase3/includes/objectcache/ObjectCache.php

Modified: branches/REL1_18/phase3/RELEASE-NOTES-1.18
===
--- branches/REL1_18/phase3/RELEASE-NOTES-1.18  2011-07-31 01:52:38 UTC (rev 
93563)
+++ branches/REL1_18/phase3/RELEASE-NOTES-1.18  2011-07-31 02:02:51 UTC (rev 
93564)
@@ -421,6 +421,7 @@
 * (bug 29959) Installer fatal when cURL and allow_url_fopen is disabled and 
user
   tries to subsribe to mediawiki-announce
 * Installer checked for magic_quotes_runtime instead of register_globals.
+* (bug 30131) XCache with variable caching disabled no longer used for 
variable caching (CACHE_ACCEL)
 
 === API changes in 1.18 ===
 * BREAKING CHANGE: action=watch now requires POST and token.

Modified: branches/REL1_18/phase3/includes/installer/Installer.php
===
--- branches/REL1_18/phase3/includes/installer/Installer.php2011-07-31 
01:52:38 UTC (rev 93563)
+++ branches/REL1_18/phase3/includes/installer/Installer.php2011-07-31 
02:02:51 UTC (rev 93564)
@@ -791,6 +791,9 @@
$caches = array();
foreach ( $this-objectCaches as $name = $function ) {
if ( function_exists( $function ) ) {
+   if ( $name == 'xcache'  !wfIniGetBool( 
'xcache.var_size' ) ) {
+   continue;
+   }
$caches[$name] = true;
}
}

Modified: branches/REL1_18/phase3/includes/objectcache/ObjectCache.php
===
--- branches/REL1_18/phase3/includes/objectcache/ObjectCache.php
2011-07-31 01:52:38 UTC (rev 93563)
+++ branches/REL1_18/phase3/includes/objectcache/ObjectCache.php
2011-07-31 02:02:51 UTC (rev 93564)
@@ -93,7 +93,7 @@
$id = 'eaccelerator';
} elseif ( function_exists( 'apc_fetch') ) {
$id = 'apc';
-   } elseif( function_exists( 'xcache_get' ) ) {
+   } elseif( function_exists( 'xcache_get' )  wfIniGetBool( 
'xcache.var_size' ) ) {
$id = 'xcache';
} elseif( function_exists( 'wincache_ucache_get' ) ) {
$id = 'wincache';


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


[MediaWiki-CVS] SVN: [93565] branches/iwtransclusion/phase3v3/includes/LinksUpdate.php

2011-07-30 Thread mah
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93565

Revision: 93565
Author:   mah
Date: 2011-07-31 02:29:11 + (Sun, 31 Jul 2011)
Log Message:
---
Add back one insertion to the templatelinks table that was removed in
the IWTransclusion merge and ended up breaking ArticleTablesTest::testbug14404

Modified Paths:
--
branches/iwtransclusion/phase3v3/includes/LinksUpdate.php

Modified: branches/iwtransclusion/phase3v3/includes/LinksUpdate.php
===
--- branches/iwtransclusion/phase3v3/includes/LinksUpdate.php   2011-07-31 
02:02:51 UTC (rev 93564)
+++ branches/iwtransclusion/phase3v3/includes/LinksUpdate.php   2011-07-31 
02:29:11 UTC (rev 93565)
@@ -380,13 +380,17 @@
if ( count( $insertions ) ) {
if ( isset( $insertions['globaltemplatelinks'] ) ) {
$this-mDb-insert( 'globaltemplatelinks', 
$insertions['globaltemplatelinks'], __METHOD__, 'IGNORE' );
+   unset( $insertions['globaltemplatelinks'] );
}
if ( isset( $insertions['globalnamespaces'] ) ) {
$this-mDb-insert( 'globalnamespaces', 
$insertions['globalnamespaces'], __METHOD__, 'IGNORE' );
+   unset( $insertions['globalnamespaces'] );
}
if ( isset( $insertions['globalinterwiki'] ) ) {
$this-mDb-insert( 'globalinterwiki', 
$insertions['globalinterwiki'], __METHOD__, 'IGNORE' );
+   unset( $insertions['globalinterwiki'] );
}
+   $this-mDb-insert( $table, $insertions, __METHOD__, 
'IGNORE' );
}
}
 


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


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

2011-07-30 Thread kaldari
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93566

Revision: 93566
Author:   kaldari
Date: 2011-07-31 02:55:59 + (Sun, 31 Jul 2011)
Log Message:
---
fix for Bug 30139 - JS error in Chrome

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

Modified: trunk/extensions/CentralNotice/special/SpecialBannerController.php
===
--- trunk/extensions/CentralNotice/special/SpecialBannerController.php  
2011-07-31 02:29:11 UTC (rev 93565)
+++ trunk/extensions/CentralNotice/special/SpecialBannerController.php  
2011-07-31 02:55:59 UTC (rev 93566)
@@ -166,7 +166,7 @@
$script .= \n\t\tvar url = ' . 
Xml::escapeJsString( $wgNoticeFundraisingUrl ) . ';;
$script .= JAVASCRIPT
-   if ( bannerJson.landingPages.length ) {
+   if ( bannerJson.landingPages  bannerJson.landingPages.length 
) {
targets = String( bannerJson.landingPages ).split(',');
url += ? + jQuery.param( {
'landing_page': targets[Math.floor( 
Math.random() * targets.length )].replace( /^\s+|\s+$/, '' )


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


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

2011-07-30 Thread kaldari
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93567

Revision: 93567
Author:   kaldari
Date: 2011-07-31 03:00:48 + (Sun, 31 Jul 2011)
Log Message:
---
follow-up to r93566, more foolproof fix

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

Modified: trunk/extensions/CentralNotice/special/SpecialBannerController.php
===
--- trunk/extensions/CentralNotice/special/SpecialBannerController.php  
2011-07-31 02:55:59 UTC (rev 93566)
+++ trunk/extensions/CentralNotice/special/SpecialBannerController.php  
2011-07-31 03:00:48 UTC (rev 93567)
@@ -166,7 +166,7 @@
$script .= \n\t\tvar url = ' . 
Xml::escapeJsString( $wgNoticeFundraisingUrl ) . ';;
$script .= JAVASCRIPT
-   if ( bannerJson.landingPages  bannerJson.landingPages.length 
) {
+   if ( ( bannerJson.landingPages !== null )  
bannerJson.landingPages.length ) {
targets = String( bannerJson.landingPages ).split(',');
url += ? + jQuery.param( {
'landing_page': targets[Math.floor( 
Math.random() * targets.length )].replace( /^\s+|\s+$/, '' )


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


[MediaWiki-CVS] SVN: [93568] branches/iwtransclusion/phase3v3/includes/parser/Parser.php

2011-07-30 Thread mah
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93568

Revision: 93568
Author:   mah
Date: 2011-07-31 03:13:45 + (Sun, 31 Jul 2011)
Log Message:
---
Add back check for RAW that IWTransclusion branch didn't have.  This
was the reason for a broken parser test.

Modified Paths:
--
branches/iwtransclusion/phase3v3/includes/parser/Parser.php

Modified: branches/iwtransclusion/phase3v3/includes/parser/Parser.php
===
--- branches/iwtransclusion/phase3v3/includes/parser/Parser.php 2011-07-31 
03:00:48 UTC (rev 93567)
+++ branches/iwtransclusion/phase3v3/includes/parser/Parser.php 2011-07-31 
03:13:45 UTC (rev 93568)
@@ -3131,6 +3131,12 @@
$mwMsg = MagicWord::get( 'msg' );
$mwMsg-matchStartAndRemove( $part1 );
}
+
+   # Check for RAW:
+   $mwRaw = MagicWord::get( 'raw' );
+   if ( $mwRaw-matchStartAndRemove( $part1 ) ) {
+   $forceRawInterwiki = true;
+   }
}
wfProfileOut( __METHOD__.'-modifiers' );
 


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


[MediaWiki-CVS] SVN: [93569] trunk/extensions/Favorites

2011-07-30 Thread jlemley
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93569

Revision: 93569
Author:   jlemley
Date: 2011-07-31 05:03:36 + (Sun, 31 Jul 2011)
Log Message:
---
Added support for pre 1.18 non-vector skins.

Modified Paths:
--
trunk/extensions/Favorites/Favorites.php
trunk/extensions/Favorites/Favorites_body.php

Modified: trunk/extensions/Favorites/Favorites.php
===
--- trunk/extensions/Favorites/Favorites.php2011-07-31 03:13:45 UTC (rev 
93568)
+++ trunk/extensions/Favorites/Favorites.php2011-07-31 05:03:36 UTC (rev 
93569)
@@ -22,7 +22,7 @@
'name' = 'Favorites',
'author' = 'Jeremy Lemley',
'descriptionmsg' = 'favorites-desc',
-   'version' = '0.0.5',
+   'version' = '0.0.6',
'url' = http://www.mediawiki.org/wiki/Extension:Favorites;,
 );
 
@@ -49,7 +49,8 @@
 
 
 //add the icon / link
-$wgHooks['SkinTemplateNavigation'][] = 'fnNavUrls';
+$wgHooks['SkinTemplateNavigation'][] = 'fnNavUrls';  // For Vector
+$wgHooks['SkinTemplateTabs'][] = 'fnNavTabs';  // For other skins
 
 //add or remove
 $wgHooks['UnknownAction'][] = 'fnAction';
@@ -76,12 +77,19 @@
return false;
 }
 
-function fnNavUrls($sktemplate, $links) {
+function fnNavUrls($sktemplate, $links) {
$fNav = new Favorites();
$fNav-favoritesIcon($sktemplate, $links);
return true;
 }
 
+function fnNavTabs( $skin, $content_actions ){
+   $fNav = new Favorites();
+   $fNav-favoritesTabs($skin, $content_actions);
+   return true;
+}
+
+
 function fnHookMoveToFav($title, $nt, $wgUser, $pageid, $redirid ) {
$favTitle = new FavTitle();
$favTitle-moveToFav($title, $nt, $wgUser, $pageid, $redirid );

Modified: trunk/extensions/Favorites/Favorites_body.php
===
--- trunk/extensions/Favorites/Favorites_body.php   2011-07-31 03:13:45 UTC 
(rev 93568)
+++ trunk/extensions/Favorites/Favorites_body.php   2011-07-31 05:03:36 UTC 
(rev 93569)
@@ -17,7 +17,7 @@

// See if this object even exists - if the user can't read it, the 
object doesn't get created.
if ($wgArticle) {  
-   
+   
if ( $wgUseIconFavorite ) {

$class = 'icon ';
@@ -41,8 +41,25 @@
}

 }
+
+function favoritesTabs($skin, $content_actions) {
+   global $wgUseIconFavorite, $wgRequest, $wgArticle;
+   
+   $action = $wgRequest-getText( 'action' );
+   $favTitle = new FavTitle();
+   $mode = $favTitle-userIsFavoriting() ? 'unfavorite' : 'favorite';
+   // See if this object even exists - if the user can't read it, the 
object doesn't get created.
+   if ($wgArticle) {
+$content_actions['newtab'] = array (
+   'class' = (( $action == 'favorite' || $action == 
'unfavorite' ) ? ' selected' : false ),
+   'text' = wfMsg( $mode ), // uses 'favorite' or 
'unfavorite' message
+   'href' = $wgArticle-mTitle-getLocalUrl( 'action=' . 
$mode )
+   );
+   return true;
+   }
+
  
 }
 
+}
 
-


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


[MediaWiki-CVS] SVN: [93570] branches/REL1_17/extensions/Favorites

2011-07-30 Thread jlemley
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93570

Revision: 93570
Author:   jlemley
Date: 2011-07-31 05:04:00 + (Sun, 31 Jul 2011)
Log Message:
---
Added support for pre 1.18 non-vector skins.

Modified Paths:
--
branches/REL1_17/extensions/Favorites/Favorites.php
branches/REL1_17/extensions/Favorites/Favorites_body.php

Modified: branches/REL1_17/extensions/Favorites/Favorites.php
===
--- branches/REL1_17/extensions/Favorites/Favorites.php 2011-07-31 05:03:36 UTC 
(rev 93569)
+++ branches/REL1_17/extensions/Favorites/Favorites.php 2011-07-31 05:04:00 UTC 
(rev 93570)
@@ -22,7 +22,7 @@
'name' = 'Favorites',
'author' = 'Jeremy Lemley',
'descriptionmsg' = 'favorites-desc',
-   'version' = '0.0.5',
+   'version' = '0.0.6',
'url' = http://www.mediawiki.org/wiki/Extension:Favorites;,
 );
 
@@ -49,7 +49,8 @@
 
 
 //add the icon / link
-$wgHooks['SkinTemplateNavigation'][] = 'fnNavUrls';
+$wgHooks['SkinTemplateNavigation'][] = 'fnNavUrls';  // For Vector
+$wgHooks['SkinTemplateTabs'][] = 'fnNavTabs';  // For other skins
 
 //add or remove
 $wgHooks['UnknownAction'][] = 'fnAction';
@@ -76,12 +77,19 @@
return false;
 }
 
-function fnNavUrls($sktemplate, $links) {
+function fnNavUrls($sktemplate, $links) {
$fNav = new Favorites();
$fNav-favoritesIcon($sktemplate, $links);
return true;
 }
 
+function fnNavTabs( $skin, $content_actions ){
+   $fNav = new Favorites();
+   $fNav-favoritesTabs($skin, $content_actions);
+   return true;
+}
+
+
 function fnHookMoveToFav($title, $nt, $wgUser, $pageid, $redirid ) {
$favTitle = new FavTitle();
$favTitle-moveToFav($title, $nt, $wgUser, $pageid, $redirid );

Modified: branches/REL1_17/extensions/Favorites/Favorites_body.php
===
--- branches/REL1_17/extensions/Favorites/Favorites_body.php2011-07-31 
05:03:36 UTC (rev 93569)
+++ branches/REL1_17/extensions/Favorites/Favorites_body.php2011-07-31 
05:04:00 UTC (rev 93570)
@@ -17,7 +17,7 @@

// See if this object even exists - if the user can't read it, the 
object doesn't get created.
if ($wgArticle) {  
-   
+   
if ( $wgUseIconFavorite ) {

$class = 'icon ';
@@ -41,8 +41,25 @@
}

 }
+
+function favoritesTabs($skin, $content_actions) {
+   global $wgUseIconFavorite, $wgRequest, $wgArticle;
+   
+   $action = $wgRequest-getText( 'action' );
+   $favTitle = new FavTitle();
+   $mode = $favTitle-userIsFavoriting() ? 'unfavorite' : 'favorite';
+   // See if this object even exists - if the user can't read it, the 
object doesn't get created.
+   if ($wgArticle) {
+$content_actions['newtab'] = array (
+   'class' = (( $action == 'favorite' || $action == 
'unfavorite' ) ? ' selected' : false ),
+   'text' = wfMsg( $mode ), // uses 'favorite' or 
'unfavorite' message
+   'href' = $wgArticle-mTitle-getLocalUrl( 'action=' . 
$mode )
+   );
+   return true;
+   }
+
  
 }
 
+}
 
-


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


[MediaWiki-CVS] SVN: [93571] branches/REL1_16/extensions/Favorites

2011-07-30 Thread jlemley
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93571

Revision: 93571
Author:   jlemley
Date: 2011-07-31 05:04:20 + (Sun, 31 Jul 2011)
Log Message:
---
Added support for non-vector skins.

Modified Paths:
--
branches/REL1_16/extensions/Favorites/Favorites.php
branches/REL1_16/extensions/Favorites/Favorites_body.php

Modified: branches/REL1_16/extensions/Favorites/Favorites.php
===
--- branches/REL1_16/extensions/Favorites/Favorites.php 2011-07-31 05:04:00 UTC 
(rev 93570)
+++ branches/REL1_16/extensions/Favorites/Favorites.php 2011-07-31 05:04:20 UTC 
(rev 93571)
@@ -22,7 +22,7 @@
'name' = 'Favorites',
'author' = 'Jeremy Lemley',
'descriptionmsg' = 'favorites-desc',
-   'version' = '0.0.4',
+   'version' = '0.0.6',
'url' = http://www.mediawiki.org/wiki/Extension:Favorites;,
 );
 
@@ -49,7 +49,8 @@
 
 
 //add the icon / link
-$wgHooks['SkinTemplateNavigation'][] = 'fnNavUrls';
+$wgHooks['SkinTemplateNavigation'][] = 'fnNavUrls';  // For Vector
+$wgHooks['SkinTemplateTabs'][] = 'fnNavTabs';  // For other skins
 
 //add or remove
 $wgHooks['UnknownAction'][] = 'fnAction';
@@ -76,12 +77,19 @@
return false;
 }
 
-function fnNavUrls($sktemplate, $links) {
+function fnNavUrls($sktemplate, $links) {
$fNav = new Favorites();
$fNav-favoritesIcon($sktemplate, $links);
return true;
 }
 
+function fnNavTabs( $skin, $content_actions ){
+   $fNav = new Favorites();
+   $fNav-favoritesTabs($skin, $content_actions);
+   return true;
+}
+
+
 function fnHookMoveToFav($title, $nt, $wgUser, $pageid, $redirid ) {
$favTitle = new FavTitle();
$favTitle-moveToFav($title, $nt, $wgUser, $pageid, $redirid );

Modified: branches/REL1_16/extensions/Favorites/Favorites_body.php
===
--- branches/REL1_16/extensions/Favorites/Favorites_body.php2011-07-31 
05:04:00 UTC (rev 93570)
+++ branches/REL1_16/extensions/Favorites/Favorites_body.php2011-07-31 
05:04:20 UTC (rev 93571)
@@ -17,7 +17,7 @@

// See if this object even exists - if the user can't read it, the 
object doesn't get created.
if ($wgArticle) {  
-   
+   
if ( $wgUseIconFavorite ) {

$class = 'icon ';
@@ -41,8 +41,25 @@
}

 }
+
+function favoritesTabs($skin, $content_actions) {
+   global $wgUseIconFavorite, $wgRequest, $wgArticle;
+   
+   $action = $wgRequest-getText( 'action' );
+   $favTitle = new FavTitle();
+   $mode = $favTitle-userIsFavoriting() ? 'unfavorite' : 'favorite';
+   // See if this object even exists - if the user can't read it, the 
object doesn't get created.
+   if ($wgArticle) {
+$content_actions['newtab'] = array (
+   'class' = (( $action == 'favorite' || $action == 
'unfavorite' ) ? ' selected' : false ),
+   'text' = wfMsg( $mode ), // uses 'favorite' or 
'unfavorite' message
+   'href' = $wgArticle-mTitle-getLocalUrl( 'action=' . 
$mode )
+   );
+   return true;
+   }
+
  
 }
 
+}
 
-


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


[MediaWiki-CVS] SVN: [93572] trunk/extensions/Narayam/ext.narayam.core.js

2011-07-30 Thread brion
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93572

Revision: 93572
Author:   brion
Date: 2011-07-31 05:14:46 + (Sun, 31 Jul 2011)
Log Message:
---
* (bug 30144) Fixed Narayam stealing command shortcut keys on Mac Firefox, 
Safari

Modified Paths:
--
trunk/extensions/Narayam/ext.narayam.core.js

Modified: trunk/extensions/Narayam/ext.narayam.core.js
===
--- trunk/extensions/Narayam/ext.narayam.core.js2011-07-31 05:04:20 UTC 
(rev 93571)
+++ trunk/extensions/Narayam/ext.narayam.core.js2011-07-31 05:14:46 UTC 
(rev 93572)
@@ -186,7 +186,7 @@

// Leave non-ASCII stuff alone, as well as anything involving
// Alt (except for extended keymaps), Ctrl and Meta
-   if ( e.which  32 || ( e.altKey  
!currentScheme.extended_keyboard ) || e.ctrlKey ) {
+   if ( e.which  32 || ( e.altKey  
!currentScheme.extended_keyboard ) || e.ctrlKey || e.metaKey ) {
return true;
}



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


[MediaWiki-CVS] SVN: [93573] trunk/extensions/Favorites/README

2011-07-30 Thread jlemley
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93573

Revision: 93573
Author:   jlemley
Date: 2011-07-31 05:33:28 + (Sun, 31 Jul 2011)
Log Message:
---
Added README file.

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

Added: trunk/extensions/Favorites/README
===
--- trunk/extensions/Favorites/README   (rev 0)
+++ trunk/extensions/Favorites/README   2011-07-31 05:33:28 UTC (rev 93573)
@@ -0,0 +1,33 @@
+This extension provides the ability for users to create a list of favorites.  
It works separately from the Watchlist, and provides the ability to also embed 
your users' lists of favorites on a page (such as on the main page).  
+
+
+== Database schema ==
+
+A 'favoritelist' table is added to the wiki's database.  This table contains 
the list of items that have been added to each user's favorite list. 
+
+The table must be present for the wiki to function once the extension is 
enabled
+
+
+== Installation ==
+
+To enable the extension, add the following line to your LocalSettings.php file:
+
+ require_once($IP/extensions/Favorites/Favorites.php);
+
+
+You must then create and populate the new database table.
+
+The easiest way to do this is to run MediaWiki's standard updater:
+   
+ php maintenance/update.php
+
+
+If you do not have command-line access to your server, you can manually apply 
the favorites.sql file's commands to your database (check for proper table 
prefix, etc).
+
+
+== Configuration Parameters ==
+
+If using the Vector skin, you may want to also add the Star icon to your 
navigation bar.  To do this, add the following line '''above''' the 
require_once line in your LocalSettings.php file:
+
+ $wgUseIconFavorite = true;
+


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