[MediaWiki-commits] [Gerrit] Fix namespace filtering in ChangeHandler. - change (mediawiki...Wikibase)

2013-03-20 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: Fix namespace filtering in ChangeHandler.
..


Fix namespace filtering in ChangeHandler.

In addition to the actual fix (include/exclude params in the correct order),
thich change includes a number of improvements to debug logging and
error reporting during change handling on the client.

Note: this needs to be backported to the wmf12 branch.

Change-Id: Ib8ac99f762b9aed5f61d62c10bf7706ed70affa8
---
M client/includes/ChangeHandler.php
M client/includes/NamespaceChecker.php
M client/includes/WikiPageUpdater.php
M lib/includes/ChangeNotificationJob.php
M lib/includes/changes/ItemChange.php
M lib/maintenance/dispatchChanges.php
6 files changed, 53 insertions(+), 23 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved



diff --git a/client/includes/ChangeHandler.php 
b/client/includes/ChangeHandler.php
index 4ad7741..3aa21ed 100644
--- a/client/includes/ChangeHandler.php
+++ b/client/includes/ChangeHandler.php
@@ -141,8 +141,8 @@
 
// TODO: allow these to be passed in as parameters!
$this->setNamespaces(
-   Settings::get( 'excludeNamespaces' ),
-   Settings::get( 'namespaces' )
+   Settings::get( 'namespaces' ),
+   Settings::get( 'excludeNamespaces' )
);
 
$this->injectRC = Settings::get( 'injectRecentChanges' );
@@ -237,7 +237,10 @@
$minor = true;
$bot = true;
 
+   $ids = array();
+
foreach ( $changes as $change ) {
+   $ids[] = $change->getId();
$meta = $change->getMetadata();
 
$minor &= isset( $meta['minor'] ) && 
(bool)$meta['minor'];
@@ -289,6 +292,7 @@
) );
 
$info = $change->hasField( 'info' ) ? $change->getField( 'info' 
) : array();
+   $info['change-ids'] = $ids;
$info['changes'] = $changes;
$change->setField( 'info', $info );
 
@@ -397,6 +401,10 @@
}
 
usort( $coalesced, 
'Wikibase\ChangeHandler::compareChangesByTimestamp' );
+
+   wfDebugLog( __CLASS__, __METHOD__ . ": coalesced "
+   . count( $changes ) . " into " . count( $coalesced ) . 
" changes"  );
+
return $coalesced;
}
 
@@ -466,7 +474,10 @@
 */
public function handleChange( Change $change ) {
wfProfileIn( __METHOD__ );
-   wfDebugLog( __CLASS__, __FUNCTION__ . ": handling change #" . 
$change->getId() );
+
+   $chid = self::getChangeIdForLog( $change );
+   wfDebugLog( __CLASS__, __FUNCTION__ . ": handling change #$chid"
+   . " (" . $change->getType() . ")" );
 
//TODO: Actions may be per-title, depending on how the change 
applies to that page.
//  We'll need on list of titles per action.
@@ -474,6 +485,7 @@
 
if ( $actions === 0 ) {
// nothing to do
+   wfDebugLog( __CLASS__, __FUNCTION__ . ": No actions to 
take for change #$chid." );
wfProfileOut( __METHOD__ );
return false;
}
@@ -487,11 +499,13 @@
 
if ( empty( $titlesToUpdate ) ) {
// nothing to do
+   wfDebugLog( __CLASS__, __FUNCTION__ . ": No pages to 
update for change #$chid." );
wfProfileOut( __METHOD__ );
return false;
}
 
-   wfDebugLog( __CLASS__, __FUNCTION__ . ": " . count( 
$titlesToUpdate ) . " pages to update." );
+   wfDebugLog( __CLASS__, __FUNCTION__ . ": updating " . count( 
$titlesToUpdate )
+   . " pages (actions: " . dechex( $actions ). ") for 
change #$chid." );
 
$this->updatePages( $change, $actions, $titlesToUpdate );
 
@@ -597,7 +611,7 @@
if ( $rcAttribs !== false ) {
$this->updater->injectRCRecord( $title, 
$rcAttribs );
} else {
-   trigger_error( "change #" . 
$change->getId() . " did not provide RC info", E_USER_WARNING );
+   trigger_error( "change #" . 
self::getChangeIdForLog( $change ) . " did not provide RC info", E_USER_WARNING 
);
}
}
 
@@ -606,6 +620,26 @@
}
 
wfProfileOut( __METHOD__ );
+   }
+
+   /**
+* Returns a human readable change ID, containing multiple IDs in case 
of a
+* coalesced change.
+*
+* @param Change $chan

[MediaWiki-commits] [Gerrit] Fix namespace filtering in ChangeHandler. - change (mediawiki...Wikibase)

2013-03-20 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has uploaded a new change for review.

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


Change subject: Fix namespace filtering in ChangeHandler.
..

Fix namespace filtering in ChangeHandler.

In addition to the actual fix (include/exclude params in the correct order),
thich change includes a number of improvements to debug logging and
error reporting during change handling on the client.

Note: this needs to be backported to the wmf12 branch.

Change-Id: Ib8ac99f762b9aed5f61d62c10bf7706ed70affa8
---
M client/includes/ChangeHandler.php
M client/includes/NamespaceChecker.php
M client/includes/WikiPageUpdater.php
M lib/includes/ChangeNotificationJob.php
M lib/includes/changes/ItemChange.php
M lib/maintenance/dispatchChanges.php
6 files changed, 53 insertions(+), 23 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/50/54850/1

diff --git a/client/includes/ChangeHandler.php 
b/client/includes/ChangeHandler.php
index 4ad7741..3aa21ed 100644
--- a/client/includes/ChangeHandler.php
+++ b/client/includes/ChangeHandler.php
@@ -141,8 +141,8 @@
 
// TODO: allow these to be passed in as parameters!
$this->setNamespaces(
-   Settings::get( 'excludeNamespaces' ),
-   Settings::get( 'namespaces' )
+   Settings::get( 'namespaces' ),
+   Settings::get( 'excludeNamespaces' )
);
 
$this->injectRC = Settings::get( 'injectRecentChanges' );
@@ -237,7 +237,10 @@
$minor = true;
$bot = true;
 
+   $ids = array();
+
foreach ( $changes as $change ) {
+   $ids[] = $change->getId();
$meta = $change->getMetadata();
 
$minor &= isset( $meta['minor'] ) && 
(bool)$meta['minor'];
@@ -289,6 +292,7 @@
) );
 
$info = $change->hasField( 'info' ) ? $change->getField( 'info' 
) : array();
+   $info['change-ids'] = $ids;
$info['changes'] = $changes;
$change->setField( 'info', $info );
 
@@ -397,6 +401,10 @@
}
 
usort( $coalesced, 
'Wikibase\ChangeHandler::compareChangesByTimestamp' );
+
+   wfDebugLog( __CLASS__, __METHOD__ . ": coalesced "
+   . count( $changes ) . " into " . count( $coalesced ) . 
" changes"  );
+
return $coalesced;
}
 
@@ -466,7 +474,10 @@
 */
public function handleChange( Change $change ) {
wfProfileIn( __METHOD__ );
-   wfDebugLog( __CLASS__, __FUNCTION__ . ": handling change #" . 
$change->getId() );
+
+   $chid = self::getChangeIdForLog( $change );
+   wfDebugLog( __CLASS__, __FUNCTION__ . ": handling change #$chid"
+   . " (" . $change->getType() . ")" );
 
//TODO: Actions may be per-title, depending on how the change 
applies to that page.
//  We'll need on list of titles per action.
@@ -474,6 +485,7 @@
 
if ( $actions === 0 ) {
// nothing to do
+   wfDebugLog( __CLASS__, __FUNCTION__ . ": No actions to 
take for change #$chid." );
wfProfileOut( __METHOD__ );
return false;
}
@@ -487,11 +499,13 @@
 
if ( empty( $titlesToUpdate ) ) {
// nothing to do
+   wfDebugLog( __CLASS__, __FUNCTION__ . ": No pages to 
update for change #$chid." );
wfProfileOut( __METHOD__ );
return false;
}
 
-   wfDebugLog( __CLASS__, __FUNCTION__ . ": " . count( 
$titlesToUpdate ) . " pages to update." );
+   wfDebugLog( __CLASS__, __FUNCTION__ . ": updating " . count( 
$titlesToUpdate )
+   . " pages (actions: " . dechex( $actions ). ") for 
change #$chid." );
 
$this->updatePages( $change, $actions, $titlesToUpdate );
 
@@ -597,7 +611,7 @@
if ( $rcAttribs !== false ) {
$this->updater->injectRCRecord( $title, 
$rcAttribs );
} else {
-   trigger_error( "change #" . 
$change->getId() . " did not provide RC info", E_USER_WARNING );
+   trigger_error( "change #" . 
self::getChangeIdForLog( $change ) . " did not provide RC info", E_USER_WARNING 
);
}
}
 
@@ -606,6 +620,26 @@
}
 
wfProfileOut( __METHOD__ );
+   }
+
+   /**
+* Returns a human readable change ID, containing multiple IDs in case 
of a
+   

[MediaWiki-commits] [Gerrit] rebuildTermSearchKey should wait for slaves. - change (mediawiki...Wikibase)

2013-03-20 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: rebuildTermSearchKey should wait for slaves.
..


rebuildTermSearchKey should wait for slaves.

rebuildTermSearchKey should sleep if slaves get lagged, in order
to avoid locking the database because slaves get too far behind.

Change-Id: I9eb2735b688f80e7319c2b73c56cbf6c1ba54fcc
Note: This should be backported to the wmf12 branch.
---
M repo/includes/store/sql/TermSearchKeyBuilder.php
1 file changed, 27 insertions(+), 0 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved
  jenkins-bot: Checked



diff --git a/repo/includes/store/sql/TermSearchKeyBuilder.php 
b/repo/includes/store/sql/TermSearchKeyBuilder.php
index f6e6248..5c299b4 100644
--- a/repo/includes/store/sql/TermSearchKeyBuilder.php
+++ b/repo/includes/store/sql/TermSearchKeyBuilder.php
@@ -147,6 +147,10 @@
$total = 0;
 
while ( true ) {
+   // Make sure we are not running too far ahead of the 
slaves,
+   // as that would cause the site to be rendered read 
only.
+   $this->waitForSlaves( $dbw );
+
$dbw->begin();
 
$terms = $dbw->select(
@@ -191,6 +195,29 @@
}
 
/**
+* Wait for slaves (quietly)
+*
+* @todo: this should be in the Database class.
+* @todo: thresholds should be configurable
+*
+* @author Tim Starling (stolen from recompressTracked.php)
+*/
+   protected function waitForSlaves() {
+   $lb = wfGetLB(); //TODO: allow foreign DB, get from $this->table
+
+   while ( true ) {
+   list( $host, $maxLag ) = $lb->getMaxLag();
+   if ( $maxLag < 2 ) {
+   break;
+   }
+
+   $this->report( "Slaves are lagged by $maxLag seconds, 
sleeping..." );
+   sleep( 5 );
+   $this->report( "Resuming..." );
+   }
+   }
+
+   /**
 * Updates a single row with a newley calculated search key.
 * The search key is calculated using Term::normalizeText().
 *

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9eb2735b688f80e7319c2b73c56cbf6c1ba54fcc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.21-wmf12
Gerrit-Owner: Anja Jentzsch 
Gerrit-Reviewer: Anja Jentzsch 
Gerrit-Reviewer: Daniel Kinzler 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] rebuildTermSearchKey should wait for slaves. - change (mediawiki...Wikibase)

2013-03-20 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has uploaded a new change for review.

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


Change subject: rebuildTermSearchKey should wait for slaves.
..

rebuildTermSearchKey should wait for slaves.

rebuildTermSearchKey should sleep if slaves get lagged, in order
to avoid locking the database because slaves get too far behind.

Change-Id: I9eb2735b688f80e7319c2b73c56cbf6c1ba54fcc
Note: This should be backported to the wmf12 branch.
---
M repo/includes/store/sql/TermSearchKeyBuilder.php
1 file changed, 27 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/49/54849/1

diff --git a/repo/includes/store/sql/TermSearchKeyBuilder.php 
b/repo/includes/store/sql/TermSearchKeyBuilder.php
index f6e6248..5c299b4 100644
--- a/repo/includes/store/sql/TermSearchKeyBuilder.php
+++ b/repo/includes/store/sql/TermSearchKeyBuilder.php
@@ -147,6 +147,10 @@
$total = 0;
 
while ( true ) {
+   // Make sure we are not running too far ahead of the 
slaves,
+   // as that would cause the site to be rendered read 
only.
+   $this->waitForSlaves( $dbw );
+
$dbw->begin();
 
$terms = $dbw->select(
@@ -191,6 +195,29 @@
}
 
/**
+* Wait for slaves (quietly)
+*
+* @todo: this should be in the Database class.
+* @todo: thresholds should be configurable
+*
+* @author Tim Starling (stolen from recompressTracked.php)
+*/
+   protected function waitForSlaves() {
+   $lb = wfGetLB(); //TODO: allow foreign DB, get from $this->table
+
+   while ( true ) {
+   list( $host, $maxLag ) = $lb->getMaxLag();
+   if ( $maxLag < 2 ) {
+   break;
+   }
+
+   $this->report( "Slaves are lagged by $maxLag seconds, 
sleeping..." );
+   sleep( 5 );
+   $this->report( "Resuming..." );
+   }
+   }
+
+   /**
 * Updates a single row with a newley calculated search key.
 * The search key is calculated using Term::normalizeText().
 *

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9eb2735b688f80e7319c2b73c56cbf6c1ba54fcc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.21-wmf12
Gerrit-Owner: Anja Jentzsch 
Gerrit-Reviewer: Daniel Kinzler 

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


[MediaWiki-commits] [Gerrit] (hotfix) PropertyParserFunction should be non-experimental - change (mediawiki...Wikibase)

2013-03-20 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: (hotfix) PropertyParserFunction should be non-experimental
..


(hotfix) PropertyParserFunction should be non-experimental

- leaving that in experimental will cause an
  Internal error
  Tag hook for property is not callable
  on the client when experimental-mode is switched off

Change-Id: I9964d0eb4a86508a3ff6e1db1fd4a4247e39f070
---
M client/WikibaseClient.php
M client/config/WikibaseClient.experimental.php
2 files changed, 1 insertion(+), 3 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved
  jenkins-bot: Checked



diff --git a/client/WikibaseClient.php b/client/WikibaseClient.php
index 2240344..a99517f 100644
--- a/client/WikibaseClient.php
+++ b/client/WikibaseClient.php
@@ -80,6 +80,7 @@
 // include/parserhooks
 $wgAutoloadClasses['Wikibase\NoLangLinkHandler']= $dir . 
'includes/parserhooks/NoLangLinkHandler.php';
 $wgAutoloadClasses['Wikibase\ParserErrorMessageFormatter'] = $dir . 
'includes/parserhooks/ParserErrorMessageFormatter.php';
+$wgAutoloadClasses['Wikibase\PropertyParserFunction'] = $dir . 
'includes/parserhooks/PropertyParserFunction.php';
 
 // includes/recentchanges
 $wgAutoloadClasses['Wikibase\ExternalChangesLine'] = $dir . 
'includes/recentchanges/ExternalChangesLine.php';
diff --git a/client/config/WikibaseClient.experimental.php 
b/client/config/WikibaseClient.experimental.php
index 4646a00..4157126 100644
--- a/client/config/WikibaseClient.experimental.php
+++ b/client/config/WikibaseClient.experimental.php
@@ -33,9 +33,6 @@
die( 'Not an entry point.' );
 }
 
-// includes/parserhooks
-$wgAutoloadClasses['Wikibase\PropertyParserFunction'] = $dir . 
'includes/parserhooks/PropertyParserFunction.php';
-
 // Sporious code from a merge conflict, but should probably be left in due to 
line above
 //$wgHooks['ParserFirstCallInit'][] = function( \Parser &$parser ) {
 // $parser->setFunctionHook( 'property', array( 
'\Wikibase\PropertyParserFunction', 'render' ) );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9964d0eb4a86508a3ff6e1db1fd4a4247e39f070
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.21-wmf12
Gerrit-Owner: Anja Jentzsch 
Gerrit-Reviewer: Anja Jentzsch 
Gerrit-Reviewer: Tobias Gritschacher 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] (hotfix) PropertyParserFunction should be non-experimental - change (mediawiki...Wikibase)

2013-03-20 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has uploaded a new change for review.

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


Change subject: (hotfix) PropertyParserFunction should be non-experimental
..

(hotfix) PropertyParserFunction should be non-experimental

- leaving that in experimental will cause an
  Internal error
  Tag hook for property is not callable
  on the client when experimental-mode is switched off

Change-Id: I9964d0eb4a86508a3ff6e1db1fd4a4247e39f070
---
M client/WikibaseClient.php
M client/config/WikibaseClient.experimental.php
2 files changed, 1 insertion(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/48/54848/1

diff --git a/client/WikibaseClient.php b/client/WikibaseClient.php
index 2240344..a99517f 100644
--- a/client/WikibaseClient.php
+++ b/client/WikibaseClient.php
@@ -80,6 +80,7 @@
 // include/parserhooks
 $wgAutoloadClasses['Wikibase\NoLangLinkHandler']= $dir . 
'includes/parserhooks/NoLangLinkHandler.php';
 $wgAutoloadClasses['Wikibase\ParserErrorMessageFormatter'] = $dir . 
'includes/parserhooks/ParserErrorMessageFormatter.php';
+$wgAutoloadClasses['Wikibase\PropertyParserFunction'] = $dir . 
'includes/parserhooks/PropertyParserFunction.php';
 
 // includes/recentchanges
 $wgAutoloadClasses['Wikibase\ExternalChangesLine'] = $dir . 
'includes/recentchanges/ExternalChangesLine.php';
diff --git a/client/config/WikibaseClient.experimental.php 
b/client/config/WikibaseClient.experimental.php
index 4646a00..4157126 100644
--- a/client/config/WikibaseClient.experimental.php
+++ b/client/config/WikibaseClient.experimental.php
@@ -33,9 +33,6 @@
die( 'Not an entry point.' );
 }
 
-// includes/parserhooks
-$wgAutoloadClasses['Wikibase\PropertyParserFunction'] = $dir . 
'includes/parserhooks/PropertyParserFunction.php';
-
 // Sporious code from a merge conflict, but should probably be left in due to 
line above
 //$wgHooks['ParserFirstCallInit'][] = function( \Parser &$parser ) {
 // $parser->setFunctionHook( 'property', array( 
'\Wikibase\PropertyParserFunction', 'render' ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9964d0eb4a86508a3ff6e1db1fd4a4247e39f070
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.21-wmf12
Gerrit-Owner: Anja Jentzsch 
Gerrit-Reviewer: Tobias Gritschacher 

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


[MediaWiki-commits] [Gerrit] Use the watchlist options given by the hook - change (mediawiki...Wikibase)

2013-03-20 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: Use the watchlist options given by the hook
..


Use the watchlist options given by the hook

instead of extracting them from wgRequest and wgUser

(Requires I688ab0b35b301f180bbfde3ad3043b1ee602de10)

Change-Id: I2e27df0528f1ca94043bb8cb6229894839da235e
---
M client/WikibaseClient.hooks.php
1 file changed, 3 insertions(+), 2 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved



diff --git a/client/WikibaseClient.hooks.php b/client/WikibaseClient.hooks.php
index 845a7e2..c24c84a 100644
--- a/client/WikibaseClient.hooks.php
+++ b/client/WikibaseClient.hooks.php
@@ -476,10 +476,11 @@
 * @param array &$tables
 * @param array &$join_conds
 * @param array &$fields
+* @param array $values
 *
 * @return bool
 */
-   public static function onSpecialWatchlistQuery( array &$conds, array 
&$tables, array &$join_conds, array &$fields ) {
+   public static function onSpecialWatchlistQuery( array &$conds, array 
&$tables, array &$join_conds, array &$fields, array $values ) {
global $wgRequest, $wgUser;
 
wfProfileIn( __METHOD__ );
@@ -488,7 +489,7 @@
// Don't act on activated enhanced watchlist
$wgRequest->getBool( 'enhanced', $wgUser->getOption( 
'usenewrc' ) ) === false &&
// Or in case the user disabled it
-   $wgRequest->getBool( 'hideWikibase', 
!$wgUser->getOption( 'wlshowwikibase' ) ) === false
+   $values['hideWikibase'] === 0
) {
$dbr = wfGetDB( DB_SLAVE );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2e27df0528f1ca94043bb8cb6229894839da235e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.21-wmf12
Gerrit-Owner: Anja Jentzsch 
Gerrit-Reviewer: Anja Jentzsch 
Gerrit-Reviewer: Hoo man 

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


[MediaWiki-commits] [Gerrit] Use the watchlist options given by the hook - change (mediawiki...Wikibase)

2013-03-20 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has uploaded a new change for review.

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


Change subject: Use the watchlist options given by the hook
..

Use the watchlist options given by the hook

instead of extracting them from wgRequest and wgUser

(Requires I688ab0b35b301f180bbfde3ad3043b1ee602de10)

Change-Id: I2e27df0528f1ca94043bb8cb6229894839da235e
---
M client/WikibaseClient.hooks.php
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/47/54847/1

diff --git a/client/WikibaseClient.hooks.php b/client/WikibaseClient.hooks.php
index 845a7e2..c24c84a 100644
--- a/client/WikibaseClient.hooks.php
+++ b/client/WikibaseClient.hooks.php
@@ -476,10 +476,11 @@
 * @param array &$tables
 * @param array &$join_conds
 * @param array &$fields
+* @param array $values
 *
 * @return bool
 */
-   public static function onSpecialWatchlistQuery( array &$conds, array 
&$tables, array &$join_conds, array &$fields ) {
+   public static function onSpecialWatchlistQuery( array &$conds, array 
&$tables, array &$join_conds, array &$fields, array $values ) {
global $wgRequest, $wgUser;
 
wfProfileIn( __METHOD__ );
@@ -488,7 +489,7 @@
// Don't act on activated enhanced watchlist
$wgRequest->getBool( 'enhanced', $wgUser->getOption( 
'usenewrc' ) ) === false &&
// Or in case the user disabled it
-   $wgRequest->getBool( 'hideWikibase', 
!$wgUser->getOption( 'wlshowwikibase' ) ) === false
+   $values['hideWikibase'] === 0
) {
$dbr = wfGetDB( DB_SLAVE );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2e27df0528f1ca94043bb8cb6229894839da235e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.21-wmf12
Gerrit-Owner: Anja Jentzsch 
Gerrit-Reviewer: Hoo man 

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


[MediaWiki-commits] [Gerrit] (testing) waiting in Selenium tests for propagation of remov... - change (mediawiki...Wikibase)

2013-03-20 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: (testing) waiting in Selenium tests for propagation of removed 
sitelinks
..


(testing) waiting in Selenium tests for propagation of removed sitelinks

Change-Id: I93e95934fffd9fef580067e621f31d509689da5d
---
M client/tests/selenium/interwiki/client_repo_spec.rb
1 file changed, 15 insertions(+), 0 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved
  jenkins-bot: Checked



diff --git a/client/tests/selenium/interwiki/client_repo_spec.rb 
b/client/tests/selenium/interwiki/client_repo_spec.rb
index d258ef4..bf2e095 100644
--- a/client/tests/selenium/interwiki/client_repo_spec.rb
+++ b/client/tests/selenium/interwiki/client_repo_spec.rb
@@ -252,8 +252,23 @@
 it "should check that no sitelinks are displayed for article a & b" do
   on_page(ClientPage) do |page|
 page.navigate_to_article(article_title_a)
+# tooks soome time until the removing of all the sitelinks show up
+sleep 2
+@browser.refresh
+page.interwiki_de?.should be_false
+page.interwiki_it?.should be_false
+page.interwiki_fi?.should be_false
+page.interwiki_hu?.should be_false
+page.interwiki_fr?.should be_false
+page.interwiki_en?.should be_false
 page.interwiki_xxx?.should be_false
 page.navigate_to_article(article_title_b)
+page.interwiki_de?.should be_false
+page.interwiki_it?.should be_false
+page.interwiki_fi?.should be_false
+page.interwiki_hu?.should be_false
+page.interwiki_fr?.should be_false
+page.interwiki_en?.should be_false
 page.interwiki_xxx?.should be_false
   end
 end

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I93e95934fffd9fef580067e621f31d509689da5d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.21-wmf12
Gerrit-Owner: Anja Jentzsch 
Gerrit-Reviewer: Anja Jentzsch 
Gerrit-Reviewer: Tobias Gritschacher 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] (bug 45037) show edit link only if we have repo links - change (mediawiki...Wikibase)

2013-03-20 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: (bug 45037) show edit link only if we have repo links
..


(bug 45037) show edit link only if we have repo links

This also fixes bug 44536 to have Q### links instead of link via 
Special:ItemByTitle

This patch adds parser output and output page properties that indicate:

1) wikibase_item: the associated prefixed item id

This is used by the skin in constructing the "edit links" link directly to the 
Q### page,
or to know if a page is connected to the wikibase repo.

Then it's easier and more efficient for the code to determine whether or not to
add "edit links" link and build the link to the associated item.

Change-Id: I97cc9378477953bddebd04840871964f31ef1b7f
---
M client/WikibaseClient.hooks.php
M client/WikibaseClient.php
D client/includes/ClientUtils.php
A client/includes/EntityIdPropertyUpdater.php
M client/includes/LangLinkHandler.php
A client/includes/RepoLinker.php
M client/includes/recentchanges/ExternalChangesLine.php
D client/tests/phpunit/includes/ClientUtilsTest.php
M client/tests/phpunit/includes/LangLinkHandlerTest.php
A client/tests/phpunit/includes/RepoLinkerTest.php
M lib/tests/phpunit/MockRepository.php
11 files changed, 783 insertions(+), 231 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved
  jenkins-bot: Checked



diff --git a/client/WikibaseClient.hooks.php b/client/WikibaseClient.hooks.php
index 1396a58..fe85a76 100644
--- a/client/WikibaseClient.hooks.php
+++ b/client/WikibaseClient.hooks.php
@@ -80,7 +80,7 @@
 
'includes/CachedEntity',
'includes/ChangeHandler',
-   'includes/ClientUtils',
+   'includes/RepoLinker',
'includes/EntityCacheUpdater',
 
'includes/api/ApiClientInfo',
@@ -380,8 +380,15 @@
);
 
if ( $itemId !== false ) {
-   $itemByTitle = 'Special:ItemByTitle/' . $globalId . '/' 
. wfUrlencode( $oldTitle->getPrefixedDBkey() );
-   $itemByTitleLink = ClientUtils::repoArticleUrl( 
$itemByTitle );
+   $repoLinker = new RepoLinker(
+   Settings::get( 'repoUrl' ),
+   Settings::get( 'repoArticlePath' ),
+   Settings::get( 'repoScriptPath' ),
+   Settings::get( 'repoNamespaces' )
+   );
+
+   $itemByTitle = 'Special:ItemByTitle/' . $globalId . '/' 
. $oldTitle->getPrefixedDBkey();
+   $itemByTitleLink = $repoLinker->repoArticleUrl( 
$itemByTitle );
$out = $movePage->getOutput();
$out->addModules( 'wikibase.client.page-move' );
$out->addHTML(
@@ -619,12 +626,43 @@
}
 
/**
+* Add output page property if repo links are suppressed, and property 
for item id
+*
+* @since 0.4
+*
+* @param \OutputPage &$out
+* @param \ParserOutput $pout
+*
+* @return bool
+*/
+   public static function onOutputPageParserOutput( \OutputPage &$out, 
\ParserOutput $pout ) {
+   $langLinkHandler = new LangLinkHandler(
+   Settings::get( 'siteGlobalID' ),
+   Settings::get( 'namespaces' ),
+   Settings::get( 'excludeNamespaces' ),
+   ClientStoreFactory::getStore()->newSiteLinkTable(),
+   \Sites::singleton() );
+
+   $noExternalLangLinks = 
$langLinkHandler->getNoExternalLangLinks( $pout );
+   if ( $noExternalLangLinks !== array() ) {
+   $out->setProperty( 'noexternallanglinks', 
$noExternalLangLinks );
+   }
+
+   $itemId = $pout->getProperty( 'wikibase_item' );
+   if ( $itemId !== false ) {
+   $out->setProperty( 'wikibase_item', $itemId );
+   }
+
+   return true;
+   }
+
+   /**
 * Displays a list of links to pages on the central wiki at the end of 
the language box.
+*
+* @since 0.1
 *
 * @param \Skin $skin
 * @param \QuickTemplate $template
-*
-* @since 0.1
 *
 * @return bool
 */
@@ -632,34 +670,45 @@
wfProfileIn( __METHOD__ );
 
$title = $skin->getContext()->getTitle();
-   if ( !in_array( $title->getNamespace(), Settings::get( 
'excludeNamespaces' ) ) && $title->exists() ) {
+   $namespaceChecker = new NamespaceChecker(
+   Settings::get( 'excludeNamespaces' ),
+   Settings::get( 'namespaces' )
+   );
 
+   if ( $title->exis

[MediaWiki-commits] [Gerrit] (Bug 44536, Bug 44968) Use SiteLink instead of Title - change (mediawiki...Wikibase)

2013-03-20 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: (Bug 44536, Bug 44968) Use SiteLink instead of Title
..


(Bug 44536, Bug 44968) Use SiteLink instead of Title

This changeset uses the local names on the namesaces, with the
additional overhead that creates. To avoid some of the trouble
that creates the special page uses a short but important
setSquidMaxage(10).

Patchset 14: Changes according to Daniels wishes
Patchset 15: Rebased
Patchset 16: Some changes to trim and normalize both site and page

Change-Id: I1176f839579f936cecf177310431c1192a74dad8
---
M repo/config/Wikibase.default.php
M repo/config/Wikibase.example.php
M repo/includes/specials/SpecialItemByTitle.php
3 files changed, 32 insertions(+), 24 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved
  jenkins-bot: Checked



diff --git a/repo/config/Wikibase.default.php b/repo/config/Wikibase.default.php
index 5fbac75..113d418 100644
--- a/repo/config/Wikibase.default.php
+++ b/repo/config/Wikibase.default.php
@@ -73,3 +73,6 @@
 );
 
 $wgWBRepoSettings['multilang-truncate-length'] = 32;
+
+// Should the page names (titles) be normalized against the external site
+$wgWBRepoSettings['normalizeItemByTitlePageNames'] = false;
diff --git a/repo/config/Wikibase.example.php b/repo/config/Wikibase.example.php
index 7103f4b..3956268 100644
--- a/repo/config/Wikibase.example.php
+++ b/repo/config/Wikibase.example.php
@@ -67,13 +67,16 @@
 
 $wgGroupPermissions['wbeditor']['item-set'] = true;
 
+$wgWBRepoSettings['normalizeItemByTitlePageNames'] = true;
+
+
 if ( defined( 'WB_EXPERIMENTAL_FEATURES' ) ) {
define( 'WB_NS_QUERY', $baseNs + 4 );
define( 'WB_NS_QUERY_TALK', $baseNs + 5 );
 
$wgExtraNamespaces[WB_NS_QUERY] = 'Query';
$wgExtraNamespaces[WB_NS_QUERY_TALK] = 'Query_talk';
-   
+
$wgWBRepoSettings['entityNamespaces'][CONTENT_MODEL_WIKIBASE_QUERY] = 
WB_NS_QUERY;
 }
 
diff --git a/repo/includes/specials/SpecialItemByTitle.php 
b/repo/includes/specials/SpecialItemByTitle.php
index e0897f6..c085971 100644
--- a/repo/includes/specials/SpecialItemByTitle.php
+++ b/repo/includes/specials/SpecialItemByTitle.php
@@ -56,38 +56,40 @@
// Setup
$request = $this->getRequest();
$parts = ( $subPage === '' ) ? array() : explode( '/', 
$subPage, 2 );
-   $siteId = $request->getVal( 'site', isset( $parts[0] ) ? 
$parts[0] : '' );
-   $page = $request->getVal( 'page', isset( $parts[1] ) ? 
$parts[1] : '' );
+   $site = trim( $request->getVal( 'site', isset( $parts[0] ) ? 
$parts[0] : '' ) );
+   $site = str_replace( '_', ' ', $site );
+   $page = trim( $request->getVal( 'page', isset( $parts[1] ) ? 
$parts[1] : '' ) );
+   $page = str_replace( '_', ' ', $page );
 
-   $pageTitle = '';
$itemContent = null;
 
-   if ( !empty( $page ) ) {
-   $title = \Title::newFromText( $page );
-
-   if ( $title !== null ) {
-   $pageTitle = $title->getFullText();
-   } else {
-   // TODO: throw error, page title contains 
invalid chars
-   $pageTitle = '';
+   // If ther are enough data, then try to lookup the item content
+   if ( isset( $site ) && isset( $page ) ) {
+   // Try to get a item content
+   $siteId = \Wikibase\Utils::trimToNFC( str_replace( '_', 
' ', $site ) );
+   $pageName = \Wikibase\Utils::trimToNFC( str_replace( 
'_', ' ', $page ) );
+   $itemHandler = new \Wikibase\ItemHandler();
+   $itemContent = $itemHandler->getFromSiteLink( $siteId, 
$pageName );
+   // Do we have an item content, and if not can we try 
harder?
+   if ( $itemContent === null && \Wikibase\Settings::get( 
'normalizeItemByTitlePageNames' ) === true ) {
+   // Try harder by requesting normalization on 
the external site
+   $site = \SiteSQLStore::newInstance()->getSite( 
$siteId );
+   if ( $site instanceof Site ) {
+   $pageName = $site->normalizePageName( 
$page );
+   $itemContent = 
$itemHandler->getFromSiteLink( $siteId, $pageName );
+   }
}
 
-   // Create an item view
-   if ( isset( $siteId ) && isset( $pageTitle ) ) {
-   $itemHandler = new \Wikibase\ItemHandler();
-   $itemContent = $itemHandler->getFromSiteLink( 
$siteId, $pageTitle );
-
-  

[MediaWiki-commits] [Gerrit] Show/hide the wikibase watchlist entries server side - change (mediawiki...Wikibase)

2013-03-20 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: Show/hide the wikibase watchlist entries server side
..


Show/hide the wikibase watchlist entries server side

(Requires I79811e9f3e7431e3403cf93674667d624d3d4db2)

patchset 8: fixed & improved selenium tests

Change-Id: I267a755a70cdc7d4937ab70364b34e73da780ef0
---
M client/WikibaseClient.hooks.php
M client/WikibaseClient.php
M client/resources/Resources.php
D client/resources/wbclient.watchlist.css
D client/resources/wbclient.watchlist.js
D client/tests/qunit/wbclient.watchlist.tests.js
M client/tests/selenium/special/client_rc_and_wl_spec.rb
M selenium/lib/pages/watchlist_page.rb
8 files changed, 53 insertions(+), 301 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved
  jenkins-bot: Checked



diff --git a/client/WikibaseClient.hooks.php b/client/WikibaseClient.hooks.php
index 1396a58..21badcf 100644
--- a/client/WikibaseClient.hooks.php
+++ b/client/WikibaseClient.hooks.php
@@ -97,32 +97,6 @@
}
 
/**
-* Add new javascript testing modules. This is called after the 
addition of MediaWiki core test suites.
-* @see 
https://www.mediawiki.org/wiki/Manual:Hooks/ResourceLoaderTestModules
-*
-* @since 0.4
-*
-* @param array &$testModules
-* @param \ResourceLoader &$resourceLoader
-*
-* @return boolean
-*/
-public static function onRegisterQUnitTests( array &$testModules, 
\ResourceLoader &$resourceLoader ) {
-   $testModules['qunit']['wikibase.client.watchlist.test'] = array(
-   'scripts' => array(
-   'tests/qunit/wbclient.watchlist.tests.js'
-   ),
-   'dependencies' => array(
-   'wbclient.watchlist',
-   'wbclient.watchlist.css'
-   ),
-   'localBasePath' => __DIR__,
-   'remoteExtPath' => 'Wikibase/client'
-   );
-   return true;
-   }
-
-   /**
 * Deletes all the data stored on the repository.
 *
 * @since 0.2
@@ -503,7 +477,12 @@
 
wfProfileIn( __METHOD__ );
 
-   if ( $wgRequest->getBool( 'enhanced', $wgUser->getOption( 
'usenewrc' ) ) === false ) {
+   if (
+   // Don't act on activated enhanced watchlist
+   $wgRequest->getBool( 'enhanced', $wgUser->getOption( 
'usenewrc' ) ) === false &&
+   // Or in case the user disabled it
+   $wgRequest->getBool( 'hideWikibase', 
!$wgUser->getOption( 'wlshowwikibase' ) ) === false
+   ) {
$dbr = wfGetDB( DB_SLAVE );
 
$newConds = array();
@@ -718,29 +697,6 @@
}
 
/**
-* Adds a JS stuff that provides a toggle for wikibase edits on the 
watchlist
-*
-* @param \SpecialPage $special
-* @param string $subpage
-*
-* @return bool
-*/
-   public static function onSpecialPageBeforeExecute( \SpecialPage 
$special, $subpage ) {
-   if ( $special->getName() === 'Watchlist' ) {
-   $context = $special->getContext();
-
-   if ( $context->getRequest()->getBool( 'enhanced', 
$context->getUser()->getOption( 'usenewrc' ) ) === false ) {
-   $special->getOutput()->addModules( array(
-   'wbclient.watchlist.css',
-   'wbclient.watchlist',
-   ) );
-   }
-   }
-
-   return true;
-   }
-
-   /**
 * Register the parser functions.
 *
 * @param $parser \Parser
@@ -776,4 +732,27 @@
return true;
}
 
+   /**
+* Modifies watchlist options to show a toggle for Wikibase changes
+* @see 
https://www.mediawiki.org/wiki/Manual:Hooks/SpecialWatchlistFilters
+*
+* @since 0.4
+*
+* @param SpecialWatchlist $special
+* @param array $filters
+*
+* @return bool
+*/
+   public static function onSpecialWatchlistFilters( $special, &$filters ) 
{
+   $user = $special->getContext()->getUser();
+
+   if ( $special->getContext()->getRequest()->getBool( 'enhanced', 
$user->getOption( 'usenewrc' ) ) === false ) {
+   // Allow toggling wikibase changes in case the enhanced 
watchlist is disabled
+   $filters['hideWikibase'] = array(
+   'msg' => 'wikibase-rc-hide-wikidata',
+   'default' => !$user->getBoolOption( 
'wlshowwikibase' )
+ 

[MediaWiki-commits] [Gerrit] (testing) waiting in Selenium tests for propagation of remov... - change (mediawiki...Wikibase)

2013-03-20 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has uploaded a new change for review.

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


Change subject: (testing) waiting in Selenium tests for propagation of removed 
sitelinks
..

(testing) waiting in Selenium tests for propagation of removed sitelinks

Change-Id: I93e95934fffd9fef580067e621f31d509689da5d
---
M client/tests/selenium/interwiki/client_repo_spec.rb
1 file changed, 15 insertions(+), 0 deletions(-)


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

diff --git a/client/tests/selenium/interwiki/client_repo_spec.rb 
b/client/tests/selenium/interwiki/client_repo_spec.rb
index d258ef4..bf2e095 100644
--- a/client/tests/selenium/interwiki/client_repo_spec.rb
+++ b/client/tests/selenium/interwiki/client_repo_spec.rb
@@ -252,8 +252,23 @@
 it "should check that no sitelinks are displayed for article a & b" do
   on_page(ClientPage) do |page|
 page.navigate_to_article(article_title_a)
+# tooks soome time until the removing of all the sitelinks show up
+sleep 2
+@browser.refresh
+page.interwiki_de?.should be_false
+page.interwiki_it?.should be_false
+page.interwiki_fi?.should be_false
+page.interwiki_hu?.should be_false
+page.interwiki_fr?.should be_false
+page.interwiki_en?.should be_false
 page.interwiki_xxx?.should be_false
 page.navigate_to_article(article_title_b)
+page.interwiki_de?.should be_false
+page.interwiki_it?.should be_false
+page.interwiki_fi?.should be_false
+page.interwiki_hu?.should be_false
+page.interwiki_fr?.should be_false
+page.interwiki_en?.should be_false
 page.interwiki_xxx?.should be_false
   end
 end

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I93e95934fffd9fef580067e621f31d509689da5d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.21-wmf12
Gerrit-Owner: Anja Jentzsch 
Gerrit-Reviewer: Tobias Gritschacher 

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


[MediaWiki-commits] [Gerrit] (bug 45037) show edit link only if we have repo links - change (mediawiki...Wikibase)

2013-03-20 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has uploaded a new change for review.

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


Change subject: (bug 45037) show edit link only if we have repo links
..

(bug 45037) show edit link only if we have repo links

This also fixes bug 44536 to have Q### links instead of link via 
Special:ItemByTitle

This patch adds parser output and output page properties that indicate:

1) wikibase_item: the associated prefixed item id

This is used by the skin in constructing the "edit links" link directly to the 
Q### page,
or to know if a page is connected to the wikibase repo.

Then it's easier and more efficient for the code to determine whether or not to
add "edit links" link and build the link to the associated item.

Change-Id: I97cc9378477953bddebd04840871964f31ef1b7f
---
M client/WikibaseClient.hooks.php
M client/WikibaseClient.php
D client/includes/ClientUtils.php
A client/includes/EntityIdPropertyUpdater.php
M client/includes/LangLinkHandler.php
A client/includes/RepoLinker.php
M client/includes/recentchanges/ExternalChangesLine.php
D client/tests/phpunit/includes/ClientUtilsTest.php
M client/tests/phpunit/includes/LangLinkHandlerTest.php
A client/tests/phpunit/includes/RepoLinkerTest.php
M lib/tests/phpunit/MockRepository.php
11 files changed, 783 insertions(+), 231 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/39/54839/1

diff --git a/client/WikibaseClient.hooks.php b/client/WikibaseClient.hooks.php
index 1396a58..fe85a76 100644
--- a/client/WikibaseClient.hooks.php
+++ b/client/WikibaseClient.hooks.php
@@ -80,7 +80,7 @@
 
'includes/CachedEntity',
'includes/ChangeHandler',
-   'includes/ClientUtils',
+   'includes/RepoLinker',
'includes/EntityCacheUpdater',
 
'includes/api/ApiClientInfo',
@@ -380,8 +380,15 @@
);
 
if ( $itemId !== false ) {
-   $itemByTitle = 'Special:ItemByTitle/' . $globalId . '/' 
. wfUrlencode( $oldTitle->getPrefixedDBkey() );
-   $itemByTitleLink = ClientUtils::repoArticleUrl( 
$itemByTitle );
+   $repoLinker = new RepoLinker(
+   Settings::get( 'repoUrl' ),
+   Settings::get( 'repoArticlePath' ),
+   Settings::get( 'repoScriptPath' ),
+   Settings::get( 'repoNamespaces' )
+   );
+
+   $itemByTitle = 'Special:ItemByTitle/' . $globalId . '/' 
. $oldTitle->getPrefixedDBkey();
+   $itemByTitleLink = $repoLinker->repoArticleUrl( 
$itemByTitle );
$out = $movePage->getOutput();
$out->addModules( 'wikibase.client.page-move' );
$out->addHTML(
@@ -619,12 +626,43 @@
}
 
/**
+* Add output page property if repo links are suppressed, and property 
for item id
+*
+* @since 0.4
+*
+* @param \OutputPage &$out
+* @param \ParserOutput $pout
+*
+* @return bool
+*/
+   public static function onOutputPageParserOutput( \OutputPage &$out, 
\ParserOutput $pout ) {
+   $langLinkHandler = new LangLinkHandler(
+   Settings::get( 'siteGlobalID' ),
+   Settings::get( 'namespaces' ),
+   Settings::get( 'excludeNamespaces' ),
+   ClientStoreFactory::getStore()->newSiteLinkTable(),
+   \Sites::singleton() );
+
+   $noExternalLangLinks = 
$langLinkHandler->getNoExternalLangLinks( $pout );
+   if ( $noExternalLangLinks !== array() ) {
+   $out->setProperty( 'noexternallanglinks', 
$noExternalLangLinks );
+   }
+
+   $itemId = $pout->getProperty( 'wikibase_item' );
+   if ( $itemId !== false ) {
+   $out->setProperty( 'wikibase_item', $itemId );
+   }
+
+   return true;
+   }
+
+   /**
 * Displays a list of links to pages on the central wiki at the end of 
the language box.
+*
+* @since 0.1
 *
 * @param \Skin $skin
 * @param \QuickTemplate $template
-*
-* @since 0.1
 *
 * @return bool
 */
@@ -632,34 +670,45 @@
wfProfileIn( __METHOD__ );
 
$title = $skin->getContext()->getTitle();
-   if ( !in_array( $title->getNamespace(), Settings::get( 
'excludeNamespaces' ) ) && $title->exists() ) {
+   $namespaceChecker = new NamespaceChecker(
+   Settings::get( 'excludeNamespaces' ),
+   Settings::get( 'namespaces' )
+  

[MediaWiki-commits] [Gerrit] (Bug 44536, Bug 44968) Use SiteLink instead of Title - change (mediawiki...Wikibase)

2013-03-20 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has uploaded a new change for review.

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


Change subject: (Bug 44536, Bug 44968) Use SiteLink instead of Title
..

(Bug 44536, Bug 44968) Use SiteLink instead of Title

This changeset uses the local names on the namesaces, with the
additional overhead that creates. To avoid some of the trouble
that creates the special page uses a short but important
setSquidMaxage(10).

Patchset 14: Changes according to Daniels wishes
Patchset 15: Rebased
Patchset 16: Some changes to trim and normalize both site and page

Change-Id: I1176f839579f936cecf177310431c1192a74dad8
---
M repo/config/Wikibase.default.php
M repo/config/Wikibase.example.php
M repo/includes/specials/SpecialItemByTitle.php
3 files changed, 32 insertions(+), 24 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/37/54837/1

diff --git a/repo/config/Wikibase.default.php b/repo/config/Wikibase.default.php
index 5fbac75..113d418 100644
--- a/repo/config/Wikibase.default.php
+++ b/repo/config/Wikibase.default.php
@@ -73,3 +73,6 @@
 );
 
 $wgWBRepoSettings['multilang-truncate-length'] = 32;
+
+// Should the page names (titles) be normalized against the external site
+$wgWBRepoSettings['normalizeItemByTitlePageNames'] = false;
diff --git a/repo/config/Wikibase.example.php b/repo/config/Wikibase.example.php
index 7103f4b..3956268 100644
--- a/repo/config/Wikibase.example.php
+++ b/repo/config/Wikibase.example.php
@@ -67,13 +67,16 @@
 
 $wgGroupPermissions['wbeditor']['item-set'] = true;
 
+$wgWBRepoSettings['normalizeItemByTitlePageNames'] = true;
+
+
 if ( defined( 'WB_EXPERIMENTAL_FEATURES' ) ) {
define( 'WB_NS_QUERY', $baseNs + 4 );
define( 'WB_NS_QUERY_TALK', $baseNs + 5 );
 
$wgExtraNamespaces[WB_NS_QUERY] = 'Query';
$wgExtraNamespaces[WB_NS_QUERY_TALK] = 'Query_talk';
-   
+
$wgWBRepoSettings['entityNamespaces'][CONTENT_MODEL_WIKIBASE_QUERY] = 
WB_NS_QUERY;
 }
 
diff --git a/repo/includes/specials/SpecialItemByTitle.php 
b/repo/includes/specials/SpecialItemByTitle.php
index e0897f6..c085971 100644
--- a/repo/includes/specials/SpecialItemByTitle.php
+++ b/repo/includes/specials/SpecialItemByTitle.php
@@ -56,38 +56,40 @@
// Setup
$request = $this->getRequest();
$parts = ( $subPage === '' ) ? array() : explode( '/', 
$subPage, 2 );
-   $siteId = $request->getVal( 'site', isset( $parts[0] ) ? 
$parts[0] : '' );
-   $page = $request->getVal( 'page', isset( $parts[1] ) ? 
$parts[1] : '' );
+   $site = trim( $request->getVal( 'site', isset( $parts[0] ) ? 
$parts[0] : '' ) );
+   $site = str_replace( '_', ' ', $site );
+   $page = trim( $request->getVal( 'page', isset( $parts[1] ) ? 
$parts[1] : '' ) );
+   $page = str_replace( '_', ' ', $page );
 
-   $pageTitle = '';
$itemContent = null;
 
-   if ( !empty( $page ) ) {
-   $title = \Title::newFromText( $page );
-
-   if ( $title !== null ) {
-   $pageTitle = $title->getFullText();
-   } else {
-   // TODO: throw error, page title contains 
invalid chars
-   $pageTitle = '';
+   // If ther are enough data, then try to lookup the item content
+   if ( isset( $site ) && isset( $page ) ) {
+   // Try to get a item content
+   $siteId = \Wikibase\Utils::trimToNFC( str_replace( '_', 
' ', $site ) );
+   $pageName = \Wikibase\Utils::trimToNFC( str_replace( 
'_', ' ', $page ) );
+   $itemHandler = new \Wikibase\ItemHandler();
+   $itemContent = $itemHandler->getFromSiteLink( $siteId, 
$pageName );
+   // Do we have an item content, and if not can we try 
harder?
+   if ( $itemContent === null && \Wikibase\Settings::get( 
'normalizeItemByTitlePageNames' ) === true ) {
+   // Try harder by requesting normalization on 
the external site
+   $site = \SiteSQLStore::newInstance()->getSite( 
$siteId );
+   if ( $site instanceof Site ) {
+   $pageName = $site->normalizePageName( 
$page );
+   $itemContent = 
$itemHandler->getFromSiteLink( $siteId, $pageName );
+   }
}
 
-   // Create an item view
-   if ( isset( $siteId ) && isset( $pageTitle ) ) {
-   $itemHandler = new \Wikibase\ItemHandler();
-   $itemContent = $itemHandler->getFromSiteLink( 
$siteId, $pag

[MediaWiki-commits] [Gerrit] Show/hide the wikibase watchlist entries server side - change (mediawiki...Wikibase)

2013-03-20 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has uploaded a new change for review.

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


Change subject: Show/hide the wikibase watchlist entries server side
..

Show/hide the wikibase watchlist entries server side

(Requires I79811e9f3e7431e3403cf93674667d624d3d4db2)

patchset 8: fixed & improved selenium tests

Change-Id: I267a755a70cdc7d4937ab70364b34e73da780ef0
---
M client/WikibaseClient.hooks.php
M client/WikibaseClient.php
M client/resources/Resources.php
D client/resources/wbclient.watchlist.css
D client/resources/wbclient.watchlist.js
D client/tests/qunit/wbclient.watchlist.tests.js
M client/tests/selenium/special/client_rc_and_wl_spec.rb
M selenium/lib/pages/watchlist_page.rb
8 files changed, 53 insertions(+), 301 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/36/54836/1

diff --git a/client/WikibaseClient.hooks.php b/client/WikibaseClient.hooks.php
index 1396a58..21badcf 100644
--- a/client/WikibaseClient.hooks.php
+++ b/client/WikibaseClient.hooks.php
@@ -97,32 +97,6 @@
}
 
/**
-* Add new javascript testing modules. This is called after the 
addition of MediaWiki core test suites.
-* @see 
https://www.mediawiki.org/wiki/Manual:Hooks/ResourceLoaderTestModules
-*
-* @since 0.4
-*
-* @param array &$testModules
-* @param \ResourceLoader &$resourceLoader
-*
-* @return boolean
-*/
-public static function onRegisterQUnitTests( array &$testModules, 
\ResourceLoader &$resourceLoader ) {
-   $testModules['qunit']['wikibase.client.watchlist.test'] = array(
-   'scripts' => array(
-   'tests/qunit/wbclient.watchlist.tests.js'
-   ),
-   'dependencies' => array(
-   'wbclient.watchlist',
-   'wbclient.watchlist.css'
-   ),
-   'localBasePath' => __DIR__,
-   'remoteExtPath' => 'Wikibase/client'
-   );
-   return true;
-   }
-
-   /**
 * Deletes all the data stored on the repository.
 *
 * @since 0.2
@@ -503,7 +477,12 @@
 
wfProfileIn( __METHOD__ );
 
-   if ( $wgRequest->getBool( 'enhanced', $wgUser->getOption( 
'usenewrc' ) ) === false ) {
+   if (
+   // Don't act on activated enhanced watchlist
+   $wgRequest->getBool( 'enhanced', $wgUser->getOption( 
'usenewrc' ) ) === false &&
+   // Or in case the user disabled it
+   $wgRequest->getBool( 'hideWikibase', 
!$wgUser->getOption( 'wlshowwikibase' ) ) === false
+   ) {
$dbr = wfGetDB( DB_SLAVE );
 
$newConds = array();
@@ -718,29 +697,6 @@
}
 
/**
-* Adds a JS stuff that provides a toggle for wikibase edits on the 
watchlist
-*
-* @param \SpecialPage $special
-* @param string $subpage
-*
-* @return bool
-*/
-   public static function onSpecialPageBeforeExecute( \SpecialPage 
$special, $subpage ) {
-   if ( $special->getName() === 'Watchlist' ) {
-   $context = $special->getContext();
-
-   if ( $context->getRequest()->getBool( 'enhanced', 
$context->getUser()->getOption( 'usenewrc' ) ) === false ) {
-   $special->getOutput()->addModules( array(
-   'wbclient.watchlist.css',
-   'wbclient.watchlist',
-   ) );
-   }
-   }
-
-   return true;
-   }
-
-   /**
 * Register the parser functions.
 *
 * @param $parser \Parser
@@ -776,4 +732,27 @@
return true;
}
 
+   /**
+* Modifies watchlist options to show a toggle for Wikibase changes
+* @see 
https://www.mediawiki.org/wiki/Manual:Hooks/SpecialWatchlistFilters
+*
+* @since 0.4
+*
+* @param SpecialWatchlist $special
+* @param array $filters
+*
+* @return bool
+*/
+   public static function onSpecialWatchlistFilters( $special, &$filters ) 
{
+   $user = $special->getContext()->getUser();
+
+   if ( $special->getContext()->getRequest()->getBool( 'enhanced', 
$user->getOption( 'usenewrc' ) ) === false ) {
+   // Allow toggling wikibase changes in case the enhanced 
watchlist is disabled
+   $filters['hideWikibase'] = array(
+   'msg' => 'wikibase-rc-hide-wikidata',
+   'default' => !$user->ge

[MediaWiki-commits] [Gerrit] (testing) adjusted selenium test to check for changed error msg - change (mediawiki...Wikibase)

2013-03-19 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: (testing) adjusted selenium test to check for changed error msg
..


(testing) adjusted selenium test to check for changed error msg

- error message for edit conflicts has changed, so test needs to be
  adjusted

Change-Id: Ib69f231c1057845ef15e0b099c1412fd0c70c7e3
---
M repo/tests/selenium/item/edit_conflict_spec.rb
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved
  jenkins-bot: Checked



diff --git a/repo/tests/selenium/item/edit_conflict_spec.rb 
b/repo/tests/selenium/item/edit_conflict_spec.rb
index 2cb5e50..f00fc0a 100644
--- a/repo/tests/selenium/item/edit_conflict_spec.rb
+++ b/repo/tests/selenium/item/edit_conflict_spec.rb
@@ -14,7 +14,7 @@
 description_user2 = description + " changed by user 2!"
 alias_a = generate_random_string(5)
 sitelinks = ["it", "Pizza"]
-edit_conflict_msg = "Edit not allowed: Edit conflict."
+edit_conflict_msg = "Edit conflict."
 old_revid = 0
 
 describe "Check edit-conflicts" do

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib69f231c1057845ef15e0b099c1412fd0c70c7e3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.21-wmf12
Gerrit-Owner: Anja Jentzsch 
Gerrit-Reviewer: Anja Jentzsch 
Gerrit-Reviewer: Tobias Gritschacher 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] (testing) adjusted selenium test to check for changed error msg - change (mediawiki...Wikibase)

2013-03-19 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has uploaded a new change for review.

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


Change subject: (testing) adjusted selenium test to check for changed error msg
..

(testing) adjusted selenium test to check for changed error msg

- error message for edit conflicts has changed, so test needs to be
  adjusted

Change-Id: Ib69f231c1057845ef15e0b099c1412fd0c70c7e3
---
M repo/tests/selenium/item/edit_conflict_spec.rb
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/87/54687/1

diff --git a/repo/tests/selenium/item/edit_conflict_spec.rb 
b/repo/tests/selenium/item/edit_conflict_spec.rb
index 2cb5e50..f00fc0a 100644
--- a/repo/tests/selenium/item/edit_conflict_spec.rb
+++ b/repo/tests/selenium/item/edit_conflict_spec.rb
@@ -14,7 +14,7 @@
 description_user2 = description + " changed by user 2!"
 alias_a = generate_random_string(5)
 sitelinks = ["it", "Pizza"]
-edit_conflict_msg = "Edit not allowed: Edit conflict."
+edit_conflict_msg = "Edit conflict."
 old_revid = 0
 
 describe "Check edit-conflicts" do

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib69f231c1057845ef15e0b099c1412fd0c70c7e3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.21-wmf12
Gerrit-Owner: Anja Jentzsch 
Gerrit-Reviewer: Tobias Gritschacher 

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


[MediaWiki-commits] [Gerrit] Using toggle_reference_section in statements Selenium tests - change (mediawiki...Wikibase)

2013-03-19 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: Using toggle_reference_section in statements Selenium tests
..


Using toggle_reference_section in statements Selenium tests

The method "wait_for_referencesToggle" has been removed in a previous change 
set.
It has been replaced by "toggle_references_section".

Change-Id: Ib6abb24483b70a877be177eab8f0f72ca6e207c4
---
M repo/tests/selenium/statements/statements_deleted_prop_spec.rb
1 file changed, 2 insertions(+), 4 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved
  jenkins-bot: Checked



diff --git a/repo/tests/selenium/statements/statements_deleted_prop_spec.rb 
b/repo/tests/selenium/statements/statements_deleted_prop_spec.rb
index f6eab06..1cc767c 100644
--- a/repo/tests/selenium/statements/statements_deleted_prop_spec.rb
+++ b/repo/tests/selenium/statements/statements_deleted_prop_spec.rb
@@ -103,8 +103,7 @@
 ajax_wait
 page.wbErrorDiv?.should be_true
 page.cancelStatement
-page.referenceHeadingToggleLink
-page.wait_for_referencesToggle
+page.toggle_reference_section
 page.reference1Property.should_not == properties_cm[0]["label"]
 page.reference1Property.include?(properties_cm[0]["id"]).should be_true
 page.reference1Property.include?("Deleted property").should be_true
@@ -159,8 +158,7 @@
 #ajax_wait
 #page.wbErrorDiv?.should be_true
 #page.cancelStatement
-page.referenceHeadingToggleLink
-page.wait_for_referencesToggle
+page.toggle_reference_section
 page.reference1Property.should_not == properties_item[0]["label"]
 page.reference1Property.include?(properties_item[0]["id"]).should 
be_true
 page.reference1Property.include?("Deleted property").should be_true

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib6abb24483b70a877be177eab8f0f72ca6e207c4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.21-wmf12
Gerrit-Owner: Anja Jentzsch 
Gerrit-Reviewer: Anja Jentzsch 
Gerrit-Reviewer: Henning Snater 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Using toggle_reference_section in statements Selenium tests - change (mediawiki...Wikibase)

2013-03-19 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has uploaded a new change for review.

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


Change subject: Using toggle_reference_section in statements Selenium tests
..

Using toggle_reference_section in statements Selenium tests

The method "wait_for_referencesToggle" has been removed in a previous change 
set.
It has been replaced by "toggle_references_section".

Change-Id: Ib6abb24483b70a877be177eab8f0f72ca6e207c4
---
M repo/tests/selenium/statements/statements_deleted_prop_spec.rb
1 file changed, 2 insertions(+), 4 deletions(-)


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

diff --git a/repo/tests/selenium/statements/statements_deleted_prop_spec.rb 
b/repo/tests/selenium/statements/statements_deleted_prop_spec.rb
index f6eab06..1cc767c 100644
--- a/repo/tests/selenium/statements/statements_deleted_prop_spec.rb
+++ b/repo/tests/selenium/statements/statements_deleted_prop_spec.rb
@@ -103,8 +103,7 @@
 ajax_wait
 page.wbErrorDiv?.should be_true
 page.cancelStatement
-page.referenceHeadingToggleLink
-page.wait_for_referencesToggle
+page.toggle_reference_section
 page.reference1Property.should_not == properties_cm[0]["label"]
 page.reference1Property.include?(properties_cm[0]["id"]).should be_true
 page.reference1Property.include?("Deleted property").should be_true
@@ -159,8 +158,7 @@
 #ajax_wait
 #page.wbErrorDiv?.should be_true
 #page.cancelStatement
-page.referenceHeadingToggleLink
-page.wait_for_referencesToggle
+page.toggle_reference_section
 page.reference1Property.should_not == properties_item[0]["label"]
 page.reference1Property.include?(properties_item[0]["id"]).should 
be_true
 page.reference1Property.include?("Deleted property").should be_true

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib6abb24483b70a877be177eab8f0f72ca6e207c4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.21-wmf12
Gerrit-Owner: Anja Jentzsch 
Gerrit-Reviewer: Henning Snater 

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


[MediaWiki-commits] [Gerrit] Emptying wb_changes_dispatch on deleteAllData - change (mediawiki...Wikibase)

2013-03-19 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has uploaded a new change for review.

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


Change subject: Emptying wb_changes_dispatch on deleteAllData
..

Emptying wb_changes_dispatch on deleteAllData

Emptying wb_changes_distpatch table when deleting all data to ensure the 
dispatcher works correctly.

Change-Id: I72b5128a93ea1550927b3cac41f9baaf263049b6
---
M repo/Wikibase.hooks.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/repo/Wikibase.hooks.php b/repo/Wikibase.hooks.php
old mode 100644
new mode 100755
index 750ee58..b0f9a36
--- a/repo/Wikibase.hooks.php
+++ b/repo/Wikibase.hooks.php
@@ -626,6 +626,7 @@
 
$dbw = wfGetDB( DB_MASTER );
$dbw->delete( 'wb_changes', '*', __METHOD__ );
+   $dbw->delete( 'wb_changes_dispatch', '*', __METHOD__ );
 
$reportMessage( "done!\n" );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I72b5128a93ea1550927b3cac41f9baaf263049b6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Anja Jentzsch 

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


[MediaWiki-commits] [Gerrit] (testing) Selenium tests for client inclusion syntax - change (mediawiki...Wikibase)

2013-03-18 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: (testing) Selenium tests for client inclusion syntax
..


(testing) Selenium tests for client inclusion syntax

- some basic checks for including an item-type property.

Change-Id: I7195e84a54f99a655b2e3753d56e67dcccf76e0e
---
A client/tests/selenium/interwiki/inclusion_syntax_spec.rb
M selenium/Rakefile
M selenium/lib/pages/client_page.rb
3 files changed, 100 insertions(+), 0 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved
  jenkins-bot: Checked



diff --git a/client/tests/selenium/interwiki/inclusion_syntax_spec.rb 
b/client/tests/selenium/interwiki/inclusion_syntax_spec.rb
new file mode 100644
index 000..a84ece6
--- /dev/null
+++ b/client/tests/selenium/interwiki/inclusion_syntax_spec.rb
@@ -0,0 +1,94 @@
+# -*- encoding : utf-8 -*-
+# Wikidata UI tests
+#
+# Author:: Tobias Gritschacher (tobias.gritschac...@wikimedia.de)
+# License:: GNU GPL v2+
+#
+# tests for inclusion syntax on the client
+
+require 'spec_helper'
+
+article_title = "Barry Gibb"
+article_text = "Member of the Bee Gees."
+item_sitelinks = [["en", "Barry Gibb"], ["de", "Barry Gibb"]]
+item_label1 = "Robin Gibb"
+item_label2 = "Bee Gees"
+item_property_brother = "brother"
+item_property_member_of = "member of"
+item_property_brother_url = ""
+item_property_member_of_url = ""
+include_property_brother = "{{#property:" + item_property_brother + "}}"
+include_property_member_of = "{{#property:" + item_property_member_of + "}}"
+article_text_extended = " Together with his brother " + 
include_property_brother + " he founded the band " + include_property_member_of 
+ "."
+article_text_valid = "Member of the Bee Gees. Together with his brother " + 
item_label1 + " he founded the band " + item_label2 + "."
+
+describe "Check client inclusion syntax" do
+  before :all do
+# set up: create article, create corresponding item with sitelinks, create 
properties & add claims
+visit_page(ClientPage) do |page|
+  page.create_article(article_title, article_text, true)
+end
+visit_page(CreateItemPage) do |page|
+  page.create_new_item(item_label1, generate_random_string(20))
+end
+visit_page(CreateItemPage) do |page|
+  page.create_new_item(item_label2, generate_random_string(20))
+end
+visit_page(CreateItemPage) do |page|
+  page.create_new_item(article_title, generate_random_string(20))
+  page.add_sitelinks(item_sitelinks)
+end
+visit_page(NewPropertyPage) do |page|
+  page.create_new_property(item_property_brother, 
generate_random_string(20), "Item")
+  item_property_brother_url = page.current_url
+end
+visit_page(NewPropertyPage) do |page|
+  page.create_new_property(item_property_member_of, 
generate_random_string(20), "Item")
+  item_property_member_of_url = page.current_url
+end
+on_page(ItemPage) do |page|
+  page.navigate_to_item
+  page.wait_for_entity_to_load
+  page.add_statement(item_property_brother, item_label1)
+  page.add_statement(item_property_member_of, item_label2)
+end
+  end
+
+  context "Check item-property inclusion syntax" do
+it "should check if item property gets included properly" do
+  on_page(ClientPage) do |page|
+page.navigate_to_article(article_title)
+page.clientArticleTitle.should == article_title
+page.clientArticleText.should == article_text
+page.count_interwiki_links.should == item_sitelinks.count - 1
+page.interwiki_de?.should be_true
+page.change_article(article_title, article_text + 
article_text_extended)
+page.clientArticleText.should == article_text_valid
+  end
+end
+  end
+
+  after :all do
+# tear down: remove sitelinks, reset article, delete properties
+on_page(ItemPage) do |page|
+  page.navigate_to_item
+  page.wait_for_entity_to_load
+  page.remove_all_sitelinks
+end
+on_page(ClientPage) do |page|
+  page.change_article(article_title, article_text)
+end
+visit_page(RepoLoginPage) do |page|
+  page.login_with(WIKI_ADMIN_USERNAME, WIKI_ADMIN_PASSWORD)
+end
+visit_page(DeleteEntityPage) do |page|
+  page.delete_entity(item_property_brother_url)
+end
+visit_page(DeleteEntityPage) do |page|
+  page.delete_entity(item_property_member_of_url)
+end
+visit_page(RepoLoginPage) do |page|
+  page.logout_user
+end
+  end
+end
diff --git a/selenium/Rakefile b/selenium/Rakefile
index 6d6d1d1..2185898 100644
--- a/selenium/Rakefile
+++ b/selenium/Rakefile
@@ -28,6 +28,11 @@
   spec.pattern = '../client/tests/selenium/interwiki/*_spec.rb'
 end
 
+RSpec::Core::RakeTask.new(:inclusion_syntax) do |spec|
+  spec.ruby_opts = "-I lib:spec"
+  spec.pattern = '../client/tests/selenium/interwiki/inclusion_syntax_spec.rb'
+end
+
 RSpec::Core::RakeTask.new(:item) do |spec|
   spec.ruby_op

[MediaWiki-commits] [Gerrit] (testing) waiting in Selenium tests for propagation of remov... - change (mediawiki...Wikibase)

2013-03-18 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: (testing) waiting in Selenium tests for propagation of removed 
sitelinks
..


(testing) waiting in Selenium tests for propagation of removed sitelinks

Change-Id: I93e95934fffd9fef580067e621f31d509689da5d
---
M client/tests/selenium/interwiki/client_repo_spec.rb
1 file changed, 15 insertions(+), 0 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved
  jenkins-bot: Checked



diff --git a/client/tests/selenium/interwiki/client_repo_spec.rb 
b/client/tests/selenium/interwiki/client_repo_spec.rb
index d258ef4..bf2e095 100644
--- a/client/tests/selenium/interwiki/client_repo_spec.rb
+++ b/client/tests/selenium/interwiki/client_repo_spec.rb
@@ -252,8 +252,23 @@
 it "should check that no sitelinks are displayed for article a & b" do
   on_page(ClientPage) do |page|
 page.navigate_to_article(article_title_a)
+# tooks soome time until the removing of all the sitelinks show up
+sleep 2
+@browser.refresh
+page.interwiki_de?.should be_false
+page.interwiki_it?.should be_false
+page.interwiki_fi?.should be_false
+page.interwiki_hu?.should be_false
+page.interwiki_fr?.should be_false
+page.interwiki_en?.should be_false
 page.interwiki_xxx?.should be_false
 page.navigate_to_article(article_title_b)
+page.interwiki_de?.should be_false
+page.interwiki_it?.should be_false
+page.interwiki_fi?.should be_false
+page.interwiki_hu?.should be_false
+page.interwiki_fr?.should be_false
+page.interwiki_en?.should be_false
 page.interwiki_xxx?.should be_false
   end
 end

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I93e95934fffd9fef580067e621f31d509689da5d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Tobias Gritschacher 
Gerrit-Reviewer: Anja Jentzsch 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] (bug 43997) adding Selenium tests for linking items on client - change (mediawiki...Wikibase)

2013-03-15 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: (bug 43997) adding Selenium tests for linking items on client
..


(bug 43997) adding Selenium tests for linking items on client

patchset 3: making tests for editing sitelinks from client non-exp.
patchset 4: rebased

Change-Id: I057aeab9d0c7096465d3f9ee93008aade78cbe0a
---
A client/tests/selenium/interwiki/edit_sitelinks_spec.rb
M selenium/Rakefile
M selenium/lib/pages/client_page.rb
3 files changed, 155 insertions(+), 1 deletion(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved
  jenkins-bot: Checked



diff --git a/client/tests/selenium/interwiki/edit_sitelinks_spec.rb 
b/client/tests/selenium/interwiki/edit_sitelinks_spec.rb
new file mode 100644
index 000..3ea420b
--- /dev/null
+++ b/client/tests/selenium/interwiki/edit_sitelinks_spec.rb
@@ -0,0 +1,132 @@
+# -*- encoding : utf-8 -*-
+# Wikidata UI tests
+#
+# Author:: Tobias Gritschacher (tobias.gritschac...@wikimedia.de)
+# License:: GNU GPL v2+
+#
+# tests for edit sitelinks from client
+
+require 'spec_helper'
+
+article_title = "Vienna"
+article_text = "It's the capital of Austria!"
+item_description = generate_random_string(20)
+item_sitelink_en = [["en", "Vienna"]]
+item_sitelink_de = [["de", "Wien"]]
+item_url = ''
+
+describe "Check functionality of editing sitelinks on client" do
+  before :all do
+# set up: create article & item
+visit_page(ClientPage) do |page|
+  page.create_article(article_title, article_text, true)
+end
+visit_page(ClientLoginPage) do |page|
+  page.logout_user
+end
+  end
+
+  context "client: editing sitelinks" do
+it "should check article and that there are no interwikilinks yet" do
+  on_page(ClientPage) do |page|
+page.navigate_to_article(article_title)
+page.clientArticleTitle.should == article_title
+page.interwiki_xxx?.should be_false
+  end
+end
+it "check button behavior of sitelink editor (not logged in)" do
+  on_page(ClientPage) do |page|
+page.navigate_to_article(article_title)
+page.wait_for_link_item_link
+page.clientLinkItemLink?.should be_true
+page.clientLinkItemLink
+ajax_wait
+page.clientLinkItemLink?.should be_true
+page.clientLinkDialogHeader.should == "You need to be logged in"
+page.clientLinkDialogClose?.should be_true
+page.clientLinkDialogClose
+page.clientLinkItemLink?.should be_true
+  end
+end
+it "check button behavior of sitelink editor (logged in)" do
+  visit_page(ClientLoginPage) do |page|
+page.login_with(CLIENT_ADMIN_USERNAME, CLIENT_ADMIN_PASSWORD)
+  end
+  visit_page(RepoLoginPage) do |page|
+page.login_with(WIKI_ADMIN_USERNAME, WIKI_ADMIN_PASSWORD)
+  end
+  on_page(ClientPage) do |page|
+page.navigate_to_article(article_title)
+page.wait_for_link_item_link
+page.clientLinkItemLink?.should be_true
+page.clientLinkItemLink
+ajax_wait
+page.clientLinkDialogHeader.should == "Link with page"
+page.clientLinkDialogClose?.should be_true
+page.clientLinkDialogClose
+page.clientLinkDialogHeader?.should be_false
+page.clientLinkItemLink?.should be_true
+  end
+end
+it "check linking an item" do
+  on_page(ClientPage) do |page|
+page.navigate_to_article(article_title)
+page.wait_for_link_item_link
+page.clientLinkItemLink
+ajax_wait
+page.clientLinkItemLanguageInput?.should be_true
+page.clientLinkItemLanguagePage?.should be_true
+page.clientLinkItemSubmit?.should be_true
+page.clientLinkDialogClose?.should be_true
+page.clientLinkItemLanguageInput = "Deutsch (de)"
+ajax_wait
+page.clientLinkItemLanguageSelectorFirst?.should be_true
+page.clientLinkItemLanguageSelectorFirst
+page.clientLinkItemLanguagePage = item_sitelink_de[0][1]
+ajax_wait
+page.clientLinkItemSubmit?.should be_true
+page.clientLinkItemSubmit
+ajax_wait
+page.wait_until do
+  page.clientLinkItemSuccess?
+end
+page.clientLinkItemSuccess?.should be_true
+page.clientLinkItemSubmit?.should be_true
+page.clientLinkItemSubmit
+page.count_interwiki_links.should == 1
+page.interwiki_de?.should be_true
+page.clientEditLinksLink?.should be_true
+  end
+end
+it "check edit-links link on client" do
+  on_page(ClientPage) do |page|
+page.navigate_to_article(article_title)
+page.clientEditLinksLink?.should be_true
+page.clientEditLinksLink
+  end
+  on_page(ItemPage) do |page|
+page.wait_for_entity_to_load
+item_url = page.current_url
+page.entityLabelSpan.should == article_title
+page.count_exi

[MediaWiki-commits] [Gerrit] Change watchlist preference message: your -> my - change (mediawiki...Wikibase)

2013-03-15 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: Change watchlist preference message: your -> my
..


Change watchlist preference message: your -> my

to be consistent with other preferences

Change-Id: I592c7dc217e13e4b1d313fb57e87176e6e6f77ae
---
M client/WikibaseClient.i18n.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved
  jenkins-bot: Checked



diff --git a/client/WikibaseClient.i18n.php b/client/WikibaseClient.i18n.php
index 8d3ee91..74885e5 100644
--- a/client/WikibaseClient.i18n.php
+++ b/client/WikibaseClient.i18n.php
@@ -53,7 +53,7 @@
'wikibase-property-notsupportedyet' => 'Wikibase does not yet support 
property type for $1 property.',
'wikibase-rc-hide-wikidata' => '$1 Wikidata',
'wikibase-rc-show-wikidata-pref' => 'Show Wikidata edits in recent 
changes',
-   'wikibase-watchlist-show-changes-pref' => 'Show Wikidata edits in your 
watchlist',
+   'wikibase-watchlist-show-changes-pref' => 'Show Wikidata edits in my 
watchlist',
 );
 
 /** Message documentation (Message documentation)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I592c7dc217e13e4b1d313fb57e87176e6e6f77ae
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Aude 
Gerrit-Reviewer: Anja Jentzsch 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] (bug 45984) Logging for change notification lag. - change (mediawiki...Wikibase)

2013-03-12 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: (bug 45984) Logging for change notification lag.
..


(bug 45984) Logging for change notification lag.

This adds debug output to dispatchChanges.php and ChangeNotificationJob classes,
to allow monitoring and analysis of lagging change notifications.

Change-Id: I56742c90cfe32737d326b4021b5177387e237206
---
M lib/includes/ChangeNotificationJob.php
M lib/maintenance/dispatchChanges.php
2 files changed, 25 insertions(+), 1 deletion(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved



diff --git a/lib/includes/ChangeNotificationJob.php 
b/lib/includes/ChangeNotificationJob.php
index 11d109f..80e1b99 100644
--- a/lib/includes/ChangeNotificationJob.php
+++ b/lib/includes/ChangeNotificationJob.php
@@ -131,6 +131,18 @@
//TODO: allow mock handler for testing
ChangeHandler::singleton()->handleChanges( $changes );
 
+   if ( $changes ) {
+   /* @var Change $last */
+   $n = count( $changes );
+   $last = end( $changes );
+
+   wfDebugLog( __CLASS__, __METHOD__ . ": processed $n 
notifications, "
+   . "up to " . $last->getId() . 
", timestamp " . $last->getTime() . "; "
+   . "Lag is " . $last->getAge() . 
" seconds." );
+   } else {
+   wfDebugLog( __CLASS__, __METHOD__ . ": processed no 
notifications." );
+   }
+
return true;
}
 
diff --git a/lib/maintenance/dispatchChanges.php 
b/lib/maintenance/dispatchChanges.php
index d8a2e2c..bc9690a 100644
--- a/lib/maintenance/dispatchChanges.php
+++ b/lib/maintenance/dispatchChanges.php
@@ -257,7 +257,19 @@
 
$n = count( $changes );
 
-   $this->log( "Posted $n changes to $wikiDB" );
+   if ( $n === 0 ) {
+   $this->log( "Posted no changes to $wikiDB (nothing to 
do). "
+   . "Next ID is $continueAfter." 
);
+   } else {
+   /* @var Change $last */
+   $last = end( $changes );
+
+   $this->log( "Posted $n changes to $wikiDB, "
+   . "up to ID " . $last->getId() . ", timestamp " 
. $last->getTime() . ". "
+   . "Lag is " . $last->getAge() . " seconds. "
+   . "Next ID is $continueAfter." );
+   }
+
return $n;
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I56742c90cfe32737d326b4021b5177387e237206
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.21-wmf11
Gerrit-Owner: Anja Jentzsch 
Gerrit-Reviewer: Anja Jentzsch 
Gerrit-Reviewer: Daniel Kinzler 

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


[MediaWiki-commits] [Gerrit] (bug 45984) Logging for change notification lag. - change (mediawiki...Wikibase)

2013-03-12 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has uploaded a new change for review.

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


Change subject: (bug 45984) Logging for change notification lag.
..

(bug 45984) Logging for change notification lag.

This adds debug output to dispatchChanges.php and ChangeNotificationJob classes,
to allow monitoring and analysis of lagging change notifications.

Change-Id: I56742c90cfe32737d326b4021b5177387e237206
---
M lib/includes/ChangeNotificationJob.php
M lib/maintenance/dispatchChanges.php
2 files changed, 25 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/59/53359/1

diff --git a/lib/includes/ChangeNotificationJob.php 
b/lib/includes/ChangeNotificationJob.php
index 11d109f..80e1b99 100644
--- a/lib/includes/ChangeNotificationJob.php
+++ b/lib/includes/ChangeNotificationJob.php
@@ -131,6 +131,18 @@
//TODO: allow mock handler for testing
ChangeHandler::singleton()->handleChanges( $changes );
 
+   if ( $changes ) {
+   /* @var Change $last */
+   $n = count( $changes );
+   $last = end( $changes );
+
+   wfDebugLog( __CLASS__, __METHOD__ . ": processed $n 
notifications, "
+   . "up to " . $last->getId() . 
", timestamp " . $last->getTime() . "; "
+   . "Lag is " . $last->getAge() . 
" seconds." );
+   } else {
+   wfDebugLog( __CLASS__, __METHOD__ . ": processed no 
notifications." );
+   }
+
return true;
}
 
diff --git a/lib/maintenance/dispatchChanges.php 
b/lib/maintenance/dispatchChanges.php
index d8a2e2c..bc9690a 100644
--- a/lib/maintenance/dispatchChanges.php
+++ b/lib/maintenance/dispatchChanges.php
@@ -257,7 +257,19 @@
 
$n = count( $changes );
 
-   $this->log( "Posted $n changes to $wikiDB" );
+   if ( $n === 0 ) {
+   $this->log( "Posted no changes to $wikiDB (nothing to 
do). "
+   . "Next ID is $continueAfter." 
);
+   } else {
+   /* @var Change $last */
+   $last = end( $changes );
+
+   $this->log( "Posted $n changes to $wikiDB, "
+   . "up to ID " . $last->getId() . ", timestamp " 
. $last->getTime() . ". "
+   . "Lag is " . $last->getAge() . " seconds. "
+   . "Next ID is $continueAfter." );
+   }
+
return $n;
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I56742c90cfe32737d326b4021b5177387e237206
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.21-wmf11
Gerrit-Owner: Anja Jentzsch 
Gerrit-Reviewer: Daniel Kinzler 

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


[MediaWiki-commits] [Gerrit] (bug 44973) Check show wikibase preference for watchlist - change (mediawiki...Wikibase)

2013-03-12 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: (bug 44973) Check show wikibase preference for watchlist
..


(bug 44973) Check show wikibase preference for watchlist

Change-Id: Ia4b73831442424df3cff7d1664c74a866d950b76
---
M client/WikibaseClient.hooks.php
M client/WikibaseClient.i18n.php
M client/resources/Resources.php
M client/resources/wbclient.watchlist.js
4 files changed, 17 insertions(+), 1 deletion(-)

Approvals:
  Daniel Kinzler: Verified; Looks good to me, but someone else must approve
  Anja Jentzsch: Verified; Looks good to me, approved



diff --git a/client/WikibaseClient.hooks.php b/client/WikibaseClient.hooks.php
index 4c556d7..56c19a2 100644
--- a/client/WikibaseClient.hooks.php
+++ b/client/WikibaseClient.hooks.php
@@ -693,6 +693,12 @@
'section' => 'rc/advancedrc',
);
 
+   $prefs['wlshowwikibase'] = array(
+   'type' => 'toggle',
+   'label-message' => 
'wikibase-watchlist-show-changes-pref',
+   'section' => 'watchlist/advancedwatchlist',
+   );
+
return true;
}
 
@@ -707,6 +713,7 @@
public static function onSpecialPageBeforeExecute( \SpecialPage 
$special, $subpage ) {
if ( $special->getName() === 'Watchlist' ) {
$context = $special->getContext();
+
if ( $context->getRequest()->getBool( 'enhanced', 
$context->getUser()->getOption( 'usenewrc' ) ) === false ) {
$special->getOutput()->addModules( array(
'wbclient.watchlist.css',
diff --git a/client/WikibaseClient.i18n.php b/client/WikibaseClient.i18n.php
index f5a62f8..ce2421c 100644
--- a/client/WikibaseClient.i18n.php
+++ b/client/WikibaseClient.i18n.php
@@ -51,6 +51,7 @@
'wikibase-linkitem-success-link' => 'The pages have successfully been 
linked. You can find the item containing the links in our [$1 central data 
repository].',
'wikibase-rc-hide-wikidata' => '$1 Wikidata',
'wikibase-rc-show-wikidata-pref' => 'Show Wikidata edits in recent 
changes',
+   'wikibase-watchlist-show-changes-pref' => 'Show Wikidata edits in your 
watchlist',
 );
 
 /** Message documentation (Message documentation)
@@ -127,7 +128,8 @@
 
 Parameters:
 * $1 - a link with the text {{msg-mw|show}} or {{msg-mw|hide}}',
-   'wikibase-rc-show-wikidata-pref' => 'Option in the Recent changes 
section of preferences to show wikibase changes by default in recent changes',
+   'wikibase-rc-show-wikidata-pref' => 'Option in the recent changes 
section of preferences to show wikibase changes by default in recent changes.',
+   'wikibase-watchlist-show-changes-pref' => 'Option in the watchlist 
section of preferences to always show wikibase edits by default in the 
watchlist.',
 );
 
 /** Arabic (العربية)
diff --git a/client/resources/Resources.php b/client/resources/Resources.php
index 7c437af..a8103c4 100644
--- a/client/resources/Resources.php
+++ b/client/resources/Resources.php
@@ -30,6 +30,9 @@
'scripts' => array(
'wbclient.watchlist.js'
),
+   'dependencies' => array(
+   'user.options'
+   ),
'messages' => array(
'hide',
'show',
diff --git a/client/resources/wbclient.watchlist.js 
b/client/resources/wbclient.watchlist.js
index c109eca..95d2e69 100644
--- a/client/resources/wbclient.watchlist.js
+++ b/client/resources/wbclient.watchlist.js
@@ -90,6 +90,10 @@
 */
init: function () {
watchlist.addFilter();
+
+   if ( mw.user.options.get( 'wlshowwikibase' ) ) {
+   watchlist.toggleWikibase();
+   }
}
 };
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia4b73831442424df3cff7d1664c74a866d950b76
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Aude 
Gerrit-Reviewer: Anja Jentzsch 
Gerrit-Reviewer: Aude 
Gerrit-Reviewer: Daniel Kinzler 
Gerrit-Reviewer: Hoo man 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: Tobias Gritschacher 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] (testing) added selenium tests for string datatype - change (mediawiki...Wikibase)

2013-03-11 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: (testing) added selenium tests for string datatype
..


(testing) added selenium tests for string datatype

Change-Id: I58a993e7f486b38f95449ba21a636d60e7398677
---
A repo/tests/selenium/statements/statements_string_spec.rb
M selenium/Rakefile
M selenium/lib/modules/statement_module.rb
3 files changed, 106 insertions(+), 2 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved



diff --git a/repo/tests/selenium/statements/statements_string_spec.rb 
b/repo/tests/selenium/statements/statements_string_spec.rb
new file mode 100644
index 000..f47c911
--- /dev/null
+++ b/repo/tests/selenium/statements/statements_string_spec.rb
@@ -0,0 +1,97 @@
+# -*- encoding : utf-8 -*-
+# Wikidata UI tests
+#
+# Author:: Tobias Gritschacher (tobias.gritschac...@wikimedia.de)
+# License:: GNU GPL v2+
+#
+# tests for string type statements
+
+require 'spec_helper'
+
+item_label = generate_random_string(10)
+item_description = generate_random_string(20)
+prop_label = generate_random_string(10)
+prop_description = generate_random_string(20)
+prop_datatype = "String"
+string_value = generate_random_string(50)
+string_value_toolong = generate_random_string(401)
+string_value_evil = "$('body').empty();"
+
+describe "Check string statements UI" do
+  before :all do
+# set up: create item & properties
+visit_page(CreateItemPage) do |page|
+  page.create_new_item(item_label, item_description)
+end
+visit_page(NewPropertyPage) do |page|
+  page.create_new_property(prop_label, prop_description, prop_datatype)
+end
+  end
+
+  context "Check statements UI" do
+it "should check adding a statement of string type" do
+  on_page(ItemPage) do |page|
+page.navigate_to_item
+page.wait_for_entity_to_load
+page.add_statement(prop_label, string_value)
+page.statement1Name.should == prop_label
+# TODO: this is a workaround, as the textarea is currently not holding 
the actual string value (it's empty)
+page.editFirstStatement
+page.statementValueInput.should == string_value
+page.cancelStatement
+@browser.refresh
+page.wait_for_entity_to_load
+page.statement1Name.should == prop_label
+# TODO: see above
+page.editFirstStatement
+page.statementValueInput.should == string_value
+page.cancelStatement
+page.remove_all_claims
+  end
+end
+it "should check adding adding a statement with an evil string (JS 
injection)" do
+  on_page(ItemPage) do |page|
+page.navigate_to_item
+page.wait_for_entity_to_load
+page.add_statement(prop_label, string_value_evil)
+page.firstHeading?.should be_true
+page.statement1Name.should == prop_label
+# TODO: see above
+page.editFirstStatement
+page.statementValueInput.should == string_value_evil
+page.cancelStatement
+@browser.refresh
+page.wait_for_entity_to_load
+page.firstHeading?.should be_true
+page.statement1Name.should == prop_label
+# TODO: see above
+page.editFirstStatement
+page.statementValueInput.should == string_value_evil
+page.cancelStatement
+page.remove_all_claims
+  end
+end
+# TODO: skipping for now, as this string length limit is currently not 
implemented on master
+xit "should check adding a statement of string type with too long string" 
do
+  on_page(ItemPage) do |page|
+page.navigate_to_item
+page.wait_for_entity_to_load
+page.addStatement
+page.entitySelectorInput = prop_label
+ajax_wait
+page.wait_for_entity_selector_list
+page.wait_for_property_value_box
+page.statementValueInput = string_value_toolong
+page.saveStatement
+ajax_wait
+page.wbErrorDiv?.should be_true
+page.cancelStatement
+  end
+end
+  end
+
+  after :all do
+# tear down
+  end
+
+end
\ No newline at end of file
diff --git a/selenium/Rakefile b/selenium/Rakefile
index a4e9ff2..ffdf1e1 100644
--- a/selenium/Rakefile
+++ b/selenium/Rakefile
@@ -210,7 +210,7 @@
 
 RSpec::Core::RakeTask.new(:statements) do |spec|
   spec.ruby_opts = "-I lib:spec"
-  spec.pattern = 
'../repo/tests/selenium/statements/{statements_spec.rb,statements_cm_spec.rb,statements_item_spec.rb,references_spec.rb}'
+  spec.pattern = 
'../repo/tests/selenium/statements/{statements_spec.rb,statements_cm_spec.rb,statements_item_spec.rb,statements_string_spec.rb,references_spec.rb}'
 end
 
 RSpec::Core::RakeTask.new(:statements_basic) do |spec|
@@ -228,6 +228,11 @@
   spec.pattern = '../repo/tests/selenium/statements/statements_item_spec.rb'
 end
 
+RSpec::Core::RakeTask.new(:statements_string) do |spec|
+  spec.ruby_opts = "-I lib:spec"
+  spec.pattern = '../

[MediaWiki-commits] [Gerrit] Remove unused argument in method call - change (mediawiki...Wikibase)

2013-03-11 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: Remove unused argument in method call
..


Remove unused argument in method call

Change-Id: I9d9615360212f865f7d3aada26af8cea6ea3e9f4
---
M repo/maintenance/pruneChanges.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved



diff --git a/repo/maintenance/pruneChanges.php 
b/repo/maintenance/pruneChanges.php
index 40cbe98..9ee56b6 100644
--- a/repo/maintenance/pruneChanges.php
+++ b/repo/maintenance/pruneChanges.php
@@ -58,7 +58,7 @@
exit( 5 );
}
 
-   $this->pruneChanges( $numDays, $force );
+   $this->pruneChanges( $numDays );
 
$this->output( date( 'H:i:s' ) . " done, exiting\n" );
unlink( $pidfile ); // delete lockfile on normal exit

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9d9615360212f865f7d3aada26af8cea6ea3e9f4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: John Erling Blad 
Gerrit-Reviewer: Anja Jentzsch 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] (testing) added qunit eachchange-tests to selenium - change (mediawiki...Wikibase)

2013-03-11 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: (testing) added qunit eachchange-tests to selenium
..


(testing) added qunit eachchange-tests to selenium

Change-Id: If15616a15b7b73b9be0e99a9f8274e9ed860f8fc
---
M repo/tests/selenium/qunit/qunit_spec.rb
1 file changed, 7 insertions(+), 0 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved



diff --git a/repo/tests/selenium/qunit/qunit_spec.rb 
b/repo/tests/selenium/qunit/qunit_spec.rb
index 29882e0..3ba0244 100644
--- a/repo/tests/selenium/qunit/qunit_spec.rb
+++ b/repo/tests/selenium/qunit/qunit_spec.rb
@@ -42,6 +42,13 @@
 page.qunitTestFail?.should be_false
   end
 end
+it "run eachchange tests" do
+  on_page(QUnitPage) do |page|
+page.call_qunit(WIKI_REPO_URL + 
"Special:JavaScriptTest/qunit?filter=eachchange")
+page.wait_for_qunit_tests
+page.qunitTestFail?.should be_false
+  end
+end
 it "run jQuery.ui tests" do
   on_page(QUnitPage) do |page|
 page.call_qunit(WIKI_REPO_URL + 
"Special:JavaScriptTest/qunit?filter=jQuery.ui")

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If15616a15b7b73b9be0e99a9f8274e9ed860f8fc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Tobias Gritschacher 
Gerrit-Reviewer: Anja Jentzsch 
Gerrit-Reviewer: Henning Snater 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] (Bug 45352, Bug 45353) Add ItemByTitle and ItemDisambiguatio... - change (mediawiki...Wikibase)

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

Change subject: (Bug 45352, Bug 45353) Add ItemByTitle and ItemDisambiguation 
to the special pages list
..


(Bug 45352, Bug 45353) Add ItemByTitle and ItemDisambiguation to the special 
pages list

Changes so ItemDisambiguation and ItemByTitle can be added to the list
of special pages. Also some minor changes to the messages used for those
pages.

There are also a name change in the list to ItemBySitelink, we are not
very good at following our own naming scheme. We should really try to
follow our glossary.

Change-Id: Id197c49dd52c482eb162f56522e5f0db0256b90a
---
M repo/Wikibase.i18n.php
M repo/Wikibase.php
M repo/includes/specials/SpecialItemByTitle.php
M repo/includes/specials/SpecialItemDisambiguation.php
M repo/includes/specials/SpecialItemResolver.php
5 files changed, 24 insertions(+), 18 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved
  jenkins-bot: Checked



diff --git a/repo/Wikibase.i18n.php b/repo/Wikibase.i18n.php
index 5e467da..ba938fa 100644
--- a/repo/Wikibase.i18n.php
+++ b/repo/Wikibase.i18n.php
@@ -112,7 +112,7 @@
'wikibase-itemlink-title' => '$1 | $2',
 
// Special pages
-   'special-itembytitle' => 'Item by title',
+   'special-itembytitle' => 'Item by sitelink',
'wikibase-itembytitle-lookup-fieldset' => 'Search for items by site and 
title',
'wikibase-itembytitle-lookup-site' => 'Site:',
'wikibase-itembytitle-lookup-page' => 'Page:',
@@ -121,8 +121,8 @@
'wikibase-itembytitle-invalid-site' => 'The previous query could not be 
used for a search. Please provide a valid site identifier.',
'wikibase-itembytitle-description' => 'Site is an identifier code, such 
as "enwiki".',
'wikibase-itembytitle-create' => 'You can also 
[{{fullurl:Special:CreateItem|site=$1&page=$2}} create an item].',
-   'special-itemdisambiguation' => 'Disambiguation: Items with the same 
label',
-   'wikibase-itemdisambiguation-lookup-fieldset' => 'Search for items by 
label',
+   'special-itemdisambiguation' => 'Item disambiguation',
+   'wikibase-itemdisambiguation-lookup-fieldset' => 'Search for items by 
language and label',
'wikibase-itemdisambiguation-lookup-language' => 'Language:',
'wikibase-itemdisambiguation-lookup-label' => 'Label:',
'wikibase-itemdisambiguation-submit' => 'Search',
diff --git a/repo/Wikibase.php b/repo/Wikibase.php
index 8010ba5..56187af 100644
--- a/repo/Wikibase.php
+++ b/repo/Wikibase.php
@@ -227,29 +227,29 @@
 
 // Special page registration
 $wgSpecialPages['CreateItem']  = 
'SpecialCreateItem';
+$wgSpecialPages['EntitiesWithoutLabel']= 
'SpecialEntitiesWithoutLabel';
 $wgSpecialPages['ItemByTitle'] 
= 'SpecialItemByTitle';
 $wgSpecialPages['ItemDisambiguation']  = 
'SpecialItemDisambiguation';
-$wgSpecialPages['SetLabel']= 
'SpecialSetLabel';
-$wgSpecialPages['SetDescription']  = 
'SpecialSetDescription';
-$wgSpecialPages['SetAliases']  = 
'SpecialSetAliases';
-$wgSpecialPages['EntitiesWithoutLabel']= 
'SpecialEntitiesWithoutLabel';
 $wgSpecialPages['ItemsWithoutSitelinks']   = 
'SpecialItemsWithoutSitelinks';
-$wgSpecialPages['NewProperty'] 
= 'SpecialNewProperty';
 $wgSpecialPages['ListDatatypes']   = 
'SpecialListDatatypes';
+$wgSpecialPages['NewProperty'] 
= 'SpecialNewProperty';
+$wgSpecialPages['SetAliases']  = 
'SpecialSetAliases';
+$wgSpecialPages['SetDescription']  = 
'SpecialSetDescription';
+$wgSpecialPages['SetLabel']= 
'SpecialSetLabel';
 
 
 // Special page groups
 $wgSpecialPageGroups['CreateItem'] = 
'wikibaserepo';
-$wgSpecialPageGroups['NewProperty']= 
'wikibaserepo';
-$wgSpecialPageGroups['ItemByTitle']= 
'wikibaserepo';
-$wgSpecialPageGroups['ItemDisambiguation'] = 
'wikibaserepo';
-$wgSpecialPageGroups['SetLabel']   = 
'wikibaserepo';
-$wgSpecialPageGroups['SetDescription'] = 
'wikibaserepo';
-$wgSpecialPageGroups['SetAliases'] = 
'wikibaserepo';
 $wgSpecialPageGroups['EntitiesWithoutLabel']   = 'wikibaserepo';
 $wgSpecialPageGroups['EntityData'] = 
'wikibaserepo';
+$wgSpecialPageGroups['ItemByTitle

[MediaWiki-commits] [Gerrit] (Bug 45352, Bug 45353) Add ItemByTitle and ItemDisambiguatio... - change (mediawiki...Wikibase)

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

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


Change subject: (Bug 45352, Bug 45353) Add ItemByTitle and ItemDisambiguation 
to the special pages list
..

(Bug 45352, Bug 45353) Add ItemByTitle and ItemDisambiguation to the special 
pages list

Changes so ItemDisambiguation and ItemByTitle can be added to the list
of special pages. Also some minor changes to the messages used for those
pages.

There are also a name change in the list to ItemBySitelink, we are not
very good at following our own naming scheme. We should really try to
follow our glossary.

Change-Id: Id197c49dd52c482eb162f56522e5f0db0256b90a
---
M repo/Wikibase.i18n.php
M repo/Wikibase.php
M repo/includes/specials/SpecialItemByTitle.php
M repo/includes/specials/SpecialItemDisambiguation.php
M repo/includes/specials/SpecialItemResolver.php
5 files changed, 24 insertions(+), 18 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/83/51983/1

diff --git a/repo/Wikibase.i18n.php b/repo/Wikibase.i18n.php
index 5e467da..ba938fa 100644
--- a/repo/Wikibase.i18n.php
+++ b/repo/Wikibase.i18n.php
@@ -112,7 +112,7 @@
'wikibase-itemlink-title' => '$1 | $2',
 
// Special pages
-   'special-itembytitle' => 'Item by title',
+   'special-itembytitle' => 'Item by sitelink',
'wikibase-itembytitle-lookup-fieldset' => 'Search for items by site and 
title',
'wikibase-itembytitle-lookup-site' => 'Site:',
'wikibase-itembytitle-lookup-page' => 'Page:',
@@ -121,8 +121,8 @@
'wikibase-itembytitle-invalid-site' => 'The previous query could not be 
used for a search. Please provide a valid site identifier.',
'wikibase-itembytitle-description' => 'Site is an identifier code, such 
as "enwiki".',
'wikibase-itembytitle-create' => 'You can also 
[{{fullurl:Special:CreateItem|site=$1&page=$2}} create an item].',
-   'special-itemdisambiguation' => 'Disambiguation: Items with the same 
label',
-   'wikibase-itemdisambiguation-lookup-fieldset' => 'Search for items by 
label',
+   'special-itemdisambiguation' => 'Item disambiguation',
+   'wikibase-itemdisambiguation-lookup-fieldset' => 'Search for items by 
language and label',
'wikibase-itemdisambiguation-lookup-language' => 'Language:',
'wikibase-itemdisambiguation-lookup-label' => 'Label:',
'wikibase-itemdisambiguation-submit' => 'Search',
diff --git a/repo/Wikibase.php b/repo/Wikibase.php
index 8010ba5..56187af 100644
--- a/repo/Wikibase.php
+++ b/repo/Wikibase.php
@@ -227,29 +227,29 @@
 
 // Special page registration
 $wgSpecialPages['CreateItem']  = 
'SpecialCreateItem';
+$wgSpecialPages['EntitiesWithoutLabel']= 
'SpecialEntitiesWithoutLabel';
 $wgSpecialPages['ItemByTitle'] 
= 'SpecialItemByTitle';
 $wgSpecialPages['ItemDisambiguation']  = 
'SpecialItemDisambiguation';
-$wgSpecialPages['SetLabel']= 
'SpecialSetLabel';
-$wgSpecialPages['SetDescription']  = 
'SpecialSetDescription';
-$wgSpecialPages['SetAliases']  = 
'SpecialSetAliases';
-$wgSpecialPages['EntitiesWithoutLabel']= 
'SpecialEntitiesWithoutLabel';
 $wgSpecialPages['ItemsWithoutSitelinks']   = 
'SpecialItemsWithoutSitelinks';
-$wgSpecialPages['NewProperty'] 
= 'SpecialNewProperty';
 $wgSpecialPages['ListDatatypes']   = 
'SpecialListDatatypes';
+$wgSpecialPages['NewProperty'] 
= 'SpecialNewProperty';
+$wgSpecialPages['SetAliases']  = 
'SpecialSetAliases';
+$wgSpecialPages['SetDescription']  = 
'SpecialSetDescription';
+$wgSpecialPages['SetLabel']= 
'SpecialSetLabel';
 
 
 // Special page groups
 $wgSpecialPageGroups['CreateItem'] = 
'wikibaserepo';
-$wgSpecialPageGroups['NewProperty']= 
'wikibaserepo';
-$wgSpecialPageGroups['ItemByTitle']= 
'wikibaserepo';
-$wgSpecialPageGroups['ItemDisambiguation'] = 
'wikibaserepo';
-$wgSpecialPageGroups['SetLabel']   = 
'wikibaserepo';
-$wgSpecialPageGroups['SetDescription'] = 
'wikibaserepo';
-$wgSpecialPageGroups['SetAliases'] = 
'wikibaserepo';
 $wgSpecialPageGroups['EntitiesWithoutLabel']   = 'wikibaserepo';
 $wgSpecialPageGroups['EntityData'] = 
'wikiba

[MediaWiki-commits] [Gerrit] (Bug 45352, 45353) Add Special:ItemByTitle and Special:ItemD... - change (mediawiki...Wikibase)

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

Change subject: (Bug 45352, 45353) Add Special:ItemByTitle and 
Special:ItemDisambiguation to Special:SpecialPages
..


(Bug 45352, 45353) Add Special:ItemByTitle and Special:ItemDisambiguation to 
Special:SpecialPages

Add Special:ItemByTitle and Special:ItemDisambiguation to Special:SpecialPages

Change-Id: Ifc17ae16fb86e451e25b6dba7b03547c1598eba9
---
M repo/includes/specials/SpecialItemResolver.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved



diff --git a/repo/includes/specials/SpecialItemResolver.php 
b/repo/includes/specials/SpecialItemResolver.php
index ce77fff..3739203 100644
--- a/repo/includes/specials/SpecialItemResolver.php
+++ b/repo/includes/specials/SpecialItemResolver.php
@@ -38,7 +38,7 @@
 * @param string $name
 */
public function __construct( $name ) {
-   parent::__construct( $name, '', false );
+   parent::__construct( $name, '' );
}
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifc17ae16fb86e451e25b6dba7b03547c1598eba9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.21-wmf11
Gerrit-Owner: Anja Jentzsch 
Gerrit-Reviewer: Anja Jentzsch 

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


[MediaWiki-commits] [Gerrit] (Bug 45352, 45353) Add Special:ItemByTitle and Special:ItemD... - change (mediawiki...Wikibase)

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

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


Change subject: (Bug 45352, 45353) Add Special:ItemByTitle and 
Special:ItemDisambiguation to Special:SpecialPages
..

(Bug 45352, 45353) Add Special:ItemByTitle and Special:ItemDisambiguation to 
Special:SpecialPages

Add Special:ItemByTitle and Special:ItemDisambiguation to Special:SpecialPages

Change-Id: Ifc17ae16fb86e451e25b6dba7b03547c1598eba9
---
M repo/includes/specials/SpecialItemResolver.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/82/51982/1

diff --git a/repo/includes/specials/SpecialItemResolver.php 
b/repo/includes/specials/SpecialItemResolver.php
index ce77fff..3739203 100644
--- a/repo/includes/specials/SpecialItemResolver.php
+++ b/repo/includes/specials/SpecialItemResolver.php
@@ -38,7 +38,7 @@
 * @param string $name
 */
public function __construct( $name ) {
-   parent::__construct( $name, '', false );
+   parent::__construct( $name, '' );
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifc17ae16fb86e451e25b6dba7b03547c1598eba9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.21-wmf11
Gerrit-Owner: Anja Jentzsch 

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


[MediaWiki-commits] [Gerrit] (Bug 45111) Change squashing to trimming of whitespace and c... - change (mediawiki...Wikibase)

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

Change subject: (Bug 45111) Change squashing to trimming of whitespace and 
control chars
..


(Bug 45111) Change squashing to trimming of whitespace and control chars

The final version of this removes most of the squashing of white space
and control chars and only trims leading and trailing white space and
replaces sequences of the old control chars (the lower block) with spaces.

This means that form feed, tab, carriage return, new line, etc, are replaced
with a single white space because they are control chars. The chars zero width
joiner and zero width non-joiner will be passed on unchanged as they are in the
control char formatting block.

Change-Id: Icc9e48d33b9f5c4ae0a3fd8000c4c54d2883b66d
---
M lib/includes/Term.php
M lib/includes/Utils.php
M lib/tests/phpunit/UtilsTest.php
M repo/includes/Autocomment.php
M repo/includes/api/EditEntity.php
M repo/includes/api/GetEntities.php
M repo/includes/api/ModifyEntity.php
M repo/includes/api/SetAliases.php
M repo/includes/api/SetDescription.php
M repo/includes/api/SetLabel.php
M repo/includes/api/SetSiteLink.php
M repo/includes/specials/SpecialCreateEntity.php
12 files changed, 51 insertions(+), 49 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/lib/includes/Term.php b/lib/includes/Term.php
index 3de40f3..dbfaad2 100644
--- a/lib/includes/Term.php
+++ b/lib/includes/Term.php
@@ -233,7 +233,7 @@
//  But that requires us to load ALL the language objects,
//  which loads ALL the messages, which makes us run out
//  of RAM (see bug 41103).
-   return mb_strtolower( Utils::squashToNFC( $text ) );
+   return mb_strtolower( Utils::trimToNFC( $text ) );
}
 
/**
diff --git a/lib/includes/Utils.php b/lib/includes/Utils.php
index d9dcf5b..b3b0a10 100644
--- a/lib/includes/Utils.php
+++ b/lib/includes/Utils.php
@@ -179,7 +179,7 @@
}
 
/**
-* Trim initial and trailing whitespace, and compress internal ones.
+* Trim initial and trailing whitespace and control chars, and 
optionally compress internal ones.
 *
 * @since 0.1
 *
@@ -187,9 +187,12 @@
 *
 * @return string where whitespace possibly are removed.
 */
-   static public function squashWhitespace( $inputString ) {
-   $trimmed = preg_replace( '/^[\pZ\pC]+|[\pZ\pC]+$/u', '', 
$inputString );
-   return preg_replace('/[\pZ\pC]+/u', ' ', $trimmed );
+   static public function trimWhitespace( $inputString ) {
+   // \p{Z} - whitespace
+   // \p{Cc} - control chars
+   $trimmed = preg_replace( '/^[\p{Z}\p{Cc}]+|[\p{Z}\p{Cc}]+$/u', 
'', $inputString );
+   $trimmed = preg_replace( '/[\p{Cc}]+/u', ' ', $trimmed );
+   return $trimmed;
}
 
/**
@@ -214,8 +217,8 @@
 *
 * @return string on NFC form
 */
-   static public function squashToNFC( $inputString ) {
-   return self::cleanupToNFC( self::squashWhitespace( $inputString 
) );
+   static public function trimToNFC( $inputString ) {
+   return self::cleanupToNFC( self::trimWhitespace( $inputString ) 
);
}
 
/**
diff --git a/lib/tests/phpunit/UtilsTest.php b/lib/tests/phpunit/UtilsTest.php
index 819c015..f84d6e2 100644
--- a/lib/tests/phpunit/UtilsTest.php
+++ b/lib/tests/phpunit/UtilsTest.php
@@ -46,21 +46,24 @@
 
/**
 * @group WikibaseUtils
-* @dataProvider providerSquashWhitespace
+* @dataProvider providerTrimWhitespace
 */
-   public function testSquashWhitespace( $string, $expected ) {
-   $this->assertEquals( $expected, Utils::squashWhitespace( 
$string ) );
+   public function testTrimWhitespace( $string, $expected ) {
+   $this->assertEquals( $expected, Utils::trimWhitespace( $string 
) );
}
 
-   public static function providerSquashWhitespace() {
+   public static function providerTrimWhitespace() {
return array(
-   array( 'foo bar', 'foo bar'),
-   array( ' foo  bar ', 'foo bar'),
-   array( '  foo   bar  ', 'foo bar'),
-   array( "foo\tbar", 'foo bar'),
-   array( "foo\nbar", 'foo bar'),
-   array( "foo\rbar", 'foo bar'),
-   array( "\r \t\nfoo\r\t\t\tbar\n\n\n\r\r", 'foo bar'),
+   array( 'foo bar', 'foo bar'), // #0
+   array( ' foo  bar ', 'foo  bar'), // #1
+   array( '  foo   bar  ', 'foo   bar'), // #2
+   array( "foo\tbar", 'foo bar'), // #3, both a space and 
control char
+ 

[MediaWiki-commits] [Gerrit] (Bug 45111) Change squashing to trimming of whitespace and c... - change (mediawiki...Wikibase)

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

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


Change subject: (Bug 45111) Change squashing to trimming of whitespace and 
control chars
..

(Bug 45111) Change squashing to trimming of whitespace and control chars

The final version of this removes most of the squashing of white space
and control chars and only trims leading and trailing white space and
replaces sequences of the old control chars (the lower block) with spaces.

This means that form feed, tab, carriage return, new line, etc, are replaced
with a single white space because they are control chars. The chars zero width
joiner and zero width non-joiner will be passed on unchanged as they are in the
control char formatting block.

Change-Id: Icc9e48d33b9f5c4ae0a3fd8000c4c54d2883b66d
---
M lib/includes/Term.php
M lib/includes/Utils.php
M lib/tests/phpunit/UtilsTest.php
M repo/includes/Autocomment.php
M repo/includes/api/EditEntity.php
M repo/includes/api/GetEntities.php
M repo/includes/api/ModifyEntity.php
M repo/includes/api/SetAliases.php
M repo/includes/api/SetDescription.php
M repo/includes/api/SetLabel.php
M repo/includes/api/SetSiteLink.php
M repo/includes/specials/SpecialCreateEntity.php
12 files changed, 51 insertions(+), 49 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/29/51929/1

diff --git a/lib/includes/Term.php b/lib/includes/Term.php
index 3de40f3..dbfaad2 100644
--- a/lib/includes/Term.php
+++ b/lib/includes/Term.php
@@ -233,7 +233,7 @@
//  But that requires us to load ALL the language objects,
//  which loads ALL the messages, which makes us run out
//  of RAM (see bug 41103).
-   return mb_strtolower( Utils::squashToNFC( $text ) );
+   return mb_strtolower( Utils::trimToNFC( $text ) );
}
 
/**
diff --git a/lib/includes/Utils.php b/lib/includes/Utils.php
index d9dcf5b..b3b0a10 100644
--- a/lib/includes/Utils.php
+++ b/lib/includes/Utils.php
@@ -179,7 +179,7 @@
}
 
/**
-* Trim initial and trailing whitespace, and compress internal ones.
+* Trim initial and trailing whitespace and control chars, and 
optionally compress internal ones.
 *
 * @since 0.1
 *
@@ -187,9 +187,12 @@
 *
 * @return string where whitespace possibly are removed.
 */
-   static public function squashWhitespace( $inputString ) {
-   $trimmed = preg_replace( '/^[\pZ\pC]+|[\pZ\pC]+$/u', '', 
$inputString );
-   return preg_replace('/[\pZ\pC]+/u', ' ', $trimmed );
+   static public function trimWhitespace( $inputString ) {
+   // \p{Z} - whitespace
+   // \p{Cc} - control chars
+   $trimmed = preg_replace( '/^[\p{Z}\p{Cc}]+|[\p{Z}\p{Cc}]+$/u', 
'', $inputString );
+   $trimmed = preg_replace( '/[\p{Cc}]+/u', ' ', $trimmed );
+   return $trimmed;
}
 
/**
@@ -214,8 +217,8 @@
 *
 * @return string on NFC form
 */
-   static public function squashToNFC( $inputString ) {
-   return self::cleanupToNFC( self::squashWhitespace( $inputString 
) );
+   static public function trimToNFC( $inputString ) {
+   return self::cleanupToNFC( self::trimWhitespace( $inputString ) 
);
}
 
/**
diff --git a/lib/tests/phpunit/UtilsTest.php b/lib/tests/phpunit/UtilsTest.php
index 819c015..f84d6e2 100644
--- a/lib/tests/phpunit/UtilsTest.php
+++ b/lib/tests/phpunit/UtilsTest.php
@@ -46,21 +46,24 @@
 
/**
 * @group WikibaseUtils
-* @dataProvider providerSquashWhitespace
+* @dataProvider providerTrimWhitespace
 */
-   public function testSquashWhitespace( $string, $expected ) {
-   $this->assertEquals( $expected, Utils::squashWhitespace( 
$string ) );
+   public function testTrimWhitespace( $string, $expected ) {
+   $this->assertEquals( $expected, Utils::trimWhitespace( $string 
) );
}
 
-   public static function providerSquashWhitespace() {
+   public static function providerTrimWhitespace() {
return array(
-   array( 'foo bar', 'foo bar'),
-   array( ' foo  bar ', 'foo bar'),
-   array( '  foo   bar  ', 'foo bar'),
-   array( "foo\tbar", 'foo bar'),
-   array( "foo\nbar", 'foo bar'),
-   array( "foo\rbar", 'foo bar'),
-   array( "\r \t\nfoo\r\t\t\tbar\n\n\n\r\r", 'foo bar'),
+   array( 'foo bar', 'foo bar'), // #0
+   array( ' foo  bar ', 'foo  bar'), // #1
+   array( '  foo   bar  ', 'foo   bar'), // #2
+   array( "foo\tbar", 'foo bar'), // #3, both a 

[MediaWiki-commits] [Gerrit] Further work on claim diff visualization - change (mediawiki...Wikibase)

2013-03-01 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: Further work on claim diff visualization
..


Further work on claim diff visualization

Change-Id: Iefb28bb70af3380e820ae1e3955e89f95e901383
---
M lib/includes/DiffOpValueFormatter.php
M lib/includes/DiffView.php
M lib/includes/claim/ClaimDifferenceVisualizer.php
M lib/includes/entity/EntityDiffVisualizer.php
M lib/tests/phpunit/claim/ClaimDifferenceVisualizerTest.php
5 files changed, 241 insertions(+), 116 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved



diff --git a/lib/includes/DiffOpValueFormatter.php 
b/lib/includes/DiffOpValueFormatter.php
index f1411e9..1b6cd62 100644
--- a/lib/includes/DiffOpValueFormatter.php
+++ b/lib/includes/DiffOpValueFormatter.php
@@ -6,7 +6,7 @@
 use Diff;
 
 /**
- * Class for generating HTML for Claim Diffs.
+ * Class for formatting diffs, @todo might be renamed or something
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -34,12 +34,36 @@
  */
 class DiffOpValueFormatter {
 
+   /**
+* @since 0.4
+*
+* @var string
+*/
protected $name;
 
+   /**
+* @since 0.4
+*
+* @var string
+*/
protected $oldValue;
 
+   /**
+* @since 0.4
+*
+* @var string
+*/
protected $newValue;
 
+   /**
+* Constructor.
+*
+* @since 0.4
+*
+* @param string $name
+* @param string $oldValue
+* @param string $newValue
+*/
public function __construct( $name, $oldValue, $newValue ) {
$this->name = $name;
$this->oldValue = $oldValue;
@@ -54,9 +78,12 @@
 * @return string
 */
protected function generateHeaderHtml() {
+   $oldHeader = is_string( $this->oldValue ) ? $this->name : '';
+   $newHeader = is_string( $this->newValue ) ? $this->name : '';
+
$html = Html::openElement( 'tr' );
-   $html .= Html::rawElement( 'td', array( 'colspan'=>'2', 'class' 
=> 'diff-lineno' ), $this->name );
-   $html .= Html::rawElement( 'td', array( 'colspan'=>'2', 'class' 
=> 'diff-lineno' ), $this->name );
+   $html .= Html::element( 'td', array( 'colspan'=>'2', 'class' => 
'diff-lineno' ), $oldHeader );
+   $html .= Html::element( 'td', array( 'colspan'=>'2', 'class' => 
'diff-lineno' ), $newHeader );
$html .= Html::closeElement( 'tr' );
 
return $html;
@@ -74,12 +101,12 @@
$html .= Html::rawElement( 'td', array( 'class' => 
'diff-marker' ), '-' );
$html .= Html::rawElement( 'td', array( 'class' => 
'diff-deletedline' ),
Html::rawElement( 'div', array(),
-   Html::rawElement( 'del', array( 'class' => 
'diffchange diffchange-inline' ),
+   Html::element( 'del', array( 'class' => 
'diffchange diffchange-inline' ),
$this->oldValue ) ) );
$html .= Html::rawElement( 'td', array( 'class' => 
'diff-marker' ), '+' );
$html .= Html::rawElement( 'td', array( 'class' => 
'diff-addedline' ),
Html::rawElement( 'div', array(),
-   Html::rawElement( 'ins', array( 'class' => 
'diffchange diffchange-inline' ),
+   Html::element( 'ins', array( 'class' => 
'diffchange diffchange-inline' ),
$this->newValue ) ) );
$html .= Html::closeElement( 'tr' );
$html .= Html::closeElement( 'tr' );
@@ -100,7 +127,7 @@
$html .= Html::rawElement( 'td', array( 'class' => 
'diff-marker' ), '+' );
$html .= Html::rawElement( 'td', array( 'class' => 
'diff-addedline' ),
Html::rawElement( 'div', array(),
-   Html::rawElement( 'ins', array( 'class' => 
'diffchange diffchange-inline' ),
+   Html::element( 'ins', array( 'class' => 
'diffchange diffchange-inline' ),
$this->newValue )
)
);
@@ -121,7 +148,7 @@
$html .= Html::rawElement( 'td', array( 'class' => 
'diff-marker' ), '-' );
$html .= Html::rawElement( 'td', array( 'class' => 
'diff-deletedline' ),
Html::rawElement( 'div', array(),
-   Html::rawElement( 'del', array( 'class' => 
'diffchange diffchange-inline' ),
+   Html::element( 'del', array( 'class' => 
'diffchange diffchange-inline' ),
$t

[MediaWiki-commits] [Gerrit] Further work on claim diff visualization - change (mediawiki...Wikibase)

2013-03-01 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has uploaded a new change for review.

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


Change subject: Further work on claim diff visualization
..

Further work on claim diff visualization

Change-Id: Iefb28bb70af3380e820ae1e3955e89f95e901383
---
M lib/includes/DiffOpValueFormatter.php
M lib/includes/DiffView.php
M lib/includes/claim/ClaimDifferenceVisualizer.php
M lib/includes/entity/EntityDiffVisualizer.php
M lib/tests/phpunit/claim/ClaimDifferenceVisualizerTest.php
5 files changed, 241 insertions(+), 116 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/54/51654/1

diff --git a/lib/includes/DiffOpValueFormatter.php 
b/lib/includes/DiffOpValueFormatter.php
index f1411e9..1b6cd62 100644
--- a/lib/includes/DiffOpValueFormatter.php
+++ b/lib/includes/DiffOpValueFormatter.php
@@ -6,7 +6,7 @@
 use Diff;
 
 /**
- * Class for generating HTML for Claim Diffs.
+ * Class for formatting diffs, @todo might be renamed or something
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -34,12 +34,36 @@
  */
 class DiffOpValueFormatter {
 
+   /**
+* @since 0.4
+*
+* @var string
+*/
protected $name;
 
+   /**
+* @since 0.4
+*
+* @var string
+*/
protected $oldValue;
 
+   /**
+* @since 0.4
+*
+* @var string
+*/
protected $newValue;
 
+   /**
+* Constructor.
+*
+* @since 0.4
+*
+* @param string $name
+* @param string $oldValue
+* @param string $newValue
+*/
public function __construct( $name, $oldValue, $newValue ) {
$this->name = $name;
$this->oldValue = $oldValue;
@@ -54,9 +78,12 @@
 * @return string
 */
protected function generateHeaderHtml() {
+   $oldHeader = is_string( $this->oldValue ) ? $this->name : '';
+   $newHeader = is_string( $this->newValue ) ? $this->name : '';
+
$html = Html::openElement( 'tr' );
-   $html .= Html::rawElement( 'td', array( 'colspan'=>'2', 'class' 
=> 'diff-lineno' ), $this->name );
-   $html .= Html::rawElement( 'td', array( 'colspan'=>'2', 'class' 
=> 'diff-lineno' ), $this->name );
+   $html .= Html::element( 'td', array( 'colspan'=>'2', 'class' => 
'diff-lineno' ), $oldHeader );
+   $html .= Html::element( 'td', array( 'colspan'=>'2', 'class' => 
'diff-lineno' ), $newHeader );
$html .= Html::closeElement( 'tr' );
 
return $html;
@@ -74,12 +101,12 @@
$html .= Html::rawElement( 'td', array( 'class' => 
'diff-marker' ), '-' );
$html .= Html::rawElement( 'td', array( 'class' => 
'diff-deletedline' ),
Html::rawElement( 'div', array(),
-   Html::rawElement( 'del', array( 'class' => 
'diffchange diffchange-inline' ),
+   Html::element( 'del', array( 'class' => 
'diffchange diffchange-inline' ),
$this->oldValue ) ) );
$html .= Html::rawElement( 'td', array( 'class' => 
'diff-marker' ), '+' );
$html .= Html::rawElement( 'td', array( 'class' => 
'diff-addedline' ),
Html::rawElement( 'div', array(),
-   Html::rawElement( 'ins', array( 'class' => 
'diffchange diffchange-inline' ),
+   Html::element( 'ins', array( 'class' => 
'diffchange diffchange-inline' ),
$this->newValue ) ) );
$html .= Html::closeElement( 'tr' );
$html .= Html::closeElement( 'tr' );
@@ -100,7 +127,7 @@
$html .= Html::rawElement( 'td', array( 'class' => 
'diff-marker' ), '+' );
$html .= Html::rawElement( 'td', array( 'class' => 
'diff-addedline' ),
Html::rawElement( 'div', array(),
-   Html::rawElement( 'ins', array( 'class' => 
'diffchange diffchange-inline' ),
+   Html::element( 'ins', array( 'class' => 
'diffchange diffchange-inline' ),
$this->newValue )
)
);
@@ -121,7 +148,7 @@
$html .= Html::rawElement( 'td', array( 'class' => 
'diff-marker' ), '-' );
$html .= Html::rawElement( 'td', array( 'class' => 
'diff-deletedline' ),
Html::rawElement( 'div', array(),
-   Html::rawElement( 'del', array( 'class' => 
'diffchange diffchange-inline' ),
+   Html::element( 'del', array( 'class' => 
'diffchang

[MediaWiki-commits] [Gerrit] Simple diff visualization - change (mediawiki...Wikibase)

2013-03-01 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: Simple diff visualization
..


Simple diff visualization

- todo: make sure all cases are covered, such as reference change
- further design improvements
- tests
- there's opportunity for DiffView and other places to share code

Change-Id: I4459f274b092a4c0aa707af8bafd175775b2c51e
---
M lib/WikibaseLib.php
A lib/includes/DiffOpValueFormatter.php
M lib/includes/claim/ClaimDifferenceVisualizer.php
M lib/includes/entity/EntityDiffVisualizer.php
M repo/includes/EntityContentDiffView.php
M repo/includes/actions/EditEntityAction.php
6 files changed, 414 insertions(+), 25 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved



diff --git a/lib/WikibaseLib.php b/lib/WikibaseLib.php
index f0e5545..2955626 100644
--- a/lib/WikibaseLib.php
+++ b/lib/WikibaseLib.php
@@ -99,6 +99,7 @@
 $wgAutoloadClasses['Wikibase\ChangeNotifier']  = $dir . 
'includes/ChangeNotifier.php';
 $wgAutoloadClasses['Wikibase\ChangeNotificationJob']   = $dir . 
'includes/ChangeNotificationJob.php';
 $wgAutoloadClasses['Wikibase\ChangesTable']= $dir . 
'includes/ChangesTable.php';
+$wgAutoloadClasses['Wikibase\DiffOpValueFormatter']= $dir . 
'includes/DiffOpValueFormatter.php';
 $wgAutoloadClasses['Wikibase\DiffView']= $dir 
. 'includes/DiffView.php';
 $wgAutoloadClasses['Wikibase\Lib\GuidGenerator']   = $dir . 
'includes/GuidGenerator.php';
 $wgAutoloadClasses['Wikibase\Lib\V4GuidGenerator'] = $dir . 
'includes/GuidGenerator.php';
diff --git a/lib/includes/DiffOpValueFormatter.php 
b/lib/includes/DiffOpValueFormatter.php
new file mode 100644
index 000..f1411e9
--- /dev/null
+++ b/lib/includes/DiffOpValueFormatter.php
@@ -0,0 +1,150 @@
+http://www.gnu.org/copyleft/gpl.html
+ *
+ * @since 0.4
+ *
+ * @file
+ * @ingroup WikibaseLib
+ *
+ * @licence GNU GPL v2+
+ * @author Tobias Gritschacher < tobias.gritschac...@wikimedia.de >
+ * @author Katie Filbert < aude.w...@gmail.com >
+ */
+class DiffOpValueFormatter {
+
+   protected $name;
+
+   protected $oldValue;
+
+   protected $newValue;
+
+   public function __construct( $name, $oldValue, $newValue ) {
+   $this->name = $name;
+   $this->oldValue = $oldValue;
+   $this->newValue = $newValue;
+   }
+
+   /**
+* Generates HTML for the header of the diff operation
+*
+* @since 0.4
+*
+* @return string
+*/
+   protected function generateHeaderHtml() {
+   $html = Html::openElement( 'tr' );
+   $html .= Html::rawElement( 'td', array( 'colspan'=>'2', 'class' 
=> 'diff-lineno' ), $this->name );
+   $html .= Html::rawElement( 'td', array( 'colspan'=>'2', 'class' 
=> 'diff-lineno' ), $this->name );
+   $html .= Html::closeElement( 'tr' );
+
+   return $html;
+   }
+
+   /**
+* Generates HTML for an change diffOp
+*
+* @since 0.4
+*
+* @return string
+*/
+   protected function generateChangeOpHtml() {
+   $html = Html::openElement( 'tr' );
+   $html .= Html::rawElement( 'td', array( 'class' => 
'diff-marker' ), '-' );
+   $html .= Html::rawElement( 'td', array( 'class' => 
'diff-deletedline' ),
+   Html::rawElement( 'div', array(),
+   Html::rawElement( 'del', array( 'class' => 
'diffchange diffchange-inline' ),
+   $this->oldValue ) ) );
+   $html .= Html::rawElement( 'td', array( 'class' => 
'diff-marker' ), '+' );
+   $html .= Html::rawElement( 'td', array( 'class' => 
'diff-addedline' ),
+   Html::rawElement( 'div', array(),
+   Html::rawElement( 'ins', array( 'class' => 
'diffchange diffchange-inline' ),
+   $this->newValue ) ) );
+   $html .= Html::closeElement( 'tr' );
+   $html .= Html::closeElement( 'tr' );
+
+   return $html;
+   }
+
+   /**
+* Generates HTML for an add diffOp
+*
+* @since 0.4
+*
+* @return string
+*/
+   protected function generateAddOpHtml() {
+   $html = Html::openElement( 'tr' );
+   $html .= Html::rawElement( 'td', array( 'colspan'=>'2' ), 
' ' );
+   $html .= Html::rawElement( 'td', array( 'class' => 
'diff-marker' ), '+' );
+   $html .= Html::rawElement( 'td', array( 'class' => 
'diff-addedline' ),
+   Html::rawElement( 'div', array(),
+   Html::rawElement( 'ins', array( 'class' => 
'diffchange diffchange-inline' ),
+   $this

[MediaWiki-commits] [Gerrit] Simple diff visualization - change (mediawiki...Wikibase)

2013-03-01 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has uploaded a new change for review.

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


Change subject: Simple diff visualization
..

Simple diff visualization

- todo: make sure all cases are covered, such as reference change
- further design improvements
- tests
- there's opportunity for DiffView and other places to share code

Change-Id: I4459f274b092a4c0aa707af8bafd175775b2c51e
---
M lib/WikibaseLib.php
A lib/includes/DiffOpValueFormatter.php
M lib/includes/claim/ClaimDifferenceVisualizer.php
M lib/includes/entity/EntityDiffVisualizer.php
M repo/includes/EntityContentDiffView.php
M repo/includes/actions/EditEntityAction.php
6 files changed, 414 insertions(+), 25 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/53/51653/1

diff --git a/lib/WikibaseLib.php b/lib/WikibaseLib.php
index f0e5545..2955626 100644
--- a/lib/WikibaseLib.php
+++ b/lib/WikibaseLib.php
@@ -99,6 +99,7 @@
 $wgAutoloadClasses['Wikibase\ChangeNotifier']  = $dir . 
'includes/ChangeNotifier.php';
 $wgAutoloadClasses['Wikibase\ChangeNotificationJob']   = $dir . 
'includes/ChangeNotificationJob.php';
 $wgAutoloadClasses['Wikibase\ChangesTable']= $dir . 
'includes/ChangesTable.php';
+$wgAutoloadClasses['Wikibase\DiffOpValueFormatter']= $dir . 
'includes/DiffOpValueFormatter.php';
 $wgAutoloadClasses['Wikibase\DiffView']= $dir 
. 'includes/DiffView.php';
 $wgAutoloadClasses['Wikibase\Lib\GuidGenerator']   = $dir . 
'includes/GuidGenerator.php';
 $wgAutoloadClasses['Wikibase\Lib\V4GuidGenerator'] = $dir . 
'includes/GuidGenerator.php';
diff --git a/lib/includes/DiffOpValueFormatter.php 
b/lib/includes/DiffOpValueFormatter.php
new file mode 100644
index 000..f1411e9
--- /dev/null
+++ b/lib/includes/DiffOpValueFormatter.php
@@ -0,0 +1,150 @@
+http://www.gnu.org/copyleft/gpl.html
+ *
+ * @since 0.4
+ *
+ * @file
+ * @ingroup WikibaseLib
+ *
+ * @licence GNU GPL v2+
+ * @author Tobias Gritschacher < tobias.gritschac...@wikimedia.de >
+ * @author Katie Filbert < aude.w...@gmail.com >
+ */
+class DiffOpValueFormatter {
+
+   protected $name;
+
+   protected $oldValue;
+
+   protected $newValue;
+
+   public function __construct( $name, $oldValue, $newValue ) {
+   $this->name = $name;
+   $this->oldValue = $oldValue;
+   $this->newValue = $newValue;
+   }
+
+   /**
+* Generates HTML for the header of the diff operation
+*
+* @since 0.4
+*
+* @return string
+*/
+   protected function generateHeaderHtml() {
+   $html = Html::openElement( 'tr' );
+   $html .= Html::rawElement( 'td', array( 'colspan'=>'2', 'class' 
=> 'diff-lineno' ), $this->name );
+   $html .= Html::rawElement( 'td', array( 'colspan'=>'2', 'class' 
=> 'diff-lineno' ), $this->name );
+   $html .= Html::closeElement( 'tr' );
+
+   return $html;
+   }
+
+   /**
+* Generates HTML for an change diffOp
+*
+* @since 0.4
+*
+* @return string
+*/
+   protected function generateChangeOpHtml() {
+   $html = Html::openElement( 'tr' );
+   $html .= Html::rawElement( 'td', array( 'class' => 
'diff-marker' ), '-' );
+   $html .= Html::rawElement( 'td', array( 'class' => 
'diff-deletedline' ),
+   Html::rawElement( 'div', array(),
+   Html::rawElement( 'del', array( 'class' => 
'diffchange diffchange-inline' ),
+   $this->oldValue ) ) );
+   $html .= Html::rawElement( 'td', array( 'class' => 
'diff-marker' ), '+' );
+   $html .= Html::rawElement( 'td', array( 'class' => 
'diff-addedline' ),
+   Html::rawElement( 'div', array(),
+   Html::rawElement( 'ins', array( 'class' => 
'diffchange diffchange-inline' ),
+   $this->newValue ) ) );
+   $html .= Html::closeElement( 'tr' );
+   $html .= Html::closeElement( 'tr' );
+
+   return $html;
+   }
+
+   /**
+* Generates HTML for an add diffOp
+*
+* @since 0.4
+*
+* @return string
+*/
+   protected function generateAddOpHtml() {
+   $html = Html::openElement( 'tr' );
+   $html .= Html::rawElement( 'td', array( 'colspan'=>'2' ), 
' ' );
+   $html .= Html::rawElement( 'td', array( 'class' => 
'diff-marker' ), '+' );
+   $html .= Html::rawElement( 'td', array( 'class' => 
'diff-addedline' ),
+   Html::rawElement( 'div', array(),
+   Html::rawElement( 'ins', array( 'class' => 
'diffchange d

[MediaWiki-commits] [Gerrit] (bug 44095) enhanced claim diff visualizaion including refs - change (mediawiki...Wikibase)

2013-03-01 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: (bug 44095) enhanced claim diff visualizaion including refs
..


(bug 44095) enhanced claim diff visualizaion including refs

- still todo: qualifiers, ranks.

squashed:

(bug 44095) visualize claim differences

This commit is a follow up to 5fc812442e19d55a7d1c2072ba8a839ce7d1f067.
It tackles some design issues and adds tests, while removing the
preliminary visualization code, which needs to be re-added.

Change-Id: I7f8645df860b1860b4016003f52e7959af685a25
---
M lib/WikibaseLib.hooks.php
M lib/WikibaseLib.i18n.php
M lib/WikibaseLib.php
M lib/includes/DiffView.php
A lib/includes/claim/ClaimDiffer.php
A lib/includes/claim/ClaimDifference.php
A lib/includes/claim/ClaimDifferenceVisualizer.php
D lib/includes/entity/EntityDiffView.php
A lib/includes/entity/EntityDiffVisualizer.php
A lib/tests/phpunit/claim/ClaimDifferTest.php
A lib/tests/phpunit/claim/ClaimDifferenceTest.php
A lib/tests/phpunit/claim/ClaimDifferenceVisualizerTest.php
M repo/includes/EntityContentDiffView.php
M repo/includes/actions/EditEntityAction.php
14 files changed, 768 insertions(+), 197 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved



diff --git a/lib/WikibaseLib.hooks.php b/lib/WikibaseLib.hooks.php
index 7487c4d..b1c6cfd 100644
--- a/lib/WikibaseLib.hooks.php
+++ b/lib/WikibaseLib.hooks.php
@@ -33,6 +33,9 @@
'changes/EntityChange',
 
'claim/ClaimAggregate',
+   'claim/ClaimDifference',
+   'claim/ClaimDifferenceVisualizer',
+   'claim/ClaimDiffer',
'claim/ClaimListAccess',
'claim/Claims',
'claim/Claim',
diff --git a/lib/WikibaseLib.i18n.php b/lib/WikibaseLib.i18n.php
index d85f151..39fdd75 100644
--- a/lib/WikibaseLib.i18n.php
+++ b/lib/WikibaseLib.i18n.php
@@ -21,6 +21,9 @@
'wikibase-entity-item' => 'item',
'wikibase-entity-property' => 'property',
'wikibase-entity-query' => 'query',
+   'wikibase-diffview-reference' => 'reference',
+   'wikibase-diffview-rank' => 'rank',
+   'wikibase-diffview-qualifier' => 'qualifier',
'wikibase-error-unexpected' => 'An unexpected error occurred.',
'wikibase-error-save-generic' => 'An error occurred while trying to 
perform save and because of this, your changes could not be completed.',
'wikibase-error-remove-generic' => 'An error occurred while trying to 
perform remove and because of this, your changes could not be completed.',
@@ -63,6 +66,9 @@
 {{Identical|Property}}',
'wikibase-entity-query' => 'How we refer to entities of type query. See 
also Wikidatas glossary on [[m:Wikidata/Glossary#entity|entity]].
 {{Identical|Query}}',
+   'wikibase-diffview-reference' => 'Label within the header of a 
diff-operation on the entity diff view to describe that the diff-operation 
affects a reference. Will be shown as e.g. "claim / property q1 / referenece".',
+   'wikibase-diffview-rank' => 'Label within the header of a 
diff-operation on the entity diff view to describe that the diff-operation 
affects the rank of the statement. Will be shown as e.g. "claim / property q1 / 
rank".',
+   'wikibase-diffview-qualifier' => 'Label within the header of a 
diff-operation on the entity diff view to describe that the diff-operation 
affects a qualifier. Will be shown as e.g. "claim / property q1 / qualifier".',
'wikibase-error-unexpected' => 'Error message that is used as a 
fallback message if no other message can be assigned to the error that 
occurred. This error message being displayed should never happen. However, 
there may be "unexpected" errors not covered by the implemented error 
handling.',
'wikibase-error-save-generic' => 'Generic error message for an error 
happening during a save operation.',
'wikibase-error-remove-generic' => 'Generic error message for an error 
happening during a remove operation',
diff --git a/lib/WikibaseLib.php b/lib/WikibaseLib.php
index 0a9987f..f0e5545 100644
--- a/lib/WikibaseLib.php
+++ b/lib/WikibaseLib.php
@@ -129,6 +129,9 @@
 // includes/claims
 $wgAutoloadClasses['Wikibase\Claim']   = $dir . 
'includes/claim/Claim.php';
 $wgAutoloadClasses['Wikibase\ClaimAggregate']  = $dir . 
'includes/claim/ClaimAggregate.php';
+$wgAutoloadClasses['Wikibase\ClaimDiffer'] = $dir . 
'includes/claim/ClaimDiffer.php';
+$wgAutoloadClasses['Wikibase\ClaimDifference'] = $dir . 
'includes/claim/ClaimDifference.php';
+$wgAutoloadClasses['Wikibase\ClaimDifferenceVisualizer'] = $dir . 
'includes/claim/ClaimDifferenceVisualizer.php';
 $wgAutoloadClasses['Wikibase\ClaimListAccess'] = $dir . 
'includes/claim/ClaimListAccess.php';
 $wgAutoloadClasses['Wikibase\Cl

[MediaWiki-commits] [Gerrit] (bug 44095) enhanced claim diff visualizaion including refs - change (mediawiki...Wikibase)

2013-03-01 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has uploaded a new change for review.

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


Change subject: (bug 44095) enhanced claim diff visualizaion including refs
..

(bug 44095) enhanced claim diff visualizaion including refs

- still todo: qualifiers, ranks.

squashed:

(bug 44095) visualize claim differences

This commit is a follow up to 5fc812442e19d55a7d1c2072ba8a839ce7d1f067.
It tackles some design issues and adds tests, while removing the
preliminary visualization code, which needs to be re-added.

Change-Id: I7f8645df860b1860b4016003f52e7959af685a25
---
M lib/WikibaseLib.hooks.php
M lib/WikibaseLib.i18n.php
M lib/WikibaseLib.php
M lib/includes/DiffView.php
A lib/includes/claim/ClaimDiffer.php
A lib/includes/claim/ClaimDifference.php
A lib/includes/claim/ClaimDifferenceVisualizer.php
D lib/includes/entity/EntityDiffView.php
A lib/includes/entity/EntityDiffVisualizer.php
A lib/tests/phpunit/claim/ClaimDifferTest.php
A lib/tests/phpunit/claim/ClaimDifferenceTest.php
A lib/tests/phpunit/claim/ClaimDifferenceVisualizerTest.php
M repo/includes/EntityContentDiffView.php
M repo/includes/actions/EditEntityAction.php
14 files changed, 768 insertions(+), 197 deletions(-)


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

diff --git a/lib/WikibaseLib.hooks.php b/lib/WikibaseLib.hooks.php
index 7487c4d..b1c6cfd 100644
--- a/lib/WikibaseLib.hooks.php
+++ b/lib/WikibaseLib.hooks.php
@@ -33,6 +33,9 @@
'changes/EntityChange',
 
'claim/ClaimAggregate',
+   'claim/ClaimDifference',
+   'claim/ClaimDifferenceVisualizer',
+   'claim/ClaimDiffer',
'claim/ClaimListAccess',
'claim/Claims',
'claim/Claim',
diff --git a/lib/WikibaseLib.i18n.php b/lib/WikibaseLib.i18n.php
index d85f151..39fdd75 100644
--- a/lib/WikibaseLib.i18n.php
+++ b/lib/WikibaseLib.i18n.php
@@ -21,6 +21,9 @@
'wikibase-entity-item' => 'item',
'wikibase-entity-property' => 'property',
'wikibase-entity-query' => 'query',
+   'wikibase-diffview-reference' => 'reference',
+   'wikibase-diffview-rank' => 'rank',
+   'wikibase-diffview-qualifier' => 'qualifier',
'wikibase-error-unexpected' => 'An unexpected error occurred.',
'wikibase-error-save-generic' => 'An error occurred while trying to 
perform save and because of this, your changes could not be completed.',
'wikibase-error-remove-generic' => 'An error occurred while trying to 
perform remove and because of this, your changes could not be completed.',
@@ -63,6 +66,9 @@
 {{Identical|Property}}',
'wikibase-entity-query' => 'How we refer to entities of type query. See 
also Wikidatas glossary on [[m:Wikidata/Glossary#entity|entity]].
 {{Identical|Query}}',
+   'wikibase-diffview-reference' => 'Label within the header of a 
diff-operation on the entity diff view to describe that the diff-operation 
affects a reference. Will be shown as e.g. "claim / property q1 / referenece".',
+   'wikibase-diffview-rank' => 'Label within the header of a 
diff-operation on the entity diff view to describe that the diff-operation 
affects the rank of the statement. Will be shown as e.g. "claim / property q1 / 
rank".',
+   'wikibase-diffview-qualifier' => 'Label within the header of a 
diff-operation on the entity diff view to describe that the diff-operation 
affects a qualifier. Will be shown as e.g. "claim / property q1 / qualifier".',
'wikibase-error-unexpected' => 'Error message that is used as a 
fallback message if no other message can be assigned to the error that 
occurred. This error message being displayed should never happen. However, 
there may be "unexpected" errors not covered by the implemented error 
handling.',
'wikibase-error-save-generic' => 'Generic error message for an error 
happening during a save operation.',
'wikibase-error-remove-generic' => 'Generic error message for an error 
happening during a remove operation',
diff --git a/lib/WikibaseLib.php b/lib/WikibaseLib.php
index 0a9987f..f0e5545 100644
--- a/lib/WikibaseLib.php
+++ b/lib/WikibaseLib.php
@@ -129,6 +129,9 @@
 // includes/claims
 $wgAutoloadClasses['Wikibase\Claim']   = $dir . 
'includes/claim/Claim.php';
 $wgAutoloadClasses['Wikibase\ClaimAggregate']  = $dir . 
'includes/claim/ClaimAggregate.php';
+$wgAutoloadClasses['Wikibase\ClaimDiffer'] = $dir . 
'includes/claim/ClaimDiffer.php';
+$wgAutoloadClasses['Wikibase\ClaimDifference'] = $dir . 
'includes/claim/ClaimDifference.php';
+$wgAutoloadClasses['Wikibase\ClaimDifferenceVisualizer'] = $dir . 
'includes/claim/ClaimDifferenceVisualizer.php';
 $wgAutoloadClasses['Wikibase\ClaimListAccess'] = $dir . 
'inc

[MediaWiki-commits] [Gerrit] (testing) fix for selenium sitelinks tests - change (mediawiki...Wikibase)

2013-03-01 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: (testing) fix for selenium sitelinks tests
..


(testing) fix for selenium sitelinks tests

- we need a better way to get the suggestion list elements,
since the serach-box may or may not be a ui-autocomplete element too.

Change-Id: I4bf85a8319b4382145651c208d6caf913fa606d5
---
M selenium/lib/modules/sitelink_module.rb
1 file changed, 4 insertions(+), 3 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved



diff --git a/selenium/lib/modules/sitelink_module.rb 
b/selenium/lib/modules/sitelink_module.rb
index 1405056..020e70a 100644
--- a/selenium/lib/modules/sitelink_module.rb
+++ b/selenium/lib/modules/sitelink_module.rb
@@ -22,9 +22,10 @@
   text_field(:pageInputField, :xpath => "//table[contains(@class, 
'wb-sitelinks')]/tfoot/tr/td[contains(@class, 'wb-sitelinks-link')]/input")
   text_field(:pageInputFieldExistingSiteLink, :xpath => 
"//table[contains(@class, 'wb-sitelinks')]/tbody/tr/td[contains(@class, 
'wb-sitelinks-link')]/input")
   span(:saveSitelinkLinkDisabled, :class => "wb-ui-toolbar-button-disabled")
-  unordered_list(:siteIdAutocompleteList, :class => "ui-autocomplete", :index 
=> 0)
-  unordered_list(:pageAutocompleteList, :class => "ui-autocomplete", :index => 
1)
-  unordered_list(:editSitelinkAutocompleteList, :class => "ui-autocomplete", 
:index => 0)
+  unordered_list(:siteIdAutocompleteList, :class => 
"wikibase-siteselector-list")
+  #todo: this is not a nice way to get the suggestion list, we should find a 
better way
+  unordered_list(:pageAutocompleteList, :xpath => 
"//ul[@class='ui-autocomplete ui-menu ui-widget ui-widget-content ui-corner-all 
ui-suggester-list']")
+  unordered_list(:editSitelinkAutocompleteList, :xpath => 
"//ul[@class='ui-autocomplete ui-menu ui-widget ui-widget-content ui-corner-all 
ui-suggester-list']")
   link(:saveSitelinkLink, :text => "save")
   link(:cancelSitelinkLink, :text => "cancel")
   link(:removeSitelinkLink, :text => "remove")

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4bf85a8319b4382145651c208d6caf913fa606d5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.21-wmf11
Gerrit-Owner: Anja Jentzsch 
Gerrit-Reviewer: Anja Jentzsch 
Gerrit-Reviewer: Tobias Gritschacher 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] (testing) fix for selenium sitelinks tests - change (mediawiki...Wikibase)

2013-03-01 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has uploaded a new change for review.

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


Change subject: (testing) fix for selenium sitelinks tests
..

(testing) fix for selenium sitelinks tests

- we need a better way to get the suggestion list elements,
since the serach-box may or may not be a ui-autocomplete element too.

Change-Id: I4bf85a8319b4382145651c208d6caf913fa606d5
---
M selenium/lib/modules/sitelink_module.rb
1 file changed, 4 insertions(+), 3 deletions(-)


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

diff --git a/selenium/lib/modules/sitelink_module.rb 
b/selenium/lib/modules/sitelink_module.rb
index 1405056..020e70a 100644
--- a/selenium/lib/modules/sitelink_module.rb
+++ b/selenium/lib/modules/sitelink_module.rb
@@ -22,9 +22,10 @@
   text_field(:pageInputField, :xpath => "//table[contains(@class, 
'wb-sitelinks')]/tfoot/tr/td[contains(@class, 'wb-sitelinks-link')]/input")
   text_field(:pageInputFieldExistingSiteLink, :xpath => 
"//table[contains(@class, 'wb-sitelinks')]/tbody/tr/td[contains(@class, 
'wb-sitelinks-link')]/input")
   span(:saveSitelinkLinkDisabled, :class => "wb-ui-toolbar-button-disabled")
-  unordered_list(:siteIdAutocompleteList, :class => "ui-autocomplete", :index 
=> 0)
-  unordered_list(:pageAutocompleteList, :class => "ui-autocomplete", :index => 
1)
-  unordered_list(:editSitelinkAutocompleteList, :class => "ui-autocomplete", 
:index => 0)
+  unordered_list(:siteIdAutocompleteList, :class => 
"wikibase-siteselector-list")
+  #todo: this is not a nice way to get the suggestion list, we should find a 
better way
+  unordered_list(:pageAutocompleteList, :xpath => 
"//ul[@class='ui-autocomplete ui-menu ui-widget ui-widget-content ui-corner-all 
ui-suggester-list']")
+  unordered_list(:editSitelinkAutocompleteList, :xpath => 
"//ul[@class='ui-autocomplete ui-menu ui-widget ui-widget-content ui-corner-all 
ui-suggester-list']")
   link(:saveSitelinkLink, :text => "save")
   link(:cancelSitelinkLink, :text => "cancel")
   link(:removeSitelinkLink, :text => "remove")

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4bf85a8319b4382145651c208d6caf913fa606d5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.21-wmf11
Gerrit-Owner: Anja Jentzsch 
Gerrit-Reviewer: Tobias Gritschacher 

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


[MediaWiki-commits] [Gerrit] (Bug 45352, Bug 45353) Add ItemByTitle and ItemDisambiguatio... - change (mediawiki...Wikibase)

2013-02-28 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: (Bug 45352, Bug 45353) Add ItemByTitle and ItemDisambiguation 
to the special pages list
..


(Bug 45352, Bug 45353) Add ItemByTitle and ItemDisambiguation to the special 
pages list

Changes so ItemDisambiguation and ItemByTitle can be added to the list
of special pages. Also some minor changes to the messages used for those
pages.

There are also a name change in the list to ItemBySitelink, we are not
very good at following our own naming scheme. We should really try to
follow our glossary.

Change-Id: Id197c49dd52c482eb162f56522e5f0db0256b90a
---
M repo/Wikibase.i18n.php
M repo/Wikibase.php
M repo/includes/specials/SpecialItemByTitle.php
M repo/includes/specials/SpecialItemDisambiguation.php
M repo/includes/specials/SpecialItemResolver.php
5 files changed, 24 insertions(+), 18 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved



diff --git a/repo/Wikibase.i18n.php b/repo/Wikibase.i18n.php
index eb1b5cd..5721da3 100644
--- a/repo/Wikibase.i18n.php
+++ b/repo/Wikibase.i18n.php
@@ -112,7 +112,7 @@
'wikibase-itemlink-title' => '$1 | $2',
 
// Special pages
-   'special-itembytitle' => 'Item by title',
+   'special-itembytitle' => 'Item by sitelink',
'wikibase-itembytitle-lookup-fieldset' => 'Search for items by site and 
title',
'wikibase-itembytitle-lookup-site' => 'Site:',
'wikibase-itembytitle-lookup-page' => 'Page:',
@@ -121,8 +121,8 @@
'wikibase-itembytitle-invalid-site' => 'The previous query could not be 
used for a search. Please provide a valid site identifier.',
'wikibase-itembytitle-description' => 'Site is an identifier code, such 
as "enwiki".',
'wikibase-itembytitle-create' => 'You can also 
[{{fullurl:Special:CreateItem|site=$1&page=$2}} create an item].',
-   'special-itemdisambiguation' => 'Disambiguation: Items with the same 
label',
-   'wikibase-itemdisambiguation-lookup-fieldset' => 'Search for items by 
label',
+   'special-itemdisambiguation' => 'Item disambiguation',
+   'wikibase-itemdisambiguation-lookup-fieldset' => 'Search for items by 
language and label',
'wikibase-itemdisambiguation-lookup-language' => 'Language:',
'wikibase-itemdisambiguation-lookup-label' => 'Label:',
'wikibase-itemdisambiguation-submit' => 'Search',
diff --git a/repo/Wikibase.php b/repo/Wikibase.php
index 8010ba5..56187af 100644
--- a/repo/Wikibase.php
+++ b/repo/Wikibase.php
@@ -227,29 +227,29 @@
 
 // Special page registration
 $wgSpecialPages['CreateItem']  = 
'SpecialCreateItem';
+$wgSpecialPages['EntitiesWithoutLabel']= 
'SpecialEntitiesWithoutLabel';
 $wgSpecialPages['ItemByTitle'] 
= 'SpecialItemByTitle';
 $wgSpecialPages['ItemDisambiguation']  = 
'SpecialItemDisambiguation';
-$wgSpecialPages['SetLabel']= 
'SpecialSetLabel';
-$wgSpecialPages['SetDescription']  = 
'SpecialSetDescription';
-$wgSpecialPages['SetAliases']  = 
'SpecialSetAliases';
-$wgSpecialPages['EntitiesWithoutLabel']= 
'SpecialEntitiesWithoutLabel';
 $wgSpecialPages['ItemsWithoutSitelinks']   = 
'SpecialItemsWithoutSitelinks';
-$wgSpecialPages['NewProperty'] 
= 'SpecialNewProperty';
 $wgSpecialPages['ListDatatypes']   = 
'SpecialListDatatypes';
+$wgSpecialPages['NewProperty'] 
= 'SpecialNewProperty';
+$wgSpecialPages['SetAliases']  = 
'SpecialSetAliases';
+$wgSpecialPages['SetDescription']  = 
'SpecialSetDescription';
+$wgSpecialPages['SetLabel']= 
'SpecialSetLabel';
 
 
 // Special page groups
 $wgSpecialPageGroups['CreateItem'] = 
'wikibaserepo';
-$wgSpecialPageGroups['NewProperty']= 
'wikibaserepo';
-$wgSpecialPageGroups['ItemByTitle']= 
'wikibaserepo';
-$wgSpecialPageGroups['ItemDisambiguation'] = 
'wikibaserepo';
-$wgSpecialPageGroups['SetLabel']   = 
'wikibaserepo';
-$wgSpecialPageGroups['SetDescription'] = 
'wikibaserepo';
-$wgSpecialPageGroups['SetAliases'] = 
'wikibaserepo';
 $wgSpecialPageGroups['EntitiesWithoutLabel']   = 'wikibaserepo';
 $wgSpecialPageGroups['EntityData'] = 
'wikibaserepo';
+$wgSpecialPageGroups['ItemByTitle'] 

[MediaWiki-commits] [Gerrit] (Bug 42063, 44577) Special:EntityData supports RDF/XML output - change (mediawiki...Wikibase)

2013-02-27 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has uploaded a new change for review.

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


Change subject: (Bug 42063, 44577) Special:EntityData supports RDF/XML output
..

(Bug 42063, 44577) Special:EntityData supports RDF/XML output

Special:EntityData supports RDF/XML output when using the .rdf postfix.
EasyRdf ( http://www.easyrdf.org ) is introduced for easy modeling and 
exporting of the data model as RDF..

Work in progress!

Change-Id: Ie9f2f8944a65750077152a69923c0a0b18a49d5e
---
M repo/Wikibase.php
A repo/includes/content/LinkedDataHandler.php
A repo/includes/content/easyRdf/CHANGELOG.md
A repo/includes/content/easyRdf/EasyRdf.php
A repo/includes/content/easyRdf/EasyRdf/Exception.php
A repo/includes/content/easyRdf/EasyRdf/Format.php
A repo/includes/content/easyRdf/EasyRdf/Graph.php
A repo/includes/content/easyRdf/EasyRdf/GraphStore.php
A repo/includes/content/easyRdf/EasyRdf/Http.php
A repo/includes/content/easyRdf/EasyRdf/Http/Client.php
A repo/includes/content/easyRdf/EasyRdf/Http/Response.php
A repo/includes/content/easyRdf/EasyRdf/Literal.php
A repo/includes/content/easyRdf/EasyRdf/Literal/Boolean.php
A repo/includes/content/easyRdf/EasyRdf/Literal/Date.php
A repo/includes/content/easyRdf/EasyRdf/Literal/DateTime.php
A repo/includes/content/easyRdf/EasyRdf/Literal/Decimal.php
A repo/includes/content/easyRdf/EasyRdf/Literal/HexBinary.php
A repo/includes/content/easyRdf/EasyRdf/Literal/Integer.php
A repo/includes/content/easyRdf/EasyRdf/Namespace.php
A repo/includes/content/easyRdf/EasyRdf/ParsedUri.php
A repo/includes/content/easyRdf/EasyRdf/Parser.php
A repo/includes/content/easyRdf/EasyRdf/Parser/Arc.php
A repo/includes/content/easyRdf/EasyRdf/Parser/Json.php
A repo/includes/content/easyRdf/EasyRdf/Parser/Ntriples.php
A repo/includes/content/easyRdf/EasyRdf/Parser/Rapper.php
A repo/includes/content/easyRdf/EasyRdf/Parser/RdfPhp.php
A repo/includes/content/easyRdf/EasyRdf/Parser/RdfXml.php
A repo/includes/content/easyRdf/EasyRdf/Parser/Redland.php
A repo/includes/content/easyRdf/EasyRdf/Parser/Turtle.php
A repo/includes/content/easyRdf/EasyRdf/Resource.php
A repo/includes/content/easyRdf/EasyRdf/Serialiser.php
A repo/includes/content/easyRdf/EasyRdf/Serialiser/Arc.php
A repo/includes/content/easyRdf/EasyRdf/Serialiser/GraphViz.php
A repo/includes/content/easyRdf/EasyRdf/Serialiser/Json.php
A repo/includes/content/easyRdf/EasyRdf/Serialiser/Ntriples.php
A repo/includes/content/easyRdf/EasyRdf/Serialiser/Rapper.php
A repo/includes/content/easyRdf/EasyRdf/Serialiser/RdfPhp.php
A repo/includes/content/easyRdf/EasyRdf/Serialiser/RdfXml.php
A repo/includes/content/easyRdf/EasyRdf/Serialiser/Turtle.php
A repo/includes/content/easyRdf/EasyRdf/Sparql/Client.php
A repo/includes/content/easyRdf/EasyRdf/Sparql/Result.php
A repo/includes/content/easyRdf/EasyRdf/TypeMapper.php
A repo/includes/content/easyRdf/EasyRdf/Utils.php
A repo/includes/content/easyRdf/LICENSE.md
A repo/includes/content/easyRdf/README.md
M repo/includes/specials/SpecialEntityData.php
46 files changed, 11,559 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/64/51164/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie9f2f8944a65750077152a69923c0a0b18a49d5e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Anja Jentzsch 

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


[MediaWiki-commits] [Gerrit] (Bug 45352, 45353) Add Special:ItemByTitle and Special:ItemD... - change (mediawiki...Wikibase)

2013-02-26 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has uploaded a new change for review.

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


Change subject: (Bug 45352, 45353) Add Special:ItemByTitle and 
Special:ItemDisambiguation to Special:SpecialPages
..

(Bug 45352, 45353) Add Special:ItemByTitle and Special:ItemDisambiguation to 
Special:SpecialPages

Add Special:ItemByTitle and Special:ItemDisambiguation to Special:SpecialPages

Change-Id: Ifc17ae16fb86e451e25b6dba7b03547c1598eba9
---
M repo/includes/specials/SpecialItemResolver.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/01/50901/1

diff --git a/repo/includes/specials/SpecialItemResolver.php 
b/repo/includes/specials/SpecialItemResolver.php
index ce77fff..133d3ea 100644
--- a/repo/includes/specials/SpecialItemResolver.php
+++ b/repo/includes/specials/SpecialItemResolver.php
@@ -38,7 +38,7 @@
 * @param string $name
 */
public function __construct( $name ) {
-   parent::__construct( $name, '', false );
+   parent::__construct( $name, '', );
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifc17ae16fb86e451e25b6dba7b03547c1598eba9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Anja Jentzsch 

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


[MediaWiki-commits] [Gerrit] (Bug 45352, 45353) Add Special:ItemByTitle and Special:ItemD... - change (mediawiki...Wikibase)

2013-02-26 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has uploaded a new change for review.

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


Change subject: (Bug 45352, 45353) Add Special:ItemByTitle and 
Special:ItemDisambiguation to Special:SpecialPages
..

(Bug 45352, 45353) Add Special:ItemByTitle and Special:ItemDisambiguation to 
Special:SpecialPages

Add Special:ItemByTitle and Special:ItemDisambiguation to Special:SpecialPages

Change-Id: Id8b0f22d795f881e37d56c4288faca306fdff4ee
---
M repo/includes/specials/SpecialItemResolver.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/99/50899/1

diff --git a/repo/includes/specials/SpecialItemResolver.php 
b/repo/includes/specials/SpecialItemResolver.php
index ce77fff..133d3ea 100644
--- a/repo/includes/specials/SpecialItemResolver.php
+++ b/repo/includes/specials/SpecialItemResolver.php
@@ -38,7 +38,7 @@
 * @param string $name
 */
public function __construct( $name ) {
-   parent::__construct( $name, '', false );
+   parent::__construct( $name, '', );
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id8b0f22d795f881e37d56c4288faca306fdff4ee
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Anja Jentzsch 

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


[MediaWiki-commits] [Gerrit] (testing) necessary adjustment to blockeduser selenium test - change (mediawiki...Wikibase)

2013-02-26 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: (testing) necessary adjustment to blockeduser selenium test
..


(testing) necessary adjustment to blockeduser selenium test

- this caused the test to fail since the handling of blocked users
changed on Special:CreateItem

Change-Id: I65674bc398e9d5c06b492424255de7216e93e322
---
M repo/tests/selenium/item/blocked_user_spec.rb
1 file changed, 1 insertion(+), 4 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved



diff --git a/repo/tests/selenium/item/blocked_user_spec.rb 
b/repo/tests/selenium/item/blocked_user_spec.rb
index b67c37d..346d5a0 100644
--- a/repo/tests/selenium/item/blocked_user_spec.rb
+++ b/repo/tests/selenium/item/blocked_user_spec.rb
@@ -72,10 +72,7 @@
 page.login_with(WIKI_BLOCKED_USERNAME, WIKI_BLOCKED_PASSWORD)
   end
   visit_page(CreateItemPage) do |page|
-page.createEntityLabelField = generate_random_string(10)
-page.createEntityDescriptionField = generate_random_string(20)
-page.createEntitySubmit
-page.mwFirstHeading.should == "Permissions errors"
+page.mwFirstHeading.should == "User is blocked"
   end
 end
   end

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I65674bc398e9d5c06b492424255de7216e93e322
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Tobias Gritschacher 
Gerrit-Reviewer: Anja Jentzsch 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] (bug 44228) Using compatible css class option name in suggester - change (mediawiki...Wikibase)

2013-02-22 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: (bug 44228) Using compatible css class option name in suggester
..


(bug 44228) Using compatible css class option name in suggester

Change-Id: I10913ee6511379f4032c18000839c0f4663fe53d
---
M lib/resources/jquery.ui/jquery.ui.entityselector.js
M lib/resources/jquery.ui/jquery.ui.suggester.js
2 files changed, 4 insertions(+), 4 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved



diff --git a/lib/resources/jquery.ui/jquery.ui.entityselector.js 
b/lib/resources/jquery.ui/jquery.ui.entityselector.js
index 9856b25..f8b2728 100644
--- a/lib/resources/jquery.ui/jquery.ui.entityselector.js
+++ b/lib/resources/jquery.ui/jquery.ui.entityselector.js
@@ -504,7 +504,7 @@
action: function( entityselector ) {
entityselector.more();
},
-   'class': 'ui-entityselector-more'
+   cssClass: 'ui-entityselector-more'
} );
},
 
diff --git a/lib/resources/jquery.ui/jquery.ui.suggester.js 
b/lib/resources/jquery.ui/jquery.ui.suggester.js
index 411d626..9625346 100644
--- a/lib/resources/jquery.ui/jquery.ui.suggester.js
+++ b/lib/resources/jquery.ui/jquery.ui.suggester.js
@@ -64,7 +64,7 @@
  * @option customListItem.action {Function} The action to perform when 
selecting the additional
  * list item.
  * Parameters: (1) Reference to the entity selector widget
- * @option customListItem.class {String} (optional) Additional css class(es) 
to assign to the custom
+ * @option customListItem.cssClass {String} (optional) Additional css 
class(es) to assign to the custom
  * item's  node.
  *
  * @event response Triggered when the API call returned successful.
@@ -344,8 +344,8 @@
} ),
$a = $( '' ).appendTo( $li );
 
-   if ( customListItem.class ) {
-   $li.addClass( customListItem.class );
+   if ( customListItem.cssClass ) {
+   $li.addClass( customListItem.cssClass );
}
 
if ( typeof content === 'string' ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I10913ee6511379f4032c18000839c0f4663fe53d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.21-wmf10
Gerrit-Owner: Anja Jentzsch 
Gerrit-Reviewer: Anja Jentzsch 
Gerrit-Reviewer: Henning Snater 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] (bug 44228) Using compatible css class option name in suggester - change (mediawiki...Wikibase)

2013-02-22 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has uploaded a new change for review.

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


Change subject: (bug 44228) Using compatible css class option name in suggester
..

(bug 44228) Using compatible css class option name in suggester

Change-Id: I10913ee6511379f4032c18000839c0f4663fe53d
---
M lib/resources/jquery.ui/jquery.ui.entityselector.js
M lib/resources/jquery.ui/jquery.ui.suggester.js
2 files changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/59/50359/1

diff --git a/lib/resources/jquery.ui/jquery.ui.entityselector.js 
b/lib/resources/jquery.ui/jquery.ui.entityselector.js
index 9856b25..f8b2728 100644
--- a/lib/resources/jquery.ui/jquery.ui.entityselector.js
+++ b/lib/resources/jquery.ui/jquery.ui.entityselector.js
@@ -504,7 +504,7 @@
action: function( entityselector ) {
entityselector.more();
},
-   'class': 'ui-entityselector-more'
+   cssClass: 'ui-entityselector-more'
} );
},
 
diff --git a/lib/resources/jquery.ui/jquery.ui.suggester.js 
b/lib/resources/jquery.ui/jquery.ui.suggester.js
index 411d626..9625346 100644
--- a/lib/resources/jquery.ui/jquery.ui.suggester.js
+++ b/lib/resources/jquery.ui/jquery.ui.suggester.js
@@ -64,7 +64,7 @@
  * @option customListItem.action {Function} The action to perform when 
selecting the additional
  * list item.
  * Parameters: (1) Reference to the entity selector widget
- * @option customListItem.class {String} (optional) Additional css class(es) 
to assign to the custom
+ * @option customListItem.cssClass {String} (optional) Additional css 
class(es) to assign to the custom
  * item's  node.
  *
  * @event response Triggered when the API call returned successful.
@@ -344,8 +344,8 @@
} ),
$a = $( '' ).appendTo( $li );
 
-   if ( customListItem.class ) {
-   $li.addClass( customListItem.class );
+   if ( customListItem.cssClass ) {
+   $li.addClass( customListItem.cssClass );
}
 
if ( typeof content === 'string' ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I10913ee6511379f4032c18000839c0f4663fe53d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.21-wmf10
Gerrit-Owner: Anja Jentzsch 
Gerrit-Reviewer: Henning Snater 

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


[MediaWiki-commits] [Gerrit] Fix fatal error due to unknown exception. - change (mediawiki...Wikibase)

2013-02-21 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: Fix fatal error due to unknown exception.
..


Fix fatal error due to unknown exception.

TermsSqlCache tired to throw an instance of Exception without
specifying a namespace, causing a fatal error. Changed that to
\MWException now.

Change-Id: Idbf67b96a64939e374cffb1f295ecb72137e5575
---
M repo/includes/store/sql/TermSqlCache.php
1 file changed, 5 insertions(+), 2 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved



diff --git a/repo/includes/store/sql/TermSqlCache.php 
b/repo/includes/store/sql/TermSqlCache.php
index 41ca54b..a43376b 100644
--- a/repo/includes/store/sql/TermSqlCache.php
+++ b/repo/includes/store/sql/TermSqlCache.php
@@ -295,11 +295,14 @@
 
$numericIds = array();
foreach ( $ids as $id ) {
-   $numericIds[] = $id->getNumericId();
if ( $id->getEntityType() !== $entityType ) {
-   throw new Exception( 'Declared EntityType must 
match the actual EntityType of each Entity' );
+   throw new \MWException( "ID " . 
$id->getPrefixedId()
+   . " does not refer to an entity of type 
$entityType." );
}
+
+   $numericIds[] = $id->getNumericId();
}
+
$entityIdentifiers['term_entity_id'] = $numericIds;
 
$fields = array(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idbf67b96a64939e374cffb1f295ecb72137e5575
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.21-wmf10
Gerrit-Owner: Anja Jentzsch 
Gerrit-Reviewer: Anja Jentzsch 
Gerrit-Reviewer: Daniel Kinzler 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Fix fatal error due to unknown exception. - change (mediawiki...Wikibase)

2013-02-21 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has uploaded a new change for review.

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


Change subject: Fix fatal error due to unknown exception.
..

Fix fatal error due to unknown exception.

TermsSqlCache tired to throw an instance of Exception without
specifying a namespace, causing a fatal error. Changed that to
\MWException now.

Change-Id: Idbf67b96a64939e374cffb1f295ecb72137e5575
---
M repo/includes/store/sql/TermSqlCache.php
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/84/50184/1

diff --git a/repo/includes/store/sql/TermSqlCache.php 
b/repo/includes/store/sql/TermSqlCache.php
index 41ca54b..a43376b 100644
--- a/repo/includes/store/sql/TermSqlCache.php
+++ b/repo/includes/store/sql/TermSqlCache.php
@@ -295,11 +295,14 @@
 
$numericIds = array();
foreach ( $ids as $id ) {
-   $numericIds[] = $id->getNumericId();
if ( $id->getEntityType() !== $entityType ) {
-   throw new Exception( 'Declared EntityType must 
match the actual EntityType of each Entity' );
+   throw new \MWException( "ID " . 
$id->getPrefixedId()
+   . " does not refer to an entity of type 
$entityType." );
}
+
+   $numericIds[] = $id->getNumericId();
}
+
$entityIdentifiers['term_entity_id'] = $numericIds;
 
$fields = array(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idbf67b96a64939e374cffb1f295ecb72137e5575
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.21-wmf10
Gerrit-Owner: Anja Jentzsch 
Gerrit-Reviewer: Daniel Kinzler 

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


[MediaWiki-commits] [Gerrit] Fix fatal error due to unknown exception. - change (mediawiki...Wikibase)

2013-02-21 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: Fix fatal error due to unknown exception.
..


Fix fatal error due to unknown exception.

TermsSqlCache tired to throw an instance of Exception without
specifying a namespace, causing a fatal error. Changed that to
\MWException now.

Change-Id: Idbf67b96a64939e374cffb1f295ecb72137e5575
---
M repo/includes/store/sql/TermSqlCache.php
1 file changed, 5 insertions(+), 2 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved



diff --git a/repo/includes/store/sql/TermSqlCache.php 
b/repo/includes/store/sql/TermSqlCache.php
index 41ca54b..a43376b 100644
--- a/repo/includes/store/sql/TermSqlCache.php
+++ b/repo/includes/store/sql/TermSqlCache.php
@@ -295,11 +295,14 @@
 
$numericIds = array();
foreach ( $ids as $id ) {
-   $numericIds[] = $id->getNumericId();
if ( $id->getEntityType() !== $entityType ) {
-   throw new Exception( 'Declared EntityType must 
match the actual EntityType of each Entity' );
+   throw new \MWException( "ID " . 
$id->getPrefixedId()
+   . " does not refer to an entity of type 
$entityType." );
}
+
+   $numericIds[] = $id->getNumericId();
}
+
$entityIdentifiers['term_entity_id'] = $numericIds;
 
$fields = array(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idbf67b96a64939e374cffb1f295ecb72137e5575
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Daniel Kinzler 
Gerrit-Reviewer: Anja Jentzsch 
Gerrit-Reviewer: Jens Ohlig 
Gerrit-Reviewer: Jeroen De Dauw 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] (bug 44228) Using compatible css class option name in sugges... - change (mediawiki...Wikibase)

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

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


Change subject: (bug 44228) Using compatible css class option name in suggester
..

(bug 44228) Using compatible css class option name in suggester

Change-Id: Ia3e77d38e56e8f76bb5fdd780e60caa0394862e0
---
M lib/resources/jquery.ui/jquery.ui.entityselector.js
M lib/resources/jquery.ui/jquery.ui.suggester.js
2 files changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/92/49692/1

diff --git a/lib/resources/jquery.ui/jquery.ui.entityselector.js 
b/lib/resources/jquery.ui/jquery.ui.entityselector.js
index 9856b25..f8b2728 100644
--- a/lib/resources/jquery.ui/jquery.ui.entityselector.js
+++ b/lib/resources/jquery.ui/jquery.ui.entityselector.js
@@ -504,7 +504,7 @@
action: function( entityselector ) {
entityselector.more();
},
-   'class': 'ui-entityselector-more'
+   cssClass: 'ui-entityselector-more'
} );
},
 
diff --git a/lib/resources/jquery.ui/jquery.ui.suggester.js 
b/lib/resources/jquery.ui/jquery.ui.suggester.js
index 411d626..9625346 100644
--- a/lib/resources/jquery.ui/jquery.ui.suggester.js
+++ b/lib/resources/jquery.ui/jquery.ui.suggester.js
@@ -64,7 +64,7 @@
  * @option customListItem.action {Function} The action to perform when 
selecting the additional
  * list item.
  * Parameters: (1) Reference to the entity selector widget
- * @option customListItem.class {String} (optional) Additional css class(es) 
to assign to the custom
+ * @option customListItem.cssClass {String} (optional) Additional css 
class(es) to assign to the custom
  * item's  node.
  *
  * @event response Triggered when the API call returned successful.
@@ -344,8 +344,8 @@
} ),
$a = $( '' ).appendTo( $li );
 
-   if ( customListItem.class ) {
-   $li.addClass( customListItem.class );
+   if ( customListItem.cssClass ) {
+   $li.addClass( customListItem.cssClass );
}
 
if ( typeof content === 'string' ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia3e77d38e56e8f76bb5fdd780e60caa0394862e0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.21-wmf10
Gerrit-Owner: Anja Jentzsch 
Gerrit-Reviewer: Henning Snater 

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


[MediaWiki-commits] [Gerrit] (bug 44228) Using compatible css class option name in sugges... - change (mediawiki...Wikibase)

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

Change subject: (bug 44228) Using compatible css class option name in suggester
..


(bug 44228) Using compatible css class option name in suggester

Change-Id: I10913ee6511379f4032c18000839c0f4663fe53d
---
M lib/resources/jquery.ui/jquery.ui.entityselector.js
M lib/resources/jquery.ui/jquery.ui.suggester.js
2 files changed, 4 insertions(+), 4 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved



diff --git a/lib/resources/jquery.ui/jquery.ui.entityselector.js 
b/lib/resources/jquery.ui/jquery.ui.entityselector.js
index 9cb70a5..166efd0 100644
--- a/lib/resources/jquery.ui/jquery.ui.entityselector.js
+++ b/lib/resources/jquery.ui/jquery.ui.entityselector.js
@@ -509,7 +509,7 @@
action: function( entityselector ) {
entityselector.more();
},
-   'class': 'ui-entityselector-more'
+   cssClass: 'ui-entityselector-more'
} );
},
 
diff --git a/lib/resources/jquery.ui/jquery.ui.suggester.js 
b/lib/resources/jquery.ui/jquery.ui.suggester.js
index 4d0b3da..ec3d82e 100644
--- a/lib/resources/jquery.ui/jquery.ui.suggester.js
+++ b/lib/resources/jquery.ui/jquery.ui.suggester.js
@@ -65,7 +65,7 @@
  * @option customListItem.action {Function} The action to perform when 
selecting the additional
  * list item.
  * Parameters: (1) Reference to the entity selector widget
- * @option customListItem.class {String} (optional) Additional css class(es) 
to assign to the custom
+ * @option customListItem.cssClass {String} (optional) Additional css 
class(es) to assign to the custom
  * item's  node.
  *
  * @event response Triggered when the API call returned successful.
@@ -349,8 +349,8 @@
} ),
$a = $( '' ).appendTo( $li );
 
-   if ( customListItem.class ) {
-   $li.addClass( customListItem.class );
+   if ( customListItem.cssClass ) {
+   $li.addClass( customListItem.cssClass );
}
 
if ( typeof content === 'string' ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I10913ee6511379f4032c18000839c0f4663fe53d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Henning Snater 
Gerrit-Reviewer: Anja Jentzsch 

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


[MediaWiki-commits] [Gerrit] (minor) Define supports0Height in inputAutoExpand before it ... - change (mediawiki...Wikibase)

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

Change subject: (minor) Define supports0Height in inputAutoExpand before it is 
first used.
..


(minor) Define supports0Height in inputAutoExpand before it is first used.

Also added radix parameter to parseInt in inputAutoExpand

Conflicts:

lib/resources/jquery/jquery.inputAutoExpand.js

Change-Id: I76dde4ad7c9b31658fe017fe32089f7d545b2459
---
M lib/resources/jquery/jquery.inputAutoExpand.js
1 file changed, 36 insertions(+), 2 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved



diff --git a/lib/resources/jquery/jquery.inputAutoExpand.js 
b/lib/resources/jquery/jquery.inputAutoExpand.js
index a1b29b8..8ff0f5e 100644
--- a/lib/resources/jquery/jquery.inputAutoExpand.js
+++ b/lib/resources/jquery/jquery.inputAutoExpand.js
@@ -58,6 +58,40 @@
 ( function( $ ) {
'use strict';
 
+   /**
+* Tests if the user client is capable of assigning a height of 0 to a 
textarea. (E.g. Firefox
+* on Mac will always set the minimum height to the text height as long 
as the textarea is
+* attached to the body element.)
+*
+* @return {boolean}
+*/
+   function supports0Height() {
+   var support = true,
+   $t = $( '' );
+
+   $t.attr( 'style', 'height: 0 !important; width: 0 !important; 
top:-px; left: -px;' )
+   .text( 'text' )
+   .appendTo( $( 'body' ) );
+
+   if ( $t.height() >= 1 ) { // addressing rounding
+   support = false;
+   }
+   $t.remove();
+
+   return support;
+   }
+
+   /**
+* Whether the user client is capable of setting the textarea height to 
0.
+* @type {boolean}
+*/
+   var browserSupports0Height;
+
+   $( document ).ready( function() {
+   browserSupports0Height = supports0Height();
+   } );
+
+
$.fn.inputAutoExpand = function( options ) {
if( ! options ) {
options = {};
@@ -428,8 +462,8 @@
active = false;
}, 10 );
 
-   var border = parseInt( this.input.css( 
'borderTopWidth' ) )
-   + parseInt( this.input.css( 
'borderBottomWidth' ) );
+   var border = parseInt( this.input.css( 
'borderTopWidth' ), 10 )
+   + parseInt( this.input.css( 
'borderBottomWidth' ), 10 );
 
return ruler.scrollTop + border;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I76dde4ad7c9b31658fe017fe32089f7d545b2459
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.21-wmf10
Gerrit-Owner: Anja Jentzsch 
Gerrit-Reviewer: Anja Jentzsch 
Gerrit-Reviewer: Daniel Werner 

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


[MediaWiki-commits] [Gerrit] (minor) Define supports0Height in inputAutoExpand before it ... - change (mediawiki...Wikibase)

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

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


Change subject: (minor) Define supports0Height in inputAutoExpand before it is 
first used.
..

(minor) Define supports0Height in inputAutoExpand before it is first used.

Also added radix parameter to parseInt in inputAutoExpand

Conflicts:

lib/resources/jquery/jquery.inputAutoExpand.js

Change-Id: I76dde4ad7c9b31658fe017fe32089f7d545b2459
---
M lib/resources/jquery/jquery.inputAutoExpand.js
1 file changed, 36 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/83/49683/1

diff --git a/lib/resources/jquery/jquery.inputAutoExpand.js 
b/lib/resources/jquery/jquery.inputAutoExpand.js
index a1b29b8..8ff0f5e 100644
--- a/lib/resources/jquery/jquery.inputAutoExpand.js
+++ b/lib/resources/jquery/jquery.inputAutoExpand.js
@@ -58,6 +58,40 @@
 ( function( $ ) {
'use strict';
 
+   /**
+* Tests if the user client is capable of assigning a height of 0 to a 
textarea. (E.g. Firefox
+* on Mac will always set the minimum height to the text height as long 
as the textarea is
+* attached to the body element.)
+*
+* @return {boolean}
+*/
+   function supports0Height() {
+   var support = true,
+   $t = $( '' );
+
+   $t.attr( 'style', 'height: 0 !important; width: 0 !important; 
top:-px; left: -px;' )
+   .text( 'text' )
+   .appendTo( $( 'body' ) );
+
+   if ( $t.height() >= 1 ) { // addressing rounding
+   support = false;
+   }
+   $t.remove();
+
+   return support;
+   }
+
+   /**
+* Whether the user client is capable of setting the textarea height to 
0.
+* @type {boolean}
+*/
+   var browserSupports0Height;
+
+   $( document ).ready( function() {
+   browserSupports0Height = supports0Height();
+   } );
+
+
$.fn.inputAutoExpand = function( options ) {
if( ! options ) {
options = {};
@@ -428,8 +462,8 @@
active = false;
}, 10 );
 
-   var border = parseInt( this.input.css( 
'borderTopWidth' ) )
-   + parseInt( this.input.css( 
'borderBottomWidth' ) );
+   var border = parseInt( this.input.css( 
'borderTopWidth' ), 10 )
+   + parseInt( this.input.css( 
'borderBottomWidth' ), 10 );
 
return ruler.scrollTop + border;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I76dde4ad7c9b31658fe017fe32089f7d545b2459
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.21-wmf10
Gerrit-Owner: Anja Jentzsch 
Gerrit-Reviewer: Daniel Werner 

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


[MediaWiki-commits] [Gerrit] (bug 41163, 44165, 44166) autocomments for claims. - change (mediawiki...Wikibase)

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

Change subject: (bug 41163, 44165, 44166) autocomments for claims.
..


(bug 41163, 44165, 44166) autocomments for claims.

This adds autocomments when claims get added or removed, or
their main snak is changed.

Caveat: When removing or changing a claim, the claim ID (GUID) is shown in the
summary. That is not very helpful. To changes this, some refactoring is
needed - this is already in the pipeline.

Change-Id: I1c836d6f54d865f83d27b5853ff0d72532c9cd6a
---
M repo/Wikibase.i18n.php
M repo/Wikibase.php
M repo/includes/api/ApiCreateClaim.php
A repo/includes/api/ApiModifyClaim.php
M repo/includes/api/ApiRemoveClaims.php
M repo/includes/api/ApiSetClaimValue.php
6 files changed, 301 insertions(+), 367 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved



diff --git a/repo/Wikibase.i18n.php b/repo/Wikibase.i18n.php
index c68f8e7..1e28c9f 100644
--- a/repo/Wikibase.i18n.php
+++ b/repo/Wikibase.i18n.php
@@ -258,9 +258,12 @@
'wikibase-item-summary-wbsetsitelink-set' => 'Added site-specific [$2] 
link',
'wikibase-item-summary-wbsetsitelink-remove' => 'Removed site-specific 
[$2] link',
'wikibase-item-summary-wblinktitles-connect' => 'Connected [$2↔$3] 
{{PLURAL:$1|page|pages}}',
-   'wikibase-item-summary-wbcreateclaim-value' => 'Created {{PLURAL:$1|a 
value claim|value claims}}',
-   'wikibase-item-summary-wbcreateclaim-novalue' => 'Created {{PLURAL:$1|a 
novalue claim|novalue claims}}',
-   'wikibase-item-summary-wbcreateclaim-somevalue' => 'Created 
{{PLURAL:$1|a somevalue claim|somevalue claims}}',
+   'wikibase-item-summary-wbcreateclaim-value' => 'Created {{PLURAL:$1|a 
claim|claims}}', // legacy, used for old log entries!
+   'wikibase-item-summary-wbcreateclaim-novalue' => 'Created {{PLURAL:$1|a 
claim|claims}}', // legacy, used for old log entries!
+   'wikibase-item-summary-wbcreateclaim-somevalue' => 'Created 
{{PLURAL:$1|a claim|claims}}', // legacy, used for old log entries!
+   'wikibase-item-summary-wbcreateclaim' => 'Created {{PLURAL:$1|a 
claim|claims}}',
+   'wikibase-item-summary-wbsetclaimvalue' => 'Set {{PLURAL:$1|a claim 
value|claim values}}',
+   'wikibase-item-summary-wbremoveclaims' => 'Removed {{PLURAL:$1|a 
claim|claims}}',
'wikibase-item-summary-special-create-item' => 'Created an [$2] item 
with {{PLURAL:$1|value|values}}',
 
// property - summary and autocomment
@@ -672,9 +675,13 @@
 * $1 is the number of pages that were connected;
 * $2 is the site code for the from-page;
 * $3 is the site code for the to-page.',
-   'wikibase-item-summary-wbcreateclaim-value' => '{{wikibase summary 
messages|item-claims|Automatic edit summary when a claim is created and a value 
is used. The values can be of various types, including but not limited to 
defined properties.}}',
-   'wikibase-item-summary-wbcreateclaim-novalue' => "{{wikibase summary 
messages|item-claims|Automatic edit summary when ''no value'' is supplied to 
the claim. A ''no value'' means that there are no valid value to be set for 
this claim, or that there are no existing value.}}",
-   'wikibase-item-summary-wbcreateclaim-somevalue' => '{{wikibase summary 
messages|item-claims|Automatic edit summary when there should be a value but it 
is unknown. This is different from the case where there are no valid or 
existing value.}}',
+
+   'wikibase-item-summary-wbcreateclaim-value' => '{{wikibase summary 
messages|item-claims|Automatic edit summary when a claim is created and a value 
is used. The values can be of various types, including but not limited to 
defined properties. This is a LEGACY value, needed for old log entries!}}',
+   'wikibase-item-summary-wbcreateclaim-novalue' => "{{wikibase summary 
messages|item-claims|Automatic edit summary when ''no value'' is supplied to 
the claim. A ''no value'' means that there are no valid value to be set for 
this claim, or that there are no existing value. This is a LEGACY value, needed 
for old log entries!}}",
+   'wikibase-item-summary-wbcreateclaim-somevalue' => '{{wikibase summary 
messages|item-claims|Automatic edit summary when there should be a value but it 
is unknown. This is different from the case where there are no valid or 
existing value. This is a LEGACY value, needed for old log entries!}}',
+   'wikibase-item-summary-wbcreateclaim' => '{{wikibase summary 
messages|item-claims|Automatic edit summary when a claim is created.}}',
+   'wikibase-item-summary-wbsetclaimvalue' => '{{wikibase summary 
messages|item-claims|Automatic edit summary when the main value of one or more 
claim is changed.}}',
+   'wikibase-item-summary-wbremoveclaims' => '{{wikibase summary 
messages|item-claims|Automatic edit summary when one or more claim is 
removed.}}',
'wikibase-item-summary-special-create-item' => '{{wikib

[MediaWiki-commits] [Gerrit] (bug 41163, 44165, 44166) autocomments for claims. - change (mediawiki...Wikibase)

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

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


Change subject: (bug 41163, 44165, 44166) autocomments for claims.
..

(bug 41163, 44165, 44166) autocomments for claims.

This adds autocomments when claims get added or removed, or
their main snak is changed.

Caveat: When removing or changing a claim, the claim ID (GUID) is shown in the
summary. That is not very helpful. To changes this, some refactoring is
needed - this is already in the pipeline.

Change-Id: I1c836d6f54d865f83d27b5853ff0d72532c9cd6a
---
M repo/Wikibase.i18n.php
M repo/Wikibase.php
M repo/includes/api/ApiCreateClaim.php
A repo/includes/api/ApiModifyClaim.php
M repo/includes/api/ApiRemoveClaims.php
M repo/includes/api/ApiSetClaimValue.php
6 files changed, 301 insertions(+), 367 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/40/49640/1

diff --git a/repo/Wikibase.i18n.php b/repo/Wikibase.i18n.php
index c68f8e7..1e28c9f 100644
--- a/repo/Wikibase.i18n.php
+++ b/repo/Wikibase.i18n.php
@@ -258,9 +258,12 @@
'wikibase-item-summary-wbsetsitelink-set' => 'Added site-specific [$2] 
link',
'wikibase-item-summary-wbsetsitelink-remove' => 'Removed site-specific 
[$2] link',
'wikibase-item-summary-wblinktitles-connect' => 'Connected [$2↔$3] 
{{PLURAL:$1|page|pages}}',
-   'wikibase-item-summary-wbcreateclaim-value' => 'Created {{PLURAL:$1|a 
value claim|value claims}}',
-   'wikibase-item-summary-wbcreateclaim-novalue' => 'Created {{PLURAL:$1|a 
novalue claim|novalue claims}}',
-   'wikibase-item-summary-wbcreateclaim-somevalue' => 'Created 
{{PLURAL:$1|a somevalue claim|somevalue claims}}',
+   'wikibase-item-summary-wbcreateclaim-value' => 'Created {{PLURAL:$1|a 
claim|claims}}', // legacy, used for old log entries!
+   'wikibase-item-summary-wbcreateclaim-novalue' => 'Created {{PLURAL:$1|a 
claim|claims}}', // legacy, used for old log entries!
+   'wikibase-item-summary-wbcreateclaim-somevalue' => 'Created 
{{PLURAL:$1|a claim|claims}}', // legacy, used for old log entries!
+   'wikibase-item-summary-wbcreateclaim' => 'Created {{PLURAL:$1|a 
claim|claims}}',
+   'wikibase-item-summary-wbsetclaimvalue' => 'Set {{PLURAL:$1|a claim 
value|claim values}}',
+   'wikibase-item-summary-wbremoveclaims' => 'Removed {{PLURAL:$1|a 
claim|claims}}',
'wikibase-item-summary-special-create-item' => 'Created an [$2] item 
with {{PLURAL:$1|value|values}}',
 
// property - summary and autocomment
@@ -672,9 +675,13 @@
 * $1 is the number of pages that were connected;
 * $2 is the site code for the from-page;
 * $3 is the site code for the to-page.',
-   'wikibase-item-summary-wbcreateclaim-value' => '{{wikibase summary 
messages|item-claims|Automatic edit summary when a claim is created and a value 
is used. The values can be of various types, including but not limited to 
defined properties.}}',
-   'wikibase-item-summary-wbcreateclaim-novalue' => "{{wikibase summary 
messages|item-claims|Automatic edit summary when ''no value'' is supplied to 
the claim. A ''no value'' means that there are no valid value to be set for 
this claim, or that there are no existing value.}}",
-   'wikibase-item-summary-wbcreateclaim-somevalue' => '{{wikibase summary 
messages|item-claims|Automatic edit summary when there should be a value but it 
is unknown. This is different from the case where there are no valid or 
existing value.}}',
+
+   'wikibase-item-summary-wbcreateclaim-value' => '{{wikibase summary 
messages|item-claims|Automatic edit summary when a claim is created and a value 
is used. The values can be of various types, including but not limited to 
defined properties. This is a LEGACY value, needed for old log entries!}}',
+   'wikibase-item-summary-wbcreateclaim-novalue' => "{{wikibase summary 
messages|item-claims|Automatic edit summary when ''no value'' is supplied to 
the claim. A ''no value'' means that there are no valid value to be set for 
this claim, or that there are no existing value. This is a LEGACY value, needed 
for old log entries!}}",
+   'wikibase-item-summary-wbcreateclaim-somevalue' => '{{wikibase summary 
messages|item-claims|Automatic edit summary when there should be a value but it 
is unknown. This is different from the case where there are no valid or 
existing value. This is a LEGACY value, needed for old log entries!}}',
+   'wikibase-item-summary-wbcreateclaim' => '{{wikibase summary 
messages|item-claims|Automatic edit summary when a claim is created.}}',
+   'wikibase-item-summary-wbsetclaimvalue' => '{{wikibase summary 
messages|item-claims|Automatic edit summary when the main value of one or more 
claim is changed.}}',
+   'wikibase-item-summary-wbremoveclaims' => '{{wikibase summary 
messages|item-claims|Automatic edit summary when one or more claim is 
removed.}}

[MediaWiki-commits] [Gerrit] (bug 44744) copyright warning now using its own message inst... - change (mediawiki...Wikibase)

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

Change subject: (bug 44744) copyright warning now using its own message instead 
of EditPage::getCopyrightWarning
..


(bug 44744) copyright warning now using its own message instead of 
EditPage::getCopyrightWarning

Since the 'EditPageCopyrightWarning' is not suitable (without adjustments) to 
cover the needs of
the wikidata short copyright message, we introduce our own message in wikibase 
for this.

The following will be added to Wikidata's configuration to have the message 
displayed according
to Wikidata's copyright and terms of use.
- $wgRightsUrl = 'http://creativecommons.org/publicdomain/zero/1.0/';
- $wgRightsText = 'CC0 public domain dedication';

Without these configuration variables defined, the message will not look nice.

- patch set 2: Corrected spelling errors

Change-Id: I3e975c6e79f5d6e4eb9001cb846ccdc36ddd7525
---
M repo/Wikibase.i18n.php
M repo/includes/EntityView.php
M repo/resources/wikibase.ui.entityViewInit.js
3 files changed, 18 insertions(+), 10 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved



diff --git a/repo/Wikibase.i18n.php b/repo/Wikibase.i18n.php
index 006f576..c68f8e7 100644
--- a/repo/Wikibase.i18n.php
+++ b/repo/Wikibase.i18n.php
@@ -82,7 +82,8 @@
'wikibase-snakview-snaktypeselector-value' => 'custom value',
'wikibase-snakview-snaktypeselector-somevalue' => 'unknown value',
'wikibase-snakview-snaktypeselector-novalue' => 'no value',
-   'wikibase-copyrighttooltip-acknowledge' => 'I acknowledge and do not 
want to see this message again.',
+   'wikibase-shortcopyrightwarning' => 'By clicking "$1", you agree to the 
[[$2|terms of use]], and you irrevocably agree to release your contribution 
under the $3.',
+   'wikibase-copyrighttooltip-acknowledge' => 'I accept these terms for my 
future edits. Do not show this message again.',
 
'wikibase-entityselector-more' => 'more',
 
@@ -418,6 +419,10 @@
'wikibase-snakview-snaktypeselector-value' => "Short descriptive title 
of a 'value' snak (see [[d:Wikidata/Glossary]]) used in a drop-down menu 
allowing to select the snak type when adding or editing a snak. The drop-down 
menu can be opened by clicking an anchor right next to the input element(s) 
used to specify a claim's value. Although this is regarded a 'special', seldom 
used feature, the term 'snak' should be avoided here since the concept of snaks 
is a technical abstraction that does not give any additional meaning within the 
user interface. The basic meaning of this option - which is the default when 
adding a claim - is allowing the user to specify a value.",
'wikibase-snakview-snaktypeselector-somevalue' => "Short descriptive 
title of a some-value snak (see [[d:Wikidata/Glossary]]) used in a drop-down 
menu allowing to select the snak type when adding or editing a snak. The 
drop-down menu can be opened by clicking an anchor right next to the input 
element(s) used to specify a claim's value. Although this is regarded a 
'special', seldom used feature, the term 'snak' should be avoided here since 
the concept of snaks is a technical abstraction that does not give any 
additional meaning within the user interface. The basic meaning of this option 
is that a value exists but it is unknown.",
'wikibase-snakview-snaktypeselector-novalue' => "A short descriptive 
title of a no-value snak (see [[d:Wikidata/Glossary]]) used in a drop-down menu 
allowing to select the snak type when adding or editing a snak. The drop-down 
menu can be opened by clicking an anchor right next to the input element(s) 
used to specify a claim's value. Although this is regarded a 'special', seldom 
used feature, the term 'snak' should be avoided here since the concept of snaks 
is a technical abstraction that does not give any additional meaning within the 
user interface. The basic meaning of this option is that no value exists.",
+   'wikibase-shortcopyrightwarning' => 'A short copyright warning 
displayed during editing in the JavaScript UI. The copyright warning is 
displayed within a tooltip next to the save button. Parameters:
+* $1: the name of the button the message is referring to. Usually "save".
+* $2: the name of the wiki\'s page describing the terms of use.
+* $3: an external link to the license with the license\'s name as link text.',
'wikibase-copyrighttooltip-acknowledge' => 'Label of the link to not 
show the copyright warning again. A copyright warning is presented to the user 
whenever the user is about to alter any data unless the warning is not 
suppressed permanently by clicking this link.',
'wikibase-entityselector-more' => 'The entity selector is a user 
interface widget that allows selecting an entity (see [[d:Wikidata/Glossary]]). 
It consists out of an input field and a list of suggestions that is filled 
according to the t

[MediaWiki-commits] [Gerrit] (bug 44744) copyright warning now using its own message inst... - change (mediawiki...Wikibase)

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

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


Change subject: (bug 44744) copyright warning now using its own message instead 
of EditPage::getCopyrightWarning
..

(bug 44744) copyright warning now using its own message instead of 
EditPage::getCopyrightWarning

Since the 'EditPageCopyrightWarning' is not suitable (without adjustments) to 
cover the needs of
the wikidata short copyright message, we introduce our own message in wikibase 
for this.

The following will be added to Wikidata's configuration to have the message 
displayed according
to Wikidata's copyright and terms of use.
- $wgRightsUrl = 'http://creativecommons.org/publicdomain/zero/1.0/';
- $wgRightsText = 'CC0 public domain dedication';

Without these configuration variables defined, the message will not look nice.

- patch set 2: Corrected spelling errors

Change-Id: I3e975c6e79f5d6e4eb9001cb846ccdc36ddd7525
---
M repo/Wikibase.i18n.php
M repo/includes/EntityView.php
M repo/resources/wikibase.ui.entityViewInit.js
3 files changed, 18 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/37/49637/1

diff --git a/repo/Wikibase.i18n.php b/repo/Wikibase.i18n.php
index 006f576..c68f8e7 100644
--- a/repo/Wikibase.i18n.php
+++ b/repo/Wikibase.i18n.php
@@ -82,7 +82,8 @@
'wikibase-snakview-snaktypeselector-value' => 'custom value',
'wikibase-snakview-snaktypeselector-somevalue' => 'unknown value',
'wikibase-snakview-snaktypeselector-novalue' => 'no value',
-   'wikibase-copyrighttooltip-acknowledge' => 'I acknowledge and do not 
want to see this message again.',
+   'wikibase-shortcopyrightwarning' => 'By clicking "$1", you agree to the 
[[$2|terms of use]], and you irrevocably agree to release your contribution 
under the $3.',
+   'wikibase-copyrighttooltip-acknowledge' => 'I accept these terms for my 
future edits. Do not show this message again.',
 
'wikibase-entityselector-more' => 'more',
 
@@ -418,6 +419,10 @@
'wikibase-snakview-snaktypeselector-value' => "Short descriptive title 
of a 'value' snak (see [[d:Wikidata/Glossary]]) used in a drop-down menu 
allowing to select the snak type when adding or editing a snak. The drop-down 
menu can be opened by clicking an anchor right next to the input element(s) 
used to specify a claim's value. Although this is regarded a 'special', seldom 
used feature, the term 'snak' should be avoided here since the concept of snaks 
is a technical abstraction that does not give any additional meaning within the 
user interface. The basic meaning of this option - which is the default when 
adding a claim - is allowing the user to specify a value.",
'wikibase-snakview-snaktypeselector-somevalue' => "Short descriptive 
title of a some-value snak (see [[d:Wikidata/Glossary]]) used in a drop-down 
menu allowing to select the snak type when adding or editing a snak. The 
drop-down menu can be opened by clicking an anchor right next to the input 
element(s) used to specify a claim's value. Although this is regarded a 
'special', seldom used feature, the term 'snak' should be avoided here since 
the concept of snaks is a technical abstraction that does not give any 
additional meaning within the user interface. The basic meaning of this option 
is that a value exists but it is unknown.",
'wikibase-snakview-snaktypeselector-novalue' => "A short descriptive 
title of a no-value snak (see [[d:Wikidata/Glossary]]) used in a drop-down menu 
allowing to select the snak type when adding or editing a snak. The drop-down 
menu can be opened by clicking an anchor right next to the input element(s) 
used to specify a claim's value. Although this is regarded a 'special', seldom 
used feature, the term 'snak' should be avoided here since the concept of snaks 
is a technical abstraction that does not give any additional meaning within the 
user interface. The basic meaning of this option is that no value exists.",
+   'wikibase-shortcopyrightwarning' => 'A short copyright warning 
displayed during editing in the JavaScript UI. The copyright warning is 
displayed within a tooltip next to the save button. Parameters:
+* $1: the name of the button the message is referring to. Usually "save".
+* $2: the name of the wiki\'s page describing the terms of use.
+* $3: an external link to the license with the license\'s name as link text.',
'wikibase-copyrighttooltip-acknowledge' => 'Label of the link to not 
show the copyright warning again. A copyright warning is presented to the user 
whenever the user is about to alter any data unless the warning is not 
suppressed permanently by clicking this link.',
'wikibase-entityselector-more' => 'The entity selector is a user 
interface widget that allows selecting an entity (see [[d:Wikidata/Glossary]]). 
It consists out of an input 

[MediaWiki-commits] [Gerrit] (bug 44744) copyright tooltip can now be disabled (using a c... - change (mediawiki...Wikibase)

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

Change subject: (bug 44744) copyright tooltip can now be disabled (using a 
cookie)
..


(bug 44744) copyright tooltip can now be disabled (using a cookie)

- patch set 2: rebase
- patch set 3: adjusted change set according to changes in master adding 
afterstopediting event
in the claimview widget, added qqq message

Change-Id: I8d76ed637b28cd22d50eb744fc3d7f9296fda845
---
M lib/resources/jquery.wikibase/jquery.wikibase.claimview.js
M lib/resources/jquery.wikibase/jquery.wikibase.entityview.js
M repo/Wikibase.i18n.php
M repo/resources/Resources.php
M repo/resources/wikibase.ui.entityViewInit.js
5 files changed, 27 insertions(+), 5 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved



diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js
index f4a5520..d3f2912 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js
@@ -31,6 +31,9 @@
  * @event startediting: Triggered when starting the Claim's edit mode.
  *(1) {jQuery.Event}
  *
+ * @event afterstartediting: Triggered after having started the Claim's edit 
mode.
+ *(1) {jQuery.Event}
+ *
  * @event stopediting: Triggered when stopping the Claim's edit mode.
  *(1) {jQuery.Event}
  *(2) {boolean} If true, the value from before edit mode has been 
started will be reinstated
@@ -274,6 +277,8 @@
if ( !snakview.isValid() || snakview.isInitialSnak() ) {
this._disableSave();
}
+
+   this._trigger( 'afterstartediting' );
}
} ),
 
diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js
index ddd8da1..ca64994 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js
@@ -99,7 +99,7 @@
// compatibility with old PropertyEditTool which is still used 
for label, description etc.
// TODO: this should rather listen to 'valueviewstartediting' 
once implemented!
$( this.element )
-   .on( 'statementviewstartediting referenceviewstartediting', 
function( event ) {
+   .on( 'statementviewafterstartediting 
referenceviewafterstartediting', function( event ) {
$( wb ).trigger( 'startItemPageEditMode' );
} )
.on( 'snakviewstopediting', function( event, dropValue ) {
diff --git a/repo/Wikibase.i18n.php b/repo/Wikibase.i18n.php
index eef20f0..006f576 100644
--- a/repo/Wikibase.i18n.php
+++ b/repo/Wikibase.i18n.php
@@ -82,6 +82,7 @@
'wikibase-snakview-snaktypeselector-value' => 'custom value',
'wikibase-snakview-snaktypeselector-somevalue' => 'unknown value',
'wikibase-snakview-snaktypeselector-novalue' => 'no value',
+   'wikibase-copyrighttooltip-acknowledge' => 'I acknowledge and do not 
want to see this message again.',
 
'wikibase-entityselector-more' => 'more',
 
@@ -417,6 +418,7 @@
'wikibase-snakview-snaktypeselector-value' => "Short descriptive title 
of a 'value' snak (see [[d:Wikidata/Glossary]]) used in a drop-down menu 
allowing to select the snak type when adding or editing a snak. The drop-down 
menu can be opened by clicking an anchor right next to the input element(s) 
used to specify a claim's value. Although this is regarded a 'special', seldom 
used feature, the term 'snak' should be avoided here since the concept of snaks 
is a technical abstraction that does not give any additional meaning within the 
user interface. The basic meaning of this option - which is the default when 
adding a claim - is allowing the user to specify a value.",
'wikibase-snakview-snaktypeselector-somevalue' => "Short descriptive 
title of a some-value snak (see [[d:Wikidata/Glossary]]) used in a drop-down 
menu allowing to select the snak type when adding or editing a snak. The 
drop-down menu can be opened by clicking an anchor right next to the input 
element(s) used to specify a claim's value. Although this is regarded a 
'special', seldom used feature, the term 'snak' should be avoided here since 
the concept of snaks is a technical abstraction that does not give any 
additional meaning within the user interface. The basic meaning of this option 
is that a value exists but it is unknown.",
'wikibase-snakview-snaktypeselector-novalue' => "A short descriptive 
title of a no-value snak (see [[d:Wikidata/Glossary]]) used in a drop-down menu 
allowing to select the snak type when adding or editing a snak. The drop-down 
menu can be opened by clicking an anchor right next to the inp

[MediaWiki-commits] [Gerrit] (bug 44744) copyright tooltip can now be disabled (using a c... - change (mediawiki...Wikibase)

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

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


Change subject: (bug 44744) copyright tooltip can now be disabled (using a 
cookie)
..

(bug 44744) copyright tooltip can now be disabled (using a cookie)

- patch set 2: rebase
- patch set 3: adjusted change set according to changes in master adding 
afterstopediting event
in the claimview widget, added qqq message

Change-Id: I8d76ed637b28cd22d50eb744fc3d7f9296fda845
---
M lib/resources/jquery.wikibase/jquery.wikibase.claimview.js
M lib/resources/jquery.wikibase/jquery.wikibase.entityview.js
M repo/Wikibase.i18n.php
M repo/resources/Resources.php
M repo/resources/wikibase.ui.entityViewInit.js
5 files changed, 27 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/35/49635/1

diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js
index f4a5520..d3f2912 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js
@@ -31,6 +31,9 @@
  * @event startediting: Triggered when starting the Claim's edit mode.
  *(1) {jQuery.Event}
  *
+ * @event afterstartediting: Triggered after having started the Claim's edit 
mode.
+ *(1) {jQuery.Event}
+ *
  * @event stopediting: Triggered when stopping the Claim's edit mode.
  *(1) {jQuery.Event}
  *(2) {boolean} If true, the value from before edit mode has been 
started will be reinstated
@@ -274,6 +277,8 @@
if ( !snakview.isValid() || snakview.isInitialSnak() ) {
this._disableSave();
}
+
+   this._trigger( 'afterstartediting' );
}
} ),
 
diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js
index ddd8da1..ca64994 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js
@@ -99,7 +99,7 @@
// compatibility with old PropertyEditTool which is still used 
for label, description etc.
// TODO: this should rather listen to 'valueviewstartediting' 
once implemented!
$( this.element )
-   .on( 'statementviewstartediting referenceviewstartediting', 
function( event ) {
+   .on( 'statementviewafterstartediting 
referenceviewafterstartediting', function( event ) {
$( wb ).trigger( 'startItemPageEditMode' );
} )
.on( 'snakviewstopediting', function( event, dropValue ) {
diff --git a/repo/Wikibase.i18n.php b/repo/Wikibase.i18n.php
index eef20f0..006f576 100644
--- a/repo/Wikibase.i18n.php
+++ b/repo/Wikibase.i18n.php
@@ -82,6 +82,7 @@
'wikibase-snakview-snaktypeselector-value' => 'custom value',
'wikibase-snakview-snaktypeselector-somevalue' => 'unknown value',
'wikibase-snakview-snaktypeselector-novalue' => 'no value',
+   'wikibase-copyrighttooltip-acknowledge' => 'I acknowledge and do not 
want to see this message again.',
 
'wikibase-entityselector-more' => 'more',
 
@@ -417,6 +418,7 @@
'wikibase-snakview-snaktypeselector-value' => "Short descriptive title 
of a 'value' snak (see [[d:Wikidata/Glossary]]) used in a drop-down menu 
allowing to select the snak type when adding or editing a snak. The drop-down 
menu can be opened by clicking an anchor right next to the input element(s) 
used to specify a claim's value. Although this is regarded a 'special', seldom 
used feature, the term 'snak' should be avoided here since the concept of snaks 
is a technical abstraction that does not give any additional meaning within the 
user interface. The basic meaning of this option - which is the default when 
adding a claim - is allowing the user to specify a value.",
'wikibase-snakview-snaktypeselector-somevalue' => "Short descriptive 
title of a some-value snak (see [[d:Wikidata/Glossary]]) used in a drop-down 
menu allowing to select the snak type when adding or editing a snak. The 
drop-down menu can be opened by clicking an anchor right next to the input 
element(s) used to specify a claim's value. Although this is regarded a 
'special', seldom used feature, the term 'snak' should be avoided here since 
the concept of snaks is a technical abstraction that does not give any 
additional meaning within the user interface. The basic meaning of this option 
is that a value exists but it is unknown.",
'wikibase-snakview-snaktypeselector-novalue' => "A short descriptive 
title of a no-value snak (see [[d:Wikidata/Glossary]]) used in a drop-down menu 
allowing to select the snak type when adding or editing a snak. The drop-do

[MediaWiki-commits] [Gerrit] (bug 44744) Site links table: Attaching table headers earlie... - change (mediawiki...Wikibase)

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

Change subject: (bug 44744) Site links table: Attaching table headers earlier
..


(bug 44744) Site links table: Attaching table headers earlier

Attach the headers before initializing a new (first) value in order to not have 
the license
information tooltip appear in the wrong spot. (The new value's table row would 
be shifted
after adding the headers.)

Change-Id: I22ca45f709af50847f8b48285d855e963ad4e933
---
M lib/resources/wikibase.ui.SiteLinksEditTool.js
1 file changed, 9 insertions(+), 6 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved



diff --git a/lib/resources/wikibase.ui.SiteLinksEditTool.js 
b/lib/resources/wikibase.ui.SiteLinksEditTool.js
index 961d6bf..ed9b588 100644
--- a/lib/resources/wikibase.ui.SiteLinksEditTool.js
+++ b/lib/resources/wikibase.ui.SiteLinksEditTool.js
@@ -128,12 +128,11 @@
 * @return {wb.ui.PropertyEditTool.EditableValue}
 */
enterNewValue: function( value ) {
-   var newValue = 
wb.ui.PropertyEditTool.prototype.enterNewValue.call(
-   this, value, { prepend: true, displayRemoveButton: 
false }
-   );
-
-   // this would be the first site link -> attach column headers
-   if ( this._editableValues.length === 1 ) {
+   // Attach the headers before initializing the new value in 
order to not have the license
+   // information tooltip appear in the wrong spot. (The new 
value's table row would be shifted
+   // after adding the headers.)
+   if ( this._editableValues.length === 0 ) {
+   // This would be the first site link -> attach column 
headers.
$( 'table.wb-sitelinks thead' ).append(
mw.template( 'wb-sitelinks-thead',
mw.message( 
'wikibase-sitelinks-sitename-columnheading' ).escaped(),
@@ -143,6 +142,10 @@
);
}
 
+   var newValue = 
wb.ui.PropertyEditTool.prototype.enterNewValue.call(
+   this, value, { prepend: true, displayRemoveButton: 
false }
+   );
+
$( newValue ).on( 'afterStopEditing', function( event, save, 
wasPending ) {
if ( save ) {
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I22ca45f709af50847f8b48285d855e963ad4e933
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.21-wmf10
Gerrit-Owner: Anja Jentzsch 
Gerrit-Reviewer: Anja Jentzsch 
Gerrit-Reviewer: Henning Snater 

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


[MediaWiki-commits] [Gerrit] (bug 44744) Site links table: Attaching table headers earlie... - change (mediawiki...Wikibase)

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

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


Change subject: (bug 44744) Site links table: Attaching table headers earlier
..

(bug 44744) Site links table: Attaching table headers earlier

Attach the headers before initializing a new (first) value in order to not have 
the license
information tooltip appear in the wrong spot. (The new value's table row would 
be shifted
after adding the headers.)

Change-Id: I22ca45f709af50847f8b48285d855e963ad4e933
---
M lib/resources/wikibase.ui.SiteLinksEditTool.js
1 file changed, 9 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/34/49634/1

diff --git a/lib/resources/wikibase.ui.SiteLinksEditTool.js 
b/lib/resources/wikibase.ui.SiteLinksEditTool.js
index 961d6bf..ed9b588 100644
--- a/lib/resources/wikibase.ui.SiteLinksEditTool.js
+++ b/lib/resources/wikibase.ui.SiteLinksEditTool.js
@@ -128,12 +128,11 @@
 * @return {wb.ui.PropertyEditTool.EditableValue}
 */
enterNewValue: function( value ) {
-   var newValue = 
wb.ui.PropertyEditTool.prototype.enterNewValue.call(
-   this, value, { prepend: true, displayRemoveButton: 
false }
-   );
-
-   // this would be the first site link -> attach column headers
-   if ( this._editableValues.length === 1 ) {
+   // Attach the headers before initializing the new value in 
order to not have the license
+   // information tooltip appear in the wrong spot. (The new 
value's table row would be shifted
+   // after adding the headers.)
+   if ( this._editableValues.length === 0 ) {
+   // This would be the first site link -> attach column 
headers.
$( 'table.wb-sitelinks thead' ).append(
mw.template( 'wb-sitelinks-thead',
mw.message( 
'wikibase-sitelinks-sitename-columnheading' ).escaped(),
@@ -143,6 +142,10 @@
);
}
 
+   var newValue = 
wb.ui.PropertyEditTool.prototype.enterNewValue.call(
+   this, value, { prepend: true, displayRemoveButton: 
false }
+   );
+
$( newValue ).on( 'afterStopEditing', function( event, save, 
wasPending ) {
if ( save ) {
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I22ca45f709af50847f8b48285d855e963ad4e933
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.21-wmf10
Gerrit-Owner: Anja Jentzsch 
Gerrit-Reviewer: Henning Snater 

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


[MediaWiki-commits] [Gerrit] (bug 44744) copyright tooltip will now always be shown - change (mediawiki...Wikibase)

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

Change subject: (bug 44744) copyright tooltip will now always be shown
..


(bug 44744) copyright tooltip will now always be shown

Even if an error tooltip appears on the save button, the copyright tooltip will 
still be shown.
For this to work, the copyright tooltip now is appended to a new toolbar 
element, only appended
whenever global edit mode gets triggered.

patch set 4: some cleanup

Change-Id: Ic0ecf1b75717cf3a6eb7f6cfe2df3be50126a297
---
M lib/resources/wikibase.ui.PropertyEditTool.EditableValue.Interface.js
M lib/resources/wikibase.ui.Toolbar.Label.js
M lib/resources/wikibase.ui.Tooltip.Extension.js
M lib/resources/wikibase.ui.Tooltip.js
M repo/resources/wikibase.ui.entityViewInit.js
5 files changed, 49 insertions(+), 29 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved



diff --git 
a/lib/resources/wikibase.ui.PropertyEditTool.EditableValue.Interface.js 
b/lib/resources/wikibase.ui.PropertyEditTool.EditableValue.Interface.js
index 9060f7c..443bf81 100644
--- a/lib/resources/wikibase.ui.PropertyEditTool.EditableValue.Interface.js
+++ b/lib/resources/wikibase.ui.PropertyEditTool.EditableValue.Interface.js
@@ -562,7 +562,7 @@
 // add tooltip functionality to EditableValue:
 wb.ui.Tooltip.Extension.useWith( 
wb.ui.PropertyEditTool.EditableValue.Interface, {
// overwrite required functions:
-   _getTooltipParent: function() {
+   getTooltipParent: function() {
return this._subject;
}
 } );
diff --git a/lib/resources/wikibase.ui.Toolbar.Label.js 
b/lib/resources/wikibase.ui.Toolbar.Label.js
index ad8919c..4f60a22 100644
--- a/lib/resources/wikibase.ui.Toolbar.Label.js
+++ b/lib/resources/wikibase.ui.Toolbar.Label.js
@@ -53,7 +53,7 @@
},
 
_initElem: function( content ) {
-   if ( typeof content == String ) {
+   if ( typeof content === 'string' ) {
content = $.trim( content );
}
this._elem = $( '', {
@@ -78,7 +78,7 @@
 */
setContent: function( content ) {
this._elem.empty();
-   if ( typeof content == 'string' ) {
+   if ( typeof content === 'string' ) {
content = $.trim( content );
}
this._elem.append( content );
@@ -96,10 +96,22 @@
if( contents.length === 1 && contents[0].nodeType === 3 ) {
// return the text
return contents.text();
-   } else {
-   // return jQuery object
-   return contents;
}
+   // return jQuery object
+   return contents;
+   },
+
+   /**
+* Returns the DOM node representing the toolbar element.
+* Allows for adding additional styles to the element. Should not be 
abused to remove the
+* element from the toolbar, for doing this, 
wb.ui.Toolbar.removeElement should be used.
+*
+* @since 0.4
+*
+* @return jQuery
+*/
+   getElement: function() {
+   return this._elem;
},
 
/**
@@ -173,7 +185,7 @@
 // add tooltip functionality to EditableValue:
 wb.ui.Tooltip.Extension.useWith( wb.ui.Toolbar.Label, {
// overwrite required functions:
-   _getTooltipParent: function() {
+   getTooltipParent: function() {
return this._elem;
}
 } );
diff --git a/lib/resources/wikibase.ui.Tooltip.Extension.js 
b/lib/resources/wikibase.ui.Tooltip.Extension.js
index 0c56359..f1e9187 100644
--- a/lib/resources/wikibase.ui.Tooltip.Extension.js
+++ b/lib/resources/wikibase.ui.Tooltip.Extension.js
@@ -20,7 +20,7 @@
  * @example:
  * var SomeConstructor = wb.utilities.inherit( Object, function() {...} );
  * wb.ui.Tooltip.Ext.extend( SomeConstructor ); // makes setTooltip and other 
functions available
- * SomeConstructor.prototype._getTooltipParent = function() { return 
this.someNode };
+ * SomeConstructor.prototype.getTooltipParent = function() { return 
this.someNode };
  * SomeConstructor.setTooltip( someTooltip );
  *
  * @since 0.1
@@ -39,7 +39,7 @@
 *
 * @see wb.utilities.abstractFunction
 */
-   _getTooltipParent: wb.utilities.abstractFunction,
+   getTooltipParent: wb.utilities.abstractFunction,
 
/**
 * Attaches a tooltip message to the extended element.
@@ -59,12 +59,12 @@
}
if ( typeof tooltip === 'string' || tooltip instanceof $ ) {
// build new tooltip from string:
-   this._getTooltipParent().attr( 'title', tooltip );
-   this._tooltip = new wb.ui.Tooltip( 
this._getTooltipParent(), {}, tooltip );
+   this.getTooltipParent().attr( 'title',

[MediaWiki-commits] [Gerrit] css: Coloring for reference errors - change (mediawiki...Wikibase)

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

Change subject: css: Coloring for reference errors
..


css: Coloring for reference errors

Change-Id: Id8531089982c15376e0ae8c8d9efb1e8688f3141
---
M lib/resources/wikibase.css
1 file changed, 4 insertions(+), 0 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved



diff --git a/lib/resources/wikibase.css b/lib/resources/wikibase.css
index 3e750a8..35f55c9 100644
--- a/lib/resources/wikibase.css
+++ b/lib/resources/wikibase.css
@@ -601,6 +601,10 @@
font-size: 90%;
 }
 
+.wb-statement-references .wb-error {
+   background-color: #E5C8B5;
+}
+
 .wb-referenceview {
position: relative;
background: #F0F0F0;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id8531089982c15376e0ae8c8d9efb1e8688f3141
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.21-wmf10
Gerrit-Owner: Anja Jentzsch 
Gerrit-Reviewer: Anja Jentzsch 
Gerrit-Reviewer: Henning Snater 

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


[MediaWiki-commits] [Gerrit] css: Coloring for reference errors - change (mediawiki...Wikibase)

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

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


Change subject: css: Coloring for reference errors
..

css: Coloring for reference errors

Change-Id: Id8531089982c15376e0ae8c8d9efb1e8688f3141
---
M lib/resources/wikibase.css
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/30/49630/1

diff --git a/lib/resources/wikibase.css b/lib/resources/wikibase.css
index 3e750a8..35f55c9 100644
--- a/lib/resources/wikibase.css
+++ b/lib/resources/wikibase.css
@@ -601,6 +601,10 @@
font-size: 90%;
 }
 
+.wb-statement-references .wb-error {
+   background-color: #E5C8B5;
+}
+
 .wb-referenceview {
position: relative;
background: #F0F0F0;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id8531089982c15376e0ae8c8d9efb1e8688f3141
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.21-wmf10
Gerrit-Owner: Anja Jentzsch 
Gerrit-Reviewer: Henning Snater 

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


[MediaWiki-commits] [Gerrit] (bug 44665) start/stopEditing events for claimview widget - change (mediawiki...Wikibase)

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

Change subject: (bug 44665) start/stopEditing events for claimview widget
..


(bug 44665) start/stopEditing events for claimview widget

This change set implements startEditing and stopEditing events in the claimview 
widget which
required some refactoring in claimlistview/listview widgets.
Since there is no point in highlighting the main snak's property when 
adding/editing a reference,
this change set removes the highlighting as well.

- patch set 3: Fixed behavior when canceling and reverted changes of patch set 
2 since
these were not implemented correctly.

Change-Id: Ic6d28b436c231fa9a5e08aa0a00619b84d3deef5
---
M lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
M lib/resources/jquery.wikibase/jquery.wikibase.claimview.js
M lib/resources/jquery.wikibase/jquery.wikibase.entityview.js
M lib/resources/jquery.wikibase/jquery.wikibase.listview.js
M lib/resources/wikibase.css
M selenium/lib/modules/statement_module.rb
6 files changed, 441 insertions(+), 237 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved



diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
index 122f95a..a0c9231 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
@@ -62,7 +62,9 @@
_create: function() {
var self = this,
lmwRemoveEvent = this._lmwEvent( 'remove' ),
-   lmwErrorEvent = this._lmwEvent( 'toggleerror' );
+   lmwErrorEvent = this._lmwEvent( 'toggleerror' ),
+   lmwStartEditingEvent = this._lmwEvent( 'startediting' ),
+   lmwAfterStopEditingEvent = this._lmwEvent( 
'afterstopediting' );
 
// apply template to this.element:
PARENT.prototype._create.call( this );
@@ -101,18 +103,21 @@
}
} )
// make sure to add/remove 'wb-edit' class to sections when in 
edit mode:
-   .on( 'snakviewafterstopediting snakviewstartediting ' + 
lmwRemoveEvent, function( e ) {
-   if( e.type === 'snakviewstartediting' ) {
-   $( e.target ).parents( '.wb-claim-section' 
).addClass( 'wb-edit' );
-   } else {
-   // remove 'wb-edit' from all section nodes if 
the section itself has not child
-   // nodes with 'wb-edit' still set. This is 
necessary because of how we remove new
-   // Claims added to an existing section. Also 
required if we want multiple edit modes.
-   self.element.find( '.wb-claim-section' )
-   .not( ':has( >.wb-edit )' 
).removeClass( 'wb-edit' );
-   // NOTE: could be performance optimized with 
edit counter per section
+   .on(
+   [ lmwAfterStopEditingEvent, lmwStartEditingEvent, 
lmwRemoveEvent ].join( ' ' ),
+   function( e ) {
+   if( e.type === lmwStartEditingEvent ) {
+   $( e.target ).parents( 
'.wb-claim-section' ).addClass( 'wb-edit' );
+   } else {
+   // remove 'wb-edit' from all section 
nodes if the section itself has not child
+   // nodes with 'wb-edit' still set. This 
is necessary because of how we remove new
+   // Claims added to an existing section. 
Also required if we want multiple edit modes.
+   self.element.find( '.wb-claim-section' )
+   .not( ':has( >.wb-edit )' 
).removeClass( 'wb-edit' );
+   // NOTE: could be performance optimized 
with edit counter per section
+   }
}
-   } )
+   )
.on( lmwErrorEvent, function( e, hasError ) {
var $claimSection = $( e.target ).closest( 
'.wb-claim-section' );
 
@@ -317,6 +322,23 @@
},
 
/**
+* Finds the section node of a given claim node.
+*
+* @param {jQuery} $claim
+* @return {jQuery}
+*/
+   findClaimSection: function( $claim ) {
+   var $claimSection = null;
+   this.$claims.children().each( function( i, claimSection ) {
+   if ( claimSection === $claim.parent()[0] ) {
+   $claimSection = $( claimSection );
+   return fa

[MediaWiki-commits] [Gerrit] (bug 44665) start/stopEditing events for claimview widget - change (mediawiki...Wikibase)

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

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


Change subject: (bug 44665) start/stopEditing events for claimview widget
..

(bug 44665) start/stopEditing events for claimview widget

This change set implements startEditing and stopEditing events in the claimview 
widget which
required some refactoring in claimlistview/listview widgets.
Since there is no point in highlighting the main snak's property when 
adding/editing a reference,
this change set removes the highlighting as well.

- patch set 3: Fixed behavior when canceling and reverted changes of patch set 
2 since
these were not implemented correctly.

Change-Id: Ic6d28b436c231fa9a5e08aa0a00619b84d3deef5
---
M lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
M lib/resources/jquery.wikibase/jquery.wikibase.claimview.js
M lib/resources/jquery.wikibase/jquery.wikibase.entityview.js
M lib/resources/jquery.wikibase/jquery.wikibase.listview.js
M lib/resources/wikibase.css
M selenium/lib/modules/statement_module.rb
6 files changed, 441 insertions(+), 237 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/29/49629/1

diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
index 122f95a..a0c9231 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
@@ -62,7 +62,9 @@
_create: function() {
var self = this,
lmwRemoveEvent = this._lmwEvent( 'remove' ),
-   lmwErrorEvent = this._lmwEvent( 'toggleerror' );
+   lmwErrorEvent = this._lmwEvent( 'toggleerror' ),
+   lmwStartEditingEvent = this._lmwEvent( 'startediting' ),
+   lmwAfterStopEditingEvent = this._lmwEvent( 
'afterstopediting' );
 
// apply template to this.element:
PARENT.prototype._create.call( this );
@@ -101,18 +103,21 @@
}
} )
// make sure to add/remove 'wb-edit' class to sections when in 
edit mode:
-   .on( 'snakviewafterstopediting snakviewstartediting ' + 
lmwRemoveEvent, function( e ) {
-   if( e.type === 'snakviewstartediting' ) {
-   $( e.target ).parents( '.wb-claim-section' 
).addClass( 'wb-edit' );
-   } else {
-   // remove 'wb-edit' from all section nodes if 
the section itself has not child
-   // nodes with 'wb-edit' still set. This is 
necessary because of how we remove new
-   // Claims added to an existing section. Also 
required if we want multiple edit modes.
-   self.element.find( '.wb-claim-section' )
-   .not( ':has( >.wb-edit )' 
).removeClass( 'wb-edit' );
-   // NOTE: could be performance optimized with 
edit counter per section
+   .on(
+   [ lmwAfterStopEditingEvent, lmwStartEditingEvent, 
lmwRemoveEvent ].join( ' ' ),
+   function( e ) {
+   if( e.type === lmwStartEditingEvent ) {
+   $( e.target ).parents( 
'.wb-claim-section' ).addClass( 'wb-edit' );
+   } else {
+   // remove 'wb-edit' from all section 
nodes if the section itself has not child
+   // nodes with 'wb-edit' still set. This 
is necessary because of how we remove new
+   // Claims added to an existing section. 
Also required if we want multiple edit modes.
+   self.element.find( '.wb-claim-section' )
+   .not( ':has( >.wb-edit )' 
).removeClass( 'wb-edit' );
+   // NOTE: could be performance optimized 
with edit counter per section
+   }
}
-   } )
+   )
.on( lmwErrorEvent, function( e, hasError ) {
var $claimSection = $( e.target ).closest( 
'.wb-claim-section' );
 
@@ -317,6 +322,23 @@
},
 
/**
+* Finds the section node of a given claim node.
+*
+* @param {jQuery} $claim
+* @return {jQuery}
+*/
+   findClaimSection: function( $claim ) {
+   var $claimSection = null;
+   this.$claims.children().each( function( i, claimSection ) {
+   if ( claimSection === $claim.parent()[0] ) {
+   $claimSect

[MediaWiki-commits] [Gerrit] Add minwiki to sort order - change (mediawiki...Wikibase)

2013-02-14 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: Add minwiki to sort order
..


Add minwiki to sort order

-sync with 
[[meta:MediaWiki:Interwiki_config-sorting_order-native-languagename-firstword]] 
and
[[meta:MediaWiki:Interwiki_config-sorting_order-native-languagename]]

- would be awesome to have a nicer way to do this, but this fixes immediate 
issue

Change-Id: I180445e21ec74f7e9937a1b2714b5a3f709f6c56
---
M client/includes/SortUtils.php
1 file changed, 3 insertions(+), 3 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I180445e21ec74f7e9937a1b2714b5a3f709f6c56
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Aude 
Gerrit-Reviewer: Anja Jentzsch 
Gerrit-Reviewer: Daniel Kinzler 
Gerrit-Reviewer: Tobias Gritschacher 

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


[MediaWiki-commits] [Gerrit] Remove exception assertion from ItemTest constructor - change (mediawiki...Wikibase)

2013-02-13 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: Remove exception assertion from ItemTest constructor
..


Remove exception assertion from ItemTest constructor

- this is causing the tests to quit.

Change-Id: Ia3ae757b85d5a2ae69e821eb842d4e5e68ed2e8e
---
M lib/tests/phpunit/item/ItemTest.php
1 file changed, 0 insertions(+), 7 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved



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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia3ae757b85d5a2ae69e821eb842d4e5e68ed2e8e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Aude 
Gerrit-Reviewer: Anja Jentzsch 
Gerrit-Reviewer: Daniel Kinzler 
Gerrit-Reviewer: Tobias Gritschacher 

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


[MediaWiki-commits] [Gerrit] Add minwiki to the sort order - change (mediawiki...Wikibase)

2013-02-12 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: Add minwiki to the sort order
..


Add minwiki to the sort order

We should have a better solution for sort order, generally, but
this fixes the issue at the moment.

Change-Id: Id35c3a48c7ae03999fcfd8cb135ee44c1b7938d7
---
M client/includes/SortUtils.php
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved



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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id35c3a48c7ae03999fcfd8cb135ee44c1b7938d7
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.21-wmf9
Gerrit-Owner: Aude 
Gerrit-Reviewer: Anja Jentzsch 

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


[MediaWiki-commits] [Gerrit] (Bug 44802) Watchlist does not show when a watched article i... - change (mediawiki...Wikibase)

2013-02-12 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has uploaded a new change for review.

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


Change subject: (Bug 44802) Watchlist does not show when a watched article is 
added or removed from wikidata
..

(Bug 44802) Watchlist does not show when a watched article is added or removed 
from wikidata

Selenium tests for watchlist

Change-Id: Ice213ba7969105730a5d1aa639d675be2a7c9ec2
---
M client/tests/selenium/special/client_rc_and_wl_spec.rb
M selenium/lib/pages/watchlist_page.rb
2 files changed, 41 insertions(+), 1 deletion(-)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ice213ba7969105730a5d1aa639d675be2a7c9ec2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Anja Jentzsch 

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


[MediaWiki-commits] [Gerrit] (bug 44802) check for enhanced changes preference in more pl... - change (mediawiki...Wikibase)

2013-02-12 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: (bug 44802) check for enhanced changes preference in more places
..


(bug 44802) check for enhanced changes preference in more places

- the code is ugly but does the job
- watchlist code in core needs a bit of refactoring so hooks can be more 
context aware, etc.

Change-Id: I20322a7463b3afedf01aadcad8177824ee9c86ed
---
M client/WikibaseClient.hooks.php
1 file changed, 32 insertions(+), 20 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I20322a7463b3afedf01aadcad8177824ee9c86ed
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.21-wmf9
Gerrit-Owner: Aude 
Gerrit-Reviewer: Anja Jentzsch 
Gerrit-Reviewer: Tobias Gritschacher 

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


[MediaWiki-commits] [Gerrit] (testing) snaktype selector seleneium tests - change (mediawiki...Wikibase[master])

2013-01-22 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: (testing) snaktype selector seleneium tests
..


(testing) snaktype selector seleneium tests

- for some weird reason this is not working in Firefox yet

patchset 2: rebased
patchset 3: exclude this test in firefox

Change-Id: Id69566161fe2e13921b366b865253e26f1f4192a
---
M repo/tests/selenium/statements/statements_spec.rb
M selenium/lib/modules/statement_module.rb
2 files changed, 43 insertions(+), 0 deletions(-)

Approvals:
  Jens Ohlig: Checked; Looks good to me, but someone else must approve
  Anja Jentzsch: Verified; Looks good to me, approved


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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id69566161fe2e13921b366b865253e26f1f4192a
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Tobias Gritschacher 
Gerrit-Reviewer: Anja Jentzsch 
Gerrit-Reviewer: Henning Snater 
Gerrit-Reviewer: Jens Ohlig 
Gerrit-Reviewer: Tobias Gritschacher 

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


[MediaWiki-commits] [Gerrit] Removed already done todo - change (mediawiki...Diff[master])

2013-01-22 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: Removed already done todo
..


Removed already done todo

Change-Id: Ibb5b5e8909a7c59bc28084d171b3a84d385e1abd
---
M includes/diffop/diff/Diff.php
1 file changed, 0 insertions(+), 2 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved
  jenkins-bot: Verified


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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibb5b5e8909a7c59bc28084d171b3a84d385e1abd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Diff
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw 
Gerrit-Reviewer: Anja Jentzsch 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] (bug 43828) marking specific selenium tests as experimental - change (mediawiki...Wikibase[master])

2013-01-11 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: (bug 43828) marking specific selenium tests as experimental
..


(bug 43828) marking specific selenium tests as experimental

- selenium tests testing experimental features are now marked
as experimental
- they will not get executed when EXPERIMENTAL: false in
configuration.yml
- this changeset involves splitting off some testlogic into
separate tests

Change-Id: I2e4955699bfc6d657d6a4b58c66b51a6ac2ecce9
---
M repo/tests/selenium/item/editonoff_spec.rb
M repo/tests/selenium/item/ip_notification_spec.rb
M repo/tests/selenium/item/security_spec.rb
M repo/tests/selenium/property/property_view_spec.rb
M repo/tests/selenium/special/create_property_spec.rb
M repo/tests/selenium/statements/statements_bugs_spec.rb
M repo/tests/selenium/statements/statements_cm_spec.rb
M repo/tests/selenium/statements/statements_item_spec.rb
M repo/tests/selenium/statements/statements_spec.rb
M selenium/configuration.yml.sample
10 files changed, 80 insertions(+), 32 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved


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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2e4955699bfc6d657d6a4b58c66b51a6ac2ecce9
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Tobias Gritschacher 
Gerrit-Reviewer: Anja Jentzsch 
Gerrit-Reviewer: Henning Snater 
Gerrit-Reviewer: Jens Ohlig 
Gerrit-Reviewer: Tobias Gritschacher 

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


[MediaWiki-commits] [Gerrit] (bug 43828) possibility to filter experimentals in selenium ... - change (mediawiki...Wikibase[master])

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

Change subject: (bug 43828) possibility to filter experimentals in selenium 
tests
..


(bug 43828) possibility to filter experimentals in selenium tests

- this adds the possibility to mark specific selenium test cases
as experimental
- these tests can then be filtered out by setting
EXPERIMENTAL=false in configuration.yml
- this changeset does not include the actual marking of tests;
this is done in a later changeset

Change-Id: I8378cac06a0407014a5080035290e9f9658b937c
---
M selenium/configuration.yml.sample
M selenium/spec/spec_helper.rb
2 files changed, 6 insertions(+), 0 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved


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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8378cac06a0407014a5080035290e9f9658b937c
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Tobias Gritschacher 
Gerrit-Reviewer: Anja Jentzsch 
Gerrit-Reviewer: Henning Snater 
Gerrit-Reviewer: Jens Ohlig 
Gerrit-Reviewer: Tobias Gritschacher 

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


[MediaWiki-commits] [Gerrit] (minor) small change to statements rake tasks in selenium - change (mediawiki...Wikibase[master])

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

Change subject: (minor) small change to statements rake tasks in selenium
..


(minor) small change to statements rake tasks in selenium

Change-Id: I45770d43dc1967ddc6a38f9b31c7c76c201e619b
---
M selenium/Rakefile
1 file changed, 10 insertions(+), 5 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved


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

Gerrit-MessageType: merged
Gerrit-Change-Id: I45770d43dc1967ddc6a38f9b31c7c76c201e619b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Tobias Gritschacher 
Gerrit-Reviewer: Anja Jentzsch 
Gerrit-Reviewer: Henning Snater 
Gerrit-Reviewer: Jens Ohlig 

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


[MediaWiki-commits] [Gerrit] (minor) increase waitingtime in clientrepo seleniumtest when... - change (mediawiki...Wikibase[master])

2013-01-09 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: (minor) increase waitingtime in clientrepo seleniumtest when 
un/deleting item
..


(minor) increase waitingtime in clientrepo seleniumtest when un/deleting item

Change-Id: I70c455cb088fde12e98a7b76c1e2fe1ae35d7b3b
---
M client/tests/selenium/interwiki/client_repo_spec.rb
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Aude: Looks good to me, but someone else must approve
  Anja Jentzsch: Verified; Looks good to me, approved


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

Gerrit-MessageType: merged
Gerrit-Change-Id: I70c455cb088fde12e98a7b76c1e2fe1ae35d7b3b
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Tobias Gritschacher 
Gerrit-Reviewer: Anja Jentzsch 
Gerrit-Reviewer: Aude 
Gerrit-Reviewer: Henning Snater 
Gerrit-Reviewer: Jens Ohlig 
Gerrit-Reviewer: Tobias Gritschacher 

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


[MediaWiki-commits] [Gerrit] (minor) removed todo from selenium statements tests - change (mediawiki...Wikibase[master])

2013-01-09 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: (minor) removed todo from selenium statements tests
..


(minor) removed todo from selenium statements tests

- one bug got removed some time ago but there were
still a todo and some commented out code
- fixed a bug in the stements_bugs tests

Change-Id: Ibd6a5501b20aab78896d94248ea413fb5de6fa90
---
M repo/tests/selenium/statements/statements_bugs_spec.rb
M repo/tests/selenium/statements/statements_spec.rb
2 files changed, 6 insertions(+), 5 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved


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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibd6a5501b20aab78896d94248ea413fb5de6fa90
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Tobias Gritschacher 
Gerrit-Reviewer: Anja Jentzsch 
Gerrit-Reviewer: Henning Snater 
Gerrit-Reviewer: Jens Ohlig 

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


[MediaWiki-commits] [Gerrit] (bug 43606) more selenium tests for statements UI - change (mediawiki...Wikibase[master])

2013-01-04 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: (bug 43606) more selenium tests for statements UI
..


(bug 43606) more selenium tests for statements UI

- multiple statements
- multiple claims for same statement
- check values & links after reload
- check behavior of entity selector when editing a property value
- check RETURN & ESCAPE key behavior
- removing claims
- separate tests for commons media type
- separate tests for item type

Change-Id: I12099ff8495154d0589a226ceb943767b6c2eaea
---
A repo/tests/selenium/statements/statements_cm_spec.rb
A repo/tests/selenium/statements/statements_item_spec.rb
M repo/tests/selenium/statements/statements_spec.rb
M selenium/Rakefile
M selenium/lib/modules/statement_module.rb
5 files changed, 405 insertions(+), 47 deletions(-)

Approvals:
  Denny Vrandecic: Looks good to me, approved
  Anja Jentzsch: Verified; Looks good to me, approved


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

Gerrit-MessageType: merged
Gerrit-Change-Id: I12099ff8495154d0589a226ceb943767b6c2eaea
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Tobias Gritschacher 
Gerrit-Reviewer: Anja Jentzsch 
Gerrit-Reviewer: Denny Vrandecic 
Gerrit-Reviewer: Henning Snater 
Gerrit-Reviewer: Jens Ohlig 
Gerrit-Reviewer: Tobias Gritschacher 

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


[MediaWiki-commits] [Gerrit] (bug 42956) Parsing strings passed to template engine - change (mediawiki...Wikibase[mw1.21-wmf6])

2012-12-18 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: (bug 42956) Parsing strings passed to template engine
..


(bug 42956) Parsing strings passed to template engine

Change-Id: I7f2a9af530875563b8fed8ff670a3b2383c11907
---
M lib/resources/templates.js
M lib/tests/qunit/templates.tests.js
2 files changed, 27 insertions(+), 13 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved


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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7f2a9af530875563b8fed8ff670a3b2383c11907
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.21-wmf6
Gerrit-Owner: Anja Jentzsch 
Gerrit-Reviewer: Anja Jentzsch 
Gerrit-Reviewer: Henning Snater 

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


[MediaWiki-commits] [Gerrit] (bug 42956) Parsing strings passed to template engine - change (mediawiki...Wikibase[mw1.21-wmf6])

2012-12-18 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has uploaded a new change for review.

Change subject: (bug 42956) Parsing strings passed to template engine
..

(bug 42956) Parsing strings passed to template engine

Change-Id: I7f2a9af530875563b8fed8ff670a3b2383c11907
---
M lib/resources/templates.js
M lib/tests/qunit/templates.tests.js
2 files changed, 27 insertions(+), 13 deletions(-)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7f2a9af530875563b8fed8ff670a3b2383c11907
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.21-wmf6
Gerrit-Owner: Anja Jentzsch 
Gerrit-Reviewer: Henning Snater 

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


[MediaWiki-commits] [Gerrit] Added docs - change (mediawiki...DataValues[master])

2012-12-11 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: Added docs
..


Added docs

Change-Id: Ie70ba5c78e766588195f1563f43046168c1a31af
---
M ValueParsers/includes/ParserOptions.php
M ValueParsers/includes/ValueParser.php
2 files changed, 15 insertions(+), 1 deletion(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved
  jenkins-bot: Verified; Looks good to me, but someone else must approve


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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie70ba5c78e766588195f1563f43046168c1a31af
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DataValues
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw 
Gerrit-Reviewer: Anja Jentzsch 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Processign all changes! -> Processing all changes! - change (mediawiki...Wikibase[master])

2012-12-10 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: Processign all changes! -> Processing all changes!
..


Processign all changes! -> Processing all changes!

Change-Id: I8bdbcf0c3b3a94a4def815114b7e1ab9d50b3963
---
M lib/maintenance/pollForChanges.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved


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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8bdbcf0c3b3a94a4def815114b7e1ab9d50b3963
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Aude 
Gerrit-Reviewer: Anja Jentzsch 
Gerrit-Reviewer: John Erling Blad 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] (no bug) selenium tests now injecting old revid to revisionS... - change (mediawiki...Wikibase[master])

2012-12-10 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: (no bug) selenium tests now injecting old revid to revisionStore
..


(no bug) selenium tests now injecting old revid to revisionStore

- selenium editconflict tests were still injecting old revid from
  mw.config, now they are using the revisionStore, which makes the tests useful 
again

Change-Id: Id5960e83aeef6e15d031c3f940fcb6337961b363
---
M repo/tests/selenium/item/edit_conflict_spec.rb
1 file changed, 6 insertions(+), 11 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved


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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id5960e83aeef6e15d031c3f940fcb6337961b363
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Tobias Gritschacher 
Gerrit-Reviewer: Anja Jentzsch 
Gerrit-Reviewer: Aude 
Gerrit-Reviewer: Henning Snater 
Gerrit-Reviewer: Jens Ohlig 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] (no bug) added cond.wait for pref tabs in selenium tests - change (mediawiki...Wikibase[master])

2012-12-10 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: (no bug) added cond.wait for pref tabs in selenium tests
..


(no bug) added cond.wait for pref tabs in selenium tests

Change-Id: If1896d5ab42d12d62c516a1f3aed4cb11c210cc1
---
M client/tests/selenium/special/client_rc_and_wl_spec.rb
M selenium/lib/pages/client_user_prefs_page.rb
2 files changed, 8 insertions(+), 0 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved


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

Gerrit-MessageType: merged
Gerrit-Change-Id: If1896d5ab42d12d62c516a1f3aed4cb11c210cc1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Tobias Gritschacher 
Gerrit-Reviewer: Anja Jentzsch 
Gerrit-Reviewer: Aude 
Gerrit-Reviewer: Denny Vrandecic 
Gerrit-Reviewer: Henning Snater 
Gerrit-Reviewer: Jens Ohlig 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] (Bug 42826) Fix method name in CachedEntityTest due to chang... - change (mediawiki...Wikibase[mw1.21-wmf6])

2012-12-10 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: (Bug 42826) Fix method name in CachedEntityTest due to change 
in ORMRowTest
..


(Bug 42826) Fix method name in CachedEntityTest due to change in ORMRowTest

Change-Id: I7a0fbc8e18d7ca5e607624c4c8cc41514e208e42
---
M client/tests/phpunit/includes/CachedEntityTest.php
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved


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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7a0fbc8e18d7ca5e607624c4c8cc41514e208e42
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.21-wmf6
Gerrit-Owner: Anja Jentzsch 
Gerrit-Reviewer: Anja Jentzsch 
Gerrit-Reviewer: John Erling Blad 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] (Bug 42826) Fix method name in CachedEntityTest due to chang... - change (mediawiki...Wikibase[mw1.21-wmf6])

2012-12-10 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has uploaded a new change for review.

Change subject: (Bug 42826) Fix method name in CachedEntityTest due to change 
in ORMRowTest
..

(Bug 42826) Fix method name in CachedEntityTest due to change in ORMRowTest

Change-Id: I7a0fbc8e18d7ca5e607624c4c8cc41514e208e42
---
M client/tests/phpunit/includes/CachedEntityTest.php
1 file changed, 2 insertions(+), 2 deletions(-)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7a0fbc8e18d7ca5e607624c4c8cc41514e208e42
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.21-wmf6
Gerrit-Owner: Anja Jentzsch 
Gerrit-Reviewer: John Erling Blad 

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


[MediaWiki-commits] [Gerrit] (Bug 42826) Fix method name in ChangeRowTest due to change i... - change (mediawiki...Wikibase[mw1.21-wmf6])

2012-12-10 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: (Bug 42826) Fix method name in ChangeRowTest due to change in 
ORMRowTest
..


(Bug 42826) Fix method name in ChangeRowTest due to change in ORMRowTest

Patchset 2: Remove commented out stuff

Change-Id: I866c7a3e541cd3e9f443eff884c2bd7f98d2cda0
---
M lib/tests/phpunit/changes/ChangeRowTest.php
1 file changed, 2 insertions(+), 12 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved


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

Gerrit-MessageType: merged
Gerrit-Change-Id: I866c7a3e541cd3e9f443eff884c2bd7f98d2cda0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.21-wmf6
Gerrit-Owner: Anja Jentzsch 
Gerrit-Reviewer: Anja Jentzsch 
Gerrit-Reviewer: John Erling Blad 

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


[MediaWiki-commits] [Gerrit] (Bug 42826) Fix method name in ChangeRowTest due to change i... - change (mediawiki...Wikibase[mw1.21-wmf6])

2012-12-10 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has uploaded a new change for review.

Change subject: (Bug 42826) Fix method name in ChangeRowTest due to change in 
ORMRowTest
..

(Bug 42826) Fix method name in ChangeRowTest due to change in ORMRowTest

Patchset 2: Remove commented out stuff

Change-Id: I866c7a3e541cd3e9f443eff884c2bd7f98d2cda0
---
M lib/tests/phpunit/changes/ChangeRowTest.php
1 file changed, 2 insertions(+), 12 deletions(-)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I866c7a3e541cd3e9f443eff884c2bd7f98d2cda0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.21-wmf6
Gerrit-Owner: Anja Jentzsch 
Gerrit-Reviewer: John Erling Blad 

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


[MediaWiki-commits] [Gerrit] (Bug 42762) Corrected the message key of wbeditentity - change (mediawiki...Wikibase[mw1.21-wmf6])

2012-12-10 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: (Bug 42762) Corrected the message key of wbeditentity
..


(Bug 42762) Corrected the message key of wbeditentity

Change-Id: I20dd0bd1c866a7bf33cec770f29d20224c841992
---
M repo/includes/api/ApiEditEntity.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved


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

Gerrit-MessageType: merged
Gerrit-Change-Id: I20dd0bd1c866a7bf33cec770f29d20224c841992
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.21-wmf6
Gerrit-Owner: Anja Jentzsch 
Gerrit-Reviewer: Anja Jentzsch 
Gerrit-Reviewer: John Erling Blad 

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


[MediaWiki-commits] [Gerrit] (Bug 42762) Corrected the message key of wbeditentity - change (mediawiki...Wikibase[mw1.21-wmf6])

2012-12-10 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has uploaded a new change for review.

Change subject: (Bug 42762) Corrected the message key of wbeditentity
..

(Bug 42762) Corrected the message key of wbeditentity

Change-Id: I20dd0bd1c866a7bf33cec770f29d20224c841992
---
M repo/includes/api/ApiEditEntity.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I20dd0bd1c866a7bf33cec770f29d20224c841992
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.21-wmf6
Gerrit-Owner: Anja Jentzsch 
Gerrit-Reviewer: John Erling Blad 

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


[MediaWiki-commits] [Gerrit] (bug 42768) Avoid error for history of missing page. - change (mediawiki...Wikibase[mw1.21-wmf6])

2012-12-10 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: (bug 42768) Avoid error for history of missing page.
..


(bug 42768) Avoid error for history of missing page.

Viewing the history of a page that does not exist should not cause a
fatal error.

Note: this fix needs to be backported to the mw1.21-wmf5 branch, and it
should be deployed on wikidata.org. It's not urgent, though.

Change-Id: I53a1e79c80933b1301449805618c56a5762e1832
---
M repo/includes/actions/HistoryEntityAction.php
1 file changed, 6 insertions(+), 0 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved


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

Gerrit-MessageType: merged
Gerrit-Change-Id: I53a1e79c80933b1301449805618c56a5762e1832
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.21-wmf6
Gerrit-Owner: Anja Jentzsch 
Gerrit-Reviewer: Anja Jentzsch 
Gerrit-Reviewer: Daniel Kinzler 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] (bug 42768) Avoid error for history of missing page. - change (mediawiki...Wikibase[mw1.21-wmf6])

2012-12-10 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has uploaded a new change for review.

Change subject: (bug 42768) Avoid error for history of missing page.
..

(bug 42768) Avoid error for history of missing page.

Viewing the history of a page that does not exist should not cause a
fatal error.

Note: this fix needs to be backported to the mw1.21-wmf5 branch, and it
should be deployed on wikidata.org. It's not urgent, though.

Change-Id: I53a1e79c80933b1301449805618c56a5762e1832
---
M repo/includes/actions/HistoryEntityAction.php
1 file changed, 6 insertions(+), 0 deletions(-)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I53a1e79c80933b1301449805618c56a5762e1832
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.21-wmf6
Gerrit-Owner: Anja Jentzsch 
Gerrit-Reviewer: Daniel Kinzler 

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


[MediaWiki-commits] [Gerrit] Use EditEntity in removeclaims and added token requirement - change (mediawiki...Wikibase[mw1.21-wmf6])

2012-12-10 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: Use EditEntity in removeclaims and added token requirement
..


Use EditEntity in removeclaims and added token requirement

Change-Id: Ied3aa9ea7753591959458d5c9180b9a2db453c84
---
M repo/includes/api/ApiRemoveClaims.php
M repo/tests/phpunit/includes/api/ApiRemoveClaimsTest.php
2 files changed, 74 insertions(+), 3 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved


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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ied3aa9ea7753591959458d5c9180b9a2db453c84
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.21-wmf6
Gerrit-Owner: Anja Jentzsch 
Gerrit-Reviewer: Anja Jentzsch 
Gerrit-Reviewer: Jeroen De Dauw 

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


  1   2   >