[MediaWiki-commits] [Gerrit] Split files into public and private - change (analytics/geowiki)
Hello Milimetric, I'd like you to do a code review. Please visit https://gerrit.wikimedia.org/r/100740 to review the following change. Change subject: Split files into public and private .. Split files into public and private Card: Analytics 1253 Change-Id: Ib5e50b8281992c19bfb95d77bbafc3629cf50924 --- M scripts/check_web_page.sh 1 file changed, 101 insertions(+), 18 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/geowiki refs/changes/40/100740/1 diff --git a/scripts/check_web_page.sh b/scripts/check_web_page.sh index a33a302..a4bf819 100755 --- a/scripts/check_web_page.sh +++ b/scripts/check_web_page.sh @@ -1355,7 +1355,7 @@ } #--- -# Checks that geowiki's dashboards are ok. +# Checks that geowiki's public dashboards are ok. # # Input: # - @@ -1363,12 +1363,12 @@ # Output: # - # -check_dashboards() { +check_public_dashboards() { check_dashboard reportcard } #--- -# Checks that geowiki's graphs are ok. +# Checks that geowiki's public graphs are ok. # # Input: # - @@ -1376,11 +1376,10 @@ # Output: # - # -check_graphs() { +check_public_graphs() { check_graph active_editors_by_region check_graph active_editors_total check_graph global_north_south_active_editors -check_graph global_south_editor_fractions check_graph grants_count_by_global_south check_graph grants_count_by_program check_graph grants_spending_by_country @@ -1390,7 +1389,7 @@ } #--- -# Checks that geowiki's datasources are ok. +# Checks that geowiki's public datasources are ok. # # Input: # - @@ -1398,19 +1397,15 @@ # Output: # - # -check_datasources() { +check_public_datasources() { check_datasource_json active_editors_total csv -check_datasource_json global_southcsv check_datasource_json map-world_countries json -check_datasource_json pt_top10csv -check_datasource_json region csv # The following datasources somewhat belong to geowiki, but are # not part of the geowiki, so they have to be generated by # hand. We monitor them to avoid data loss, but geowiki does not # allow to keep the up-to-date. So we cannot check that they are # up-to-date. -check_datasource_json global_south_editor_fractions csv check_datasource_json grants_count_by_global_southcsv check_datasource_json grants_count_by_program csv check_datasource_json grants_spending_by_country json @@ -1419,7 +1414,7 @@ } #--- -# Checks that geowiki's datafiles are ok. +# Checks that geowiki's public datafiles are ok. # # Input: # - @@ -1427,8 +1422,66 @@ # Output: # - # -check_datafiles() { +check_public_datafiles() { check_csv_active_editors_total +} + +#--- +# Checks that geowiki's private dashboards are ok. +# +# Input: +# - +# +# Output: +# - +# +check_private_dashboards() { +# Empty placeholder. +# +# This function just exists, so the check_* functions structure is +# nice and symmetrical between public and private checks +: +} + +#--- +# Checks that geowiki's private graphs are ok. +# +# Input: +# - +# +# Output: +# - +# +check_private_graphs() { +check_graph global_south_editor_fractions +} + +#--- +# Checks that geowiki's private datasources are ok. +# +# Input: +# - +# +# Output: +# - +# +check_private_datasources() { +check_datasource_json global_southcsv +check_datasource_json pt_top10csv +check_datasource_json region csv +check_datasource_json global_south_editor_fractions csv +} + +#--- +# Checks that geowiki's private datafiles are ok. +# +# Input: +# - +# +# Output: +# - +# +check_private_datafiles() { check_csv_global_south check_csv_global_south_editor_fractions check_csv_region @@ -1437,7 +1490,39 @@ } #--- -# Checks that geowiki's files are ok. +# Checks that geowiki's public files are ok. +# +# Input: +# - +# +# Output: +# - +# +check_public_data() { +check_public_dashboards +check_public_graphs +check_public_datasources +check_public_datafiles +} + +#--- +# Checks that geowiki's private files are ok. +# +# Input: +# - +# +# Output: +# - +# +check_private_data() { +check_private_dashboards +check_private_graphs +check_private_datasources +check_private_datafiles +} + +#--- +# Checks that g
[MediaWiki-commits] [Gerrit] Allow to request checking limn scaffolding for private data - change (analytics/geowiki)
Hello Milimetric, I'd like you to do a code review. Please visit https://gerrit.wikimedia.org/r/100744 to review the following change. Change subject: Allow to request checking limn scaffolding for private data .. Allow to request checking limn scaffolding for private data Change-Id: Idbe42120a100057d248de1378741e367bfbd5d82 Card: Analytics 1253 --- M scripts/check_web_page.sh 1 file changed, 31 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/geowiki refs/changes/44/100744/1 diff --git a/scripts/check_web_page.sh b/scripts/check_web_page.sh index de5efa6..04ca25c 100755 --- a/scripts/check_web_page.sh +++ b/scripts/check_web_page.sh @@ -79,6 +79,16 @@ # the web. This is mostly useful for debugging. LOCAL_DATA_CHECKOUTS_DIR_RELI=() +# Set CHECK_PRIVATE_PART_LIMN_FILES to "yes" to check the limn files +# of the private part eventhough they do not get served through the +# private data's web server. This check will only succeed when adding a +# checkout of the private data repository via “--add-checkout”. +# +# (You can use the --check-private-part-limn-files to set +# CHECK_PRIVATE_PART_LIMN_FILES=yes temporarily) +CHECK_PRIVATE_PART_LIMN_FILES=no +#CHECK_PRIVATE_PART_LIMN_FILES=yes + #--- # Prints the script's help screen # @@ -108,6 +118,11 @@ for debugging the script. But you'll have to cleanup the /tmp/geowiki_monitor... files by hand on your own. +--check-private-part-limn-files + -- Check limn files of private part, eventhough they do not get +served through the private data's web server. This check +will only succeed when adding a checkout of the private data +repository via “--add-checkout” (see above). --date DATE -- per default expect that all datafiles come with data up to, and including DATE. DATE can be any value accepted by date's --date option. (Default: "yesterday") @@ -153,6 +168,9 @@ "--cache" ) USE_CACHE="yes" ;; + "--check-private-part-limn-files" ) + CHECK_PRIVATE_PART_LIMN_FILES=yes + ;; "--date" ) [[ $# -ge 1 ]] || error "$ARGUMENT requires a further parameter" DEFAULT_LAST_EXPECTED_DATE_PARAMETER="$1" @@ -335,8 +353,11 @@ use_private_server() { set_URL_BASEs "$PRIVATE_PART_URL_BASE" -# The CSV files are currently served directly at URL_BASE. -URL_BASE_CSV="$URL_BASE" +if [ "$CHECK_PRIVATE_PART_LIMN_FILES" != "yes" ] +then + # The CSV files are currently served directly at URL_BASE. + URL_BASE_CSV="$URL_BASE" +fi HTTP_USER="$PRIVATE_PART_USER" HTTP_PASSWORD="$PRIVATE_PART_PASSWORD" @@ -1618,12 +1639,14 @@ # We currently only serve datafiles on the server for the private # data. Hence we cannot check the staffolding for the graphs of -# the datafiles. -# -#check_private_dashboards -#check_private_graphs -#check_private_datasources - +# the datafiles by default. But if the user requested it, we do +# check them. +if [ "$CHECK_PRIVATE_PART_LIMN_FILES" = "yes" ] +then + check_private_dashboards + check_private_graphs + check_private_datasources +fi check_private_datafiles } -- To view, visit https://gerrit.wikimedia.org/r/100744 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idbe42120a100057d248de1378741e367bfbd5d82 Gerrit-PatchSet: 1 Gerrit-Project: analytics/geowiki Gerrit-Branch: master Gerrit-Owner: QChris Gerrit-Reviewer: Milimetric ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use different URLs and authentication for private data - change (analytics/geowiki)
Hello Milimetric, I'd like you to do a code review. Please visit https://gerrit.wikimedia.org/r/100743 to review the following change. Change subject: Use different URLs and authentication for private data .. Use different URLs and authentication for private data After this commit, monitoring of geowiki functional again. Change-Id: Ie3b1a4d210a37ab0929b808f27951be52ff8aa26 Card: Analytics 1253 --- M scripts/check_web_page.sh 1 file changed, 109 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/geowiki refs/changes/43/100743/1 diff --git a/scripts/check_web_page.sh b/scripts/check_web_page.sh index 410184c..de5efa6 100755 --- a/scripts/check_web_page.sh +++ b/scripts/check_web_page.sh @@ -34,11 +34,10 @@ VERBOSITY="$VERBOSITY_NORMAL" # Urls to download files from -URL_BASE="http://gp.wmflabs.org/"; -URL_BASE_DASHBOARD="$URL_BASE/dashboards" -URL_BASE_GRAPH="$URL_BASE/graphs" -URL_BASE_DATASOURCE="$URL_BASE/datasources" -URL_BASE_CSV="$URL_BASE/data/datafiles/gp" +PUBLIC_PART_URL_BASE="http://gp.wmflabs.org/"; +PRIVATE_PART_URL_BASE="https://stats.wikimedia.org/geowiki-private/"; +PRIVATE_PART_USER= +PRIVATE_PART_PASSWORD= # Wikis with many active editors. # For those wikis, we use allow less deviation from linear @@ -112,6 +111,12 @@ --date DATE -- per default expect that all datafiles come with data up to, and including DATE. DATE can be any value accepted by date's --date option. (Default: "yesterday") +--private-part-user USER + -- Authenticate as user USER when fetching files private +data files. +--private-part-password-file PWD_FILE + -- Authenticate using the first line of PWD_FILE as password +when fetching files private data files. --quiet -- suppress all messages but errors. --verbose-- More verbose output. @@ -153,6 +158,17 @@ DEFAULT_LAST_EXPECTED_DATE_PARAMETER="$1" shift ;; + "--private-part-user" ) + [[ $# -ge 1 ]] || error "$ARGUMENT requires a further parameter" + PRIVATE_PART_USER="$1" + shift + ;; + "--private-part-password-file" ) + [[ $# -ge 1 ]] || error "$ARGUMENT requires a further parameter" + [[ -f "$1" ]] || error "'$1' is not a file" + read -r PRIVATE_PART_PASSWORD <"$1" || error "Could not read line from '$1'" + shift + ;; "--quiet" ) VERBOSITY="$VERBOSITY_QUIET" ;; @@ -260,6 +276,73 @@ } #--- +# Sets URL_BASE_* varibales relative to a given URL. +# +# Input: +# $1 - The URL to use as base +# +# Output: +# URL_BASE - Base URL +# URL_BASE_CSV - URL to fetch CSVs from +# URL_BASE_DASHBOARD - URL to fetch dashboards from +# URL_BASE_DATASOURCE - URL to fetch datasources from +# URL_BASE_GRAPH - URL to fetch graphs from +# +set_URL_BASEs() { +URL_BASE="$1" +URL_BASE_DASHBOARD="$URL_BASE/dashboards" +URL_BASE_GRAPH="$URL_BASE/graphs" +URL_BASE_DATASOURCE="$URL_BASE/datasources" +URL_BASE_CSV="$URL_BASE/data/datafiles/gp" +} + +#--- +# Sets connection related variables to server of pubic geowiki files. +# +# Input: +# +# Output: +# HTTP_USER - User name used for authentication when fetching files +# HTTP_PASSWORD - Password used for authentication when fetching files +# URL_BASE - Base URL +# URL_BASE_CSV - URL to fetch CSVs from +# URL_BASE_DASHBOARD - URL to fetch dashboards from +# URL_BASE_DATASOURCE - URL to fetch datasources from +# URL_BASE_GRAPH - URL to fetch graphs from +# +use_public_server() { +set_URL_BASEs "$PUBLIC_PART_URL_BASE" + +# The public serve should not require authentication +HTTP_USER= +HTTP_PASSWORD= +} + +#--- +# Sets connection related variables to server of private geowiki files. +# +# Input: +# +# Output: +# HTTP_USER - User name used for authentication when fetching files +# HTTP_PASSWORD - Password used for authentication when fetching files +# URL_BASE - Base URL +# URL_BASE_CSV - URL to fetch CSVs from +# URL_BASE_DASHBOARD - URL to fetch dashboards from +# URL_BASE_DATASOURCE - URL to fetch datasources from +# URL_BASE_GRAPH - URL to fetch graphs from +# +use_private_server() { +set_URL_BASEs "$PRIVATE_PART_URL_BASE" + +# The CSV files are currently served directly at URL_BASE. +URL_BASE_CSV="$URL_BASE" + +HTTP_USER="$PRIVATE_PART_USER" +HTTP_PASSWORD="$PRIVATE_PART_PASSWORD" +} + +#--- # Downloads a URL to $DOWNLOADED_FILE_ABS without considering caches. # #
[MediaWiki-commits] [Gerrit] Fetch map-world_countries as json - change (analytics/geowiki)
Hello Milimetric, I'd like you to do a code review. Please visit https://gerrit.wikimedia.org/r/100739 to review the following change. Change subject: Fetch map-world_countries as json .. Fetch map-world_countries as json Fetching as yaml does no longer work and returns the limn's boilerplate html. So we have to fetch as json, which limn does as well. Card: Analytics 1253 Change-Id: I43b788d78645d37a0b4d56bd9bd008cd1691b0a1 --- M scripts/check_web_page.sh 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/geowiki refs/changes/39/100739/1 diff --git a/scripts/check_web_page.sh b/scripts/check_web_page.sh index 8ba2b63..a33a302 100755 --- a/scripts/check_web_page.sh +++ b/scripts/check_web_page.sh @@ -1401,7 +1401,7 @@ check_datasources() { check_datasource_json active_editors_total csv check_datasource_json global_southcsv -check_datasource_yaml map-world_countries json +check_datasource_json map-world_countries json check_datasource_json pt_top10csv check_datasource_json region csv -- To view, visit https://gerrit.wikimedia.org/r/100739 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I43b788d78645d37a0b4d56bd9bd008cd1691b0a1 Gerrit-PatchSet: 1 Gerrit-Project: analytics/geowiki Gerrit-Branch: master Gerrit-Owner: QChris Gerrit-Reviewer: Milimetric ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Give proper error message when fetching of URL failed - change (analytics/geowiki)
Hello Milimetric, I'd like you to do a code review. Please visit https://gerrit.wikimedia.org/r/100741 to review the following change. Change subject: Give proper error message when fetching of URL failed .. Give proper error message when fetching of URL failed If fetching a file fails due to certificate errors, up to now the script just died, as we throw wget's output away. Now we report that fetching a file failed and show the URL. Card: Analytics 1253 Change-Id: I0f5dde3b744c6c70b057e03f619117c0b6804e5b --- M scripts/check_web_page.sh 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/geowiki refs/changes/41/100741/1 diff --git a/scripts/check_web_page.sh b/scripts/check_web_page.sh index a4bf819..37d677e 100755 --- a/scripts/check_web_page.sh +++ b/scripts/check_web_page.sh @@ -334,7 +334,8 @@ cp "$LOCAL_COPY_FILE_RELI" "$DOWNLOADED_FILE_ABS" else log "$VERBOSITY_VERBOSE" "Downloading $URL ..." - wget -O "$DOWNLOADED_FILE_ABS" -o /dev/null "$URL" + wget -O "$DOWNLOADED_FILE_ABS" -o /dev/null "$URL" || \ +( rm -f "$DOWNLOADED_FILE_ABS" ; error "Failed to fetch '$URL'" ) fi } -- To view, visit https://gerrit.wikimedia.org/r/100741 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0f5dde3b744c6c70b057e03f619117c0b6804e5b Gerrit-PatchSet: 1 Gerrit-Project: analytics/geowiki Gerrit-Branch: master Gerrit-Owner: QChris Gerrit-Reviewer: Milimetric ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Sanitize csv export data - change (wikimedia/wikimania-scholarships)
BryanDavis has uploaded a new change for review. https://gerrit.wikimedia.org/r/100745 Change subject: Sanitize csv export data .. Sanitize csv export data Sanitize csv export data by stripping leading '=' or '@' characters from strings and type casting numbers. Format as proper csv output using PHP's fputcsv() function which will quote and escape output as necessary. Bug: 58307 Change-Id: Ia19ad10bc172adce5f6e16177404d3ef4dc8c4fe --- M src/Wikimania/Scholarship/Controllers/Review/Phase1List.php M src/Wikimania/Scholarship/Controllers/Review/Phase2List.php 2 files changed, 29 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/wikimania-scholarships refs/changes/45/100745/1 diff --git a/src/Wikimania/Scholarship/Controllers/Review/Phase1List.php b/src/Wikimania/Scholarship/Controllers/Review/Phase1List.php index b3cf2f7..981c02a 100644 --- a/src/Wikimania/Scholarship/Controllers/Review/Phase1List.php +++ b/src/Wikimania/Scholarship/Controllers/Review/Phase1List.php @@ -63,11 +63,17 @@ 'attachment; filename="p1' . $this->type . '_' . $ts . '.csv"' ); echo "id,name,email,p1score\n"; + $fp = fopen( 'php://output', 'w' ); foreach ( $rows as $row ) { - echo "{$row['id']},{$row['fname']} {$row['lname']},{$row['email']},"; - echo round( $row['p1score'], 4 ); - echo "\n"; + $csv = array( + (int)$row['id'], + ltrim( "{$row['fname']} {$row['lname']}", '=@' ), + ltrim( $row['email'], '=@' ), + round( $row['p1score'], 4 ), + ); + fputcsv( $fp, $csv ); } + fclose( $fp ); } else { $this->view->set( 'title', diff --git a/src/Wikimania/Scholarship/Controllers/Review/Phase2List.php b/src/Wikimania/Scholarship/Controllers/Review/Phase2List.php index 56dae85..749114d 100644 --- a/src/Wikimania/Scholarship/Controllers/Review/Phase2List.php +++ b/src/Wikimania/Scholarship/Controllers/Review/Phase2List.php @@ -62,17 +62,28 @@ $this->response->headers->set( 'Content-Disposition', 'attachment; filename="' . "p2_{$partialName}_{$region}_{$ts}" . '.csv"' ); - echo "id,name,email,residence,sex,age,partial?,# p2 scorers,onwiki,offwiki,future,English Ability,p2 score\n"; + echo 'id,name,email,residence,sex,age,"partial?","# p2 scorers",onwiki,offwiki,future,"English Ability","p2 score"', "\n"; + + $fp = fopen( 'php://output', 'w' ); foreach ( $rows as $row ) { - echo "{$row['id']},{$row['fname']} {$row['lname']},{$row['email']},"; - echo "{$row['country_name']},{$row['sex']},{$row['age']},"; - echo "{$row['partial']},{$row['nscorers']},"; - echo round( $row['onwiki'], 3 ) . ','; - echo round( $row['offwiki'], 3 ) . ','; - echo round( $row['future'], 3 ) . ','; - echo round( $row['englishAbility'], 3 ) . ','; - echo round( $row['p2score'], 4 ) . "\n"; + $csv = array( + (int)$row['id'], + ltrim( "{$row['fname']} {$row['lname']}", '=@' ), + ltrim( $row['email'], '=@' ), + ltrim( $row['country_name'], '=@' ), + ltrim( $row['sex'], '=@' ), + (int)$row['age'], + (int)$row['partial'], + (int)$row['nscorers'], + round( $row['onwiki'], 3 ), + round( $row['offwiki'], 3 ), + round( $row['future'], 3 ), + round( $row['englishAbility'], 3 ), + round( $row['p1score'], 4 ), + ); + fputcsv( $fp, $csv ); } + fclose( $fp ); } else { $this->view->set( 'regionList', $regionList ); -- To view, visit https://gerrit.wikimedia.org/r/100745 To unsubscribe, visit https://gerrit.wikim
[MediaWiki-commits] [Gerrit] Validate application id - change (wikimedia/wikimania-scholarships)
BryanDavis has uploaded a new change for review. https://gerrit.wikimedia.org/r/100746 Change subject: Validate application id .. Validate application id Use Form class to validate that id is a non-negative integer if provided in the query string. Bug: 58306 Change-Id: I38224f124d45a82a18c2fb99b37db48126c027d2 --- M src/Wikimania/Scholarship/Controllers/Review/Application.php 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/wikimania-scholarships refs/changes/46/100746/1 diff --git a/src/Wikimania/Scholarship/Controllers/Review/Application.php b/src/Wikimania/Scholarship/Controllers/Review/Application.php index 7d9b300..2fda81d 100644 --- a/src/Wikimania/Scholarship/Controllers/Review/Application.php +++ b/src/Wikimania/Scholarship/Controllers/Review/Application.php @@ -33,16 +33,16 @@ class Application extends Controller { protected function handleGet() { + $this->form->expectInt( 'id', array( 'min_range' => 0 ) ); $this->form->expectInt( 'phase', array( 'min_range' => 0, 'max_range' => 2, 'default' => 2 ) ); $this->form->validate( $_GET ); + $id = $this->form->get( 'id' ); $phase = $this->form->get( 'phase' ); $userId = $this->authManager->getuserId(); - $id = $this->request->get( 'id' ); - - if ( $id === null || $id < 0 ) { + if ( $id === null ) { // Attempt to find first unreviewed application for the current user $unreviewed = $this->dao->myUnreviewed( $phase ); if ( $unreviewed ) { @@ -54,7 +54,7 @@ $this->view->set( 'id', $id ); $schol = false; - if ( $id !== '' && $id >= 0 ) { + if ( $id !== null && $id >= 0 ) { $schol = $this->dao->getScholarship( $id ); } $this->view->set( 'schol', $schol ); -- To view, visit https://gerrit.wikimedia.org/r/100746 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I38224f124d45a82a18c2fb99b37db48126c027d2 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/wikimania-scholarships Gerrit-Branch: master Gerrit-Owner: BryanDavis ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Reconfigure and turn on geowiki monitoring again - change (operations/puppet)
QChris has uploaded a new change for review. https://gerrit.wikimedia.org/r/100747 Change subject: Reconfigure and turn on geowiki monitoring again .. Reconfigure and turn on geowiki monitoring again Card: Analytics 1253 Change-Id: Ic57fb21d39bc315f3674b8a1f3eb1dfb0abed69e --- M manifests/misc/statistics.pp 1 file changed, 17 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/47/100747/1 diff --git a/manifests/misc/statistics.pp b/manifests/misc/statistics.pp index 6ef6814..9102f1b 100644 --- a/manifests/misc/statistics.pp +++ b/manifests/misc/statistics.pp @@ -1048,20 +1048,32 @@ # Disabled for now due to restructuring of geowiki. # class misc::statistics::geowiki::jobs::monitoring { -require misc::statistics::geowiki +require misc::statistics::geowiki, +passwords::geowiki $geowiki_user = $misc::statistics::geowiki::geowiki_user $geowiki_scripts_path = $misc::statistics::geowiki::geowiki_scripts_path -# cron job to fetch geowiki data via http://gp.wmflabs.org/ +$geowiki_http_user = $passwords::geowiki::user +$geowiki_http_pass = $passwords::geowiki::pass + +$geowiki_http_password_file = "${geowiki_base_path}/.http_password" + +file { $geowiki_http_password_file +owner => "$geowiki_user", +group => "$geowiki_user", +mode=> '0400', +content => "$geowiki_http_pass", +} + +# cron job to fetch geowiki data via http://gp.wmflabs.org/ (public data) +# and https://stats.wikimedia/geowiki-private (private data) # and checks that the files are up-to-date and within # meaningful ranges. cron { 'geowiki-monitoring': minute => 30, hour=> 21, user=> $geowiki_user, -command => "${geowiki_scripts_path}/scripts/check_web_page.sh", -# Disabled for now due to restructuring of geowiki -ensure => absent, +command => "${geowiki_scripts_path}/scripts/check_web_page.sh --private-part-user ${geowiki_http_user} --private-part-password-file ${geowiki_http_password_file}", } } -- To view, visit https://gerrit.wikimedia.org/r/100747 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic57fb21d39bc315f3674b8a1f3eb1dfb0abed69e Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: QChris ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Do not store IP address - change (wikimedia/wikimania-scholarships)
BryanDavis has uploaded a new change for review. https://gerrit.wikimedia.org/r/100748 Change subject: Do not store IP address .. Do not store IP address Stop storing the applicant's IP address with their application data. Bug: 58295 Change-Id: I06d905cb0bf4f5877b4637270810d8bb31db6f02 --- A data/db/migrations/20131210-01-drop-ipaddr.sql M data/db/schema.mysql M src/Wikimania/Scholarship/Forms/Apply.php 3 files changed, 2 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/wikimania-scholarships refs/changes/48/100748/1 diff --git a/data/db/migrations/20131210-01-drop-ipaddr.sql b/data/db/migrations/20131210-01-drop-ipaddr.sql new file mode 100644 index 000..a04eda2 --- /dev/null +++ b/data/db/migrations/20131210-01-drop-ipaddr.sql @@ -0,0 +1 @@ +ALTER TABLE scholarships DROP COLUMN ipaddr; diff --git a/data/db/schema.mysql b/data/db/schema.mysql index f1ccde0..3021c31 100644 --- a/data/db/schema.mysql +++ b/data/db/schema.mysql @@ -62,7 +62,6 @@ , confirmed TINYINT(1) NOT NULL DEFAULT '0' , confhashVARCHAR(8) DEFAULT NULL , entered_on TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP - , ipaddr VARBINARY(16) DEFAULT 2130706433 -- 127.0.0.1 , PRIMARY KEY (id) ) ENGINE=InnoDB DEFAULT CHARACTER SET=utf8; diff --git a/src/Wikimania/Scholarship/Forms/Apply.php b/src/Wikimania/Scholarship/Forms/Apply.php index 67ad90b..d7bbe4f 100644 --- a/src/Wikimania/Scholarship/Forms/Apply.php +++ b/src/Wikimania/Scholarship/Forms/Apply.php @@ -133,7 +133,7 @@ 'chapteragree', 'wmfAgreeName', - 'rank', 'ipaddr', + 'rank', ); $answers = array(); @@ -170,9 +170,7 @@ } $answers['rank'] = 1; - $answers['ipaddr'] = $_SERVER['REMOTE_ADDR']; - //FIXME: error handling $appId = $this->dao->saveApplication( $answers ); return $appId !== false; } -- To view, visit https://gerrit.wikimedia.org/r/100748 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I06d905cb0bf4f5877b4637270810d8bb31db6f02 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/wikimania-scholarships Gerrit-Branch: master Gerrit-Owner: BryanDavis ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] analytics1010 is in Row B, need a Gangalia aggregator there - change (operations/puppet)
Ottomata has uploaded a new change for review. https://gerrit.wikimedia.org/r/100749 Change subject: analytics1010 is in Row B, need a Gangalia aggregator there .. analytics1010 is in Row B, need a Gangalia aggregator there Change-Id: I7136cc71091d8993d58fada00be450a544c429d8 --- M manifests/site.pp 1 file changed, 4 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/49/100749/1 diff --git a/manifests/site.pp b/manifests/site.pp index a079cfe..b68f0df 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -152,7 +152,7 @@ # analytics1009 is the Hadoop standby NameNode node "analytics1009.eqiad.wmnet" { -# ganglia aggregator for the Analytics Cluster in Row A +# analytics1009 is analytics Ganglia aggregator for Row A $ganglia_aggregator = true # include analytics user accounts @@ -178,8 +178,9 @@ # hostname -> /datacenter/rack/row id is correct. This is # used for Hadoop network topology awareness. node /analytics10(1[1-9]|20).eqiad.wmnet/ { -# ganglia aggregator for Analytics clustr in Row C -if ($::hostname == 'analytics1014') { +# analytics1010 is analytics Ganglia aggregator for Row B +# analytics1014 is analytics Ganglia aggregator for Row C +if ($::hostname == 'analytics1010' or $::hostname == 'analytics1014') { $ganglia_aggregator = true } # include analytics user accounts -- To view, visit https://gerrit.wikimedia.org/r/100749 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7136cc71091d8993d58fada00be450a544c429d8 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ottomata ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] analytics1010 is in Row B, need a Gangalia aggregator there - change (operations/puppet)
Ottomata has submitted this change and it was merged. Change subject: analytics1010 is in Row B, need a Gangalia aggregator there .. analytics1010 is in Row B, need a Gangalia aggregator there Change-Id: I7136cc71091d8993d58fada00be450a544c429d8 --- M manifests/site.pp 1 file changed, 6 insertions(+), 3 deletions(-) Approvals: Ottomata: Verified; Looks good to me, approved diff --git a/manifests/site.pp b/manifests/site.pp index a079cfe..c9071ca 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -152,7 +152,7 @@ # analytics1009 is the Hadoop standby NameNode node "analytics1009.eqiad.wmnet" { -# ganglia aggregator for the Analytics Cluster in Row A +# analytics1009 is analytics Ganglia aggregator for Row A $ganglia_aggregator = true # include analytics user accounts @@ -165,6 +165,9 @@ # analytics1010 is the Hadoop master node # (primary NameNode, ResourceManager, etc.) node "analytics1010.eqiad.wmnet" { +# analytics1010 is analytics Ganglia aggregator for Row B +$ganglia_aggregator = true + # include analytics user accounts include role::analytics::users @@ -178,8 +181,8 @@ # hostname -> /datacenter/rack/row id is correct. This is # used for Hadoop network topology awareness. node /analytics10(1[1-9]|20).eqiad.wmnet/ { -# ganglia aggregator for Analytics clustr in Row C -if ($::hostname == 'analytics1014') { +# analytics1014 is analytics Ganglia aggregator for Row C +if $::hostname == 'analytics1014' { $ganglia_aggregator = true } # include analytics user accounts -- To view, visit https://gerrit.wikimedia.org/r/100749 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7136cc71091d8993d58fada00be450a544c429d8 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ottomata Gerrit-Reviewer: Ottomata Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Adjust thresholds to pass at least for local checkouts again - change (analytics/geowiki)
Ottomata has submitted this change and it was merged. Change subject: Adjust thresholds to pass at least for local checkouts again .. Adjust thresholds to pass at least for local checkouts again Since geowiki's data repositories have been split into a private, and a public part, they have been turned off. In the meantime * 'Unkown's went up a bit (We defer solving that to later), * Active Editors Total got restricted to showing only the 5+ cohort, * sgwiki saw more editors, and * some thresholds have been hit. We adjust for the above items, to make monitoring pass on local checkouts of the data repositories again. The split of the data repositories has not yet been reflected in the script, so monitoring does not yet pass without local checkouts. Card: Analytics 1253 Change-Id: Ib876ed6956be5aec1a61e78a39a9a2c8c877bf84 --- M scripts/check_web_page.sh 1 file changed, 24 insertions(+), 18 deletions(-) Approvals: Ottomata: Verified; Looks good to me, approved diff --git a/scripts/check_web_page.sh b/scripts/check_web_page.sh index a969b8b..8ba2b63 100755 --- a/scripts/check_web_page.sh +++ b/scripts/check_web_page.sh @@ -61,13 +61,6 @@ EXPECTED_LAST_DATE_OVERRIDE["grants_count_by_program"]="2013-06-01" EXPECTED_LAST_DATE_OVERRIDE["grants_spending_by_global_south"]="2013-06-01" EXPECTED_LAST_DATE_OVERRIDE["grants_spending_by_program"]="2013-06-01" -# IP of last editor for sg_all, and sg_top10 jumped from Netherlands -# to US on 2013-08-29. Hence, the column for United States is not long -# enough -EXPECTED_LAST_DATE_OVERRIDE["sg_all"]="2013-09-05" -# The last run of top10 computations for sg did not pull in 'United -# States'. So sg_top10 is lagging behind even further. -EXPECTED_LAST_DATE_OVERRIDE["sg_top10"]="2013-08-29" # The parameter passed to date's 'date' option to arrive at the # default last date to expect from files. @@ -788,9 +781,20 @@ check_csv_column "$CSV_STUB" "$CSV_FILE_ABS" "Global South (all)" 2 3 4 6 # In the following three lines, the missing n in 'Unkown' is on # purpose, as we currently see that in the csv. -check_csv_column "$CSV_STUB" "$CSV_FILE_ABS" "Unkown (100+)" 25 60 10 40 -check_csv_column "$CSV_STUB" "$CSV_FILE_ABS" "Unkown (5+)"10 20 200300 -check_csv_column "$CSV_STUB" "$CSV_FILE_ABS" "Unkown (all)"7 20 700 1000 +# +# Currently the lower bounds for stride 7 (40,300,1000) fail. +# Getting the 'Unkown's down will need classification from +# grantmaking, which will take some time. To not spend this time +# right now, but get monitoring up again soonish, we bump the +# limits for the unknowns. But we bump to values that will fire +# again soon. Once they fire again, we'll have to ask grantmaking +# to classify the unknown countries. +# Once grantmaking categorized the unknowns, and they go down +# again, also set back the lower bounds in +# check_csv_global_south_editor_fractions. +check_csv_column "$CSV_STUB" "$CSV_FILE_ABS" "Unkown (100+)" 25 60 10260 +check_csv_column "$CSV_STUB" "$CSV_FILE_ABS" "Unkown (5+)"10 20 200 2600 +check_csv_column "$CSV_STUB" "$CSV_FILE_ABS" "Unkown (all)" 10 20 700 1 } #--- @@ -815,7 +819,11 @@ # 5 fractional digits. sed -e 's/,0.\([0-9]\{5\}\)[0-9]*/,x\1/g' -e 's/,x0*/,/g' "$DOWNLOADED_FILE_ABS" >"$CSV_RESCALED_FILE_ABS" -check_csv_column "$CSV_STUB" "$CSV_RESCALED_FILE_ABS" "Global South Fraction (100+)" 2 5 15000 19000 +# The high number of unknowns for the Global North/South +# classification, brings this number down. As we bumped the limits +# of unknows in check_csv_global_south, we have to adapt here and +# drop the lower bounds below 15000. +check_csv_column "$CSV_STUB" "$CSV_RESCALED_FILE_ABS" "Global South Fraction (100+)" 2 5 14500 19000 check_csv_column "$CSV_STUB" "$CSV_RESCALED_FILE_ABS" "Global South Fraction (5+)" 1 2 17000 21000 check_csv_column "$CSV_STUB" "$CSV_RESCALED_FILE_ABS" "Global South Fraction (all)" 1 2 18000 22000 } @@ -836,9 +844,7 @@ check_csv "$CSV_STUB" local CSV_FILE_ABS="$DOWNLOADED_FILE_ABS" -check_csv_column "$CSV_STUB" "$CSV_FILE_ABS" "Active Editors Total (100+)" 1 28000 1 -check_csv_column "$CSV_STUB" "$CSV_FILE_ABS" "Active Editors Total (5+)" 1 1 7 8 -check_csv_column "$CSV_STUB" "$CSV_FILE_ABS" "Active Editors Total (all)" 1 1 23 255000 +check_csv_column "$CSV_STUB" "$CSV_FILE_ABS" "Active Editors Total"1 1 7 8 } #--- @@ -873,16 +879,16 @@ check_csv_column "$CSV_STUB" "$CSV_FILE_ABS" "Europe (5+)" 2 2 35000 4 check_csv_column "$CSV_STUB" "$CSV_FILE_ABS" "Europe (all)"
[MediaWiki-commits] [Gerrit] Fetch map-world_countries as json - change (analytics/geowiki)
Ottomata has submitted this change and it was merged. Change subject: Fetch map-world_countries as json .. Fetch map-world_countries as json Fetching as yaml does no longer work and returns the limn's boilerplate html. So we have to fetch as json, which limn does as well. Card: Analytics 1253 Change-Id: I43b788d78645d37a0b4d56bd9bd008cd1691b0a1 --- M scripts/check_web_page.sh 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Ottomata: Verified; Looks good to me, approved diff --git a/scripts/check_web_page.sh b/scripts/check_web_page.sh index 8ba2b63..a33a302 100755 --- a/scripts/check_web_page.sh +++ b/scripts/check_web_page.sh @@ -1401,7 +1401,7 @@ check_datasources() { check_datasource_json active_editors_total csv check_datasource_json global_southcsv -check_datasource_yaml map-world_countries json +check_datasource_json map-world_countries json check_datasource_json pt_top10csv check_datasource_json region csv -- To view, visit https://gerrit.wikimedia.org/r/100739 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I43b788d78645d37a0b4d56bd9bd008cd1691b0a1 Gerrit-PatchSet: 1 Gerrit-Project: analytics/geowiki Gerrit-Branch: master Gerrit-Owner: QChris Gerrit-Reviewer: Milimetric Gerrit-Reviewer: Ottomata ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Split files into public and private - change (analytics/geowiki)
Ottomata has submitted this change and it was merged. Change subject: Split files into public and private .. Split files into public and private Card: Analytics 1253 Change-Id: Ib5e50b8281992c19bfb95d77bbafc3629cf50924 --- M scripts/check_web_page.sh 1 file changed, 101 insertions(+), 18 deletions(-) Approvals: Ottomata: Verified; Looks good to me, approved diff --git a/scripts/check_web_page.sh b/scripts/check_web_page.sh index a33a302..a4bf819 100755 --- a/scripts/check_web_page.sh +++ b/scripts/check_web_page.sh @@ -1355,7 +1355,7 @@ } #--- -# Checks that geowiki's dashboards are ok. +# Checks that geowiki's public dashboards are ok. # # Input: # - @@ -1363,12 +1363,12 @@ # Output: # - # -check_dashboards() { +check_public_dashboards() { check_dashboard reportcard } #--- -# Checks that geowiki's graphs are ok. +# Checks that geowiki's public graphs are ok. # # Input: # - @@ -1376,11 +1376,10 @@ # Output: # - # -check_graphs() { +check_public_graphs() { check_graph active_editors_by_region check_graph active_editors_total check_graph global_north_south_active_editors -check_graph global_south_editor_fractions check_graph grants_count_by_global_south check_graph grants_count_by_program check_graph grants_spending_by_country @@ -1390,7 +1389,7 @@ } #--- -# Checks that geowiki's datasources are ok. +# Checks that geowiki's public datasources are ok. # # Input: # - @@ -1398,19 +1397,15 @@ # Output: # - # -check_datasources() { +check_public_datasources() { check_datasource_json active_editors_total csv -check_datasource_json global_southcsv check_datasource_json map-world_countries json -check_datasource_json pt_top10csv -check_datasource_json region csv # The following datasources somewhat belong to geowiki, but are # not part of the geowiki, so they have to be generated by # hand. We monitor them to avoid data loss, but geowiki does not # allow to keep the up-to-date. So we cannot check that they are # up-to-date. -check_datasource_json global_south_editor_fractions csv check_datasource_json grants_count_by_global_southcsv check_datasource_json grants_count_by_program csv check_datasource_json grants_spending_by_country json @@ -1419,7 +1414,7 @@ } #--- -# Checks that geowiki's datafiles are ok. +# Checks that geowiki's public datafiles are ok. # # Input: # - @@ -1427,8 +1422,66 @@ # Output: # - # -check_datafiles() { +check_public_datafiles() { check_csv_active_editors_total +} + +#--- +# Checks that geowiki's private dashboards are ok. +# +# Input: +# - +# +# Output: +# - +# +check_private_dashboards() { +# Empty placeholder. +# +# This function just exists, so the check_* functions structure is +# nice and symmetrical between public and private checks +: +} + +#--- +# Checks that geowiki's private graphs are ok. +# +# Input: +# - +# +# Output: +# - +# +check_private_graphs() { +check_graph global_south_editor_fractions +} + +#--- +# Checks that geowiki's private datasources are ok. +# +# Input: +# - +# +# Output: +# - +# +check_private_datasources() { +check_datasource_json global_southcsv +check_datasource_json pt_top10csv +check_datasource_json region csv +check_datasource_json global_south_editor_fractions csv +} + +#--- +# Checks that geowiki's private datafiles are ok. +# +# Input: +# - +# +# Output: +# - +# +check_private_datafiles() { check_csv_global_south check_csv_global_south_editor_fractions check_csv_region @@ -1437,7 +1490,39 @@ } #--- -# Checks that geowiki's files are ok. +# Checks that geowiki's public files are ok. +# +# Input: +# - +# +# Output: +# - +# +check_public_data() { +check_public_dashboards +check_public_graphs +check_public_datasources +check_public_datafiles +} + +#--- +# Checks that geowiki's private files are ok. +# +# Input: +# - +# +# Output: +# - +# +check_private_data() { +check_private_dashboards +check_private_graphs +check_private_datasources +check_private_datafiles +} + +#--- +# Checks that geowiki's public, and private files are ok. # # Input: # - @@ -1446,10 +1531,8 @@ # - # check() { -che
[MediaWiki-commits] [Gerrit] Give proper error message when fetching of URL failed - change (analytics/geowiki)
Ottomata has submitted this change and it was merged. Change subject: Give proper error message when fetching of URL failed .. Give proper error message when fetching of URL failed If fetching a file fails due to certificate errors, up to now the script just died, as we throw wget's output away. Now we report that fetching a file failed and show the URL. Card: Analytics 1253 Change-Id: I0f5dde3b744c6c70b057e03f619117c0b6804e5b --- M scripts/check_web_page.sh 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Ottomata: Verified; Looks good to me, approved diff --git a/scripts/check_web_page.sh b/scripts/check_web_page.sh index a4bf819..37d677e 100755 --- a/scripts/check_web_page.sh +++ b/scripts/check_web_page.sh @@ -334,7 +334,8 @@ cp "$LOCAL_COPY_FILE_RELI" "$DOWNLOADED_FILE_ABS" else log "$VERBOSITY_VERBOSE" "Downloading $URL ..." - wget -O "$DOWNLOADED_FILE_ABS" -o /dev/null "$URL" + wget -O "$DOWNLOADED_FILE_ABS" -o /dev/null "$URL" || \ +( rm -f "$DOWNLOADED_FILE_ABS" ; error "Failed to fetch '$URL'" ) fi } -- To view, visit https://gerrit.wikimedia.org/r/100741 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0f5dde3b744c6c70b057e03f619117c0b6804e5b Gerrit-PatchSet: 1 Gerrit-Project: analytics/geowiki Gerrit-Branch: master Gerrit-Owner: QChris Gerrit-Reviewer: Milimetric Gerrit-Reviewer: Ottomata ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Do not check certificates when fetching files - change (analytics/geowiki)
Ottomata has submitted this change and it was merged. Change subject: Do not check certificates when fetching files .. Do not check certificates when fetching files wget chokes on the certificate of stats.wikimedia.org. As we do not rely on authenticity of the server, we now turn off the certificate check. Card: Analytics 1253 Change-Id: I34b9b5a21962ffcd9fa3072facaeb0e2f136a1b9 --- M scripts/check_web_page.sh 1 file changed, 6 insertions(+), 2 deletions(-) Approvals: Ottomata: Verified; Looks good to me, approved diff --git a/scripts/check_web_page.sh b/scripts/check_web_page.sh index 37d677e..410184c 100755 --- a/scripts/check_web_page.sh +++ b/scripts/check_web_page.sh @@ -334,8 +334,12 @@ cp "$LOCAL_COPY_FILE_RELI" "$DOWNLOADED_FILE_ABS" else log "$VERBOSITY_VERBOSE" "Downloading $URL ..." - wget -O "$DOWNLOADED_FILE_ABS" -o /dev/null "$URL" || \ -( rm -f "$DOWNLOADED_FILE_ABS" ; error "Failed to fetch '$URL'" ) + wget \ + --no-check-certificate \ + -O "$DOWNLOADED_FILE_ABS" \ + -o /dev/null \ + "$URL" \ + || ( rm -f "$DOWNLOADED_FILE_ABS" ; error "Failed to fetch '$URL'" ) fi } -- To view, visit https://gerrit.wikimedia.org/r/100742 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I34b9b5a21962ffcd9fa3072facaeb0e2f136a1b9 Gerrit-PatchSet: 1 Gerrit-Project: analytics/geowiki Gerrit-Branch: master Gerrit-Owner: QChris Gerrit-Reviewer: Milimetric Gerrit-Reviewer: Ottomata ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use different URLs and authentication for private data - change (analytics/geowiki)
Ottomata has submitted this change and it was merged. Change subject: Use different URLs and authentication for private data .. Use different URLs and authentication for private data After this commit, monitoring of geowiki functional again. Change-Id: Ie3b1a4d210a37ab0929b808f27951be52ff8aa26 Card: Analytics 1253 --- M scripts/check_web_page.sh 1 file changed, 109 insertions(+), 8 deletions(-) Approvals: Ottomata: Verified; Looks good to me, approved diff --git a/scripts/check_web_page.sh b/scripts/check_web_page.sh index 410184c..de5efa6 100755 --- a/scripts/check_web_page.sh +++ b/scripts/check_web_page.sh @@ -34,11 +34,10 @@ VERBOSITY="$VERBOSITY_NORMAL" # Urls to download files from -URL_BASE="http://gp.wmflabs.org/"; -URL_BASE_DASHBOARD="$URL_BASE/dashboards" -URL_BASE_GRAPH="$URL_BASE/graphs" -URL_BASE_DATASOURCE="$URL_BASE/datasources" -URL_BASE_CSV="$URL_BASE/data/datafiles/gp" +PUBLIC_PART_URL_BASE="http://gp.wmflabs.org/"; +PRIVATE_PART_URL_BASE="https://stats.wikimedia.org/geowiki-private/"; +PRIVATE_PART_USER= +PRIVATE_PART_PASSWORD= # Wikis with many active editors. # For those wikis, we use allow less deviation from linear @@ -112,6 +111,12 @@ --date DATE -- per default expect that all datafiles come with data up to, and including DATE. DATE can be any value accepted by date's --date option. (Default: "yesterday") +--private-part-user USER + -- Authenticate as user USER when fetching files private +data files. +--private-part-password-file PWD_FILE + -- Authenticate using the first line of PWD_FILE as password +when fetching files private data files. --quiet -- suppress all messages but errors. --verbose-- More verbose output. @@ -153,6 +158,17 @@ DEFAULT_LAST_EXPECTED_DATE_PARAMETER="$1" shift ;; + "--private-part-user" ) + [[ $# -ge 1 ]] || error "$ARGUMENT requires a further parameter" + PRIVATE_PART_USER="$1" + shift + ;; + "--private-part-password-file" ) + [[ $# -ge 1 ]] || error "$ARGUMENT requires a further parameter" + [[ -f "$1" ]] || error "'$1' is not a file" + read -r PRIVATE_PART_PASSWORD <"$1" || error "Could not read line from '$1'" + shift + ;; "--quiet" ) VERBOSITY="$VERBOSITY_QUIET" ;; @@ -260,6 +276,73 @@ } #--- +# Sets URL_BASE_* varibales relative to a given URL. +# +# Input: +# $1 - The URL to use as base +# +# Output: +# URL_BASE - Base URL +# URL_BASE_CSV - URL to fetch CSVs from +# URL_BASE_DASHBOARD - URL to fetch dashboards from +# URL_BASE_DATASOURCE - URL to fetch datasources from +# URL_BASE_GRAPH - URL to fetch graphs from +# +set_URL_BASEs() { +URL_BASE="$1" +URL_BASE_DASHBOARD="$URL_BASE/dashboards" +URL_BASE_GRAPH="$URL_BASE/graphs" +URL_BASE_DATASOURCE="$URL_BASE/datasources" +URL_BASE_CSV="$URL_BASE/data/datafiles/gp" +} + +#--- +# Sets connection related variables to server of pubic geowiki files. +# +# Input: +# +# Output: +# HTTP_USER - User name used for authentication when fetching files +# HTTP_PASSWORD - Password used for authentication when fetching files +# URL_BASE - Base URL +# URL_BASE_CSV - URL to fetch CSVs from +# URL_BASE_DASHBOARD - URL to fetch dashboards from +# URL_BASE_DATASOURCE - URL to fetch datasources from +# URL_BASE_GRAPH - URL to fetch graphs from +# +use_public_server() { +set_URL_BASEs "$PUBLIC_PART_URL_BASE" + +# The public serve should not require authentication +HTTP_USER= +HTTP_PASSWORD= +} + +#--- +# Sets connection related variables to server of private geowiki files. +# +# Input: +# +# Output: +# HTTP_USER - User name used for authentication when fetching files +# HTTP_PASSWORD - Password used for authentication when fetching files +# URL_BASE - Base URL +# URL_BASE_CSV - URL to fetch CSVs from +# URL_BASE_DASHBOARD - URL to fetch dashboards from +# URL_BASE_DATASOURCE - URL to fetch datasources from +# URL_BASE_GRAPH - URL to fetch graphs from +# +use_private_server() { +set_URL_BASEs "$PRIVATE_PART_URL_BASE" + +# The CSV files are currently served directly at URL_BASE. +URL_BASE_CSV="$URL_BASE" + +HTTP_USER="$PRIVATE_PART_USER" +HTTP_PASSWORD="$PRIVATE_PART_PASSWORD" +} + +#--- # Downloads a URL to $DOWNLOADED_FILE_ABS without considering caches. # # Rather use the download_file function instead, as do_download_file @@ -334,10 +417,20 @@ cp "$LOCAL_COPY_FI
[MediaWiki-commits] [Gerrit] Allow to request checking limn scaffolding for private data - change (analytics/geowiki)
Ottomata has submitted this change and it was merged. Change subject: Allow to request checking limn scaffolding for private data .. Allow to request checking limn scaffolding for private data Change-Id: Idbe42120a100057d248de1378741e367bfbd5d82 Card: Analytics 1253 --- M scripts/check_web_page.sh 1 file changed, 31 insertions(+), 8 deletions(-) Approvals: Ottomata: Verified; Looks good to me, approved diff --git a/scripts/check_web_page.sh b/scripts/check_web_page.sh index de5efa6..04ca25c 100755 --- a/scripts/check_web_page.sh +++ b/scripts/check_web_page.sh @@ -79,6 +79,16 @@ # the web. This is mostly useful for debugging. LOCAL_DATA_CHECKOUTS_DIR_RELI=() +# Set CHECK_PRIVATE_PART_LIMN_FILES to "yes" to check the limn files +# of the private part eventhough they do not get served through the +# private data's web server. This check will only succeed when adding a +# checkout of the private data repository via “--add-checkout”. +# +# (You can use the --check-private-part-limn-files to set +# CHECK_PRIVATE_PART_LIMN_FILES=yes temporarily) +CHECK_PRIVATE_PART_LIMN_FILES=no +#CHECK_PRIVATE_PART_LIMN_FILES=yes + #--- # Prints the script's help screen # @@ -108,6 +118,11 @@ for debugging the script. But you'll have to cleanup the /tmp/geowiki_monitor... files by hand on your own. +--check-private-part-limn-files + -- Check limn files of private part, eventhough they do not get +served through the private data's web server. This check +will only succeed when adding a checkout of the private data +repository via “--add-checkout” (see above). --date DATE -- per default expect that all datafiles come with data up to, and including DATE. DATE can be any value accepted by date's --date option. (Default: "yesterday") @@ -153,6 +168,9 @@ "--cache" ) USE_CACHE="yes" ;; + "--check-private-part-limn-files" ) + CHECK_PRIVATE_PART_LIMN_FILES=yes + ;; "--date" ) [[ $# -ge 1 ]] || error "$ARGUMENT requires a further parameter" DEFAULT_LAST_EXPECTED_DATE_PARAMETER="$1" @@ -335,8 +353,11 @@ use_private_server() { set_URL_BASEs "$PRIVATE_PART_URL_BASE" -# The CSV files are currently served directly at URL_BASE. -URL_BASE_CSV="$URL_BASE" +if [ "$CHECK_PRIVATE_PART_LIMN_FILES" != "yes" ] +then + # The CSV files are currently served directly at URL_BASE. + URL_BASE_CSV="$URL_BASE" +fi HTTP_USER="$PRIVATE_PART_USER" HTTP_PASSWORD="$PRIVATE_PART_PASSWORD" @@ -1618,12 +1639,14 @@ # We currently only serve datafiles on the server for the private # data. Hence we cannot check the staffolding for the graphs of -# the datafiles. -# -#check_private_dashboards -#check_private_graphs -#check_private_datasources - +# the datafiles by default. But if the user requested it, we do +# check them. +if [ "$CHECK_PRIVATE_PART_LIMN_FILES" = "yes" ] +then + check_private_dashboards + check_private_graphs + check_private_datasources +fi check_private_datafiles } -- To view, visit https://gerrit.wikimedia.org/r/100744 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idbe42120a100057d248de1378741e367bfbd5d82 Gerrit-PatchSet: 1 Gerrit-Project: analytics/geowiki Gerrit-Branch: master Gerrit-Owner: QChris Gerrit-Reviewer: Milimetric Gerrit-Reviewer: Ottomata ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Validate redirect destination on login - change (wikimedia/wikimania-scholarships)
BryanDavis has uploaded a new change for review. https://gerrit.wikimedia.org/r/100750 Change subject: Validate redirect destination on login .. Validate redirect destination on login Validate that the session stored redirection location is a sane URL before redirecting to it. Also stop saving redirection URLs for non-GET initial requests as redirecting to a POST action doesn't make any sense. Bug: 58305 Change-Id: Ifa7924082e8392d1741bd5699017c1b5f7087074 --- M src/Wikimania/Scholarship/App.php M src/Wikimania/Scholarship/Controllers/Login.php 2 files changed, 18 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/wikimania-scholarships refs/changes/50/100750/1 diff --git a/src/Wikimania/Scholarship/App.php b/src/Wikimania/Scholarship/App.php index 1396c73..cb10c79 100644 --- a/src/Wikimania/Scholarship/App.php +++ b/src/Wikimania/Scholarship/App.php @@ -262,12 +262,14 @@ // middlewear route that requires authentication $requireUser = function () use ( $slim ) { if ( $slim->authManager->isAnonymous() ) { - $uri = $slim->request->getPath(); - $qs = \Wikimania\Scholarship\Form::qsMerge(); - if ( $qs ) { - $uri = "{$uri}?{$qs}"; + if ( $slim->request->isGet() ) { + $uri = $slim->request->getPath(); + $qs = \Wikimania\Scholarship\Form::qsMerge(); + if ( $qs ) { + $uri = "{$uri}?{$qs}"; + } + $_SESSION[AuthManager::NEXTPAGE_SESSION_KEY] = $uri; } - $_SESSION[AuthManager::NEXTPAGE_SESSION_KEY] = $uri; $slim->flash( 'error', 'Login required' ); $slim->flashKeep(); $slim->redirect( $slim->urlFor( 'login' ) ); @@ -382,12 +384,14 @@ // middlewear that requires admin rights $requireAdmin = function () use ( $slim ) { if ( !$slim->authManager->isAdmin() ) { - $uri = $slim->request->getPath(); - $qs = \Wikimania\Scholarship\Form::qsMerge(); - if ( $qs ) { - $uri = "{$uri}?{$qs}"; + if ( $slim->request->isGet() ) { + $uri = $slim->request->getPath(); + $qs = \Wikimania\Scholarship\Form::qsMerge(); + if ( $qs ) { + $uri = "{$uri}?{$qs}"; + } + $_SESSION[AuthManager::NEXTPAGE_SESSION_KEY] = $uri; } - $_SESSION[AuthManager::NEXTPAGE_SESSION_KEY] = $uri; $slim->flash( 'error', 'Admin rights required' ); $slim->flashKeep(); $slim->redirect( $slim->urlFor( 'login' ) ); diff --git a/src/Wikimania/Scholarship/Controllers/Login.php b/src/Wikimania/Scholarship/Controllers/Login.php index 8d3575f..84ac28b 100644 --- a/src/Wikimania/Scholarship/Controllers/Login.php +++ b/src/Wikimania/Scholarship/Controllers/Login.php @@ -38,10 +38,13 @@ } protected function handlePost() { + $next = false; if ( isset( $_SESSION[AuthManager::NEXTPAGE_SESSION_KEY] ) ) { $next = $_SESSION[AuthManager::NEXTPAGE_SESSION_KEY]; + $next = filter_var( $next, \FILTER_VALIDATE_URL, \FILTER_FLAG_PATH_REQUIRED ); + } - } else { + if ( $next === false ) { $next = $this->urlFor( 'review_home' ); } -- To view, visit https://gerrit.wikimedia.org/r/100750 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifa7924082e8392d1741bd5699017c1b5f7087074 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/wikimania-scholarships Gerrit-Branch: master Gerrit-Owner: BryanDavis Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add dir and lang attribs and autonym class - change (mediawiki...Translate)
jenkins-bot has submitted this change and it was merged. Change subject: Add dir and lang attribs and autonym class .. Add dir and lang attribs and autonym class Change-Id: I517bf163f639b480f97e61265de4ec2e23245582 --- M resources/js/ext.translate.special.translatesandbox.js 1 file changed, 24 insertions(+), 4 deletions(-) Approvals: Santhosh: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/js/ext.translate.special.translatesandbox.js b/resources/js/ext.translate.special.translatesandbox.js index 21426d0..4d2c2d2 100644 --- a/resources/js/ext.translate.special.translatesandbox.js +++ b/resources/js/ext.translate.special.translatesandbox.js @@ -191,6 +191,10 @@ $.each( request.languagepreferences.languages, function ( index, language ) { $detailsPane.find( '.languages' ).append( $( '' ) + .prop( { + dir: $.uls.data.getDir( language ), + lang: language + } ) .text( $.uls.data.getAutonym( language ) ) ); } ); @@ -230,6 +234,8 @@ ) ); $.each( translations.translationstash.translations, function( index, translation ) { + var translationLang = translation.title.split( /[\\/ ]+/ ).pop(); + $target.append( $( '' ) .addClass( 'row' ) @@ -242,9 +248,13 @@ .append( $( '' ).text( translation.translation ), $( '' ) - .addClass( 'info' ) + .addClass( 'info autonym' ) + .prop( { + dir: $.uls.data.getDir( translationLang ), + lang: translationLang + } ) .text( - $.uls.data.getAutonym( translation.title.split( /[\\/ ]+/ ).pop() ) + $.uls.data.getAutonym( translationLang ) ) ), $( '' ) @@ -498,7 +508,11 @@ onSelect: function ( language ) { $languageSelector .removeClass( 'unselected' ) - .addClass( 'selected' ) + .addClass( 'selected autonym' ) + .prop( { + dir: $.uls.data.getDir( language ), + lang: language + } ) .text( $.uls.data.getAutonym( language ) ); filterRequestsByLanguage( language ); @@ -508,8 +522,14 @@ } ); $clearLanguageSelector.on( 'click', function() { + var userLang = mw.config.get( 'wgUserLanguage' ); + $languageSelector - .removeClass( 'selected' ) + .removeClass( 'selected autonym' ) + .prop( { + dir: $.uls.data.getDir( userLang ), + lang: userLang + } ) .addClass( 'unselected' ) .text( mw.msg( 'tsb-all-languages-button-label' ) ); -- To view, visit https://gerrit.wikimedia.org/r/100716 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-
[MediaWiki-commits] [Gerrit] Reconfigure and turn on geowiki monitoring again - change (operations/puppet)
Ottomata has submitted this change and it was merged. Change subject: Reconfigure and turn on geowiki monitoring again .. Reconfigure and turn on geowiki monitoring again Card: Analytics 1253 Change-Id: Ic57fb21d39bc315f3674b8a1f3eb1dfb0abed69e --- M manifests/misc/statistics.pp 1 file changed, 18 insertions(+), 5 deletions(-) Approvals: Ottomata: Verified; Looks good to me, approved diff --git a/manifests/misc/statistics.pp b/manifests/misc/statistics.pp index 6ef6814..22bf02b 100644 --- a/manifests/misc/statistics.pp +++ b/manifests/misc/statistics.pp @@ -1048,20 +1048,33 @@ # Disabled for now due to restructuring of geowiki. # class misc::statistics::geowiki::jobs::monitoring { -require misc::statistics::geowiki +require misc::statistics::geowiki, +passwords::geowiki $geowiki_user = $misc::statistics::geowiki::geowiki_user +$geowiki_base_path = $misc::statistics::geowiki::geowiki_base_path $geowiki_scripts_path = $misc::statistics::geowiki::geowiki_scripts_path -# cron job to fetch geowiki data via http://gp.wmflabs.org/ +$geowiki_http_user = $passwords::geowiki::user +$geowiki_http_pass = $passwords::geowiki::pass + +$geowiki_http_password_file = "${geowiki_base_path}/.http_password" + +file { $geowiki_http_password_file: +owner => "$geowiki_user", +group => "$geowiki_user", +mode=> '0400', +content => "$geowiki_http_pass", +} + +# cron job to fetch geowiki data via http://gp.wmflabs.org/ (public data) +# and https://stats.wikimedia/geowiki-private (private data) # and checks that the files are up-to-date and within # meaningful ranges. cron { 'geowiki-monitoring': minute => 30, hour=> 21, user=> $geowiki_user, -command => "${geowiki_scripts_path}/scripts/check_web_page.sh", -# Disabled for now due to restructuring of geowiki -ensure => absent, +command => "${geowiki_scripts_path}/scripts/check_web_page.sh --private-part-user ${geowiki_http_user} --private-part-password-file ${geowiki_http_password_file}", } } -- To view, visit https://gerrit.wikimedia.org/r/100747 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic57fb21d39bc315f3674b8a1f3eb1dfb0abed69e Gerrit-PatchSet: 4 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: QChris Gerrit-Reviewer: Ottomata Gerrit-Reviewer: QChris Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Do not require line ending in http password file - change (analytics/geowiki)
Hello Ottomata, I'd like you to do a code review. Please visit https://gerrit.wikimedia.org/r/100751 to review the following change. Change subject: Do not require line ending in http password file .. Do not require line ending in http password file Change-Id: I7ff54ab405d0d3763e9df2237f2295c25bb160e6 Card: Analytics 1253 --- M scripts/check_web_page.sh 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/geowiki refs/changes/51/100751/1 diff --git a/scripts/check_web_page.sh b/scripts/check_web_page.sh index 04ca25c..1440ec7 100755 --- a/scripts/check_web_page.sh +++ b/scripts/check_web_page.sh @@ -184,7 +184,7 @@ "--private-part-password-file" ) [[ $# -ge 1 ]] || error "$ARGUMENT requires a further parameter" [[ -f "$1" ]] || error "'$1' is not a file" - read -r PRIVATE_PART_PASSWORD <"$1" || error "Could not read line from '$1'" + PRIVATE_PART_PASSWORD=$(head -n 1 "$1") shift ;; "--quiet" ) -- To view, visit https://gerrit.wikimedia.org/r/100751 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7ff54ab405d0d3763e9df2237f2295c25bb160e6 Gerrit-PatchSet: 1 Gerrit-Project: analytics/geowiki Gerrit-Branch: master Gerrit-Owner: QChris Gerrit-Reviewer: Ottomata ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Do not require line ending in http password file - change (analytics/geowiki)
Ottomata has submitted this change and it was merged. Change subject: Do not require line ending in http password file .. Do not require line ending in http password file Change-Id: I7ff54ab405d0d3763e9df2237f2295c25bb160e6 Card: Analytics 1253 --- M scripts/check_web_page.sh 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Ottomata: Verified; Looks good to me, approved diff --git a/scripts/check_web_page.sh b/scripts/check_web_page.sh index 04ca25c..1440ec7 100755 --- a/scripts/check_web_page.sh +++ b/scripts/check_web_page.sh @@ -184,7 +184,7 @@ "--private-part-password-file" ) [[ $# -ge 1 ]] || error "$ARGUMENT requires a further parameter" [[ -f "$1" ]] || error "'$1' is not a file" - read -r PRIVATE_PART_PASSWORD <"$1" || error "Could not read line from '$1'" + PRIVATE_PART_PASSWORD=$(head -n 1 "$1") shift ;; "--quiet" ) -- To view, visit https://gerrit.wikimedia.org/r/100751 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7ff54ab405d0d3763e9df2237f2295c25bb160e6 Gerrit-PatchSet: 1 Gerrit-Project: analytics/geowiki Gerrit-Branch: master Gerrit-Owner: QChris Gerrit-Reviewer: Ottomata ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Avoid "Error: 1193 Unknown system variable table_type" error - change (mediawiki...WikimediaMaintenance)
Aaron Schulz has submitted this change and it was merged. Change subject: Avoid "Error: 1193 Unknown system variable table_type" error .. Avoid "Error: 1193 Unknown system variable table_type" error Change-Id: I0a273d64c67d93c02b7b0bf715b55b6c987aeaa7 --- M addWiki.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Aaron Schulz: Verified; Looks good to me, approved diff --git a/addWiki.php b/addWiki.php index 104bf67..dca94bd 100644 --- a/addWiki.php +++ b/addWiki.php @@ -76,7 +76,7 @@ $this->output( "Creating database $dbName for $lang.$site ($name)\n" ); # Set up the database - $dbw->query( "SET table_type=Innodb" ); + $dbw->query( "SET storage_engine=InnoDB" ); $dbw->query( "CREATE DATABASE $dbName" ); $dbw->selectDB( $dbName ); -- To view, visit https://gerrit.wikimedia.org/r/100715 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0a273d64c67d93c02b7b0bf715b55b6c987aeaa7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikimediaMaintenance Gerrit-Branch: master Gerrit-Owner: Aaron Schulz Gerrit-Reviewer: Aaron Schulz Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] include the bugzilla config in puppet - change (operations/puppet)
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/100752 Change subject: include the bugzilla config in puppet .. include the bugzilla config in puppet Change-Id: I36e6363c3518c22ea8ff29d80b5a589c1392324b --- M manifests/role/bugzilla.pp M modules/bugzilla/manifests/init.pp A modules/bugzilla/templates/localconfig.erb 3 files changed, 134 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/52/100752/1 diff --git a/manifests/role/bugzilla.pp b/manifests/role/bugzilla.pp index f08055a..3f4f896 100644 --- a/manifests/role/bugzilla.pp +++ b/manifests/role/bugzilla.pp @@ -16,6 +16,11 @@ system::role { 'role::bugzilla': description => '(new/upcoming) Bugzilla server' } -include ::bugzilla +class { 'bugzilla': +db_host => 'db1001.eqiad.wmnet', +db_name => 'bugzilla4', +db_user => 'bugs', +} + } diff --git a/modules/bugzilla/manifests/init.pp b/modules/bugzilla/manifests/init.pp index 23f82da..38f53fb 100644 --- a/modules/bugzilla/manifests/init.pp +++ b/modules/bugzilla/manifests/init.pp @@ -15,6 +15,7 @@ # - the apache site config # - the SSL certs # - the /srv/org/wikimedia dir +# - the bugzilla localconfig file # - cronjobs and scripts: # - auditlog mail for bz admins, bash # - mail report for community metrics, bash @@ -25,8 +26,9 @@ # to the bugzilla path and clone our modifications # from the wikimedia/bugzilla/modifcations repo # -class bugzilla { +class bugzilla ( $db_host, $db_name, $db_user ) { +# document root file { [ '/srv/org','/srv/org/wikimedia','/srv/org/wikimedia/bugzilla']: ensure => directory, owner => 'root', @@ -34,6 +36,15 @@ mode => '0755'; } +# bugzilla localconfig +file { '/srv/org/wikimedia/bugzilla/localconfig': +ensure => present, +owner => 'root', +group => 'www-data', +mode=> '0440', +content => template('bugzilla/localconfig.erb'), +} + # basic apache site and certs class {'bugzilla::apache': svc_name=> 'bugzilla.wikimedia.org', diff --git a/modules/bugzilla/templates/localconfig.erb b/modules/bugzilla/templates/localconfig.erb new file mode 100644 index 000..7c6e866 --- /dev/null +++ b/modules/bugzilla/templates/localconfig.erb @@ -0,0 +1,116 @@ +# If you are using Apache as your web server, Bugzilla can create .htaccess +# files for you, which will keep this file (localconfig) and other +# confidential files from being read over the web. +# +# If this is set to 1, checksetup.pl will create .htaccess files if +# they don't exist. +# +# If this is set to 0, checksetup.pl will not create .htaccess files. +$create_htaccess = 1; + +# The name of the group that your web server runs as. On Red Hat +# distributions, this is usually "apache". On Debian/Ubuntu, it is +# usually "www-data". +# +# If you have use_suexec turned on below, then this is instead the name +# of the group that your web server switches to to run cgi files. +# +# If this is a Windows machine, ignore this setting, as it does nothing. +# +# If you do not have access to the group your scripts will run under, +# set this to "". If you do set this to "", then your Bugzilla installation +# will be _VERY_ insecure, because some files will be world readable/writable, +# and so anyone who can get local access to your machine can do whatever they +# want. You should only have this set to "" if this is a testing installation +# and you cannot set this up any other way. YOU HAVE BEEN WARNED! +# +# If you set this to anything other than "", you will need to run checksetup.pl +# as root or as a user who is a member of the specified group. +$webservergroup = 'www-data'; + +# Set this to 1 if Bugzilla runs in an Apache SuexecUserGroup environment. +# +# If your web server runs control panel software (cPanel, Plesk or similar), +# or if your Bugzilla is to run in a shared hosting environment, then you are +# almost certainly in an Apache SuexecUserGroup environment. +# +# If this is a Windows box, ignore this setting, as it does nothing. +# +# If set to 0, checksetup.pl will set file permissions appropriately for +# a normal webserver environment. +# +# If set to 1, checksetup.pl will set file permissions so that Bugzilla +# works in a SuexecUserGroup environment. +$use_suexec = 0; + +# What SQL database to use. Default is mysql. List of supported databases +# can be obtained by listing Bugzilla/DB directory - every module corresponds +# to one supported database and the name of the module (before ".pm") +# corresponds to a valid value for this variable. +$db_driver = 'mysql'; + +# The DNS name or IP address of the host that the database server runs on. +$db_host = '<%= @db_host %>'; + +# The name of the database. For Oracle, this is the database's SID. For +# SQLite, t
[MediaWiki-commits] [Gerrit] Don't handle new pages for images or categories - change (mediawiki...MobileFrontend)
AndyRussG has uploaded a new change for review. https://gerrit.wikimedia.org/r/100753 Change subject: Don't handle new pages for images or categories .. Don't handle new pages for images or categories SkinMobileBeta::handleNewPages() emits a message and contains checks that are appropriate for new articles but not files or categories. Bug: 57155 Change-Id: Ie71d5298b84a9970c705454fcdd058a204a4cd24 --- M includes/skins/SkinMobileBeta.php 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/53/100753/1 diff --git a/includes/skins/SkinMobileBeta.php b/includes/skins/SkinMobileBeta.php index 5760180..612e66e 100644 --- a/includes/skins/SkinMobileBeta.php +++ b/includes/skins/SkinMobileBeta.php @@ -97,7 +97,8 @@ protected function handleNewPages( OutputPage $out ) { # Show error message $title = $this->getTitle(); - if ( !$title->exists() + if ( get_class( $this->getWikipage() ) === 'WikiPage' // Exclude files & categories + && !$title->exists() && !$title->isSpecialPage() && $title->userCan( 'create', $this->getUser() ) ) { -- To view, visit https://gerrit.wikimedia.org/r/100753 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie71d5298b84a9970c705454fcdd058a204a4cd24 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: AndyRussG ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] phpcs fixes. - change (mediawiki...LocalisationUpdate)
KartikMistry has uploaded a new change for review. https://gerrit.wikimedia.org/r/100754 Change subject: phpcs fixes. .. phpcs fixes. Simple php codesniffer fixes. Change-Id: I1dffbc6e5271bc3f7d698a7769ea46dc067a79ae --- M LocalisationUpdate.class.php 1 file changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/LocalisationUpdate refs/changes/54/100754/1 diff --git a/LocalisationUpdate.class.php b/LocalisationUpdate.class.php index 66b6323..1f94a89 100644 --- a/LocalisationUpdate.class.php +++ b/LocalisationUpdate.class.php @@ -369,7 +369,6 @@ ); } - if ( $saveResults ) { // If anything has changed from the saved version, save the new version if ( $new_messages != $cur_messages ) { @@ -514,7 +513,7 @@ if ( isset( $_SERVER ) && array_key_exists( 'REQUEST_METHOD', $_SERVER ) ) { wfDebug( $log . "\n" ); } else { - print( $log . "\n" ); + print ( $log . "\n" ); } } -- To view, visit https://gerrit.wikimedia.org/r/100754 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1dffbc6e5271bc3f7d698a7769ea46dc067a79ae Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/LocalisationUpdate Gerrit-Branch: master Gerrit-Owner: KartikMistry ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Don't echo Wikipedia Zero banners when HTTPS isn't zero-rated. - change (mediawiki...ZeroRatedMobileAccess)
jenkins-bot has submitted this change and it was merged. Change subject: Don't echo Wikipedia Zero banners when HTTPS isn't zero-rated. .. Don't echo Wikipedia Zero banners when HTTPS isn't zero-rated. * Currently, the X-CS header is not set on HTTPS requests. * This is in preparation for a future state where it is set. Change-Id: Ie34cc211b297f502c693a7c406ce9b6aaf3825eb --- M includes/PageRenderingHooks.php 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Yurik: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/PageRenderingHooks.php b/includes/PageRenderingHooks.php index 7bfbc66..649fdce 100644 --- a/includes/PageRenderingHooks.php +++ b/includes/PageRenderingHooks.php @@ -645,6 +645,9 @@ if ( 0 !== count( $freeLangs ) && !in_array( $lang, $freeLangs ) ) { return false; } + if ( !$config['enableHttps'] && $this->request->getProtocol() === 'https' ) { + return false; + } return true; } -- To view, visit https://gerrit.wikimedia.org/r/100729 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie34cc211b297f502c693a7c406ce9b6aaf3825eb Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/ZeroRatedMobileAccess Gerrit-Branch: master Gerrit-Owner: Dr0ptp4kt Gerrit-Reviewer: Yurik Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Include redis on logstash servers - change (operations/puppet)
Ori.livneh has submitted this change and it was merged. Change subject: Include redis on logstash servers .. Include redis on logstash servers Change-Id: I45266c9f96c6a3131a03a3249e7f9eda6c9767c7 --- M manifests/role/logstash.pp 1 file changed, 12 insertions(+), 1 deletion(-) Approvals: Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/logstash.pp b/manifests/role/logstash.pp index 691ee17..523b87f 100644 --- a/manifests/role/logstash.pp +++ b/manifests/role/logstash.pp @@ -2,7 +2,7 @@ # == Class: role::logstash # -# Provisions LogStash and ElasticSearch. +# Provisions LogStash, Redis, and ElasticSearch. # class role::logstash { include ::elasticsearch::ganglia @@ -18,4 +18,15 @@ heap_memory => '5G', plugins_dir => '/srv/deployment/elasticsearch/plugins', } + +include ::passwords::logstash + +class { '::redis': +maxmemory => '1Gb', +persist => undef, +redis_replication => undef, +password => $passwords::logstash::redis, +} + +include ::redis::ganglia } -- To view, visit https://gerrit.wikimedia.org/r/100511 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I45266c9f96c6a3131a03a3249e7f9eda6c9767c7 Gerrit-PatchSet: 4 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Aaron Schulz Gerrit-Reviewer: Ori.livneh Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Duplicate client-side latency measurements from eswiki to sp... - change (operations/puppet)
Ori.livneh has submitted this change and it was merged. Change subject: Duplicate client-side latency measurements from eswiki to special bin .. Duplicate client-side latency measurements from eswiki to special bin This patch will create a discrete StatsD stat group for Navigation Timing measurements from eswiki. I plan to temporarily disable module storage on eswiki to assess its impact, so having separate graphs will be convenient. Change-Id: I344f180c29a73cd05d33a0f5be03e9aa0fc3c0dd --- M files/graphite/modules/navtiming.py 1 file changed, 6 insertions(+), 3 deletions(-) Approvals: Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/files/graphite/modules/navtiming.py b/files/graphite/modules/navtiming.py index 255519e..9cc15b5 100644 --- a/files/graphite/modules/navtiming.py +++ b/files/graphite/modules/navtiming.py @@ -58,14 +58,14 @@ if 'loadEventEnd' in event and 'domInteractive' in event: event['pageSpeed'] = ( event['loadEventEnd'] - event['domInteractive']) -if 'loadEventEnd' in event and 'navigationStart' in event: -event['totalPageLoadTime'] = ( -event['loadEventEnd'] - event['navigationStart']) +if 'loadEventEnd' in event: +event['totalPageLoadTime'] = event['loadEventEnd'] site = 'mobile' if 'mobileMode' in event else 'desktop' auth = 'anonymous' if event.get('isAnon') else 'authenticated' bits_cache = meta.get('recvFrom', '').split('.')[0] +wiki = meta.get('wiki', '') for metric in metrics: value = event.get(metric, 0) @@ -76,3 +76,6 @@ sock.sendto(stat.encode('utf-8'), addr) stat = 'browser.%s.%s:%s|ms' % (metric, bits_cache, value) sock.sendto(stat.encode('utf-8'), addr) +if wiki == 'eswiki': +stat = 'browser.%s.%s.%s:%s|ms' % (wiki, metric, site, value) +sock.sendto(stat.encode('utf-8'), addr) -- To view, visit https://gerrit.wikimedia.org/r/100736 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I344f180c29a73cd05d33a0f5be03e9aa0fc3c0dd Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ori.livneh Gerrit-Reviewer: Ori.livneh Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Changed ZeroRatedMobileAccess to Zero - change (mediawiki...WikimediaMessages)
jenkins-bot has submitted this change and it was merged. Change subject: Changed ZeroRatedMobileAccess to Zero .. Changed ZeroRatedMobileAccess to Zero Change-Id: Iac6522a193364fbf6d460cc0de1e57842df856d5 --- M WikimediaMessages.i18n.php 1 file changed, 21 insertions(+), 21 deletions(-) Approvals: Yurik: Looks good to me, approved jenkins-bot: Verified diff --git a/WikimediaMessages.i18n.php b/WikimediaMessages.i18n.php index 4a347ca..47e825d 100644 --- a/WikimediaMessages.i18n.php +++ b/WikimediaMessages.i18n.php @@ -215,9 +215,9 @@ 'group-translationadmin-member' => '{{GENDER:$1|translation administrator}}', 'grouppage-translationadmin'=> '{{ns:project}}:Translation administrators', # only translate this message to other languages if you have to change it - 'group-zeroadmin'=> 'ZeroRatedMobileAccess administrators', - 'group-zeroadmin-member' => '{{GENDER:$1|ZeroRatedMobileAccess administrator}}', - 'grouppage-zeroadmin'=> '{{ns:project}}:ZeroRatedMobileAccess administrators', # only translate this message to other languages if you have to change it + 'group-zeroadmin'=> 'Zero administrators', + 'group-zeroadmin-member' => '{{GENDER:$1|Zero administrator}}', + 'grouppage-zeroadmin'=> '{{ns:project}}:Zero administrators', # only translate this message to other languages if you have to change it 'right-zero-edit'=> 'Edit pages in the Zero namespace', # Bug 45270 due to https://gerrit.wikimedia.org/r/#/c/50196/ @@ -1564,9 +1564,9 @@ 'group-translationadmin' => 'Alministradores de traducción', 'group-translationadmin-member' => '{{GENDER:$1|alministrador|alministradora}} de traducción', 'grouppage-translationadmin' => '{{ns:project}}:Alministradores de traducción', - 'group-zeroadmin' => 'Alministradores de ZeroRatedMobileAccess', - 'group-zeroadmin-member' => '{{GENDER:$1|Alministrador de ZeroRatedMobileAccess|Alministradora de ZeroRatedMobileAccess}}', - 'grouppage-zeroadmin' => '{{ns:project}}:Alministradores de ZeroRatedMobileAccess', + 'group-zeroadmin' => 'Alministradores de Zero', + 'group-zeroadmin-member' => '{{GENDER:$1|Alministrador de Zero|Alministradora de Zero}}', + 'grouppage-zeroadmin' => '{{ns:project}}:Alministradores de Zero', 'right-zero-edit' => 'Editar páxines nel espaciu de nomes Cero', # Fuzzy 'group-centralnoticeadmin' => "Alministradores d'avisu central", 'group-centralnoticeadmin-member' => "{{GENDER:$1|Alministrador d'avisu central|Alministradora d'avisu central}}", @@ -5492,9 +5492,9 @@ 'group-translationadmin' => 'Administrateurs de traduction', 'group-translationadmin-member' => 'administrat{{GENDER:$1|eur|rice}} de traduction', 'grouppage-translationadmin' => '{{ns:project}}:Administrateurs des traductions', - 'group-zeroadmin' => 'Administrateurs de ZeroRatedMobileAccess', - 'group-zeroadmin-member' => '{{GENDER:$1|administrateur|administratrice}} de ZeroRatedMobileAccess', - 'grouppage-zeroadmin' => '{{ns:project}}:ZeroRatedMobileAccess administrators', + 'group-zeroadmin' => 'Administrateurs de Zero', + 'group-zeroadmin-member' => '{{GENDER:$1|administrateur|administratrice}} de Zero', + 'grouppage-zeroadmin' => '{{ns:project}}:Zero administrators', 'right-zero-edit' => 'Modifier des pages dans l’espace de noms Zéro', 'group-centralnoticeadmin' => 'Administrateurs des notifications centralisées', 'group-centralnoticeadmin-member' => '{{GENDER:$1|Administrateur|Administratrice}} de notification centralisée', @@ -6805,9 +6805,9 @@ 'group-translationadmin' => 'מנהלי תרגום', 'group-translationadmin-member' => '{{GENDER:$1|מנהל|מנהלת}} תרגום', 'grouppage-translationadmin' => '{{ns:project}}:מנהלי תרגום', - 'group-zeroadmin' => 'מנהלי ZeroRatedMobileAccess', - 'group-zeroadmin-member' => '{{GENDER:$1|מנהל|מנהלת}} ZeroRatedMobileAccess', - 'grouppage-zeroadmin' => '{{ns:project}}:מנהלי ZeroRatedMobileAccess', + 'group-zeroadmin' => 'מנהלי Zero', + 'group-zeroadmin-member' => '{{GENDER:$1|מנהל|מנהלת}} Zero', + 'grouppage-zeroadmin' => '{{ns:project}}:מנהלי Zero', 'right-zero-edit' => 'עריכת דפים במרחב Zero', 'group-centralnoticeadmin' => 'מנהלי הודעה מרכזית', 'group-centralnoticeadmin-member' => '{{GENDER:$1|מנהל|מנהלת}} הודעה מרכזית', @@ -8246,9 +8246,9 @@ 'group-translationadmin' => 'Amministratori delle traduzioni', 'group-translationadmin-member' => '{{GENDER:$1|amministratore|amministratrice|amministratore/trice}} delle traduzioni', 'grouppage-translationadmin' => '{{ns:project}}:Amministratori delle traduzioni', - 'group-zeroadmin' => 'Amministratori ZeroRatedMobileAccess', - 'group-z
[MediaWiki-commits] [Gerrit] logstash: specify /var/run/redis as redis $dir - change (operations/puppet)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/100755 Change subject: logstash: specify /var/run/redis as redis $dir .. logstash: specify /var/run/redis as redis $dir The redis module defaults to /a/redis Change-Id: Ib5d3407d85c0ba036d19d3fba04ca51b67d5b955 --- M manifests/role/logstash.pp 1 file changed, 3 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/55/100755/1 diff --git a/manifests/role/logstash.pp b/manifests/role/logstash.pp index 523b87f..5d4c6a4 100644 --- a/manifests/role/logstash.pp +++ b/manifests/role/logstash.pp @@ -7,6 +7,8 @@ class role::logstash { include ::elasticsearch::ganglia include ::elasticsearch::nagios::check +include ::passwords::logstash +include ::redis::ganglia deployment::target { 'elasticsearchplugins': } @@ -19,14 +21,11 @@ plugins_dir => '/srv/deployment/elasticsearch/plugins', } -include ::passwords::logstash - class { '::redis': maxmemory => '1Gb', +dir => '/var/run/redis', persist => undef, redis_replication => undef, password => $passwords::logstash::redis, } - -include ::redis::ganglia } -- To view, visit https://gerrit.wikimedia.org/r/100755 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib5d3407d85c0ba036d19d3fba04ca51b67d5b955 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ori.livneh ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] logstash: specify /var/run/redis as redis $dir - change (operations/puppet)
Ori.livneh has submitted this change and it was merged. Change subject: logstash: specify /var/run/redis as redis $dir .. logstash: specify /var/run/redis as redis $dir The redis module defaults to /a/redis Change-Id: Ib5d3407d85c0ba036d19d3fba04ca51b67d5b955 --- M manifests/role/logstash.pp 1 file changed, 3 insertions(+), 4 deletions(-) Approvals: Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/logstash.pp b/manifests/role/logstash.pp index 523b87f..5d4c6a4 100644 --- a/manifests/role/logstash.pp +++ b/manifests/role/logstash.pp @@ -7,6 +7,8 @@ class role::logstash { include ::elasticsearch::ganglia include ::elasticsearch::nagios::check +include ::passwords::logstash +include ::redis::ganglia deployment::target { 'elasticsearchplugins': } @@ -19,14 +21,11 @@ plugins_dir => '/srv/deployment/elasticsearch/plugins', } -include ::passwords::logstash - class { '::redis': maxmemory => '1Gb', +dir => '/var/run/redis', persist => undef, redis_replication => undef, password => $passwords::logstash::redis, } - -include ::redis::ganglia } -- To view, visit https://gerrit.wikimedia.org/r/100755 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib5d3407d85c0ba036d19d3fba04ca51b67d5b955 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ori.livneh Gerrit-Reviewer: Ori.livneh Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] logstash: re-order includes to avoid duplicate def'n - change (operations/puppet)
Ori.livneh has submitted this change and it was merged. Change subject: logstash: re-order includes to avoid duplicate def'n .. logstash: re-order includes to avoid duplicate def'n Change-Id: I0d4cb433014df728e20256a58689ee29cbb16977 --- M manifests/role/logstash.pp 1 file changed, 4 insertions(+), 2 deletions(-) Approvals: Ori.livneh: Verified; Looks good to me, approved diff --git a/manifests/role/logstash.pp b/manifests/role/logstash.pp index 5d4c6a4..df188e7 100644 --- a/manifests/role/logstash.pp +++ b/manifests/role/logstash.pp @@ -7,8 +7,6 @@ class role::logstash { include ::elasticsearch::ganglia include ::elasticsearch::nagios::check -include ::passwords::logstash -include ::redis::ganglia deployment::target { 'elasticsearchplugins': } @@ -21,6 +19,8 @@ plugins_dir => '/srv/deployment/elasticsearch/plugins', } +include ::passwords::logstash + class { '::redis': maxmemory => '1Gb', dir => '/var/run/redis', @@ -28,4 +28,6 @@ redis_replication => undef, password => $passwords::logstash::redis, } + +include ::redis::ganglia } -- To view, visit https://gerrit.wikimedia.org/r/100756 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0d4cb433014df728e20256a58689ee29cbb16977 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ori.livneh Gerrit-Reviewer: Ori.livneh ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] logstash: re-order includes to avoid duplicate def'n - change (operations/puppet)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/100756 Change subject: logstash: re-order includes to avoid duplicate def'n .. logstash: re-order includes to avoid duplicate def'n Change-Id: I0d4cb433014df728e20256a58689ee29cbb16977 --- M manifests/role/logstash.pp 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/56/100756/1 diff --git a/manifests/role/logstash.pp b/manifests/role/logstash.pp index 5d4c6a4..df188e7 100644 --- a/manifests/role/logstash.pp +++ b/manifests/role/logstash.pp @@ -7,8 +7,6 @@ class role::logstash { include ::elasticsearch::ganglia include ::elasticsearch::nagios::check -include ::passwords::logstash -include ::redis::ganglia deployment::target { 'elasticsearchplugins': } @@ -21,6 +19,8 @@ plugins_dir => '/srv/deployment/elasticsearch/plugins', } +include ::passwords::logstash + class { '::redis': maxmemory => '1Gb', dir => '/var/run/redis', @@ -28,4 +28,6 @@ redis_replication => undef, password => $passwords::logstash::redis, } + +include ::redis::ganglia } -- To view, visit https://gerrit.wikimedia.org/r/100756 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0d4cb433014df728e20256a58689ee29cbb16977 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ori.livneh ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Correct the plural forms for Manx (Gaelg) - change (mediawiki/core)
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/100757 Change subject: Correct the plural forms for Manx (Gaelg) .. Correct the plural forms for Manx (Gaelg) Backported the plural rules from CLDR 24 as an override to CLDR 23 rules exising in MediaWiki. The syntax for plural rules changed in CLDR 24, so modified the syntax to fit the CLDR 23 syntax Once we are ready with the updated parsers for CLDR 24(See bug 56931), we should remove the override. Since we remove the custom plural forms in MW in favor of CLDR, the following changes comes into effect: 1. 'few' form used as 'zero' form in MW. Practially that make 'one' form used as 'two' form and 'two' used as 'few' form. This breaks existing gv {{PURAL}} usage as dicussed in the bug report 2. CLDR defines 'few' form as n % 100 = 0,20,40,60 but MW adds 80 also to that list, ie n % 100 = 0,20,40,60, 80. So with this patch, 80 is no longer considered as 'few' plural form. Bug: 47099 Change-Id: I46ab3dadc7fe08c1e60bbd81a1ee841e166e9608 --- D languages/classes/LanguageGv.php M languages/data/plurals-mediawiki.xml M tests/phpunit/languages/LanguageGvTest.php 3 files changed, 22 insertions(+), 74 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/57/100757/1 diff --git a/languages/classes/LanguageGv.php b/languages/classes/LanguageGv.php deleted file mode 100644 index 23a2916..000 --- a/languages/classes/LanguageGv.php +++ /dev/null @@ -1,59 +0,0 @@ -http://www.gnu.org/copyleft/gpl.html - * - * @file - * @author Niklas Laxström - * @ingroup Language - */ - -/** - * Manx (Gaelg) - * - * @ingroup Language - */ -class LanguageGv extends Language { - - /** -* @param $count int -* @param $forms array -* @return string -*/ - function convertPlural( $count, $forms ) { - $forms = $this->handleExplicitPluralForms( $count, $forms ); - if ( is_string( $forms ) ) { - return $forms; - } - if ( !count( $forms ) ) { - return ''; - } - - $forms = $this->preConvertPlural( $forms, 4 ); - - if ( $count > 0 && ( $count % 20 ) === 0 ) { - return $forms[0]; - } else { - switch ( $count % 10 ) { - case 1: return $forms[1]; - case 2: return $forms[2]; - default: return $forms[3]; - } - } - } - -} diff --git a/languages/data/plurals-mediawiki.xml b/languages/data/plurals-mediawiki.xml index 70d45a3..3314793 100644 --- a/languages/data/plurals-mediawiki.xml +++ b/languages/data/plurals-mediawiki.xml @@ -39,5 +39,11 @@ n mod 10 is 2 and n mod 100 is not 12 n is 0 or n mod 100 is 0 or n mod 100 in 10..19 + + + n mod 10 is 1 + n mod 10 is 2 + n mod 100 in 0,20,40,60 + diff --git a/tests/phpunit/languages/LanguageGvTest.php b/tests/phpunit/languages/LanguageGvTest.php index a0def62..fc58022 100644 --- a/tests/phpunit/languages/LanguageGvTest.php +++ b/tests/phpunit/languages/LanguageGvTest.php @@ -1,20 +1,19 @@ http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html#gv - // What does this mean? Is there a hard-coded override for gv somewhere? -Ryan Kaldari 2013-01-28 - $forms = array( 'Form 1', 'Form 2', 'Form 3', 'Form 4' ); + $forms = array( 'one', 'two', 'few', 'other' ); $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) ); } @@ -23,21 +22,23 @@ * @covers Language::getPluralRuleType */ public function testGetPluralRuleType( $result, $value ) { - $this->markTestSkipped( "This test won't work since convertPlural for gv doesn't seem to actually follow our plural rules." ); $this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) ); } public static function providePlural() { return array( - array( 'Form 4', 0 ), - array( 'Form 2', 1 ), - array( 'Form 3', 2 ), - array( 'Form 4', 3 ), - array( 'Form 1', 20 ), - array( 'Form 2', 21 ), - array( 'Form 3', 22 ), - array( 'Form 4', 23 ), - array( 'Form 4', 50 ), + array( 'few', 0 ), + array( 'one', 1 ), + array( 'two', 2 ), +
[MediaWiki-commits] [Gerrit] Add messages for zeroconfig-proxies Wikipedia Zero configura... - change (mediawiki...ZeroRatedMobileAccess)
jenkins-bot has submitted this change and it was merged. Change subject: Add messages for zeroconfig-proxies Wikipedia Zero configurations. .. Add messages for zeroconfig-proxies Wikipedia Zero configurations. Change-Id: I384bb432742988c9ff48dff5afcf9061a6b59888 --- M includes/ZeroConfig.i18n.php 1 file changed, 8 insertions(+), 1 deletion(-) Approvals: Siebrand: Looks good to me, approved Yurik: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/includes/ZeroConfig.i18n.php b/includes/ZeroConfig.i18n.php index 025227c..bc13f4c 100644 --- a/includes/ZeroConfig.i18n.php +++ b/includes/ZeroConfig.i18n.php @@ -31,6 +31,7 @@ 'zeroconfig-sites' => 'must be missing or be a list with one or more of these values: $1', 'zeroconfig-ips' => 'must be an array of valid non-restricted (no private networks) CIDR IP blocks', 'zeroconfig-admins' => 'must be a list of existing user accounts (optional)', + 'zeroconfig-proxies' => 'must be a list of proxies supporting zero-rating for this carrier (optional)', ); /** Message documentation (Message documentation) @@ -58,7 +59,8 @@ ** {{msg-mw|Zeroconfig-banner url}} ** {{msg-mw|Zeroconfig-sites}} ** {{msg-mw|Zeroconfig-ips}} -** {{msg-mw|Zeroconfig-admins}}', +** {{msg-mw|Zeroconfig-admins}} +** {{msg-mw|Zeroconfig-proxies}}', 'zeroconfig-duplicate_field' => 'Field ($1) is present more than once in the JSON. Parameters: @@ -108,6 +110,11 @@ 'zeroconfig-admins' => 'Admins parameter validation error. Used as $2 in the message {{msg-mw|Zeroconfig-field error}}.', + + 'zeroconfig-proxies' => 'Proxies parameter validation error. + +Used as $2 in the message {{msg-mw|Zeroconfig-field error}}.', + ); /** Afrikaans (Afrikaans) -- To view, visit https://gerrit.wikimedia.org/r/100731 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I384bb432742988c9ff48dff5afcf9061a6b59888 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ZeroRatedMobileAccess Gerrit-Branch: master Gerrit-Owner: Dr0ptp4kt Gerrit-Reviewer: Siebrand Gerrit-Reviewer: Yurik Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] i18n: consistency tweaks - change (mediawiki...GWToolset)
jenkins-bot has submitted this change and it was merged. Change subject: i18n: consistency tweaks .. i18n: consistency tweaks * MediaWiki * URL * contact us * remove full-stop from fieldset label Change-Id: Ia838513dc21ec01c4a753970547b99256fe1bfa7 --- M GWToolset.i18n.php 1 file changed, 18 insertions(+), 18 deletions(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/GWToolset.i18n.php b/GWToolset.i18n.php index 899a87d..c024ded 100644 --- a/GWToolset.i18n.php +++ b/GWToolset.i18n.php @@ -19,7 +19,7 @@ */ 'gwtoolset' => 'GWToolset', 'gwtoolset-desc' => 'GWToolset, a mass upload tool for GLAMs', - 'gwtoolset-intro' => 'GWToolset is a MediaWiki extension that allows GLAMs (Galleries, Libraries, Archives and Museums) the ability to mass upload content based on an XML file containing respective metadata about the content. The intent is to allow for a variety of XML schemas. Further information about the project can be found on its [https://commons.wikimedia.org/wiki/Commons:GLAMToolset_project project page]. Feel free to contacts us on that page as well. Select one of the menu items above to begin the upload process.', + 'gwtoolset-intro' => 'GWToolset is a MediaWiki extension that allows GLAMs (Galleries, Libraries, Archives and Museums) the ability to mass upload content based on an XML file containing respective metadata about the content. The intent is to allow for a variety of XML schemas. Further information about the project can be found on its [https://commons.wikimedia.org/wiki/Commons:GLAMToolset_project project page]. Feel free to contact us on that page as well. Select one of the menu items above to begin the upload process.', /** * developer issues @@ -134,7 +134,7 @@ * step 1 - metadata detect */ 'gwtoolset-accepted-file-types' => 'Accepted file {{PLURAL:$1|type|types}}:', - 'gwtoolset-ensure-well-formed-xml' => 'Make sure the XML File is well-formed with this $1.', + 'gwtoolset-ensure-well-formed-xml' => 'Make sure the XML file is well-formed with this $1.', 'gwtoolset-file-url-invalid' => 'The file URL was invalid; The file does not yet exist in the wiki. You need to first upload the file from your computer if you want to use the file URL reference in the form.', 'gwtoolset-mediawiki-template-does-not-exist' => 'MediaWiki template "$1" does not exist in the wiki. @@ -144,7 +144,7 @@ 'gwtoolset-metadata-file-source-info' => '... either a file that has been previously uploaded or a file you wish to upload from your computer.', 'gwtoolset-metadata-file-url' => 'Metadata file wiki URL:', 'gwtoolset-metadata-file-upload' => 'Metadata file upload:', - 'gwtoolset-metadata-mapping-bad' => 'There’s a problem with the metadata mapping. Most likely the JSON format is invalid. Try and correct the issue and then submit the form again. + 'gwtoolset-metadata-mapping-bad' => 'There is a problem with the metadata mapping. Most likely the JSON format is invalid. Try and correct the issue and then submit the form again. $1.', 'gwtoolset-metadata-mapping-invalid-url' => 'The metadata mapping URL supplied, does not match the expect mapping URL path. @@ -163,7 +163,7 @@ 'gwtoolset-page-title-contains-url' => 'The page "$1" contains the entire wiki URL. Make sure you only enter the page title, e.g. the part of the URL after /wiki/', 'gwtoolset-record-element-name' => 'What is the XML element that contains each metadata record:', 'gwtoolset-step-1-heading' => 'Step 1: Metadata detection', - 'gwtoolset-step-1-instructions-1' => 'The Metadata upload process consists of 4 steps:', + 'gwtoolset-step-1-instructions-1' => 'The metadata upload process consists of 4 steps:', 'gwtoolset-step-1-instructions-2' => 'In this step, you upload a new metadata file to the wiki. The tool will attempt to extract the metadata fields available in the metadata file, which you will then map to a MediaWiki template in "{{int:gwtoolset-step-2-heading}}".', 'gwtoolset-step-1-instructions-3' => 'If your media file domain is not listed below, please [https://bugzilla.wikimedia.org/enter_bug.cgi?assigned_to=wikibug...@lists.wikimedia.org&attach_text=&blocked=58224&bug_file_loc=http://&bug_severity=normal&bug_status=NEW&cf_browser=---&cf_platform=---&comment=please+add+the+following+domain(s)+to+the+wgCopyUploadsDomains+whitelist:&component=Site+requests&contenttypeentry=&contenttypemethod=autodetect&contenttypeselection=text/plain&data=&dependson=&description=&flag_type-3=X&form_name=enter_bug&keywords=&maketemplate=Remember+values+as+bookmarkable+template&op_sys=All&product=Wikimedia&rep_platform=All&short_desc=&target_milestone=---&version=wmf-deployment request] that your media file d
[MediaWiki-commits] [Gerrit] Clean up to sandbox logging - change (mediawiki...Translate)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/100546 Change subject: Clean up to sandbox logging .. Clean up to sandbox logging * Avoid using /*, might cause problems with WebAPI * Move logging out of try catch * Add gender to promoted log entry * Remove link to user page on rejected log entry * Add user creation log entry after admin log entry Change-Id: I4e7eb4a438591ab57a469d5ec8cc573425d199e8 --- M Translate.php M TranslateSandbox.i18n.php M api/ApiTranslateSandbox.php M utils/TranslateLogFormatter.php 4 files changed, 18 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/46/100546/1 diff --git a/Translate.php b/Translate.php index a86e698..1bfb75a 100644 --- a/Translate.php +++ b/Translate.php @@ -211,7 +211,8 @@ $wgLogActionsHandlers['translationreview/group'] = 'TranslateLogFormatter'; $wgLogTypes[] = 'translatorsandbox'; -$wgLogActionsHandlers['translatorsandbox/*'] = 'LogFormatter'; +$wgLogActionsHandlers['translatorsandbox/promoted'] = 'TranslateLogFormatter'; +$wgLogActionsHandlers['translatorsandbox/rejected'] = 'TranslateLogFormatter'; // New jobs $wgJobClasses['MessageIndexRebuildJob'] = 'MessageIndexRebuildJob'; diff --git a/TranslateSandbox.i18n.php b/TranslateSandbox.i18n.php index c3b7f8f..d01deb9 100644 --- a/TranslateSandbox.i18n.php +++ b/TranslateSandbox.i18n.php @@ -58,7 +58,7 @@ 'log-name-translatorsandbox' => 'Translation sandbox', 'log-description-translatorsandbox' => 'A log of actions on translation sandbox users', - 'logentry-translatorsandbox-promoted' => '$1 {{GENDER:$2|promoted}} $3 to translator', + 'logentry-translatorsandbox-promoted' => '$1 {{GENDER:$2|promoted}} $3 to {{GENDER:$4|translator}}', 'logentry-translatorsandbox-rejected' => '$1 {{GENDER:$2|rejected}} the request from $3 to become a translator', ); diff --git a/api/ApiTranslateSandbox.php b/api/ApiTranslateSandbox.php index 52763a6..12c6b8b 100644 --- a/api/ApiTranslateSandbox.php +++ b/api/ApiTranslateSandbox.php @@ -84,21 +84,19 @@ foreach ( $params['userid'] as $user ) { $user = User::newFromId( $user ); + $userpage = $user->getUserPage(); try { - $logEntry = new ManualLogEntry( 'translatorsandbox', 'rejected' ); - $logEntry->setPerformer( $this->getUser() ); - $logEntry->setTarget( $user->getUserPage() ); - $logEntry->setParameters( array( - '4::userid' => $user->getId(), - ) ); - $logid = $logEntry->insert(); - $logEntry->publish( $logid ); - TranslateSandbox::deleteUser( $user ); } catch ( MWException $e ) { $this->dieUsage( $e->getMessage(), 'invalidparam' ); } + + $logEntry = new ManualLogEntry( 'translatorsandbox', 'rejected' ); + $logEntry->setPerformer( $this->getUser() ); + $logEntry->setTarget( $userpage ); + $logid = $logEntry->insert(); + $logEntry->publish( $logid ); } } @@ -118,8 +116,6 @@ $this->dieUsage( $e->getMessage(), 'invalidparam' ); } - $user->addNewUserLogEntry( 'create', $this->msg( 'tsb-promoted-from-sandbox' )->text() ); - $logEntry = new ManualLogEntry( 'translatorsandbox', 'promoted' ); $logEntry->setPerformer( $this->getUser() ); $logEntry->setTarget( $user->getUserPage() ); @@ -128,6 +124,8 @@ ) ); $logid = $logEntry->insert(); $logEntry->publish( $logid ); + + $user->addNewUserLogEntry( 'create', $this->msg( 'tsb-promoted-from-sandbox' )->text() ); } } diff --git a/utils/TranslateLogFormatter.php b/utils/TranslateLogFormatter.php index 5f0dbf0..019d6c5 100644 --- a/utils/TranslateLogFormatter.php +++ b/utils/TranslateLogFormatter.php @@ -46,6 +46,12 @@ $params[3] = TranslateUtils::getLanguageName( $language, $uiLanguage->getCode() ); $params[5] = $this->formatStateMessage( $params[5] ); $params[6] = $this->formatStateMessage( $params[6] ); + } elseif ( $type === 'translatorsandbox/rejected' ) { + // No point linking to the user page which cannot have existed + $params
[MediaWiki-commits] [Gerrit] Simplify SimpleFFS::exists() - change (mediawiki...Translate)
jenkins-bot has submitted this change and it was merged. Change subject: Simplify SimpleFFS::exists() .. Simplify SimpleFFS::exists() Change-Id: I0c4ad43b9dc36b28a1d805dfc05c6765b73282bb --- M ffs/FFS.php 1 file changed, 1 insertion(+), 5 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/ffs/FFS.php b/ffs/FFS.php index c2a7c46..a569931 100644 --- a/ffs/FFS.php +++ b/ffs/FFS.php @@ -169,11 +169,7 @@ return false; } - if ( !file_exists( $filename ) ) { - return false; - } - - return true; + return file_exists( $filename ); } /** -- To view, visit https://gerrit.wikimedia.org/r/100435 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0c4ad43b9dc36b28a1d805dfc05c6765b73282bb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Siebrand Gerrit-Reviewer: Nikerabbit Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] beta: gwtoolset-whitelist - change (operations/mediawiki-config)
Dan-nl has uploaded a new change for review. https://gerrit.wikimedia.org/r/100547 Change subject: beta: gwtoolset-whitelist .. beta: gwtoolset-whitelist from the wgCopyUploadsDomains array: removed: *.legermuseum.nl added: *.hu-berlin.de *.memorix.nl Change-Id: Ibceb9638ff10aa4b4b3eebf16b0a34cc8192c0e9 --- M wmf-config/InitialiseSettings-labs.php 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/47/100547/1 diff --git a/wmf-config/InitialiseSettings-labs.php b/wmf-config/InitialiseSettings-labs.php index ff98933..94969b6 100644 --- a/wmf-config/InitialiseSettings-labs.php +++ b/wmf-config/InitialiseSettings-labs.php @@ -303,9 +303,10 @@ '+commonswiki' => array( '*.collectie.legermuseum.nl', '*.gahetna.nl', + '*.hu-berlin.de', '*.kb.nl', - '*.legermuseum.nl', '*.lndb.lv', + '*.memorix.nl', '*.rbge.org.uk', '*.rijksmuseum.nl', ), -- To view, visit https://gerrit.wikimedia.org/r/100547 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibceb9638ff10aa4b4b3eebf16b0a34cc8192c0e9 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Dan-nl ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] whitelist-instructions - change (mediawiki...GWToolset)
Dan-nl has uploaded a new change for review. https://gerrit.wikimedia.org/r/100548 Change subject: whitelist-instructions .. whitelist-instructions adding instructions for the user so that they know that a whitelist exists and how to add a request to add their media file domain to that whitelist. Change-Id: Icc56f3bdfc882de3e5ba5f212c37b8e055dd4181 --- M GWToolset.i18n.php M includes/Forms/MetadataDetectForm.php M resources/css/ext.gwtoolset.css 3 files changed, 50 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GWToolset refs/changes/48/100548/1 diff --git a/GWToolset.i18n.php b/GWToolset.i18n.php index 3eb694c..4b0ba07 100644 --- a/GWToolset.i18n.php +++ b/GWToolset.i18n.php @@ -164,10 +164,9 @@ 'gwtoolset-record-element-name' => 'What is the XML element that contains each metadata record:', 'gwtoolset-step-1-heading' => 'Step 1: Metadata detection', 'gwtoolset-step-1-instructions-1' => 'The Metadata upload process consists of 4 steps:', - 'gwtoolset-step-1-instructions-2' => 'In this step, you upload a new metadata file to the wiki. The tool will attempt to extract the metadata fields available in the metadata file, which you will then map to a MediaWiki template in "{{int:gwtoolset-step-2-heading}}". - -Domain whitelist -If you haven’t already done so, please [http://ur1.ca/g600j request] that your media file domain be added to the commons.wikipedia.com upload from URL whitelist. The whitelist allows commons.wikipedia.com access to your media file domain. The best example is to submit an actual URL to a media file.', + 'gwtoolset-step-1-instructions-2' => 'In this step, you upload a new metadata file to the wiki. The tool will attempt to extract the metadata fields available in the metadata file, which you will then map to a MediaWiki template in "{{int:gwtoolset-step-2-heading}}".', + 'gwtoolset-step-1-instructions-3' => 'If your media file domain is not listed below, please [http://ur1.ca/g600j request] that your media file domain be added to the Wikimedia Commons domain whitelist. The domain whitelist is a list of domains Wikimedia Commons checks against before fetching media files. If your media file domain is not on that list, Wikimedia Commons will not download media files from that domain. The best example, to submit in your request, is an actual link to a media file.', + 'gwtoolset-step-1-instructions-3-heading' => 'Domain whitelist', 'gwtoolset-step-1-instructions-li-1' => 'Metadata detection', 'gwtoolset-step-1-instructions-li-2' => 'Metadata mapping', 'gwtoolset-step-1-instructions-li-3' => 'Batch preview', diff --git a/includes/Forms/MetadataDetectForm.php b/includes/Forms/MetadataDetectForm.php index b96355d..934a173 100644 --- a/includes/Forms/MetadataDetectForm.php +++ b/includes/Forms/MetadataDetectForm.php @@ -21,6 +21,42 @@ class MetadataDetectForm { /** +* @return {null|string} +*/ + public static function getCopyUploadsDomainsAsList() { + global $wgCopyUploadsDomains; + $result = null; + + if ( !empty( $wgCopyUploadsDomains ) ) { + $result = Html::rawElement( + 'h4', + array(), + wfMessage( 'gwtoolset-step-1-instructions-3-heading' ) + ); + + $result .= Html::rawElement( + 'p', + array(), + wfMessage( 'gwtoolset-step-1-instructions-3' ) + ); + + $result .= Html::openElement( 'ul', array( 'id' => 'gwtoolset-whitelist' ) ); + + foreach( $wgCopyUploadsDomains as $domain ) { + $result .= Html::rawElement( + 'li', + array(), + Utils::sanitizeString( $domain ) + ); + } + + $result .= Html::closeElement( 'ul' ); + } + + return $result; + } + + /** * returns an html form for step 1 : Metadata Detect * * @param {SpecialPage} $SpecialPage @@ -79,6 +115,8 @@ wfMessage( 'gwtoolset-step-1-instructions-2' )->parse() ) . + self::getCopyUploadsDomainsAsList() . + Html::openElement( 'form', array( diff --git a/resources/css/ext.gwtoolset.css b/resources/css/ext.gwtoolset.css index 23b13de..430106f 100644 --- a/resources/css/ext.gwtoolset.css +++ b/reso
[MediaWiki-commits] [Gerrit] beta: gwtoolset-whitelist - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: beta: gwtoolset-whitelist .. beta: gwtoolset-whitelist from the wgCopyUploadsDomains array: removed: *.legermuseum.nl added: *.hu-berlin.de *.memorix.nl Change-Id: Ibceb9638ff10aa4b4b3eebf16b0a34cc8192c0e9 --- M wmf-config/InitialiseSettings-labs.php 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/InitialiseSettings-labs.php b/wmf-config/InitialiseSettings-labs.php index ff98933..94969b6 100644 --- a/wmf-config/InitialiseSettings-labs.php +++ b/wmf-config/InitialiseSettings-labs.php @@ -303,9 +303,10 @@ '+commonswiki' => array( '*.collectie.legermuseum.nl', '*.gahetna.nl', + '*.hu-berlin.de', '*.kb.nl', - '*.legermuseum.nl', '*.lndb.lv', + '*.memorix.nl', '*.rbge.org.uk', '*.rijksmuseum.nl', ), -- To view, visit https://gerrit.wikimedia.org/r/100547 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibceb9638ff10aa4b4b3eebf16b0a34cc8192c0e9 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Dan-nl Gerrit-Reviewer: Hashar Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Clean up the translator sandbox tests - change (mediawiki...Translate)
Amire80 has uploaded a new change for review. https://gerrit.wikimedia.org/r/100549 Change subject: Clean up the translator sandbox tests .. Clean up the translator sandbox tests Refactoring the steps. Change-Id: I694ec5350adaad7a5f3a878196e2d8298d312be7 --- M tests/browser/features/manage_translator_sandbox.feature M tests/browser/features/step_definitions/manage_translator_sandbox_steps.rb M tests/browser/features/support/pages/manage_translator_sandbox_page.rb 3 files changed, 30 insertions(+), 28 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/49/100549/1 diff --git a/tests/browser/features/manage_translator_sandbox.feature b/tests/browser/features/manage_translator_sandbox.feature index 1c3aa4a..de5c7bc 100644 --- a/tests/browser/features/manage_translator_sandbox.feature +++ b/tests/browser/features/manage_translator_sandbox.feature @@ -14,31 +14,31 @@ Given I am logged in as a translation administrator Scenario: There are no users in the sandbox -Given I am on the Special:ManageTranslatorSandbox page with no users in the sandbox +Given I am on the Translator Sandbox management page with no users in the sandbox Then no users are displayed in the first column And I should see 'No requests from new users' in the second column Scenario: Existing users can be searched on the list -Given I am on the Special:ManageTranslatorSandbox page with users in the sandbox +Given I am on the Translator Sandbox management page with users in the sandbox When I search for 'pupu' in the sandboxed users search field Then only users whose name begins with 'pupu' are displayed in the first column And I should see '5 requests' at the top of the first column Scenario: Searching for non-existing users displays no results -Given I am on the Special:ManageTranslatorSandbox page with users in the sandbox +Given I am on the Translator Sandbox management page with users in the sandbox When I search for 'nosuchuser' in the sandboxed users search field Then no users are displayed in the first column And I should see '0 requests' at the top of the first column Scenario: Emptying the search field shows all the users -Given I am on the Special:ManageTranslatorSandbox page with users in the sandbox +Given I am on the Translator Sandbox management page with users in the sandbox When I search for 'pupu' in the sandboxed users search field And I search for '' in the sandboxed users search field Then a user whose name begins with 'pupu' is displayed in the first column And a user whose name begins with 'orava' is displayed in the first column Scenario: Selecting older requests -Given I am on the Special:ManageTranslatorSandbox page with users in the sandbox +Given I am on the Translator Sandbox management page with users in the sandbox When I click on 'Orava1' in the first column And I click on the link that says '3 older requests' at the bottom of the first column Then I should see the checkbox next to the request from 'Orava1' checked @@ -53,7 +53,7 @@ And I should see '4 users selected' in the header of the second column Scenario: Searching for a user by language -Given I am on the Special:ManageTranslatorSandbox page with users in the sandbox +Given I am on the Translator Sandbox management page with users in the sandbox When I click the sandboxed users language filter button And I type 'ml' in the language filter Then only users who translate to language 'ml' are displayed in the first column @@ -63,7 +63,7 @@ And I should see the button that clears language selection Scenario: Searching for a user by language and selecting all users -Given I am on the Special:ManageTranslatorSandbox page with users in the sandbox +Given I am on the Translator Sandbox management page with users in the sandbox When I click the sandboxed users language filter button And I type 'uk' in the language filter And I click the checkbox to select all users @@ -73,7 +73,7 @@ And I should see '2 users selected' in the header of the second column Scenario: Showing user who translate to all languages -Given I am on the Special:ManageTranslatorSandbox page with users in the sandbox +Given I am on the Translator Sandbox management page with users in the sandbox When I click the sandboxed users language filter button And I type 'nl' in the language filter And I click the button that clears language selection @@ -84,7 +84,7 @@ And I should not see the button that clears language selection Scenario: Translation Administrator should be able to see a list of pending requests with usernames in the first column, sorted by the number of translat
[MediaWiki-commits] [Gerrit] TranslatorSandbox: Avoid showing duplicate message about 'no... - change (mediawiki...Translate)
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/100550 Change subject: TranslatorSandbox: Avoid showing duplicate message about 'no translations' .. TranslatorSandbox: Avoid showing duplicate message about 'no translations' Change-Id: I327868b8e605c0045fabd6a5882e2de4ca156e31 --- M resources/js/ext.translate.special.translatesandbox.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/50/100550/1 diff --git a/resources/js/ext.translate.special.translatesandbox.js b/resources/js/ext.translate.special.translatesandbox.js index de16c78..fd5e271 100644 --- a/resources/js/ext.translate.special.translatesandbox.js +++ b/resources/js/ext.translate.special.translatesandbox.js @@ -203,7 +203,7 @@ // Display a message if the user didn't make any translations if ( !translations.translationstash.translations.length ) { - $target.append( + $target.empty().append( $( '' ) .addClass( 'tsb-details-no-translations' ) .text( mw.msg( 'tsb-didnt-make-any-translations' ) ) -- To view, visit https://gerrit.wikimedia.org/r/100550 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I327868b8e605c0045fabd6a5882e2de4ca156e31 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Santhosh ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix order of parameters for PropertyLabelNotResolvedException - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Fix order of parameters for PropertyLabelNotResolvedException .. Fix order of parameters for PropertyLabelNotResolvedException Change-Id: Id60a046abeb12ff1ad2fefcf761d370e0cf662c0 (cherry picked from commit 76420ad66a0ab54a8f7edb3a0140ebfb42bcceb8) (cherry picked from commit 80583162ff31fc4b1a2d2c1b0524958608071d32) --- M client/includes/parserhooks/PropertyParserFunctionRenderer.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Daniel Kinzler: Looks good to me, approved jenkins-bot: Verified diff --git a/client/includes/parserhooks/PropertyParserFunctionRenderer.php b/client/includes/parserhooks/PropertyParserFunctionRenderer.php index 7ca7647..6e5b371 100644 --- a/client/includes/parserhooks/PropertyParserFunctionRenderer.php +++ b/client/includes/parserhooks/PropertyParserFunctionRenderer.php @@ -104,7 +104,7 @@ $propertyIds = $this->propertyLabelResolver->getPropertyIdsForLabels( array( $string ) ); if ( $propertyIds === null || empty( $propertyIds ) ) { - throw new PropertyLabelNotResolvedException( $this->language->getCode(), $string ); + throw new PropertyLabelNotResolvedException( $string, $this->language->getCode() ); } $propertyId = $propertyIds[$string]; -- To view, visit https://gerrit.wikimedia.org/r/99653 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id60a046abeb12ff1ad2fefcf761d370e0cf662c0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Aude Gerrit-Reviewer: Addshore 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] Remove the "blue dot" feature - change (mediawiki...Translate)
jenkins-bot has submitted this change and it was merged. Change subject: Remove the "blue dot" feature .. Remove the "blue dot" feature Change-Id: I2c482e3dcfcf83e7968935285a79ab445c221599 --- M resources/css/ext.translate.special.translatesandbox.css M specials/SpecialTranslateSandbox.php 2 files changed, 0 insertions(+), 14 deletions(-) Approvals: Santhosh: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/css/ext.translate.special.translatesandbox.css b/resources/css/ext.translate.special.translatesandbox.css index 0da0418..a17eedb 100644 --- a/resources/css/ext.translate.special.translatesandbox.css +++ b/resources/css/ext.translate.special.translatesandbox.css @@ -116,19 +116,6 @@ overflow: hidden; } -.request .proofread-marker { - background-color: #3e8dc5; - width: 10px; - height: 10px; - position: absolute; - top: 50%; - left: 5%; - margin-top: -5px; - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-radius: 5px; -} - /* Details pane */ .details.pane > .row { diff --git a/specials/SpecialTranslateSandbox.php b/specials/SpecialTranslateSandbox.php index 4366f3e..1839cd1 100644 --- a/specials/SpecialTranslateSandbox.php +++ b/specials/SpecialTranslateSandbox.php @@ -195,7 +195,6 @@ return << - $countEnc -- To view, visit https://gerrit.wikimedia.org/r/100541 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2c482e3dcfcf83e7968935285a79ab445c221599 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Amire80 Gerrit-Reviewer: Nikerabbit Gerrit-Reviewer: Pginer Gerrit-Reviewer: Santhosh Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add Flow to extension list for message cache. - change (operations/mediawiki-config)
Spage has uploaded a new change for review. https://gerrit.wikimedia.org/r/100551 Change subject: Add Flow to extension list for message cache. .. Add Flow to extension list for message cache. Move Flow from wmf-config/extension-list-labs to the main wmf-config/extension-list, in order to generate ExtensionMessages-1.23wmfNN containing Flow for l10n in advance of flipping the switch to enable Flow. Change-Id: If6b6e282ce1529ee1743d6d3e80e1e63e0f37b41 --- M wmf-config/extension-list M wmf-config/extension-list-labs 2 files changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/51/100551/1 diff --git a/wmf-config/extension-list b/wmf-config/extension-list index ca88006..5f6d7d8 100644 --- a/wmf-config/extension-list +++ b/wmf-config/extension-list @@ -49,6 +49,7 @@ $IP/extensions/ExtensionDistributor/ExtensionDistributor.php $IP/extensions/FeaturedFeeds/FeaturedFeeds.php $IP/extensions/FlaggedRevs/FlaggedRevs.php +$IP/extensions/Flow/Flow.php $IP/extensions/FormPreloadPostCache/FormPreloadPostCache.php $IP/extensions/FundraiserLandingPage/FundraiserLandingPage.php $IP/extensions/Gadgets/Gadgets.php diff --git a/wmf-config/extension-list-labs b/wmf-config/extension-list-labs index 93cc1d7..fef7adb 100644 --- a/wmf-config/extension-list-labs +++ b/wmf-config/extension-list-labs @@ -1,2 +1 @@ -$IP/extensions/Flow/Flow.php $IP/extensions/GWToolset/GWToolset.php -- To view, visit https://gerrit.wikimedia.org/r/100551 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If6b6e282ce1529ee1743d6d3e80e1e63e0f37b41 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Spage ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Clean up the translator sandbox tests - change (mediawiki...Translate)
jenkins-bot has submitted this change and it was merged. Change subject: Clean up the translator sandbox tests .. Clean up the translator sandbox tests Refactoring the steps. Change-Id: I694ec5350adaad7a5f3a878196e2d8298d312be7 --- M tests/browser/features/manage_translator_sandbox.feature M tests/browser/features/step_definitions/manage_translator_sandbox_steps.rb M tests/browser/features/support/pages/manage_translator_sandbox_page.rb 3 files changed, 30 insertions(+), 28 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/browser/features/manage_translator_sandbox.feature b/tests/browser/features/manage_translator_sandbox.feature index 1c3aa4a..6d8b205 100644 --- a/tests/browser/features/manage_translator_sandbox.feature +++ b/tests/browser/features/manage_translator_sandbox.feature @@ -14,31 +14,31 @@ Given I am logged in as a translation administrator Scenario: There are no users in the sandbox -Given I am on the Special:ManageTranslatorSandbox page with no users in the sandbox +Given I am on the Translator sandbox management page with no users in the sandbox Then no users are displayed in the first column And I should see 'No requests from new users' in the second column Scenario: Existing users can be searched on the list -Given I am on the Special:ManageTranslatorSandbox page with users in the sandbox +Given I am on the Translator sandbox management page with users in the sandbox When I search for 'pupu' in the sandboxed users search field Then only users whose name begins with 'pupu' are displayed in the first column And I should see '5 requests' at the top of the first column Scenario: Searching for non-existing users displays no results -Given I am on the Special:ManageTranslatorSandbox page with users in the sandbox +Given I am on the Translator sandbox management page with users in the sandbox When I search for 'nosuchuser' in the sandboxed users search field Then no users are displayed in the first column And I should see '0 requests' at the top of the first column Scenario: Emptying the search field shows all the users -Given I am on the Special:ManageTranslatorSandbox page with users in the sandbox +Given I am on the Translator sandbox management page with users in the sandbox When I search for 'pupu' in the sandboxed users search field And I search for '' in the sandboxed users search field Then a user whose name begins with 'pupu' is displayed in the first column And a user whose name begins with 'orava' is displayed in the first column Scenario: Selecting older requests -Given I am on the Special:ManageTranslatorSandbox page with users in the sandbox +Given I am on the Translator sandbox management page with users in the sandbox When I click on 'Orava1' in the first column And I click on the link that says '3 older requests' at the bottom of the first column Then I should see the checkbox next to the request from 'Orava1' checked @@ -53,7 +53,7 @@ And I should see '4 users selected' in the header of the second column Scenario: Searching for a user by language -Given I am on the Special:ManageTranslatorSandbox page with users in the sandbox +Given I am on the Translator sandbox management page with users in the sandbox When I click the sandboxed users language filter button And I type 'ml' in the language filter Then only users who translate to language 'ml' are displayed in the first column @@ -63,7 +63,7 @@ And I should see the button that clears language selection Scenario: Searching for a user by language and selecting all users -Given I am on the Special:ManageTranslatorSandbox page with users in the sandbox +Given I am on the Translator sandbox management page with users in the sandbox When I click the sandboxed users language filter button And I type 'uk' in the language filter And I click the checkbox to select all users @@ -73,7 +73,7 @@ And I should see '2 users selected' in the header of the second column Scenario: Showing user who translate to all languages -Given I am on the Special:ManageTranslatorSandbox page with users in the sandbox +Given I am on the Translator sandbox management page with users in the sandbox When I click the sandboxed users language filter button And I type 'nl' in the language filter And I click the button that clears language selection @@ -84,7 +84,7 @@ And I should not see the button that clears language selection Scenario: Translation Administrator should be able to see a list of pending requests with usernames in the first column, sorted by the number of translations and the most recent within them, and the first us
[MediaWiki-commits] [Gerrit] Some more consistency tweaks in preparation for adding exten... - change (mediawiki...GWToolset)
Raimond Spekking has uploaded a new change for review. https://gerrit.wikimedia.org/r/100552 Change subject: Some more consistency tweaks in preparation for adding extension to translatewiki.net .. Some more consistency tweaks in preparation for adding extension to translatewiki.net * Use default ← arrow. The other was shown in my editor as rectangle * Sprinkle some more * Repair weblinks: ( ) -> [ ] * Some nitpicking Change-Id: Iae05fb09fca3d176d83bbae29e0a19e9786c0475 --- M GWToolset.i18n.php 1 file changed, 11 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GWToolset refs/changes/52/100552/1 diff --git a/GWToolset.i18n.php b/GWToolset.i18n.php index 3eb694c..59a2ac4 100644 --- a/GWToolset.i18n.php +++ b/GWToolset.i18n.php @@ -32,7 +32,7 @@ $1", 'gwtoolset-dom-record-issue' => 'record-element-name, or record-count, or record-current not provided.', 'gwtoolset-file-backend-maxage-invalid' => 'The maximum age value provided in $wgGWTFBMaxAge is invalid. -See php.net/manual/en/datetime.formats.relative.php for how to set it correctly.', +See the [php.net/manual/en/datetime.formats.relative.php PHP manual] for how to set it correctly.', 'gwtoolset-fsfile-empty' => 'The file was empty and was deleted.', 'gwtoolset-fsfile-retrieval-failure' => 'The file could not be retrieved from URL $1.', 'gwtoolset-ignorewarnings' => 'ignorewarnings not set.', @@ -81,7 +81,7 @@ 'gwtoolset-no-extension' => 'The file that was uploaded does not contain enough information to process the file. Most likely it has no file extension.', 'gwtoolset-no-file' => 'No file was received.', 'gwtoolset-no-form-field' => 'The expected form field "$1" does not exist.', - 'gwtoolset-over-max-ini' => 'The file that was uploaded exceeds the upload_max_filesize and/or the post_max_size directive in php.ini.', + 'gwtoolset-over-max-ini' => 'The file that was uploaded exceeds the upload_max_filesize and/or the post_max_size directive in php.ini.', 'gwtoolset-partial-upload' => 'The file was only partially uploaded.', 'gwtoolset-php-extension-error' => 'A PHP extension stopped the file upload. PHP does not provide a way to ascertain which extension caused the file upload to stop. Examining the list of loaded extensions with phpinfo() may help.', 'gwtoolset-unaccepted-extension' => 'The file source does not contain an accepted file extension.', @@ -94,7 +94,7 @@ /** * general form */ - 'gwtoolset-back-text-link' => '⬅ go back to the form', + 'gwtoolset-back-text-link' => '← go back to the form', 'gwtoolset-back-text' => 'Press the browser back button to go back to the form.', 'gwtoolset-file-interpretation-error' => 'There was a problem processing the metadata file', 'gwtoolset-mediawiki-template' => 'Template $1', @@ -184,7 +184,7 @@ 'gwtoolset-category' => 'Category', 'gwtoolset-create-mapping' => '$1: Creating metadata mapping for $2.', 'gwtoolset-example-record' => 'Metadata’s example record’s contents.', - 'gwtoolset-global-categories' => 'Global Categories', + 'gwtoolset-global-categories' => 'Global categories', 'gwtoolset-global-tooltip' => 'These category entries will be applied globally to all uploaded items.', 'gwtoolset-maps-to' => 'Maps to', 'gwtoolset-mapping-media-file-url-extension-bad' => 'The file extension could not be determined from the file URL: $1.', @@ -247,12 +247,12 @@ * wiki checks */ 'gwtoolset-invalid-token' => 'The edit token submitted with the form is invalid.', - 'gwtoolset-maxuploadsize-exceeds-ini-settings' => 'Current PHP .ini settings: + 'gwtoolset-maxuploadsize-exceeds-ini-settings' => 'Current php.ini settings: • upload_max_filesize: $1 • post_max_size: $2 -These are set lower than the wiki\'s $wgMaxUploadSize, which is set at "$3". Please adjust the PHP .ini settings as appropriate.', +These are set lower than the wiki\'s $wgMaxUploadSize, which is set at "$3". Please adjust the php.ini settings as appropriate.', 'gwtoolset-mediawiki-version-invalid' => 'This extension requires MediaWiki version $1This MediaWiki version is $2.', 'gwtoolset-no-upload-by-url' => 'You are not part of a group that has the right to upload by url.', 'gwtoolset-permission-not-given' => 'Make sure that you are logged in or contact an administrator in order to be granted permission to view this page ($1).', @@ -264,13 +264,13 @@ 'gwtoolset-verify-api-writeable' => 'The $1 Extension requires that the wiki API can perform write actions for authorized users. Please make sure that $wgEnableWriteAPI is set to true in the DefaultSettings.php file or is overridden to true in the LocalSett
[MediaWiki-commits] [Gerrit] Cleanup in action tests - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Cleanup in action tests .. Cleanup in action tests Change-Id: I69b8fd3f2c92165467277c3853d2d133d3aae085 --- M repo/tests/phpunit/includes/actions/ActionTestCase.php M repo/tests/phpunit/includes/actions/EditEntityActionTest.php M repo/tests/phpunit/includes/actions/ViewEntityActionTest.php 3 files changed, 49 insertions(+), 104 deletions(-) Approvals: Addshore: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/tests/phpunit/includes/actions/ActionTestCase.php b/repo/tests/phpunit/includes/actions/ActionTestCase.php index 6883795..bf91223 100644 --- a/repo/tests/phpunit/includes/actions/ActionTestCase.php +++ b/repo/tests/phpunit/includes/actions/ActionTestCase.php @@ -2,36 +2,25 @@ namespace Wikibase\Test; -use User, WebRequest, WikiPage, Action; -use RequestContext; +use Action; +use ApiQueryInfo; +use Article; +use Exception; use FauxRequest; +use Language; use MediaWikiTestCase; +use MWException; use OutputPage; +use RequestContext; use Status; - -use \Wikibase\Item; -use \Wikibase\ItemContent; +use Title; +use User; +use WebRequest; +use Wikibase\Item; +use Wikibase\ItemContent; +use WikiPage; /** - * - * 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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * http://www.gnu.org/copyleft/gpl.html - * - * @ingroup WikibaseRepoTest - * @ingroup Test - * * @licence GNU GPL v2+ * @author Daniel Kinzler * @@ -45,6 +34,8 @@ public function setUp() { parent::setUp(); + // @fixme use setMwGlobals or better yet design tests / code to not depend on globals! + $this->savedGlobals = array(); $this->savedGlobals['wgUser'] = $GLOBALS['wgUser']; @@ -53,9 +44,9 @@ $this->savedGlobals['wgGroupPermissions'] = $GLOBALS['wgGroupPermissions']; global $wgLang; - $wgLang = \Language::factory( 'qqx' ); + $wgLang = Language::factory( 'qqx' ); - \ApiQueryInfo::resetTokenCache(); + ApiQueryInfo::resetTokenCache(); } public function tearDown() { @@ -66,7 +57,7 @@ $$k = $v; } - \ApiQueryInfo::resetTokenCache(); + ApiQueryInfo::resetTokenCache(); if ( $this->permissionsChanged ) { // reset rights cache @@ -161,8 +152,8 @@ $session = $wgRequest->getSessionArray(); } - if ( !( $page instanceof \Article ) ) { - $article = new \Article( $page->getTitle() ); + if ( !( $page instanceof Article ) ) { + $article = new Article( $page->getTitle() ); } else { $article = $page; } @@ -186,7 +177,7 @@ /** * Calls the desired action using a fake web request. -* This calls the Show() method on the target action. +* This calls the show() method on the target action. * * @param String|\Action $action the action to call; may be an action name or class name * @param WikiPage $page the wiki page to call the action on @@ -195,14 +186,14 @@ * @param array|null $session optional session data * * @return OutputPage -* @throws \MWException +* @throws MWException */ protected function callAction( $action, WikiPage $page, array $params = null, $post = false, array $session = null ) { if ( is_string( $action ) ) { $action = $this->createAction( $action, $page, $params, $post, $session ); if ( !$action ) { - throw new \MWException( "unknown action: $action" ); + throw new MWException( "unknown action: $action" ); } } @@ -219,7 +210,7 @@ * * @return String the token */ - protected function getToken( \Title $title, $for = 'edit' ) { + protected function getToken( Title $title, $for = 'edit' ) { $func = '\ApiQueryI
[MediaWiki-commits] [Gerrit] Some more consistency tweaks in preparation for adding exten... - change (mediawiki...GWToolset)
jenkins-bot has submitted this change and it was merged. Change subject: Some more consistency tweaks in preparation for adding extension to translatewiki.net .. Some more consistency tweaks in preparation for adding extension to translatewiki.net * Use default ← arrow. The other was shown in my editor as rectangle * Sprinkle some more * Repair weblinks: ( ) -> [ ] * Some nitpicking Change-Id: Iae05fb09fca3d176d83bbae29e0a19e9786c0475 --- M GWToolset.i18n.php 1 file changed, 11 insertions(+), 11 deletions(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/GWToolset.i18n.php b/GWToolset.i18n.php index 3eb694c..59a2ac4 100644 --- a/GWToolset.i18n.php +++ b/GWToolset.i18n.php @@ -32,7 +32,7 @@ $1", 'gwtoolset-dom-record-issue' => 'record-element-name, or record-count, or record-current not provided.', 'gwtoolset-file-backend-maxage-invalid' => 'The maximum age value provided in $wgGWTFBMaxAge is invalid. -See php.net/manual/en/datetime.formats.relative.php for how to set it correctly.', +See the [php.net/manual/en/datetime.formats.relative.php PHP manual] for how to set it correctly.', 'gwtoolset-fsfile-empty' => 'The file was empty and was deleted.', 'gwtoolset-fsfile-retrieval-failure' => 'The file could not be retrieved from URL $1.', 'gwtoolset-ignorewarnings' => 'ignorewarnings not set.', @@ -81,7 +81,7 @@ 'gwtoolset-no-extension' => 'The file that was uploaded does not contain enough information to process the file. Most likely it has no file extension.', 'gwtoolset-no-file' => 'No file was received.', 'gwtoolset-no-form-field' => 'The expected form field "$1" does not exist.', - 'gwtoolset-over-max-ini' => 'The file that was uploaded exceeds the upload_max_filesize and/or the post_max_size directive in php.ini.', + 'gwtoolset-over-max-ini' => 'The file that was uploaded exceeds the upload_max_filesize and/or the post_max_size directive in php.ini.', 'gwtoolset-partial-upload' => 'The file was only partially uploaded.', 'gwtoolset-php-extension-error' => 'A PHP extension stopped the file upload. PHP does not provide a way to ascertain which extension caused the file upload to stop. Examining the list of loaded extensions with phpinfo() may help.', 'gwtoolset-unaccepted-extension' => 'The file source does not contain an accepted file extension.', @@ -94,7 +94,7 @@ /** * general form */ - 'gwtoolset-back-text-link' => '⬅ go back to the form', + 'gwtoolset-back-text-link' => '← go back to the form', 'gwtoolset-back-text' => 'Press the browser back button to go back to the form.', 'gwtoolset-file-interpretation-error' => 'There was a problem processing the metadata file', 'gwtoolset-mediawiki-template' => 'Template $1', @@ -184,7 +184,7 @@ 'gwtoolset-category' => 'Category', 'gwtoolset-create-mapping' => '$1: Creating metadata mapping for $2.', 'gwtoolset-example-record' => 'Metadata’s example record’s contents.', - 'gwtoolset-global-categories' => 'Global Categories', + 'gwtoolset-global-categories' => 'Global categories', 'gwtoolset-global-tooltip' => 'These category entries will be applied globally to all uploaded items.', 'gwtoolset-maps-to' => 'Maps to', 'gwtoolset-mapping-media-file-url-extension-bad' => 'The file extension could not be determined from the file URL: $1.', @@ -247,12 +247,12 @@ * wiki checks */ 'gwtoolset-invalid-token' => 'The edit token submitted with the form is invalid.', - 'gwtoolset-maxuploadsize-exceeds-ini-settings' => 'Current PHP .ini settings: + 'gwtoolset-maxuploadsize-exceeds-ini-settings' => 'Current php.ini settings: • upload_max_filesize: $1 • post_max_size: $2 -These are set lower than the wiki\'s $wgMaxUploadSize, which is set at "$3". Please adjust the PHP .ini settings as appropriate.', +These are set lower than the wiki\'s $wgMaxUploadSize, which is set at "$3". Please adjust the php.ini settings as appropriate.', 'gwtoolset-mediawiki-version-invalid' => 'This extension requires MediaWiki version $1This MediaWiki version is $2.', 'gwtoolset-no-upload-by-url' => 'You are not part of a group that has the right to upload by url.', 'gwtoolset-permission-not-given' => 'Make sure that you are logged in or contact an administrator in order to be granted permission to view this page ($1).', @@ -264,13 +264,13 @@ 'gwtoolset-verify-api-writeable' => 'The $1 Extension requires that the wiki API can perform write actions for authorized users. Please make sure that $wgEnableWriteAPI is set to true in the DefaultSettings.php file or is overridden to true in the LocalSettings.php file.', - 'gwtoolset-verify-curl' => 'The $1 Exten
[MediaWiki-commits] [Gerrit] TranslatorSandbox: Avoid showing duplicate message about 'no... - change (mediawiki...Translate)
jenkins-bot has submitted this change and it was merged. Change subject: TranslatorSandbox: Avoid showing duplicate message about 'no translations' .. TranslatorSandbox: Avoid showing duplicate message about 'no translations' Change-Id: I327868b8e605c0045fabd6a5882e2de4ca156e31 --- M resources/js/ext.translate.special.translatesandbox.js 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: KartikMistry: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/js/ext.translate.special.translatesandbox.js b/resources/js/ext.translate.special.translatesandbox.js index de16c78..fd5e271 100644 --- a/resources/js/ext.translate.special.translatesandbox.js +++ b/resources/js/ext.translate.special.translatesandbox.js @@ -203,7 +203,7 @@ // Display a message if the user didn't make any translations if ( !translations.translationstash.translations.length ) { - $target.append( + $target.empty().append( $( '' ) .addClass( 'tsb-details-no-translations' ) .text( mw.msg( 'tsb-didnt-make-any-translations' ) ) -- To view, visit https://gerrit.wikimedia.org/r/100550 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I327868b8e605c0045fabd6a5882e2de4ca156e31 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Santhosh Gerrit-Reviewer: KartikMistry Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update claim indices when saving - change (mediawiki...Wikibase)
Henning Snater has uploaded a new change for review. https://gerrit.wikimedia.org/r/100553 Change subject: Update claim indices when saving .. Update claim indices when saving (bug 58179) Updating the claim indices when saving a claim. This allows proper subsequent interaction with a claim/statement just added to the list of claims/statements. Change-Id: I3d8940d7b34c29e6a89b375a596d6ee057464f32 --- M lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplistview.js M lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js 2 files changed, 56 insertions(+), 29 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/53/100553/1 diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplistview.js b/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplistview.js index 09dd9b9..62e9bc6 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplistview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplistview.js @@ -91,6 +91,8 @@ claimlistviewInstance = lia.liInstance( $claimlistviews.eq( i ) ); listview.move( $claimlistviews.eq( i ), claimlistviewInstance.getInitialIndex() ); } + } else { + self.__updateIndices( !dropValue ); } } ) .on( startEditingEvent, function( event ) { @@ -335,6 +337,42 @@ } return null; + }, + + /** +* Updates the claimlistview indices as well as their claimview indices. +* +* @param {boolean} save +* +* @deprecated See bug #56050 +*/ + __updateIndices: function( save ) { + var index = 0, + listview = this.$listview.data( 'listview' ), + $claimlistviews = listview.items(); + + for( var i = 0; i < $claimlistviews.length; i++ ) { + var claimlistview = listview.listItemAdapter().liInstance( + $claimlistviews.eq( i ) + ); + + var claimlistviewListview = claimlistview.$listview.data( 'listview' ), + $claimviews = claimlistviewListview.items(); + + for( var j = 0; j < $claimviews.length; j++ ) { + if( j === 0 ) { + claimlistview.option( 'firstClaimIndex', index ); + + if( save ) { + claimlistview._initialIndex = index; + } + } + + claimlistview.__updateClaimIndices( save ); + + index++; + } + } } } ); @@ -464,27 +502,7 @@ btnMoveUp[isTopmost ? 'disable' : 'enable' ](); btnMoveDown[isBottommost ? 'disable' : 'enable' ](); - // Update claimview indices: - var index = 0; - - for( var i = 0; i < $claimlistviews.length; i++ ) { - var claimlistviewInstance = claimgrouplistviewListview.listItemAdapter().liInstance( - $claimlistviews.eq( i ) - ); - - var claimlistviewInstanceLv = claimlistviewInstance.$listview.data( 'listview' ), - $claimviewNodes = claimlistviewInstanceLv.items(); - - for( var j = 0; j < $claimviewNodes.length; j++ ) { - var claimviewInstance = claimlistviewInstanceLv.listItemAdapter().liInstance( - $claimviewNodes.eq( j ) - ); - - claimviewInstance.option( 'index', index ); - - index++; - } - } + claimgrouplistview.__updateIndices(); // Stop repeatedly triggering the event on the moved DOM node: event.stopImmediatePropagation(); diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js b/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js index 6ca3d64..a2d809e 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js @@ -181,23 +181,32 @@
[MediaWiki-commits] [Gerrit] Preventing duplicate appearance of elements with translations - change (mediawiki...Translate)
Amire80 has uploaded a new change for review. https://gerrit.wikimedia.org/r/100554 Change subject: Preventing duplicate appearance of elements with translations .. Preventing duplicate appearance of elements with translations A comprehensive follow-up to I327868b8e605c0045fabd6a5882e2de4ca156e31 Includes tests. Change-Id: I2c35f3bdd5c3f684623f6ac5bd5420af06279cd6 --- M resources/js/ext.translate.special.translatesandbox.js M tests/browser/features/manage_translator_sandbox.feature M tests/browser/features/step_definitions/manage_translator_sandbox_steps.rb M tests/browser/features/support/pages/manage_translator_sandbox_page.rb 4 files changed, 35 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/54/100554/1 diff --git a/resources/js/ext.translate.special.translatesandbox.js b/resources/js/ext.translate.special.translatesandbox.js index fd5e271..21426d0 100644 --- a/resources/js/ext.translate.special.translatesandbox.js +++ b/resources/js/ext.translate.special.translatesandbox.js @@ -201,9 +201,11 @@ storage.getUserTranslations( request.username ).done( function ( translations ) { var $target = $( '.translations' ); + $target.empty(); + // Display a message if the user didn't make any translations if ( !translations.translationstash.translations.length ) { - $target.empty().append( + $target.append( $( '' ) .addClass( 'tsb-details-no-translations' ) .text( mw.msg( 'tsb-didnt-make-any-translations' ) ) diff --git a/tests/browser/features/manage_translator_sandbox.feature b/tests/browser/features/manage_translator_sandbox.feature index 6d8b205..77765e5 100644 --- a/tests/browser/features/manage_translator_sandbox.feature +++ b/tests/browser/features/manage_translator_sandbox.feature @@ -149,6 +149,27 @@ And I should see the 'Accept' button displayed in the second column And I should see the 'Reject' button displayed in the second column + Scenario: Selecting a second user with translations and deselecting it +Given I am on the Translator sandbox management page with users in the sandbox +When I click on the checkbox near 'Pupu4' in the first column + And I click on the checkbox near 'Pupu4' in the first column +Then I should see the checkbox next to the request from 'Pupu4' unchecked + And I should see the checkbox next to the request from 'Pupu4' enabled + And I should see the checkbox next to the request from 'Orava4' checked + And I should see the checkbox next to the request from 'Orava4' disabled + And I should see the details of 4 sandboxed translations done by the user in the second column + + Scenario: Selecting a second user without translations and deselecting it +Given I am on the Translator sandbox management page with users in the sandbox +When I click on 'Pupu0' in the first column + And I click on the checkbox near 'Orava0' in the first column + And I click on the checkbox near 'Orava0' in the first column +Then I should see the checkbox next to the request from 'Orava0' unchecked + And I should see the checkbox next to the request from 'Orava0' enabled + And I should see the checkbox next to the request from 'Pupu0' checked + And I should see the checkbox next to the request from 'Pupu0' disabled + And I should not see any translations done by the user in the second column + Scenario: Accepting one user Given I am on the Translator sandbox management page with users in the sandbox When I click on 'Pupu2' in the first column diff --git a/tests/browser/features/step_definitions/manage_translator_sandbox_steps.rb b/tests/browser/features/step_definitions/manage_translator_sandbox_steps.rb index a6b69f7..832a87c 100644 --- a/tests/browser/features/step_definitions/manage_translator_sandbox_steps.rb +++ b/tests/browser/features/step_definitions/manage_translator_sandbox_steps.rb @@ -131,8 +131,9 @@ Then(/^I should not see any translations done by the user in the second column$/) do on(ManageTranslatorSandboxPage) do |page| - page.translation_elements.length.should == 0 - page.details_no_translations_element.should be_visible + page.translation_elements.size.should == 0 + page.details_no_translations.size.should == 1 + page.details_no_translations[0].should be_visible end end @@ -141,7 +142,10 @@ end Then(/^I should see the details of (\d+) sandboxed translations done by the user in the second column$/) do |translations| - on
[MediaWiki-commits] [Gerrit] [GWToolset] Register extension - change (translatewiki)
Raimond Spekking has uploaded a new change for review. https://gerrit.wikimedia.org/r/100555 Change subject: [GWToolset] Register extension .. [GWToolset] Register extension Change-Id: I815f2953044239110b32f25ae55e9a7afaa37282 --- M groups/MediaWiki/mediawiki-defines.txt 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/55/100555/1 diff --git a/groups/MediaWiki/mediawiki-defines.txt b/groups/MediaWiki/mediawiki-defines.txt index f58b77f..5c35214 100644 --- a/groups/MediaWiki/mediawiki-defines.txt +++ b/groups/MediaWiki/mediawiki-defines.txt @@ -672,6 +672,10 @@ Guided Tour optional = guidedtour-custom.css, guidedtour-tour-test-wikitext-description +GW Toolset +aliasfile = GWToolset/GWToolset.alias.php +ignored = gwtoolset-menu + Hanp Hash Tables -- To view, visit https://gerrit.wikimedia.org/r/100555 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I815f2953044239110b32f25ae55e9a7afaa37282 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Raimond Spekking ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [GWToolset] Register extension - change (translatewiki)
Raimond Spekking has submitted this change and it was merged. Change subject: [GWToolset] Register extension .. [GWToolset] Register extension Change-Id: I815f2953044239110b32f25ae55e9a7afaa37282 --- M groups/MediaWiki/mediawiki-defines.txt 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Raimond Spekking: Verified; Looks good to me, approved diff --git a/groups/MediaWiki/mediawiki-defines.txt b/groups/MediaWiki/mediawiki-defines.txt index f58b77f..5c35214 100644 --- a/groups/MediaWiki/mediawiki-defines.txt +++ b/groups/MediaWiki/mediawiki-defines.txt @@ -672,6 +672,10 @@ Guided Tour optional = guidedtour-custom.css, guidedtour-tour-test-wikitext-description +GW Toolset +aliasfile = GWToolset/GWToolset.alias.php +ignored = gwtoolset-menu + Hanp Hash Tables -- To view, visit https://gerrit.wikimedia.org/r/100555 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I815f2953044239110b32f25ae55e9a7afaa37282 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Raimond Spekking Gerrit-Reviewer: Raimond Spekking Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Clean up to sandbox logging - change (mediawiki...Translate)
jenkins-bot has submitted this change and it was merged. Change subject: Clean up to sandbox logging .. Clean up to sandbox logging * Avoid using /*, might cause problems with WebAPI * Move logging out of try catch * Add gender to promoted log entry * Remove link to user page on rejected log entry * Add user creation log entry after admin log entry Change-Id: I4e7eb4a438591ab57a469d5ec8cc573425d199e8 --- M Translate.php M TranslateSandbox.i18n.php M api/ApiTranslateSandbox.php M utils/TranslateLogFormatter.php 4 files changed, 18 insertions(+), 13 deletions(-) Approvals: Amire80: Looks good to me, approved jenkins-bot: Verified diff --git a/Translate.php b/Translate.php index a86e698..1bfb75a 100644 --- a/Translate.php +++ b/Translate.php @@ -211,7 +211,8 @@ $wgLogActionsHandlers['translationreview/group'] = 'TranslateLogFormatter'; $wgLogTypes[] = 'translatorsandbox'; -$wgLogActionsHandlers['translatorsandbox/*'] = 'LogFormatter'; +$wgLogActionsHandlers['translatorsandbox/promoted'] = 'TranslateLogFormatter'; +$wgLogActionsHandlers['translatorsandbox/rejected'] = 'TranslateLogFormatter'; // New jobs $wgJobClasses['MessageIndexRebuildJob'] = 'MessageIndexRebuildJob'; diff --git a/TranslateSandbox.i18n.php b/TranslateSandbox.i18n.php index c3b7f8f..d01deb9 100644 --- a/TranslateSandbox.i18n.php +++ b/TranslateSandbox.i18n.php @@ -58,7 +58,7 @@ 'log-name-translatorsandbox' => 'Translation sandbox', 'log-description-translatorsandbox' => 'A log of actions on translation sandbox users', - 'logentry-translatorsandbox-promoted' => '$1 {{GENDER:$2|promoted}} $3 to translator', + 'logentry-translatorsandbox-promoted' => '$1 {{GENDER:$2|promoted}} $3 to {{GENDER:$4|translator}}', 'logentry-translatorsandbox-rejected' => '$1 {{GENDER:$2|rejected}} the request from $3 to become a translator', ); diff --git a/api/ApiTranslateSandbox.php b/api/ApiTranslateSandbox.php index 52763a6..12c6b8b 100644 --- a/api/ApiTranslateSandbox.php +++ b/api/ApiTranslateSandbox.php @@ -84,21 +84,19 @@ foreach ( $params['userid'] as $user ) { $user = User::newFromId( $user ); + $userpage = $user->getUserPage(); try { - $logEntry = new ManualLogEntry( 'translatorsandbox', 'rejected' ); - $logEntry->setPerformer( $this->getUser() ); - $logEntry->setTarget( $user->getUserPage() ); - $logEntry->setParameters( array( - '4::userid' => $user->getId(), - ) ); - $logid = $logEntry->insert(); - $logEntry->publish( $logid ); - TranslateSandbox::deleteUser( $user ); } catch ( MWException $e ) { $this->dieUsage( $e->getMessage(), 'invalidparam' ); } + + $logEntry = new ManualLogEntry( 'translatorsandbox', 'rejected' ); + $logEntry->setPerformer( $this->getUser() ); + $logEntry->setTarget( $userpage ); + $logid = $logEntry->insert(); + $logEntry->publish( $logid ); } } @@ -118,8 +116,6 @@ $this->dieUsage( $e->getMessage(), 'invalidparam' ); } - $user->addNewUserLogEntry( 'create', $this->msg( 'tsb-promoted-from-sandbox' )->text() ); - $logEntry = new ManualLogEntry( 'translatorsandbox', 'promoted' ); $logEntry->setPerformer( $this->getUser() ); $logEntry->setTarget( $user->getUserPage() ); @@ -128,6 +124,8 @@ ) ); $logid = $logEntry->insert(); $logEntry->publish( $logid ); + + $user->addNewUserLogEntry( 'create', $this->msg( 'tsb-promoted-from-sandbox' )->text() ); } } diff --git a/utils/TranslateLogFormatter.php b/utils/TranslateLogFormatter.php index 5f0dbf0..019d6c5 100644 --- a/utils/TranslateLogFormatter.php +++ b/utils/TranslateLogFormatter.php @@ -46,6 +46,12 @@ $params[3] = TranslateUtils::getLanguageName( $language, $uiLanguage->getCode() ); $params[5] = $this->formatStateMessage( $params[5] ); $params[6] = $this->formatStateMessage( $params[6] ); + } elseif ( $type === 'translatorsandbox/rejected' ) { + // No point linking to the user page which cannot have existed + $params[2] = $this->entry->getTarget()->getText(); +
[MediaWiki-commits] [Gerrit] Canonicalize text and update docs of messages using 'loginre... - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Canonicalize text and update docs of messages using 'loginreqlink' .. Canonicalize text and update docs of messages using 'loginreqlink' Since 'loginreqlink' is being used as a part of patchwork messages we should try to keep the grammar the same in all of its uses. "You have to log in" / "You must log in" / "Please log in" were all used with various frequencies; I changed (hopefully) all uses to "Please log in". Two messages receiving 'loginreqlink' as a parameter do not currently use it: 'changeemail-no-info' and 'resetpass-no-info'. This is intentional, as they are less "positive" than the rest and thus should not link to the login form. Updated and cross-referenced qqq of 'loginreqlink' and messages using it. Change-Id: Ie245486051d6fbc72a596ba825bfd5d9e3a163bf --- M languages/messages/MessagesEn.php M languages/messages/MessagesQqq.php 2 files changed, 22 insertions(+), 10 deletions(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 4894bf5..b634765 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -1421,7 +1421,7 @@ Your current IP address is $3, and the block ID is #$5. Please include all above details in any queries you make.", 'blockednoreason' => 'no reason given', -'whitelistedittext'=> 'You have to $1 to edit pages.', +'whitelistedittext'=> 'Please $1 to edit pages.', 'confirmedittext' => 'You must confirm your email address before editing pages. Please set and validate your email address through your [[Special:Preferences|user preferences]].', 'nosuchsectiontitle' => 'Cannot find section', @@ -1429,7 +1429,7 @@ It may have been moved or deleted while you were viewing the page.', 'loginreqtitle'=> 'Login required', 'loginreqlink' => 'log in', -'loginreqpagetext' => 'You must $1 to view other pages.', +'loginreqpagetext' => 'Please $1 to view other pages.', 'accmailtitle' => 'Password sent', 'accmailtext' => "A randomly generated password for [[User talk:$1|$1]] has been sent to $2. It can be changed on the ''[[Special:ChangePassword|change password]]'' page upon logging in.", 'newarticle' => '(New)', @@ -1878,7 +1878,7 @@ 'preferences-summary' => '', # do not translate or duplicate this message to other languages 'mypreferences' => 'Preferences', 'prefs-edits' => 'Number of edits:', -'prefsnologintext2' => 'Please $1 to set user preferences.', +'prefsnologintext2' => 'Please $1 to change your preferences.', 'prefs-skin'=> 'Skin', 'skin-preview' => 'Preview', 'datedefault' => 'No preference', @@ -2231,7 +2231,7 @@ 'reuploaddesc'=> 'Cancel upload and return to the upload form', 'upload-tryagain' => 'Submit modified file description', 'uploadnologin' => 'Not logged in', -'uploadnologintext' => 'You must $1 to upload files.', +'uploadnologintext' => 'Please $1 to upload files.', 'upload_directory_missing'=> 'The upload directory ($1) is missing and could not be created by the webserver.', 'upload_directory_read_only' => 'The upload directory ($1) is not writable by the webserver.', 'uploaderror' => 'Upload error', @@ -4522,7 +4522,7 @@ Mailer returned: $1', 'confirmemail_invalid' => 'Invalid confirmation code. The code may have expired.', -'confirmemail_needlogin'=> 'You need to $1 to confirm your email address.', +'confirmemail_needlogin'=> 'Please $1 to confirm your email address.', 'confirmemail_success' => 'Your email address has been confirmed. You may now [[Special:UserLogin|log in]] and enjoy the wiki.', 'confirmemail_loggedin' => 'Your email address has now been confirmed.', diff --git a/languages/messages/MessagesQqq.php b/languages/messages/MessagesQqq.php index 483fd25..7909b2f 100644 --- a/languages/messages/MessagesQqq.php +++ b/languages/messages/MessagesQqq.php @@ -1599,7 +1599,10 @@ 'resetpass_submit' => 'Submit button on [[Special:ChangePassword]]', 'changepassword-success' => 'Used in [[Special:ChangePassword]].', 'resetpass_forbidden' => "Used as error message in changing password. Maybe the external auth plugin won't allow local password changes.", -'resetpass-no-info' => 'Error message for [[Special:ChangePassword]].', +'resetpass-no-info' => 'Error message for [[Special:ChangePassword]]. + +Parameters: +* $1 (unused) - a link to [[Special:UserLogin]] with {{msg-mw|loginreqlink}} as link descripti
[MediaWiki-commits] [Gerrit] Documentation for the log entries - change (mediawiki...Translate)
jenkins-bot has submitted this change and it was merged. Change subject: Documentation for the log entries .. Documentation for the log entries Change-Id: Iceff68c468d236c0a1925e4ec94fb6abad009fd2 --- M TranslateSandbox.i18n.php 1 file changed, 6 insertions(+), 0 deletions(-) Approvals: KartikMistry: Looks good to me, approved jenkins-bot: Verified diff --git a/TranslateSandbox.i18n.php b/TranslateSandbox.i18n.php index d01deb9..93b1192 100644 --- a/TranslateSandbox.i18n.php +++ b/TranslateSandbox.i18n.php @@ -119,6 +119,12 @@ 'tsb-limit-reached-title' => 'Heading shown below translations when the user has reached the limit for number of translations.', 'tsb-limit-reached-body' => 'Text shown below translations when the user has reached the limit for number of translations.', 'tsb-no-requests-from-new-users' => 'Shown on [[Special:TranslateSandbox]] when there are no requests for approval from new users.', + + 'log-name-translatorsandbox' => '{{doc-logpage}}', + 'log-description-translatorsandbox' => 'Log page description', + 'logentry-translatorsandbox-promoted' => '{{logentry}} +* $4 - The name of the user that was promoted, can be used for GENDER.', + 'logentry-translatorsandbox-rejected' => '{{logentry}}', ); /** Afrikaans (Afrikaans) -- To view, visit https://gerrit.wikimedia.org/r/100543 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iceff68c468d236c0a1925e4ec94fb6abad009fd2 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Amire80 Gerrit-Reviewer: KartikMistry Gerrit-Reviewer: Nikerabbit Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Restore compatibility with curl < 7.16.2 - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Restore compatibility with curl < 7.16.2 .. Restore compatibility with curl < 7.16.2 Follows-up 58f71c7e9eca, which assumed that the CURLOPT_CONNECTTIMEOUT_MS constant was defined. Bug: 58178 Change-Id: Id31a3ec56e4c7cac7d3edb2653c87be467d1a471 (cherry picked from commit 33bc02fad1b73a06e402ea0d19d951b60ca30256) --- M includes/HttpFunctions.php 1 file changed, 6 insertions(+), 1 deletion(-) Approvals: MarkAHershberger: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/HttpFunctions.php b/includes/HttpFunctions.php index 78c2ac7..fa2fc12 100644 --- a/includes/HttpFunctions.php +++ b/includes/HttpFunctions.php @@ -730,7 +730,12 @@ $this->curlOptions[CURLOPT_PROXY] = $this->proxy; $this->curlOptions[CURLOPT_TIMEOUT] = $this->timeout; - $this->curlOptions[CURLOPT_CONNECTTIMEOUT_MS] = $this->connectTimeout * 1000; + + // Only supported in curl >= 7.16.2 + if ( defined( 'CURLOPT_CONNECTTIMEOUT_MS' ) ) { + $this->curlOptions[CURLOPT_CONNECTTIMEOUT_MS] = $this->connectTimeout * 1000; + } + $this->curlOptions[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_1_0; $this->curlOptions[CURLOPT_WRITEFUNCTION] = $this->callback; $this->curlOptions[CURLOPT_HEADERFUNCTION] = array( $this, "readHeader" ); -- To view, visit https://gerrit.wikimedia.org/r/100556 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id31a3ec56e4c7cac7d3edb2653c87be467d1a471 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: REL1_22 Gerrit-Owner: MarkAHershberger Gerrit-Reviewer: MarkAHershberger Gerrit-Reviewer: PleaseStand Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update gitignore after test files moved - change (mediawiki...Wikibase)
Tobias Gritschacher has uploaded a new change for review. https://gerrit.wikimedia.org/r/100557 Change subject: Update gitignore after test files moved .. Update gitignore after test files moved Change-Id: I363036eb646d910acf94d5e96097c0dea2bc06ef --- M .gitignore 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/57/100557/1 diff --git a/.gitignore b/.gitignore index f279a81..984f5ca 100644 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,4 @@ !.* -selenium_cuc/.idea +tests/browser/.idea -- To view, visit https://gerrit.wikimedia.org/r/100557 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I363036eb646d910acf94d5e96097c0dea2bc06ef Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Tobias Gritschacher ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update gitignore after test files moved - change (mediawiki...Wikibase)
Addshore has submitted this change and it was merged. Change subject: Update gitignore after test files moved .. Update gitignore after test files moved Change-Id: I363036eb646d910acf94d5e96097c0dea2bc06ef --- M .gitignore 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Addshore: Looks good to me, approved jenkins-bot: Verified diff --git a/.gitignore b/.gitignore index f279a81..984f5ca 100644 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,4 @@ !.* -selenium_cuc/.idea +tests/browser/.idea -- To view, visit https://gerrit.wikimedia.org/r/100557 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I363036eb646d910acf94d5e96097c0dea2bc06ef Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Tobias Gritschacher Gerrit-Reviewer: Addshore Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [PerPageLicense] Register extension - change (translatewiki)
Raimond Spekking has uploaded a new change for review. https://gerrit.wikimedia.org/r/100558 Change subject: [PerPageLicense] Register extension .. [PerPageLicense] Register extension Change-Id: Ic211ee9ecf40e68af106cbc7d8bba567211ad71f --- M groups/MediaWiki/mediawiki-defines.txt 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/58/100558/1 diff --git a/groups/MediaWiki/mediawiki-defines.txt b/groups/MediaWiki/mediawiki-defines.txt index 5c35214..8ebed78 100644 --- a/groups/MediaWiki/mediawiki-defines.txt +++ b/groups/MediaWiki/mediawiki-defines.txt @@ -1128,6 +1128,8 @@ Pdf Handler descmsg = pdf-desc +Per Page License + Persona Phalanx -- To view, visit https://gerrit.wikimedia.org/r/100558 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic211ee9ecf40e68af106cbc7d8bba567211ad71f Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Raimond Spekking ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [PerPageLicense] Register extension - change (translatewiki)
Raimond Spekking has submitted this change and it was merged. Change subject: [PerPageLicense] Register extension .. [PerPageLicense] Register extension Change-Id: Ic211ee9ecf40e68af106cbc7d8bba567211ad71f --- M groups/MediaWiki/mediawiki-defines.txt 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Raimond Spekking: Verified; Looks good to me, approved diff --git a/groups/MediaWiki/mediawiki-defines.txt b/groups/MediaWiki/mediawiki-defines.txt index 5c35214..8ebed78 100644 --- a/groups/MediaWiki/mediawiki-defines.txt +++ b/groups/MediaWiki/mediawiki-defines.txt @@ -1128,6 +1128,8 @@ Pdf Handler descmsg = pdf-desc +Per Page License + Persona Phalanx -- To view, visit https://gerrit.wikimedia.org/r/100558 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic211ee9ecf40e68af106cbc7d8bba567211ad71f Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Raimond Spekking Gerrit-Reviewer: Raimond Spekking ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Attempt to fix problems noted in phpcs: https://integration.... - change (mediawiki/core)
MarkAHershberger has uploaded a new change for review. https://gerrit.wikimedia.org/r/100559 Change subject: Attempt to fix problems noted in phpcs: https://integration.wikimedia.org/ci/job/mediawiki-core-regression-phpcs-HEAD/3256/console .. Attempt to fix problems noted in phpcs: https://integration.wikimedia.org/ci/job/mediawiki-core-regression-phpcs-HEAD/3256/console Change-Id: If1272366fa242ccdf1191ba1686f2d1cdf046872 --- M includes/HttpFunctions.php 1 file changed, 16 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/59/100559/1 diff --git a/includes/HttpFunctions.php b/includes/HttpFunctions.php index 6fcb7ce..88f4ee9 100644 --- a/includes/HttpFunctions.php +++ b/includes/HttpFunctions.php @@ -30,7 +30,7 @@ * @ingroup HTTP */ class Http { - static $httpEngine = false; + static public $httpEngine = false; /** * Perform an HTTP request @@ -294,8 +294,10 @@ return new CurlHttpRequest( $url, $options ); case 'php': if ( !wfIniGetBool( 'allow_url_fopen' ) ) { - throw new MWException( __METHOD__ . ': allow_url_fopen needs to be enabled for pure PHP' . - ' http requests to work. If possible, curl should be used instead. See http://php.net/curl.' ); + throw new MWException( __METHOD__ . ': allow_url_fopen '. + 'needs to be enabled for pure PHP http requests to '. + 'work. If possible, curl should be used instead. See '. + 'http://php.net/curl.' ); } return new PhpHttpRequest( $url, $options ); default: @@ -642,12 +644,16 @@ /** * Returns the final URL after all redirections. * -* Relative values of the "Location" header are incorrect as stated in RFC, however they do happen and modern browsers support them. -* This function loops backwards through all locations in order to build the proper absolute URI - Marooned at wikia-inc.com +* Relative values of the "Location" header are incorrect as +* stated in RFC, however they do happen and modern browsers +* support them. This function loops backwards through all +* locations in order to build the proper absolute URI - Marooned +* at wikia-inc.com * -* Note that the multiple Location: headers are an artifact of CURL -- they -* shouldn't actually get returned this way. Rewrite this when bug 29232 is -* taken care of (high-level redirect handling rewrite). +* Note that the multiple Location: headers are an artifact of +* CURL -- they shouldn't actually get returned this way. Rewrite +* this when bug 29232 is taken care of (high-level redirect +* handling rewrite). * * @return string */ @@ -678,7 +684,8 @@ } else { $url = parse_url( $this->url ); if ( isset( $url['host'] ) ) { - return $url['scheme'] . '://' . $url['host'] . $locations[$countLocations - 1]; + return $url['scheme'] . '://' . $url['host'] . + $locations[$countLocations - 1]; } } } else { -- To view, visit https://gerrit.wikimedia.org/r/100559 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If1272366fa242ccdf1191ba1686f2d1cdf046872 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: MarkAHershberger ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix invalid covers tags and cleanup - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Fix invalid covers tags and cleanup .. Fix invalid covers tags and cleanup Change-Id: I6a92e64955147eec0067e9bfbf6035bca7b8bc75 --- M repo/tests/phpunit/includes/ChangeOp/ChangeOpClaimTest.php M repo/tests/phpunit/includes/ContentRetrieverTest.php M repo/tests/phpunit/includes/LinkedData/EntityDataUriManagerTest.php M repo/tests/phpunit/includes/specials/SpecialEntityDataTest.php M repo/tests/phpunit/includes/store/sql/PropertyInfoTableBuilderTest.php 5 files changed, 15 insertions(+), 63 deletions(-) Approvals: Addshore: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/tests/phpunit/includes/ChangeOp/ChangeOpClaimTest.php b/repo/tests/phpunit/includes/ChangeOp/ChangeOpClaimTest.php index 7b83e87..b14b971 100644 --- a/repo/tests/phpunit/includes/ChangeOp/ChangeOpClaimTest.php +++ b/repo/tests/phpunit/includes/ChangeOp/ChangeOpClaimTest.php @@ -15,7 +15,7 @@ use Wikibase\SnakObject; /** - * @covers Wikibase\ChangeOp\ChangeOpModifyClaim + * @covers Wikibase\ChangeOp\ChangeOpClaim * * @since 0.4 * diff --git a/repo/tests/phpunit/includes/ContentRetrieverTest.php b/repo/tests/phpunit/includes/ContentRetrieverTest.php index bb159e7..cbe2039 100644 --- a/repo/tests/phpunit/includes/ContentRetrieverTest.php +++ b/repo/tests/phpunit/includes/ContentRetrieverTest.php @@ -1,4 +1,5 @@ diff --git a/repo/tests/phpunit/includes/LinkedData/EntityDataUriManagerTest.php b/repo/tests/phpunit/includes/LinkedData/EntityDataUriManagerTest.php index eac437e..099e9ad 100644 --- a/repo/tests/phpunit/includes/LinkedData/EntityDataUriManagerTest.php +++ b/repo/tests/phpunit/includes/LinkedData/EntityDataUriManagerTest.php @@ -15,28 +15,9 @@ use Wikibase\Property; /** - * @covers \Wikibase\EntityUriManager + * @covers Wikibase\LinkedData\EntityUriManager * - * 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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * http://www.gnu.org/copyleft/gpl.html - * - * @file * @since 0.4 - * - * @ingroup WikibaseRepoTest - * @ingroup Test * * @group Database * ^--- just because Title is a mess diff --git a/repo/tests/phpunit/includes/specials/SpecialEntityDataTest.php b/repo/tests/phpunit/includes/specials/SpecialEntityDataTest.php index 37e3fe8..a2bd268 100644 --- a/repo/tests/phpunit/includes/specials/SpecialEntityDataTest.php +++ b/repo/tests/phpunit/includes/specials/SpecialEntityDataTest.php @@ -6,7 +6,7 @@ use \Wikibase\ItemContent; /** - * @covers SpecialEntityData + * @covers Wikibase\Repo\Specials\SpecialEntityData * * @file * @since 0.4 diff --git a/repo/tests/phpunit/includes/store/sql/PropertyInfoTableBuilderTest.php b/repo/tests/phpunit/includes/store/sql/PropertyInfoTableBuilderTest.php index 429fdfb..751bec4 100644 --- a/repo/tests/phpunit/includes/store/sql/PropertyInfoTableBuilderTest.php +++ b/repo/tests/phpunit/includes/store/sql/PropertyInfoTableBuilderTest.php @@ -1,42 +1,6 @@ http://www.gnu.org/copyleft/gpl.html - * - * @license GPL 2+ - * @file - * - * - * @ingroup WikibaseRepoTest - * @ingroup Test - * - * @group Wikibase - * @group WikibaseStore - * @group WikibasePropertyInfo - * @group Database - * @group medium - * - * @author Daniel Kinzler - */ - namespace Wikibase\Test; - use RuntimeException; use Wikibase\DataModel\Entity\PropertyId; @@ -49,11 +13,17 @@ use Wikibase\WikiPageEntityLookup; /** - * Class PropertyInfoTableBuilderTest + * @covers Wikibase\PropertyInfoTableBuilder * - * @covers PropertyInfoTableBuilder + * @license GPL 2+ * - * @package Wikibase\Test + * @group Wikibase + * @group WikibaseStore + * @group WikibasePropertyInfo + * @group Database + * @group medium + * + * @author Daniel Kinzler */ class PropertyInfoTableBuilderTest extends \MediaWikiTestCase { @@ -152,4 +122,4 @@ $this->assertEquals( 0, $c, "Thre should be nothing left to rebuild" ); } -} \ No newline at end of file +} -- To view, visit https://gerrit.wikimedia.org/r/100175 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6a92e64955147eec0067e9bfbf6035bca7b8bc75 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-O
[MediaWiki-commits] [Gerrit] Fix ChangeLineFormatterTest for non-english - change (mediawiki...Wikibase)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/100560 Change subject: Fix ChangeLineFormatterTest for non-english .. Fix ChangeLineFormatterTest for non-english Change-Id: Ia977f4f21658b5317169e6befb7e0b3bd9486b44 --- M client/tests/phpunit/includes/recentchanges/ChangeLineFormatterTest.php 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/60/100560/1 diff --git a/client/tests/phpunit/includes/recentchanges/ChangeLineFormatterTest.php b/client/tests/phpunit/includes/recentchanges/ChangeLineFormatterTest.php index 3c8de2f..7d2364a 100644 --- a/client/tests/phpunit/includes/recentchanges/ChangeLineFormatterTest.php +++ b/client/tests/phpunit/includes/recentchanges/ChangeLineFormatterTest.php @@ -4,6 +4,7 @@ use ChangesList; use ContentHandler; +use Language; use RecentChange; use RequestContext; use Title; @@ -36,7 +37,7 @@ // these are required because Linker is used in ChangeLineFormatter // @todo eliminate Linker or at least use of Linker in Wikibase :) $this->setMwGlobals( array( - 'wgLanguageCode' => 'en', + 'wgLang' => Language::factory( 'en' ), 'wgScriptPath' => '', 'wgScript' => '/index.php', 'wgArticlePath' => '/wiki/$1' -- To view, visit https://gerrit.wikimedia.org/r/100560 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia977f4f21658b5317169e6befb7e0b3bd9486b44 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Aude ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Attempt to fix problems noted in phpcs. - change (mediawiki/core)
MarkAHershberger has uploaded a new change for review. https://gerrit.wikimedia.org/r/100561 Change subject: Attempt to fix problems noted in phpcs. .. Attempt to fix problems noted in phpcs. Seen at https://integration.wikimedia.org/ci/job/mediawiki-core-phpcs-strict-HEAD/4724/console Change-Id: I1bcec887849f726cf0015a3a3a44bfc1f797658c --- M includes/DefaultSettings.php 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/61/100561/1 diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 40f943f..74efa56 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -937,7 +937,8 @@ 'ImageMagick' => '$path/convert -background white -thumbnail $widthx$height\! $input PNG:$output', 'sodipodi' => '$path/sodipodi -z -w $width -f $input -e $output', 'inkscape' => '$path/inkscape -z -w $width -f $input -e $output', - 'batik' => 'java -Djava.awt.headless=true -jar $path/batik-rasterizer.jar -w $width -d $output $input', + 'batik' => 'java -Djava.awt.headless=true -jar $path/batik-rasterizer.jar -w $width -d '. + '$output $input', 'rsvg' => '$path/rsvg -w $width -h $height $input $output', 'imgserv' => '$path/imgserv-wrapper -i svg -o png -w$width $input $output', 'ImagickExt' => array( 'SvgHandler::rasterizeImagickExt' ), -- To view, visit https://gerrit.wikimedia.org/r/100561 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1bcec887849f726cf0015a3a3a44bfc1f797658c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: MarkAHershberger ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add tabindex to wpTextbox1 in Page: pages editor - change (mediawiki...ProofreadPage)
Tpt has uploaded a new change for review. https://gerrit.wikimedia.org/r/100562 Change subject: Add tabindex to wpTextbox1 in Page: pages editor .. Add tabindex to wpTextbox1 in Page: pages editor Change-Id: Id38030b1600ca1810b310796e117adc8f0104d80 --- M includes/page/EditProofreadPagePage.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ProofreadPage refs/changes/62/100562/1 diff --git a/includes/page/EditProofreadPagePage.php b/includes/page/EditProofreadPagePage.php index b83994e..997bb6a 100644 --- a/includes/page/EditProofreadPagePage.php +++ b/includes/page/EditProofreadPagePage.php @@ -138,7 +138,7 @@ 'prp-page-edit-body', 'proofreadpage_body', $content->getBody()->serialize(), - $inputAttributes + $inputAttributes + array( 'tabindex' => '1' ) ); $this->showEditArea( 'wpFooterTextbox', -- To view, visit https://gerrit.wikimedia.org/r/100562 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id38030b1600ca1810b310796e117adc8f0104d80 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ProofreadPage Gerrit-Branch: master Gerrit-Owner: Tpt ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] (bug 47070) check content model namespace on import. - change (mediawiki/core)
Daniel Kinzler has uploaded a new change for review. https://gerrit.wikimedia.org/r/100563 Change subject: (bug 47070) check content model namespace on import. .. (bug 47070) check content model namespace on import. When importing, we need to check that the kind of content we are about to import is actually allowed in the specified location on the local wiki. This change does two things: * Introduce the ContentModelCanBeUsedOn hook which provides control over which kind of content can be used where. * Introduce a check against ContentHandler::canBeUsedOn in the importer, along with an appropriate error message. Change-Id: Ia2ff0b0474f4727c9ebbba3c0a2a111495055f61 --- M docs/hooks.txt M includes/Import.php M includes/content/ContentHandler.php M languages/messages/MessagesEn.php M languages/messages/MessagesQqq.php 5 files changed, 41 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/63/100563/1 diff --git a/docs/hooks.txt b/docs/hooks.txt index e3387b5..dbeaa6e 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -830,6 +830,15 @@ $modeName: the requested content model name &$handler: set this to a ContentHandler object, if desired. +'ContentModelCanBeUsedOn': Called to determine whether that content model can +be used on a given page. This is especially useful to prevent some content models +to be used in some special location. +$contentModel: ID of the content model in question +$title: the Title in question. +&$ok: Output parameter, whether it is OK to use $contentModel on $title. +Handler functions that modify $ok should generally return false to prevent further +hooks from further modifying $ok. + 'ConvertContent': Called by AbstractContent::convert when a conversion to another content model is requested. $content: The Content object to be converted. diff --git a/includes/Import.php b/includes/Import.php index 8b7af02..2770e47 100644 --- a/includes/Import.php +++ b/includes/Import.php @@ -252,6 +252,16 @@ * @return bool */ public function importRevision( $revision ) { + if ( !$revision->getContent()->getContentHandler()->canBeUsedOn( $revision->getTitle() ) ) { + $this->notice( 'import-error-bad-location', + $revision->getTitle()->getPrefixedText(), + $revision->getID(), + $revision->getModel(), + $revision->getFormat() ); + + return false; + } + try { $dbw = wfGetDB( DB_MASTER ); return $dbw->deadlockLoop( array( $revision, 'importOldRevision' ) ); @@ -262,6 +272,8 @@ $revision->getModel(), $revision->getFormat() ); } + + return false; } /** diff --git a/includes/content/ContentHandler.php b/includes/content/ContentHandler.php index 1abe1fa..200d453 100644 --- a/includes/content/ContentHandler.php +++ b/includes/content/ContentHandler.php @@ -677,12 +677,19 @@ * typically based on the namespace or some other aspect of the title, such as a special suffix * (e.g. ".svg" for SVG content). * +* @note: this calls the ContentHandlerCanBeUsedOn hook which may be used to override which +* content model can be used where. +* * @param Title $title the page's title. * * @return bool true if content of this kind can be used on the given page, false otherwise. */ public function canBeUsedOn( Title $title ) { - return true; + $ok = true; + + wfRunHooks( 'ContentModelCanBeUsedOn', array( $this->getModelID(), $title, &$ok ) ); + + return $ok; } /** diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 4ec3ee8..5759cf8 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -3606,6 +3606,7 @@ 'import-error-special' => 'Page "$1" is not imported because it belongs to a special namespace that does not allow pages.', 'import-error-invalid' => 'Page "$1" is not imported because its name is invalid.', 'import-error-unserialize' => 'Revision $2 of page "$1" could not be unserialized. The revision was reported to use content model $3 serialized as $4.', +'import-error-bad-location' => 'Revision $2 using content model $3 can not be stored on "$1" on this wiki, since that model is not supported on that page.', 'import-options-wrong' => 'Wrong {{PLURAL:$2|option|options}}: $1', 'import-rootpage-invalid'=> 'Given root page is an invalid title.', 'import-rootpage-nosubpage' => 'Namespace "$1" of the root page does not all
[MediaWiki-commits] [Gerrit] i18n: consistency tweaks - change (mediawiki...GWToolset)
Shirayuki has uploaded a new change for review. https://gerrit.wikimedia.org/r/100564 Change subject: i18n: consistency tweaks .. i18n: consistency tweaks Change-Id: Ia838513dc21ec01c4a753970547b99256fe1bfa7 --- M GWToolset.i18n.php 1 file changed, 12 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GWToolset refs/changes/64/100564/1 diff --git a/GWToolset.i18n.php b/GWToolset.i18n.php index 59a2ac4..bfe4d72 100644 --- a/GWToolset.i18n.php +++ b/GWToolset.i18n.php @@ -134,7 +134,7 @@ * step 1 - metadata detect */ 'gwtoolset-accepted-file-types' => 'Accepted file {{PLURAL:$1|type|types}}:', - 'gwtoolset-ensure-well-formed-xml' => 'Make sure the XML File is well-formed with this $1.', + 'gwtoolset-ensure-well-formed-xml' => 'Make sure the XML file is well-formed with this $1.', 'gwtoolset-file-url-invalid' => 'The file URL was invalid; The file does not yet exist in the wiki. You need to first upload the file from your computer if you want to use the file URL reference in the form.', 'gwtoolset-mediawiki-template-does-not-exist' => 'MediaWiki template "$1" does not exist in the wiki. @@ -144,7 +144,7 @@ 'gwtoolset-metadata-file-source-info' => '... either a file that has been previously uploaded or a file you wish to upload from your computer.', 'gwtoolset-metadata-file-url' => 'Metadata file wiki URL:', 'gwtoolset-metadata-file-upload' => 'Metadata file upload:', - 'gwtoolset-metadata-mapping-bad' => 'There’s a problem with the metadata mapping. Most likely the JSON format is invalid. Try and correct the issue and then submit the form again. + 'gwtoolset-metadata-mapping-bad' => 'There\'s a problem with the metadata mapping. Most likely the JSON format is invalid. Try and correct the issue and then submit the form again. $1.', 'gwtoolset-metadata-mapping-invalid-url' => 'The metadata mapping URL supplied, does not match the expect mapping URL path. @@ -167,7 +167,7 @@ 'gwtoolset-step-1-instructions-2' => 'In this step, you upload a new metadata file to the wiki. The tool will attempt to extract the metadata fields available in the metadata file, which you will then map to a MediaWiki template in "{{int:gwtoolset-step-2-heading}}". Domain whitelist -If you haven’t already done so, please [http://ur1.ca/g600j request] that your media file domain be added to the commons.wikipedia.com upload from URL whitelist. The whitelist allows commons.wikipedia.com access to your media file domain. The best example is to submit an actual URL to a media file.', +If you have not already done so, please [http://ur1.ca/g600j request] that your media file domain be added to the commons.wikipedia.com upload from URL whitelist. The whitelist allows commons.wikipedia.com access to your media file domain. The best example is to submit an actual URL to a media file.', 'gwtoolset-step-1-instructions-li-1' => 'Metadata detection', 'gwtoolset-step-1-instructions-li-2' => 'Metadata mapping', 'gwtoolset-step-1-instructions-li-3' => 'Batch preview', @@ -183,7 +183,7 @@ 'gwtoolset-categories' => 'Enter categories separated by a pipe character ("|")', 'gwtoolset-category' => 'Category', 'gwtoolset-create-mapping' => '$1: Creating metadata mapping for $2.', - 'gwtoolset-example-record' => 'Metadata’s example record’s contents.', + 'gwtoolset-example-record' => 'Metadata\'s example record\'s contents.', 'gwtoolset-global-categories' => 'Global categories', 'gwtoolset-global-tooltip' => 'These category entries will be applied globally to all uploaded items.', 'gwtoolset-maps-to' => 'Maps to', @@ -197,7 +197,7 @@ 'gwtoolset-no-more-records' => "No more records to process", 'gwtoolset-painted-by' => 'Painted by', 'gwtoolset-partner' => 'Partner', - 'gwtoolset-partner-explanation' => 'Partner templates are pulled into the source field of the MediaWiki template when provided. You can find a list of current Partner Templates on the Category:Source templates page; see link below. Once you’ve found the partner template you wish to use place the URL to it in this field. You can also create a new partner template if necessary.', + 'gwtoolset-partner-explanation' => 'Partner templates are pulled into the source field of the MediaWiki template when provided. You can find a list of current partner templates on the Category:Source templates page; see link below. Once you have found the partner template you wish to use place the URL to it in this field. You can also create a new partner template if necessary.', 'gwtoolset-partner-template' => 'Partner template:', 'gwtoolset-phrasing' => 'Phrasing', 'gwtoolset-preview' => 'Preview batch', @@
[MediaWiki-commits] [Gerrit] (bug 47070) No import of wikitext to entity NS - change (mediawiki...Wikibase)
Daniel Kinzler has uploaded a new change for review. https://gerrit.wikimedia.org/r/100565 Change subject: (bug 47070) No import of wikitext to entity NS .. (bug 47070) No import of wikitext to entity NS This uses the new ContentModelCanBeUsedOn hook to control which kind of content can be placed in entity namespaces. This should prevent e.g. wikitext to be imported into the main namespace. IMPORTANT: does nothing without Ia2ff0b0474f4727 in core. Change-Id: Id1fe6abf9ea843cf23bf79857673227fc46c178d --- M repo/Wikibase.hooks.php M repo/Wikibase.php M repo/includes/content/EntityHandler.php 3 files changed, 33 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/65/100565/1 diff --git a/repo/Wikibase.hooks.php b/repo/Wikibase.hooks.php index 77ec924..eaedd66 100644 --- a/repo/Wikibase.hooks.php +++ b/repo/Wikibase.hooks.php @@ -1031,4 +1031,32 @@ } return true; } + + /** +* Handler for the ContentModelCanBeUsedOn hook, used to prevent pages of inappropriate type +* to be placed in an entity namespace. +* +* @param string $contentModel +* @param Title $title +* @param bool $ok +* +* @return bool +*/ + public static function onContentModelCanBeUsedOn ( $contentModel, Title $title, &$ok ) { + $namespace2entityModels = array_flip( NamespaceUtils::getEntityNamespaces() ); + $ns = $title->getNamespace(); + + // If the namespace is an entity namespace, the content model + // must be the model assigned to that namespace. + if ( isset( $namespace2entityModels[$ns] ) ) { + $nsModel = $namespace2entityModels[$ns]; + + if ( $nsModel !== $contentModel ) { + $ok = false; + return false; + } + } + + return true; + } } diff --git a/repo/Wikibase.php b/repo/Wikibase.php index 5d78a4e..2c5a203 100644 --- a/repo/Wikibase.php +++ b/repo/Wikibase.php @@ -184,6 +184,7 @@ $wgHooks['TitleGetRestrictionTypes'][] = 'Wikibase\RepoHooks::onTitleGetRestrictionTypes'; $wgHooks['AbuseFilter-contentToString'][] = 'Wikibase\RepoHooks::onAbuseFilterContentToString'; $wgHooks['SpecialPage_reorderPages'][] = 'Wikibase\RepoHooks::onSpecialPage_reorderPages'; + $wgHooks['ContentModelCanBeUsedOn'][] = 'Wikibase\RepoHooks::onContentModelCanBeUsedOn'; // Resource Loader Modules: $wgResourceModules = array_merge( $wgResourceModules, include( __DIR__ . "/resources/Resources.php" ) ); diff --git a/repo/includes/content/EntityHandler.php b/repo/includes/content/EntityHandler.php index 3cbd918..b59d03f 100644 --- a/repo/includes/content/EntityHandler.php +++ b/repo/includes/content/EntityHandler.php @@ -160,6 +160,10 @@ * @return bool true if $title represents a page in the appropriate entity namespace. */ public function canBeUsedOn( Title $title ) { + if ( !parent::canBeUsedOn( $title ) ) { + return false; + } + $namespace = $this->getEntityNamespace(); return $namespace === $title->getNamespace(); } -- To view, visit https://gerrit.wikimedia.org/r/100565 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id1fe6abf9ea843cf23bf79857673227fc46c178d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Daniel Kinzler ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add tabindex to wpTextbox1 in Page: pages editor - change (mediawiki...ProofreadPage)
jenkins-bot has submitted this change and it was merged. Change subject: Add tabindex to wpTextbox1 in Page: pages editor .. Add tabindex to wpTextbox1 in Page: pages editor Change-Id: Id38030b1600ca1810b310796e117adc8f0104d80 --- M includes/page/EditProofreadPagePage.php 1 file changed, 4 insertions(+), 3 deletions(-) Approvals: Phe: Looks good to me, but someone else must approve Tpt: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/page/EditProofreadPagePage.php b/includes/page/EditProofreadPagePage.php index b83994e..e259747 100644 --- a/includes/page/EditProofreadPagePage.php +++ b/includes/page/EditProofreadPagePage.php @@ -131,22 +131,23 @@ 'prp-page-edit-header', 'proofreadpage_header', $content->getHeader()->serialize(), - $inputAttributes + array( 'rows' => '2' ) + $inputAttributes + array( 'rows' => '2', 'tabindex' => '1' ) ); $this->showEditArea( 'wpTextbox1', 'prp-page-edit-body', 'proofreadpage_body', $content->getBody()->serialize(), - $inputAttributes + $inputAttributes + array( 'tabindex' => '1' ) ); $this->showEditArea( 'wpFooterTextbox', 'prp-page-edit-footer', 'proofreadpage_footer', $content->getFooter()->serialize(), - $inputAttributes + array( 'rows' => '2' ) + $inputAttributes + array( 'rows' => '2', 'tabindex' => '1' ) ); + //the 3 textarea tabindex are set to 1 because summary tabindex is 1 too $out->addHTML( $this->pagePage->getPageContainerEnd() ); $out->addModules( 'ext.proofreadpage.page.edit' ); -- To view, visit https://gerrit.wikimedia.org/r/100562 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id38030b1600ca1810b310796e117adc8f0104d80 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/ProofreadPage Gerrit-Branch: master Gerrit-Owner: Tpt Gerrit-Reviewer: Phe Gerrit-Reviewer: Tpt Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update ProofreadPage to master - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Update ProofreadPage to master .. Update ProofreadPage to master Change-Id: Id59ddba0ab662444eaf26ec7da64dc9886e8b709 --- M extensions/ProofreadPage 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/extensions/ProofreadPage b/extensions/ProofreadPage index 7f886e8..3b55cd8 16 --- a/extensions/ProofreadPage +++ b/extensions/ProofreadPage -Subproject commit 7f886e8d6d95e7a4eafed665c901c805d623b18d +Subproject commit 3b55cd8fcd43423f35e8b3bcb7f99141fe4442e4 -- To view, visit https://gerrit.wikimedia.org/r/100408 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id59ddba0ab662444eaf26ec7da64dc9886e8b709 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.23wmf6 Gerrit-Owner: Tpt Gerrit-Reviewer: Hashar Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add basic readme - change (mediawiki...Wikidata)
jenkins-bot has submitted this change and it was merged. Change subject: Add basic readme .. Add basic readme Change-Id: I2b633bf6246c4f38a9a1b00badf2e57aa1543e02 --- A README.md 1 file changed, 37 insertions(+), 0 deletions(-) Approvals: Aude: Looks good to me, approved jenkins-bot: Verified diff --git a/README.md b/README.md new file mode 100644 index 000..5aa4f2b --- /dev/null +++ b/README.md @@ -0,0 +1,37 @@ +Wikidata 'Build' Git Repository += + +This git repo contains everything you need to deploy Wikidata (Wikibase and all of its dependencies). This repository uses git sumbodules to pull in dependencies. + +## Installation + + - Pull the Git Repository + - Run 'git submodule update' + +Add the following line to your LocalSettings.php +```php +require_once("$IP/extensions/Wikidata/Wikidata.php"); +``` +This entry point in turn loads all other entry points + +## Configuration + +Wikibase itself needs to be configured, see the below links + + - https://www.mediawiki.org/wiki/Extension:Wikibase_Repository + - https://www.mediawiki.org/wiki/Extension:Wikibase_Client + +Using this repo provides extra options to allow you to choose to deploy the Repo and/or Client. + +```php +// Load the Repo Extension (default false) +$wmgUseWikibaseRepo = true; +// Load the Client Extension (default false) +$wmgUseWikibaseClient = true; +``` + +## Maintanence Scripts + +The Maintanence scripts help within this repo will not work if you do not have the environment variable **MW_INSTALL_PATH** defined. + +If you do not and can not define this variable please use the **runScript.php** maintanence script within mediawiki core (see comments in that file for instructions) -- To view, visit https://gerrit.wikimedia.org/r/95387 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2b633bf6246c4f38a9a1b00badf2e57aa1543e02 Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/Wikidata Gerrit-Branch: master Gerrit-Owner: Addshore Gerrit-Reviewer: Addshore Gerrit-Reviewer: Aude Gerrit-Reviewer: Daniel Kinzler Gerrit-Reviewer: Jeroen De Dauw Gerrit-Reviewer: Lydia Pintscher 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] Update claim indices when saving - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Update claim indices when saving .. Update claim indices when saving (bug 58179) Updating the claim indices when saving a claim. This allows proper subsequent interaction with a claim/statement just added to the list of claims/statements. Change-Id: I3d8940d7b34c29e6a89b375a596d6ee057464f32 --- M lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplistview.js M lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js 2 files changed, 56 insertions(+), 29 deletions(-) Approvals: Tobias Gritschacher: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplistview.js b/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplistview.js index 09dd9b9..62e9bc6 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplistview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplistview.js @@ -91,6 +91,8 @@ claimlistviewInstance = lia.liInstance( $claimlistviews.eq( i ) ); listview.move( $claimlistviews.eq( i ), claimlistviewInstance.getInitialIndex() ); } + } else { + self.__updateIndices( !dropValue ); } } ) .on( startEditingEvent, function( event ) { @@ -335,6 +337,42 @@ } return null; + }, + + /** +* Updates the claimlistview indices as well as their claimview indices. +* +* @param {boolean} save +* +* @deprecated See bug #56050 +*/ + __updateIndices: function( save ) { + var index = 0, + listview = this.$listview.data( 'listview' ), + $claimlistviews = listview.items(); + + for( var i = 0; i < $claimlistviews.length; i++ ) { + var claimlistview = listview.listItemAdapter().liInstance( + $claimlistviews.eq( i ) + ); + + var claimlistviewListview = claimlistview.$listview.data( 'listview' ), + $claimviews = claimlistviewListview.items(); + + for( var j = 0; j < $claimviews.length; j++ ) { + if( j === 0 ) { + claimlistview.option( 'firstClaimIndex', index ); + + if( save ) { + claimlistview._initialIndex = index; + } + } + + claimlistview.__updateClaimIndices( save ); + + index++; + } + } } } ); @@ -464,27 +502,7 @@ btnMoveUp[isTopmost ? 'disable' : 'enable' ](); btnMoveDown[isBottommost ? 'disable' : 'enable' ](); - // Update claimview indices: - var index = 0; - - for( var i = 0; i < $claimlistviews.length; i++ ) { - var claimlistviewInstance = claimgrouplistviewListview.listItemAdapter().liInstance( - $claimlistviews.eq( i ) - ); - - var claimlistviewInstanceLv = claimlistviewInstance.$listview.data( 'listview' ), - $claimviewNodes = claimlistviewInstanceLv.items(); - - for( var j = 0; j < $claimviewNodes.length; j++ ) { - var claimviewInstance = claimlistviewInstanceLv.listItemAdapter().liInstance( - $claimviewNodes.eq( j ) - ); - - claimviewInstance.option( 'index', index ); - - index++; - } - } + claimgrouplistview.__updateIndices(); // Stop repeatedly triggering the event on the moved DOM node: event.stopImmediatePropagation(); diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js b/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js index 6ca3d64..a2d809e 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js @@ -181,23 +181,32 @@ value: claims || null } )
[MediaWiki-commits] [Gerrit] Preventing duplicate appearance of elements with translations - change (mediawiki...Translate)
jenkins-bot has submitted this change and it was merged. Change subject: Preventing duplicate appearance of elements with translations .. Preventing duplicate appearance of elements with translations A comprehensive follow-up to I327868b8e605c0045fabd6a5882e2de4ca156e31 Includes tests. Change-Id: I2c35f3bdd5c3f684623f6ac5bd5420af06279cd6 --- M resources/js/ext.translate.special.translatesandbox.js M tests/browser/features/manage_translator_sandbox.feature M tests/browser/features/step_definitions/manage_translator_sandbox_steps.rb M tests/browser/features/support/pages/manage_translator_sandbox_page.rb 4 files changed, 35 insertions(+), 6 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/js/ext.translate.special.translatesandbox.js b/resources/js/ext.translate.special.translatesandbox.js index fd5e271..21426d0 100644 --- a/resources/js/ext.translate.special.translatesandbox.js +++ b/resources/js/ext.translate.special.translatesandbox.js @@ -201,9 +201,11 @@ storage.getUserTranslations( request.username ).done( function ( translations ) { var $target = $( '.translations' ); + $target.empty(); + // Display a message if the user didn't make any translations if ( !translations.translationstash.translations.length ) { - $target.empty().append( + $target.append( $( '' ) .addClass( 'tsb-details-no-translations' ) .text( mw.msg( 'tsb-didnt-make-any-translations' ) ) diff --git a/tests/browser/features/manage_translator_sandbox.feature b/tests/browser/features/manage_translator_sandbox.feature index 6d8b205..77765e5 100644 --- a/tests/browser/features/manage_translator_sandbox.feature +++ b/tests/browser/features/manage_translator_sandbox.feature @@ -149,6 +149,27 @@ And I should see the 'Accept' button displayed in the second column And I should see the 'Reject' button displayed in the second column + Scenario: Selecting a second user with translations and deselecting it +Given I am on the Translator sandbox management page with users in the sandbox +When I click on the checkbox near 'Pupu4' in the first column + And I click on the checkbox near 'Pupu4' in the first column +Then I should see the checkbox next to the request from 'Pupu4' unchecked + And I should see the checkbox next to the request from 'Pupu4' enabled + And I should see the checkbox next to the request from 'Orava4' checked + And I should see the checkbox next to the request from 'Orava4' disabled + And I should see the details of 4 sandboxed translations done by the user in the second column + + Scenario: Selecting a second user without translations and deselecting it +Given I am on the Translator sandbox management page with users in the sandbox +When I click on 'Pupu0' in the first column + And I click on the checkbox near 'Orava0' in the first column + And I click on the checkbox near 'Orava0' in the first column +Then I should see the checkbox next to the request from 'Orava0' unchecked + And I should see the checkbox next to the request from 'Orava0' enabled + And I should see the checkbox next to the request from 'Pupu0' checked + And I should see the checkbox next to the request from 'Pupu0' disabled + And I should not see any translations done by the user in the second column + Scenario: Accepting one user Given I am on the Translator sandbox management page with users in the sandbox When I click on 'Pupu2' in the first column diff --git a/tests/browser/features/step_definitions/manage_translator_sandbox_steps.rb b/tests/browser/features/step_definitions/manage_translator_sandbox_steps.rb index a6b69f7..832a87c 100644 --- a/tests/browser/features/step_definitions/manage_translator_sandbox_steps.rb +++ b/tests/browser/features/step_definitions/manage_translator_sandbox_steps.rb @@ -131,8 +131,9 @@ Then(/^I should not see any translations done by the user in the second column$/) do on(ManageTranslatorSandboxPage) do |page| - page.translation_elements.length.should == 0 - page.details_no_translations_element.should be_visible + page.translation_elements.size.should == 0 + page.details_no_translations.size.should == 1 + page.details_no_translations[0].should be_visible end end @@ -141,7 +142,10 @@ end Then(/^I should see the details of (\d+) sandboxed translations done by the user in the second column$/) do |translations| - on(ManageTranslatorSandboxPage).translation_elements.len
[MediaWiki-commits] [Gerrit] Update claim indices when saving - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Update claim indices when saving .. Update claim indices when saving (bug 58179) Updating the claim indices when saving a claim. This allows proper subsequent interaction with a claim/statement just added to the list of claims/statements. Change-Id: I3d8940d7b34c29e6a89b375a596d6ee057464f32 (cherry picked from commit a278aaebe99fb8104ed1dae5b257a3f770908c50) --- M lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplistview.js M lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js 2 files changed, 56 insertions(+), 29 deletions(-) Approvals: Aude: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplistview.js b/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplistview.js index 09dd9b9..62e9bc6 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplistview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplistview.js @@ -91,6 +91,8 @@ claimlistviewInstance = lia.liInstance( $claimlistviews.eq( i ) ); listview.move( $claimlistviews.eq( i ), claimlistviewInstance.getInitialIndex() ); } + } else { + self.__updateIndices( !dropValue ); } } ) .on( startEditingEvent, function( event ) { @@ -335,6 +337,42 @@ } return null; + }, + + /** +* Updates the claimlistview indices as well as their claimview indices. +* +* @param {boolean} save +* +* @deprecated See bug #56050 +*/ + __updateIndices: function( save ) { + var index = 0, + listview = this.$listview.data( 'listview' ), + $claimlistviews = listview.items(); + + for( var i = 0; i < $claimlistviews.length; i++ ) { + var claimlistview = listview.listItemAdapter().liInstance( + $claimlistviews.eq( i ) + ); + + var claimlistviewListview = claimlistview.$listview.data( 'listview' ), + $claimviews = claimlistviewListview.items(); + + for( var j = 0; j < $claimviews.length; j++ ) { + if( j === 0 ) { + claimlistview.option( 'firstClaimIndex', index ); + + if( save ) { + claimlistview._initialIndex = index; + } + } + + claimlistview.__updateClaimIndices( save ); + + index++; + } + } } } ); @@ -464,27 +502,7 @@ btnMoveUp[isTopmost ? 'disable' : 'enable' ](); btnMoveDown[isBottommost ? 'disable' : 'enable' ](); - // Update claimview indices: - var index = 0; - - for( var i = 0; i < $claimlistviews.length; i++ ) { - var claimlistviewInstance = claimgrouplistviewListview.listItemAdapter().liInstance( - $claimlistviews.eq( i ) - ); - - var claimlistviewInstanceLv = claimlistviewInstance.$listview.data( 'listview' ), - $claimviewNodes = claimlistviewInstanceLv.items(); - - for( var j = 0; j < $claimviewNodes.length; j++ ) { - var claimviewInstance = claimlistviewInstanceLv.listItemAdapter().liInstance( - $claimviewNodes.eq( j ) - ); - - claimviewInstance.option( 'index', index ); - - index++; - } - } + claimgrouplistview.__updateIndices(); // Stop repeatedly triggering the event on the moved DOM node: event.stopImmediatePropagation(); diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js b/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js index 6ca3d64..a2d809e 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js @@ -181,23 +181,32 @@
[MediaWiki-commits] [Gerrit] Fix limit detection for status page - change (labs/toollabs)
coren has submitted this change and it was merged. Change subject: Fix limit detection for status page .. Fix limit detection for status page Most jobs now have two limits, one on h_vmem and one on jobs, which changes the layout of the data structure parsed from the XML. Change-Id: Ie6a29b5473fa438940a00817dc58d45fe9d3a980 --- M www/content/status.php 1 file changed, 8 insertions(+), 3 deletions(-) Approvals: coren: Verified; Looks good to me, approved diff --git a/www/content/status.php b/www/content/status.php index 0a4bf0b..183e9b7 100644 --- a/www/content/status.php +++ b/www/content/status.php @@ -74,9 +74,14 @@ $j['tool'] = preg_replace('/^local-(.*)$/', "$1", $tool); $j['sub'] = $job['JB_submission_time']; $j['name'] = $job['JB_job_name']; -foreach($job['JB_hard_resource_list'] as $rval) { - if($rval['CE_name'] == 'h_vmem') { -$j['mem_alloc'] = intval($rval['CE_doubleval']/1048576); +foreach($job['JB_hard_resource_list'] as $rvals) { + if(!isset($rvals[0])) { +$rvals = array($rvals); + } + foreach($rvals as $rval){ +if($rval['CE_name'] == 'h_vmem') { + $j['mem_alloc'] = intval($rval['CE_doubleval']/1048576); +} } } $j['tasks'] = 0; -- To view, visit https://gerrit.wikimedia.org/r/100377 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie6a29b5473fa438940a00817dc58d45fe9d3a980 Gerrit-PatchSet: 1 Gerrit-Project: labs/toollabs Gerrit-Branch: master Gerrit-Owner: Anomie Gerrit-Reviewer: coren ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix parameter description to match the actual behavior - change (mediawiki...PageImages)
MaxSem has uploaded a new change for review. https://gerrit.wikimedia.org/r/100567 Change subject: Fix parameter description to match the actual behavior .. Fix parameter description to match the actual behavior Change-Id: I4329fa7232953d3eed3e6da5bfbada64eca49572 --- M ApiQueryPageImages.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageImages refs/changes/67/100567/1 diff --git a/ApiQueryPageImages.php b/ApiQueryPageImages.php index 740aa45..321684d 100644 --- a/ApiQueryPageImages.php +++ b/ApiQueryPageImages.php @@ -148,7 +148,7 @@ ' thumbnail - URL and dimensions of image associated with page, if any', ' name - image title' ), - 'thumbsize' => 'Thumbnail width', + 'thumbsize' => 'Maximum thumbnail dimension', 'limit' => 'Properties of how many pages to return', 'continue' => 'When more results are available, use this to continue', ); -- To view, visit https://gerrit.wikimedia.org/r/100567 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4329fa7232953d3eed3e6da5bfbada64eca49572 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/PageImages Gerrit-Branch: master Gerrit-Owner: MaxSem ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix parameter description to match the actual behavior - change (mediawiki...PageImages)
jenkins-bot has submitted this change and it was merged. Change subject: Fix parameter description to match the actual behavior .. Fix parameter description to match the actual behavior Change-Id: I4329fa7232953d3eed3e6da5bfbada64eca49572 --- M ApiQueryPageImages.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Yuvipanda: Looks good to me, approved jenkins-bot: Verified diff --git a/ApiQueryPageImages.php b/ApiQueryPageImages.php index 740aa45..321684d 100644 --- a/ApiQueryPageImages.php +++ b/ApiQueryPageImages.php @@ -148,7 +148,7 @@ ' thumbnail - URL and dimensions of image associated with page, if any', ' name - image title' ), - 'thumbsize' => 'Thumbnail width', + 'thumbsize' => 'Maximum thumbnail dimension', 'limit' => 'Properties of how many pages to return', 'continue' => 'When more results are available, use this to continue', ); -- To view, visit https://gerrit.wikimedia.org/r/100567 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4329fa7232953d3eed3e6da5bfbada64eca49572 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/PageImages Gerrit-Branch: master Gerrit-Owner: MaxSem Gerrit-Reviewer: Yuvipanda 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 ChangeLineFormatterTest for non-english - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Fix ChangeLineFormatterTest for non-english .. Fix ChangeLineFormatterTest for non-english Change-Id: Ia977f4f21658b5317169e6befb7e0b3bd9486b44 --- M client/tests/phpunit/includes/recentchanges/ChangeLineFormatterTest.php 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Addshore: Looks good to me, approved jenkins-bot: Verified diff --git a/client/tests/phpunit/includes/recentchanges/ChangeLineFormatterTest.php b/client/tests/phpunit/includes/recentchanges/ChangeLineFormatterTest.php index 3c8de2f..7d2364a 100644 --- a/client/tests/phpunit/includes/recentchanges/ChangeLineFormatterTest.php +++ b/client/tests/phpunit/includes/recentchanges/ChangeLineFormatterTest.php @@ -4,6 +4,7 @@ use ChangesList; use ContentHandler; +use Language; use RecentChange; use RequestContext; use Title; @@ -36,7 +37,7 @@ // these are required because Linker is used in ChangeLineFormatter // @todo eliminate Linker or at least use of Linker in Wikibase :) $this->setMwGlobals( array( - 'wgLanguageCode' => 'en', + 'wgLang' => Language::factory( 'en' ), 'wgScriptPath' => '', 'wgScript' => '/index.php', 'wgArticlePath' => '/wiki/$1' -- To view, visit https://gerrit.wikimedia.org/r/100560 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia977f4f21658b5317169e6befb7e0b3bd9486b44 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Aude Gerrit-Reviewer: Addshore Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Run unit tests on travis in both English and German - change (mediawiki...Wikibase)
Hoo man has uploaded a new change for review. https://gerrit.wikimedia.org/r/100568 Change subject: Run unit tests on travis in both English and German .. Run unit tests on travis in both English and German This is more useful for debugging. The old client/repo switch was non functional anyway. Change-Id: Ibc70147e10d0645cdf933a4c40297dd9cabdb5fd --- M .travis.sh M .travis.yml 2 files changed, 10 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/68/100568/1 diff --git a/.travis.sh b/.travis.sh index 58940b9..44c8eaf 100644 --- a/.travis.sh +++ b/.travis.sh @@ -23,7 +23,7 @@ echo 'ini_set("display_errors", 1);' >> LocalSettings.php echo '$wgShowExceptionDetails = true;' >> LocalSettings.php echo '$wgDevelopmentWarnings = true;' >> LocalSettings.php -echo '$wgLanguageCode = "de";' >> LocalSettings.php +echo '$wgLanguageCode = "'$1'";' >> LocalSettings.php echo "define( 'WB_EXPERIMENTAL_FEATURES', true );" >> LocalSettings.php echo 'require_once __DIR__ . "/extensions/Wikibase/repo/Wikibase.php";' >> LocalSettings.php diff --git a/.travis.yml b/.travis.yml index adba2e6..c8a4fc1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,27 +5,27 @@ matrix: include: -- env: DBTYPE=mysql EXTENSION=client +- env: DBTYPE=mysql LANG=de php: 5.3 -- env: DBTYPE=mysql EXTENSION=client +- env: DBTYPE=mysql LANG=de php: 5.4 -- env: DBTYPE=sqlite EXTENSION=client +- env: DBTYPE=sqlite LANG=de php: 5.5 -- env: DBTYPE=sqlite EXTENSION=repo +- env: DBTYPE=sqlite LANG=en php: 5.3 -- env: DBTYPE=sqlite EXTENSION=repo +- env: DBTYPE=sqlite LANG=en php: 5.4 -- env: DBTYPE=mysql EXTENSION=repo +- env: DBTYPE=mysql LANG=en php: 5.5 -- env: DBTYPE=postgres EXTENSION=repo +- env: DBTYPE=postgres LANG=en php: 5.5 exclude: - env: TRAVISASSUMESWRONGSTUFF=FAIL allow_failures: -- env: DBTYPE=postgres EXTENSION=repo +- env: DBTYPE=postgres LANG=en before_script: - - bash .travis.sh $EXTENSION + - bash .travis.sh $LANG script: - cd ../phase3/tests/phpunit -- To view, visit https://gerrit.wikimedia.org/r/100568 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibc70147e10d0645cdf933a4c40297dd9cabdb5fd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Hoo man ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Tool Labs: Add a couple requested packages - change (operations/puppet)
coren has uploaded a new change for review. https://gerrit.wikimedia.org/r/100570 Change subject: Tool Labs: Add a couple requested packages .. Tool Labs: Add a couple requested packages Bug: 58220 Bug: 55652 Change-Id: I52717f5da7c468e6693df80a63124a6048e76738 --- M modules/toollabs/manifests/exec_environ.pp 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/70/100570/1 diff --git a/modules/toollabs/manifests/exec_environ.pp b/modules/toollabs/manifests/exec_environ.pp index c12163c..3004023 100644 --- a/modules/toollabs/manifests/exec_environ.pp +++ b/modules/toollabs/manifests/exec_environ.pp @@ -98,6 +98,7 @@ # Python libraries 'libboost-python1.48.0', 'python-apport', + 'python-babel',# Bug 58220 'python-beautifulsoup',# For valhallasw. 'python-bottle', # Bug 56995 'python-celery', @@ -148,6 +149,7 @@ 'php5-cli', 'php5-curl', 'php5-gd', + 'php5-intl', # Bug 55652 'php5-mcrypt', 'php5-mysql', 'php5-redis', -- To view, visit https://gerrit.wikimedia.org/r/100570 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I52717f5da7c468e6693df80a63124a6048e76738 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: coren ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Tool Labs: Add a couple requested packages - change (operations/puppet)
coren has submitted this change and it was merged. Change subject: Tool Labs: Add a couple requested packages .. Tool Labs: Add a couple requested packages Bug: 58220 Bug: 55652 Change-Id: I52717f5da7c468e6693df80a63124a6048e76738 --- M modules/toollabs/manifests/exec_environ.pp 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: coren: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/toollabs/manifests/exec_environ.pp b/modules/toollabs/manifests/exec_environ.pp index c12163c..3004023 100644 --- a/modules/toollabs/manifests/exec_environ.pp +++ b/modules/toollabs/manifests/exec_environ.pp @@ -98,6 +98,7 @@ # Python libraries 'libboost-python1.48.0', 'python-apport', + 'python-babel',# Bug 58220 'python-beautifulsoup',# For valhallasw. 'python-bottle', # Bug 56995 'python-celery', @@ -148,6 +149,7 @@ 'php5-cli', 'php5-curl', 'php5-gd', + 'php5-intl', # Bug 55652 'php5-mcrypt', 'php5-mysql', 'php5-redis', -- To view, visit https://gerrit.wikimedia.org/r/100570 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I52717f5da7c468e6693df80a63124a6048e76738 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: coren Gerrit-Reviewer: coren Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] remove ryan from pager list - change (operations/puppet)
ArielGlenn has uploaded a new change for review. https://gerrit.wikimedia.org/r/100571 Change subject: remove ryan from pager list .. remove ryan from pager list Change-Id: I68239bde190bb6856a64c8c2700978c076b42ee4 --- M files/icinga/contactgroups.cfg 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/71/100571/1 diff --git a/files/icinga/contactgroups.cfg b/files/icinga/contactgroups.cfg index 47173e8..d4afdac 100644 --- a/files/icinga/contactgroups.cfg +++ b/files/icinga/contactgroups.cfg @@ -6,7 +6,7 @@ define contactgroup { contactgroup_name sms - members akosiaris,ariel,bblack,cmjohnson,dzahn,faidon,jgreen,ksnider,lcarr,rlane,rkattouw,robh,springle,tstarling,mpelletier + members akosiaris,ariel,bblack,cmjohnson,dzahn,faidon,jgreen,ksnider,lcarr,rkattouw,robh,springle,tstarling,mpelletier } define contactgroup { -- To view, visit https://gerrit.wikimedia.org/r/100571 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I68239bde190bb6856a64c8c2700978c076b42ee4 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: ArielGlenn ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] remove ryan from pager list - change (operations/puppet)
ArielGlenn has submitted this change and it was merged. Change subject: remove ryan from pager list .. remove ryan from pager list Change-Id: I68239bde190bb6856a64c8c2700978c076b42ee4 --- M files/icinga/contactgroups.cfg 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: ArielGlenn: Looks good to me, approved jenkins-bot: Verified diff --git a/files/icinga/contactgroups.cfg b/files/icinga/contactgroups.cfg index 47173e8..d4afdac 100644 --- a/files/icinga/contactgroups.cfg +++ b/files/icinga/contactgroups.cfg @@ -6,7 +6,7 @@ define contactgroup { contactgroup_name sms - members akosiaris,ariel,bblack,cmjohnson,dzahn,faidon,jgreen,ksnider,lcarr,rlane,rkattouw,robh,springle,tstarling,mpelletier + members akosiaris,ariel,bblack,cmjohnson,dzahn,faidon,jgreen,ksnider,lcarr,rkattouw,robh,springle,tstarling,mpelletier } define contactgroup { -- To view, visit https://gerrit.wikimedia.org/r/100571 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I68239bde190bb6856a64c8c2700978c076b42ee4 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: ArielGlenn Gerrit-Reviewer: ArielGlenn 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 ResultBuilder test on travis - change (mediawiki...Wikibase)
Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/100572 Change subject: Fix ResultBuilder test on travis .. Fix ResultBuilder test on travis https://travis-ci.org/wikimedia/mediawiki-extensions-Wikibase/jobs/15228005 Change-Id: Ic291e1362b0845220117cb2e57436c54585ad8e0 --- M repo/tests/phpunit/includes/api/ResultBuilderTest.php 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/72/100572/1 diff --git a/repo/tests/phpunit/includes/api/ResultBuilderTest.php b/repo/tests/phpunit/includes/api/ResultBuilderTest.php index 46a6cc6..882341c 100644 --- a/repo/tests/phpunit/includes/api/ResultBuilderTest.php +++ b/repo/tests/phpunit/includes/api/ResultBuilderTest.php @@ -94,7 +94,7 @@ $result = $this->getDefaultResult(); $props = array( 'info' ); $item = Item::newEmpty(); - $item->setId( new ItemId( 'Q123' ) ); + $item->setId( new ItemId( 'Q123098' ) ); $item->setLabel( 'de', 'foo' ); $item->addAliases( 'en', array( 'bar', 'baz' ) ); $item->setDescription( 'pt', 'ptDesc' ); @@ -107,11 +107,11 @@ //todo $entityRevision = new EntityRevision( $item, 33, '20131126202923' ); - $expected = array( 'entities' => array( 'Q123' => array( + $expected = array( 'entities' => array( 'Q123098' => array( 'pageid' => 0, 'ns' => 120, - 'title' => 'Item:Q123', - 'id' => 'Q123', + 'title' => 'Item:Q123098', + 'id' => 'Q123098', 'type' => 'item', 'lastrevid' => 33, 'modified' => '2013-11-26T20:29:23Z', -- To view, visit https://gerrit.wikimedia.org/r/100572 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic291e1362b0845220117cb2e57436c54585ad8e0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Addshore ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Run unit tests on travis in both English and German - change (mediawiki...Wikibase)
Jeroen De Dauw has submitted this change and it was merged. Change subject: Run unit tests on travis in both English and German .. Run unit tests on travis in both English and German This is more useful for debugging. The old client/repo switch was non functional anyway. Change-Id: Ibc70147e10d0645cdf933a4c40297dd9cabdb5fd --- M .travis.sh M .travis.yml 2 files changed, 10 insertions(+), 10 deletions(-) Approvals: Jeroen De Dauw: Looks good to me, approved diff --git a/.travis.sh b/.travis.sh index 58940b9..4432947 100644 --- a/.travis.sh +++ b/.travis.sh @@ -23,7 +23,7 @@ echo 'ini_set("display_errors", 1);' >> LocalSettings.php echo '$wgShowExceptionDetails = true;' >> LocalSettings.php echo '$wgDevelopmentWarnings = true;' >> LocalSettings.php -echo '$wgLanguageCode = "de";' >> LocalSettings.php +echo '$wgLanguageCode = "'$LANG'";' >> LocalSettings.php echo "define( 'WB_EXPERIMENTAL_FEATURES', true );" >> LocalSettings.php echo 'require_once __DIR__ . "/extensions/Wikibase/repo/Wikibase.php";' >> LocalSettings.php diff --git a/.travis.yml b/.travis.yml index adba2e6..d7f2d8f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,27 +5,27 @@ matrix: include: -- env: DBTYPE=mysql EXTENSION=client +- env: DBTYPE=mysql LANG=de php: 5.3 -- env: DBTYPE=mysql EXTENSION=client +- env: DBTYPE=mysql LANG=de php: 5.4 -- env: DBTYPE=sqlite EXTENSION=client +- env: DBTYPE=sqlite LANG=de php: 5.5 -- env: DBTYPE=sqlite EXTENSION=repo +- env: DBTYPE=sqlite LANG=en php: 5.3 -- env: DBTYPE=sqlite EXTENSION=repo +- env: DBTYPE=sqlite LANG=en php: 5.4 -- env: DBTYPE=mysql EXTENSION=repo +- env: DBTYPE=mysql LANG=en php: 5.5 -- env: DBTYPE=postgres EXTENSION=repo +- env: DBTYPE=postgres LANG=en php: 5.5 exclude: - env: TRAVISASSUMESWRONGSTUFF=FAIL allow_failures: -- env: DBTYPE=postgres EXTENSION=repo +- env: DBTYPE=postgres LANG=en before_script: - - bash .travis.sh $EXTENSION + - bash .travis.sh script: - cd ../phase3/tests/phpunit -- To view, visit https://gerrit.wikimedia.org/r/100568 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibc70147e10d0645cdf933a4c40297dd9cabdb5fd Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Hoo man Gerrit-Reviewer: Addshore Gerrit-Reviewer: Aude Gerrit-Reviewer: Daniel Kinzler Gerrit-Reviewer: Jeroen De Dauw 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] fix routing of non-wikipedia on beta cluster - change (operations/mediawiki-config)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/100573 Change subject: fix routing of non-wikipedia on beta cluster .. fix routing of non-wikipedia on beta cluster 5f63c1f12 / https://gerrit.wikimedia.org/r/#/c/85165/ broke the $site detection for the beta cluster. It removed the docroot based site detection but forgot to update the beta part to capture the project from the domain name. Thus $site was always a wikipedia. The end result is that en.wikisource.beta.wmflabs.org would be mapped to 'enwiki' instead of 'enwikisource' (since wikipedia is the default site). Also fixed up database suffix when the project name is 'wikimedia'. Beta use a 'wiki' suffix for them, not 'wikimedia' from the domain. Added in some more test cases to cover the english wikis and some other wikis present on beta cluster. bug: 58271 Change-Id: Ia0d83ed7fede7a16c2c1cc16ee13fb7d06764bf3 --- M multiversion/MWMultiVersion.php M tests/multiversion/MWMultiVersionTest.php 2 files changed, 36 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/73/100573/1 diff --git a/multiversion/MWMultiVersion.php b/multiversion/MWMultiVersion.php index 3969219..f10b013 100644 --- a/multiversion/MWMultiVersion.php +++ b/multiversion/MWMultiVersion.php @@ -145,9 +145,16 @@ } elseif ( isset( $staticMappings[$serverName] ) ) { $lang = $staticMappings[$serverName]; } elseif ( strpos( $serverName, 'wmflabs' ) !== false ) { - if ( preg_match( '/^([^.]+)\.[^.]+\.beta\.wmflabs\.org$/', $serverName, $matches ) ) { + if ( preg_match( '/^([^.]+)\.([^.]+)\.beta\.wmflabs\.org$/', $serverName, $matches ) ) { // http://en.wikipedia.beta.wmflabs.org/ $lang = $matches[1]; + if( $matches[2] == 'wikimedia' ) { + # Beta uses 'wiki' as a DB suffix for WikiMedia databases + # Eg 'login.wikimedia.beta.wmflabs.org' => 'loginwiki' + $site = 'wikipedia'; + } else { + $site = $matches[2]; + } } elseif ( preg_match( '/^([a-z0-9]*)\.beta\.wmflabs\.org$/', $serverName, $matches ) ) { // http://wikidata.beta.wmflabs.org/ $lang = $matches[1]; diff --git a/tests/multiversion/MWMultiVersionTest.php b/tests/multiversion/MWMultiVersionTest.php index 8eea685..0ae1ae5 100644 --- a/tests/multiversion/MWMultiVersionTest.php +++ b/tests/multiversion/MWMultiVersionTest.php @@ -118,9 +118,35 @@ array( 'ukwikimedia', 'uk.wikimedia.org' ), array( 'vewikimedia', 've.wikimedia.org' ), - // labs stuffs + // labs stuffs taken from /wikiversions-labs.dat + array( 'aawiki', 'aa.wikipedia.beta.wmflabs.org' ), + array( 'arwiki', 'ar.wikipedia.beta.wmflabs.org' ), + array( 'commonswiki', 'commons.wikimedia.beta.wmflabs.org' ), array( 'labswiki', 'deployment.wikimedia.beta.wmflabs.org' ), - array( 'enwiki', 'en.wikipedia.beta.wmflabs.org' ), + array( 'dewiki' , 'de.wikipedia.beta.wmflabs.org' ), + array( 'dewikivoyage' , 'de.wikivoyage.beta.wmflabs.org' ), + + array( 'enwiki' , 'en.wikipedia.beta.wmflabs.org' ), + array( 'enwikibooks' , 'en.wikibooks.beta.wmflabs.org' ), + array( 'enwikinews' , 'en.wikinews.beta.wmflabs.org' ), + array( 'enwikiquote' , 'en.wikiquote.beta.wmflabs.org' ), + array( 'enwikisource' , 'en.wikisource.beta.wmflabs.org' ), + array( 'enwikiversity', 'en.wikiversity.beta.wmflabs.org' ), + array( 'enwikivoyage' , 'en.wikivoyage.beta.wmflabs.org' ), + array( 'enwiktionary' , 'en.wiktionary.beta.wmflabs.org' ), + + array( 'eowiki' , 'eo.wikipedia.beta.wmflabs.org' ), + array( 'hewiki' , 'he.wikipedia.beta.wmflabs.org' ), + + array( 'labswiki' , 'deployment.wikimedia.beta.wmflabs.org' ), + + array( 'loginwiki' , 'login.wikimedia.beta.wmflabs.org' ), + array( 'metawiki', 'meta.wikimedia.beta.wmflabs.org' ), + + array( 'simplewiki' , 'simple.wikipedia.beta.wmflabs.org' ), + array( 'sqwiki' , 'sq.wi
[MediaWiki-commits] [Gerrit] Use jQuery instead of deprecated addHandler - change (mediawiki...SlimboxThumbs)
VitaliyFilippov has uploaded a new change for review. https://gerrit.wikimedia.org/r/100574 Change subject: Use jQuery instead of deprecated addHandler .. Use jQuery instead of deprecated addHandler Change-Id: Id590f7c895cff7463ccf29517cb605f9d039e0dc --- M SlimboxThumbs.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SlimboxThumbs refs/changes/74/100574/1 diff --git a/SlimboxThumbs.php b/SlimboxThumbs.php index ee37dfa..cb5c351 100644 --- a/SlimboxThumbs.php +++ b/SlimboxThumbs.php @@ -124,7 +124,7 @@ $out->addScript( '' . "\n" ); $out->addExtensionStyle( $eDir . '/css/slimbox2.css', 'screen' ); $out->addScript( '' . "\n" ); - $out->addInlineScript( "addHandler( window, 'load', function() {". + $out->addInlineScript( "$( window ).on( 'load', function() {". "makeSlimboxThumbs( jQuery, \"".addslashes( $re ). "\", \"".addslashes( $wgServer.$wgScriptPath )."\" ); } );" ); -- To view, visit https://gerrit.wikimedia.org/r/100574 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id590f7c895cff7463ccf29517cb605f9d039e0dc Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SlimboxThumbs Gerrit-Branch: master Gerrit-Owner: VitaliyFilippov ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use jQuery instead of deprecated addHandler - change (mediawiki...SlimboxThumbs)
VitaliyFilippov has submitted this change and it was merged. Change subject: Use jQuery instead of deprecated addHandler .. Use jQuery instead of deprecated addHandler Change-Id: Id590f7c895cff7463ccf29517cb605f9d039e0dc --- M SlimboxThumbs.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: VitaliyFilippov: Verified; Looks good to me, approved diff --git a/SlimboxThumbs.php b/SlimboxThumbs.php index ee37dfa..cb5c351 100644 --- a/SlimboxThumbs.php +++ b/SlimboxThumbs.php @@ -124,7 +124,7 @@ $out->addScript( '' . "\n" ); $out->addExtensionStyle( $eDir . '/css/slimbox2.css', 'screen' ); $out->addScript( '' . "\n" ); - $out->addInlineScript( "addHandler( window, 'load', function() {". + $out->addInlineScript( "$( window ).on( 'load', function() {". "makeSlimboxThumbs( jQuery, \"".addslashes( $re ). "\", \"".addslashes( $wgServer.$wgScriptPath )."\" ); } );" ); -- To view, visit https://gerrit.wikimedia.org/r/100574 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id590f7c895cff7463ccf29517cb605f9d039e0dc Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SlimboxThumbs Gerrit-Branch: master Gerrit-Owner: VitaliyFilippov Gerrit-Reviewer: VitaliyFilippov ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix ResultBuilder test on travis - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Fix ResultBuilder test on travis .. Fix ResultBuilder test on travis https://travis-ci.org/wikimedia/mediawiki-extensions-Wikibase/jobs/15228005 Change-Id: Ic291e1362b0845220117cb2e57436c54585ad8e0 --- M repo/tests/phpunit/includes/api/ResultBuilderTest.php 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: Hoo man: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/tests/phpunit/includes/api/ResultBuilderTest.php b/repo/tests/phpunit/includes/api/ResultBuilderTest.php index 46a6cc6..882341c 100644 --- a/repo/tests/phpunit/includes/api/ResultBuilderTest.php +++ b/repo/tests/phpunit/includes/api/ResultBuilderTest.php @@ -94,7 +94,7 @@ $result = $this->getDefaultResult(); $props = array( 'info' ); $item = Item::newEmpty(); - $item->setId( new ItemId( 'Q123' ) ); + $item->setId( new ItemId( 'Q123098' ) ); $item->setLabel( 'de', 'foo' ); $item->addAliases( 'en', array( 'bar', 'baz' ) ); $item->setDescription( 'pt', 'ptDesc' ); @@ -107,11 +107,11 @@ //todo $entityRevision = new EntityRevision( $item, 33, '20131126202923' ); - $expected = array( 'entities' => array( 'Q123' => array( + $expected = array( 'entities' => array( 'Q123098' => array( 'pageid' => 0, 'ns' => 120, - 'title' => 'Item:Q123', - 'id' => 'Q123', + 'title' => 'Item:Q123098', + 'id' => 'Q123098', 'type' => 'item', 'lastrevid' => 33, 'modified' => '2013-11-26T20:29:23Z', -- To view, visit https://gerrit.wikimedia.org/r/100572 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic291e1362b0845220117cb2e57436c54585ad8e0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Addshore Gerrit-Reviewer: Hoo man Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Ensure TermPropertyLabelResolve memcached is per language - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Ensure TermPropertyLabelResolve memcached is per language .. Ensure TermPropertyLabelResolve memcached is per language also remove not-needed debug stuff Change-Id: Ibab1f1b0fb09be9f6ca35d5d1b1bcabc8b995520 --- M client/includes/store/sql/DirectSqlStore.php 1 file changed, 6 insertions(+), 2 deletions(-) Approvals: Daniel Kinzler: Looks good to me, approved jenkins-bot: Verified diff --git a/client/includes/store/sql/DirectSqlStore.php b/client/includes/store/sql/DirectSqlStore.php index 2231584..d93c1f5 100644 --- a/client/includes/store/sql/DirectSqlStore.php +++ b/client/includes/store/sql/DirectSqlStore.php @@ -264,9 +264,13 @@ * @return PropertyLabelResolver */ protected function newPropertyLabelResolver() { - $key = $this->cachePrefix . ':TermPropertyLabelResolver'; + $langCode = $this->language->getCode(); + + // cache key needs to be language specific + $key = $this->cachePrefix . ':TermPropertyLabelResolver' . '/' . $langCode; + return new TermPropertyLabelResolver( - $this->language->getCode(), + $langCode, $this->getTermIndex(), ObjectCache::getInstance( $this->cacheType ), $this->cacheDuration, -- To view, visit https://gerrit.wikimedia.org/r/100187 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibab1f1b0fb09be9f6ca35d5d1b1bcabc8b995520 Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Aude Gerrit-Reviewer: Addshore Gerrit-Reviewer: Daniel Kinzler 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] $.ui.suggester: Added functionality to flip horizontal offset - change (mediawiki...DataValues)
jenkins-bot has submitted this change and it was merged. Change subject: $.ui.suggester: Added functionality to flip horizontal offset .. $.ui.suggester: Added functionality to flip horizontal offset Change-Id: Ic9138468c4aa6426fec5236d609c19cbe8bf658a --- M ValueView/resources/jquery.ui/jquery.ui.suggester.css M ValueView/resources/jquery.ui/jquery.ui.suggester.js 2 files changed, 23 insertions(+), 0 deletions(-) Approvals: Tobias Gritschacher: Looks good to me, approved jenkins-bot: Verified diff --git a/ValueView/resources/jquery.ui/jquery.ui.suggester.css b/ValueView/resources/jquery.ui/jquery.ui.suggester.css index 98cc6f7..24c833d 100644 --- a/ValueView/resources/jquery.ui/jquery.ui.suggester.css +++ b/ValueView/resources/jquery.ui/jquery.ui.suggester.css @@ -23,6 +23,7 @@ .ui-suggester-list { padding: 0; + position: absolute; } .ui-suggester-list .ui-menu-item a { diff --git a/ValueView/resources/jquery.ui/jquery.ui.suggester.js b/ValueView/resources/jquery.ui/jquery.ui.suggester.js index ac3a845..b1d0f5d 100644 --- a/ValueView/resources/jquery.ui/jquery.ui.suggester.js +++ b/ValueView/resources/jquery.ui/jquery.ui.suggester.js @@ -478,6 +478,13 @@ ) { this.options.position.my = 'right top'; this.options.position.at = 'right bottom'; + + if( this.options.position.offset ) { + this.options.position.offset = flipHorizontalOffset( + this.options.position.offset + ); + } + this.menu.element.position( $.extend( { of: this.element }, this.options.position ) ); @@ -541,4 +548,19 @@ } ); + /** +* Flips the horizontal offset of a offset specified as string to be used as offset parameter +* for jQuery.ui.position (1.8) +* +* @param {string} offset +* @return {string} +*/ + function flipHorizontalOffset( offset ) { + var offsets = offset.split( ' ' ), + hOffset = parseInt( offsets[0], 10 ); + + hOffset = ( hOffset <= 0 ) ? Math.abs( hOffset ) : hOffset * -1; + return hOffset + ' ' + offsets[1]; + } + } )( jQuery ); -- To view, visit https://gerrit.wikimedia.org/r/99367 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic9138468c4aa6426fec5236d609c19cbe8bf658a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DataValues Gerrit-Branch: master Gerrit-Owner: Henning Snater 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] Ensure entityselector's suggestion list is assigned absolute... - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Ensure entityselector's suggestion list is assigned absolute position .. Ensure entityselector's suggestion list is assigned absolute position Proper list offset added additionally. Change-Id: Iec37723028fbd687ab402daf9eb5e8923244d228 --- M lib/resources/jquery.wikibase/themes/default/jquery.wikibase.entityselector.css M repo/resources/wikibase.ui.entitysearch.js 2 files changed, 7 insertions(+), 1 deletion(-) Approvals: Tobias Gritschacher: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/resources/jquery.wikibase/themes/default/jquery.wikibase.entityselector.css b/lib/resources/jquery.wikibase/themes/default/jquery.wikibase.entityselector.css index e3530a6..23d04d8 100644 --- a/lib/resources/jquery.wikibase/themes/default/jquery.wikibase.entityselector.css +++ b/lib/resources/jquery.wikibase/themes/default/jquery.wikibase.entityselector.css @@ -7,6 +7,7 @@ .ui-entityselector-list { padding: 0; + position: absolute; overflow-x: hidden; } diff --git a/repo/resources/wikibase.ui.entitysearch.js b/repo/resources/wikibase.ui.entitysearch.js index 5fc2367..f05cb18 100644 --- a/repo/resources/wikibase.ui.entitysearch.js +++ b/repo/resources/wikibase.ui.entitysearch.js @@ -64,7 +64,12 @@ $form.submit(); }, cssClass: 'wb-entitysearch-suggestions' - } + }, + position: $.extend( + {}, + $.wikibase.entityselector.prototype.options.position, + { offset: '-1 2' } + ) } ) .on( 'entityselectoropen', function( event ) { updateSuggestionSpecial(); -- To view, visit https://gerrit.wikimedia.org/r/99368 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iec37723028fbd687ab402daf9eb5e8923244d228 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Henning Snater 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] Adjustments due to implementation of ValueParserFactory - change (mediawiki...Wikibase)
Henning Snater has uploaded a new change for review. https://gerrit.wikimedia.org/r/98165 Change subject: Adjustments due to implementation of ValueParserFactory .. Adjustments due to implementation of ValueParserFactory Change-Id: I715d4a88beb117a62a8a4128706d9aa5b29a2941 --- M lib/resources/Resources.php M lib/resources/jquery.valueview.experts.wikibase/experts.wikibase.EntityIdInput.js M lib/resources/jquery.valueview.experts.wikibase/experts.wikibase.EntityIdValue.js A lib/resources/parsers/wikibase.parsers.js 4 files changed, 38 insertions(+), 14 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/65/98165/5 diff --git a/lib/resources/Resources.php b/lib/resources/Resources.php index d46a3bb..ac873d4 100644 --- a/lib/resources/Resources.php +++ b/lib/resources/Resources.php @@ -56,11 +56,21 @@ 'wikibase.parsers' => $moduleTemplate + array( 'scripts' => array( + 'parsers/wikibase.parsers.js', + ), + 'dependencies' => array( + 'mw.ext.valueParsers', + 'mw.ext.valueView', + 'wikibase.EntityIdParser', + ), + ), + + 'wikibase.EntityIdParser' => $moduleTemplate + array( + 'scripts' => array( 'parsers/EntityIdParser.js', ), 'dependencies' => array( 'valueParsers.ValueParser', - 'valueParsers.api', 'wikibase.datamodel', ), ), @@ -720,6 +730,7 @@ ), 'dependencies' => array( 'mw.ext.valueView', + 'mw.ext.valueParsers', ), ), diff --git a/lib/resources/jquery.valueview.experts.wikibase/experts.wikibase.EntityIdInput.js b/lib/resources/jquery.valueview.experts.wikibase/experts.wikibase.EntityIdInput.js index f31c9e5..d9e88a1 100644 --- a/lib/resources/jquery.valueview.experts.wikibase/experts.wikibase.EntityIdInput.js +++ b/lib/resources/jquery.valueview.experts.wikibase/experts.wikibase.EntityIdInput.js @@ -4,7 +4,7 @@ * @licence GNU GPL v2+ * @author Daniel Werner < daniel.wer...@wikimedia.de > */ -( function( mw, wb, dv, vp, $, vv ) { +( function( mw, wb, dv, $, vv ) { 'use strict'; // temporarily define a hard coded prefix map until we get this from the server @@ -153,15 +153,6 @@ }, /** -* @see Query.valueview.Expert.parser -*/ - parser: function() { - return new wb.EntityIdParser( { - 'prefixmap': WB_ENTITIES_PREFIXMAP - } ); - }, - - /** * @see Query.valueview.experts.StringValue.draw */ draw: function() { @@ -175,4 +166,4 @@ } } ); -}( mediaWiki, wikibase, dataValues, valueParsers, jQuery, jQuery.valueview ) ); +}( mediaWiki, wikibase, dataValues, jQuery, jQuery.valueview ) ); diff --git a/lib/resources/jquery.valueview.experts.wikibase/experts.wikibase.EntityIdValue.js b/lib/resources/jquery.valueview.experts.wikibase/experts.wikibase.EntityIdValue.js index ba74453..bee8a15 100644 --- a/lib/resources/jquery.valueview.experts.wikibase/experts.wikibase.EntityIdValue.js +++ b/lib/resources/jquery.valueview.experts.wikibase/experts.wikibase.EntityIdValue.js @@ -4,7 +4,7 @@ * @licence GNU GPL v2+ * @author Daniel Werner < daniel.wer...@wikimedia.de > */ -( function( mw, wb, dv, vp, $, vv ) { +( function( mw, wb, dv, $, vv ) { 'use strict'; // temporarily define a hard coded prefix map until we get this from the server @@ -75,6 +75,13 @@ return buildEntityRefDom( entityId ); }, baseExpert: editableExpert + }, + + /** +* @see jQuery.valueview.Expert.valueCharacteristics +*/ + valueCharacteristics: function() { + return { prefixmap: WB_ENTITIES_PREFIXMAP }; } } ); @@ -85,4 +92,4 @@ vv.experts.wikibase.EntityIdValue ); -}( mediaWiki, wikibase, dataValues, valueParsers, jQuery, jQuery.valueview ) ); +}( mediaWiki, wikibase, dataValues, jQuery, jQuery.valueview ) ); diff --git a/lib/resources/parsers/wikibase.parsers.js b/lib/resources/parsers/wikibase.parsers.js new file mode 100644 index 000..a1f5979 --- /dev/null
[MediaWiki-commits] [Gerrit] Inject EntityTitleLookup to ResultBuilder - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Inject EntityTitleLookup to ResultBuilder .. Inject EntityTitleLookup to ResultBuilder Change-Id: I874557b7eac1a62ec9c77859bc59856c825d80c3 --- M repo/includes/api/ApiWikibase.php M repo/includes/api/ResultBuilder.php M repo/tests/phpunit/includes/api/ResultBuilderTest.php 3 files changed, 43 insertions(+), 10 deletions(-) Approvals: Aude: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/includes/api/ApiWikibase.php b/repo/includes/api/ApiWikibase.php index 2deb90f..8bd9f63 100644 --- a/repo/includes/api/ApiWikibase.php +++ b/repo/includes/api/ApiWikibase.php @@ -48,7 +48,8 @@ */ public function getResultBuilder() { if( !isset( $this->resultBuilder ) ) { - $this->resultBuilder = new ResultBuilder( $this->getResult() ); + $entityTitleLookup = WikibaseRepo::getDefaultInstance()->getEntityTitleLookup(); + $this->resultBuilder = new ResultBuilder( $this->getResult(), $entityTitleLookup ); } return $this->resultBuilder; } diff --git a/repo/includes/api/ResultBuilder.php b/repo/includes/api/ResultBuilder.php index e2d1f3e..47d78eb 100644 --- a/repo/includes/api/ResultBuilder.php +++ b/repo/includes/api/ResultBuilder.php @@ -10,11 +10,11 @@ use Wikibase\Claims; use Wikibase\DataModel\Entity\EntityId; use Wikibase\EntityRevision; +use Wikibase\EntityTitleLookup; use Wikibase\Lib\Serializers\EntitySerializer; use Wikibase\Lib\Serializers\SerializationOptions; use Wikibase\Lib\Serializers\SerializerFactory; use Wikibase\Reference; -use Wikibase\Repo\WikibaseRepo; /** * Builder for Api Results @@ -40,15 +40,24 @@ * @var SerializerFactory */ protected $serializerFactory; + /** +* @var EntityTitleLookup +*/ + private $entityTitleLookup; /** * @param ApiResult $result +* @param EntityTitleLookup $entityTitleLookup * @param SerializerFactory $serializerFactory * * @throws InvalidArgumentException * @todo require SerializerFactory */ - public function __construct( $result, SerializerFactory $serializerFactory = null ) { + public function __construct( + $result, + EntityTitleLookup $entityTitleLookup, + SerializerFactory $serializerFactory = null + ) { if( !$result instanceof ApiResult ){ throw new InvalidArgumentException( 'Result builder must be constructed with an ApiWikibase' ); } @@ -57,8 +66,9 @@ $serializerFactory = new SerializerFactory(); } - $this->serializerFactory = $serializerFactory; $this->result = $result; + $this->entityTitleLookup = $entityTitleLookup; + $this->serializerFactory = $serializerFactory; $this->missingEntityCounter = -1; } @@ -118,7 +128,7 @@ $record['type'] = $entityId->getEntityType(); } else { if ( in_array( 'info', $props ) ) { - $title = WikibaseRepo::getDefaultInstance()->getEntityTitleLookup()->getTitleForId( $entityId ); + $title = $this->entityTitleLookup->getTitleForId( $entityId ); $record['pageid'] = $title->getArticleID(); $record['ns'] = intval( $title->getNamespace() ); $record['title'] = $title->getPrefixedText(); diff --git a/repo/tests/phpunit/includes/api/ResultBuilderTest.php b/repo/tests/phpunit/includes/api/ResultBuilderTest.php index 882341c..f58eab0 100644 --- a/repo/tests/phpunit/includes/api/ResultBuilderTest.php +++ b/repo/tests/phpunit/includes/api/ResultBuilderTest.php @@ -17,6 +17,7 @@ use Wikibase\PropertySomeValueSnak; use Wikibase\PropertyValueSnak; use Wikibase\Reference; +use Wikibase\Repo\WikibaseRepo; use Wikibase\SnakList; /** @@ -36,7 +37,28 @@ } protected function getResultBuilder( $result ){ - return new ResultBuilder( $result ); + $mockTitle = $this->getMockBuilder( '\Title' ) + ->disableOriginalConstructor() + ->getMock(); + $mockTitle->expects( $this->any() ) + ->method( 'getArticleID' ) + ->will( $this->returnValue( 123 ) ); + $mockTitle->expects( $this->any() ) + ->method( 'getNamespace' ) + ->will( $this->returnValue( 456 ) ); + $mockTitle->expects( $this->any() ) + ->method( 'getPrefixedText' ) +
[MediaWiki-commits] [Gerrit] Ensure entityselector's suggestion list is assigned absolute... - change (mediawiki...Wikibase)
Tobias Gritschacher has uploaded a new change for review. https://gerrit.wikimedia.org/r/100575 Change subject: Ensure entityselector's suggestion list is assigned absolute position .. Ensure entityselector's suggestion list is assigned absolute position Proper list offset added additionally. Change-Id: Iec37723028fbd687ab402daf9eb5e8923244d228 --- M lib/resources/jquery.wikibase/themes/default/jquery.wikibase.entityselector.css M repo/resources/wikibase.ui.entitysearch.js 2 files changed, 7 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/75/100575/1 diff --git a/lib/resources/jquery.wikibase/themes/default/jquery.wikibase.entityselector.css b/lib/resources/jquery.wikibase/themes/default/jquery.wikibase.entityselector.css index e3530a6..23d04d8 100644 --- a/lib/resources/jquery.wikibase/themes/default/jquery.wikibase.entityselector.css +++ b/lib/resources/jquery.wikibase/themes/default/jquery.wikibase.entityselector.css @@ -7,6 +7,7 @@ .ui-entityselector-list { padding: 0; + position: absolute; overflow-x: hidden; } diff --git a/repo/resources/wikibase.ui.entitysearch.js b/repo/resources/wikibase.ui.entitysearch.js index 5fc2367..f05cb18 100644 --- a/repo/resources/wikibase.ui.entitysearch.js +++ b/repo/resources/wikibase.ui.entitysearch.js @@ -64,7 +64,12 @@ $form.submit(); }, cssClass: 'wb-entitysearch-suggestions' - } + }, + position: $.extend( + {}, + $.wikibase.entityselector.prototype.options.position, + { offset: '-1 2' } + ) } ) .on( 'entityselectoropen', function( event ) { updateSuggestionSpecial(); -- To view, visit https://gerrit.wikimedia.org/r/100575 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iec37723028fbd687ab402daf9eb5e8923244d228 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: mw1.23-wmf6 Gerrit-Owner: Tobias Gritschacher Gerrit-Reviewer: Henning Snater ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits