[MediaWiki-commits] [Gerrit] mediawiki...Cite[master]: When wikitext is ending with a list, references are merged i...

2016-09-05 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/308571

Change subject: When wikitext is ending with a list, references are merged into 
that list.
..

When wikitext is ending with a list, references are merged into that list.

Testcase is: "Aabc \n #list"

Change-Id: I9396abfeb43369bf755ee8bf92ffa6fb0a4a83db
---
M Cite_body.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cite 
refs/changes/71/308571/1

diff --git a/Cite_body.php b/Cite_body.php
index 30535df..4f16e23 100644
--- a/Cite_body.php
+++ b/Cite_body.php
@@ -1168,7 +1168,7 @@
continue;
}
if ( $group === self::DEFAULT_GROUP || 
$isSectionPreview ) {
-   $s .= $this->referencesFormat( $group );
+   $s .= "\n".$this->referencesFormat( $group );
} else {
$s .= "\n" .
$this->error( 
'cite_error_group_refs_without_references', htmlspecialchars( $group ) );

-- 
To view, visit https://gerrit.wikimedia.org/r/308571
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9396abfeb43369bf755ee8bf92ffa6fb0a4a83db
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Cite
Gerrit-Branch: master
Gerrit-Owner: VitaliyFilippov 

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


[MediaWiki-commits] [Gerrit] Remove wgAlwaysUseTidy from ExpandTemplates - change (mediawiki/core)

2015-11-27 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/255784

Change subject: Remove wgAlwaysUseTidy from ExpandTemplates
..

Remove wgAlwaysUseTidy from ExpandTemplates

Fixes ConfigException:

Exception encountered, of type "ConfigException"
[1235d69e] index.php/Special:ExpandTemplates ConfigException
from line 53 of
includes/config/GlobalVarConfig.php:
GlobalVarConfig::get: undefined option: 'AlwaysUseTidy'
Backtrace:
includes/specials/SpecialExpandTemplates.php(117):
GlobalVarConfig->get(string)
i   includes/specialpage/SpecialPage.php(384):
SpecialExpandTemplates->execute(NULL)

Change-Id: Iba16f12f50f7427533f89817eb40f46a2ab58ec4
---
M includes/specials/SpecialExpandTemplates.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/84/255784/1

diff --git a/includes/specials/SpecialExpandTemplates.php 
b/includes/specials/SpecialExpandTemplates.php
index b7582e6..06eb276 100644
--- a/includes/specials/SpecialExpandTemplates.php
+++ b/includes/specials/SpecialExpandTemplates.php
@@ -114,7 +114,7 @@
}
 
$config = $this->getConfig();
-   if ( ( $config->get( 'UseTidy' ) && $options->getTidy() 
) || $config->get( 'AlwaysUseTidy' ) ) {
+   if ( $config->get( 'UseTidy' ) && $options->getTidy() ) 
{
$tmp = MWTidy::tidy( $tmp );
}
 

-- 
To view, visit https://gerrit.wikimedia.org/r/255784
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iba16f12f50f7427533f89817eb40f46a2ab58ec4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_26
Gerrit-Owner: VitaliyFilippov 
Gerrit-Reviewer: saper 

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


[MediaWiki-commits] [Gerrit] \n should be in double quotes else it gets unmodified to Spe... - change (mediawiki/core)

2015-11-26 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/255651

Change subject: \n should be in double quotes else it gets unmodified to 
Special:Search!
..

\n should be in double quotes else it gets unmodified to Special:Search!

Change-Id: Iae9de0197aebf000f399f1051e5f5ee49eea4ce1
---
M includes/specials/SpecialSearch.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/51/255651/1

diff --git a/includes/specials/SpecialSearch.php 
b/includes/specials/SpecialSearch.php
index f50fb73..be762e4 100644
--- a/includes/specials/SpecialSearch.php
+++ b/includes/specials/SpecialSearch.php
@@ -388,7 +388,7 @@
}
}
 
-   $out->addHTML( '\n' );
+   $out->addHTML( "\n" );
if ( $prevnext ) {
$out->addHTML( "{$prevnext}\n" );
}

-- 
To view, visit https://gerrit.wikimedia.org/r/255651
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iae9de0197aebf000f399f1051e5f5ee49eea4ce1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_26
Gerrit-Owner: VitaliyFilippov 

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


[MediaWiki-commits] [Gerrit] Add option to include diffs in page change notification emails - change (mediawiki/core)

2015-10-27 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/249156

Change subject: Add option to include diffs in page change notification emails
..

Add option to include diffs in page change notification emails

Also add option to send separate emails for each change instead of only one
email for all changes since the last page visit.

Bug: T15303
Change-Id: I36bcb26580fbba924fc49a1d4f5245aee7189434
---
M includes/DefaultSettings.php
M includes/Preferences.php
M includes/mail/EmailNotification.php
M languages/i18n/en.json
M languages/i18n/ru.json
5 files changed, 46 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/56/249156/1

diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index c8da21e..ada1598 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -4538,6 +4538,8 @@
'enotifrevealaddr' => 0,
'enotifusertalkpages' => 1,
'enotifwatchlistpages' => 1,
+   'enotifsenddiffs' => 0,
+   'enotifsendmultiple' => 0,
'extendwatchlist' => 1,
'fancysig' => 0,
'forceeditsummary' => 0,
diff --git a/includes/Preferences.php b/includes/Preferences.php
index 0f8dcc3..2eb382c 100644
--- a/includes/Preferences.php
+++ b/includes/Preferences.php
@@ -551,7 +551,18 @@
'label-message' => 
'tog-enotifminoredits',
'disabled' => $disableEmailPrefs,
);
-
+   $defaultPreferences['enotifsenddiffs'] = array(
+   'type' => 'toggle',
+   'section' => 'personal/email',
+   'label-message' => 
'tog-enotifsenddiffs',
+   'disabled' => $disableEmailPrefs,
+   );
+   $defaultPreferences['enotifsendmultiple'] = 
array(
+   'type' => 'toggle',
+   'section' => 'personal/email',
+   'label-message' => 
'tog-enotifsendmultiple',
+   'disabled' => $disableEmailPrefs,
+   );
if ( $config->get( 'EnotifRevealEditorAddress' 
) ) {
$defaultPreferences['enotifrevealaddr'] 
= array(
'type' => 'toggle',
diff --git a/includes/mail/EmailNotification.php 
b/includes/mail/EmailNotification.php
index 29a19be..cf4b39d 100644
--- a/includes/mail/EmailNotification.php
+++ b/includes/mail/EmailNotification.php
@@ -86,13 +86,15 @@
}
 
$dbw = wfGetDB( DB_MASTER );
+   $tbl = $dbw->tableName( 'user_properties' );
$res = $dbw->select( array( 'watchlist' ),
array( 'wl_user' ),
array(
'wl_user != ' . intval( $editor->getID() ),
'wl_namespace' => $title->getNamespace(),
'wl_title' => $title->getDBkey(),
-   'wl_notificationtimestamp IS NULL',
+   "(wl_notificationtimestamp IS NULL OR EXISTS 
(SELECT * FROM $tbl".
+   " WHERE up_user=wl_user AND up_property 
IN ('enotifsendmultiple', 'enotifsenddiff') AND up_value=1))",
), __METHOD__
);
 
@@ -395,6 +397,18 @@
Skin::makeInternalOrExternalUrl( wfMessage( 'helppage' 
)->inContentLanguage()->text() )
);
 
+   // Generate diff
+   $context = new DerivativeContext( RequestContext::getMain() );
+   $out = new OutputPage( $context );
+   $context->setOutput( $out );
+   $de = new DifferenceEngine( $context, $keys['$OLDID'], 'next' );
+   $de->showDiffPage( true );
+   $diff = $out->getHTML();
+   $diff = preg_replace( '#^(.*?)]*>.*?#is', '\1', 
$diff, 1 );
+   $diff = preg_replace( 
'#class=[\"\']?diff-deletedline[\"\']?#is', 'style="background-color: 
#aa"', $diff );
+   $diff = preg_replace( '#class=[\"\']?diff-addedline[\"\']?#is', 
'style="background-color: #ccffcc"', $diff );
+   $this->diff = preg_replace( 
'#class=[\"\']?diffchange\s*diffchange-inline[\"\']?#is', 'style="color: red; 
font-weight: bold"', $diff );
+
# Replace this after transforming the message, bug 35019
$postTransformKeys['$PAGESUMMARY'] = $this->summary == '' ? 
wfMessage( 'enotif_empty_summary' )->text() : $this->summary;
 
@@ -504,6 

[MediaWiki-commits] [Gerrit] Send HTML page change notification emails - change (mediawiki/core)

2015-10-27 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/249155

Change subject: Send HTML page change notification emails
..

Send HTML page change notification emails

Bug: T15303
Change-Id: I88100a5e0795f40482a1e78f9c1774c75e2a2c9a
---
M includes/mail/EmailNotification.php
M languages/i18n/en.json
M languages/i18n/ru.json
3 files changed, 42 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/55/249155/1

diff --git a/includes/mail/EmailNotification.php 
b/includes/mail/EmailNotification.php
index 044bb53..29a19be 100644
--- a/includes/mail/EmailNotification.php
+++ b/includes/mail/EmailNotification.php
@@ -336,7 +336,7 @@
# named variables when composing your notification emails while
# simply editing the Meta pages
 
-   $keys = array();
+   $keys = $keysHtml = array();
$postTransformKeys = array();
$pageTitleUrl = $this->title->getCanonicalURL();
$pageTitle = $this->title->getPrefixedText();
@@ -346,6 +346,9 @@
$keys['$NEWPAGE'] = "\n\n" . wfMessage( 
'enotif_lastdiff',
$this->title->getCanonicalURL( array( 
'diff' => 'next', 'oldid' => $this->oldid ) ) )
->inContentLanguage()->text();
+   $keysHtml['$NEWPAGE'] = wfMessage( 
'enotif_lastdiff_html',
+   $this->title->getCanonicalURL( array( 
'diff' => 'next', 'oldid' => $this->oldid ) ) )
+   ->inContentLanguage()->plain();
 
if ( !$wgEnotifImpersonal ) {
// For personal mail, also show a link to the 
diff of all changes
@@ -353,6 +356,9 @@
$keys['$NEWPAGE'] .= "\n\n" . wfMessage( 
'enotif_lastvisited',
$this->title->getCanonicalURL( 
array( 'diff' => '0', 'oldid' => $this->oldid ) ) )
->inContentLanguage()->text();
+   $keysHtml['$NEWPAGE'] .= wfMessage( 
'enotif_lastvisited_html',
+   $this->title->getCanonicalURL( 
array( 'diff' => '0', 'oldid' => $this->oldid ) ) )
+   ->inContentLanguage()->plain();
}
$keys['$OLDID'] = $this->oldid;
// Deprecated since MediaWiki 1.21, not used by 
default. Kept for backwards-compatibility.
@@ -390,7 +396,7 @@
);
 
# Replace this after transforming the message, bug 35019
-   $postTransformKeys['$PAGESUMMARY'] = $this->summary == '' ? ' - 
' : $this->summary;
+   $postTransformKeys['$PAGESUMMARY'] = $this->summary == '' ? 
wfMessage( 'enotif_empty_summary' )->text() : $this->summary;
 
// Now build message's subject and body
 
@@ -406,11 +412,25 @@
$keys['$PAGEINTRO'] = wfMessage( 'enotif_body_intro_' . 
$this->pageStatus )
->inContentLanguage()->params( $pageTitle, 
$keys['$PAGEEDITOR'], $pageTitleUrl )
->text();
+   $keysHtml['$PAGEINTRO'] = wfMessage( 'enotif_body_intro_' . 
$this->pageStatus )
+   ->inContentLanguage()->params( htmlspecialchars( 
$pageTitle ), htmlspecialchars( $keys['$PAGEEDITOR'] ),
+   ''.htmlspecialchars( urldecode( 
$this->title->getCanonicalUrl() ) ).'' )
+   ->plain();
 
$body = wfMessage( 'enotif_body' 
)->inContentLanguage()->plain();
$body = strtr( $body, $keys );
$body = MessageCache::singleton()->transform( $body, false, 
null, $this->title );
$this->body = wordwrap( strtr( $body, $postTransformKeys ), 72 
);
+
+   foreach ( $keys as $k => $v ) {
+   if ( !isset( $keysHtml[$k] ) ) {
+   $keysHtml[$k] = htmlspecialchars( $v );
+   }
+   }
+   $bodyHtml = wfMessage( 'enotif_body_html' 
)->inContentLanguage()->plain();
+   $bodyHtml = strtr( $bodyHtml, $keysHtml );
+   $bodyHtml = MessageCache::singleton()->transform( $bodyHtml, 
false, null, $this->title );
+   $this->bodyHtml = strtr( $bodyHtml, $postTransformKeys );
 
# Reveal the page editor's address as REPLY-TO address only if
# the user has not opted-out and the option is enabled at the
@@ -487,15 +507,19 @@
# $PAGEEDITDATE is the time and date of the page change
# expressed in terms of individual local time of the 
notification

[MediaWiki-commits] [Gerrit] Send HTML confirmation and password reset/reminder emails - change (mediawiki/core)

2015-10-27 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/249154

Change subject: Send HTML confirmation and password reset/reminder emails
..

Send HTML confirmation and password reset/reminder emails

Bug: T15303
Change-Id: I993a81a10ea467531c92bab7168aeab1f0c99b47
---
M includes/User.php
M includes/specials/SpecialPasswordReset.php
M includes/specials/SpecialUserlogin.php
3 files changed, 12 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/54/249154/1

diff --git a/includes/User.php b/includes/User.php
index 1727a4a..f1f14b5 100644
--- a/includes/User.php
+++ b/includes/User.php
@@ -4268,7 +4268,7 @@
$wgLang->timeanddate( $expiration, false ),
$invalidateURL,
$wgLang->date( $expiration, false ),
-   $wgLang->time( $expiration, false ) )->text() );
+   $wgLang->time( $expiration, false ) ) );
}
 
/**
@@ -4293,6 +4293,13 @@
}
$to = MailAddress::newFromUser( $this );
 
+   if ( $body instanceof Message ) {
+   $body = array(
+   'html' => $body->parse(),
+   'text' => $body->text(),
+   );
+   }
+
return UserMailer::send( $to, $sender, $subject, $body, array(
'replyTo' => $replyto,
) );
diff --git a/includes/specials/SpecialPasswordReset.php 
b/includes/specials/SpecialPasswordReset.php
index 53e1d1b..96825de 100644
--- a/includes/specials/SpecialPasswordReset.php
+++ b/includes/specials/SpecialPasswordReset.php
@@ -267,13 +267,13 @@
$username,
$passwordBlock,
count( $passwords ),
-   '<' . Title::newMainPage()->getCanonicalURL() . '>',
+   Title::newMainPage()->getCanonicalURL(),
round( $this->getConfig()->get( 'NewPasswordExpiry' ) / 
86400 )
);
 
$title = $this->msg( 'passwordreset-emailtitle' )->inLanguage( 
$userLanguage );
 
-   $this->result = $firstUser->sendMail( $title->text(), 
$this->email->text() );
+   $this->result = $firstUser->sendMail( $title->text(), 
$this->email );
 
if ( isset( $data['Capture'] ) && $data['Capture'] ) {
// Save the user, will be used if an error occurs when 
sending the email
diff --git a/includes/specials/SpecialUserlogin.php 
b/includes/specials/SpecialUserlogin.php
index 8864b98..c045112 100644
--- a/includes/specials/SpecialUserlogin.php
+++ b/includes/specials/SpecialUserlogin.php
@@ -1146,8 +1146,8 @@
$mainPage = Title::newMainPage();
$mainPageUrl = $mainPage->getCanonicalURL();
 
-   $m = $this->msg( $emailText, $ip, $u->getName(), $np, '<' . 
$mainPageUrl . '>',
-   round( $wgNewPasswordExpiry / 86400 ) )->inLanguage( 
$userLanguage )->text();
+   $m = $this->msg( $emailText, $ip, $u->getName(), $np, 
$mainPageUrl,
+   round( $wgNewPasswordExpiry / 86400 ) )->inLanguage( 
$userLanguage );
$result = $u->sendMail( $this->msg( $emailTitle )->inLanguage( 
$userLanguage )->text(), $m );
 
return $result;

-- 
To view, visit https://gerrit.wikimedia.org/r/249154
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I993a81a10ea467531c92bab7168aeab1f0c99b47
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: VitaliyFilippov 

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


[MediaWiki-commits] [Gerrit] Use ResourceLoader - change (mediawiki...SlimboxThumbs)

2015-10-13 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/245851

Change subject: Use ResourceLoader
..

Use ResourceLoader

Change-Id: I09f750fff50a6596ede905eca87a00c740691cf8
---
M SlimboxThumbs.php
M slimbox/slimboxthumbs.js
2 files changed, 18 insertions(+), 22 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SlimboxThumbs 
refs/changes/51/245851/1

diff --git a/SlimboxThumbs.php b/SlimboxThumbs.php
index 0276e20..67eb5af 100644
--- a/SlimboxThumbs.php
+++ b/SlimboxThumbs.php
@@ -42,6 +42,19 @@
'version' => SlimboxThumbs_VERSION,
 );
 
+$wgResourceModules['ext.SlimboxThumbs'] = array(
+   'localBasePath' => __DIR__,
+   'remoteExtPath' => 'SlimboxThumbs',
+   'dependencies' => [],
+   'styles' => [
+   'slimbox/css/slimbox2.css',
+   ],
+   'scripts' => [
+   'slimbox/js/slimbox2.js',
+   'slimbox/slimboxthumbs.js',
+   ],
+);
+
 $dir = dirname( __FILE__ ) . '/';
 $wgMessagesDirs['SlimboxThumbs'] = __DIR__ . '/i18n';
 $wgExtensionMessagesFiles['SlimboxThumbs'] = $dir . 'SlimboxThumbs.i18n.php';
@@ -104,30 +117,13 @@
 
 // Adds javascript files and stylesheets.
 function efSBTAddScripts( $out ) {
-   global $wgVersion, $wgExtensionAssetsPath, $wgUploadPath, $wgServer, 
$wgScriptPath, $wgArticlePath;
-
-   $mw16 = version_compare( $wgVersion, '1.16', '>=' );
-   $useExtensionPath = $mw16 && isset( $wgExtensionAssetsPath ) && 
$wgExtensionAssetsPath;
-   $eDir = ( $useExtensionPath ? $wgExtensionAssetsPath : $wgScriptPath . 
'/extensions' );
-   $eDir .= '/SlimboxThumbs/slimbox';
-
-   if ( $mw16 ) {
-   $out->includeJQuery();
-   } else {
-   $out->addScript(
-   'http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js";>'
 . "\n"
-   );
-   }
+   global $wgServer, $wgScriptPath, $wgArticlePath;
 
$re = str_replace( '\\$1', '[^:]+:(.*)', preg_quote( $wgArticlePath ) );
-
-   $out->addScript( '' . "\n" );
-   $out->addExtensionStyle( $eDir . '/css/slimbox2.css', 'screen' );
-   $out->addScript( '' . "\n" );
-   $out->addInlineScript( "$( window ).on( 'load', function() {".
+   $out->addModules( 'ext.SlimboxThumbs' );
+   $out->addScript( ResourceLoader::makeInlineScript( "mw.loader.using( 
'ext.SlimboxThumbs' ).done( function() {".
"makeSlimboxThumbs( jQuery, \"".addslashes( $re ).
-   "\", \"".addslashes( $wgServer.$wgScriptPath )."\" ); } );" );
+   "\", \"".addslashes( $wgServer.$wgScriptPath )."\" ); } );" ) );
 
return true;
 }
diff --git a/slimbox/slimboxthumbs.js b/slimbox/slimboxthumbs.js
index 6dc266e..ab469d9 100644
--- a/slimbox/slimboxthumbs.js
+++ b/slimbox/slimboxthumbs.js
@@ -4,7 +4,7 @@
  * Contributor(s): Vitaliy Filippov 
  */
 
-function makeSlimboxThumbs( $, pathRegexp, wgFullScriptPath ) {
+window.makeSlimboxThumbs = function( $, pathRegexp, wgFullScriptPath ) {
var re = new RegExp( pathRegexp );
var reExcl = /(^|\/)skins\//;
var canview = /\.(jpe?g|jpe|gif|png)$/i;

-- 
To view, visit https://gerrit.wikimedia.org/r/245851
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I09f750fff50a6596ede905eca87a00c740691cf8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SlimboxThumbs
Gerrit-Branch: master
Gerrit-Owner: VitaliyFilippov 

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


[MediaWiki-commits] [Gerrit] Update Slimbox2 to 2.0.5 - change (mediawiki...SlimboxThumbs)

2015-10-13 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/245852

Change subject: Update Slimbox2 to 2.0.5
..

Update Slimbox2 to 2.0.5

Fixes overlay position bug

Change-Id: Ie62ec0854eecf94ed5dd5e7f1976156036231a68
---
M slimbox/README.txt
M slimbox/example.html
M slimbox/js/slimbox2.js
M slimbox/src/slimbox2.js
4 files changed, 17 insertions(+), 20 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SlimboxThumbs 
refs/changes/52/245852/1

diff --git a/slimbox/README.txt b/slimbox/README.txt
index 3cb..d81e571 100644
--- a/slimbox/README.txt
+++ b/slimbox/README.txt
@@ -1,12 +1,12 @@
-SLIMBOX V2.04 README
+SLIMBOX V2.05 README
 
 The ultimate lightweight Lightbox clone
 ... now using the jQuery javascript library
 
-(c) Christophe Beyls 2007-2010
+(c) Christophe Beyls 2007-2013
 MIT-style license
 
-http://code.google.com/p/slimbox/
+https://github.com/cbeyls/slimbox
 
 
 Included files:
@@ -33,4 +33,4 @@
 For more information, please read the documentation on the official project 
page.
 
 
-Enjoy!
\ No newline at end of file
+Enjoy!
diff --git a/slimbox/example.html b/slimbox/example.html
index adba369..313d11e 100644
--- a/slimbox/example.html
+++ b/slimbox/example.html
@@ -2,7 +2,7 @@
 
 
Slimbox 2 example page
-   http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js";>
+   http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js";>



[MediaWiki-commits] [Gerrit] Use jQuery instead of deprecated addHandler - change (mediawiki...SlimboxThumbs)

2013-12-10 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/100574


Change subject: Use jQuery instead of deprecated addHandler
..

Use jQuery instead of deprecated addHandler

Change-Id: Id590f7c895cff7463ccf29517cb605f9d039e0dc
---
M SlimboxThumbs.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SlimboxThumbs 
refs/changes/74/100574/1

diff --git a/SlimboxThumbs.php b/SlimboxThumbs.php
index ee37dfa..cb5c351 100644
--- a/SlimboxThumbs.php
+++ b/SlimboxThumbs.php
@@ -124,7 +124,7 @@
$out-addScript( 'script type=text/javascript src=' . $eDir . 
'/js/slimbox2.js/script' . \n );
$out-addExtensionStyle( $eDir . '/css/slimbox2.css', 'screen' );
$out-addScript( 'script type=text/javascript src=' . $eDir . 
'/slimboxthumbs.js/script' . \n );
-   $out-addInlineScript( addHandler( window, 'load', function() {.
+   $out-addInlineScript( $( window ).on( 'load', function() {.
makeSlimboxThumbs( jQuery, \.addslashes( $re ).
\, \.addslashes( $wgServer.$wgScriptPath ).\ ); } ); );
 

-- 
To view, visit https://gerrit.wikimedia.org/r/100574
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id590f7c895cff7463ccf29517cb605f9d039e0dc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SlimboxThumbs
Gerrit-Branch: master
Gerrit-Owner: VitaliyFilippov vita...@yourcmc.ru

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


[MediaWiki-commits] [Gerrit] Use jQuery instead of deprecated addHandler - change (mediawiki...SlimboxThumbs)

2013-12-10 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has submitted this change and it was merged.

Change subject: Use jQuery instead of deprecated addHandler
..


Use jQuery instead of deprecated addHandler

Change-Id: Id590f7c895cff7463ccf29517cb605f9d039e0dc
---
M SlimboxThumbs.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  VitaliyFilippov: Verified; Looks good to me, approved



diff --git a/SlimboxThumbs.php b/SlimboxThumbs.php
index ee37dfa..cb5c351 100644
--- a/SlimboxThumbs.php
+++ b/SlimboxThumbs.php
@@ -124,7 +124,7 @@
$out-addScript( 'script type=text/javascript src=' . $eDir . 
'/js/slimbox2.js/script' . \n );
$out-addExtensionStyle( $eDir . '/css/slimbox2.css', 'screen' );
$out-addScript( 'script type=text/javascript src=' . $eDir . 
'/slimboxthumbs.js/script' . \n );
-   $out-addInlineScript( addHandler( window, 'load', function() {.
+   $out-addInlineScript( $( window ).on( 'load', function() {.
makeSlimboxThumbs( jQuery, \.addslashes( $re ).
\, \.addslashes( $wgServer.$wgScriptPath ).\ ); } ); );
 

-- 
To view, visit https://gerrit.wikimedia.org/r/100574
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Id590f7c895cff7463ccf29517cb605f9d039e0dc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SlimboxThumbs
Gerrit-Branch: master
Gerrit-Owner: VitaliyFilippov vita...@yourcmc.ru
Gerrit-Reviewer: VitaliyFilippov vita...@yourcmc.ru

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


[MediaWiki-commits] [Gerrit] Support subquery negation operator in SemanticMediaWiki quer... - change (mediawiki...SemanticMediaWiki)

2013-10-11 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/89204


Change subject: Support subquery negation operator in SemanticMediaWiki queries.
..

Support subquery negation operator in SemanticMediaWiki queries.

The syntax is {{#ask: [[prop::val]] !q...subquery.../q }}
or just {{#ask: [[prop::val]] ![[prop2::val2]] }}.

Change-Id: I107d7f6905860379684a011ba1bf0c44a150c575
---
M SemanticMediaWiki.settings.php
M includes/Defines.php
M includes/query/SMW_Description.php
M includes/query/SMW_QueryParser.php
M includes/storage/SQLStore/SMW_SQLStore3_Queries.php
M languages/SMW_Messages.php
6 files changed, 254 insertions(+), 22 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticMediaWiki 
refs/changes/04/89204/1

diff --git a/SemanticMediaWiki.settings.php b/SemanticMediaWiki.settings.php
index 9b01058..0bd0fcd 100644
--- a/SemanticMediaWiki.settings.php
+++ b/SemanticMediaWiki.settings.php
@@ -277,7 +277,8 @@
 // anything but disjunctions:  $smwgQFeatures = SMW_ANY_QUERY  
~SMW_DISJUNCTION_QUERY;
 // The default is to support all basic features.
 $smwgQFeatures = SMW_PROPERTY_QUERY | SMW_CATEGORY_QUERY | SMW_CONCEPT_QUERY |
- SMW_NAMESPACE_QUERY | SMW_CONJUNCTION_QUERY | 
SMW_DISJUNCTION_QUERY;
+ SMW_NAMESPACE_QUERY | SMW_CONJUNCTION_QUERY | 
SMW_DISJUNCTION_QUERY |
+ SMW_NEGATION_QUERY;
 
 ### Settings about printout of (especially inline) queries:
 $smwgQDefaultLimit = 50;  // Default number of rows returned in a query. 
Can be increased with limit=num in #ask
diff --git a/includes/Defines.php b/includes/Defines.php
index 550ed9e..d8f7e57 100644
--- a/includes/Defines.php
+++ b/includes/Defines.php
@@ -57,6 +57,7 @@
 define( 'SMW_NAMESPACE_QUERY', 8 );// [[User:+]] etc.
 define( 'SMW_CONJUNCTION_QUERY', 16 ); // any conjunctions
 define( 'SMW_DISJUNCTION_QUERY', 32 ); // any disjunctions (OR, ||)
+define( 'SMW_NEGATION_QUERY', 64 ); // any negation (!)
 define( 'SMW_ANY_QUERY', 0x );  // subsumes all other options
 /**@}*/
 
diff --git a/includes/query/SMW_Description.php 
b/includes/query/SMW_Description.php
index 16ab04b..c00161d 100644
--- a/includes/query/SMW_Description.php
+++ b/includes/query/SMW_Description.php
@@ -874,3 +874,111 @@
}
 
 }
+
+/**
+ * Description of negation of descriptions.
+ *
+ * @ingroup SMWQuery
+ */
+class SMWNegation extends SMWDescription {
+   /**
+* @var SMWDescription
+*/
+   protected $m_description;
+   protected $m_true = false;
+   protected $m_negated = true;
+
+   public function __construct( SMWDescription $description = null ) {
+   if ( !is_null( $description ) ) {
+   $this-addDescription( $description );
+   }
+   }
+
+   public function getDescription() {
+   return $this-m_description;
+   }
+
+   public function isNegated() {
+   return $this-m_negated;
+   }
+
+   public function addDescription( SMWDescription $description ) {
+   if ( $description instanceof SMWThingDescription ) {
+   $this-m_true = true;
+   $this-m_description = null;
+   }
+
+   if ( !$this-m_true ) {
+   if ( $description instanceof SMWNegation ) { // absorb 
sub-conjunctions
+   $this-m_negated = !$description-isNegated();
+   $this-m_description = 
$description-getDescription();
+   } else {
+   $this-m_description = $description;
+   }
+
+   // move print descriptions downwards
+   ///TODO: This may not be a good solution, since it does 
modify $description and since it does not react to future changes
+   $this-m_printreqs = array_merge( $this-m_printreqs, 
$description-getPrintRequests() );
+   $description-setPrintRequests( array() );
+   }
+   }
+
+   public function getQueryString( $asvalue = false ) {
+   if ( $this-m_true ) {
+   return '+';
+   }
+
+   $pre = $this-m_negated ? '!' : '';
+   $result = $this-m_description-getQueryString( $asvalue );
+   if ( !$this-m_description-isSingleton() ) {
+   $result = 'q' . $result . '/q';
+   }
+   $result = $pre . $result;
+
+   if ( $asvalue ) {
+   $result =  ' q[[' . $result . ']]/q ';
+   } else {
+   $result = ' q' . $result . '/q ';
+   }
+   return $result;
+   }
+
+   public function isSingleton() {
+   return true;
+   }
+
+   public 

[MediaWiki-commits] [Gerrit] (bug 40889) Follow-up 6f1d4db3: Fix the upload form when rad... - change (mediawiki/core)

2013-10-08 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/88443


Change subject: (bug 40889) Follow-up 6f1d4db3: Fix the upload form when radio 
buttons are shown.
..

(bug 40889) Follow-up 6f1d4db3: Fix the upload form when radio buttons are 
shown.

The previous change had broken the upload form if URL uploads or
some other possible upload source types are enabled - i.e. in
the case when there are radio buttons. The incorrect label ID
was used by radiobutton.

Change-Id: I7c15fd4250b6a2d26af2cc0373da5ac6c884d690
---
M includes/specials/SpecialUpload.php
1 file changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/43/88443/1

diff --git a/includes/specials/SpecialUpload.php 
b/includes/specials/SpecialUpload.php
index 51a0a86..b342288 100644
--- a/includes/specials/SpecialUpload.php
+++ b/includes/specials/SpecialUpload.php
@@ -1102,10 +1102,8 @@
 * @return string
 */
function getLabelHtml( $cellAttributes = array() ) {
-   $id = $this-mParams['id'];
-   $label = Html::rawElement( 'label', array( 'for' = $id ), 
$this-mLabel );
-
if ( !empty( $this-mParams['radio'] ) ) {
+   $id = wpSourceType{$this-mParams['upload-type']};
$attribs = array(
'name' = 'wpSourceType',
'type' = 'radio',
@@ -1116,8 +1114,10 @@
$attribs['checked'] = 'checked';
}
$label .= Html::element( 'input', $attribs );
+   } else {
+   $id = $this-mParams['id'];
}
-
+   $label = Html::rawElement( 'label', array( 'for' = $id ), 
$this-mLabel );
return Html::rawElement( 'td', array( 'class' = 'mw-label' ) + 
$cellAttributes, $label );
}
 

-- 
To view, visit https://gerrit.wikimedia.org/r/88443
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7c15fd4250b6a2d26af2cc0373da5ac6c884d690
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: VitaliyFilippov vita...@yourcmc.ru

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


[MediaWiki-commits] [Gerrit] Disable type enforcement for properties with names equal to ... - change (mediawiki...SemanticMediaWiki)

2013-09-18 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/84744


Change subject: Disable type enforcement for properties with names equal to 
type names.
..

Disable type enforcement for properties with names equal to type names.

Now if you try to use some property named like an SMW builtin type
(for example, [[Telephone number::jqlqdjq]]), its type will be
always forced to be Telephone number, i.e. you can't override it
with [[has type::]]. I think this is an unevident and undocumented
behaviour, so this patch disables it.

Change-Id: I4b4922c6d5df4d3455d667f98732e13bab403769
---
M includes/dataitems/SMW_DI_Property.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticMediaWiki 
refs/changes/44/84744/1

diff --git a/includes/dataitems/SMW_DI_Property.php 
b/includes/dataitems/SMW_DI_Property.php
index ca74d61..4687a8e 100644
--- a/includes/dataitems/SMW_DI_Property.php
+++ b/includes/dataitems/SMW_DI_Property.php
@@ -370,8 +370,8 @@
 
global $smwgContLang, $smwgUseCategoryHierarchy;
$datatypeLabels = $smwgContLang-getDatatypeLabels();
-   SMWDIProperty::$m_prop_labels  = 
$smwgContLang-getPropertyLabels() + $datatypeLabels;
-   SMWDIProperty::$m_prop_aliases = 
$smwgContLang-getPropertyAliases() + $smwgContLang-getDatatypeAliases();
+   SMWDIProperty::$m_prop_labels  = 
$smwgContLang-getPropertyLabels();
+   SMWDIProperty::$m_prop_aliases = 
$smwgContLang-getPropertyAliases();
// Setup built-in predefined properties.
// NOTE: all ids must start with underscores. The translation
// for each ID, if any, is defined in the language files.

-- 
To view, visit https://gerrit.wikimedia.org/r/84744
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4b4922c6d5df4d3455d667f98732e13bab403769
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticMediaWiki
Gerrit-Branch: master
Gerrit-Owner: VitaliyFilippov vita...@yourcmc.ru

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


[MediaWiki-commits] [Gerrit] Fix array to string conversion notice for 1.8.x / 1.9.x - change (mediawiki...SemanticMediaWiki)

2013-08-22 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/80372


Change subject: Fix array to string conversion notice for 1.8.x / 1.9.x
..

Fix array to string conversion notice for 1.8.x / 1.9.x

A similar fix exists in master branch, but I think it's needed also in 1.8.x / 
1.9.x.
Also, I think this implementation (with one loop) is better than one in master 
which
has two loops.

Change-Id: Ide5541f1c889bd9e02735b8a7c2ed2116c768ca5
---
M includes/storage/SQLStore/SMW_SQLStore3_Writers.php
1 file changed, 14 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticMediaWiki 
refs/changes/72/80372/1

diff --git a/includes/storage/SQLStore/SMW_SQLStore3_Writers.php 
b/includes/storage/SQLStore/SMW_SQLStore3_Writers.php
index dcb7f6c..231a239 100644
--- a/includes/storage/SQLStore/SMW_SQLStore3_Writers.php
+++ b/includes/storage/SQLStore/SMW_SQLStore3_Writers.php
@@ -331,6 +331,18 @@
}
 
/**
+* Like array_diff_assoc(), but doesn't cast array items to strings 
before comparison
+*/
+   static function array_diff_assoc_nonstr( $array1, $array2 ) {
+   foreach ( $array2 as $k = $i ) {
+   if ( isset( $array1[$k] )  $array2[$k] === 
$array1[$k] ) {
+   unset( $array1[$k] );
+   }
+   }
+   return $array1;
+   }
+
+   /**
 * Compute necessary insertions, deletions, and new table hashes for
 * updating the database to contain $newData for the subject with ID
 * $sid. Insertions and deletions are returned in as an array mapping
@@ -380,8 +392,8 @@
continue;
} else { // Table contains no data or contains 
data that is different from the new
$oldTableData = 
$this-getCurrentPropertyTableContents( $sid, $propertyTable, $dbr );
-   $tablesInsertRows[$tableName] = 
array_diff_assoc( $newData[$tableName], $oldTableData );
-   $tablesDeleteRows[$tableName] = 
array_diff_assoc( $oldTableData, $newData[$tableName] );
+   $tablesInsertRows[$tableName] = 
self::array_diff_assoc_nonstr( $newData[$tableName], $oldTableData );
+   $tablesDeleteRows[$tableName] = 
self::array_diff_assoc_nonstr( $oldTableData, $newData[$tableName] );
}
} elseif ( array_key_exists( $tableName, $oldHashes ) ) 
{
// Table contains data but should not contain 
any after update

-- 
To view, visit https://gerrit.wikimedia.org/r/80372
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ide5541f1c889bd9e02735b8a7c2ed2116c768ca5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticMediaWiki
Gerrit-Branch: 1.8.x
Gerrit-Owner: VitaliyFilippov vita...@yourcmc.ru

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


[MediaWiki-commits] [Gerrit] Allow to select whether to copy full page history. - change (mediawiki...Duplicator)

2013-08-11 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has submitted this change and it was merged.

Change subject: Allow to select whether to copy full page history.
..


Allow to select whether to copy full page history.

Change-Id: Id9c9267b4b2d028c3b9a21f2cc3f6c5b5d868e2e
---
M Duplicator.i18n.php
M Duplicator.page.php
2 files changed, 24 insertions(+), 16 deletions(-)

Approvals:
  VitaliyFilippov: Verified; Looks good to me, approved



diff --git a/Duplicator.i18n.php b/Duplicator.i18n.php
index e07acf2..b59fa4f 100644
--- a/Duplicator.i18n.php
+++ b/Duplicator.i18n.php
@@ -22,6 +22,7 @@
'duplicator-source'= 'Source:',
'duplicator-dest'  = 'Destination:',
'duplicator-dotalk'= 'Duplicate discussion page (if 
applicable)',
+   'duplicator-dohistory' = 'Duplicate full page history',
'duplicator-submit'= 'Duplicate',
'duplicator-summary'   = 'Copied from [[$1]]',
'duplicator-success'   = big'''[[$1]] was copied to 
[[$2]].'''/big,
@@ -1589,6 +1590,7 @@
'duplicator-source' = 'Откуда:',
'duplicator-dest' = 'Куда:',
'duplicator-dotalk' = 'Клонировать страницу обсуждения (если 
возможно)',
+   'duplicator-dohistory' = 'Клонировать историю изменений',
'duplicator-submit' = 'Клонировать',
'duplicator-summary' = 'Копия [[$1]]',
'duplicator-success' = big'''[[$1]] клонирована в [[$2]].'''/big,
diff --git a/Duplicator.page.php b/Duplicator.page.php
index ca82e7f..6339645 100644
--- a/Duplicator.page.php
+++ b/Duplicator.page.php
@@ -23,9 +23,10 @@
protected $destTitle = null;
 
/**
-* Whether or not we're duplicating the talk page
+* Whether or not we're duplicating the talk page and the history
 */
protected $talk = true;
+   protected $history = true;
 
/**
 * Constructor
@@ -97,12 +98,12 @@
$num = $dbr-selectField( 'revision', 'COUNT(*)',array( 
'rev_page' = $this-sourceTitle-getArticleID() ), __METHOD__ );
if( $num = $wgDuplicatorRevisionLimit ) {
# Attempt to perform the main duplicate op. first
-   if( $this-duplicate( $this-sourceTitle, 
$this-destTitle ) ) {
+   if( $this-duplicate( $this-sourceTitle, 
$this-destTitle, $this-history ) ) {
$success  = wfMsgNoTrans( 'duplicator-success', 
$this-sourceTitle-getPrefixedText(), $this-destTitle-getPrefixedText() ) . 
\n\n;
$success .= '* ' . wfMsgNoTrans( 
'duplicator-success-revisions', $wgLang-formatNum( $num ) ) . \n;
# If there is a talk page and we've been asked 
to duplicate it, do so
if( $this-dealWithTalk()  $this-talk ) {
-   if( $this-duplicate( 
$this-sourceTitle-getTalkPage(), $this-destTitle-getTalkPage() ) ) {
+   if( $this-duplicate( 
$this-sourceTitle-getTalkPage(), $this-destTitle-getTalkPage(), 
$this-history ) ) {
$success .= '* ' . 
wfMsgNoTrans( 'duplicator-success-talkcopied' ) . \n;
} else {
$success .= '* ' . 
wfMsgNoTrans( 'duplicator-success-talknotcopied' ) . \n;
@@ -138,6 +139,7 @@
$this-dest = $request-getText( 'dest', '' );
$this-destTitle = Title::newFromText( $this-dest );
$this-talk = $request-getCheck( 'talk' );
+   $this-history = $request-getCheck( 'history' );
}
 
/**
@@ -183,6 +185,9 @@
$form .= 'td' . Xml::checkLabel( wfMsg( 'duplicator-dotalk' 
), 'talk', 'talk', $this-talk ) . '/td';
$form .= '/trtr';
$form .= 'td#160;/td';
+   $form .= 'td' . Xml::checkLabel( wfMsg( 
'duplicator-dohistory' ), 'history', 'history', $this-history ) . '/td';
+   $form .= '/trtr';
+   $form .= 'td#160;/td';
$form .= 'td' . Xml::submitButton( wfMsg( 'duplicator-submit' 
) ) . '/td';
$form .= '/tr';
$form .= '/table';
@@ -197,9 +202,10 @@
 *
 * @param $source Title to duplicate
 * @param $dest Title to save to
+* @param $includeHistory Whether to copy full article history
 * @return bool
 */
-   protected function duplicate( $source, $dest ) {
+   protected function duplicate( $source, $dest, $includeHistory = false 
) {
global $wgUser, $wgBot;
if( !$source-exists() || $dest-exists() ) {
return false; # Source doesn't exist, or destination 
does
@@ -207,17 +213,19 @@
$dbw = wfGetDB( 

[MediaWiki-commits] [Gerrit] Allow to duplicate subpages - change (mediawiki...Duplicator)

2013-08-11 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has submitted this change and it was merged.

Change subject: Allow to duplicate subpages
..


Allow to duplicate subpages

Change-Id: I950ec49fc91f7a99c0722771f8498b15033e86d5
---
M Duplicator.i18n.php
M Duplicator.page.php
2 files changed, 47 insertions(+), 1 deletion(-)

Approvals:
  VitaliyFilippov: Verified; Looks good to me, approved



diff --git a/Duplicator.i18n.php b/Duplicator.i18n.php
index 985b8d7..3d56a33 100644
--- a/Duplicator.i18n.php
+++ b/Duplicator.i18n.php
@@ -19,6 +19,7 @@
'duplicator-source'= 'Source:',
'duplicator-dest'  = 'Destination:',
'duplicator-dotalk'= 'Duplicate discussion page (if 
applicable)',
+   'duplicator-dosubpages'= 'Duplicate subpages (if any)',
'duplicator-dohistory' = 'Duplicate full page history',
'duplicator-submit'= 'Duplicate',
'duplicator-summary'   = 'Copied from [[$1]], revision 
[[$2]]',
@@ -1540,6 +1541,7 @@
'duplicator-source' = 'Откуда:',
'duplicator-dest' = 'Куда:',
'duplicator-dotalk' = 'Клонировать страницу обсуждения (если 
возможно)',
+   'duplicator-dosubpages' = 'Клонировать подстраницы (если есть)',
'duplicator-dohistory' = 'Клонировать историю изменений',
'duplicator-submit' = 'Клонировать',
'duplicator-summary' = 'Копия ревизии [[$2]] статьи [[$1]]',
diff --git a/Duplicator.page.php b/Duplicator.page.php
index 1439e26..50d1145 100644
--- a/Duplicator.page.php
+++ b/Duplicator.page.php
@@ -23,9 +23,10 @@
protected $destTitle = null;
 
/**
-* Whether or not we're duplicating the talk page and the history
+* Whether or not we're duplicating the talk page, subpages, and the 
history
 */
protected $talk = true;
+   protected $subpages = true;
protected $history = true;
 
/**
@@ -98,6 +99,10 @@
if( $num ) {
$success = '* ' . wfMsgNoTrans( 'duplicator-success', 
$this-sourceTitle-getPrefixedText(), $this-destTitle-getPrefixedText() );
$success .= ' ' . wfMsgNoTrans( 
'duplicator-success-revisions', $wgLang-formatNum( $num ) ) . \n;
+   # If there are subpages and we've been asked to 
duplicate them, do so
+   if ( $this-subpages ) {
+   $success .= $this-duplicateSubpages( 
$this-sourceTitle, $this-destTitle, $this-history );
+   }
# If there is a talk page and we've been asked to 
duplicate it, do so
if( $this-talk  $this-dealWithTalk() ) {
$st = $this-sourceTitle-getTalkPage();
@@ -106,6 +111,9 @@
if ( $num ) {
$success .= '* ' . wfMsgNoTrans( 
'duplicator-success', $st-getPrefixedText(), $dt-getPrefixedText() );
$success .= ' ' . wfMsgNoTrans( 
'duplicator-success-revisions', $wgLang-formatNum( $num ) ) . \n;
+   if ( $this-subpages ) {
+   $success .= 
$this-duplicateSubpages( $st, $dt, $this-history );
+   }
} else {
$success .= '* ' . wfMsgNoTrans( 
'duplicator-success-talknotcopied' ) . \n;
}
@@ -133,6 +141,7 @@
$this-dest = $request-getText( 'dest', '' );
$this-destTitle = Title::newFromText( $this-dest );
$this-talk = $request-getCheck( 'talk' );
+   $this-subpages = $request-getCheck( 'subpages' );
$this-history = $request-getCheck( 'history' );
}
 
@@ -179,6 +188,9 @@
$form .= 'td' . Xml::checkLabel( wfMsg( 'duplicator-dotalk' 
), 'talk', 'talk', $this-talk ) . '/td';
$form .= '/trtr';
$form .= 'td#160;/td';
+   $form .= 'td' . Xml::checkLabel( wfMsg( 
'duplicator-dosubpages' ), 'subpages', 'subpages', $this-subpages ) . '/td';
+   $form .= '/trtr';
+   $form .= 'td#160;/td';
$form .= 'td' . Xml::checkLabel( wfMsg( 
'duplicator-dohistory' ), 'history', 'history', $this-history ) . '/td';
$form .= '/trtr';
$form .= 'td#160;/td';
@@ -191,6 +203,38 @@
}
 
/**
+* Duplicate subpages of $source to $dest
+*
+* @param $source Title to duplicate subpages for
+* @param $dest Title to save subpages to
+* @return bool
+*/
+   protected function duplicateSubpages( $source, $dest, $includeHistory ) 
{
+   global $wgLang;
+   $subpages = 

[MediaWiki-commits] [Gerrit] Add license (I assume GPLv2) and bump version - change (mediawiki...Duplicator)

2013-08-11 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has submitted this change and it was merged.

Change subject: Add license (I assume GPLv2) and bump version
..


Add license (I assume GPLv2) and bump version

Change-Id: I82a9256ce1c1225b54fbac66907c539f38c70735
---
A COPYING
M Duplicator.page.php
M Duplicator.php
3 files changed, 374 insertions(+), 2 deletions(-)

Approvals:
  VitaliyFilippov: Verified; Looks good to me, approved



diff --git a/COPYING b/COPYING
new file mode 100644
index 000..019694a
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,342 @@
+== GNU GENERAL PUBLIC LICENSE ==
+
+Version 2, June 1991
+
+Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
+Everyone is permitted to copy and distribute verbatim copies
+of this license document, but changing it is not allowed.
+
+=== Preamble ===
+
+The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+The precise terms and conditions for copying, distribution and
+modification follow.
+
+== TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION ==
+
+'''0.''' This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The Program, below,
+refers to any such program or work, and a work based on the Program
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term modification.)  Each licensee is addressed as you.
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+'''1.''' You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the 

[MediaWiki-commits] [Gerrit] Replace step-by-step publishing with publish-staying-in-edit... - change (mediawiki...WikiEditor)

2013-07-02 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/71617


Change subject: Replace step-by-step publishing with publish-staying-in-editmode
..

Replace step-by-step publishing with publish-staying-in-editmode

Change-Id: I1c716b60369a248a54646d9866408f16c3fb78e7
---
M WikiEditor.i18n.php
M WikiEditor.php
M modules/jquery.wikiEditor.publish.js
3 files changed, 119 insertions(+), 171 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikiEditor 
refs/changes/17/71617/1

diff --git a/WikiEditor.i18n.php b/WikiEditor.i18n.php
index e2f9390..fc26238 100644
--- a/WikiEditor.i18n.php
+++ b/WikiEditor.i18n.php
@@ -27,15 +27,9 @@
'wikieditor-previewDialog-tab' = 'Preview',
'wikieditor-previewDialog-loading' = 'Loading...',
/* Publish */
-   'wikieditor-publish-preference' = 'Enable step-by-step publishing',
+   'wikieditor-publish-preference' = 'Enable publishing while staying in 
edit mode',
'wikieditor-publish-button-publish' = 'Publish',
-   'wikieditor-publish-button-cancel' = 'Cancel',
-   'wikieditor-publish-dialog-title' = 'Publish to {{SITENAME}}',
-   'wikieditor-publish-dialog-summary' = 'Edit summary (briefly describe 
the changes you have made):',
-   'wikieditor-publish-dialog-minor' = 'Minor edit',
-   'wikieditor-publish-dialog-watch' = 'Watch this page',
-   'wikieditor-publish-dialog-publish' = 'Publish',
-   'wikieditor-publish-dialog-goback' = 'Go back',
+   'wikieditor-publish-error' = 'Error publishing: $1',
/* Template Editor */
'wikieditor-template-editor-preference' = 'Enable form-based editing 
of wiki templates',
'wikieditor-template-editor-dialog-title' = 'Edit template',
@@ -316,23 +310,9 @@
'wikieditor-previewDialog-loading' = 'Alt text for spinner displayed 
while preview is being loaded
 {{Identical|Loading}}',
'wikieditor-publish-preference' = Option in [[Special:Preferences]], 
tab ''{{int:prefs-editing}}'',
-   'wikieditor-publish-button-publish' = 'Button to the right of the 
Edit/Preview tabs that opens a dialog window that lets the user save their edit
+   'wikieditor-publish-button-publish' = 'Button to the right of the 
Edit/Preview tabs that publishes the article without leaving edit mode
 
 {{Identical|Publish}}',
-   'wikieditor-publish-button-cancel' = 'Button to the right of the 
Edit/Preview tabs that has the same effect as the {{msg-mw|Cancel}} link below 
the edit box.
-
-{{Identical|Cancel}}',
-   'wikieditor-publish-dialog-title' = 'Title of the dialog that opens 
when the user clicks the Publish button',
-   'wikieditor-publish-dialog-summary' = 'Label for the edit summary 
textbox in the dialog that opens when the user clicks the Publish button. See 
also {{msg-mw|Summary}}.',
-   'wikieditor-publish-dialog-minor' = 'Label for the minor edit checkbox 
in the dialog that opens when the user clicks the Publish button. See also 
{{msg-mw|Minoredit}}',
-   'wikieditor-publish-dialog-watch' = 'Label for the watch checkbox in 
the dialog that opens when the user clicks the Publish button
-
-{{Identical|Watch this page}}',
-   'wikieditor-publish-dialog-publish' = Button that saves the user's 
edit in the dialog that opens when the user clicks the Publish button
-
-{{Identical|Publish}},
-   'wikieditor-publish-dialog-goback' = 'Button that closes the dialog 
that opens when the user clicks the Publish button.
-{{Identical|Go back}}',
'wikieditor-template-editor-dialog-submit' = '{{Identical|Update}}',
'wikieditor-template-editor-dialog-cancel' = '{{Identical|Cancel}}',
'wikieditor-toc-preference' = Option at [[Special:Preferences]], tab 
''{{int:prefs-editing}}'',
@@ -23417,15 +23397,9 @@
'wikieditor-previewDialog-preference' = 'Включить диалог 
предпросмотра',
'wikieditor-previewDialog-tab' = 'Предпросмотр',
'wikieditor-previewDialog-loading' = 'Загрузка…',
-   'wikieditor-publish-preference' = 'Включить пошаговую публикацию',
+   'wikieditor-publish-preference' = 'Включить публикацию без выхода из 
редактирования',
'wikieditor-publish-button-publish' = 'Опубликовать',
-   'wikieditor-publish-button-cancel' = 'Отмена',
-   'wikieditor-publish-dialog-title' = 'Опубликование в проекте 
{{SITENAME}}',
-   'wikieditor-publish-dialog-summary' = 'Описание изменений (кратко 
укажите какие изменения были произведены):',
-   'wikieditor-publish-dialog-minor' = 'Малое изменение',
-   'wikieditor-publish-dialog-watch' = 'Наблюдать за этой страницей',
-   'wikieditor-publish-dialog-publish' = 'Опубликовать',
-   'wikieditor-publish-dialog-goback' = 'Назад',
+   'wikieditor-publish-error' = 'Ошибка сохранения: $1',
'wikieditor-template-editor-preference' = 'Включить редактирование 
шаблонов с помощью 

[MediaWiki-commits] [Gerrit] Allow to create new SVG files using SVGEdit - change (mediawiki...SVGEdit)

2013-06-27 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/70814


Change subject: Allow to create new SVG files using SVGEdit
..

Allow to create new SVG files using SVGEdit

Change-Id: I34a40c935313549fe1b271d61080d4007b7fe979
---
M SVGEdit.hooks.php
M SVGEdit.i18n.php
M SVGEdit.php
M modules/ext.svgedit.editButton.js
M modules/ext.svgedit.editor.js
5 files changed, 29 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SVGEdit 
refs/changes/14/70814/1

diff --git a/SVGEdit.hooks.php b/SVGEdit.hooks.php
index a90d719..39e7073 100644
--- a/SVGEdit.hooks.php
+++ b/SVGEdit.hooks.php
@@ -66,4 +66,19 @@
$title-userCan( 'edit' )  $title-userCan( 'upload' 
);
}
 
+   /**
+* UploadForm:initial hook, suggests creating non-existing SVG files 
with SVGEdit
+*/
+   public static function uploadFormInitial( $upload ) {
+   if ( strtolower( substr( $upload-mDesiredDestName, -4 ) ) == 
'.svg' ) {
+   $title = Title::newFromText( $upload-mDesiredDestName, 
NS_FILE );
+   if ( $title ) {
+   $upload-uploadFormTextTop .= wfMsgNoTrans(
+   'svgedit-suggest-create', 
$title-getFullUrl().'#!action=svgedit'
+   );
+   }
+   }
+   return true;
+   }
+
 }
diff --git a/SVGEdit.i18n.php b/SVGEdit.i18n.php
index 3e527a8..3a3d616 100644
--- a/SVGEdit.i18n.php
+++ b/SVGEdit.i18n.php
@@ -20,7 +20,9 @@
'svgedit-desc' = 'In-browser editing of SVG drawings with 
[http://code.google.com/p/svg-edit/ SVG-Edit]',
'svgedit-edit-tab' = 'Edit drawing',
'svgedit-edit-tab-tooltip' = 'You can edit this SVG drawing in your 
browser',
-   'svgedit-toolbar-insert' = 'SVG drawing'
+   'svgedit-toolbar-insert' = 'SVG drawing',
+   'svgedit-editbutton-create' = 'Create image with SVGEdit',
+   'svgedit-suggest-create' = 'div style=display: inline-block; border: 
1px dashed blue; padding: 4px; background: #f8f8ffAlso, you can a 
href=$1create/edit this SVG file with SVGEdit/a./div',
 );
 
 /** Message documentation (Message documentation)
@@ -38,6 +40,8 @@
 {{Identical|Cancel}}',
'svgedit-desc' = '{{desc|name=SVG 
Edit|url=http://www.mediawiki.org/wiki/Extension:SVGEdit}}
 {{doc-important|Do not alter the link target URL 
codehttp://code.google.com/p/svg-edit//code.}}',
+   'svgedit-editbutton-create' = 'Text label on create button on 
non-existing SVG File: pages',
+   'svgedit-suggest-create' = 'HTML message displayed on the upload form 
initially opened for an SVG file',
 );
 
 /** Arabic (العربية)
@@ -746,6 +750,8 @@
'svgedit-edit-tab' = 'Править рисунок',
'svgedit-edit-tab-tooltip' = 'Вы можете редактировать этот SVG-рисунок 
в вашем браузере',
'svgedit-toolbar-insert' = 'Рисование SVG',
+   'svgedit-editbutton-create' = 'Создать рисунок в SVGEdit',
+   'svgedit-suggest-create' = 'div style=display: inline-block; border: 
1px dashed blue; padding: 4px; background: #f8f8ffТакже вы можете a 
href=$1создать/изменить этот SVG-файл с помощью SVGEdit/a./div',
 );
 
 /** Sinhala (සිංහල)
diff --git a/SVGEdit.php b/SVGEdit.php
index 91c5764..83fa713 100644
--- a/SVGEdit.php
+++ b/SVGEdit.php
@@ -22,6 +22,7 @@
 
 $wgHooks['BeforePageDisplay'][] = 'SVGEditHooks::beforePageDisplay';
 $wgHooks['MakeGlobalVariablesScript'][] = 
'SVGEditHooks::makeGlobalVariablesScript';
+$wgHooks['UploadForm:initial'][] = 'SVGEditHooks::uploadFormInitial';
 
 $wgAutoloadClasses['SVGEditHooks'] = dirname( __FILE__ ) . 
'/SVGEdit.hooks.php';
 
@@ -59,6 +60,7 @@
),
'messages' = array(
'svgedit-editbutton-edit',
+   'svgedit-editbutton-create',
'svgedit-edit-tab',
'svgedit-edit-tab-tooltip'
),
diff --git a/modules/ext.svgedit.editButton.js 
b/modules/ext.svgedit.editButton.js
index beb6129..689bb91 100644
--- a/modules/ext.svgedit.editButton.js
+++ b/modules/ext.svgedit.editButton.js
@@ -22,7 +22,7 @@
var trigger = function() {
mw.svgedit.open({
filename: wgTitle,
-   replace: '#file',
+   replace: (wgArticleId ? '#file' : 
'#mw-imagepage-nofile'),
onclose: function(filename) {
if (filename) {
// Saved! Refresh parent 
window...
@@ -48,11 +48,11 @@
});
 
var button = $('button/button')
-   .text(mw.msg('svgedit-editbutton-edit'))
+   .text(mw.msg(wgArticleId ? 

[MediaWiki-commits] [Gerrit] Show SVGEdit WikiEditor SVG drawing button on preview, not... - change (mediawiki...SVGEdit)

2013-06-27 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/70815


Change subject: Show SVGEdit WikiEditor SVG drawing button on preview, not 
only on the initial edit.
..

Show SVGEdit WikiEditor SVG drawing button on preview, not only on the 
initial edit.

Change-Id: Ib498a6d31d9c40371cc8b62af278153e8f4bbe1e
---
M SVGEdit.hooks.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SVGEdit 
refs/changes/15/70815/1

diff --git a/SVGEdit.hooks.php b/SVGEdit.hooks.php
index a90d719..5495cad 100644
--- a/SVGEdit.hooks.php
+++ b/SVGEdit.hooks.php
@@ -29,7 +29,7 @@
$modules[] = 'ext.svgedit.inline';
}
}
-   if ($wgRequest-getVal('action') == 'edit') {
+   if ( $wgRequest-getVal('action') == 'edit' || 
$wgRequest-getVal('action') == 'submit' ) {
if( $wgUser-isAllowed( 'upload' ) ) {
$modules[] = 'ext.svgedit.toolbar';
}

-- 
To view, visit https://gerrit.wikimedia.org/r/70815
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib498a6d31d9c40371cc8b62af278153e8f4bbe1e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SVGEdit
Gerrit-Branch: master
Gerrit-Owner: VitaliyFilippov vita...@yourcmc.ru

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


[MediaWiki-commits] [Gerrit] Query user for the filename of SVGs inserted via WikiEditor ... - change (mediawiki...SVGEdit)

2013-06-27 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/70817


Change subject: Query user for the filename of SVGs inserted via WikiEditor 
button.
..

Query user for the filename of SVGs inserted via WikiEditor button.

Also don't strip non-ascii chars from the filename (JS regexes
don't support UTF-8 character classes), but strip '/' and ':' -
only these characters yield an error in Title creation for files.
Other characters will be sanitized and the corrected title will
be inserted in the editbox.

Change-Id: I77c2782bdf6b53ed26435b4e02100c19a7116d1d
---
M SVGEdit.i18n.php
M SVGEdit.php
M modules/ext.svgedit.toolbar.js
3 files changed, 23 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SVGEdit 
refs/changes/17/70817/1

diff --git a/SVGEdit.i18n.php b/SVGEdit.i18n.php
index 3e527a8..ea24519 100644
--- a/SVGEdit.i18n.php
+++ b/SVGEdit.i18n.php
@@ -15,6 +15,7 @@
'svgedit-editbutton-edit' = 'Edit drawing',
'svgedit-summary-label' = 'Edit summary',
'svgedit-summary-default' = '/* Modified in svg-edit */',
+   'svgedit-editor-new-filename' = 'Enter file name: ',
'svgedit-editor-save-close' = 'Save and close',
'svgedit-editor-close' = 'Cancel',
'svgedit-desc' = 'In-browser editing of SVG drawings with 
[http://code.google.com/p/svg-edit/ SVG-Edit]',
@@ -740,6 +741,7 @@
'svgedit-editbutton-edit' = 'Редактировать рисунок',
'svgedit-summary-label' = 'Описание изменений',
'svgedit-summary-default' = '/* Изменено в svg-edit */',
+   'svgedit-editor-new-filename' = 'Введите имя файла: ',
'svgedit-editor-save-close' = 'Сохранить и закрыть',
'svgedit-editor-close' = 'Отмена',
'svgedit-desc' = 'Редактирование SVG-изображений в браузере с помощью 
[http://code.google.com/p/svg-edit/ SVG-Edit]',
diff --git a/SVGEdit.php b/SVGEdit.php
index 91c5764..2e8a09d 100644
--- a/SVGEdit.php
+++ b/SVGEdit.php
@@ -46,6 +46,7 @@
'svgedit-summary-default',
'svgedit-editor-save-close',
'svgedit-editor-close',
+   'svgedit-editor-new-filename',
),
'dependencies' = array(
'jquery.ui.resizable'
diff --git a/modules/ext.svgedit.toolbar.js b/modules/ext.svgedit.toolbar.js
index f08f9aa..ea847f0 100644
--- a/modules/ext.svgedit.toolbar.js
+++ b/modules/ext.svgedit.toolbar.js
@@ -7,7 +7,7 @@
 
var safeFilename = function(str) {
// hack hack
-   return str.replace(/[^A-Za-z0-9\- ]/, '').replace(/[\s_]+/, ' 
');
+   return str.replace(/[:\\\/]+/g, '').replace(/[\s_]+/g, ' ');
};
var handyDate = function() {
var now = new Date();
@@ -31,23 +31,26 @@
pad2(now.getUTCSeconds());
};
var callback = function(context) {
-   var filename = safeFilename(wgTitle) + ' drawing ' + 
handyDate() + '.svg';
-   var form = context.$ui.closest('form');
-   mediaWiki.svgedit.open({
-   filename: filename,
-   replace: form[0],
-   onclose: function(filename) {
-   if (filename) {
-   // Saved! Insert a [[File:foo]]
-   
context.$textarea.textSelection('encapsulateSelection', {
-   'pre': '[[File:',
-   'peri': filename,
-   'post': ']]',
-   'replace': true
-   });
+   var filename = safeFilename(wgTitle) + ' drawing ' + 
handyDate();
+   if (filename = 
prompt(mediaWiki.msg('svgedit-editor-new-filename'), filename)) {
+   filename = safeFilename(filename + '.svg');
+   var form = context.$ui.closest('form');
+   mediaWiki.svgedit.open({
+   filename: filename,
+   replace: form[0],
+   onclose: function(filename) {
+   if (filename) {
+   // Saved! Insert a [[File:foo]]
+   
context.$textarea.textSelection('encapsulateSelection', {
+   'pre': '[[File:',
+   'peri': filename,
+   'post': ']]',
+   'replace': true
+   

[MediaWiki-commits] [Gerrit] (bug 35607) Fix OXML type detection - change (mediawiki/core)

2013-06-27 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/70830


Change subject: (bug 35607) Fix OXML type detection
..

(bug 35607) Fix OXML type detection

Unzip [Content_Types].xml and match its content instead of just searching
first 1024 bytes of a file for [Content_Types].xml and then detecting
individual types based on the extension.

This is needed because Open/LibreOffice saves [Content_Types].xml in the
end of OXML file. MSWord opens such files correctly, but without this patch
MW detects them as application/zip.

Side changes:
* Fix reading $tail - it couldn't be read if file size was  65558 bytes.
* Fall back to external MIME type detection after unsuccessful ZIP type
  detection instead of just returning 'application/zip' (maybe fileinfo
  knows something we don't :))

Change-Id: I3bf1d5e9d2a5521739f4f73c45ef67090931b420
---
M includes/MimeMagic.php
1 file changed, 50 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/30/70830/1

diff --git a/includes/MimeMagic.php b/includes/MimeMagic.php
index 44fafcaf..696a80b 100644
--- a/includes/MimeMagic.php
+++ b/includes/MimeMagic.php
@@ -591,7 +591,8 @@
return 'unknown/unknown';
}
$head = fread( $f, 1024 );
-   fseek( $f, -65558, SEEK_END );
+   fseek( $f, 0, SEEK_END );
+   fseek( $f, max( 0, ftell( $f ) - 65558 ), SEEK_SET );
$tail = fread( $f, 65558 ); // 65558 = maximum size of a zip 
EOCDR
fclose( $f );
 
@@ -726,7 +727,7 @@
// Check for ZIP variants (before getimagesize)
if ( strpos( $tail, PK\x05\x06 ) !== false ) {
wfDebug( __METHOD__ . : ZIP header present in $file\n 
);
-   return $this-detectZipType( $head, $tail, $ext );
+   return $this-detectZipType( $file, $head, $tail, $ext 
);
}
 
wfSuppressWarnings();
@@ -754,6 +755,7 @@
 * header data.  Currently works for OpenDocument and OpenXML types...
 * If can't tell, returns 'application/zip'.
 *
+* @param $file   String: filename
 * @param string $header some reasonably-sized chunk of file header
 * @param $tail   String: the tail of the file
 * @param $ext Mixed: the file extension, or true to extract it from 
the filename.
@@ -762,13 +764,14 @@
 *
 * @return string
 */
-   function detectZipType( $header, $tail = null, $ext = false ) {
+   function detectZipType( $file, $header, $tail = null, $ext = false ) {
if ( $ext ) { # TODO: remove $ext param
wfDebug( __METHOD__ . : WARNING: use of the \$ext 
parameter is deprecated.  .
Use improveTypeFromExtension(\$mime, \$ext) 
instead.\n );
}
 
-   $mime = 'application/zip';
+   // Fall back to external type detection by default
+   $mime = false;
$opendocTypes = array(
'chart-template',
'chart',
@@ -793,9 +796,47 @@
 
$openxmlRegex = /^\[Content_Types\].xml/;
 
+   $openxmlTypeRegex = 
'/ContentType=[\\']?(application\/vnd\.(?:'.
+   
'openxmlformats-officedocument\.wordprocessingml\.document|'.
+   
'openxmlformats-officedocument\.wordprocessingml\.template|'.
+   'ms-word\.document\.macroEnabled\.12|'.
+   'ms-word\.template\.macroEnabled\.12|'.
+   
'openxmlformats-officedocument\.presentationml\.template|'.
+   
'openxmlformats-officedocument\.presentationml\.slideshow|'.
+   
'openxmlformats-officedocument\.presentationml\.presentation|'.
+   'ms-powerpoint\.addin\.macroEnabled\.12|'.
+   'ms-powerpoint\.presentation\.macroEnabled\.12|'.
+   'ms-powerpoint\.presentation\.macroEnabled\.12|'.
+   'ms-powerpoint\.slideshow\.macroEnabled\.12|'.
+   'openxmlformats-officedocument\.spreadsheetml\.sheet|'.
+   
'openxmlformats-officedocument\.spreadsheetml\.template|'.
+   'ms-excel\.sheet\.macroEnabled\.12|'.
+   'ms-excel\.template\.macroEnabled\.12|'.
+   'ms-excel\.addin\.macroEnabled\.12|'.
+   'ms-excel\.sheet\.binary\.macroEnabled\.12|'.
+   'ms-xpsdocument))/';
+
if ( preg_match( $opendocRegex, substr( $header, 30 ), $matches 
) ) {
+   // 'mimetype' entry is ALWAYS stored in the beginning 
of an ODF file
$mime = $matches[1];
 

[MediaWiki-commits] [Gerrit] Show gallery and thumbnail captions in lightboxes - change (mediawiki...SlimboxThumbs)

2013-06-20 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/69642


Change subject: Show gallery and thumbnail captions in lightboxes
..

Show gallery and thumbnail captions in lightboxes

Change-Id: Ib0af725f39a881a993f3424b9137602cec065309
---
M slimbox/slimboxthumbs.js
1 file changed, 7 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SlimboxThumbs 
refs/changes/42/69642/1

diff --git a/slimbox/slimboxthumbs.js b/slimbox/slimboxthumbs.js
index 33cb700..6dc266e 100644
--- a/slimbox/slimboxthumbs.js
+++ b/slimbox/slimboxthumbs.js
@@ -45,9 +45,14 @@
}
}
if ( h != e.src ) {
+   var p = $( e.parentNode );
+   var c = p.next( '.thumbcaption' 
);
+   if ( !c.length ) {
+   c = p.parents( 
'li.gallerybox' ).find( '.gallerytext' );
+   }
+   n = ( c.text().replace( 
/^\s+|\s+$/g, '' ) || n.replace( /_/g, ' ' ) ) + ' rarr;';
e.parentNode._lightbox = [
-   h, 'a 
href='+e.parentNode.href+''+
-   n.replace( /_/g, ' ' 
)+'/a'
+   h, 'a 
href='+e.parentNode.href+''+n+'/a'
];
nodes.push( e.parentNode );
}

-- 
To view, visit https://gerrit.wikimedia.org/r/69642
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib0af725f39a881a993f3424b9137602cec065309
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SlimboxThumbs
Gerrit-Branch: master
Gerrit-Owner: VitaliyFilippov vita...@yourcmc.ru

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


[MediaWiki-commits] [Gerrit] Show gallery and thumbnail captions in lightboxes - change (mediawiki...SlimboxThumbs)

2013-06-20 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has submitted this change and it was merged.

Change subject: Show gallery and thumbnail captions in lightboxes
..


Show gallery and thumbnail captions in lightboxes

Change-Id: Ib0af725f39a881a993f3424b9137602cec065309
---
M slimbox/slimboxthumbs.js
1 file changed, 7 insertions(+), 2 deletions(-)

Approvals:
  VitaliyFilippov: Verified; Looks good to me, approved



diff --git a/slimbox/slimboxthumbs.js b/slimbox/slimboxthumbs.js
index 33cb700..6dc266e 100644
--- a/slimbox/slimboxthumbs.js
+++ b/slimbox/slimboxthumbs.js
@@ -45,9 +45,14 @@
}
}
if ( h != e.src ) {
+   var p = $( e.parentNode );
+   var c = p.next( '.thumbcaption' 
);
+   if ( !c.length ) {
+   c = p.parents( 
'li.gallerybox' ).find( '.gallerytext' );
+   }
+   n = ( c.text().replace( 
/^\s+|\s+$/g, '' ) || n.replace( /_/g, ' ' ) ) + ' rarr;';
e.parentNode._lightbox = [
-   h, 'a 
href='+e.parentNode.href+''+
-   n.replace( /_/g, ' ' 
)+'/a'
+   h, 'a 
href='+e.parentNode.href+''+n+'/a'
];
nodes.push( e.parentNode );
}

-- 
To view, visit https://gerrit.wikimedia.org/r/69642
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib0af725f39a881a993f3424b9137602cec065309
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SlimboxThumbs
Gerrit-Branch: master
Gerrit-Owner: VitaliyFilippov vita...@yourcmc.ru
Gerrit-Reviewer: VitaliyFilippov vita...@yourcmc.ru

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


[MediaWiki-commits] [Gerrit] Allow relative inclusions in Main namespace. - change (mediawiki/core)

2013-05-30 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/66092


Change subject: Allow relative inclusions in Main namespace.
..

Allow relative inclusions in Main namespace.

In previous versions of MediaWiki, relative inclusions ({{../name}}) were not 
handled
properly in the Main namespace - it tried to include Template:Parent/name 
instead of
just Parent/name article. In other namespaces they worked, though. The patch 
fixes
this inconsistence and allows to use relative inclusions in Main.

Change-Id: Ie04f23c180e501631c629a39b997796a1725fb67
---
M includes/parser/Parser.php
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/92/66092/1

diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index 840e174..4e61ef6 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -3296,8 +3296,9 @@
$ns = NS_TEMPLATE;
# Split the title into page and subpage
$subpage = '';
-   $part1 = $this-maybeDoSubpageLink( $part1, $subpage );
-   if ( $subpage !== '' ) {
+   $relative = $this-maybeDoSubpageLink( $part1, $subpage 
);
+   if ( $part1 !== $relative ) {
+   $part1 = $relative;
$ns = $this-mTitle-getNamespace();
}
$title = Title::newFromText( $part1, $ns );

-- 
To view, visit https://gerrit.wikimedia.org/r/66092
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie04f23c180e501631c629a39b997796a1725fb67
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: VitaliyFilippov vita...@yourcmc.ru

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


[MediaWiki-commits] [Gerrit] Private access is pointless here. Change it to protected. Al... - change (mediawiki...Duplicator)

2013-05-29 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/65976


Change subject: Private access is pointless here. Change it to protected. Also 
remove deprecated newFromURL() usage.
..

Private access is pointless here. Change it to protected.
Also remove deprecated newFromURL() usage.

Change-Id: I2737442ac19e7a77288236bb30a3d9487c356aa5
---
M Duplicator.page.php
1 file changed, 13 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Duplicator 
refs/changes/76/65976/1

diff --git a/Duplicator.page.php b/Duplicator.page.php
index 20870e9..ca82e7f 100644
--- a/Duplicator.page.php
+++ b/Duplicator.page.php
@@ -13,19 +13,19 @@
/**
 * Title of the page we are duplicating
 */
-   private $source = '';
-   private $sourceTitle = null;
+   protected $source = '';
+   protected $sourceTitle = null;
 
/**
 * Title of the page we are saving to
 */
-   private $dest = '';
-   private $destTitle = null;
+   protected $dest = '';
+   protected $destTitle = null;
 
/**
 * Whether or not we're duplicating the talk page
 */
-   private $talk = true;
+   protected $talk = true;
 
/**
 * Constructor
@@ -131,12 +131,12 @@
 * @param $request WebRequest we're running off
 * @param $title Title passed to the page
 */
-   private function setOptions( $request, $title ) {
+   protected function setOptions( $request, $title ) {
$source = $request-getText( 'source' );
$this-source = $source ? $source : ( $title ? $title : '' );
-   $this-sourceTitle = Title::newFromURL( $this-source );
+   $this-sourceTitle = Title::newFromText( $this-source );
$this-dest = $request-getText( 'dest', '' );
-   $this-destTitle = Title::newFromURL( $this-dest );
+   $this-destTitle = Title::newFromText( $this-dest );
$this-talk = $request-getCheck( 'talk' );
}
 
@@ -146,7 +146,7 @@
 *
 * @return bool
 */
-   private function dealWithTalk() {
+   protected function dealWithTalk() {
if( is_object( $this-sourceTitle ) ) {
if( $this-sourceTitle-isTalkPage() )
return false;
@@ -164,7 +164,7 @@
 *
 * @return string
 */
-   private function buildForm() {
+   protected function buildForm() {
global $wgUser;
$self = SpecialPage::getTitleFor( 'Duplicator' );
$source = is_object( $this-sourceTitle ) ? 
$this-sourceTitle-getPrefixedText() : $this-source;
@@ -199,10 +199,11 @@
 * @param $dest Title to save to
 * @return bool
 */
-   private function duplicate( $source, $dest ) {
+   protected function duplicate( $source, $dest ) {
global $wgUser, $wgBot;
-   if( !$source-exists() || $dest-exists() )
+   if( !$source-exists() || $dest-exists() ) {
return false; # Source doesn't exist, or destination 
does
+   }
$dbw = wfGetDB( DB_MASTER );
$dbw-begin();
$sid = $source-getArticleID();

-- 
To view, visit https://gerrit.wikimedia.org/r/65976
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2737442ac19e7a77288236bb30a3d9487c356aa5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Duplicator
Gerrit-Branch: master
Gerrit-Owner: VitaliyFilippov vita...@yourcmc.ru

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


[MediaWiki-commits] [Gerrit] Allow to select whether to copy full page history. - change (mediawiki...Duplicator)

2013-05-29 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/65977


Change subject: Allow to select whether to copy full page history.
..

Allow to select whether to copy full page history.

Change-Id: Id9c9267b4b2d028c3b9a21f2cc3f6c5b5d868e2e
---
M Duplicator.i18n.php
M Duplicator.page.php
2 files changed, 24 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Duplicator 
refs/changes/77/65977/1

diff --git a/Duplicator.i18n.php b/Duplicator.i18n.php
index e07acf2..b59fa4f 100644
--- a/Duplicator.i18n.php
+++ b/Duplicator.i18n.php
@@ -22,6 +22,7 @@
'duplicator-source'= 'Source:',
'duplicator-dest'  = 'Destination:',
'duplicator-dotalk'= 'Duplicate discussion page (if 
applicable)',
+   'duplicator-dohistory' = 'Duplicate full page history',
'duplicator-submit'= 'Duplicate',
'duplicator-summary'   = 'Copied from [[$1]]',
'duplicator-success'   = big'''[[$1]] was copied to 
[[$2]].'''/big,
@@ -1589,6 +1590,7 @@
'duplicator-source' = 'Откуда:',
'duplicator-dest' = 'Куда:',
'duplicator-dotalk' = 'Клонировать страницу обсуждения (если 
возможно)',
+   'duplicator-dohistory' = 'Клонировать историю изменений',
'duplicator-submit' = 'Клонировать',
'duplicator-summary' = 'Копия [[$1]]',
'duplicator-success' = big'''[[$1]] клонирована в [[$2]].'''/big,
diff --git a/Duplicator.page.php b/Duplicator.page.php
index ca82e7f..6339645 100644
--- a/Duplicator.page.php
+++ b/Duplicator.page.php
@@ -23,9 +23,10 @@
protected $destTitle = null;
 
/**
-* Whether or not we're duplicating the talk page
+* Whether or not we're duplicating the talk page and the history
 */
protected $talk = true;
+   protected $history = true;
 
/**
 * Constructor
@@ -97,12 +98,12 @@
$num = $dbr-selectField( 'revision', 'COUNT(*)',array( 
'rev_page' = $this-sourceTitle-getArticleID() ), __METHOD__ );
if( $num = $wgDuplicatorRevisionLimit ) {
# Attempt to perform the main duplicate op. first
-   if( $this-duplicate( $this-sourceTitle, 
$this-destTitle ) ) {
+   if( $this-duplicate( $this-sourceTitle, 
$this-destTitle, $this-history ) ) {
$success  = wfMsgNoTrans( 'duplicator-success', 
$this-sourceTitle-getPrefixedText(), $this-destTitle-getPrefixedText() ) . 
\n\n;
$success .= '* ' . wfMsgNoTrans( 
'duplicator-success-revisions', $wgLang-formatNum( $num ) ) . \n;
# If there is a talk page and we've been asked 
to duplicate it, do so
if( $this-dealWithTalk()  $this-talk ) {
-   if( $this-duplicate( 
$this-sourceTitle-getTalkPage(), $this-destTitle-getTalkPage() ) ) {
+   if( $this-duplicate( 
$this-sourceTitle-getTalkPage(), $this-destTitle-getTalkPage(), 
$this-history ) ) {
$success .= '* ' . 
wfMsgNoTrans( 'duplicator-success-talkcopied' ) . \n;
} else {
$success .= '* ' . 
wfMsgNoTrans( 'duplicator-success-talknotcopied' ) . \n;
@@ -138,6 +139,7 @@
$this-dest = $request-getText( 'dest', '' );
$this-destTitle = Title::newFromText( $this-dest );
$this-talk = $request-getCheck( 'talk' );
+   $this-history = $request-getCheck( 'history' );
}
 
/**
@@ -183,6 +185,9 @@
$form .= 'td' . Xml::checkLabel( wfMsg( 'duplicator-dotalk' 
), 'talk', 'talk', $this-talk ) . '/td';
$form .= '/trtr';
$form .= 'td#160;/td';
+   $form .= 'td' . Xml::checkLabel( wfMsg( 
'duplicator-dohistory' ), 'history', 'history', $this-history ) . '/td';
+   $form .= '/trtr';
+   $form .= 'td#160;/td';
$form .= 'td' . Xml::submitButton( wfMsg( 'duplicator-submit' 
) ) . '/td';
$form .= '/tr';
$form .= '/table';
@@ -197,9 +202,10 @@
 *
 * @param $source Title to duplicate
 * @param $dest Title to save to
+* @param $includeHistory Whether to copy full article history
 * @return bool
 */
-   protected function duplicate( $source, $dest ) {
+   protected function duplicate( $source, $dest, $includeHistory = false 
) {
global $wgUser, $wgBot;
if( !$source-exists() || $dest-exists() ) {
return false; # Source doesn't exist, or destination 

[MediaWiki-commits] [Gerrit] Add .gitreview - change (mediawiki...Duplicator)

2013-05-29 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/65981


Change subject: Add .gitreview
..

Add .gitreview

Change-Id: I422d1d519b8a03560e79a6fde60834c882e8e6b5
---
A .gitreview
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Duplicator 
refs/changes/81/65981/1

diff --git a/.gitreview b/.gitreview
new file mode 100644
index 000..f740144
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,6 @@
+[gerrit]
+host=gerrit.wikimedia.org
+port=29418
+project=mediawiki/extensions/Duplicator
+defaultbranch=master
+defaultrebase=0
\ No newline at end of file

-- 
To view, visit https://gerrit.wikimedia.org/r/65981
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I422d1d519b8a03560e79a6fde60834c882e8e6b5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Duplicator
Gerrit-Branch: master
Gerrit-Owner: VitaliyFilippov vita...@yourcmc.ru

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


[MediaWiki-commits] [Gerrit] Add license (I assume GPLv2) and bump version - change (mediawiki...Duplicator)

2013-05-29 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/65980


Change subject: Add license (I assume GPLv2) and bump version
..

Add license (I assume GPLv2) and bump version

Change-Id: I82a9256ce1c1225b54fbac66907c539f38c70735
---
A COPYING
M Duplicator.page.php
M Duplicator.php
3 files changed, 374 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Duplicator 
refs/changes/80/65980/1

diff --git a/COPYING b/COPYING
new file mode 100644
index 000..019694a
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,342 @@
+== GNU GENERAL PUBLIC LICENSE ==
+
+Version 2, June 1991
+
+Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
+Everyone is permitted to copy and distribute verbatim copies
+of this license document, but changing it is not allowed.
+
+=== Preamble ===
+
+The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+The precise terms and conditions for copying, distribution and
+modification follow.
+
+== TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION ==
+
+'''0.''' This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The Program, below,
+refers to any such program or work, and a work based on the Program
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term modification.)  Each licensee is addressed as you.
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+'''1.''' You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other 

[MediaWiki-commits] [Gerrit] Allow to duplicate subpages - change (mediawiki...Duplicator)

2013-05-29 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/65979


Change subject: Allow to duplicate subpages
..

Allow to duplicate subpages

Change-Id: I950ec49fc91f7a99c0722771f8498b15033e86d5
---
M Duplicator.i18n.php
M Duplicator.page.php
2 files changed, 47 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Duplicator 
refs/changes/79/65979/1

diff --git a/Duplicator.i18n.php b/Duplicator.i18n.php
index 68a55c4..44090c0 100644
--- a/Duplicator.i18n.php
+++ b/Duplicator.i18n.php
@@ -22,6 +22,7 @@
'duplicator-source'= 'Source:',
'duplicator-dest'  = 'Destination:',
'duplicator-dotalk'= 'Duplicate discussion page (if 
applicable)',
+   'duplicator-dosubpages'= 'Duplicate subpages (if any)',
'duplicator-dohistory' = 'Duplicate full page history',
'duplicator-submit'= 'Duplicate',
'duplicator-summary'   = 'Copied from [[$1]], revision 
[[$2]]',
@@ -1480,6 +1481,7 @@
'duplicator-source' = 'Откуда:',
'duplicator-dest' = 'Куда:',
'duplicator-dotalk' = 'Клонировать страницу обсуждения (если 
возможно)',
+   'duplicator-dosubpages' = 'Клонировать подстраницы (если есть)',
'duplicator-dohistory' = 'Клонировать историю изменений',
'duplicator-submit' = 'Клонировать',
'duplicator-summary' = 'Копия ревизии [[$2]] статьи [[$1]]',
diff --git a/Duplicator.page.php b/Duplicator.page.php
index 1439e26..50d1145 100644
--- a/Duplicator.page.php
+++ b/Duplicator.page.php
@@ -23,9 +23,10 @@
protected $destTitle = null;
 
/**
-* Whether or not we're duplicating the talk page and the history
+* Whether or not we're duplicating the talk page, subpages, and the 
history
 */
protected $talk = true;
+   protected $subpages = true;
protected $history = true;
 
/**
@@ -98,6 +99,10 @@
if( $num ) {
$success = '* ' . wfMsgNoTrans( 'duplicator-success', 
$this-sourceTitle-getPrefixedText(), $this-destTitle-getPrefixedText() );
$success .= ' ' . wfMsgNoTrans( 
'duplicator-success-revisions', $wgLang-formatNum( $num ) ) . \n;
+   # If there are subpages and we've been asked to 
duplicate them, do so
+   if ( $this-subpages ) {
+   $success .= $this-duplicateSubpages( 
$this-sourceTitle, $this-destTitle, $this-history );
+   }
# If there is a talk page and we've been asked to 
duplicate it, do so
if( $this-talk  $this-dealWithTalk() ) {
$st = $this-sourceTitle-getTalkPage();
@@ -106,6 +111,9 @@
if ( $num ) {
$success .= '* ' . wfMsgNoTrans( 
'duplicator-success', $st-getPrefixedText(), $dt-getPrefixedText() );
$success .= ' ' . wfMsgNoTrans( 
'duplicator-success-revisions', $wgLang-formatNum( $num ) ) . \n;
+   if ( $this-subpages ) {
+   $success .= 
$this-duplicateSubpages( $st, $dt, $this-history );
+   }
} else {
$success .= '* ' . wfMsgNoTrans( 
'duplicator-success-talknotcopied' ) . \n;
}
@@ -133,6 +141,7 @@
$this-dest = $request-getText( 'dest', '' );
$this-destTitle = Title::newFromText( $this-dest );
$this-talk = $request-getCheck( 'talk' );
+   $this-subpages = $request-getCheck( 'subpages' );
$this-history = $request-getCheck( 'history' );
}
 
@@ -179,6 +188,9 @@
$form .= 'td' . Xml::checkLabel( wfMsg( 'duplicator-dotalk' 
), 'talk', 'talk', $this-talk ) . '/td';
$form .= '/trtr';
$form .= 'td#160;/td';
+   $form .= 'td' . Xml::checkLabel( wfMsg( 
'duplicator-dosubpages' ), 'subpages', 'subpages', $this-subpages ) . '/td';
+   $form .= '/trtr';
+   $form .= 'td#160;/td';
$form .= 'td' . Xml::checkLabel( wfMsg( 
'duplicator-dohistory' ), 'history', 'history', $this-history ) . '/td';
$form .= '/trtr';
$form .= 'td#160;/td';
@@ -191,6 +203,38 @@
}
 
/**
+* Duplicate subpages of $source to $dest
+*
+* @param $source Title to duplicate subpages for
+* @param $dest Title to save subpages to
+* @return bool
+*/
+   protected function duplicateSubpages( $source, $dest, $includeHistory ) 
{
+

[MediaWiki-commits] [Gerrit] Display user_name when user_real_name is empty - change (mediawiki...WhoIsWatching)

2013-03-28 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/56388


Change subject: Display user_name when user_real_name is empty
..

Display user_name when user_real_name is empty

Change-Id: I0ac0f5e5afd29046cc081ca1687702c24dcf825d
---
M WhoIsWatching_body.php
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WhoIsWatching 
refs/changes/88/56388/1

diff --git a/WhoIsWatching_body.php b/WhoIsWatching_body.php
index 53a0b31..f5c99de 100644
--- a/WhoIsWatching_body.php
+++ b/WhoIsWatching_body.php
@@ -78,11 +78,11 @@
$u = User::newFromName( $row-user_name );
if ( !array_key_exists( $u-getID(), 
$watchingusers ) 
$u-isAllowed( 'read' )  
$u-getEmail() ) {
-   $users[strtolower( $u-getRealName() )] 
= $u-getID();
+   $users[ $u-getID() ] = 
$u-getRealName() ? $u-getRealName() : $u-getName();
}
}
-   ksort( $users );
-   foreach ( $users as $name = $id ) {
+   asort( $users );
+   foreach ( $users as $id = $name ) {
$wgOut-addHTML( option 
value=\.$id.\.$name./option );
}
$wgOut-addHTML( '/select/tdtd' );

-- 
To view, visit https://gerrit.wikimedia.org/r/56388
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0ac0f5e5afd29046cc081ca1687702c24dcf825d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WhoIsWatching
Gerrit-Branch: master
Gerrit-Owner: VitaliyFilippov vita...@yourcmc.ru

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


[MediaWiki-commits] [Gerrit] Display user_name when user_real_name is empty - change (mediawiki...WhoIsWatching)

2013-03-28 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has submitted this change and it was merged.

Change subject: Display user_name when user_real_name is empty
..


Display user_name when user_real_name is empty

Change-Id: I0ac0f5e5afd29046cc081ca1687702c24dcf825d
---
M WhoIsWatching_body.php
1 file changed, 3 insertions(+), 3 deletions(-)

Approvals:
  VitaliyFilippov: Verified; Looks good to me, approved



diff --git a/WhoIsWatching_body.php b/WhoIsWatching_body.php
index 53a0b31..f5c99de 100644
--- a/WhoIsWatching_body.php
+++ b/WhoIsWatching_body.php
@@ -78,11 +78,11 @@
$u = User::newFromName( $row-user_name );
if ( !array_key_exists( $u-getID(), 
$watchingusers ) 
$u-isAllowed( 'read' )  
$u-getEmail() ) {
-   $users[strtolower( $u-getRealName() )] 
= $u-getID();
+   $users[ $u-getID() ] = 
$u-getRealName() ? $u-getRealName() : $u-getName();
}
}
-   ksort( $users );
-   foreach ( $users as $name = $id ) {
+   asort( $users );
+   foreach ( $users as $id = $name ) {
$wgOut-addHTML( option 
value=\.$id.\.$name./option );
}
$wgOut-addHTML( '/select/tdtd' );

-- 
To view, visit https://gerrit.wikimedia.org/r/56388
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I0ac0f5e5afd29046cc081ca1687702c24dcf825d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WhoIsWatching
Gerrit-Branch: master
Gerrit-Owner: VitaliyFilippov vita...@yourcmc.ru
Gerrit-Reviewer: VitaliyFilippov vita...@yourcmc.ru

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


[MediaWiki-commits] [Gerrit] Use File::isLocal instead of Repo::isLocal - change (mediawiki...SlimboxThumbs)

2013-02-24 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/50732


Change subject: Use File::isLocal instead of Repo::isLocal
..

Use File::isLocal instead of Repo::isLocal

This is shorter and compatible with 1.13 back again :-)

Change-Id: I7d12c2e63d2f65682da90208ecfdc48d5b2227f4
---
M SlimboxThumbs.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SlimboxThumbs 
refs/changes/32/50732/1

diff --git a/SlimboxThumbs.php b/SlimboxThumbs.php
index 95afa9d..ee37dfa 100644
--- a/SlimboxThumbs.php
+++ b/SlimboxThumbs.php
@@ -61,7 +61,7 @@
'width' = $file-getWidth(),
'height' = $file-getHeight(),
'url' = $file-getFullUrl(),
-   'local' = 
$file-getRepo()-isLocal(),
+   'local' = $file-isLocal(),
);
}
}
@@ -75,7 +75,7 @@
 function efSBTRemoteThumb( $name, $width ) {
$img = wfFindFile( $name );
if ( $img  $img-exists()  $img-getTitle()-userCanRead() 
-!$img-getRepo()-isLocal() ) {
+!$img-isLocal() ) {
try {
$thumb = $img-transform( array( 'width' = $width ), 0 
);
} catch( Exception $ex ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/50732
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7d12c2e63d2f65682da90208ecfdc48d5b2227f4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SlimboxThumbs
Gerrit-Branch: master
Gerrit-Owner: VitaliyFilippov vita...@yourcmc.ru

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


[MediaWiki-commits] [Gerrit] Use File::isLocal instead of Repo::isLocal - change (mediawiki...SlimboxThumbs)

2013-02-24 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has submitted this change and it was merged.

Change subject: Use File::isLocal instead of Repo::isLocal
..


Use File::isLocal instead of Repo::isLocal

This is shorter and compatible with 1.13 back again :-)

Change-Id: I7d12c2e63d2f65682da90208ecfdc48d5b2227f4
---
M SlimboxThumbs.php
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  VitaliyFilippov: Verified; Looks good to me, approved



diff --git a/SlimboxThumbs.php b/SlimboxThumbs.php
index 95afa9d..ee37dfa 100644
--- a/SlimboxThumbs.php
+++ b/SlimboxThumbs.php
@@ -61,7 +61,7 @@
'width' = $file-getWidth(),
'height' = $file-getHeight(),
'url' = $file-getFullUrl(),
-   'local' = 
$file-getRepo()-isLocal(),
+   'local' = $file-isLocal(),
);
}
}
@@ -75,7 +75,7 @@
 function efSBTRemoteThumb( $name, $width ) {
$img = wfFindFile( $name );
if ( $img  $img-exists()  $img-getTitle()-userCanRead() 
-!$img-getRepo()-isLocal() ) {
+!$img-isLocal() ) {
try {
$thumb = $img-transform( array( 'width' = $width ), 0 
);
} catch( Exception $ex ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/50732
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I7d12c2e63d2f65682da90208ecfdc48d5b2227f4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SlimboxThumbs
Gerrit-Branch: master
Gerrit-Owner: VitaliyFilippov vita...@yourcmc.ru
Gerrit-Reviewer: VitaliyFilippov vita...@yourcmc.ru

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


[MediaWiki-commits] [Gerrit] Do not show lightboxes for skin images - change (mediawiki...SlimboxThumbs)

2013-02-18 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/49645


Change subject: Do not show lightboxes for skin images
..

Do not show lightboxes for skin images

This fixes duplicate lightboxes for [[File:Image.jpg|thumb]].

Change-Id: Idb7182767efce2ee05a336aef1937c448030755b
---
M SlimboxThumbs.php
M slimbox/slimboxthumbs.js
2 files changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SlimboxThumbs 
refs/changes/45/49645/1

diff --git a/SlimboxThumbs.php b/SlimboxThumbs.php
index 779eabd..95afa9d 100644
--- a/SlimboxThumbs.php
+++ b/SlimboxThumbs.php
@@ -27,7 +27,7 @@
die( 'Not an entry point.' );
 }
 
-define( 'SlimboxThumbs_VERSION', '2013-01-10' );
+define( 'SlimboxThumbs_VERSION', '2013-02-18' );
 
 // Register the extension credits.
 $wgExtensionCredits['other'][] = array(
diff --git a/slimbox/slimboxthumbs.js b/slimbox/slimboxthumbs.js
index d70116a..33cb700 100644
--- a/slimbox/slimboxthumbs.js
+++ b/slimbox/slimboxthumbs.js
@@ -6,6 +6,7 @@
 
 function makeSlimboxThumbs( $, pathRegexp, wgFullScriptPath ) {
var re = new RegExp( pathRegexp );
+   var reExcl = /(^|\/)skins\//;
var canview = /\.(jpe?g|jpe|gif|png)$/i;
var m;
var names = [];
@@ -24,7 +25,7 @@
var ww = $( window ).width();
var wh = $( window ).height() * 0.9;
$( 'img' ).each( function( i, e ) {
-   if ( e.parentNode.nodeName == 'A'  ( m = 
re.exec( e.parentNode.href ) ) ) {
+   if ( e.parentNode.nodeName == 'A'  ( m = 
re.exec( e.parentNode.href ) )  !reExcl.exec( e.src ) ) {
var n = decodeURIComponent( m[1] );
if ( !r[n] ) {
return;

-- 
To view, visit https://gerrit.wikimedia.org/r/49645
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idb7182767efce2ee05a336aef1937c448030755b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SlimboxThumbs
Gerrit-Branch: master
Gerrit-Owner: VitaliyFilippov vita...@yourcmc.ru

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


[MediaWiki-commits] [Gerrit] Do not show lightboxes for skin images - change (mediawiki...SlimboxThumbs)

2013-02-18 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has submitted this change and it was merged.

Change subject: Do not show lightboxes for skin images
..


Do not show lightboxes for skin images

This fixes duplicate lightboxes for [[File:Image.jpg|thumb]].

Change-Id: Idb7182767efce2ee05a336aef1937c448030755b
---
M SlimboxThumbs.php
M slimbox/slimboxthumbs.js
2 files changed, 3 insertions(+), 2 deletions(-)

Approvals:
  VitaliyFilippov: Verified; Looks good to me, approved



diff --git a/SlimboxThumbs.php b/SlimboxThumbs.php
index 779eabd..95afa9d 100644
--- a/SlimboxThumbs.php
+++ b/SlimboxThumbs.php
@@ -27,7 +27,7 @@
die( 'Not an entry point.' );
 }
 
-define( 'SlimboxThumbs_VERSION', '2013-01-10' );
+define( 'SlimboxThumbs_VERSION', '2013-02-18' );
 
 // Register the extension credits.
 $wgExtensionCredits['other'][] = array(
diff --git a/slimbox/slimboxthumbs.js b/slimbox/slimboxthumbs.js
index d70116a..33cb700 100644
--- a/slimbox/slimboxthumbs.js
+++ b/slimbox/slimboxthumbs.js
@@ -6,6 +6,7 @@
 
 function makeSlimboxThumbs( $, pathRegexp, wgFullScriptPath ) {
var re = new RegExp( pathRegexp );
+   var reExcl = /(^|\/)skins\//;
var canview = /\.(jpe?g|jpe|gif|png)$/i;
var m;
var names = [];
@@ -24,7 +25,7 @@
var ww = $( window ).width();
var wh = $( window ).height() * 0.9;
$( 'img' ).each( function( i, e ) {
-   if ( e.parentNode.nodeName == 'A'  ( m = 
re.exec( e.parentNode.href ) ) ) {
+   if ( e.parentNode.nodeName == 'A'  ( m = 
re.exec( e.parentNode.href ) )  !reExcl.exec( e.src ) ) {
var n = decodeURIComponent( m[1] );
if ( !r[n] ) {
return;

-- 
To view, visit https://gerrit.wikimedia.org/r/49645
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Idb7182767efce2ee05a336aef1937c448030755b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SlimboxThumbs
Gerrit-Branch: master
Gerrit-Owner: VitaliyFilippov vita...@yourcmc.ru
Gerrit-Reviewer: VitaliyFilippov vita...@yourcmc.ru

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


[MediaWiki-commits] [Gerrit] Add russian messages for bad title errors. - change (mediawiki/core[master])

2013-01-17 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has uploaded a new change for review.

Change subject: Add russian messages for bad title errors.
..

Add russian messages for bad title errors.

Change-Id: I5f33d34dd16bda2315d911f29a7e92263fae81fb
---
M languages/messages/MessagesRu.php
1 file changed, 18 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/97/44397/1
--
To view, visit https://gerrit.wikimedia.org/r/44397
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5f33d34dd16bda2315d911f29a7e92263fae81fb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: VitaliyFilippov vita...@yourcmc.ru

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


[MediaWiki-commits] [Gerrit] Show detailed errors for bad titles instead of just Bad Tit... - change (mediawiki/core[master])

2013-01-10 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has uploaded a new change for review.

Change subject: Show detailed errors for bad titles instead of just Bad Title 
page
..

Show detailed errors for bad titles instead of just Bad Title page

Change-Id: Ie21f759f2ba42952d316381774cf3c6f87941b33
---
M includes/Exception.php
M includes/Title.php
M includes/Wiki.php
M languages/messages/MessagesEn.php
M languages/messages/MessagesRu.php
5 files changed, 78 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/66/43166/1
--
To view, visit https://gerrit.wikimedia.org/r/43166
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie21f759f2ba42952d316381774cf3c6f87941b33
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: VitaliyFilippov vita...@yourcmc.ru

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


[MediaWiki-commits] [Gerrit] (bug 43541) Compatibility with foreign repositories - change (mediawiki...SlimboxThumbs[master])

2013-01-10 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has submitted this change and it was merged.

Change subject: (bug 43541) Compatibility with foreign repositories
..


(bug 43541) Compatibility with foreign repositories

Change-Id: I649fc1f2c63223dc14a6d967d0b00b94355d4e1f
---
M SlimboxThumbs.php
M slimbox/slimboxthumbs.js
2 files changed, 48 insertions(+), 7 deletions(-)

Approvals:
  VitaliyFilippov: Verified; Looks good to me, approved


--
To view, visit https://gerrit.wikimedia.org/r/43187
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I649fc1f2c63223dc14a6d967d0b00b94355d4e1f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SlimboxThumbs
Gerrit-Branch: master
Gerrit-Owner: VitaliyFilippov vita...@yourcmc.ru
Gerrit-Reviewer: VitaliyFilippov vita...@yourcmc.ru

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


[MediaWiki-commits] [Gerrit] Clear timer to null. - change (mediawiki...Drafts[master])

2012-12-21 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has uploaded a new change for review.

Change subject: Clear timer to null.
..

Clear timer to null.

Is it SO important that such trivial change goes into its own commit?!!

Change-Id: I7090a8c9203eeebab441e12131cd91e2ca8e7877
---
M modules/ext.Drafts.js
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Drafts 
refs/changes/74/39774/1
--
To view, visit https://gerrit.wikimedia.org/r/39774
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7090a8c9203eeebab441e12131cd91e2ca8e7877
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Drafts
Gerrit-Branch: master
Gerrit-Owner: VitaliyFilippov vita...@yourcmc.ru

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


[MediaWiki-commits] [Gerrit] Add a dependency on mediawiki.legacy.wikibits. - change (mediawiki...Drafts[master])

2012-12-19 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has uploaded a new change for review.

Change subject: Add a dependency on mediawiki.legacy.wikibits.
..

Add a dependency on mediawiki.legacy.wikibits.

This will allow ResourceLoader to always determine the correct loading order
(today I've hit a bug on number of my wikis when Drafts were put before
mediawiki.legacy.wikibits in the loaded JS, and prevented ALL loaded js from
executing via an exception).

Change-Id: I5f0d17f637926669c51c2c897b75a7d7dfd5ca1d
---
M Drafts.php
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Drafts 
refs/changes/69/39369/1
--
To view, visit https://gerrit.wikimedia.org/r/39369
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5f0d17f637926669c51c2c897b75a7d7dfd5ca1d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Drafts
Gerrit-Branch: master
Gerrit-Owner: VitaliyFilippov vita...@yourcmc.ru

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


[MediaWiki-commits] [Gerrit] Rework outdated code of WhoIsWatching extension. - change (mediawiki...WhoIsWatching[master])

2012-12-13 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has uploaded a new change for review.

Change subject: Rework outdated code of WhoIsWatching extension.
..

Rework outdated code of WhoIsWatching extension.

* Use autoload instead of require()'s
* Use edit token instead of constant sha1('whoiswatching')
* Use Title::newFromText() instead of parsing namespace using 
$wgCanonicalNamespaceNames
* Use MW $db-select() instead of literal SQL
* Really check $whoiswatching_allowaddingpeople when actually adding people
* Do redirect after adding watchers

Change-Id: Ia203548b96d47a07bc6c692dc825e2f1da4a59ad
---
M WhoIsWatching.php
M WhoIsWatching_body.php
2 files changed, 54 insertions(+), 59 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WhoIsWatching 
refs/changes/22/38522/1
--
To view, visit https://gerrit.wikimedia.org/r/38522
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia203548b96d47a07bc6c692dc825e2f1da4a59ad
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WhoIsWatching
Gerrit-Branch: master
Gerrit-Owner: VitaliyFilippov vita...@yourcmc.ru

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


[MediaWiki-commits] [Gerrit] Rework outdated code of WhoIsWatching extension. - change (mediawiki...WhoIsWatching[master])

2012-12-13 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has submitted this change and it was merged.

Change subject: Rework outdated code of WhoIsWatching extension.
..


Rework outdated code of WhoIsWatching extension.

* Use autoload instead of require()'s
* Use edit token instead of constant sha1('whoiswatching')
* Use Title::newFromText() instead of parsing namespace using 
$wgCanonicalNamespaceNames
* Use MW $db-select() instead of literal SQL
* Really check $whoiswatching_allowaddingpeople when actually adding people
* Do redirect after adding watchers

Change-Id: Ia203548b96d47a07bc6c692dc825e2f1da4a59ad
---
M WhoIsWatching.php
M WhoIsWatching_body.php
2 files changed, 54 insertions(+), 59 deletions(-)

Approvals:
  VitaliyFilippov: Verified; Looks good to me, approved


--
To view, visit https://gerrit.wikimedia.org/r/38522
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia203548b96d47a07bc6c692dc825e2f1da4a59ad
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WhoIsWatching
Gerrit-Branch: master
Gerrit-Owner: VitaliyFilippov vita...@yourcmc.ru
Gerrit-Reviewer: VitaliyFilippov vita...@yourcmc.ru

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


[MediaWiki-commits] [Gerrit] Add message documentation. - change (mediawiki...WhoIsWatching[master])

2012-12-13 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has submitted this change and it was merged.

Change subject: Add message documentation.
..


Add message documentation.

Change-Id: I71012e29c235e99be43586a39298492ab1dffb2f
---
M WhoIsWatching.i18n.php
1 file changed, 8 insertions(+), 1 deletion(-)

Approvals:
  VitaliyFilippov: Verified; Looks good to me, approved


--
To view, visit https://gerrit.wikimedia.org/r/38523
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I71012e29c235e99be43586a39298492ab1dffb2f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WhoIsWatching
Gerrit-Branch: master
Gerrit-Owner: VitaliyFilippov vita...@yourcmc.ru
Gerrit-Reviewer: VitaliyFilippov vita...@yourcmc.ru

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


[MediaWiki-commits] [Gerrit] Use db-select instead of literal sql - change (mediawiki...WhoIsWatching[master])

2012-11-22 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has submitted this change and it was merged.

Change subject: Use db-select instead of literal sql
..


Use db-select instead of literal sql

Change-Id: Ie7b6ba241a85d1258e28d6a3c10430ba3beb9c1d
---
M WhoIsWatching_body.php
1 file changed, 5 insertions(+), 4 deletions(-)

Approvals:
  VitaliyFilippov: Verified; Looks good to me, approved


--
To view, visit https://gerrit.wikimedia.org/r/34718
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie7b6ba241a85d1258e28d6a3c10430ba3beb9c1d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WhoIsWatching
Gerrit-Branch: master
Gerrit-Owner: VitaliyFilippov vita...@yourcmc.ru
Gerrit-Reviewer: VitaliyFilippov vita...@yourcmc.ru

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


[MediaWiki-commits] [Gerrit] Code style - change (mediawiki...WhoIsWatching[master])

2012-11-22 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has submitted this change and it was merged.

Change subject: Code style
..


Code style

Change-Id: I33d4d970ef425fcdd49dd3ac0fe4192aaa5b83ff
---
M WhoIsWatching.php
M WhoIsWatching_body.php
2 files changed, 73 insertions(+), 71 deletions(-)

Approvals:
  VitaliyFilippov: Verified; Looks good to me, approved


--
To view, visit https://gerrit.wikimedia.org/r/34717
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I33d4d970ef425fcdd49dd3ac0fe4192aaa5b83ff
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WhoIsWatching
Gerrit-Branch: master
Gerrit-Owner: VitaliyFilippov vita...@yourcmc.ru
Gerrit-Reviewer: VitaliyFilippov vita...@yourcmc.ru

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


[MediaWiki-commits] [Gerrit] Import latest Wikimedia SVN version - change (mediawiki...WhoIsWatching[master])

2012-11-22 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has submitted this change and it was merged.

Change subject: Import latest Wikimedia SVN version
..


Import latest Wikimedia SVN version

http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/WhoIsWatching@115780

Change-Id: Ib31c75960c5ee1a7deb0d46f725efbe14dbf5e37
---
A WhoIsWatching.alias.php
A WhoIsWatching.i18n.php
A WhoIsWatching.php
A WhoIsWatching_body.php
4 files changed, 1,390 insertions(+), 0 deletions(-)

Approvals:
  VitaliyFilippov: Verified; Looks good to me, approved


--
To view, visit https://gerrit.wikimedia.org/r/34716
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib31c75960c5ee1a7deb0d46f725efbe14dbf5e37
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WhoIsWatching
Gerrit-Branch: master
Gerrit-Owner: VitaliyFilippov vita...@yourcmc.ru
Gerrit-Reviewer: VitaliyFilippov vita...@yourcmc.ru

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


[MediaWiki-commits] [Gerrit] Quick monkey-patch for MW Bug 37209 - change (mediawiki/core[master])

2012-11-20 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has uploaded a new change for review.

Change subject: Quick monkey-patch for MW Bug 37209
..

Quick monkey-patch for MW Bug 37209

Change-Id: I2fc3966ee5d462ba050a6c54cfda1a0dfd972635
---
M includes/Title.php
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/39/34339/1
--
To view, visit https://gerrit.wikimedia.org/r/34339
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2fc3966ee5d462ba050a6c54cfda1a0dfd972635
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: VitaliyFilippov vita...@yourcmc.ru

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


[MediaWiki-commits] [Gerrit] Totally improved MediaWiki Import/Export engine with conflic... - change (mediawiki/core[master])

2012-11-20 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has uploaded a new change for review.

Change subject: Totally improved MediaWiki Import/Export engine with conflict 
detection, advanced page selection for export and support for exporting file 
data over HTTP or inside the export file.
..

Totally improved MediaWiki Import/Export engine with conflict detection,
advanced page selection for export and support for exporting file data over
HTTP or inside the export file.

Requires fixed old upload timestamps and running 
maintenance/renameOldUploads.php
when applied to a non-empty MediaWiki installation.

MediaWikiBug 22881 - Greatly improved Export and Import
https://bugzilla.wikimedia.org/show_bug.cgi?id=22881

Change-Id: Ie548ae25de63049d03cd72206c6bb518cea3f6d3
---
M includes/AutoLoader.php
M includes/DefaultSettings.php
A includes/DumpArchive.php
M includes/Export.php
M includes/Import.php
M includes/specials/SpecialExport.php
M includes/specials/SpecialImport.php
M languages/messages/MessagesEn.php
M languages/messages/MessagesRu.php
M skins/common/shared.css
10 files changed, 1,391 insertions(+), 1,498 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/40/34340/1
--
To view, visit https://gerrit.wikimedia.org/r/34340
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie548ae25de63049d03cd72206c6bb518cea3f6d3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: VitaliyFilippov vita...@yourcmc.ru

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


[MediaWiki-commits] [Gerrit] Make old uploaded file revision contain their timestamps, no... - change (mediawiki/core[master])

2012-11-20 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has uploaded a new change for review.

Change subject: Make old uploaded file revision contain their timestamps, not 
the timestamps of a following revision.
..

Make old uploaded file revision contain their timestamps, not the
timestamps of a following revision.

Change-Id: Ibd12146e11f18c34c34aa2c496e243f0c9e8695e
---
M includes/filerepo/file/LocalFile.php
A maintenance/renameOldUploads.php
2 files changed, 121 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/38/34338/1
--
To view, visit https://gerrit.wikimedia.org/r/34338
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibd12146e11f18c34c34aa2c496e243f0c9e8695e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: VitaliyFilippov vita...@yourcmc.ru

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


[MediaWiki-commits] [Gerrit] Do not re-implement http_build_query :-) - change (mediawiki...CategoryTree[master])

2012-11-19 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has uploaded a new change for review.

Change subject: Do not re-implement http_build_query :-)
..

Do not re-implement http_build_query :-)

Change-Id: I9057bce11d7b1c1738f87eaf523ecbaf21b4b596
---
M CategoryTreeFunctions.php
1 file changed, 1 insertion(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CategoryTree 
refs/changes/02/34102/1
--
To view, visit https://gerrit.wikimedia.org/r/34102
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9057bce11d7b1c1738f87eaf523ecbaf21b4b596
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CategoryTree
Gerrit-Branch: master
Gerrit-Owner: VitaliyFilippov vita...@yourcmc.ru

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


[MediaWiki-commits] [Gerrit] Fix PHP notice in Category.php - change (mediawiki/core[master])

2012-11-19 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has uploaded a new change for review.

Change subject: Fix PHP notice in Category.php
..

Fix PHP notice in Category.php

Change-Id: I52838a1125298da330f60ef1e761130ff0e4faba
---
M includes/Category.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/12/34212/1
--
To view, visit https://gerrit.wikimedia.org/r/34212
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I52838a1125298da330f60ef1e761130ff0e4faba
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: VitaliyFilippov vita...@yourcmc.ru

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


[MediaWiki-commits] [Gerrit] Give permission hooks a chance to override deny permissions. - change (mediawiki/core[master])

2012-11-09 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has uploaded a new change for review.

Change subject: Give permission hooks a chance to override deny permissions.
..

Give permission hooks a chance to override deny permissions.

An example application of this could be to allow modifications
of some messages in MediaWiki namespace for some users.
Previous implementation does not allow this.

The patch extends standard MW hook logic to permission hooks:
they are checked first, and if some hook returns 'false' which
means 'stop hook processing', next permission checks are not
performed.

Also $errors and $short parameters are added to getUserPermissionsErrors,
so hooks can append errors directly to $errors and decide whether
to run checks or not based or previous $errors and $short values.

Change-Id: I62bb977fe9988212bd5e3daffbe52b23d83af7b5
---
M includes/Title.php
1 file changed, 28 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/66/32566/1
--
To view, visit https://gerrit.wikimedia.org/r/32566
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I62bb977fe9988212bd5e3daffbe52b23d83af7b5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: VitaliyFilippov vita...@yourcmc.ru

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


[MediaWiki-commits] [Gerrit] Corrected support for MediaWikis older than 1.17 - change (mediawiki...SlimboxThumbs[master])

2012-10-18 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has submitted this change and it was merged.

Change subject: Corrected support for MediaWikis older than 1.17
..


Corrected support for MediaWikis older than 1.17

Change-Id: Ibbbde4cf4f2f621c09585de3fde8726dc59537fc
---
M SlimboxThumbs.php
1 file changed, 7 insertions(+), 9 deletions(-)

Approvals:
  VitaliyFilippov: Verified; Looks good to me, approved


--
To view, visit https://gerrit.wikimedia.org/r/28600
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibbbde4cf4f2f621c09585de3fde8726dc59537fc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SlimboxThumbs
Gerrit-Branch: master
Gerrit-Owner: VitaliyFilippov vita...@yourcmc.ru
Gerrit-Reviewer: VitaliyFilippov vita...@yourcmc.ru

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


[MediaWiki-commits] [Gerrit] Load 1.8.2 over 1.16's 1.3.2 - change (mediawiki...SlimboxThumbs[master])

2012-10-18 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has uploaded a new change for review.

Change subject: Load 1.8.2 over 1.16's 1.3.2
..

Load 1.8.2 over 1.16's 1.3.2

Change-Id: Id4bc29129c9293f89783302b8ad168466e9e
---
M SlimboxThumbs.php
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SlimboxThumbs 
refs/changes/02/28602/1
--
To view, visit https://gerrit.wikimedia.org/r/28602
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id4bc29129c9293f89783302b8ad168466e9e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SlimboxThumbs
Gerrit-Branch: master
Gerrit-Owner: VitaliyFilippov vita...@yourcmc.ru

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


[MediaWiki-commits] [Gerrit] Switch to $.ajax() instead of the deprecated sajax_do_call() - change (mediawiki...SlimboxThumbs[master])

2012-10-18 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has submitted this change and it was merged.

Change subject: Switch to $.ajax() instead of the deprecated sajax_do_call()
..


Switch to $.ajax() instead of the deprecated sajax_do_call()

Also remove $.parseJSON() usage and make it compatible with 1.16's jQuery 1.3.2 
without having to load 1.8.2 over it.

Change-Id: Id4bc29129c9293f89783302b8ad168466e9e
---
M SlimboxThumbs.php
M slimbox/slimboxthumbs.js
2 files changed, 14 insertions(+), 6 deletions(-)

Approvals:
  VitaliyFilippov: Verified; Looks good to me, approved


--
To view, visit https://gerrit.wikimedia.org/r/28602
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Id4bc29129c9293f89783302b8ad168466e9e
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/SlimboxThumbs
Gerrit-Branch: master
Gerrit-Owner: VitaliyFilippov vita...@yourcmc.ru
Gerrit-Reviewer: VitaliyFilippov vita...@yourcmc.ru

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


[MediaWiki-commits] [Gerrit] Limit auto-fitted thumbnail widths to multiples of 80 - change (mediawiki...SlimboxThumbs[master])

2012-09-28 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has uploaded a new change for review.

Change subject: Limit auto-fitted thumbnail widths to multiples of 80
..

Limit auto-fitted thumbnail widths to multiples of 80

Change-Id: I58b3c39053b04402650da405a15fc1ac0698a651
---
M slimbox/slimboxthumbs.js
1 file changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SlimboxThumbs 
refs/changes/12/25712/1
--
To view, visit https://gerrit.wikimedia.org/r/25712
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I58b3c39053b04402650da405a15fc1ac0698a651
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SlimboxThumbs
Gerrit-Branch: master
Gerrit-Owner: VitaliyFilippov vita...@yourcmc.ru

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


[MediaWiki-commits] [Gerrit] Limit auto-fitted thumbnail widths to multiples of 80 - change (mediawiki...SlimboxThumbs[master])

2012-09-28 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has submitted this change and it was merged.

Change subject: Limit auto-fitted thumbnail widths to multiples of 80
..


Limit auto-fitted thumbnail widths to multiples of 80

Change-Id: I58b3c39053b04402650da405a15fc1ac0698a651
---
M slimbox/slimboxthumbs.js
1 file changed, 4 insertions(+), 2 deletions(-)

Approvals:
  VitaliyFilippov: Verified; Looks good to me, approved


--
To view, visit https://gerrit.wikimedia.org/r/25712
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I58b3c39053b04402650da405a15fc1ac0698a651
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SlimboxThumbs
Gerrit-Branch: master
Gerrit-Owner: VitaliyFilippov vita...@yourcmc.ru
Gerrit-Reviewer: VitaliyFilippov vita...@yourcmc.ru

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


[MediaWiki-commits] [Gerrit] SlimboxThumbs extension (lightbox-like picture viewer for Me... - change (mediawiki...SlimboxThumbs[master])

2012-09-26 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has uploaded a new change for review.

Change subject: SlimboxThumbs extension (lightbox-like picture viewer for 
MediaWiki), rewritten and revived.
..

SlimboxThumbs extension (lightbox-like picture viewer for MediaWiki), rewritten 
and revived.

Features:
* Click on every image thumbnail on the page produces a lightbox with full-size 
image;
* Big full-size images are scaled to 90% of browser window automatically;
* Removed annoying animation of image caption - originally it moved up and down 
on every image click;
* Bugs fixed (non-ascii picture names now work, etc);
* License changed to GPLv3 as original CC-BY-SA was incompatible with 
MediaWiki's license (!!!);
* Cleaner extension code (see 
http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/SlimboxThumbs/?pathrev=107261
 for reference).

Change-Id: I7ee6d962110f7b7e69d0385977c3f6a7ab21a548
---
A SlimboxThumbs.i18n.php
A SlimboxThumbs.php
A slimbox/README.txt
A slimbox/css/closelabel.gif
A slimbox/css/loading.gif
A slimbox/css/nextlabel.gif
A slimbox/css/prevlabel.gif
A slimbox/css/slimbox2-rtl.css
A slimbox/css/slimbox2.css
A slimbox/example.html
A slimbox/example.jpg
A slimbox/extra/android-market.js
A slimbox/extra/autoactivation.js
A slimbox/extra/fix-urls.js
A slimbox/extra/flickr.js
A slimbox/extra/picasaweb.js
A slimbox/js/slimbox2.js
A slimbox/slimboxthumbs.js
A slimbox/src/autoload.js
A slimbox/src/slimbox2.js
20 files changed, 993 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SlimboxThumbs 
refs/changes/53/25253/1
--
To view, visit https://gerrit.wikimedia.org/r/25253
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7ee6d962110f7b7e69d0385977c3f6a7ab21a548
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SlimboxThumbs
Gerrit-Branch: master
Gerrit-Owner: VitaliyFilippov vita...@yourcmc.ru

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


[MediaWiki-commits] [Gerrit] SlimboxThumbs extension (lightbox-like picture viewer for Me... - change (mediawiki...SlimboxThumbs[master])

2012-09-26 Thread VitaliyFilippov (Code Review)
VitaliyFilippov has submitted this change and it was merged.

Change subject: SlimboxThumbs extension (lightbox-like picture viewer for 
MediaWiki), rewritten and revived.
..


SlimboxThumbs extension (lightbox-like picture viewer for MediaWiki), rewritten 
and revived.

Features:
* Click on every image thumbnail on the page produces a lightbox with full-size 
image;
* Big full-size images are scaled to 90% of browser window automatically;
* Removed annoying animation of image caption - originally it moved up and down 
on every image click;
* Bugs fixed (non-ascii picture names now work, etc);
* License changed to GPLv3 as original CC-BY-SA was incompatible with 
MediaWiki's license (!!!);
* Cleaner extension code (see 
http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/SlimboxThumbs/?pathrev=107261
 for reference).

Change-Id: I7ee6d962110f7b7e69d0385977c3f6a7ab21a548
---
A SlimboxThumbs.i18n.php
A SlimboxThumbs.php
A slimbox/README.txt
A slimbox/css/closelabel.gif
A slimbox/css/loading.gif
A slimbox/css/nextlabel.gif
A slimbox/css/prevlabel.gif
A slimbox/css/slimbox2-rtl.css
A slimbox/css/slimbox2.css
A slimbox/example.html
A slimbox/example.jpg
A slimbox/extra/android-market.js
A slimbox/extra/autoactivation.js
A slimbox/extra/fix-urls.js
A slimbox/extra/flickr.js
A slimbox/extra/picasaweb.js
A slimbox/js/slimbox2.js
A slimbox/slimboxthumbs.js
A slimbox/src/autoload.js
A slimbox/src/slimbox2.js
20 files changed, 993 insertions(+), 0 deletions(-)

Approvals:
  VitaliyFilippov: Verified; Looks good to me, approved


--
To view, visit https://gerrit.wikimedia.org/r/25253
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I7ee6d962110f7b7e69d0385977c3f6a7ab21a548
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SlimboxThumbs
Gerrit-Branch: master
Gerrit-Owner: VitaliyFilippov vita...@yourcmc.ru
Gerrit-Reviewer: VitaliyFilippov vita...@yourcmc.ru

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