[MediaWiki-CVS] SVN: [69581] trunk/phase3/maintenance

2010-07-19 Thread overlordq
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/69581

Revision: 69581
Author:   overlordq
Date: 2010-07-20 06:02:09 + (Tue, 20 Jul 2010)

Log Message:
---
Followup to r69580, did I mention MySQL sucks?

Modified Paths:
--
trunk/phase3/maintenance/postgres/tables.sql
trunk/phase3/maintenance/updaters.inc

Modified: trunk/phase3/maintenance/postgres/tables.sql
===
--- trunk/phase3/maintenance/postgres/tables.sql2010-07-20 05:59:51 UTC 
(rev 69580)
+++ trunk/phase3/maintenance/postgres/tables.sql2010-07-20 06:02:09 UTC 
(rev 69581)
@@ -393,8 +393,8 @@
   iw_url TEXT  NOT NULL,
   iw_local   SMALLINT  NOT NULL,
   iw_trans   SMALLINT  NOT NULL  DEFAULT 0,
-  iw_api TEXT  NOT NULL,
-  iw_wikiid  TEXT  NOT NULL,
+  iw_api TEXT  NOT NULL  DEFAULT '',
+  iw_wikiid  TEXT  NOT NULL  DEFAULT '',
 );
 
 

Modified: trunk/phase3/maintenance/updaters.inc
===
--- trunk/phase3/maintenance/updaters.inc   2010-07-20 05:59:51 UTC (rev 
69580)
+++ trunk/phase3/maintenance/updaters.inc   2010-07-20 06:02:09 UTC (rev 
69581)
@@ -1436,8 +1436,8 @@
array( "user_newtalk",  "user_last_timestamp",  "TIMESTAMPTZ" ),
array( "logging",   "log_user_text","TEXT NOT NULL 
DEFAULT ''" ),
array( "logging",   "log_page", "INTEGER" ),
-   array( "interwiki", "iw_api",   "TEXT NOT 
NULL"),
-   array( "interwiki", "iw_wikiid","TEXT NOT 
NULL"),
+   array( "interwiki", "iw_api",   "TEXT NOT NULL 
DEFAULT ''"),
+   array( "interwiki", "iw_wikiid","TEXT NOT NULL 
DEFAULT ''"),
);
 
 



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


[MediaWiki-CVS] SVN: [69580] trunk/phase3/maintenance

2010-07-19 Thread overlordq
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/69580

Revision: 69580
Author:   overlordq
Date: 2010-07-20 05:59:51 + (Tue, 20 Jul 2010)

Log Message:
---
Followup to r69542, since the new installer doesn't support PG, this is going 
into updaters.inc

Modified Paths:
--
trunk/phase3/maintenance/postgres/tables.sql
trunk/phase3/maintenance/updaters.inc

Modified: trunk/phase3/maintenance/postgres/tables.sql
===
--- trunk/phase3/maintenance/postgres/tables.sql2010-07-20 02:49:55 UTC 
(rev 69579)
+++ trunk/phase3/maintenance/postgres/tables.sql2010-07-20 05:59:51 UTC 
(rev 69580)
@@ -392,7 +392,9 @@
   iw_prefix  TEXT  NOT NULL  UNIQUE,
   iw_url TEXT  NOT NULL,
   iw_local   SMALLINT  NOT NULL,
-  iw_trans   SMALLINT  NOT NULL  DEFAULT 0
+  iw_trans   SMALLINT  NOT NULL  DEFAULT 0,
+  iw_api TEXT  NOT NULL,
+  iw_wikiid  TEXT  NOT NULL,
 );
 
 

Modified: trunk/phase3/maintenance/updaters.inc
===
--- trunk/phase3/maintenance/updaters.inc   2010-07-20 02:49:55 UTC (rev 
69579)
+++ trunk/phase3/maintenance/updaters.inc   2010-07-20 05:59:51 UTC (rev 
69580)
@@ -1436,6 +1436,8 @@
array( "user_newtalk",  "user_last_timestamp",  "TIMESTAMPTZ" ),
array( "logging",   "log_user_text","TEXT NOT NULL 
DEFAULT ''" ),
array( "logging",   "log_page", "INTEGER" ),
+   array( "interwiki", "iw_api",   "TEXT NOT 
NULL"),
+   array( "interwiki", "iw_wikiid","TEXT NOT 
NULL"),
);
 
 



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


[MediaWiki-CVS] SVN: [69579] branches/REL1_15

2010-07-19 Thread tstarling
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/69579

Revision: 69579
Author:   tstarling
Date: 2010-07-20 02:49:55 + (Tue, 20 Jul 2010)

Log Message:
---
Revert backport (r69376) of broken API cache header bug fix r69339.

Modified Paths:
--
branches/REL1_15/extensions/GlobalBlocking/ApiQueryGlobalBlocks.php
branches/REL1_15/phase3/includes/api/ApiLogout.php
branches/REL1_15/phase3/includes/api/ApiMain.php
branches/REL1_15/phase3/includes/api/ApiParse.php
branches/REL1_15/phase3/includes/api/ApiPatrol.php
branches/REL1_15/phase3/includes/api/ApiPurge.php
branches/REL1_15/phase3/includes/api/ApiQueryAllmessages.php
branches/REL1_15/phase3/includes/api/ApiQueryBlocks.php
branches/REL1_15/phase3/includes/api/ApiQueryDeletedrevs.php
branches/REL1_15/phase3/includes/api/ApiQueryInfo.php
branches/REL1_15/phase3/includes/api/ApiQueryRecentChanges.php
branches/REL1_15/phase3/includes/api/ApiQueryRevisions.php
branches/REL1_15/phase3/includes/api/ApiQueryUserContributions.php
branches/REL1_15/phase3/includes/api/ApiQueryUserInfo.php
branches/REL1_15/phase3/includes/api/ApiQueryWatchlist.php
branches/REL1_15/phase3/includes/api/ApiQueryWatchlistRaw.php
branches/REL1_15/phase3/includes/api/ApiWatch.php

Property Changed:

branches/REL1_15/extensions/CategoryWatch/CategoryWatch.i18n.php

branches/REL1_15/extensions/ContributionReporting/ContributionReporting.i18n.php
branches/REL1_15/extensions/DataCenter/Resources/Icons/Dialog/Error.png
branches/REL1_15/extensions/DataCenter/Resources/Icons/Dialog/Error.svg
branches/REL1_15/extensions/DataCenter/Resources/Icons/Dialog/Important.png
branches/REL1_15/extensions/DataCenter/Resources/Icons/Dialog/Important.svg
branches/REL1_15/extensions/DataCenter/Resources/Icons/Dialog/Notice.png
branches/REL1_15/extensions/DataCenter/Resources/Icons/Dialog/Notice.svg
branches/REL1_15/extensions/DataCenter/Views/Settings/Field.php
branches/REL1_15/extensions/Drafts/Drafts.classes.php
branches/REL1_15/extensions/Drafts/Drafts.pages.php
branches/REL1_15/extensions/Duplicator/Duplicator.alias.php
branches/REL1_15/extensions/EmailPage/
branches/REL1_15/extensions/EmailPage/EmailPage.alias.php
branches/REL1_15/extensions/EmailPage/EmailPage.i18n.php
branches/REL1_15/extensions/EmailPage/EmailPage.php
branches/REL1_15/extensions/EmailPage/EmailPage_body.php
branches/REL1_15/extensions/Farmer/SpecialFarmer.php
branches/REL1_15/extensions/GlobalBlocking/ApiQueryGlobalBlocks.php

branches/REL1_15/extensions/GroupPermissionsManager/GroupPermissionsManager.i18n.php

branches/REL1_15/extensions/GroupPermissionsManager/GroupPermissionsManager.php

branches/REL1_15/extensions/GroupPermissionsManager/GroupPermissionsManager_body.php
branches/REL1_15/extensions/LogEntry/LogEntry.page.php
branches/REL1_15/extensions/Lua/Lua.wrapper.php

branches/REL1_15/extensions/MetavidWiki/skins/mv_embed/example_usage/sample_timed_text.php
branches/REL1_15/extensions/MetavidWiki/skins/mv_embed/libAddMedia/

branches/REL1_15/extensions/MetavidWiki/skins/mv_embed/libAddMedia/mvFirefogg.js

branches/REL1_15/extensions/MetavidWiki/skins/mv_embed/libAddMedia/mvUploader.js

branches/REL1_15/extensions/MetavidWiki/skins/mv_embed/libAddMedia/remoteSearchDriver.js

branches/REL1_15/extensions/MetavidWiki/skins/mv_embed/libAddMedia/searchLibs/archiveOrgSearch.js

branches/REL1_15/extensions/MetavidWiki/skins/mv_embed/libClipEdit/mvClipEdit.js
branches/REL1_15/extensions/MetavidWiki/skins/mv_embed/libEmbedObj/

branches/REL1_15/extensions/MetavidWiki/skins/mv_embed/libEmbedObj/mv_baseEmbed.js

branches/REL1_15/extensions/MetavidWiki/skins/mv_embed/libEmbedObj/mv_flashEmbed.js

branches/REL1_15/extensions/MetavidWiki/skins/mv_embed/libEmbedObj/mv_genericEmbed.js

branches/REL1_15/extensions/MetavidWiki/skins/mv_embed/libEmbedObj/mv_javaEmbed.js

branches/REL1_15/extensions/MetavidWiki/skins/mv_embed/libEmbedObj/mv_nativeEmbed.js

branches/REL1_15/extensions/MetavidWiki/skins/mv_embed/libEmbedObj/mv_oggplayEmbed.js

branches/REL1_15/extensions/MetavidWiki/skins/mv_embed/libEmbedObj/mv_quicktimeEmbed.js

branches/REL1_15/extensions/MetavidWiki/skins/mv_embed/libEmbedObj/mv_vlcEmbed.js

branches/REL1_15/extensions/MetavidWiki/skins/mv_embed/libSequencer/mvPlayList.js

branches/REL1_15/extensions/MetavidWiki/skins/mv_embed/libSequencer/mvSequencer.js
branches/REL1_15/extensions/MetavidWiki/skins/mv_embed/libTimedText/

branches/REL1_15/extensions/MetavidWiki/skins/mv_embed/libTimedText/mvTextInterface.js
branches/REL1_15/extensions/MetavidWiki/skins/mv_sequence_page.js.off
branches/REL1_15/extensions/NewsChannel/NewsChannel.class.php
branches/REL1_15/extensions/OtherSites/OtherSites.i18n.php
branches/REL1_15/extensions/RdfRedl

[MediaWiki-CVS] SVN: [69578] branches/REL1_16

2010-07-19 Thread tstarling
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/69578

Revision: 69578
Author:   tstarling
Date: 2010-07-20 02:46:20 + (Tue, 20 Jul 2010)

Log Message:
---
Revert backport of broken bug fix for the API cache header bug. Reverted r69354 
and related backports r69355, r69357, r69367, r69370.

Modified Paths:
--
branches/REL1_16/extensions/AbuseFilter/ApiQueryAbuseFilters.php
branches/REL1_16/extensions/AbuseFilter/ApiQueryAbuseLog.php
branches/REL1_16/extensions/CentralAuth/ApiQueryGlobalUserInfo.php
branches/REL1_16/extensions/CodeReview/api/ApiCodeComments.php
branches/REL1_16/extensions/CodeReview/api/ApiCodeDiff.php
branches/REL1_16/extensions/CodeReview/api/ApiCodeUpdate.php
branches/REL1_16/extensions/FlaggedRevs/api/ApiQueryOldreviewedpages.php
branches/REL1_16/extensions/GlobalBlocking/ApiQueryGlobalBlocks.php
branches/REL1_16/extensions/LiquidThreads/api/ApiQueryLQTThreads.php

branches/REL1_16/extensions/UsabilityInitiative/ClickTracking/ApiClickTracking.php
branches/REL1_16/phase3/includes/api/ApiLogout.php
branches/REL1_16/phase3/includes/api/ApiMain.php
branches/REL1_16/phase3/includes/api/ApiParse.php
branches/REL1_16/phase3/includes/api/ApiPatrol.php
branches/REL1_16/phase3/includes/api/ApiPurge.php
branches/REL1_16/phase3/includes/api/ApiQueryAllmessages.php
branches/REL1_16/phase3/includes/api/ApiQueryBlocks.php
branches/REL1_16/phase3/includes/api/ApiQueryDeletedrevs.php
branches/REL1_16/phase3/includes/api/ApiQueryInfo.php
branches/REL1_16/phase3/includes/api/ApiQueryLogEvents.php
branches/REL1_16/phase3/includes/api/ApiQueryProtectedTitles.php
branches/REL1_16/phase3/includes/api/ApiQueryRecentChanges.php
branches/REL1_16/phase3/includes/api/ApiQueryRevisions.php
branches/REL1_16/phase3/includes/api/ApiQueryUserContributions.php
branches/REL1_16/phase3/includes/api/ApiQueryUserInfo.php
branches/REL1_16/phase3/includes/api/ApiQueryUsers.php
branches/REL1_16/phase3/includes/api/ApiQueryWatchlist.php
branches/REL1_16/phase3/includes/api/ApiQueryWatchlistRaw.php
branches/REL1_16/phase3/includes/api/ApiWatch.php

Property Changed:

branches/REL1_16/extensions/SecurePoll/includes/ballots/Ballot.php
branches/REL1_16/extensions/SecurePoll/includes/crypt/Crypt.php
branches/REL1_16/extensions/SecurePoll/includes/crypt/Random.php
branches/REL1_16/extensions/SecurePoll/includes/entities/Election.php
branches/REL1_16/extensions/SecurePoll/includes/entities/Entity.php
branches/REL1_16/extensions/SecurePoll/includes/entities/Option.php
branches/REL1_16/extensions/SecurePoll/includes/entities/Question.php
branches/REL1_16/extensions/SecurePoll/includes/main/Base.php
branches/REL1_16/extensions/SecurePoll/includes/main/Context.php
branches/REL1_16/extensions/SecurePoll/includes/main/Store.php
branches/REL1_16/extensions/SecurePoll/includes/pages/DetailsPage.php
branches/REL1_16/extensions/SecurePoll/includes/pages/DumpPage.php
branches/REL1_16/extensions/SecurePoll/includes/pages/EntryPage.php
branches/REL1_16/extensions/SecurePoll/includes/pages/ListPage.php
branches/REL1_16/extensions/SecurePoll/includes/pages/LoginPage.php
branches/REL1_16/extensions/SecurePoll/includes/pages/MessageDumpPage.php
branches/REL1_16/extensions/SecurePoll/includes/pages/Page.php
branches/REL1_16/extensions/SecurePoll/includes/pages/TallyPage.php
branches/REL1_16/extensions/SecurePoll/includes/pages/TranslatePage.php
branches/REL1_16/extensions/SecurePoll/includes/pages/VotePage.php
branches/REL1_16/extensions/SecurePoll/includes/talliers/ElectionTallier.php
branches/REL1_16/extensions/SecurePoll/includes/talliers/Tallier.php
branches/REL1_16/extensions/SecurePoll/includes/user/Auth.php
branches/REL1_16/extensions/SecurePoll/includes/user/Voter.php
branches/REL1_16/extensions/UsabilityInitiative/js/plugins/jquery.cookie.js

branches/REL1_16/extensions/UsabilityInitiative/js/plugins/jquery.textSelection.js

Modified: branches/REL1_16/extensions/AbuseFilter/ApiQueryAbuseFilters.php
===
--- branches/REL1_16/extensions/AbuseFilter/ApiQueryAbuseFilters.php
2010-07-20 02:19:10 UTC (rev 69577)
+++ branches/REL1_16/extensions/AbuseFilter/ApiQueryAbuseFilters.php
2010-07-20 02:46:20 UTC (rev 69578)
@@ -36,7 +36,6 @@
 
public function execute() {
global $wgUser;
-   $this->getMain()->setVaryCookie();
if ( !$wgUser->isAllowed( 'abusefilter-view' ) )
$this->dieUsage( 'You don\'t have permission to view 
abuse filters', 'permissiondenied' );
 

Modified: branches/REL1_16/extensions/AbuseFilter/ApiQueryAbuseLog.php
===
--- branches/REL1_16/extensions/AbuseFilter/ApiQ

[MediaWiki-CVS] SVN: [69577] trunk/extensions/SemanticMediaWiki/includes/storage/ SMW_SQLStore2.php

2010-07-19 Thread jeroendedauw
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/69577

Revision: 69577
Author:   jeroendedauw
Date: 2010-07-20 02:19:10 + (Tue, 20 Jul 2010)

Log Message:
---
Doc improvement

Modified Paths:
--
trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php

Modified: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php
===
--- trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php   
2010-07-20 02:17:18 UTC (rev 69576)
+++ trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php   
2010-07-20 02:19:10 UTC (rev 69577)
@@ -298,7 +298,7 @@
 *
 * @param $id
 * @param $object
-* @param $proptable
+* @param SMWSQLStore2Table $proptable
 * @param boolean $issubject
 * @param SMWRequestOptions $requestoptions
 *



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


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

2010-07-19 Thread tstarling
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/69576

Revision: 69576
Author:   tstarling
Date: 2010-07-20 02:17:18 + (Tue, 20 Jul 2010)

Log Message:
---
Fix URL for $GLOBALS overwrite vulnerability.

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

Modified: trunk/phase3/includes/WebStart.php
===
--- trunk/phase3/includes/WebStart.php  2010-07-20 00:51:25 UTC (rev 69575)
+++ trunk/phase3/includes/WebStart.php  2010-07-20 02:17:18 UTC (rev 69576)
@@ -8,7 +8,7 @@
 # This must be done before any globals are set by the code
 if ( ini_get( 'register_globals' ) ) {
if ( isset( $_REQUEST['GLOBALS'] ) ) {
-   die( 'http://www.hardened-php.net/index.76.html";>$GLOBALS overwrite 
vulnerability');
+   die( 'http://www.hardened-php.net/globals-problem";>$GLOBALS overwrite 
vulnerability');
}
$verboten = array(
'GLOBALS',



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


[MediaWiki-CVS] SVN: [69575] trunk/extensions/DataTransfer/specials/DT_ImportCSV.php

2010-07-19 Thread yaron
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/69575

Revision: 69575
Author:   yaron
Date: 2010-07-20 00:51:25 + (Tue, 20 Jul 2010)

Log Message:
---
Added input for user to enter edit summary; formatNum() added for display of 
number of pages

Modified Paths:
--
trunk/extensions/DataTransfer/specials/DT_ImportCSV.php

Modified: trunk/extensions/DataTransfer/specials/DT_ImportCSV.php
===
--- trunk/extensions/DataTransfer/specials/DT_ImportCSV.php 2010-07-20 
00:34:15 UTC (rev 69574)
+++ trunk/extensions/DataTransfer/specials/DT_ImportCSV.php 2010-07-20 
00:51:25 UTC (rev 69575)
@@ -79,14 +79,18 @@
$encoding = $wgRequest->getVal( 'encoding' );
$pages = array();
$error_msg = self::getCSVData( 
$source->mHandle, $encoding, $pages );
-   if ( ! is_null( $error_msg ) )
+   if ( ! is_null( $error_msg ) ) {
$text .= $error_msg;
-   else
-   $text .= self::modifyPages( $pages );
+   } else {
+   $importSummary = $wgRequest->getVal( 
'import_summary' );
+   $text .= self::modifyPages( $pages, 
$importSummary );
+   }
}
} else {
$select_file_label = wfMsg( 'dt_import_selectfile', 
'CSV' );
$encoding_type_label = wfMsg( 'dt_import_encodingtype' 
);
+   $import_summary_label = wfMsg( 'dt_import_summarydesc' 
);
+   $default_summary = wfMsgForContent( 
'dt_import_editsummary', 'CSV' );
$import_button = wfMsg( 'import-interwiki-submit' );
$text = <<$select_file_label
@@ -95,7 +99,10 @@
$encoding_type_label: 
UTF-8
UTF-16
-   
+   
+   $import_summary_label
+   
+   


 
@@ -160,24 +167,26 @@
}
}
 
-   function modifyPages( $pages ) {
+   function modifyPages( $pages, $editSummary ) {
+   global $wgUser, $wgLang;
+   
$text = "";
$jobs = array();
-   $job_params = array();
-   global $wgUser;
-   $job_params['user_id'] = $wgUser->getId();
-   $job_params['edit_summary'] = wfMsgForContent( 
'dt_import_editsummary', 'CSV' );
+   $jobParams = array();
+   $jobParams['user_id'] = $wgUser->getId();
+   $jobParams['edit_summary'] = $editSummary;
foreach ( $pages as $page ) {
$title = Title::newFromText( $page->getName() );
if ( is_null( $title ) ) {
$text .= '' . wfMsg( 'img-auth-badtitle', 
$page->getName() ) . "\n";
continue;
}
-   $job_params['text'] = $page->createText();
-   $jobs[] = new DTImportJob( $title, $job_params );
+   $jobParams['text'] = $page->createText();
+   $jobs[] = new DTImportJob( $title, $jobParams );
}
Job::batchInsert( $jobs );
-   $text .= wfMsg( 'dt_import_success', count( $jobs ), 'CSV' );
+   $text .= wfMsgExt( 'dt_import_success', array( 'parse' ),  
$wgLang->formatNum( count( $jobs ) ), 'CSV' );
+
return $text;
}
 



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


[MediaWiki-CVS] SVN: [69574] trunk/extensions/DataTransfer/languages/DT_Messages.php

2010-07-19 Thread yaron
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/69574

Revision: 69574
Author:   yaron
Date: 2010-07-20 00:34:15 + (Tue, 20 Jul 2010)

Log Message:
---
Added 'dt_import_summarydesc' message

Modified Paths:
--
trunk/extensions/DataTransfer/languages/DT_Messages.php

Modified: trunk/extensions/DataTransfer/languages/DT_Messages.php
===
--- trunk/extensions/DataTransfer/languages/DT_Messages.php 2010-07-19 
23:23:06 UTC (rev 69573)
+++ trunk/extensions/DataTransfer/languages/DT_Messages.php 2010-07-20 
00:34:15 UTC (rev 69574)
@@ -30,6 +30,7 @@
'importxml'   => 'Import XML',
'dt_import_selectfile'=> 'Please select the $1 file to import:',
'dt_import_encodingtype'  => 'Encoding type',
+   'dt_import_summarydesc'   => 'Summary of import:',
'dt_import_editsummary'   => '$1 import',
'dt_import_importing' => 'Importing...',
'dt_import_success'   => '$1 {{PLURAL:$1|page|pages}} will be 
created from the $2 file.',



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


[MediaWiki-CVS] SVN: [69573] trunk/extensions/DataTransfer/includes/DT_XMLParser.php

2010-07-19 Thread yaron
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/69573

Revision: 69573
Author:   yaron
Date: 2010-07-19 23:23:06 + (Mon, 19 Jul 2010)

Log Message:
---
Fix for both very long and null values - patch from Christoph Burgmer

Modified Paths:
--
trunk/extensions/DataTransfer/includes/DT_XMLParser.php

Modified: trunk/extensions/DataTransfer/includes/DT_XMLParser.php
===
--- trunk/extensions/DataTransfer/includes/DT_XMLParser.php 2010-07-19 
23:08:52 UTC (rev 69572)
+++ trunk/extensions/DataTransfer/includes/DT_XMLParser.php 2010-07-19 
23:23:06 UTC (rev 69573)
@@ -74,7 +74,7 @@
var $mDebug = false;
var $mSource = null;
var $mCurFieldName = null;
-   var $mCurFieldValue = null;
+   var $mCurFieldValue = '';
var $mCurTemplate = null;
var $mCurPage = null; // new DTWikiPage();
var $mPages = array();
@@ -247,6 +247,7 @@
$field_str = str_replace( ' ', '_', wfMsgForContent( 
'dt_xml_field' ) );
if ( $name == $field_str ) {
$this->mCurTemplate->addField( $this->mCurFieldName, 
$this->mCurFieldValue );
+   $this->mCurFieldValue = '';
} else {
return $this->throwXMLerror( "Expected , 
got " );
}
@@ -254,7 +255,7 @@
}
 
function field_value( $parser, $data ) {
-   $this->mCurFieldValue = $data;
+   $this->mCurFieldValue .= $data;
}
 
function in_freetext( $parser, $name, $attribs ) {



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


[MediaWiki-CVS] SVN: [69572] trunk/phase3/includes/parser/Parser.php

2010-07-19 Thread platonides
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/69572

Revision: 69572
Author:   platonides
Date: 2010-07-19 23:08:52 + (Mon, 19 Jul 2010)

Log Message:
---
Update the old magic with new one.

Not only should this have used setContainsOldMagic() instead of manually 
modifying the member, 
the outdated magic reduced the caching time to one hour even if you just used 
something like 
{{currentmonth}}, which is hinted to one day.

This is the only usage of old magic, we could remove it but perhaps it is used 
by some extension?

Modified Paths:
--
trunk/phase3/includes/parser/Parser.php

Modified: trunk/phase3/includes/parser/Parser.php
===
--- trunk/phase3/includes/parser/Parser.php 2010-07-19 21:15:00 UTC (rev 
69571)
+++ trunk/phase3/includes/parser/Parser.php 2010-07-19 23:08:52 UTC (rev 
69572)
@@ -3021,7 +3021,7 @@
if ( $id !== false ) {
$text = $this->getVariableValue( $id, $frame );
if ( MagicWord::getCacheTTL( $id ) > -1 ) {
-   $this->mOutput->mContainsOldMagic = 
true;
+   $this->mOutput->updateCacheExpiry( 
MagicWord::getCacheTTL( $id ) );
}
$found = true;
}



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


[MediaWiki-CVS] SVN: [69571] trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.php

2010-07-19 Thread adam
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/69571

Revision: 69571
Author:   adam
Date: 2010-07-19 21:15:00 + (Mon, 19 Jul 2010)

Log Message:
---
Making preview dialog enabled by user preference. Addressing comments on r68520

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

Modified: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.php
===
--- trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.php  
2010-07-19 20:46:29 UTC (rev 69570)
+++ trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.php  
2010-07-19 21:15:00 UTC (rev 69571)
@@ -24,7 +24,7 @@
'toolbar' => array( 'global' => false, 'user' => true ), // Order is 
significant: makes beta prefs appear before labs prefs
'highlight' => array( 'global' => false, 'user' => true ),
'preview' => array( 'global' => false, 'user' => true ),
-   'previewDialog' => array( 'global' => false, 'user' => false ),
+   'previewDialog' => array( 'global' => false, 'user' => true ),
'publish' => array( 'global' => false, 'user' => true ),
'toc' => array( 'global' => false, 'user' => true ),
'templateEditor' => array( 'global' => false, 'user' => true ),



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


[MediaWiki-CVS] SVN: [69570] trunk/phase3/skins/Vector.php

2010-07-19 Thread catrope
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/69570

Revision: 69570
Author:   catrope
Date: 2010-07-19 20:46:29 + (Mon, 19 Jul 2010)

Log Message:
---
Fix r69539: use $this->skin->stylename instead of $this->stylename, fix the 
path and access globals the right way

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

Modified: trunk/phase3/skins/Vector.php
===
--- trunk/phase3/skins/Vector.php   2010-07-19 20:16:45 UTC (rev 69569)
+++ trunk/phase3/skins/Vector.php   2010-07-19 20:46:29 UTC (rev 69570)
@@ -771,7 +771,7 @@
getOption( 
'vector-simplesearch' ) ): ?>

skin->tooltipAndAccesskey( 'search' ); ?> data['search'] ) ): ?> value="text( 'search' ) ?>" />
-   skin->tooltipAndAccesskey( 'search-fulltext' ); ?>>stylename}/search-" . ( 
$wgContLang->isRTL() ? 'rtl' : 'ltr' ) . '.png?' . $wgStyleVersion ?>" 
alt="msg( 'searchbutton' ) ?>" />
+   skin->tooltipAndAccesskey( 'search-fulltext' ); ?>>skin->stylename}/images/search-" . ( $GLOBALS['wgContLang']->isRTL() 
? 'rtl' : 'ltr' ) . '.png?' . $GLOBALS['wgStyleVersion'] ?>" alt="msg( 'searchbutton' ) ?>" />


skin->tooltipAndAccesskey( 'search' ); ?> data['search'] ) ): ?> value="text( 'search' ) ?>" />



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


[MediaWiki-CVS] SVN: [69569] trunk/tools/analysis/StreamingXMLHistoryFilter.php

2010-07-19 Thread nimishg
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/69569

Revision: 69569
Author:   nimishg
Date: 2010-07-19 20:16:45 + (Mon, 19 Jul 2010)

Log Message:
---
switching to use STDIN

Modified Paths:
--
trunk/tools/analysis/StreamingXMLHistoryFilter.php

Modified: trunk/tools/analysis/StreamingXMLHistoryFilter.php
===
--- trunk/tools/analysis/StreamingXMLHistoryFilter.php  2010-07-19 20:14:56 UTC 
(rev 69568)
+++ trunk/tools/analysis/StreamingXMLHistoryFilter.php  2010-07-19 20:16:45 UTC 
(rev 69569)
@@ -1,23 +1,21 @@
 #!/usr/bin/php -q
  \n");
+if(count($argv) != 2){
+   print("\n\tUsage: $argv[0]  \n");
exit(-1);   
 }
 
-$parser = new StreamingXMLHistoryFilter($argv[1], $argv[2]);
+$parser = new StreamingXMLHistoryFilter($argv[1]);
 $parser->run();
 
 class StreamingXMLHistoryFilter{
 
public $fileList;
public $pageNameArray;
-   public $historyFile;

-   public function __construct( $fileList, $historyFile){
+   public function __construct( $fileList ){
$this->pageNameArray = array();
$this->fileList = $fileList;
-   $this->historyFile = $historyFile;
}

public function writeOut($title, $pageText){
@@ -41,7 +39,7 @@
$this->createFileList();

$reader = new XMLReader();
-   $reader->open($this->historyFile);  
+   $reader->open("php://stdin");   

// NOTE: in the interests of a smaller memory footprint
// this relies on the XML title being the next element after 
the page



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


[MediaWiki-CVS] SVN: [69568] trunk/extensions/UsabilityInitiative

2010-07-19 Thread adam
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/69568

Revision: 69568
Author:   adam
Date: 2010-07-19 20:14:56 + (Mon, 19 Jul 2010)

Log Message:
---
Adding jquery.highlightText.js to the makefile and recombining

Modified Paths:
--
trunk/extensions/UsabilityInitiative/Makefile
trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php
trunk/extensions/UsabilityInitiative/js/plugins.combined.js
trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js

Modified: trunk/extensions/UsabilityInitiative/Makefile
===
--- trunk/extensions/UsabilityInitiative/Makefile   2010-07-19 20:01:20 UTC 
(rev 69567)
+++ trunk/extensions/UsabilityInitiative/Makefile   2010-07-19 20:14:56 UTC 
(rev 69568)
@@ -31,6 +31,7 @@
js/plugins/jquery.cookie.js\
js/plugins/jquery.delayedBind.js\
js/plugins/jquery.expandableField.js\
+   js/plugins/jquery.highlightText.js\
js/plugins/jquery.suggestions.js\
js/plugins/jquery.textSelection.js\
js/plugins/jquery.wikiEditor.js\

Modified: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php
===
--- trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php  
2010-07-19 20:01:20 UTC (rev 69567)
+++ trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php  
2010-07-19 20:14:56 UTC (rev 69568)
@@ -83,10 +83,10 @@
array( 'src' => 
'js/thirdparty/contentCollector.js', 'version' => 2 ),
),
'combined' => array(
-   array( 'src' => 'js/plugins.combined.js', 
'version' => 452 ),
+   array( 'src' => 'js/plugins.combined.js', 
'version' => 453 ),
),
'minified' => array(
-   array( 'src' => 'js/plugins.combined.min.js', 
'version' => 470 ),
+   array( 'src' => 'js/plugins.combined.min.js', 
'version' => 471 ),
),
),
);

Modified: trunk/extensions/UsabilityInitiative/js/plugins.combined.js
===
--- trunk/extensions/UsabilityInitiative/js/plugins.combined.js 2010-07-19 
20:01:20 UTC (rev 69567)
+++ trunk/extensions/UsabilityInitiative/js/plugins.combined.js 2010-07-19 
20:14:56 UTC (rev 69568)
@@ -961,6 +961,68 @@
 
 } )( jQuery );
 /**
+ * Plugin that highlights matched word partials in a given element
+ * TODO: add a function for restoring the previous text
+ * TODO: accept mappings for converting shortcuts like WP: to Wikipedia: 
+ */
+( function( $ ) {
+
+$.highlightText = {
+   
+   // Split our pattern string at spaces and run our highlight function on 
the results
+   splitAndHighlight: function( node, pat ) {
+   var patArray = pat.split(" ");
+   for ( var i = 0; i < patArray.length; i++ ) {
+   if ( patArray[i].length == 0 ) continue;
+   $.highlightText.innerHighlight( node, patArray[i] );
+   }
+   return node;
+   },
+   // scans a node looking for the pattern and wraps a span around each 
match 
+   innerHighlight: function( node, pat ) {
+   // if this is a text node
+   if ( node.nodeType == 3 ) {
+   // TODO - need to be smarter about the character 
matching here. 
+   // non latin characters can make regex think a new word 
has begun. 
+   // look for an occurence of our pattern and store the 
starting position 
+   var pos = node.data.search( new RegExp( "\\b" + 
RegExp.escape( pat ), "i" ) );
+   if ( pos >= 0 ) {
+   // create the span wrapper for the matched text
+   var spannode = document.createElement( 'span' );
+   spannode.className = 'highlight';
+   // shave off the characters preceding the 
matched text
+   var middlebit = node.splitText( pos );
+   // shave off any unmatched text off the end
+   middlebit.splitText( pat.length );
+   // clone for appending to our span
+   var middleclone = middlebit.cloneNode( true );
+   // append the matched text node to the span
+   spannode.appendChild( middleclone );
+   // replace the matched node, with our 
span-wrapped clone of the matched node
+   middlebit.parentNode.replaceChild( spannode, 
middlebit );
+   

[MediaWiki-CVS] SVN: [69567] trunk/tools/analysis/StreamingXMLHistoryFilter.php

2010-07-19 Thread nimishg
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/69567

Revision: 69567
Author:   nimishg
Date: 2010-07-19 20:01:20 + (Mon, 19 Jul 2010)

Log Message:
---
adding XML History Filter

Added Paths:
---
trunk/tools/analysis/StreamingXMLHistoryFilter.php

Added: trunk/tools/analysis/StreamingXMLHistoryFilter.php
===
--- trunk/tools/analysis/StreamingXMLHistoryFilter.php  
(rev 0)
+++ trunk/tools/analysis/StreamingXMLHistoryFilter.php  2010-07-19 20:01:20 UTC 
(rev 69567)
@@ -0,0 +1,62 @@
+#!/usr/bin/php -q
+ \n");
+   exit(-1);   
+}
+
+$parser = new StreamingXMLHistoryFilter($argv[1], $argv[2]);
+$parser->run();
+
+class StreamingXMLHistoryFilter{
+
+   public $fileList;
+   public $pageNameArray;
+   public $historyFile;
+   
+   public function __construct( $fileList, $historyFile){
+   $this->pageNameArray = array();
+   $this->fileList = $fileList;
+   $this->historyFile = $historyFile;
+   }
+   
+   public function writeOut($title, $pageText){
+   $file = fopen($title, "a+");
+   fwrite($file,$pageText);
+   fclose($file);
+   }
+   
+   public function createFileList(){
+   $fileListHandle = fopen($this->fileList, "r");
+   while (!feof($fileListHandle)) {
+   $fName = fgets($fileListHandle);
+   $this->pageNameArray[] = trim($fName);
+   }
+   fclose($fileListHandle);
+   }
+   
+   
+   public function run(){
+   
+   $this->createFileList();
+   
+   $reader = new XMLReader();
+   $reader->open($this->historyFile);  
+   
+   // NOTE: in the interests of a smaller memory footprint
+   // this relies on the XML title being the next element after 
the page
+   while ( $reader->read()){
+   if ( $reader->nodeType == XMLREADER::ELEMENT
+   && $reader->localName == "page") {
+   $pageText = $reader->readOuterXML();

+   $reader->read(); //text element
+   $reader->next(); //next node
+   $title = $reader->readInnerXML();
+   if(in_array($title, 
$this->pageNameArray)){
+   $this->writeOut($title, 
$pageText); 
+   }
+   }//revision 
+   } //while   
+   } //run
+}
+


Property changes on: trunk/tools/analysis/StreamingXMLHistoryFilter.php
___
Added: svn:executable
   + *
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: [69566] trunk/extensions/UsabilityInitiative

2010-07-19 Thread adam
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/69566

Revision: 69566
Author:   adam
Date: 2010-07-19 19:52:25 + (Mon, 19 Jul 2010)

Log Message:
---
HightlightText - improving a conditional based on Roan's comment on r69483

Modified Paths:
--
trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php
trunk/extensions/UsabilityInitiative/js/plugins/jquery.highlightText.js

Modified: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php
===
--- trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php  
2010-07-19 19:46:42 UTC (rev 69565)
+++ trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php  
2010-07-19 19:52:25 UTC (rev 69566)
@@ -86,7 +86,7 @@
array( 'src' => 'js/plugins.combined.js', 
'version' => 452 ),
),
'minified' => array(
-   array( 'src' => 'js/plugins.combined.min.js', 
'version' => 469 ),
+   array( 'src' => 'js/plugins.combined.min.js', 
'version' => 470 ),
),
),
);

Modified: 
trunk/extensions/UsabilityInitiative/js/plugins/jquery.highlightText.js
===
--- trunk/extensions/UsabilityInitiative/js/plugins/jquery.highlightText.js 
2010-07-19 19:46:42 UTC (rev 69565)
+++ trunk/extensions/UsabilityInitiative/js/plugins/jquery.highlightText.js 
2010-07-19 19:52:25 UTC (rev 69566)
@@ -41,7 +41,7 @@
}
// if this is an element with childnodes, and not a script, 
style or an element we created
} else if ( node.nodeType == 1 && node.childNodes && 
!/(script|style)/i.test( node.tagName )
-   && !( node.tagName.toLowerCase() == 'span' && 
node.className.match( 'highlight' ) ) ) {
+   && !( node.tagName.toLowerCase() == 'span' && 
node.className.match( /\bhighlight/ ) ) ) {
for ( var i = 0; i < node.childNodes.length; ++i ) {
// call the highlight function for each child 
node
$.highlightText.innerHighlight( 
node.childNodes[i], pat );



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


[MediaWiki-CVS] SVN: [69564] trunk/extensions/UsabilityInitiative/js/plugins/jquery. highlightText.js

2010-07-19 Thread adam
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/69564

Revision: 69564
Author:   adam
Date: 2010-07-19 19:44:29 + (Mon, 19 Jul 2010)

Log Message:
---
Follow up to r69165. Adding better comments and trimming out some unnecissary 
code

Modified Paths:
--
trunk/extensions/UsabilityInitiative/js/plugins/jquery.highlightText.js

Modified: 
trunk/extensions/UsabilityInitiative/js/plugins/jquery.highlightText.js
===
--- trunk/extensions/UsabilityInitiative/js/plugins/jquery.highlightText.js 
2010-07-19 19:41:40 UTC (rev 69563)
+++ trunk/extensions/UsabilityInitiative/js/plugins/jquery.highlightText.js 
2010-07-19 19:44:29 UTC (rev 69564)
@@ -16,32 +16,37 @@
}
return node;
},
-   // adapted from Johann Burkard's highlight plugin
-   // 
http://johannburkard.de/blog/programming/javascript/highlight-javascript-text-higlighting-jquery-plugin.html
// scans a node looking for the pattern and wraps a span around each 
match 
innerHighlight: function( node, pat ) {
-   var skip = 0;
+   // if this is a text node
if ( node.nodeType == 3 ) {
// TODO - need to be smarter about the character 
matching here. 
// non latin characters can make regex think a new word 
has begun. 
+   // look for an occurence of our pattern and store the 
starting position 
var pos = node.data.search( new RegExp( "\\b" + 
RegExp.escape( pat ), "i" ) );
if ( pos >= 0 ) {
+   // create the span wrapper for the matched text
var spannode = document.createElement( 'span' );
spannode.className = 'highlight';
+   // shave off the characters preceding the 
matched text
var middlebit = node.splitText( pos );
-   var endbit = middlebit.splitText( pat.length );
+   // shave off any unmatched text off the end
+   middlebit.splitText( pat.length );
+   // clone for appending to our span
var middleclone = middlebit.cloneNode( true );
+   // append the matched text node to the span
spannode.appendChild( middleclone );
+   // replace the matched node, with our 
span-wrapped clone of the matched node
middlebit.parentNode.replaceChild( spannode, 
middlebit );
-   skip = 1;
}
+   // if this is an element with childnodes, and not a script, 
style or an element we created
} else if ( node.nodeType == 1 && node.childNodes && 
!/(script|style)/i.test( node.tagName )
&& !( node.tagName.toLowerCase() == 'span' && 
node.className.match( 'highlight' ) ) ) {
for ( var i = 0; i < node.childNodes.length; ++i ) {
-   i += $.highlightText.innerHighlight( 
node.childNodes[i], pat );
+   // call the highlight function for each child 
node
+   $.highlightText.innerHighlight( 
node.childNodes[i], pat );
}
}
-   return skip;
}
 };
 



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


[MediaWiki-CVS] SVN: [69563] branches/resourceloader/phase3

2010-07-19 Thread tparscal
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/69563

Revision: 69563
Author:   tparscal
Date: 2010-07-19 19:41:40 + (Mon, 19 Jul 2010)

Log Message:
---
Resolves remaining issues noted in CR comments on r69432.

Modified Paths:
--
branches/resourceloader/phase3/includes/ResourceLoader.php
branches/resourceloader/phase3/load.php

Modified: branches/resourceloader/phase3/includes/ResourceLoader.php
===
--- branches/resourceloader/phase3/includes/ResourceLoader.php  2010-07-19 
19:23:15 UTC (rev 69562)
+++ branches/resourceloader/phase3/includes/ResourceLoader.php  2010-07-19 
19:41:40 UTC (rev 69563)
@@ -15,7 +15,8 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  * http://www.gnu.org/copyleft/gpl.html
  *
- * @author Roan Kattouw, Trevor Parscal
+ * @author Roan Kattouw
+ * @author Trevor Parscal
  */
 
 /*
@@ -113,10 +114,10 @@
$missing = array_diff( $modules, array_keys( $blobs ) );
foreach ( $missing as $module ) {
// Build message blob for module messages
-   $messages = isset( 
static::$modules[$module]['messages'] ) ?
-   array_keys( 
static::$modules[$module]['messages'] ) : false;
+   $messages = isset( self::$modules[$module]['messages'] 
) ?
+   array_keys( self::$modules[$module]['messages'] 
) : false;
if ( $messages ) {
-   foreach ( 
ResourceLoader::$modules[$module]['messages'] as $key ) {
+   foreach ( self::$modules[$module]['messages'] 
as $key ) {
$messages[$encKey] = wfMsgExt( $key, 
array( 'language' => $lang ) );
}
$blob = json_encode( $messages );
@@ -166,14 +167,14 @@
if ( is_array( $module ) && empty( $options ) ) {
$success = true;
foreach ( $module as $name => $options ) {
-   if ( !static::register( $name, $options ) ) {
+   if ( !self::register( $name, $options ) ) {
$success = false;
}
}
return $success;
}
// Disallow duplicate registrations
-   if ( isset( static::$modules[$module] ) ) {
+   if ( isset( self::$modules[$module] ) ) {
// A module has already been registered by this name
return false;
}
@@ -203,13 +204,12 @@
// Style file does not exist
return false;
}
-   static::$modules[$module] = $options;
+   self::$modules[$module] = $options;
}
/*
 * Outputs a response to a resource load-request, including a 
content-type header
 * 
-* @param array $modules module names to include in the request
-* @param array $options options which affect the content of the 
response (optional)
+* @param WebRequest $request web request object to respond to
 * 
 * $options format:
 *  array(
@@ -223,12 +223,12 @@
public static function respond( WebRequest $request ) {
global $wgUser, $wgLang, $wgDefaultSkin;
// Fallback on system settings
-   $parameters = array_merge( array(
+   $parameters = array(
'user' => $request->getBool( 'user', 
$wgUser->isLoggedIn() ),
'lang' => $request->getVal( 'lang', $wgLang->getCode() 
),
'skin' => $request->getVal( 'skin', $wgDefaultSkin ),
'debug' => $request->getBool( 'debug' ),
-   ) );
+   );
// Get the direction from the requested language
if ( !isset( $parameters['dir'] ) ) {
$lang = $wgLang->factory( $parameters['lang'] );
@@ -237,12 +237,8 @@
// Get modules - filtering out any we don't know about
$modules = array();
foreach ( explode( '|', $request->getVal( 'modules' ) ) as 
$module ) {
-   if ( isset( static::$modules[$module] ) ) {
-   if ( static::$modules[$module]['debug'] ) {
-   if ( $parameters['debug'] ) {
-   $modules[] = $module;
-   }
-   } else {
+   if ( isset( self::$modules[$module] ) ) {
+   if ( !self::$modules[$module]['debug'] || 
$para

[MediaWiki-CVS] SVN: [69561] trunk/extensions/MirrorTools/APIMirrorTools.php

2010-07-19 Thread reedy
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/69561

Revision: 69561
Author:   reedy
Date: 2010-07-19 19:08:47 + (Mon, 19 Jul 2010)

Log Message:
---
Followup r69198 for Tisane

Remove/reduce a lot of the ducplicated code that isn't execute()

Modified Paths:
--
trunk/extensions/MirrorTools/APIMirrorTools.php

Modified: trunk/extensions/MirrorTools/APIMirrorTools.php
===
--- trunk/extensions/MirrorTools/APIMirrorTools.php 2010-07-19 19:02:01 UTC 
(rev 69560)
+++ trunk/extensions/MirrorTools/APIMirrorTools.php 2010-07-19 19:08:47 UTC 
(rev 69561)
@@ -30,7 +30,7 @@
  * EditPage.php should be rewritten to provide a cleaner interface
  * @ingroup API
  */
-class ApiMirrorEditPage extends ApiBase {
+class ApiMirrorEditPage extends ApiEditPage {
 
public function __construct( $query, $moduleName ) {
parent::__construct( $query, $moduleName );
@@ -40,10 +40,10 @@
global $wgUser;
$params = $this->extractRequestParams();
 
-if ( is_null( $params['user'] ) ) {
-$this->dieUsageMsg( array( 'missingparam', 'user' ) );
-}
-$user = $params['user'];
+   if ( is_null( $params['user'] ) ) {
+   $this->dieUsageMsg( array( 'missingparam', 'user' ) );
+   }
+   $user = $params['user'];
 
if ( is_null( $params['title'] ) ) {
$this->dieUsageMsg( array( 'missingparam', 'title' ) );
@@ -340,139 +340,24 @@
$this->getResult()->addValue( null, $this->getModuleName(), $r 
);
}
 
-   public function mustBePosted() {
-   return true;
-   }
-
-   public function isWriteMode() {
-   return true;
-   }
-
protected function getDescription() {
return 'Create and edit pages using any username.';
}
-
+   
public function getPossibleErrors() {
-   global $wgMaxArticleSize;
-
return array_merge( parent::getPossibleErrors(), array(
-   array( 'missingparam', 'title' ),
-   array( 'missingtext' ),
-   array( 'invalidtitle', 'title' ),
-   array( 'createonly-exists' ),
-   array( 'nocreate-missing' ),
-   array( 'nosuchrevid', 'undo' ),
-   array( 'nosuchrevid', 'undoafter' ),
-   array( 'revwrongpage', 'id', 'text' ),
-   array( 'undo-failure' ),
-   array( 'hashcheckfailed' ),
-   array( 'hookaborted' ),
-   array( 'noimageredirect-anon' ),
-   array( 'noimageredirect-logged' ),
-   array( 'spamdetected', 'spam' ),
-   array( 'filtered' ),
-   array( 'blockedtext' ),
-   array( 'contenttoobig', $wgMaxArticleSize ),
-   array( 'noedit-anon' ),
-   array( 'noedit' ),
-   array( 'actionthrottledtext' ),
-   array( 'wasdeleted' ),
-   array( 'nocreate-loggedin' ),
-   array( 'blankpage' ),
-   array( 'editconflict' ),
-   array( 'emptynewsection' ),
-   array( 'unknownerror', 'retval' ),
-   array( 'code' => 'nosuchsection', 'info' => 'There is 
no section section.' ),
-   array( 'code' => 'invalidsection', 'info' => 'The 
section parameter must be set to an integer or \'new\'' ),
+   array( 'missingparam', 'user' ),
) );
}
 
protected function getAllowedParams() {
-   return array(
-'user' => null,
-   'title' => null,
-   'section' => null,
-   'text' => null,
-   'token' => null,
-   'summary' => null,
-   'minor' => false,
-   'notminor' => false,
-   'bot' => false,
-   'basetimestamp' => null,
-   'starttimestamp' => null,
-   'recreate' => false,
-   'createonly' => false,
-   'nocreate' => false,
-   'captchaword' => null,
-   'captchaid' => null,
-   'watch' => array(
-   ApiBase::PARAM_DFLT => false,
-   ApiBase::PARAM_DEPRECATED => true,
-   ),
-   'unwatch' => array(
-   ApiBase::PARAM_DFLT => 

[MediaWiki-CVS] SVN: [69560] trunk/backup/worker.py

2010-07-19 Thread ariel
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/69560

Revision: 69560
Author:   ariel
Date: 2010-07-19 19:02:01 + (Mon, 19 Jul 2010)

Log Message:
---
initialize spawn and prefetch in Runner.__init__ 

Modified Paths:
--
trunk/backup/worker.py

Modified: trunk/backup/worker.py
===
--- trunk/backup/worker.py  2010-07-19 18:55:38 UTC (rev 69559)
+++ trunk/backup/worker.py  2010-07-19 19:02:01 UTC (rev 69560)
@@ -61,6 +61,8 @@
self.wiki = wiki
self.config = wiki.config
self.dbName = wiki.dbName
+   self.prefetch = prefetch
+   self.spawn = spawn

if date:
# Override, continuing a past dump?
@@ -248,10 +250,10 @@
XmlStub("First-pass for page XML data dumps"),
XmlDump("articles",
"Articles, templates, image 
descriptions, and primary meta-pages.",
-   "This contains current versions of article 
content, and is the archive most mirror sites will probably want.", prefetch, 
spawn),
+   "This contains current versions of article 
content, and is the archive most mirror sites will probably want.", 
self.prefetch, self.spawn),
XmlDump("meta-current",
"All pages, current versions only.",
-   "Discussion and user pages are included in this 
complete archive. Most mirrors won't want this extra material.", prefetch, 
spawn),
+   "Discussion and user pages are included in this 
complete archive. Most mirrors won't want this extra material.", self.prefetch, 
self.spawn),
XmlLogging("Pull out all logging data")]
if self.wiki.hasFlaggedRevs():
self.items.append(
@@ -264,7 +266,7 @@
BigXmlDump("meta-history",
"All pages with complete page edit 
history (.bz2)",
"These dumps can be *very* large, 
uncompressing up to 20 times the archive download size. " +
-   "Suitable for archival and statistical 
use, most mirror sites won't want or need this.", prefetch, spawn))
+   "Suitable for archival and statistical 
use, most mirror sites won't want or need this.", self.prefetch, self.spawn))
self.items.append(
XmlRecompressDump("meta-history",
"All pages with complete edit history 
(.7z)",



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


[MediaWiki-CVS] SVN: [69559] trunk/extensions/UsabilityInitiative/WikiEditor/Modules/ Toolbar

2010-07-19 Thread adam
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/69559

Revision: 69559
Author:   adam
Date: 2010-07-19 18:55:38 + (Mon, 19 Jul 2010)

Log Message:
---
Removing first level heading from the help section of wikieditor

Modified Paths:
--

trunk/extensions/UsabilityInitiative/WikiEditor/Modules/Toolbar/Toolbar.i18n.php
trunk/extensions/UsabilityInitiative/WikiEditor/Modules/Toolbar/Toolbar.js

Modified: 
trunk/extensions/UsabilityInitiative/WikiEditor/Modules/Toolbar/Toolbar.i18n.php
===
--- 
trunk/extensions/UsabilityInitiative/WikiEditor/Modules/Toolbar/Toolbar.i18n.php
2010-07-19 18:36:52 UTC (rev 69558)
+++ 
trunk/extensions/UsabilityInitiative/WikiEditor/Modules/Toolbar/Toolbar.i18n.php
2010-07-19 18:55:38 UTC (rev 69559)
@@ -176,9 +176,6 @@
'wikieditor-toolbar-help-content-xlink-description' => 'External link',
'wikieditor-toolbar-help-content-xlink-syntax' => 
'[http://www.example.org Link label][http://www.example.org]http://www.example.org',
'wikieditor-toolbar-help-content-xlink-result' => "Link label[1]http://www.example.org",
-   'wikieditor-toolbar-help-content-heading1-description' => '1st level 
heading',
-   'wikieditor-toolbar-help-content-heading1-syntax' => '= Heading text =',
-   'wikieditor-toolbar-help-content-heading1-result' => 'Heading 
text',
'wikieditor-toolbar-help-content-heading2-description' => '2nd level 
heading',
'wikieditor-toolbar-help-content-heading2-syntax' => '== Heading text 
==',
'wikieditor-toolbar-help-content-heading2-result' => 'Heading 
text',

Modified: 
trunk/extensions/UsabilityInitiative/WikiEditor/Modules/Toolbar/Toolbar.js
===
--- trunk/extensions/UsabilityInitiative/WikiEditor/Modules/Toolbar/Toolbar.js  
2010-07-19 18:36:52 UTC (rev 69558)
+++ trunk/extensions/UsabilityInitiative/WikiEditor/Modules/Toolbar/Toolbar.js  
2010-07-19 18:55:38 UTC (rev 69559)
@@ -824,11 +824,6 @@
],
rows: [
{
-   'description': { htmlMsg: 
'wikieditor-toolbar-help-content-heading1-description' },
-   'syntax': { htmlMsg: 
'wikieditor-toolbar-help-content-heading1-syntax' },
-   'result': { htmlMsg: 
'wikieditor-toolbar-help-content-heading1-result' }
-   },
-   {
'description': { htmlMsg: 
'wikieditor-toolbar-help-content-heading2-description' },
'syntax': { htmlMsg: 
'wikieditor-toolbar-help-content-heading2-syntax' },
'result': { htmlMsg: 
'wikieditor-toolbar-help-content-heading2-result' }



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


[MediaWiki-CVS] SVN: [69558] trunk/phase3/maintenance

2010-07-19 Thread ariel
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/69558

Revision: 69558
Author:   ariel
Date: 2010-07-19 18:36:52 + (Mon, 19 Jul 2010)

Log Message:
---
clean up space/tab stuff

Modified Paths:
--
trunk/phase3/maintenance/dumpTextPass.php
trunk/phase3/maintenance/fetchText.php

Modified: trunk/phase3/maintenance/dumpTextPass.php
===
--- trunk/phase3/maintenance/dumpTextPass.php   2010-07-19 17:44:33 UTC (rev 
69557)
+++ trunk/phase3/maintenance/dumpTextPass.php   2010-07-19 18:36:52 UTC (rev 
69558)
@@ -36,10 +36,10 @@
var $history = WikiExporter::FULL;
var $fetchCount = 0;
var $prefetchCount = 0;
-   
+
var $failures = 0;
var $maxFailures = 5;
-var $failedTextRetrievals = 0;
+   var $failedTextRetrievals = 0;
var $maxConsecutiveFailedTextRetrievals = 200;
var $failureTimeout = 5; // Seconds to sleep after db failure
 
@@ -71,7 +71,7 @@
if ( WikiError::isError( $result ) ) {
wfDie( $result->getMessage() );
}
-   
+
if ( $this->spawnProc ) {
$this->closeSpawn();
}
@@ -81,7 +81,7 @@
 
function processOption( $opt, $val, $param ) {
$url = $this->processFileOpt( $val, $param );
-   
+
switch( $opt ) {
case 'prefetch':
global $IP;
@@ -105,7 +105,7 @@
break;
}
}
-   
+
function processFileOpt( $val, $param ) {
switch( $val ) {
case "file":
@@ -128,7 +128,7 @@
if ( !$this->prefetch ) {
return parent::showReport();
}
-   
+
if ( $this->reporting ) {
$delta = wfTime() - $this->startTime;
$now = wfTimestamp( TS_DB );
@@ -176,7 +176,7 @@
$offset += strlen( $chunk );
} while ( $chunk !== false && !feof( $input ) );
xml_parser_free( $parser );
-   
+
return true;
}
 
@@ -194,7 +194,7 @@
$revID = intval($this->thisRev);
$revLength = $dbr->selectField( 'revision', 
'rev_len', array('rev_id' => $revID ) );
// if length of rev text in file doesn't match 
length in db, we reload
-   // this avoids carrying forward broken data 
from previous xml dumps 
+   // this avoids carrying forward broken data 
from previous xml dumps
if( strlen($text) == $revLength ) {
$this->prefetchCount++;
return $text;
@@ -203,7 +203,7 @@
}
return $this->doGetText( $id );
}
-   
+
private function doGetText( $id ) {
 
$id = intval( $id );
@@ -212,15 +212,15 @@
while (true) {
if ( $this->spawn ) {
if ($this->failures) {
-   // we don't know why it failed, could 
be the child process 
-   // borked, could be db entry busted, 
could be db server out to lunch, 
+   // we don't know why it failed, could 
be the child process
+   // borked, could be db entry busted, 
could be db server out to lunch,
// so cover all bases
$this->closeSpawn();
$this->openSpawn();
}
-   $text =  $this->getTextSpawned( $id );
+   $text =  $this->getTextSpawned( $id );
} else {
-   $text =  $this->getTextDbSafe( $id );
+   $text =  $this->getTextDbSafe( $id );
}
if ( $text === false ) {
$this->failures++;
@@ -228,7 +228,7 @@
$this->progress( "Failed to retrieve 
revision text for text id ".
 "$id 
after $this->maxFailures tries, giving up" );
// were there so many bad retrievals in 
a row we want to bail?
-   // at some point we have to declare the 
dump irretrievably broken
+   // at some point we have to declare the 
dump irretrievably broken
 

[MediaWiki-CVS] SVN: [69557] branches/new-checkuser

2010-07-19 Thread soxred93
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/69557

Revision: 69557
Author:   soxred93
Date: 2010-07-19 17:44:33 + (Mon, 19 Jul 2010)

Log Message:
---
Continue work on checkuser rewrite

Modified Paths:
--
branches/new-checkuser/CheckUser.body.php
branches/new-checkuser/CheckUser.i18n.en.php
branches/new-checkuser/CheckUser.pager.php
branches/new-checkuser/CheckUser.php
branches/new-checkuser/CheckUserApi.php
branches/new-checkuser/SpecialCheckUser.php
branches/new-checkuser/SpecialCheckUserLog.php
branches/new-checkuser/cu_changes.pg.sql
branches/new-checkuser/cu_changes.sql

Added Paths:
---
branches/new-checkuser/archives/patch-cu_changes_cuc_ip_int.pg.sql
branches/new-checkuser/archives/patch-cu_changes_cuc_ip_int.sql

Modified: branches/new-checkuser/CheckUser.body.php
===
--- branches/new-checkuser/CheckUser.body.php   2010-07-19 15:33:50 UTC (rev 
69556)
+++ branches/new-checkuser/CheckUser.body.php   2010-07-19 17:44:33 UTC (rev 
69557)
@@ -44,6 +44,8 @@
'cuc_ip',
'cuc_ip_hex',
'cuc_user',
+   'cuc_agent',
+   'cuc_rdns',
'COUNT(*) AS count',
'MIN(cuc_timestamp) AS first', 
'MAX(cuc_timestamp) AS last'
@@ -51,13 +53,13 @@

$opts = array(
'GROUP BY' => 'cuc_ip,cuc_ip_hex',
-   'ORDER BY' => 'last DESC',
+   'ORDER BY' => 'cuc_ip_int ASC',
'USE INDEX' => 'cuc_user_ip_time'
);

if( !empty( $limit ) ) $opts['LIMIT'] = $limit;

-   $ret = $dbr->select(
+   $ret = array(
$cu_changes,
$select,
array(
@@ -68,10 +70,6 @@
$opts
);

-   if( !$ret->numRows() ) {
-   return array();
-   }
-   
return array( $ret, $time_conds );

}
@@ -123,7 +121,7 @@
public static function checkBlockInfo( $name ) {
$dbr = wfGetDB( DB_SLAVE );

-   $ret = $dbr->select(
+   $ret = $dbr->selectRow(
'ipblocks',
array(
'ipb_by_text',
@@ -137,16 +135,8 @@
__METHOD__
);

+   if( !is_null( $ret ) ) return $ret;

-   foreach( $ret as $res ) {
-   $return = $res;
-   break;
-   }
-   
-   $dbr->freeResult( $ret );
-   
-   if( isset( $return ) ) return $return;
-   
return false;
}


Modified: branches/new-checkuser/CheckUser.i18n.en.php
===
--- branches/new-checkuser/CheckUser.i18n.en.php2010-07-19 15:33:50 UTC 
(rev 69556)
+++ branches/new-checkuser/CheckUser.i18n.en.php2010-07-19 17:44:33 UTC 
(rev 69557)
@@ -107,4 +107,6 @@
'checkuser-blockinfo'=> 'Block info',
'checkuser-expires'  => 'Expires',
'checkuser-limit'=> 'Results to show:',
+   'checkuser-cuc_agent'=> 'User agent',
+   'checkuser-cuc_rdns' => 'Reverse DNS',
 );
\ No newline at end of file

Modified: branches/new-checkuser/CheckUser.pager.php
===
--- branches/new-checkuser/CheckUser.pager.php  2010-07-19 15:33:50 UTC (rev 
69556)
+++ branches/new-checkuser/CheckUser.pager.php  2010-07-19 17:44:33 UTC (rev 
69557)
@@ -2,114 +2,72 @@
 
 abstract class CUTablePager extends TablePager {
 
-   public $mLimitsShown;
-   public $mTimeConds;
+   protected $mCUSelectParams;
+   protected $mTimeConds;
+   protected $mBlockInfo = false;
 
-   function __construct( $result = array(), $index = 'cuc_ip' ) {
-   parent::__construct();
-   
-   $this->mIndexField = $index;
-   $this->mResult = $result[0];
+   function __construct( $result ) {
+   $this->mCUSelectParams = $result[0];
$this->mTimeConds = $result[1];

+   parent::__construct(); 
}
-
-   /* This function normally does a database query to get the results; we 
need
-* to make a pretend result using a FakeResultWrapper.
-*/
-   function reallyDoQuery( $offset, $limit, $descending ) {
-   global $wgReque

[MediaWiki-CVS] SVN: [69556] trunk/extensions/CodeReview/api/ApiCodeRevisions.php

2010-07-19 Thread catrope
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/69556

Revision: 69556
Author:   catrope
Date: 2010-07-19 15:33:50 + (Mon, 19 Jul 2010)

Log Message:
---
Fix r69555: remove leading newline

Modified Paths:
--
trunk/extensions/CodeReview/api/ApiCodeRevisions.php

Modified: trunk/extensions/CodeReview/api/ApiCodeRevisions.php
===
--- trunk/extensions/CodeReview/api/ApiCodeRevisions.php2010-07-19 
15:33:10 UTC (rev 69555)
+++ trunk/extensions/CodeReview/api/ApiCodeRevisions.php2010-07-19 
15:33:50 UTC (rev 69556)
@@ -1,4 +1,3 @@
-
 https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs


[MediaWiki-CVS] SVN: [69555] trunk/extensions/CodeReview/api/ApiCodeRevisions.php

2010-07-19 Thread catrope
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/69555

Revision: 69555
Author:   catrope
Date: 2010-07-19 15:33:10 + (Mon, 19 Jul 2010)

Log Message:
---
Minor fixes for r69088: prevent caching of private data, add intval()

Modified Paths:
--
trunk/extensions/CodeReview/api/ApiCodeRevisions.php

Modified: trunk/extensions/CodeReview/api/ApiCodeRevisions.php
===
--- trunk/extensions/CodeReview/api/ApiCodeRevisions.php2010-07-19 
15:15:41 UTC (rev 69554)
+++ trunk/extensions/CodeReview/api/ApiCodeRevisions.php2010-07-19 
15:33:10 UTC (rev 69555)
@@ -1,3 +1,4 @@
+
 getMain()->setVaryCookie();
// Before doing anything at all, let's check permissions
if ( !$wgUser->isAllowed( 'codereview-use' ) ) {
$this->dieUsage( 'You don\'t have permission to view 
code revisions', 'permissiondenied' );
@@ -81,7 +83,7 @@
private function formatRow( $row ) {
$item = array();
if ( isset( $this->props['revid'] ) ) {
-   $item['revid'] = $row->cr_rev_id;
+   $item['revid'] = intval( $row->cr_rev_id );
}
if ( isset( $this->props['status'] ) ) {
$item['status'] = $row->cr_status;



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


[MediaWiki-CVS] SVN: [69554] trunk/phase3/maintenance/addwiki.php

2010-07-19 Thread catrope
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/69554

Revision: 69554
Author:   catrope
Date: 2010-07-19 15:15:41 + (Mon, 19 Jul 2010)

Log Message:
---
Fix typo

Modified Paths:
--
trunk/phase3/maintenance/addwiki.php

Modified: trunk/phase3/maintenance/addwiki.php
===
--- trunk/phase3/maintenance/addwiki.php2010-07-19 15:13:41 UTC (rev 
69553)
+++ trunk/phase3/maintenance/addwiki.php2010-07-19 15:15:41 UTC (rev 
69554)
@@ -83,7 +83,7 @@
$dbw->sourceFile( 
"$IP/extensions/UsabilityInitiative/ClickTracking/ClickTrackingEvents.sql" );
$dbw->sourceFile( 
"$IP/extensions/UsabilityInitiative/ClickTracking/ClickTracking.sql" );
$dbw->sourceFile( 
"$IP/extensions/UsabilityInitiative/UserDailyContribs/UserDailyContribs.sql" );
-   $dbw->sourceFile( 
"$IP/extensions/UsabilityInitiative/Optin/OptIn.sql" );
+   $dbw->sourceFile( 
"$IP/extensions/UsabilityInitiative/OptIn/OptIn.sql" );
 
$dbw->query( "INSERT INTO site_stats(ss_row_id) VALUES (1)" );
 



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


[MediaWiki-CVS] SVN: [69553] trunk/phase3/maintenance/addwiki.php

2010-07-19 Thread catrope
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/69553

Revision: 69553
Author:   catrope
Date: 2010-07-19 15:13:41 + (Mon, 19 Jul 2010)

Log Message:
---
Followup to r69546: defer sending of notification by 15 minutes

Modified Paths:
--
trunk/phase3/maintenance/addwiki.php

Modified: trunk/phase3/maintenance/addwiki.php
===
--- trunk/phase3/maintenance/addwiki.php2010-07-19 15:00:55 UTC (rev 
69552)
+++ trunk/phase3/maintenance/addwiki.php2010-07-19 15:13:41 UTC (rev 
69553)
@@ -149,16 +149,15 @@
# Rebuild interwiki tables
# passthru( '/home/wikipedia/conf/interwiki/update' );

-   $user = getenv( 'USER' );
$time = wfTimestamp( TS_RFC2822 );
-   UserMailer::send( new MailAddress( 
'newproje...@list.wikimedia.org' ),
-   new MailAddress( $wgPasswordSender ), "New wiki: 
$dbName",
-   <output( "Script ended. You still have to:
* Add any required settings in InitialiseSettings.php
* Run sync-common-all



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


[MediaWiki-CVS] SVN: [69552] trunk/extensions/UsabilityInitiative

2010-07-19 Thread adam
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/69552

Revision: 69552
Author:   adam
Date: 2010-07-19 15:00:55 + (Mon, 19 Jul 2010)

Log Message:
---
Followup to r68750. removing redundancy

Modified Paths:
--
trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php
trunk/extensions/UsabilityInitiative/css/combined.css
trunk/extensions/UsabilityInitiative/css/combined.min.css
trunk/extensions/UsabilityInitiative/css/wikiEditor.preview.css

Modified: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php
===
--- trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php  
2010-07-19 14:45:15 UTC (rev 69551)
+++ trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php  
2010-07-19 15:00:55 UTC (rev 69552)
@@ -24,18 +24,18 @@
array( 'src' => 'css/vector.footerCleanup.css', 
'version' => 2 ),
array( 'src' => 'css/wikiEditor.css', 'version' 
=> 14 ),
array( 'src' => 'css/wikiEditor.dialogs.css', 
'version' => 30 ),
-   array( 'src' => 'css/wikiEditor.preview.css', 
'version' => 2 ),
+   array( 'src' => 'css/wikiEditor.preview.css', 
'version' => 3 ),
array( 'src' => 
'css/wikiEditor.previewDialog.css', 'version' => 1 ),
array( 'src' => 'css/wikiEditor.toc.css', 
'version' => 31 ),
array( 'src' => 'css/wikiEditor.toolbar.css', 
'version' => 19 ),
array( 'src' => 
'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ),
),
'combined' => array(
-   array( 'src' => 'css/combined.css', 'version' 
=> 116 ),
+   array( 'src' => 'css/combined.css', 'version' 
=> 117 ),
array( 'src' => 
'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ),
),
'minified' => array(
-   array( 'src' => 'css/combined.min.css', 
'version' => 116 ),
+   array( 'src' => 'css/combined.min.css', 
'version' => 117 ),
array( 'src' => 
'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ),
),
)
@@ -86,7 +86,7 @@
array( 'src' => 'js/plugins.combined.js', 
'version' => 452 ),
),
'minified' => array(
-   array( 'src' => 'js/plugins.combined.min.js', 
'version' => 467 ),
+   array( 'src' => 'js/plugins.combined.min.js', 
'version' => 468 ),
),
),
);

Modified: trunk/extensions/UsabilityInitiative/css/combined.css
===
--- trunk/extensions/UsabilityInitiative/css/combined.css   2010-07-19 
14:45:15 UTC (rev 69551)
+++ trunk/extensions/UsabilityInitiative/css/combined.css   2010-07-19 
15:00:55 UTC (rev 69552)
@@ -1220,26 +1220,10 @@
padding: 1em;
background-color: white;
 }
-
 #wikiEditor-0-preview-dialog .wikiEditor-ui-loading {
-   background: #f3f3f3;
-   z-index: 10;
-   position: absolute;
-   left: 0;
-   text-align: center;
-   height: 100%;
-   width: 100%;
overflow: hidden;
border: none;
 }
-#wikiEditor-0-preview-dialog .wikiEditor-ui-loading span {
-   display: block;
-   height: 24px;
-   width: 24px;
-   background: url( ../images/wikiEditor/toolbar/loading.gif ) 0 0 
no-repeat;
-   text-indent: -px;
-   margin: 0 auto;
-}
 .ui-dialog .ui-dialog-buttonpane {
margin: 0 !important;
 }
\ No newline at end of file

Modified: trunk/extensions/UsabilityInitiative/css/combined.min.css
===
--- trunk/extensions/UsabilityInitiative/css/combined.min.css   2010-07-19 
14:45:15 UTC (rev 69551)
+++ trunk/extensions/UsabilityInitiative/css/combined.min.css   2010-07-19 
15:00:55 UTC (rev 69552)
@@ -1154,24 +1154,9 @@
 background-color:white;
 }
 #wikiEditor-0-preview-dialog .wikiEditor-ui-loading{
-background:#f3f3f3;
-z-index:10;
-position:absolute;
-left:0;
-text-align:center;
-height:100%;
-width:100%;
 overflow:hidden;
 border:none;
 }
-#wikiEditor-0-preview-dialog .wikiEditor-ui-loading span{
-display:block;
-height:24px;
-width:24px;
-background:url( ../images/wikiEditor/toolbar/loading.gif ) 0 0 no-repeat;
-text-indent:-px;
-margin:0 auto;
-}
 .ui-dialog .ui-dialog-buttonpane{
 margin:0 !important;
 }

Modified: trunk/extensions/UsabilityInitiative/css/wikiEditor.preview.css
=

[MediaWiki-CVS] SVN: [69551] USERINFO/fde

2010-07-19 Thread fde
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/69551

Revision: 69551
Author:   fde
Date: 2010-07-19 14:45:15 + (Mon, 19 Jul 2010)

Log Message:
---
Adding my USERINFO file.

Added Paths:
---
USERINFO/fde

Added: USERINFO/fde
===
--- USERINFO/fde(rev 0)
+++ USERINFO/fde2010-07-19 14:45:15 UTC (rev 69551)
@@ -0,0 +1,3 @@
+name: Frank Dengler
+email: frank.deng...@kit.edu
+url: http://www.mediawiki.org/wiki/User:FDengler


Property changes on: USERINFO/fde
___
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: [69550] trunk/phase3/includes/ImagePage.php

2010-07-19 Thread daniel
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/69550

Revision: 69550
Author:   daniel
Date: 2010-07-19 14:35:20 + (Mon, 19 Jul 2010)

Log Message:
---
make image page respect different sizes of individual frames, as suggested by 
Markus Glaser.

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

Modified: trunk/phase3/includes/ImagePage.php
===
--- trunk/phase3/includes/ImagePage.php 2010-07-19 14:27:33 UTC (rev 69549)
+++ trunk/phase3/includes/ImagePage.php 2010-07-19 14:35:20 UTC (rev 69550)
@@ -328,9 +328,9 @@
} else {
$params = array( 'page' => $page );
}
-   $width_orig = $this->displayImg->getWidth();
+   $width_orig = $this->displayImg->getWidth( $page );
$width = $width_orig;
-   $height_orig = $this->displayImg->getHeight();
+   $height_orig = $this->displayImg->getHeight( $page );
$height = $height_orig;
$mime = $this->displayImg->getMimeType();
$showLink = false;



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


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

2010-07-19 Thread ashley
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/69549

Revision: 69549
Author:   ashley
Date: 2010-07-19 14:27:33 + (Mon, 19 Jul 2010)

Log Message:
---
SocialProfile: reapplying ^demon's r66934 - wfLoadExtensionMessages() is a 
no-op in 1.16 and trunk, and we require at least 1.16

Modified Paths:
--
trunk/extensions/SocialProfile/SystemGifts/SpecialSystemGiftManager.php
trunk/extensions/SocialProfile/SystemGifts/SpecialSystemGiftManagerLogo.php
trunk/extensions/SocialProfile/SystemGifts/SpecialViewSystemGift.php
trunk/extensions/SocialProfile/SystemGifts/SpecialViewSystemGifts.php
trunk/extensions/SocialProfile/SystemGifts/UserSystemGiftsClass.php
trunk/extensions/SocialProfile/UserActivity/SiteActivityHook.php
trunk/extensions/SocialProfile/UserActivity/UserActivity.body.php
trunk/extensions/SocialProfile/UserBoard/SpecialSendBoardBlast.php
trunk/extensions/SocialProfile/UserBoard/SpecialUserBoard.php
trunk/extensions/SocialProfile/UserBoard/UserBoardClass.php
trunk/extensions/SocialProfile/UserGifts/SpecialGiftManager.php
trunk/extensions/SocialProfile/UserGifts/SpecialGiftManagerLogo.php
trunk/extensions/SocialProfile/UserGifts/SpecialGiveGift.php
trunk/extensions/SocialProfile/UserGifts/SpecialRemoveGift.php
trunk/extensions/SocialProfile/UserGifts/SpecialRemoveMasterGift.php
trunk/extensions/SocialProfile/UserGifts/SpecialViewGift.php
trunk/extensions/SocialProfile/UserGifts/SpecialViewGifts.php
trunk/extensions/SocialProfile/UserGifts/UserGiftsClass.php

trunk/extensions/SocialProfile/UserProfile/SpecialPopulateExistingUsersProfiles.php
trunk/extensions/SocialProfile/UserProfile/SpecialRemoveAvatar.php
trunk/extensions/SocialProfile/UserProfile/SpecialUpdateProfile.php
trunk/extensions/SocialProfile/UserProfile/SpecialUploadAvatar.php
trunk/extensions/SocialProfile/UserProfile/UserProfilePage.php

trunk/extensions/SocialProfile/UserRelationship/Relationship_AjaxFunctions.php
trunk/extensions/SocialProfile/UserRelationship/SpecialAddRelationship.php

trunk/extensions/SocialProfile/UserRelationship/SpecialRemoveRelationship.php

trunk/extensions/SocialProfile/UserRelationship/SpecialViewRelationshipRequests.php
trunk/extensions/SocialProfile/UserRelationship/SpecialViewRelationships.php
trunk/extensions/SocialProfile/UserRelationship/UserRelationshipClass.php
trunk/extensions/SocialProfile/UserStats/TopFansByStat.php
trunk/extensions/SocialProfile/UserStats/TopFansRecent.php
trunk/extensions/SocialProfile/UserStats/TopUsers.php
trunk/extensions/SocialProfile/UserStats/UserStatsClass.php

trunk/extensions/SocialProfile/UserSystemMessages/UserSystemMessagesClass.php
trunk/extensions/SocialProfile/UserWelcome/UserWelcome.php

Modified: 
trunk/extensions/SocialProfile/SystemGifts/SpecialSystemGiftManager.php
===
--- trunk/extensions/SocialProfile/SystemGifts/SpecialSystemGiftManager.php 
2010-07-19 14:05:57 UTC (rev 69548)
+++ trunk/extensions/SocialProfile/SystemGifts/SpecialSystemGiftManager.php 
2010-07-19 14:27:33 UTC (rev 69549)
@@ -16,7 +16,6 @@
 */
public function execute( $par ) {
global $wgUser, $wgOut, $wgRequest, $wgScriptPath, 
$wgSystemGiftsScripts;
-   wfLoadExtensionMessages( 'SystemGifts' );
 
$wgOut->setPageTitle( wfMsg( 'systemgiftmanager' ) );
 

Modified: 
trunk/extensions/SocialProfile/SystemGifts/SpecialSystemGiftManagerLogo.php
===
--- trunk/extensions/SocialProfile/SystemGifts/SpecialSystemGiftManagerLogo.php 
2010-07-19 14:05:57 UTC (rev 69548)
+++ trunk/extensions/SocialProfile/SystemGifts/SpecialSystemGiftManagerLogo.php 
2010-07-19 14:27:33 UTC (rev 69549)
@@ -405,7 +405,6 @@
 */
function showSuccess( $status ) {
global $wgUser, $wgOut, $wgUploadPath, $wgScriptPath, $wgLang;
-   wfLoadExtensionMessages( 'SystemGifts' );
$ext = 'jpg';
 
$output = '' . wfMsg( 'ga-uploadsuccess' ) . '';
@@ -457,7 +456,6 @@
 */
function uploadError( $error ) {
global $wgOut;
-   wfLoadExtensionMessages( 'SystemGifts' );
$sub = wfMsg( 'uploadwarning' );
$wgOut->addHTML( "{$sub}\n" );
$wgOut->addHTML( "{$error}\n" );
@@ -534,7 +532,6 @@
function mainUploadForm( $msg = '' ) {
global $wgOut, $wgUser, $wgLang, $wgUploadDirectory, $wgRequest;
global $wgUseCopyrightUpload;
-   wfLoadExtensionMessages( 'SystemGifts' );
 
$cols = intval( $wgUser->getOption( 'cols' ) );
$ew = $wgUser->getOption( 'editwidth' );

Modified: trunk/extensions/SocialProfile/SystemGifts/SpecialViewSystemGift.php
=

[MediaWiki-CVS] SVN: [69548] trunk/phase3/includes/Exif.php

2010-07-19 Thread demon
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/69548

Revision: 69548
Author:   demon
Date: 2010-07-19 14:05:57 + (Mon, 19 Jul 2010)

Log Message:
---
Remove 1.6 compat thingies

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

Modified: trunk/phase3/includes/Exif.php
===
--- trunk/phase3/includes/Exif.php  2010-07-19 14:03:11 UTC (rev 69547)
+++ trunk/phase3/includes/Exif.php  2010-07-19 14:05:57 UTC (rev 69548)
@@ -1146,15 +1146,3 @@
return $a;
}
 }
-
-/**
- * MW 1.6 compatibility
- */
-define( 'MW_EXIF_BYTE', Exif::BYTE );
-define( 'MW_EXIF_ASCII', Exif::ASCII );
-define( 'MW_EXIF_SHORT', Exif::SHORT );
-define( 'MW_EXIF_LONG', Exif::LONG );
-define( 'MW_EXIF_RATIONAL', Exif::RATIONAL );
-define( 'MW_EXIF_UNDEFINED', Exif::UNDEFINED );
-define( 'MW_EXIF_SLONG', Exif::SLONG );
-define( 'MW_EXIF_SRATIONAL', Exif::SRATIONAL );



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


[MediaWiki-CVS] SVN: [69547] trunk/extensions/DPLforum/DPLforum.php

2010-07-19 Thread ashley
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/69547

Revision: 69547
Author:   ashley
Date: 2010-07-19 14:03:11 + (Mon, 19 Jul 2010)

Log Message:
---
DPLforum: PHP 5.3+ compatibility fix

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

Modified: trunk/extensions/DPLforum/DPLforum.php
===
--- trunk/extensions/DPLforum/DPLforum.php  2010-07-19 14:00:51 UTC (rev 
69546)
+++ trunk/extensions/DPLforum/DPLforum.php  2010-07-19 14:03:11 UTC (rev 
69547)
@@ -66,7 +66,7 @@
return true;
 }
 
-function parseForum( $input, $argv, &$parser ) {
+function parseForum( $input, $argv, $parser ) {
$f = new DPLForum();
return $f->parse( $input, $parser );
 }



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


[MediaWiki-CVS] SVN: [69546] trunk/phase3/maintenance/addwiki.php

2010-07-19 Thread catrope
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/69546

Revision: 69546
Author:   catrope
Date: 2010-07-19 14:00:51 + (Mon, 19 Jul 2010)

Log Message:
---
(bug 24398) Make addwiki.php send a notification e-mail to 
newproje...@lists.wikimedia.org . Needs addition of fourth parameter for domain 
name, will document at wikitechwiki

Modified Paths:
--
trunk/phase3/maintenance/addwiki.php

Modified: trunk/phase3/maintenance/addwiki.php
===
--- trunk/phase3/maintenance/addwiki.php2010-07-19 13:15:45 UTC (rev 
69545)
+++ trunk/phase3/maintenance/addwiki.php2010-07-19 14:00:51 UTC (rev 
69546)
@@ -33,9 +33,10 @@
public function __construct() {
parent::__construct();
$this->mDescription = "Add a new wiki to the family. Wikimedia 
specific!";
-   $this->addArg( 'language', 'Language code of new site' );
-   $this->addArg( 'site', 'Type of site' );
-   $this->addArg( 'dbname', 'Name of database to create' );
+   $this->addArg( 'language', 'Language code of new site, e.g. en' 
);
+   $this->addArg( 'site', 'Type of site, e.g. wikipedia' );
+   $this->addArg( 'dbname', 'Name of database to create, e.g. 
enwiki' );
+   $this->addArg( 'domain', 'Domain name of the wiki, e.g. 
en.wikipedia.org' );
}
 
public function getDbType() {
@@ -43,12 +44,13 @@
}
 
public function execute() {
-   global $IP, $wgDefaultExternalStore, $wgNoDBParam;
+   global $IP, $wgDefaultExternalStore, $wgNoDBParam, 
$wgPasswordSender;
 
$wgNoDBParam = true;
$lang = $this->getArg( 0 );
$site = $this->getArg( 1 );
$dbName = $this->getArg( 2 );
+   $domain = $this->getArg( 3 );
$languageNames = Language::getLanguageNames();
 
if ( !isset( $languageNames[$lang] ) ) {
@@ -146,6 +148,16 @@
# print "Constructing interwiki SQL\n";
# Rebuild interwiki tables
# passthru( '/home/wikipedia/conf/interwiki/update' );
+   
+   $user = getenv( 'USER' );
+   $time = wfTimestamp( TS_RFC2822 );
+   UserMailer::send( new MailAddress( 
'newproje...@list.wikimedia.org' ),
+   new MailAddress( $wgPasswordSender ), "New wiki: 
$dbName",
+   <output( "Script ended. You still have to:
* Add any required settings in InitialiseSettings.php



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


[MediaWiki-CVS] SVN: [69545] trunk/phase3/skins

2010-07-19 Thread danny_b
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/69545

Revision: 69545
Author:   danny_b
Date: 2010-07-19 13:15:45 + (Mon, 19 Jul 2010)

Log Message:
---
* #siteSub (tagline) isn't headline -> replaced by div (partial fix to bug 457)

Modified Paths:
--
trunk/phase3/skins/MonoBook.php
trunk/phase3/skins/Vector.php

Modified: trunk/phase3/skins/MonoBook.php
===
--- trunk/phase3/skins/MonoBook.php 2010-07-19 13:09:49 UTC (rev 69544)
+++ trunk/phase3/skins/MonoBook.php 2010-07-19 13:15:45 UTC (rev 69545)
@@ -76,7 +76,7 @@
 
html('title') 
?>

-   msg('tagline') ?>
+   msg('tagline') ?>
html('userlangattributes') 
?>>html('subtitle') ?>
 data['undelete']) { ?>
html('undelete') ?>

Modified: trunk/phase3/skins/Vector.php
===
--- trunk/phase3/skins/Vector.php   2010-07-19 13:09:49 UTC (rev 69544)
+++ trunk/phase3/skins/Vector.php   2010-07-19 13:15:45 UTC (rev 69545)
@@ -487,7 +487,7 @@



-   msg( 'tagline' ) 
?>
+   msg( 'tagline' ) 
?>


html('userlangattributes') ?>>html( 'subtitle' ) ?>



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


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

2010-07-19 Thread jeroendedauw
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/69544

Revision: 69544
Author:   jeroendedauw
Date: 2010-07-19 13:09:49 + (Mon, 19 Jul 2010)

Log Message:
---
Small style improvements

Modified Paths:
--
trunk/extensions/SemanticMediaWiki/includes/SMW_DataValue.php
trunk/extensions/SemanticMediaWiki/includes/SMW_SemanticData.php
trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php

Modified: trunk/extensions/SemanticMediaWiki/includes/SMW_DataValue.php
===
--- trunk/extensions/SemanticMediaWiki/includes/SMW_DataValue.php   
2010-07-19 12:31:35 UTC (rev 69543)
+++ trunk/extensions/SemanticMediaWiki/includes/SMW_DataValue.php   
2010-07-19 13:09:49 UTC (rev 69544)
@@ -794,4 +794,4 @@
return ''; // empty unit
}
 
-}
+}
\ No newline at end of file

Modified: trunk/extensions/SemanticMediaWiki/includes/SMW_SemanticData.php
===
--- trunk/extensions/SemanticMediaWiki/includes/SMW_SemanticData.php
2010-07-19 12:31:35 UTC (rev 69543)
+++ trunk/extensions/SemanticMediaWiki/includes/SMW_SemanticData.php
2010-07-19 13:09:49 UTC (rev 69544)
@@ -345,4 +345,4 @@
}
}
 
-}
+}
\ No newline at end of file

Modified: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php
===
--- trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php   
2010-07-19 12:31:35 UTC (rev 69543)
+++ trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php   
2010-07-19 13:09:49 UTC (rev 69544)
@@ -1917,9 +1917,12 @@
$id = 0;
 
if ( $iw != '' ) { // external page; no need to think about 
redirects
-   $res = $db->select( 'smw_ids', array( 'smw_id', 
'smw_sortkey' ),
-  array( 'smw_title' => $title, 
'smw_namespace' => $namespace, 'smw_iw' => $iw ),
-  'SMW::getSMWPageID', array( 'LIMIT' 
=> 1 ) );
+   $res = $db->select(
+   'smw_ids',
+   array( 'smw_id', 'smw_sortkey' ),
+   array( 'smw_title' => $title, 'smw_namespace' 
=> $namespace, 'smw_iw' => $iw ),
+   'SMW::getSMWPageID', array( 'LIMIT' => 1 )
+   );
 
if ( $row = $db->fetchObject( $res ) ) {
$id = $row->smw_id;
@@ -1988,15 +1991,21 @@
$db = wfGetDB( DB_MASTER );
$sortkey = $sortkey ? $sortkey:( str_replace( '_', ' ', 
$title ) );
 
-   $db->insert( 'smw_ids',
-   array( 'smw_id' => $db->nextSequenceValue( 
'smw_ids_smw_id_seq' ),
-  'smw_title' => $title,
-  'smw_namespace' => $namespace,
-  'smw_iw' => $iw,
-  'smw_sortkey' => $sortkey ), 
'SMW::makeSMWPageID' );
+   $db->insert(
+   'smw_ids',
+   array(
+   'smw_id' => $db->nextSequenceValue( 
'smw_ids_smw_id_seq' ),
+   'smw_title' => $title,
+   'smw_namespace' => $namespace,
+   'smw_iw' => $iw,
+   'smw_sortkey' => $sortkey
+   ),
+   'SMW::makeSMWPageID'
+   );
 
$id = $db->insertId();
$this->m_ids["$iw $namespace $title -"] = $id; // fill 
that cache, even if canonical was given
+   
// This ID is also authorative for the canonical 
version.
// This is always the case: if $canonical===false and 
$id===0, then there is no redi-entry in
// smw_ids either, hence the object just did not exist 
at all.
@@ -2086,8 +2095,17 @@
$db = wfGetDB( DB_MASTER );
 
// check if there is an unused bnode to take:
-   $res = $db->select( 'smw_ids', 'smw_id', array( 'smw_title' 
=> '', 'smw_namespace' => 0, 'smw_iw' => SMW_SQL2_SMWIW ),
-   'SMW::makeSMWBnodeID', array( 'LIMIT' 
=> 1 ) );
+   $res = $db->select(
+   'smw_ids',
+   'smw_id',
+   array(
+   'smw_title' => '',
+   'smw_namespace' => 0,
+   '

[MediaWiki-CVS] SVN: [69543] trunk/phase3/config/Installer.php

2010-07-19 Thread danny_b
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/69543

Revision: 69543
Author:   danny_b
Date: 2010-07-19 12:31:35 + (Mon, 19 Jul 2010)

Log Message:
---
* 2009 -> 2010

Modified Paths:
--
trunk/phase3/config/Installer.php

Modified: trunk/phase3/config/Installer.php
===
--- trunk/phase3/config/Installer.php   2010-07-19 11:55:30 UTC (rev 69542)
+++ trunk/phase3/config/Installer.php   2010-07-19 12:31:35 UTC (rev 69543)
@@ -2293,7 +2293,7 @@
http://www.mediawiki.org/wiki/Manual:Contents";>Administrator's 
Guide
http://www.mediawiki.org/wiki/Manual:FAQ";>FAQ

-   MediaWiki is Copyright 
© 2001-2009 by Magnus Manske, Brion Vibber,
+   MediaWiki is Copyright 
© 2001-2010 by Magnus Manske, Brion Vibber,
 Lee Daniel Crocker, Tim Starling, Erik Möller, Gabriel Wicke, 
Ævar Arnfjörð Bjarmason, Niklas Laxström,
 Domas Mituzas, Rob Church, Yuri Astrakhan, Aryeh Gregor, Aaron 
Schulz and others.




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


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

2010-07-19 Thread catrope
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/69542

Revision: 69542
Author:   catrope
Date: 2010-07-19 11:55:30 + (Mon, 19 Jul 2010)

Log Message:
---
Add iw_api and iw_wikiid fields to the interwiki table, plus rudimentary 
support in Interwiki.php and Title.php . Code written by peter17 in the 
iwtransclusion branch. This revision is a partial merge of r68170, r68448, 
r69480, r69540 and r69541

Modified Paths:
--
trunk/phase3/includes/Interwiki.php
trunk/phase3/includes/Title.php
trunk/phase3/includes/installer/Updaters.php
trunk/phase3/maintenance/tables.sql

Added Paths:
---
trunk/phase3/maintenance/archives/patch-iw_api_and_wikiid.sql

Property Changed:

trunk/phase3/includes/Interwiki.php
trunk/phase3/includes/Title.php
trunk/phase3/includes/installer/Updaters.php
trunk/phase3/maintenance/archives/
trunk/phase3/maintenance/tables.sql

Modified: trunk/phase3/includes/Interwiki.php
===
--- trunk/phase3/includes/Interwiki.php 2010-07-19 11:53:11 UTC (rev 69541)
+++ trunk/phase3/includes/Interwiki.php 2010-07-19 11:55:30 UTC (rev 69542)
@@ -15,11 +15,13 @@
protected static $smCache = array();
const CACHE_LIMIT = 100; // 0 means unlimited, any other value is max 
number of entries.
 
-   protected $mPrefix, $mURL, $mLocal, $mTrans;
+   protected $mPrefix, $mURL, $mAPI, $mWikiID, $mLocal, $mTrans;
 
-   public function __construct( $prefix = null, $url = '', $local = 0, 
$trans = 0 ) {
+   public function __construct( $prefix = null, $url = '', $api = '', 
$wikiid = '', $local = 0, $trans = 0 ) {
$this->mPrefix = $prefix;
$this->mURL = $url;
+   $this->mAPI = $api;
+   $this->mWikiID = $wikiid;
$this->mLocal = $local;
$this->mTrans = $trans;
}
@@ -153,7 +155,7 @@
__METHOD__ ) );
$iw = Interwiki::loadFromArray( $row );
if ( $iw ) {
-   $mc = array( 'iw_url' => $iw->mURL, 'iw_local' => 
$iw->mLocal, 'iw_trans' => $iw->mTrans );
+   $mc = array( 'iw_url' => $iw->mURL, 'iw_api' => 
$iw->mAPI, 'iw_local' => $iw->mLocal, 'iw_trans' => $iw->mTrans );
$wgMemc->add( $key, $mc, $wgInterwikiExpiry );
return $iw;
}
@@ -168,9 +170,12 @@
 * @return Boolean: whether everything was there
 */
protected static function loadFromArray( $mc ) {
-   if( isset( $mc['iw_url'] ) && isset( $mc['iw_local'] ) && 
isset( $mc['iw_trans'] ) ) {
+   if( isset( $mc['iw_url'] ) && isset( $mc['iw_api'] ) && isset( 
$mc['iw_wikiid'] )
+&& isset( $mc['iw_local'] ) && isset( 
$mc['iw_trans'] ) ) {
$iw = new Interwiki();
$iw->mURL = $mc['iw_url'];
+   $iw->mAPI = $mc['iw_api'];
+   $iw->mWikiID = $mc['iw_wikiid'];
$iw->mLocal = $mc['iw_local'];
$iw->mTrans = $mc['iw_trans'];
return $iw;
@@ -193,6 +198,24 @@
}
 
/**
+* Get the API URL for this wiki
+* 
+* @return String: the URL
+*/
+   public function getAPI( ) {
+   return $this->mAPI;
+   }
+
+   /**
+* Get the DB name for this wiki
+* 
+* @return String: the DB name
+*/
+   public function getWikiID( ) {
+   return $this->mWikiID;
+   }
+
+   /**
 * Is this a local link from a sister project, or is
 * it something outside, like Google
 *


Property changes on: trunk/phase3/includes/Interwiki.php
___
Added: svn:mergeinfo
   + /branches/REL1_15/phase3/includes/Interwiki.php:51646
/branches/iwtransclusion/phase3/includes/Interwiki.php:68170,68448,69480,69541
/branches/new-installer/phase3/includes/Interwiki.php:43664-66004
/branches/sqlite/includes/Interwiki.php:58211-58321
/branches/wmf-deployment/includes/Interwiki.php:53381

Modified: trunk/phase3/includes/Title.php
===
--- trunk/phase3/includes/Title.php 2010-07-19 11:53:11 UTC (rev 69541)
+++ trunk/phase3/includes/Title.php 2010-07-19 11:55:30 UTC (rev 69542)
@@ -522,6 +522,19 @@
}
 
/**
+* Returns the DB name of the distant wiki 
+* which owns the object.
+*
+* @return \type{\string} the DB name
+*/
+   public function getTransWikiID() {
+   if ( $this->mInterwiki == '' )
+   return false;
+
+   return Interwiki::fetch( $this->mInterwiki )->getWikiID();
+   }
+
+   /

[MediaWiki-CVS] SVN: [69541] branches/iwtransclusion/phase3/includes/Interwiki.php

2010-07-19 Thread catrope
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/69541

Revision: 69541
Author:   catrope
Date: 2010-07-19 11:53:11 + (Mon, 19 Jul 2010)

Log Message:
---
iwtransclusion: Add $mWikiID member to Interwiki class

Modified Paths:
--
branches/iwtransclusion/phase3/includes/Interwiki.php

Modified: branches/iwtransclusion/phase3/includes/Interwiki.php
===
--- branches/iwtransclusion/phase3/includes/Interwiki.php   2010-07-19 
11:46:30 UTC (rev 69540)
+++ branches/iwtransclusion/phase3/includes/Interwiki.php   2010-07-19 
11:53:11 UTC (rev 69541)
@@ -15,7 +15,7 @@
protected static $smCache = array();
const CACHE_LIMIT = 100; // 0 means unlimited, any other value is max 
number of entries.
 
-   protected $mPrefix, $mURL, $mAPI, $mLocal, $mTrans;
+   protected $mPrefix, $mURL, $mAPI, $mWikiID, $mLocal, $mTrans;
 
public function __construct( $prefix = null, $url = '', $api = '', 
$wikiid = '', $local = 0, $trans = 0 ) {
$this->mPrefix = $prefix;



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


[MediaWiki-CVS] SVN: [69540] branches/iwtransclusion/phase3/maintenance

2010-07-19 Thread catrope
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/69540

Revision: 69540
Author:   catrope
Date: 2010-07-19 11:46:30 + (Mon, 19 Jul 2010)

Log Message:
---
iwtransclusion: Add updater for iw_api and iw_wikiid fields

Modified Paths:
--
branches/iwtransclusion/phase3/maintenance/updaters.inc

Added Paths:
---

branches/iwtransclusion/phase3/maintenance/archives/patch-iw_api_and_wikiid.sql

Added: 
branches/iwtransclusion/phase3/maintenance/archives/patch-iw_api_and_wikiid.sql
===
--- 
branches/iwtransclusion/phase3/maintenance/archives/patch-iw_api_and_wikiid.sql 
(rev 0)
+++ 
branches/iwtransclusion/phase3/maintenance/archives/patch-iw_api_and_wikiid.sql 
2010-07-19 11:46:30 UTC (rev 69540)
@@ -0,0 +1,9 @@
+--
+-- Add iw_api and iw_wikiid to interwiki table
+--
+
+ALTER TABLE /*_*/interwiki
+   ADD iw_api BLOB NOT NULL;
+ALTER TABLE /*_*/interwiki
+   ADD iw_wikiid varchar(64) NOT NULL;
+

Modified: branches/iwtransclusion/phase3/maintenance/updaters.inc
===
--- branches/iwtransclusion/phase3/maintenance/updaters.inc 2010-07-19 
10:58:12 UTC (rev 69539)
+++ branches/iwtransclusion/phase3/maintenance/updaters.inc 2010-07-19 
11:46:30 UTC (rev 69540)
@@ -176,6 +176,7 @@
// 1.17
array( 'add_table', 'iwlinks',   
'patch-iwlinks.sql' ),
array( 'add_index', 'iwlinks', 'iwl_prefix_from_title',  
'patch-rename-iwl_prefix.sql' ),
+   array( 'add_field', 'interwiki', 'iw_api',   
'patch-iw_api_and_wikiid.sql' ),
),
 
'sqlite' => array(
@@ -207,6 +208,7 @@
// 1.17
array( 'add_table', 'iwlinks',   
'patch-iwlinks.sql' ),
array( 'add_index', 'iwlinks', 'iwl_prefix_from_title',  
'patch-rename-iwl_prefix.sql' ),
+   array( 'add_field', 'interwiki', 'iw_api',   
'patch-iw_api_and_wikiid.sql' ),
),
 );
 



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


[MediaWiki-CVS] SVN: [69539] trunk/phase3/skins/Vector.php

2010-07-19 Thread danny_b
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/69539

Revision: 69539
Author:   danny_b
Date: 2010-07-19 10:58:12 + (Mon, 19 Jul 2010)

Log Message:
---
Follow up to r69538: Use $stylename member instead of hardcoding vector.

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

Modified: trunk/phase3/skins/Vector.php
===
--- trunk/phase3/skins/Vector.php   2010-07-19 10:52:01 UTC (rev 69538)
+++ trunk/phase3/skins/Vector.php   2010-07-19 10:58:12 UTC (rev 69539)
@@ -771,7 +771,7 @@
getOption( 
'vector-simplesearch' ) ): ?>

skin->tooltipAndAccesskey( 'search' ); ?> data['search'] ) ): ?> value="text( 'search' ) ?>" />
-   skin->tooltipAndAccesskey( 'search-fulltext' ); ?>>
+   skin->tooltipAndAccesskey( 'search-fulltext' ); ?>>stylename}/search-" . ( 
$wgContLang->isRTL() ? 'rtl' : 'ltr' ) . '.png?' . $wgStyleVersion ?>" 
alt="msg( 'searchbutton' ) ?>" />


skin->tooltipAndAccesskey( 'search' ); ?> data['search'] ) ): ?> value="text( 'search' ) ?>" />



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


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

2010-07-19 Thread danny_b
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/69538

Revision: 69538
Author:   danny_b
Date: 2010-07-19 10:52:01 + (Mon, 19 Jul 2010)

Log Message:
---
* (bug 24401) SimpleSearch: No button/text indicating 'Search' if image is 
disabled

Modified Paths:
--
trunk/phase3/RELEASE-NOTES
trunk/phase3/skins/Vector.php
trunk/phase3/skins/vector/main-ltr.css
trunk/phase3/skins/vector/main-rtl.css

Modified: trunk/phase3/RELEASE-NOTES
===
--- trunk/phase3/RELEASE-NOTES  2010-07-19 08:52:04 UTC (rev 69537)
+++ trunk/phase3/RELEASE-NOTES  2010-07-19 10:52:01 UTC (rev 69538)
@@ -242,6 +242,7 @@
 * (bug 24244) Updated comments in DefaultSettings.php to reflect Image: --> 
File:
   namespace rename.
 * Make wfTimestamp recognize negative unix timestamp values.
+* (bug 24401) SimpleSearch: No button/text indicating 'Search' if image is 
disabled
 
 === API changes in 1.17 ===
 * (bug 22738) Allow filtering by action type on query=logevent.

Modified: trunk/phase3/skins/Vector.php
===
--- trunk/phase3/skins/Vector.php   2010-07-19 08:52:04 UTC (rev 69537)
+++ trunk/phase3/skins/Vector.php   2010-07-19 10:52:01 UTC (rev 69538)
@@ -771,7 +771,7 @@
getOption( 
'vector-simplesearch' ) ): ?>

skin->tooltipAndAccesskey( 'search' ); ?> data['search'] ) ): ?> value="text( 'search' ) ?>" />
-   skin->tooltipAndAccesskey( 'search-fulltext' ); 
?>> 
+   skin->tooltipAndAccesskey( 'search-fulltext' ); ?>>


skin->tooltipAndAccesskey( 'search' ); ?> data['search'] ) ): ?> value="text( 'search' ) ?>" />

Modified: trunk/phase3/skins/vector/main-ltr.css
===
--- trunk/phase3/skins/vector/main-ltr.css  2010-07-19 08:52:04 UTC (rev 
69537)
+++ trunk/phase3/skins/vector/main-ltr.css  2010-07-19 10:52:01 UTC (rev 
69538)
@@ -383,16 +383,18 @@
/* OVERRIDDEN BY COMPLIANT BROWSERS */
div#simpleSearch button#searchButton {
padding: 0;
-   margin: 5px 5px 0 5px;
-   height: 13px;
-   width: 12px;
+   margin: 0 5px;
border: none;
cursor: pointer;
background-color: transparent;
-   background-image: url(images/search-ltr.png?1);
-   background-position: center center;
-   background-repeat: no-repeat;
+   font-size: x-small;
}
+   div#simpleSearch button#searchButton img {
+   border: none;
+   margin: 0;
+   padding: 0;
+   vertical-align: middle;
+   }
 /* Panel */
 div#mw-panel {
position: absolute;

Modified: trunk/phase3/skins/vector/main-rtl.css
===
--- trunk/phase3/skins/vector/main-rtl.css  2010-07-19 08:52:04 UTC (rev 
69537)
+++ trunk/phase3/skins/vector/main-rtl.css  2010-07-19 10:52:01 UTC (rev 
69538)
@@ -383,16 +383,18 @@
/* OVERRIDDEN BY COMPLIANT BROWSERS */
div#simpleSearch button#searchButton {
padding: 0;
-   margin: 5px 5px 0 5px;
-   height: 13px;
-   width: 12px;
+   margin: 0 5px;
border: none;
cursor: pointer;
background-color: transparent;
-   background-image: url(images/search-rtl.png?1);
-   background-position: center center;
-   background-repeat: no-repeat;
+   font-size: x-small;
}
+   div#simpleSearch button#searchButton img {
+   border: none;
+   margin: 0;
+   padding: 0;
+   vertical-align: middle;
+   }
 /* Panel */
 div#mw-panel {
position: absolute;



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


[MediaWiki-CVS] SVN: [69537] branches/img_metadata/phase3/includes

2010-07-19 Thread bawolff
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/69537

Revision: 69537
Author:   bawolff
Date: 2010-07-19 08:52:04 + (Mon, 19 Jul 2010)

Log Message:
---
Stuff relating to DateTime in iptc

Modified Paths:
--
branches/img_metadata/phase3/includes/Exif.php
branches/img_metadata/phase3/includes/media/IPTC.php

Modified: branches/img_metadata/phase3/includes/Exif.php
===
--- branches/img_metadata/phase3/includes/Exif.php  2010-07-19 08:19:54 UTC 
(rev 69536)
+++ branches/img_metadata/phase3/includes/Exif.php  2010-07-19 08:52:04 UTC 
(rev 69537)
@@ -918,7 +918,10 @@
$val = wfMsg( 
'exif-unknowndate' );
} elseif ( preg_match( 
'/^(?:\d{4}):(?:\d\d):(?:\d\d) (?:\d\d):(?:\d\d):(?:\d\d)$/', $val ) ) {
$val = $wgLang->timeanddate( 
wfTimestamp( TS_MW, $val ) );
+   } elseif ( preg_match( 
'/^(?:\d{4}):(?:\d\d):(?:\d\d)$/', $val ) ) {
+   $val = $wgLang->date( 
wfTimestamp( TS_MW, $val . ' 00:00:00' ) );
}
+   // else it will just output $val 
without formatting it.
break;
 
case 'ExposureProgram':

Modified: branches/img_metadata/phase3/includes/media/IPTC.php
===
--- branches/img_metadata/phase3/includes/media/IPTC.php2010-07-19 
08:19:54 UTC (rev 69536)
+++ branches/img_metadata/phase3/includes/media/IPTC.php2010-07-19 
08:52:04 UTC (rev 69537)
@@ -19,7 +19,6 @@
 * @return Array iptc metadata array
 */
 static function parse( $rawData ) {
-// TODO: This is nowhere near complete yet.
 $parsed = iptcparse( $rawData );
 $data = Array();
 if (!is_array($parsed)) {
@@ -153,6 +152,40 @@
case '2#135': /* lang code */
$data['LanguageCode'] = self::convIPTC( 
$val, $c );
break;
+
+   // Start date stuff.
+   // It doesn't accept incomplete dates even 
though they are valid
+   // according to spec.
+   // Should potentially store timezone as well.
+   case '2#055':
+   //Date created (not date digitized).
+   //Maps to exif DateTimeOriginal
+   if ( isset( $parsed['2#060'] ) ) {
+   $time = $parsed['2#060'];
+   } else {
+   $time = Array();
+   }
+   $timestamp =  self::timeHelper( $val, 
$time, $c );
+   if ($timestamp) {
+   $data['DateTimeOriginal'] = 
$timestamp;
+   }
+   break;
+
+   case '2#062':
+   //Date converted to digital 
representation.
+   //Maps to exif DateTimeDigitized
+   if ( isset( $parsed['2#063'] ) ) {
+   $time = $parsed['2#063'];
+   } else {
+   $time = Array();
+   }
+   $timestamp =  self::timeHelper( $val, 
$time, $c );
+   if ($timestamp) {
+   $data['DateTimeDigitized'] = 
$timestamp;
+   }
+   break;
+
+
case '2#000': /* iim version */
// unlike other tags, this is a 2-byte 
binary number.
//technically this is required if there 
is iptc data
@@ -176,6 +209,12 @@
// 2:200, 2:201, 2:202
// or the audio stuff (2:150 to 2:154)
 
+   case '2#070':
+   case '2#060':
+   case '2#063':
+   //ignore. Handled elsewhere.
+   break;
+
defau

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

2010-07-19 Thread catrope
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/69536

Revision: 69536
Author:   catrope
Date: 2010-07-19 08:19:54 + (Mon, 19 Jul 2010)

Log Message:
---
Reverse-merge r69521 from 1.16wmf4: fix OpenSearch caching

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

Property Changed:

trunk/phase3/includes/api/


Property changes on: trunk/phase3/includes/api
___
Modified: svn:mergeinfo
   - /branches/REL1_15/phase3/includes/api:51646
/branches/REL1_16/phase3/includes/api:63621-63636,69357
/branches/sqlite/includes/api:58211-58321
/branches/wmf-deployment/includes/api:53381,59952
   + /branches/REL1_15/phase3/includes/api:51646
/branches/REL1_16/phase3/includes/api:63621-63636,69357
/branches/sqlite/includes/api:58211-58321
/branches/wmf/1.16wmf4/includes/api:69521
/branches/wmf-deployment/includes/api:53381,59952

Modified: trunk/phase3/includes/api/ApiMain.php
===
--- trunk/phase3/includes/api/ApiMain.php   2010-07-19 05:57:23 UTC (rev 
69535)
+++ trunk/phase3/includes/api/ApiMain.php   2010-07-19 08:19:54 UTC (rev 
69536)
@@ -332,7 +332,7 @@
}

// If this wiki is private, don't cache anything ever
-   if ( in_array( 'read', User::getGroupPermissions( array( '*' ) 
), true ) ) {
+   if ( ! in_array( 'read', User::getGroupPermissions( array( '*' 
) ), true ) ) {
$this->setCachePrivate();
}
 



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