[MediaWiki-commits] [Gerrit] Format GeoIP VCL C code for consistency with Varnish - change (operations/puppet)
BBlack has submitted this change and it was merged. Change subject: Format GeoIP VCL C code for consistency with Varnish .. Format GeoIP VCL C code for consistency with Varnish The only significant change is the removal of 'inline' from the declaration of geo_init. Change-Id: Iea8941896ba711ce00a927d49a35526782baa286 --- M templates/varnish/geoip.inc.vcl.erb 1 file changed, 30 insertions(+), 14 deletions(-) Approvals: BBlack: Looks good to me, approved jenkins-bot: Verified diff --git a/templates/varnish/geoip.inc.vcl.erb b/templates/varnish/geoip.inc.vcl.erb index 4ee2007..5d12d6e 100644 --- a/templates/varnish/geoip.inc.vcl.erb +++ b/templates/varnish/geoip.inc.vcl.erb @@ -21,13 +21,15 @@ char * geo_sanitize_for_cookie (char *string); void geo_set_cache_control (const struct sess *sp); - inline void geo_init () { + void + geo_init() { if (gi == NULL) { gi = GeoIP_open("/usr/share/GeoIP/GeoIPCity.dat", GEOIP_MMAP_CACHE); } } - int geo_get_addr_family (const char *addr) { + int + geo_get_addr_family(const char *addr) { struct addrinfo hint; struct addrinfo *info = NULL; int ret, result; @@ -46,7 +48,12 @@ return result; } - char * geo_get_xff_ip (const struct sess *sp) { + /* +* Return the first IP address from the X-Forwarded-For header of the +* incoming request, or NULL if no such header was set. +*/ + char * + geo_get_xff_ip(const struct sess *sp) { char *xff = VRT_GetHdr(sp, HDR_REQ, "\020X-Forwarded-For:"); char *xff_list_item, *last; @@ -59,17 +66,26 @@ return xff; } - char * geo_sanitize_for_cookie (char *string) { - char *ptr; - for (ptr = string; *ptr; ptr++) { - if (strchr(";, ", *ptr)) { - *ptr = '_'; + /* +* Make a string safe to use as a cookie value in a Set-Cookie header by +* replacing characters that are disallowed by RFC 6265 with underscores. +*/ + char * + geo_sanitize_for_cookie(char *string) { + char *ptr; + for (ptr = string; *ptr; ptr++) { + if (strchr(";, ", *ptr)) { + *ptr = '_'; + } } - } - return string; + return string; } - void geo_set_cache_control (const struct sess *sp) { + /* +* Set Last-Modified and Cache-Control headers for GeoIP requests. +*/ + void + geo_set_cache_control(const struct sess *sp) { char *now = VRT_time_string(sp, VRT_r_now(sp)); VRT_SetHdr(sp, HDR_OBJ, "\016Last-Modified:", now, vrt_magic_string_end); VRT_SetHdr(sp, HDR_OBJ, "\016Cache-Control:", "private, max-age=86400, s-maxage=0", vrt_magic_string_end); @@ -135,10 +151,10 @@ /* Set-Cookie: GeoIP=US:San_Francisco:37.7749:-122.4194:v6; path=/ */ snprintf(latlon, sizeof(latlon), "%.4f:%.4f", record->latitude, record->longitude); cookie = VRT_WrkString(sp, "GeoIP=", - record->country_code, ":", - geo_sanitize_for_cookie(record->city), ":", + record->country_code, ":", + geo_sanitize_for_cookie(record->city), ":", latlon, ":", - AF_INET6 ? "v6" : "v4", "; path=/", + AF_INET6 ? "v6" : "v4", "; path=/", vrt_magic_string_end); GeoIPRecord_delete(record); } else { -- To view, visit https://gerrit.wikimedia.org/r/115343 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iea8941896ba711ce00a927d49a35526782baa286 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ori.livneh Gerrit-Reviewer: BBlack 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 address family determination in GeoIP cookie - change (operations/puppet)
BBlack has submitted this change and it was merged. Change subject: Fix address family determination in GeoIP cookie .. Fix address family determination in GeoIP cookie Follows Iea8941896. Change-Id: Ifae2b75c9b75e9b3a151c1b4ca71ddc4ceb0f390 --- M templates/varnish/geoip.inc.vcl.erb 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: BBlack: Looks good to me, approved jenkins-bot: Verified diff --git a/templates/varnish/geoip.inc.vcl.erb b/templates/varnish/geoip.inc.vcl.erb index 5d12d6e..424234e 100644 --- a/templates/varnish/geoip.inc.vcl.erb +++ b/templates/varnish/geoip.inc.vcl.erb @@ -148,18 +148,18 @@ record = GeoIP_record_by_addr(gi, ip); if (record) { - /* Set-Cookie: GeoIP=US:San_Francisco:37.7749:-122.4194:v6; path=/ */ + /* Set-Cookie: GeoIP=US:San_Francisco:37.7749:-122.4194:v4; path=/ */ snprintf(latlon, sizeof(latlon), "%.4f:%.4f", record->latitude, record->longitude); cookie = VRT_WrkString(sp, "GeoIP=", record->country_code, ":", geo_sanitize_for_cookie(record->city), ":", latlon, ":", - AF_INET6 ? "v6" : "v4", "; path=/", + (af == AF_INET6) ? "v6" : "v4", "; path=/", vrt_magic_string_end); GeoIPRecord_delete(record); } else { /* Set-Cookie: GeoIP=v6; path=/ */ - cookie = VRT_WrkString(sp, "GeoIP=", AF_INET6 ? "v6" : "v4", + cookie = VRT_WrkString(sp, "GeoIP=", (af == AF_INET6) ? "v6" : "v4", "; path=/", vrt_magic_string_end); } -- To view, visit https://gerrit.wikimedia.org/r/115344 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifae2b75c9b75e9b3a151c1b4ca71ddc4ceb0f390 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ori.livneh Gerrit-Reviewer: BBlack Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Refactor GeoIP lookup code; add tests - change (operations/puppet)
BBlack has submitted this change and it was merged. Change subject: Refactor GeoIP lookup code; add tests .. Refactor GeoIP lookup code; add tests * Break up some code into discrete functions: * geo_set_cache_control: sets Last-Modified & Cache-Control headers. * geo_get_xff_ip: gets an IP address from the XFF header. * Rename getaddrfamily -> geo_get_addr_family, for consistency. * Replace TIM_format(TIM_real(), date) with VRT_time_string(sp, VRT_r_now(sp)). * Send 'Geo = {IPv6: true}' if client IP was IPv6. * Remove the silly, hard-coded netmask attribute. It is not in use. * Add unit tests. A follow-up change, Ic4d2fccbc, adds code for sending GeoIP data via a cookie. Change-Id: I26af69dc01daf9bda7d463c07500d16c0043fd3a --- A files/varnish/varnish-test-geoip M modules/varnish/manifests/common/vcl.pp M templates/varnish/geoip.inc.vcl.erb 3 files changed, 84 insertions(+), 49 deletions(-) Approvals: BBlack: Looks good to me, approved jenkins-bot: Verified diff --git a/files/varnish/varnish-test-geoip b/files/varnish/varnish-test-geoip new file mode 100755 index 000..1d534d5 --- /dev/null +++ b/files/varnish/varnish-test-geoip @@ -0,0 +1,18 @@ +#/usr/bin/env bash +# Unit tests for /geoiplookup +# Usage: varnish-test-geoip HOSTNAME +# e.g.: varnish-test-geoip cp4002.ulsfo.wmnet + +url="${1:-localhost}/geoiplookup" fails=0 +pass() { echo "$(tput bold; tput setaf 2)PASSED:$(tput sgr0) $*"; } +fail() { echo "$(tput bold; tput setaf 1)FAILED:$(tput sgr0) $*"; fails=$(($fails+1)); } +assert() { curl -s -H "Host: bits.wikimedia.org" \ + ${3:+-H "X-Forwarded-For: ${3}"} ${url} | grep -q "${2}" && pass $1 || fail $1; } + +assert "IPv6 XFF" "IPv6:true" 2001:db8:85a3::8a2e:370:7334 +assert "IPv4 normal" "San Francisco" 192.195.83.38 +assert "IPv4 lookup failure" "Geo = {}" 127.0.0.1 +assert "IPv4 lookup failure (no XFF)" "Geo = {}" +assert "IPv4 XFF list" "Sheung Wan" 1.32.255.255,192.195.83.38 + +exit $fails diff --git a/modules/varnish/manifests/common/vcl.pp b/modules/varnish/manifests/common/vcl.pp index e6c39df..6893193 100644 --- a/modules/varnish/manifests/common/vcl.pp +++ b/modules/varnish/manifests/common/vcl.pp @@ -16,4 +16,12 @@ mode=> '0444', content => template('varnish/errorpage.inc.vcl.erb'), } + +# VCL unit tests +file { '/usr/local/sbin/varnish-test-geoip': +owner => 'root', +group => 'root', +mode => '0555', +source => 'puppet:///files/varnish/varnish-test-geoip', +} } diff --git a/templates/varnish/geoip.inc.vcl.erb b/templates/varnish/geoip.inc.vcl.erb index c5d2d68..8284007 100644 --- a/templates/varnish/geoip.inc.vcl.erb +++ b/templates/varnish/geoip.inc.vcl.erb @@ -1,14 +1,5 @@ # Varnish VCL include file -# GeoIP -# declare the function signature -# so we can use them -C{ - #include - double TIM_real(void); - void TIM_format(double t, char *p); -}C - # init GeoIP code C{ #include @@ -22,25 +13,55 @@ #include #include - GeoIP *gi; - void geo_init () { - if (!gi) { + GeoIP *gi = NULL; + + void geo_init(); + int geo_get_addr_family (const char *addr); + char * geo_get_xff_ip (const struct sess *sp); + void geo_set_cache_control (const struct sess *sp); + + inline void geo_init () { + if (gi == NULL) { gi = GeoIP_open("/usr/share/GeoIP/GeoIPCity.dat", GEOIP_MMAP_CACHE); } } - getaddrfamily(const char *addr) { - struct addrinfo hint, *info=0; + + int geo_get_addr_family (const char *addr) { + struct addrinfo hint; + struct addrinfo *info = NULL; + int ret, result; + + if (addr == NULL) { + return -1; + } + memset(&hint, 0, sizeof(hint)); hint.ai_family = AF_UNSPEC; hint.ai_flags = AI_NUMERICHOST; - int ret = getaddrinfo(addr, 0, &hint, &info); - if (ret) { - freeaddrinfo(info); - return -1; - } - int result = info->ai_family; + + ret = getaddrinfo(addr, 0, &hint, &info); + result = ret ? -1 : info->ai_family; freeaddrinfo(info); return result; + } + + char * geo_get_xff_ip (const struct sess *sp) { + char *xff = VRT_GetHdr(sp, HDR_REQ, "\020X-Forwarded-For:"); + char *xff_list_item, *last; + + if (xff != NULL) { + xff_list_item = strtok_r(xff, ",", &last); + if (xff_list_item != NULL) { + return xff_list_item; + } + } + return xff; + } + + void geo_s
[MediaWiki-commits] [Gerrit] Send GeoIP lookup result as 'GeoIP' cookie - change (operations/puppet)
BBlack has submitted this change and it was merged. Change subject: Send GeoIP lookup result as 'GeoIP' cookie .. Send GeoIP lookup result as 'GeoIP' cookie If the incoming request did not include a cookie header with a GeoIP cookie, perform a GeoIP look-up and send it via Set-Cookie header. The format of the cookie is: Set-Cookie: GeoIP=CountryCode:City:Latitude:Longitude:AddressFamily; path=/ For example: Set-Cookie: GeoIP=US:San_Francisco:37.7749:-122.4194:v6; path=/ When GeoIP lookup fails, all fields are empty except the last (address family). For example: Set-Cookie: GeoIP=v4; path=/ Setting the cookie even on lookup failures is useful for two reasons: * It ensures the IP is not looked up again for the remainder of the current browser session. * The address family can be used by JavaScript code to determine whether the user is possibly dual-stack, in which case a separate request can be made to geoip.wikimedia.org (which is IPv4-only, and thus forces dual-stack users to connect via IPv4). If the response already contains a Set-Cookie header, the GeoIP cookie is added to it. Change-Id: Ic4d2fccbc1b5f674997e2aee6929d2f935c5a870 --- M templates/varnish/geoip.inc.vcl.erb M templates/varnish/text-frontend.inc.vcl.erb 2 files changed, 59 insertions(+), 0 deletions(-) Approvals: BBlack: Looks good to me, approved jenkins-bot: Verified diff --git a/templates/varnish/geoip.inc.vcl.erb b/templates/varnish/geoip.inc.vcl.erb index 8284007..4ee2007 100644 --- a/templates/varnish/geoip.inc.vcl.erb +++ b/templates/varnish/geoip.inc.vcl.erb @@ -18,6 +18,7 @@ void geo_init(); int geo_get_addr_family (const char *addr); char * geo_get_xff_ip (const struct sess *sp); + char * geo_sanitize_for_cookie (char *string); void geo_set_cache_control (const struct sess *sp); inline void geo_init () { @@ -56,6 +57,16 @@ } } return xff; + } + + char * geo_sanitize_for_cookie (char *string) { + char *ptr; + for (ptr = string; *ptr; ptr++) { + if (strchr(";, ", *ptr)) { + *ptr = '_'; + } + } + return string; } void geo_set_cache_control (const struct sess *sp) { @@ -102,3 +113,47 @@ geo_set_cache_control(sp); }C } + + +sub geoip_cookie { + C{ + GeoIPRecord *record; + char *set_cookie_header, *cookie; + char latlon[20]; + + char *ip = geo_get_xff_ip(sp); + int af = geo_get_addr_family(ip); + if (af == -1) { + ip = VRT_IP_string(sp, VRT_r_client_ip(sp)); + af = geo_get_addr_family(ip); + } + + geo_init(); + record = GeoIP_record_by_addr(gi, ip); + + if (record) { + /* Set-Cookie: GeoIP=US:San_Francisco:37.7749:-122.4194:v6; path=/ */ + snprintf(latlon, sizeof(latlon), "%.4f:%.4f", record->latitude, record->longitude); + cookie = VRT_WrkString(sp, "GeoIP=", + record->country_code, ":", + geo_sanitize_for_cookie(record->city), ":", + latlon, ":", + AF_INET6 ? "v6" : "v4", "; path=/", + vrt_magic_string_end); + GeoIPRecord_delete(record); + } else { + /* Set-Cookie: GeoIP=v6; path=/ */ + cookie = VRT_WrkString(sp, "GeoIP=", AF_INET6 ? "v6" : "v4", + "; path=/", vrt_magic_string_end); + } + + set_cookie_header = VRT_GetHdr(sp, HDR_RESP, "\013set-cookie:"); + if (set_cookie_header == NULL) { + // New header + VRT_SetHdr(sp, HDR_RESP, "\013Set-Cookie:", cookie, vrt_magic_string_end); + } else { + // Append to existing header + VRT_SetHdr(sp, HDR_RESP, "\013Set-Cookie:", set_cookie_header, "; ", cookie, vrt_magic_string_end); + } + }C +} diff --git a/templates/varnish/text-frontend.inc.vcl.erb b/templates/varnish/text-frontend.inc.vcl.erb index 602e53f..1c2d37a 100644 --- a/templates/varnish/text-frontend.inc.vcl.erb +++ b/templates/varnish/text-frontend.inc.vcl.erb @@ -129,4 +129,8 @@ && req.url !~ "(?i)bcache=1") { set resp.http.Cache-Control = "private, s-maxage=0, max-age=0, must-revalidate"; } + /* Perform GeoIP look-up and send the result as a session cookie */ + if (req.http.Cookie !~ "(^
[MediaWiki-commits] [Gerrit] Functional segmentation - change (mediawiki...ContentTranslation)
jenkins-bot has submitted this change and it was merged. Change subject: Functional segmentation .. Functional segmentation Change-Id: I0aa31a0e5035f124910b41f4a4f8a72cab969c73 --- M server/models/dataModelManager.js M server/public/index.html M server/public/js/main.js A server/segmentation/CXSegmenter.js A server/segmentation/linkSegmenter.js A server/segmentation/paragraphSegmenter.js A server/segmentation/segmenter.js A server/segmentation/sentenceSegmenter.js 8 files changed, 279 insertions(+), 16 deletions(-) Approvals: KartikMistry: Looks good to me, approved jenkins-bot: Verified diff --git a/server/models/dataModelManager.js b/server/models/dataModelManager.js index 9c60840..346bd62 100644 --- a/server/models/dataModelManager.js +++ b/server/models/dataModelManager.js @@ -1,13 +1,15 @@ /** * ContentTranslation Server - -* @file + * + * @file * @ingroup Extensions * @copyright See AUTHORS.txt * @license GPL-2.0+ */ 'use strict'; + +var CXSegmenter = require( __dirname + '/../segmentation/CXSegmenter.js' ).CXSegmenter; /** * CXDataModelManager @@ -23,19 +25,18 @@ * Initialize */ CXDataModelManager.prototype.init = function () { - var dataModelManager = this; + var dataModelManager = this, segmenter; + segmenter = new CXSegmenter( this.context.sourceText ); + segmenter.segment(); this.dataModel = { version: 0, - sourceLang: this.context.sourceLanguage, - targetLang: this.context.targetLanguage, + sourceLanguage: this.context.sourceLanguage, + targetLanguage: this.context.targetLanguage, sourceLocation: this.context.sourceTitle, - segments: [], - segmentedContent: [], - segmentCount: 0, - dictionary: null, - glossary: null, - links: null + segments: segmenter.getSegments(), + segmentedContent: segmenter.getSegmentedContent(), + links: segmenter.getLinks() }; dataModelManager.refresh(); }; diff --git a/server/public/index.html b/server/public/index.html index c38253c..da8c352 100644 --- a/server/public/index.html +++ b/server/public/index.html @@ -33,9 +33,14 @@ color: green; font-size: 0.8em; } - .segment:hover { + .cx-segment:hover { background-color: #ccc; } + + .cx-link:hover { + background-color: #aaa; + } + .sourceText { clear: both; } @@ -52,7 +57,8 @@ - Hydrogen is a chemical element with chemical symbol H and atomic number 1. With an atomic weight of 1.00794 u, hydrogen is the lightest element on the periodic table. Its monatomic form (H) is the most abundant chemical substance in the universe, constituting roughly 75% of all baryonic mass.Non-remnant stars are mainly composed of hydrogen in its plasma state. The most common isotope of hydrogen, termed protium (name rarely used, symbol 1H), has a single proton and zero neutrons. + Hydrogen is a chemical element with chemical symbol H and atomic number 1. With an atomic weight of 1.00794 u, hydrogen is the lightest element on the periodic table. Its monatomic form (H) is the most abundant chemical substance in the universe, constituting roughly 75% of all baryonic mass.[7][note 1] Non-remnant stars are mainly composed of hydrogen in its plasma state. The most common isotope of hydrogen, termed protium (name rarely used, symbol 1H), has a single proton and zero neutrons. + The universal emergence of atomic hydrogen first occurred during the recombination epoch. At standard temperature and pressure, hydrogen is a colorless, odorless, tasteless, non-toxic, nonmetallic, highly combustible diatomic gas with the molecular formula H2. Since hydrogen readily forms covalent compounds with most non-metallic elements, most of the hydrogen on Earth exists in molecular forms such as in the form of water or organic compounds. Hydrogen plays a particularly important role in acid–base reactions. In ionic compounds, hydrogen can take the form of a negative charge (i.e., anion) known as a hydride, or as a positively charged (i.e., cation) species denoted by the symbol H+. The hydrogen cation is written as though composed of a bare proton, but in reality, hydrogen cations in ionic compounds are always more complex species than that would suggest. Submit diff --git a/server/public/js/main.js b/server/public/js/main.js index 349bb31..82e17ed 100644 --- a/server/public/js/main.js +++ b/server/p
[MediaWiki-commits] [Gerrit] Initial commit of pmacct module and role - change (operations/puppet)
Jkrauska has uploaded a new change for review. https://gerrit.wikimedia.org/r/115345 Change subject: Initial commit of pmacct module and role .. Initial commit of pmacct module and role Change-Id: I44f02a7911ac8f596f78ea0a6ae5a61c72e75e5c --- A manifests/role/pmacct.pp A modules/pmacct/README.txt A modules/pmacct/manifests/configs.pp A modules/pmacct/manifests/init.pp A modules/pmacct/manifests/install.pp A modules/pmacct/templates/config.erb 6 files changed, 337 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/45/115345/1 diff --git a/manifests/role/pmacct.pp b/manifests/role/pmacct.pp new file mode 100644 index 000..3d52370 --- /dev/null +++ b/manifests/role/pmacct.pp @@ -0,0 +1,93 @@ +# manifests/role/pmacct.pp + +class role::pmacct { +system::role { 'role::pmacct': + description => '(network monitoring) flow accounting ' } + +$db_host = '127.0.01' +$db_name = 'pmacct' +$db_user = 'pmacct' +$db_pass = 'pmacct' + +# Behave differently in labs from production +case $::realm { +'labs': { +$agents = { +# tpa - as65001 +cr1-sdtpa => { +port => '6001', +ip => '208.80.152.196', +samplerate => '200', +}, +testing => { +port => '123', +ip => '123.123.123.123', +samplerate => '123', +}, +} # end of agents +} +'production': { +$agents = { +# tpa - as65001 +cr1-sdtpa => { +port => '6511', +ip => '208.80.152.196', +samplerate => '200', +}, +# Currently running old JunOS and will not sample correctly +#cr2-pmtpa => { +#port => '6512', +#ip => '208.80.152.197', +#samplerate => '1000', +#}, + +# eqiad - as65002 +cr1-eqiad => { +port => '6521', +ip => '208.80.154.196', +samplerate => '1000', +}, +cr2-eqiad => { +port => '6522', +ip => '208.80.154.197', +samplerate => '1000', +}, + +# ulsfo - as65003 +cr1-ulsfo => { +port => '6531', +ip => '198.35.26.192', +samplerate => '1000', +}, +cr2-ulsfo => { +port => '6532', +ip => '198.35.26.193', +samplerate => '1000', +}, + +# ams - as43821 +cr1-esams => { +port => '4381', +ip => '91.198.174.245', +samplerate => '1000', +}, +cr2-knams => { +port => '4382', +ip => '91.198.174.246', +samplerate => '1000', +} +} # end of agents + +} +default: { +fail('unknown realm, should be labs or production') +} +} + +# module +class { '::pmacct': +agents => $agents, +} + +} + diff --git a/modules/pmacct/README.txt b/modules/pmacct/README.txt new file mode 100644 index 000..c303a4a --- /dev/null +++ b/modules/pmacct/README.txt @@ -0,0 +1,63 @@ +# mysql schema is also necessary -- documenting here + +#drop database if exists pmacct; +#create database pmacct; + +use pmacct; + +drop table if exists traffic_by_asn; +create table if not exists traffic_by_asn ( +agent_id INT(4) UNSIGNED NOT NULL, +as_dst INT(4) UNSIGNED NOT NULL, + as_path CHAR(21) NOT NULL, + peer_as_dst INT(4) UNSIGNED NOT NULL, +packets INT UNSIGNED NOT NULL, + bytes BIGINT UNSIGNED NOT NULL, + stamp_inserted DATETIME NOT NULL, + stamp_updated DATETIME, + PRIMARY KEY (agent_id, as_dst, as_path, peer_as_dst, stamp_inserted) +); + +drop table if exists traffic_by_country; +create table if not exists traffic_by_country ( + agent_id INT(4) UNSIGNED NOT NULL, + country_ip_dst CHAR(2) NOT NULL, + packets INT UNSIGNED NOT NULL, + bytes BIGINT UNSIGNED NOT NULL, + stamp_inserted DATETIME NOT NULL, + stamp_updated DATETIME, + PRIMARY KEY (agent_id, country_ip_dst, stamp_inserted) +); + +drop table if exists traffic_by_sourceport; +create table if not exists traffic_by_sourceport ( +
[MediaWiki-commits] [Gerrit] Fix address family determination in GeoIP cookie - change (operations/puppet)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/115344 Change subject: Fix address family determination in GeoIP cookie .. Fix address family determination in GeoIP cookie Follows Iea8941896. Change-Id: Ifae2b75c9b75e9b3a151c1b4ca71ddc4ceb0f390 --- M templates/varnish/geoip.inc.vcl.erb 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/44/115344/1 diff --git a/templates/varnish/geoip.inc.vcl.erb b/templates/varnish/geoip.inc.vcl.erb index 5d12d6e..424234e 100644 --- a/templates/varnish/geoip.inc.vcl.erb +++ b/templates/varnish/geoip.inc.vcl.erb @@ -148,18 +148,18 @@ record = GeoIP_record_by_addr(gi, ip); if (record) { - /* Set-Cookie: GeoIP=US:San_Francisco:37.7749:-122.4194:v6; path=/ */ + /* Set-Cookie: GeoIP=US:San_Francisco:37.7749:-122.4194:v4; path=/ */ snprintf(latlon, sizeof(latlon), "%.4f:%.4f", record->latitude, record->longitude); cookie = VRT_WrkString(sp, "GeoIP=", record->country_code, ":", geo_sanitize_for_cookie(record->city), ":", latlon, ":", - AF_INET6 ? "v6" : "v4", "; path=/", + (af == AF_INET6) ? "v6" : "v4", "; path=/", vrt_magic_string_end); GeoIPRecord_delete(record); } else { /* Set-Cookie: GeoIP=v6; path=/ */ - cookie = VRT_WrkString(sp, "GeoIP=", AF_INET6 ? "v6" : "v4", + cookie = VRT_WrkString(sp, "GeoIP=", (af == AF_INET6) ? "v6" : "v4", "; path=/", vrt_magic_string_end); } -- To view, visit https://gerrit.wikimedia.org/r/115344 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifae2b75c9b75e9b3a151c1b4ca71ddc4ceb0f390 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] jquery.delayedBind → jquery.throttle-debounce - change (mediawiki...MassMessage)
jenkins-bot has submitted this change and it was merged. Change subject: jquery.delayedBind → jquery.throttle-debounce .. jquery.delayedBind → jquery.throttle-debounce The former was deprecated in core. This breaks compatibility with MW<1.23. Change-Id: Ib1496e3c7abcd72c7abd7521061abf5042208eb3 --- M MassMessage.php M modules/ext.MassMessage.badhtml.js 2 files changed, 4 insertions(+), 4 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/MassMessage.php b/MassMessage.php index f7ba866..ea345ad 100644 --- a/MassMessage.php +++ b/MassMessage.php @@ -58,7 +58,7 @@ 'author' => 'Kunal Mehta', 'url' => 'https://www.mediawiki.org/wiki/Extension:MassMessage', 'descriptionmsg' => 'massmessage-desc', - 'version' => '0.0.2', + 'version' => '0.0.3', ); $dir = dirname( __FILE__ ); @@ -99,7 +99,7 @@ 'dependencies' => array( 'jquery.byteLimit', 'jquery.ui.autocomplete', - 'jquery.delayedBind', + 'jquery.throttle-debounce', 'mediawiki.jqueryMsg', ), 'localBasePath' => $dir . '/modules', diff --git a/modules/ext.MassMessage.badhtml.js b/modules/ext.MassMessage.badhtml.js index a4acbf4..5efa7d2 100644 --- a/modules/ext.MassMessage.badhtml.js +++ b/modules/ext.MassMessage.badhtml.js @@ -12,7 +12,7 @@ .addClass( 'warningbox' ); $msg.after( $warnings ); $warnings.hide(); - $msg.delayedBind( 500, 'keyup', function( ) { + $msg.on( 'keyup', $.debounce( 500, function( ) { var code, matches, tags, possibles, tag; code = $.trim( $msg.val() ); if( code === '' ) { @@ -65,7 +65,7 @@ } else { $warnings.hide(); } - }); + } ) ); }); }( mediaWiki, jQuery ) ); -- To view, visit https://gerrit.wikimedia.org/r/115222 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib1496e3c7abcd72c7abd7521061abf5042208eb3 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/MassMessage Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński Gerrit-Reviewer: Legoktm Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Format GeoIP VCL C code for consistency with Varnish - change (operations/puppet)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/115343 Change subject: Format GeoIP VCL C code for consistency with Varnish .. Format GeoIP VCL C code for consistency with Varnish The only significant change is the removal of 'inline' from the declaration of geo_init. Change-Id: Iea8941896ba711ce00a927d49a35526782baa286 --- M templates/varnish/geoip.inc.vcl.erb 1 file changed, 30 insertions(+), 14 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/43/115343/1 diff --git a/templates/varnish/geoip.inc.vcl.erb b/templates/varnish/geoip.inc.vcl.erb index 4ee2007..5d12d6e 100644 --- a/templates/varnish/geoip.inc.vcl.erb +++ b/templates/varnish/geoip.inc.vcl.erb @@ -21,13 +21,15 @@ char * geo_sanitize_for_cookie (char *string); void geo_set_cache_control (const struct sess *sp); - inline void geo_init () { + void + geo_init() { if (gi == NULL) { gi = GeoIP_open("/usr/share/GeoIP/GeoIPCity.dat", GEOIP_MMAP_CACHE); } } - int geo_get_addr_family (const char *addr) { + int + geo_get_addr_family(const char *addr) { struct addrinfo hint; struct addrinfo *info = NULL; int ret, result; @@ -46,7 +48,12 @@ return result; } - char * geo_get_xff_ip (const struct sess *sp) { + /* +* Return the first IP address from the X-Forwarded-For header of the +* incoming request, or NULL if no such header was set. +*/ + char * + geo_get_xff_ip(const struct sess *sp) { char *xff = VRT_GetHdr(sp, HDR_REQ, "\020X-Forwarded-For:"); char *xff_list_item, *last; @@ -59,17 +66,26 @@ return xff; } - char * geo_sanitize_for_cookie (char *string) { - char *ptr; - for (ptr = string; *ptr; ptr++) { - if (strchr(";, ", *ptr)) { - *ptr = '_'; + /* +* Make a string safe to use as a cookie value in a Set-Cookie header by +* replacing characters that are disallowed by RFC 6265 with underscores. +*/ + char * + geo_sanitize_for_cookie(char *string) { + char *ptr; + for (ptr = string; *ptr; ptr++) { + if (strchr(";, ", *ptr)) { + *ptr = '_'; + } } - } - return string; + return string; } - void geo_set_cache_control (const struct sess *sp) { + /* +* Set Last-Modified and Cache-Control headers for GeoIP requests. +*/ + void + geo_set_cache_control(const struct sess *sp) { char *now = VRT_time_string(sp, VRT_r_now(sp)); VRT_SetHdr(sp, HDR_OBJ, "\016Last-Modified:", now, vrt_magic_string_end); VRT_SetHdr(sp, HDR_OBJ, "\016Cache-Control:", "private, max-age=86400, s-maxage=0", vrt_magic_string_end); @@ -135,10 +151,10 @@ /* Set-Cookie: GeoIP=US:San_Francisco:37.7749:-122.4194:v6; path=/ */ snprintf(latlon, sizeof(latlon), "%.4f:%.4f", record->latitude, record->longitude); cookie = VRT_WrkString(sp, "GeoIP=", - record->country_code, ":", - geo_sanitize_for_cookie(record->city), ":", + record->country_code, ":", + geo_sanitize_for_cookie(record->city), ":", latlon, ":", - AF_INET6 ? "v6" : "v4", "; path=/", + AF_INET6 ? "v6" : "v4", "; path=/", vrt_magic_string_end); GeoIPRecord_delete(record); } else { -- To view, visit https://gerrit.wikimedia.org/r/115343 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iea8941896ba711ce00a927d49a35526782baa286 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] Add a script that updates labs instances after migration. - change (operations/puppet)
Andrew Bogott has uploaded a new change for review. https://gerrit.wikimedia.org/r/115342 Change subject: Add a script that updates labs instances after migration. .. Add a script that updates labs instances after migration. This script will do nothing in tampa. Once an instance is moved to eqiad the script will run once, then never again. It fixes resolv.conf and puppet for the new dc. Change-Id: I7aed392e9935ff26a5f61df6d7487d474d02a731 --- A files/labs/migrate/migrate_firstboot.sh A files/labs/migrate/rc.local M manifests/role/labs.pp 3 files changed, 48 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/42/115342/1 diff --git a/files/labs/migrate/migrate_firstboot.sh b/files/labs/migrate/migrate_firstboot.sh new file mode 100755 index 000..7fd8d46 --- /dev/null +++ b/files/labs/migrate/migrate_firstboot.sh @@ -0,0 +1,24 @@ +#!/bin/bash +set -x + +FLAG="/var/log/migratefirstboot.log" +if [ ! -f $FLAG ]; then +ip=`hostname -i` +if ( echo $ip | grep -qG "10.68." ); then +echo "Detected first boot in eqiad." + +echo "Updating puppet host and cert" +id=`curl http://169.254.169.254/1.0/meta-data/instance-id 2> /dev/null` +idfqdn=${id}.eqiad.wmflabs +master=virt1000.wikimedia.org +sed -i "s/virt0.wikimedia.org/${master}/g" /etc/puppet/puppet.conf +sed -i "s/^certname = .*$/certname = ${idfqdn}/g" /etc/puppet/puppet.conf +find /var/lib/puppet -type f -print0 |xargs -0r rm + +echo "forcing a puppet run" + puppet agent --onetime --verbose --no-daemonize --no-splay --show_diff --waitforcert=10 + +echo "Marking our work as done and rebooting" +touch $FLAG +fi +fi diff --git a/files/labs/migrate/rc.local b/files/labs/migrate/rc.local new file mode 100644 index 000..a59c359 --- /dev/null +++ b/files/labs/migrate/rc.local @@ -0,0 +1,3 @@ +#!/bin/sh -e +/root/migrate_firstboot.sh +exit 0 diff --git a/manifests/role/labs.pp b/manifests/role/labs.pp index 2568a73..ba02805 100644 --- a/manifests/role/labs.pp +++ b/manifests/role/labs.pp @@ -112,5 +112,26 @@ } } + +# Temporary hacks for migration to eqiad: +file { '/root/migrate_firstboot.sh': +ensure => present, +owner => root, +group => root, +mode => 0755, +source => 'puppet:///files/labs/migrate/migrate_firstboot.sh', +} +file { '/etc/rc.local': +ensure => present, +owner => root, +group => root, +mode => 0755, +source => 'puppet:///files/labs/migrate/rc.local', +} + +file { '/root/migrate_firstboot.sh': +ensure => directory, owner => 'root', group => 'root', mode => '0755', +require => File['/public'], +} } -- To view, visit https://gerrit.wikimedia.org/r/115342 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7aed392e9935ff26a5f61df6d7487d474d02a731 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Andrew Bogott ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove dependence upon $wgPasswordSenderName - change (mediawiki...Echo)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/115341 Change subject: Remove dependence upon $wgPasswordSenderName .. Remove dependence upon $wgPasswordSenderName Fallback to 'emailsender' message if not set Change-Id: Id136692b80b7582a515501672259394e8db74112 Follows-Up: Id20e4ec1cdae94fadb278146cd72d5a9b247dccf --- M Echo.php M Hooks.php 2 files changed, 9 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/41/115341/1 diff --git a/Echo.php b/Echo.php index 721c84a..910aaed 100644 --- a/Echo.php +++ b/Echo.php @@ -273,7 +273,8 @@ // Should be defined in LocalSettings.php $wgNotificationSender = $wgPasswordSender; // Name for "from" on email notifications. Should be defined in LocalSettings.php -$wgNotificationSenderName = $wgPasswordSenderName; +// if null, uses 'emailsender' message +$wgNotificationSenderName = null; // Name for "reply to" on email notifications. Should be defined in LocalSettings.php $wgNotificationReplyName = 'No Reply'; diff --git a/Hooks.php b/Hooks.php index 6ef847e..689bf74 100644 --- a/Hooks.php +++ b/Hooks.php @@ -14,7 +14,8 @@ */ public static function initEchoExtension() { global $wgEchoBackend, $wgEchoBackendName, $wgEchoNotifications, - $wgEchoNotificationCategories, $wgEchoNotificationIcons, $wgEchoConfig; + $wgEchoNotificationCategories, $wgEchoNotificationIcons, $wgEchoConfig, + $wgNotificationSenderName; // allow extensions to define their own event wfRunHooks( 'BeforeCreateEchoEvent', array( &$wgEchoNotifications, &$wgEchoNotificationCategories, &$wgEchoNotificationIcons ) ); @@ -29,6 +30,11 @@ } } } + + if ( $wgNotificationSenderName === null ) { + $wgNotificationSenderName = wfMessage( 'emailsender' )->inContentLanguage()->text(); + } + } /** -- To view, visit https://gerrit.wikimedia.org/r/115341 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id136692b80b7582a515501672259394e8db74112 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: Legoktm ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make jqueryMsg a dependency of ext.uls.interface - change (mediawiki...UniversalLanguageSelector)
Amire80 has uploaded a new change for review. https://gerrit.wikimedia.org/r/115340 Change subject: Make jqueryMsg a dependency of ext.uls.interface .. Make jqueryMsg a dependency of ext.uls.interface The message ext-uls-undo-language-tooltip-text uses GRAMMAR, so it needs jqueryMsg. Change-Id: I40225fa72ac0049163cc1ef29e8cbc086831e3d1 --- M Resources.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/40/115340/1 diff --git a/Resources.php b/Resources.php index c504361..2097e37 100644 --- a/Resources.php +++ b/Resources.php @@ -108,6 +108,7 @@ 'dependencies' => array( 'ext.uls.init', 'jquery.tipsy', + 'mediawiki.jqueryMsg', 'mediawiki.user', // We can not delay webfonts loading since it is required // immediately after page load -- To view, visit https://gerrit.wikimedia.org/r/115340 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I40225fa72ac0049163cc1ef29e8cbc086831e3d1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Amire80 ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Flow: use the default link and redlink colors for usernames ... - change (mediawiki...Flow)
MZMcBride has uploaded a new change for review. https://gerrit.wikimedia.org/r/115339 Change subject: Flow: use the default link and redlink colors for usernames above posts .. Flow: use the default link and redlink colors for usernames above posts Bug: 61890 Change-Id: I5fdf7543a48e478ee36e4b1cc774d6f70d80306b --- M modules/discussion/styles/settings/colors.less 1 file changed, 0 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/39/115339/1 diff --git a/modules/discussion/styles/settings/colors.less b/modules/discussion/styles/settings/colors.less index 40dfef1..0b6f843 100644 --- a/modules/discussion/styles/settings/colors.less +++ b/modules/discussion/styles/settings/colors.less @@ -4,7 +4,3 @@ @post-title-color: #3c68b1; @post-content-color: #333; - -@username-color: #3C68B1; -// Normal redlink colour -@username-redlink-color: #a55858; -- To view, visit https://gerrit.wikimedia.org/r/115339 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5fdf7543a48e478ee36e4b1cc774d6f70d80306b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: MZMcBride Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Some minor optimizations when checking permissions - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: Some minor optimizations when checking permissions .. Some minor optimizations when checking permissions Change-Id: I46b7310302c3d6c1be7e3e0fa0879a1ad6b57ed3 --- M includes/RevisionActionPermissions.php 1 file changed, 4 insertions(+), 2 deletions(-) Approvals: EBernhardson: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/RevisionActionPermissions.php b/includes/RevisionActionPermissions.php index bb3eb56..adffc1e 100644 --- a/includes/RevisionActionPermissions.php +++ b/includes/RevisionActionPermissions.php @@ -57,7 +57,8 @@ $allowed = $this->isRevisionAllowed( $revision, $action ); // if there was no revision object, it's pointless to find last revision - if ( $revision === null ) { + // if we already fail, no need in checking most recent revision status + if ( $revision === null || !$allowed ) { return $allowed; } @@ -67,7 +68,8 @@ // current state of an object, so checking against a revision at one // point in time alone isn't enough. $last = $revision->getCollection()->getLastRevision(); - return $allowed && $this->isRevisionAllowed( $last, $action ); + $isLastRevision = $last->getRevisionId()->equals( $revision->getRevisionId() ); + return $allowed && ( $isLastRevision || $this->isRevisionAllowed( $last, $action ) ); // If data is not in storage, just return that revision's status } catch ( InvalidDataException $e ) { -- To view, visit https://gerrit.wikimedia.org/r/114992 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I46b7310302c3d6c1be7e3e0fa0879a1ad6b57ed3 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Matthias Mullie Gerrit-Reviewer: EBernhardson Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Bind to specific elements instead of random - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: Bind to specific elements instead of random .. Bind to specific elements instead of random this.$container can be whatever. It'll be whatever node .trigger( 'flow_init' ) is called upon. On init, that is $( document ) After moderation, that'll be .flow-post or flow-topic-container Because this.$container is not consistent, we can't rely on it to .on (and especially) .off event handlers. Initially, we bind to $( document ), then after moderation, we try to .off existing handlers on e.g. .flow-post, and bind the event anew. Result, no handlers were removed (there was nothing to .off on that element), and the handler is bound a second time, to another node. End result: things like double-collapse (immediately expand/ collapse) because a click is handled twice. Change-Id: I5c45b53bceb54386901cf24526d46383ada25804 --- M modules/discussion/ui.js 1 file changed, 8 insertions(+), 5 deletions(-) Approvals: EBernhardson: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/discussion/ui.js b/modules/discussion/ui.js index 4944fc5..cd1808b 100644 --- a/modules/discussion/ui.js +++ b/modules/discussion/ui.js @@ -126,6 +126,12 @@ $( this ).data( 'flow-initialised-topic', true ); } + + $( this ).find( '.flow-titlebar' ) + // Remove old event handlers + .off( '.mw-flow-discussion' ) + // On topic titlebar click, trigger collapse/expand event + .on( 'click.mw-flow-discussion', mw.flow.action.ui.titlebarClick ); } ); // init post interaction @@ -146,13 +152,10 @@ } } ); - this.$container - // Remove old event handlers + this.$container.find( '.topic-collapser li' ) .off( '.mw-flow-discussion' ) - // On topic titlebar click, trigger collapse/expand event - .on( 'click.mw-flow-discussion', '.flow-titlebar', mw.flow.action.ui.titlebarClick ) // On topic collapser click, choose a different collapsing level - .on( 'click.mw-flow-discussion', '.topic-collapser li', mw.flow.action.ui.topicCollapserClick ); + .on( 'click.mw-flow-discussion', mw.flow.action.ui.topicCollapserClick ); }, /** -- To view, visit https://gerrit.wikimedia.org/r/114991 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5c45b53bceb54386901cf24526d46383ada25804 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Matthias Mullie Gerrit-Reviewer: EBernhardson Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Get rid of references to the no longer existing .flow-icon-p... - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: Get rid of references to the no longer existing .flow-icon-permalink .. Get rid of references to the no longer existing .flow-icon-permalink Change-Id: Ie361b8419fe459d4cc1491080c2c65ce8378a6df --- M modules/discussion/styles/post.less M modules/discussion/styles/topic.less M modules/discussion/ui.js 3 files changed, 1 insertion(+), 28 deletions(-) Approvals: EBernhardson: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/discussion/styles/post.less b/modules/discussion/styles/post.less index 5c9d349..8995613 100644 --- a/modules/discussion/styles/post.less +++ b/modules/discussion/styles/post.less @@ -109,13 +109,6 @@ padding-right: 22px; } - .flow-icon-permalink { - background-position: center; - background-size: 20px auto; - background-repeat: no-repeat; - .background-image-svg( ~"@{icon-path}permalink_hover_ltr.svg", ~"@{icon-path}permalink_hover_ltr.png" ); - } - .flow-post-interaction { padding-top: 11px; diff --git a/modules/discussion/styles/topic.less b/modules/discussion/styles/topic.less index 03f79e9..442eff3 100644 --- a/modules/discussion/styles/topic.less +++ b/modules/discussion/styles/topic.less @@ -214,13 +214,6 @@ .background-image-svg( ~"@{icon-path}edit_hover_ltr.svg", ~"@{icon-path}edit_hover_ltr.png" ); } - .flow-icon-permalink { - background-position: center; - background-size: 20px auto; - background-repeat: no-repeat; - .background-image-svg( ~"@{icon-path}permalink_hover_ltr.svg", ~"@{icon-path}permalink_hover_ltr.png" ); - } - .flow-icon-watchlist { background-position: center; background-size: 20px auto; diff --git a/modules/discussion/ui.js b/modules/discussion/ui.js index bd084a2..4944fc5 100644 --- a/modules/discussion/ui.js +++ b/modules/discussion/ui.js @@ -151,10 +151,8 @@ .off( '.mw-flow-discussion' ) // On topic titlebar click, trigger collapse/expand event .on( 'click.mw-flow-discussion', '.flow-titlebar', mw.flow.action.ui.titlebarClick ) - // On permalink click, go to topic or post and highlight it - .on( 'click.mw-flow-discussion', '.flow-icon-permalink', mw.flow.action.ui.permalinkClick) // On topic collapser click, choose a different collapsing level - .on( 'click.mw-flow-discussion', '.topic-collapser li', mw.flow.action.ui.topicCollapserClick); + .on( 'click.mw-flow-discussion', '.topic-collapser li', mw.flow.action.ui.topicCollapserClick ); }, /** @@ -301,7 +299,6 @@ var ignore = [ '.flow-edit-title-form', '.flow-actions', - '.flow-icon-permalink', '.flow-icon-watchlist', '.flow-topic-comments-link' ].join( ',' ), @@ -320,16 +317,6 @@ // Otherwise, collapse mw.flow.discussion.topicCollapse( $topicContainerChildren ); } - }, - - /** -* onclick handler for permalink anchors; triggers highlightElement on the target post or topic. -* @param {Event} event -*/ - permalinkClick: function ( event ) { - event.preventDefault(); - - mw.flow.discussion.highlightElement( $( this.hash ), 0 ); } }; -- To view, visit https://gerrit.wikimedia.org/r/114990 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie361b8419fe459d4cc1491080c2c65ce8378a6df Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Matthias Mullie Gerrit-Reviewer: EBernhardson 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 'change' event to MediaSizeWidget - change (VisualEditor/VisualEditor)
Mooeypoo has uploaded a new change for review. https://gerrit.wikimedia.org/r/115338 Change subject: Add 'change' event to MediaSizeWidget .. Add 'change' event to MediaSizeWidget Make sure other elements can respond to MediaSizeWidget's change event, fired on changing the current dimensions. Especially important for this commit: https://gerrit.wikimedia.org/r/#/c/114420/ Change-Id: Ie96fd7f64655a1ba89781e3a8106e580a4febebe --- M modules/ve/ui/widgets/ve.ui.MediaSizeWidget.js 1 file changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/38/115338/1 diff --git a/modules/ve/ui/widgets/ve.ui.MediaSizeWidget.js b/modules/ve/ui/widgets/ve.ui.MediaSizeWidget.js index 521da79..fe07778 100644 --- a/modules/ve/ui/widgets/ve.ui.MediaSizeWidget.js +++ b/modules/ve/ui/widgets/ve.ui.MediaSizeWidget.js @@ -110,6 +110,12 @@ OO.mixinClass( ve.ui.MediaSizeWidget, ve.Scalable ); +/* Events */ + +/** + * @event event + */ + /* Methods */ /** @@ -152,6 +158,8 @@ /** * Overridden from ve.Scalable to allow one dimension to be set * at a time, write values back to inputs and show any errors. + * + * @fires change */ ve.ui.MediaSizeWidget.prototype.setCurrentDimensions = function ( dimensions ) { // Recursion protection @@ -188,6 +196,8 @@ this.errorLabel.$element.toggle( !this.isCurrentDimensionsValid() ); this.$element.toggleClass( 've-ui-mediaSizeWidget-input-hasError', !this.isCurrentDimensionsValid() ); + // Emit change event + this.emit( 'change' ); this.preventChangeRecursion = false; }; -- To view, visit https://gerrit.wikimedia.org/r/115338 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie96fd7f64655a1ba89781e3a8106e580a4febebe Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Mooeypoo ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] (Bug 61715) Make history entries look at most recent revision - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: (Bug 61715) Make history entries look at most recent revision .. (Bug 61715) Make history entries look at most recent revision The problem with history thingies is that "restore" should not show up for users that can not view the permissions for what is restored. isAllowed will check the most recent revision to get some sort of "global allowed state" for a revision. Combined with the above, this would make any revision of a just-restored post be invisible. For that reason, I had made history (and RC) permission checks only do isRevisionAllowed. That's incorrect; they should also check last revision (but in a way that is actually correct - where the restore-aspect is ignored for the "global" moderation state) Bug: 61715 Change-Id: Ia27c94176bb8f40f2fe683a54ab9ddafb4f98fc0 --- M FlowActions.php M includes/Block/Header.php M includes/Block/Topic.php M includes/Formatter/CheckUser.php M includes/Formatter/Contributions.php M includes/Formatter/RecentChanges.php M includes/Log/Formatter.php M includes/RevisionActionPermissions.php M includes/Templating.php M tests/RevisionCollectionPermissionsTest.php 10 files changed, 78 insertions(+), 59 deletions(-) Approvals: EBernhardson: Looks good to me, approved jenkins-bot: Verified diff --git a/FlowActions.php b/FlowActions.php index a799372..b0731c2 100644 --- a/FlowActions.php +++ b/FlowActions.php @@ -371,14 +371,47 @@ 'log_type' => false, 'permissions' => array( PostRevision::MODERATED_NONE => function( AbstractRevision $revision, RevisionActionPermissions $permissions ) { - // if a revision was the result of a restore-action, we have - // to look at the previous revision what the original moderation - // status was; permissions for the restore-actions visibility - // is the same as the moderation (e.g. if user can't see - // suppress actions, he can't see restores from suppress + static $previousCollectionId; + + /* +* To check permissions, both the current revision (revision- +* specific moderation state)& the last revision (global +* collection moderation state) will always be checked. +* This one has special checks to make sure "restore" actions +* are hidden when the user has no permissions to see the +* moderation state they were restored from. +* We don't want that test to happen; otherwise, when a post +* has just been restored in the most recent revisions, that +* would result in none of the previous revisions being +* available (because a user would need permissions for the the +* state the last revision was restored from) +*/ + $collection = $revision->getCollection(); + if ( $previousCollectionId && $collection->getId()->equals( $previousCollectionId ) ) { + // doublecheck that this run is indeed against the most + // recent revision, to get the global collection state + try { + $lastRevision = $collection->getLastRevision(); + if ( $revision->getRevisionId()->equals( $lastRevision->getRevisionId() ) ) { + $previousCollectionId = null; + return ''; + } + } catch ( Exception $e ) { + // nothing to do here; if fetching last revision failed, + // we're just not testing any stored revision; that's ok + } + } + $previousCollectionId = $collection->getId(); + + /* +* If a revision was the result of a restore-action, we have +* to look at the previous revision what the original moderation +* status was; permissions for the restore-actions visibility +* is
[MediaWiki-commits] [Gerrit] Move cutting of index data into index code - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: Move cutting of index data into index code .. Move cutting of index data into index code Alternative fix to gerrit 112750, more performant but more invasive. Bug: 61066 Change-Id: I1a575c723790fdfea38d5670e7e50b223cdc856c --- M includes/Data/BoardHistoryStorage.php M includes/Data/ObjectManager.php M includes/Data/RevisionStorage.php 3 files changed, 159 insertions(+), 121 deletions(-) Approvals: Bsitu: Looks good to me, but someone else must approve EBernhardson: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Data/BoardHistoryStorage.php b/includes/Data/BoardHistoryStorage.php index 4d31793..6a5d5c1 100644 --- a/includes/Data/BoardHistoryStorage.php +++ b/includes/Data/BoardHistoryStorage.php @@ -113,18 +113,16 @@ return parent::findMulti( $queries, $options ); } - public function backingStoreFindMulti( array $queries, array $idxToKey, array $retval = array() ) { - $res = $this->storage->findMulti( $queries, $this->queryOptions() ); + public function backingStoreFindMulti( array $queries, array $cacheKeys ) { + $options = $this->queryOptions(); + $res = $this->storage->findMulti( $queries, $options ); if ( !$res ) { return false; } $res = reset( $res ); - - $this->cache->add( current( $idxToKey ), $this->rowCompactor->compactRows( $res ) ); - $retval[] = $res; - - return $retval; + $this->cache->add( current( $cacheKeys ), $this->rowCompactor->compactRows( $res ) ); + return array( $res ); } public function onAfterInsert( $object, array $new ) { diff --git a/includes/Data/ObjectManager.php b/includes/Data/ObjectManager.php index b2548b8..62fbde5 100644 --- a/includes/Data/ObjectManager.php +++ b/includes/Data/ObjectManager.php @@ -310,33 +310,17 @@ } catch ( NoIndexException $e ) { wfDebugLog( __CLASS__, __FUNCTION__ . ': ' . $e->getMessage() ); $res = $this->storage->findMulti( $queries, $this->convertToDbOptions( $options ) ); - $output = array(); - - foreach( $res as $index => $queryOutput ) { - $output[$index] = array_map( array( $this, 'load' ), $queryOutput ); - } - - return $output; } if ( $res === null ) { return null; } - $retval = array(); - foreach ( $res as $i => $rows ) { - list( $startPos, $limit ) = $this->getOffsetLimit( $rows, $index, $options ); - $keys = array_keys( $rows ); - for( - $k = $startPos; - $k < $startPos + $limit && $k < count( $keys ); - ++$k - ) { - $j = $keys[$k]; - $retval[$i][$j] = $this->load( $rows[$j] ); - } + $output = array(); + foreach( $res as $index => $queryOutput ) { + $output[$index] = array_map( array( $this, 'load' ), $queryOutput ); } - return $retval; + return $output; } /** @@ -456,76 +440,6 @@ } return $this->foundMulti( $queries ); - } - - /** -* @param $rows -* @param Index $index -* @param array $options -* @return array -*/ - protected function getOffsetLimit( $rows, Index $index, array $options ) { - $limit = isset( $options['limit'] ) ? $options['limit'] : $index->getLimit(); - - if ( ! isset( $options['offset-key'] ) ) { - $offset = isset( $options['offset'] ) ? $options['offset'] : 0; - return array( $offset, $limit ); - } - - $offsetKey = $options['offset-key']; - if ( $offsetKey instanceof UUID ) { - $offsetKey = $offsetKey->getBinary(); - } - - $dir = 'fwd'; - if ( - isset( $options['offset-dir'] ) && - $options['offset-dir'] === 'rev' - ) { - $dir = 'rev'; - } - - $offset = $this->getOffsetFromKey( $rows, $offsetKey, $index ); - - if ( $dir === 'fwd' ) { - $startPos = $offset + 1; - } elseif ( $dir === 'rev' ) { - $startPos =
[MediaWiki-commits] [Gerrit] Third level of nesting - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: Third level of nesting .. Third level of nesting * Notifications already work fine; every reply descendant of one of your posts, will trigger a notification * Fixed a bug with the reply form (could trigger multiple forms on # levels) Change-Id: Id2f63dc281d9495144013ba28df019f9e84531d1 --- M Flow.php M modules/discussion/post.js 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: EBernhardson: Looks good to me, approved jenkins-bot: Verified diff --git a/Flow.php b/Flow.php index aaafa9f..d9a35ac 100755 --- a/Flow.php +++ b/Flow.php @@ -297,7 +297,7 @@ $wgFlowOccupyNamespaces = array(); // Max threading depth -$wgFlowMaxThreadingDepth = 2; +$wgFlowMaxThreadingDepth = 3; // A list of editors to use, in priority order $wgFlowEditorList = array( 'none' ); // EXPERIMENTAL prepend 'visualeditor' diff --git a/modules/discussion/post.js b/modules/discussion/post.js index 681040f..cfa2dc2 100644 --- a/modules/discussion/post.js +++ b/modules/discussion/post.js @@ -266,7 +266,7 @@ // find matching edit form at (max threading depth - 1) this.$form = $( this.object.$container ) .closest( '.flow-post-container:not(.flow-post-max-depth)' ) - .find( '.flow-post-reply-container' ); + .find( '.flow-post-reply-container:last' ); // quit if reply form is already open if ( this.$form.is( ':visible' ) ) { -- To view, visit https://gerrit.wikimedia.org/r/115110 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id2f63dc281d9495144013ba28df019f9e84531d1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Matthias Mullie Gerrit-Reviewer: EBernhardson Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Identification of identifiers - change (mediawiki...MathSearch)
Physikerwelt has submitted this change and it was merged. Change subject: Identification of identifiers .. Identification of identifiers Change-Id: I2400975895fca5d61babe8703a237d5038f156dc --- M MathObject.php M MathSearch.hooks.php A db/mathsemantics.sql R db/snippets/CosProd.sql A db/snippets/createSentenceHash.sql R db/snippets/getNorm.sql A db/snippets/mathidentifier.view.sql A db/snippets/most_common_meanings.sql A runTestsOnVagrant 9 files changed, 74 insertions(+), 20 deletions(-) Approvals: Physikerwelt: Verified; Looks good to me, approved diff --git a/MathObject.php b/MathObject.php index a078c74..6034c95 100644 --- a/MathObject.php +++ b/MathObject.php @@ -72,7 +72,7 @@ $dbr = wfGetDB( DB_SLAVE ); try { $res = $dbr->select( 'mathpagesimilarity', array( 'pagesimilarity_A as A', 'pagesimilarity_B as B', 'pagesimilarity_Value as V' ), "pagesimilarity_A=$pid OR pagesimilarity_B=$pid", __METHOD__, array( - "ORDER BY" => 'V DESC', "LIMIT" => 10 ) + "ORDER BY" => 'V DESC', "LIMIT" => 10 ) ); foreach ( $res as $row ) { if ( $row->A == $pid ) { @@ -82,7 +82,7 @@ } $article = WikiPage::newFromId( $other ); $out .= '# [[' . $article->getTitle() . ']] similarity ' . - $row->V * 100 . "%\n"; + $row->V * 100 . "%\n"; // .' ( pageid'.$other.'/'.$row->A.')' ); } $wgOut->addWikiText( $out ); @@ -96,18 +96,18 @@ $dbr = wfGetDB( DB_SLAVE ); try { $res = $dbr->select( array( "mathobservation", "mathvarstat", 'mathpagestat' ) - , array( "mathobservation_featurename", "mathobservation_featuretype", 'varstat_featurecount', - 'pagestat_featurecount', "count(*) as localcnt" ), array( "mathobservation_inputhash" => $this->getInputHash(), - 'varstat_featurename = mathobservation_featurename', - 'varstat_featuretype = mathobservation_featuretype', - 'pagestat_pageid' => $this->getPageID(), - 'pagestat_featureid = varstat_id' - ) - , __METHOD__, array( 'GROUP BY' => 'mathobservation_featurename', - 'ORDER BY' => 'varstat_featurecount' ) + , array( "mathobservation_featurename", "mathobservation_featuretype", 'varstat_featurecount', + 'pagestat_featurecount', "count(*) as localcnt" ), array( "mathobservation_inputhash" => $this->getInputHash(), + 'varstat_featurename = mathobservation_featurename', + 'varstat_featuretype = mathobservation_featuretype', + 'pagestat_pageid' => $this->getPageID(), + 'pagestat_featureid = varstat_id' + ) + , __METHOD__, array( 'GROUP BY' => 'mathobservation_featurename', + 'ORDER BY' => 'varstat_featurecount' ) ); } catch ( Exception $e ) { - return "Databaseproblem"; + return "Database problem"; } $wgOut->addWikiText($res->numRows(). 'results'); if ($res->numRows() == 0){ @@ -117,10 +117,31 @@ if ( $res ) { foreach ( $res as $row ) { $wgOut->addWikiText( '*' . $row->mathobservation_featuretype . ' ' . - utf8_decode( $row->mathobservation_featurename ) . ' (' . $row->localcnt . '/' - . $row->pagestat_featurecount . "/" . $row->varstat_featurecount . ')' ); + utf8_decode( $row->mathobservation_featurename ) . ' (' . $row->localcnt . '/' + . $row->pagestat_featurecount . "/" . $row->varstat_featurecount . ')' ); + $identifiers = $this->getNouns(utf8_decode( $row->mathobservation_featurename )) ; + if ( $identifiers ){ + foreach($identifiers as $identifier){ + $wgOut->addWikiText('**'
[MediaWiki-commits] [Gerrit] Fix overlay header shifting on iOS in VE - change (mediawiki...MobileFrontend)
JGonera has uploaded a new change for review. https://gerrit.wikimedia.org/r/115337 Change subject: Fix overlay header shifting on iOS in VE .. Fix overlay header shifting on iOS in VE Calculate header position in JS when virtual keyboard is open. Hide header when scrolling starts and show it when it ends (unfortunately mobile Safari sends scroll events only when scrolling finishes). Bug: 61240 Change-Id: Id9c56586bb27d2798e35e76614423d103a775d3c --- M javascripts/common/OverlayNew.js M javascripts/modules/editor/VisualEditorOverlay.js M less/common/OverlayNew.less M templates/OverlayNew.html M templates/modules/editor/EditorOverlayBase.html M templates/modules/search/SearchOverlay.html 6 files changed, 43 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/37/115337/1 diff --git a/javascripts/common/OverlayNew.js b/javascripts/common/OverlayNew.js index 07d72da..6cdb23a 100644 --- a/javascripts/common/OverlayNew.js +++ b/javascripts/common/OverlayNew.js @@ -1,5 +1,5 @@ // FIXME: merge with Overlay and remove when OverlayNew gets to stable -( function( M ) { +( function( M, $ ) { var Overlay = M.require( 'Overlay' ), OverlayNew; /** @@ -17,18 +17,32 @@ }, postRender: function( options ) { - var self = this; this._super( options ); + this._fixIosHeader( 'textarea, input' ); + }, + + _fixIosHeader: function( el ) { + var $header = this.$( '.overlay-header-container' ), $window = $( window ); // This is used to avoid position: fixed weirdness in mobile Safari when // the keyboard is visible if ( ( /ipad|iphone/i ).test( navigator.userAgent ) ) { - this.$( 'textarea, input' ). + this.$( el ). on( 'focus', function() { - self.$( '.overlay-header-container' ).removeClass( 'position-fixed' ); + $header.css( 'top', $window.scrollTop() ).removeClass( 'position-fixed' ); + $window.on( 'scroll.fixIosHeader', function() { + $header.css( 'top', $window.scrollTop() ).addClass( 'visible' ); + } ); + $window.on( 'touchmove.fixIosHeader', function() { + // don't hide header if we're at the top + if ( $window.scrollTop() > 0 ) { + $header.removeClass( 'visible' ); + } + } ); } ). on( 'blur', function() { - self.$( '.overlay-header-container' ).addClass( 'position-fixed' ); + $header.css( 'top', 0 ).addClass( 'position-fixed visible' ); + $window.off( '.fixIosHeader' ); } ); } } @@ -36,4 +50,4 @@ M.define( 'OverlayNew', OverlayNew ); -}( mw.mobileFrontend ) ); +}( mw.mobileFrontend, jQuery ) ); diff --git a/javascripts/modules/editor/VisualEditorOverlay.js b/javascripts/modules/editor/VisualEditorOverlay.js index 2b662aa..52a826d 100644 --- a/javascripts/modules/editor/VisualEditorOverlay.js +++ b/javascripts/modules/editor/VisualEditorOverlay.js @@ -108,6 +108,13 @@ this.clearSpinner(); this.target.surface.getModel().getDocument().connect( this, { 'transact': 'onTransact' } ); this.target.surface.$element.addClass( 'content' ); + + // for some reason the first time contenteditables are focused, focus + // event doesn't fire if we don't blur them first + this.$( '[contenteditable]' ).blur(); + // we have to do it here because contenteditable elements still do not + // exist when postRender is executed + this._fixIosHeader( '[contenteditable]' ); }, onTransact: function () { this.hasChanged = true; diff --git a/less/common/OverlayNew.less b/less/common/OverlayNew.less index 915ea4c..80c708e 100644 --- a/less/common/Overlay
[MediaWiki-commits] [Gerrit] s1 direct api traffic to db1043 - change (operations/mediawiki-config)
Springle has uploaded a new change for review. https://gerrit.wikimedia.org/r/115336 Change subject: s1 direct api traffic to db1043 .. s1 direct api traffic to db1043 Change-Id: I4a688e4734462cb1d477bf3e6a8879f7a329861e --- M wmf-config/db-eqiad.php 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/36/115336/1 diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php index 6971d47..4e8a9d1 100644 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -90,7 +90,7 @@ # no pool 'db1050' => 0, # 2.8TB sas 64GB, snapshot # schema changes 'db1055' => 0, # watchlist, recentchangeslinked, contributions, logpager 'db1034' => 0, # watchlist, recentchangeslinked, contributions, logpager - 'db1043' => 0, # 1.4TB sas 64GB, vslow, dump + 'db1043' => 0, # 1.4TB sas 64GB, vslow, api, dump 'db1037' => 300, # 1.4TB sas 64GB 'db1049' => 300, # 2.8TB sas 64GB 'db1051' => 400, # 2.8TB sas 96GB @@ -299,6 +299,9 @@ 'vslow' => array( 'db1043' => 1, ), + 'api' => array( + 'db1043' => 1, + ), ), ), -- To view, visit https://gerrit.wikimedia.org/r/115336 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4a688e4734462cb1d477bf3e6a8879f7a329861e Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Springle ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] s1 direct api traffic to db1043 - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: s1 direct api traffic to db1043 .. s1 direct api traffic to db1043 Change-Id: I4a688e4734462cb1d477bf3e6a8879f7a329861e --- M wmf-config/db-eqiad.php 1 file changed, 4 insertions(+), 1 deletion(-) Approvals: Springle: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php index 6971d47..4e8a9d1 100644 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -90,7 +90,7 @@ # no pool 'db1050' => 0, # 2.8TB sas 64GB, snapshot # schema changes 'db1055' => 0, # watchlist, recentchangeslinked, contributions, logpager 'db1034' => 0, # watchlist, recentchangeslinked, contributions, logpager - 'db1043' => 0, # 1.4TB sas 64GB, vslow, dump + 'db1043' => 0, # 1.4TB sas 64GB, vslow, api, dump 'db1037' => 300, # 1.4TB sas 64GB 'db1049' => 300, # 2.8TB sas 64GB 'db1051' => 400, # 2.8TB sas 96GB @@ -299,6 +299,9 @@ 'vslow' => array( 'db1043' => 1, ), + 'api' => array( + 'db1043' => 1, + ), ), ), -- To view, visit https://gerrit.wikimedia.org/r/115336 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4a688e4734462cb1d477bf3e6a8879f7a329861e Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Springle Gerrit-Reviewer: Springle Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Test and bugfix of qvar (?x) support - change (mediawiki...MathSearch)
jenkins-bot has submitted this change and it was merged. Change subject: Test and bugfix of qvar (?x) support .. Test and bugfix of qvar (?x) support * fix missing registration of phpunit tests Change-Id: I8d9a0a63418ef86ee6c7bbacbab157322d8bc731 --- M MathSearch.hooks.php M MathSearch.php M XQueryGenerator.php M tests/MathDB2ConnectionTest.php M tests/MathXQueryTest.php 5 files changed, 33 insertions(+), 16 deletions(-) Approvals: Physikerwelt: Looks good to me, approved jenkins-bot: Verified diff --git a/MathSearch.hooks.php b/MathSearch.hooks.php index fb3b6c2..a59a40a 100644 --- a/MathSearch.hooks.php +++ b/MathSearch.hooks.php @@ -100,5 +100,15 @@ return true; } - + /** +* Links to the unit test files for the test cases. +* +* @param string $files +* @return boolean (true) +*/ + static function onRegisterUnitTests( &$files ) { + $testDir = __DIR__ . '/tests/'; + $files = array_merge( $files, glob( "$testDir/*Test.php" ) ); + return true; + } } \ No newline at end of file diff --git a/MathSearch.php b/MathSearch.php index e2ea9e5..ede0ab2 100644 --- a/MathSearch.php +++ b/MathSearch.php @@ -63,6 +63,7 @@ $wgHooks['LoadExtensionSchemaUpdates'][] = 'MathSearchHooks::onLoadExtensionSchemaUpdates'; $wgHooks['MathFormulaRendered'][] = 'MathSearchHooks::onMathFormulaRendered'; +$wgHooks['UnitTestsList'][] = 'MathSearchHooks::onRegisterUnitTests'; $wgGroupPermissions['user']['MathDebug'] = true; diff --git a/XQueryGenerator.php b/XQueryGenerator.php index 47e21df..d829e9c 100644 --- a/XQueryGenerator.php +++ b/XQueryGenerator.php @@ -64,6 +64,7 @@ $fixedConstraints . PHP_EOL . ' where' . PHP_EOL . $this->lengthConstraint . + ((( $qvarConstraintString && $this->lengthConstraint) ? ' and ' : '')) . $qvarConstraintString . PHP_EOL . ' return' . PHP_EOL; return $this->getHeader() . $query . $this->getFooter(); diff --git a/tests/MathDB2ConnectionTest.php b/tests/MathDB2ConnectionTest.php index 5b93f05..4008ea9 100644 --- a/tests/MathDB2ConnectionTest.php +++ b/tests/MathDB2ConnectionTest.php @@ -29,4 +29,19 @@ echo $message; } } + public function testBasicXQuery(){ + global $wgMathSearchDB2ConnStr; + if ( ! MathSearchHooks::isDB2Supported() || true ) { + $this->markTestSkipped( 'DB2 php client is not installed.' ); + } + $conn = db2_connect($wgMathSearchDB2ConnStr, '', ''); + $stmt = db2_exec($conn,'xquery declare default element namespace "http://www.w3.org/1998/Math/MathML";; + for $m in db2-fn:xmlcolumn("math.math_mathml") return +for $x in $m//*:\'apply\'[*[1]/name() = \'eq\'] return +data($m/*[1]/@alttext)'); + while($row = db2_fetch_row($stmt)){ + echo db2_result($stmt,0); + + } + } } \ No newline at end of file diff --git a/tests/MathXQueryTest.php b/tests/MathXQueryTest.php index 2ad0a0b..9609217 100644 --- a/tests/MathXQueryTest.php +++ b/tests/MathXQueryTest.php @@ -126,12 +126,13 @@ xquery declare default element namespace "http://www.w3.org/1998/Math/MathML";; for $m in db2-fn:xmlcolumn("math.math_mathml") return for $x in $m//*:apply -[*[1]/name() ='csymbol' and *[1][./text() = 'superscript'] and *[3]/name() ='cn' and *[3][./text() = '2']] +[*[1]/name() ='plus' and *[2]/name() ='apply' and *[2][*[1]/name() ='csymbol' and *[1][./text() = 'superscript'] and *[3]/name() ='cn' and *[3][./text() = '2']]] where -fn:count($x/*[1]/*) = 0 - and fn:count($x/*[3]/*) = 0 +fn:count($x/*[2]/*[1]/*) = 0 + and fn:count($x/*[2]/*[3]/*) = 0 + and fn:count($x/*[2]/*) = 3 and fn:count($x/*) = 3 - + and $x/*[2]/*[2] = $x/*[3] return data($m/*[1]/@alttext) EOT; @@ -181,18 +182,7 @@ printf("$row->math_tex\n"); } } -public function testBasicXQuery(){ -global $wgMathSearchDB2ConnStr; -$conn = db2_connect($wgMathSearchDB2ConnStr, '', ''); -$stmt = db2_exec($conn,'xquery declare default element namespace "http://www.w3.org/1998/Math/MathML";; - for $m in db2-fn:xmlcolumn("math.math_mathml") return -for $x in $m//*:\'apply\'[*[1]/name() = \'eq\'] return -data($m/*[1]/@alttext)'); -while($row = db2_fetch_row($stmt)){ -echo db2_result($stmt,0); -} -} -- To view, visit https://gerrit.wikimedia.org/r/115334 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8d9a0a63418ef86ee6c7bbacbab157322d8bc731 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/MathSearch Gerrit-
[MediaWiki-commits] [Gerrit] Namespace MMV properly - change (mediawiki...MultimediaViewer)
Gergő Tisza has uploaded a new change for review. https://gerrit.wikimedia.org/r/115335 Change subject: Namespace MMV properly .. Namespace MMV properly Everything is under mw.mmv now. (Also, I cut down on the number of direct global instance references a bit.) Change-Id: I88bb3b62b82ce54126dd069b0aab4412d9404719 --- M MultimediaViewer.php M resources/mmv/mmv.bootstrap.js M resources/mmv/mmv.js M resources/mmv/mmv.lightboximage.js M resources/mmv/mmv.lightboxinterface.js M resources/mmv/mmv.multilightbox.js M resources/mmv/ui/mmv.ui.metadataPanel.js M tests/qunit/mmv/mmv.bootstrap.test.js M tests/qunit/mmv/mmv.lightboximage.test.js M tests/qunit/mmv/mmv.lightboxinterface.test.js M tests/qunit/mmv/mmv.multilightbox.test.js M tests/qunit/mmv/mmv.test.js M tests/qunit/mmv/mmv.testhelpers.js 13 files changed, 118 insertions(+), 107 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultimediaViewer refs/changes/35/115335/1 diff --git a/MultimediaViewer.php b/MultimediaViewer.php index 1319a59..2515417 100644 --- a/MultimediaViewer.php +++ b/MultimediaViewer.php @@ -39,13 +39,16 @@ return array( 'localBasePath' => __DIR__ . "/resources/$path", 'remoteExtPath' => "MultimediaViewer/resources/$path", - ); }; $wgResourceModules['mmv.lightboximage'] = array_merge( array( 'scripts' => array( 'mmv.lightboximage.js', + ), + + 'dependencies' => array( + 'mmv.base', ), ), $moduleInfo( 'mmv' ) ); @@ -55,6 +58,7 @@ ), 'dependencies' => array( + 'mmv.base', 'mmv.ui.buttons', 'mmv.ui.categories', 'mmv.ui.description', @@ -99,6 +103,7 @@ ), 'dependencies' => array( + 'mmv.base', 'mmv.lightboxinterface', ), ), $moduleInfo( 'mmv' ) ); diff --git a/resources/mmv/mmv.bootstrap.js b/resources/mmv/mmv.bootstrap.js index bc45b10..dfe7a8d 100755 --- a/resources/mmv/mmv.bootstrap.js +++ b/resources/mmv/mmv.bootstrap.js @@ -70,10 +70,10 @@ deferred.reject( error.message ); } ); - return $.when( deferred ).then( function () { + return deferred.done( function ( viewer ) { if ( !bs.viewerInitialized ) { if ( bs.thumbs.length ) { - mw.mediaViewer.initWithThumbs( bs.thumbs ); + viewer.initWithThumbs( bs.thumbs ); } bs.viewerInitialized = true; @@ -84,7 +84,7 @@ /** * Checks if the mmv CSS has been correctly added to the page * This is a workaround for core bug 61852 -* @param {jQuery.Promise} deferred +* @param {jQuery.Promise.} deferred */ MMVB.isCSSReady = function ( deferred ) { var $dummy = $( '' ) @@ -94,7 +94,7 @@ if ( $dummy.css( 'display' ) === 'inline' ) { // Let's be clean and remove the test item before resolving the deferred $dummy.remove(); - deferred.resolve(); + deferred.resolve( mw.mmv.mediaViewer ); } else { $dummy.remove(); setTimeout( function () { bs.isCSSReady( deferred ); }, this.readinessWaitDuration ); @@ -179,8 +179,8 @@ mw.mmv.logger.log( 'enlarge-link-click' ); } - this.loadViewer().then( function () { - mw.mediaViewer.loadImageByTitle( title.getPrefixedText(), true ); + this.loadViewer().then( function ( viewer ) { + viewer.loadImageByTitle( title.getPrefixedText(), true ); } ); e.preventDefault(); @@ -203,8 +203,8 @@ return; } - this.loadViewer().then( function () { - mw.mediaViewer.hash(); + this.loadViewer().then( function ( viewer ) { + viewer.hash(); } ); }; diff --git a/resources/mmv/mmv.js b/resources/mmv/mmv.js index 880a2a8..5dc9cff 100755 --- a/resources/mmv/mmv.js +++ b/resources/mmv/mmv.js @@ -22,13 +22,13 @@ /** * Analyses the page, looks for image content and sets up the hooks * to manage the viewing experience of such content. -* @class mw.MultimediaViewer +* @class mw.mmv.MultimediaViewer * @constructor
[MediaWiki-commits] [Gerrit] Test and bugfix of qvar (?x) support - change (mediawiki...MathSearch)
Physikerwelt has uploaded a new change for review. https://gerrit.wikimedia.org/r/115334 Change subject: Test and bugfix of qvar (?x) support .. Test and bugfix of qvar (?x) support Change-Id: I8d9a0a63418ef86ee6c7bbacbab157322d8bc731 --- M XQueryGenerator.php M tests/MathDB2ConnectionTest.php M tests/MathXQueryTest.php 3 files changed, 21 insertions(+), 15 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MathSearch refs/changes/34/115334/1 diff --git a/XQueryGenerator.php b/XQueryGenerator.php index 47e21df..d829e9c 100644 --- a/XQueryGenerator.php +++ b/XQueryGenerator.php @@ -64,6 +64,7 @@ $fixedConstraints . PHP_EOL . ' where' . PHP_EOL . $this->lengthConstraint . + ((( $qvarConstraintString && $this->lengthConstraint) ? ' and ' : '')) . $qvarConstraintString . PHP_EOL . ' return' . PHP_EOL; return $this->getHeader() . $query . $this->getFooter(); diff --git a/tests/MathDB2ConnectionTest.php b/tests/MathDB2ConnectionTest.php index 5b93f05..4008ea9 100644 --- a/tests/MathDB2ConnectionTest.php +++ b/tests/MathDB2ConnectionTest.php @@ -29,4 +29,19 @@ echo $message; } } + public function testBasicXQuery(){ + global $wgMathSearchDB2ConnStr; + if ( ! MathSearchHooks::isDB2Supported() || true ) { + $this->markTestSkipped( 'DB2 php client is not installed.' ); + } + $conn = db2_connect($wgMathSearchDB2ConnStr, '', ''); + $stmt = db2_exec($conn,'xquery declare default element namespace "http://www.w3.org/1998/Math/MathML";; + for $m in db2-fn:xmlcolumn("math.math_mathml") return +for $x in $m//*:\'apply\'[*[1]/name() = \'eq\'] return +data($m/*[1]/@alttext)'); + while($row = db2_fetch_row($stmt)){ + echo db2_result($stmt,0); + + } + } } \ No newline at end of file diff --git a/tests/MathXQueryTest.php b/tests/MathXQueryTest.php index 2ad0a0b..9609217 100644 --- a/tests/MathXQueryTest.php +++ b/tests/MathXQueryTest.php @@ -126,12 +126,13 @@ xquery declare default element namespace "http://www.w3.org/1998/Math/MathML";; for $m in db2-fn:xmlcolumn("math.math_mathml") return for $x in $m//*:apply -[*[1]/name() ='csymbol' and *[1][./text() = 'superscript'] and *[3]/name() ='cn' and *[3][./text() = '2']] +[*[1]/name() ='plus' and *[2]/name() ='apply' and *[2][*[1]/name() ='csymbol' and *[1][./text() = 'superscript'] and *[3]/name() ='cn' and *[3][./text() = '2']]] where -fn:count($x/*[1]/*) = 0 - and fn:count($x/*[3]/*) = 0 +fn:count($x/*[2]/*[1]/*) = 0 + and fn:count($x/*[2]/*[3]/*) = 0 + and fn:count($x/*[2]/*) = 3 and fn:count($x/*) = 3 - + and $x/*[2]/*[2] = $x/*[3] return data($m/*[1]/@alttext) EOT; @@ -181,18 +182,7 @@ printf("$row->math_tex\n"); } } -public function testBasicXQuery(){ -global $wgMathSearchDB2ConnStr; -$conn = db2_connect($wgMathSearchDB2ConnStr, '', ''); -$stmt = db2_exec($conn,'xquery declare default element namespace "http://www.w3.org/1998/Math/MathML";; - for $m in db2-fn:xmlcolumn("math.math_mathml") return -for $x in $m//*:\'apply\'[*[1]/name() = \'eq\'] return -data($m/*[1]/@alttext)'); -while($row = db2_fetch_row($stmt)){ -echo db2_result($stmt,0); -} -} -- To view, visit https://gerrit.wikimedia.org/r/115334 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8d9a0a63418ef86ee6c7bbacbab157322d8bc731 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MathSearch Gerrit-Branch: master Gerrit-Owner: Physikerwelt ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Default language to en in thank_you until we have a better w... - change (wikimedia...crm)
Mwalker has submitted this change and it was merged. Change subject: Default language to en in thank_you until we have a better way to do things. .. Default language to en in thank_you until we have a better way to do things. Change-Id: I8e4f200e26dd5406f0efe0462d7fb85a5d796d0f --- M sites/all/modules/thank_you/thank_you.module 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: Mwalker: Looks good to me, approved diff --git a/sites/all/modules/thank_you/thank_you.module b/sites/all/modules/thank_you/thank_you.module index 18e7ab6..8bfe3cc 100644 --- a/sites/all/modules/thank_you/thank_you.module +++ b/sites/all/modules/thank_you/thank_you.module @@ -283,6 +283,11 @@ $language = $locale[0]; } +if ( !$language ) { +// FIXME: emulate existing broken behavior until we have a better fix +$language = 'en'; +} + if( isset( $test ) ){ $language = $test['language']; -- To view, visit https://gerrit.wikimedia.org/r/115333 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8e4f200e26dd5406f0efe0462d7fb85a5d796d0f Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Adamw Gerrit-Reviewer: Mwalker Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Default language to en in thank_you until we have a better w... - change (wikimedia...crm)
Adamw has uploaded a new change for review. https://gerrit.wikimedia.org/r/115333 Change subject: Default language to en in thank_you until we have a better way to do things. .. Default language to en in thank_you until we have a better way to do things. Change-Id: I8e4f200e26dd5406f0efe0462d7fb85a5d796d0f --- M sites/all/modules/thank_you/thank_you.module 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/33/115333/1 diff --git a/sites/all/modules/thank_you/thank_you.module b/sites/all/modules/thank_you/thank_you.module index 18e7ab6..8bfe3cc 100644 --- a/sites/all/modules/thank_you/thank_you.module +++ b/sites/all/modules/thank_you/thank_you.module @@ -283,6 +283,11 @@ $language = $locale[0]; } +if ( !$language ) { +// FIXME: emulate existing broken behavior until we have a better fix +$language = 'en'; +} + if( isset( $test ) ){ $language = $test['language']; -- To view, visit https://gerrit.wikimedia.org/r/115333 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8e4f200e26dd5406f0efe0462d7fb85a5d796d0f Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Adamw ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] update civicrm submodule - change (wikimedia...crm)
Adamw has submitted this change and it was merged. Change subject: update civicrm submodule .. update civicrm submodule Change-Id: I20e79e22e9e773575804510c7cb3f465d0e95078 --- M civicrm 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Adamw: Verified; Looks good to me, approved diff --git a/civicrm b/civicrm index de1ba2e..aa209d0 16 --- a/civicrm +++ b/civicrm -Subproject commit de1ba2ee442c538c4d1aaad6460c3b0b635dca0c +Subproject commit aa209d0904d2c4f130351a3702063fa6a74b809f -- To view, visit https://gerrit.wikimedia.org/r/115331 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I20e79e22e9e773575804510c7cb3f465d0e95078 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Adamw Gerrit-Reviewer: Adamw 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 civicrm submodule - change (wikimedia...crm)
Adamw has uploaded a new change for review. https://gerrit.wikimedia.org/r/115331 Change subject: update civicrm submodule .. update civicrm submodule Change-Id: I20e79e22e9e773575804510c7cb3f465d0e95078 --- M civicrm 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/31/115331/1 diff --git a/civicrm b/civicrm index de1ba2e..aa209d0 16 --- a/civicrm +++ b/civicrm -Subproject commit de1ba2ee442c538c4d1aaad6460c3b0b635dca0c +Subproject commit aa209d0904d2c4f130351a3702063fa6a74b809f -- To view, visit https://gerrit.wikimedia.org/r/115331 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I20e79e22e9e773575804510c7cb3f465d0e95078 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Adamw ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] contint: prevent user-agent ZumBot on Jenkins - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: contint: prevent user-agent ZumBot on Jenkins .. contint: prevent user-agent ZumBot on Jenkins There is no point in having bot index our Jenkins setup. Change-Id: I76ad5de787e3394c41dea79c58f5055be6a58618 --- M modules/contint/files/apache/proxy_jenkins 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/modules/contint/files/apache/proxy_jenkins b/modules/contint/files/apache/proxy_jenkins index b2f407f..9c81536 100644 --- a/modules/contint/files/apache/proxy_jenkins +++ b/modules/contint/files/apache/proxy_jenkins @@ -21,6 +21,7 @@ SetEnvIf User-Agent Sogou bad_browser SetEnvIf User-Agent Sosospider bad_browser SetEnvIf User-Agent TweetmemeBot bad_browser + SetEnvIf User-Agent ZumBot bad_browser Order deny,allow deny from env=bad_browser -- To view, visit https://gerrit.wikimedia.org/r/114516 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I76ad5de787e3394c41dea79c58f5055be6a58618 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Hashar Gerrit-Reviewer: Dzahn Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Bring user to last page viewed on browser restart. - change (apps...wikipedia)
Dr0ptp4kt has uploaded a new change for review. https://gerrit.wikimedia.org/r/115330 Change subject: Bring user to last page viewed on browser restart. .. Bring user to last page viewed on browser restart. * Workaround for low memory issue in https://bugzilla.mozilla.org/show_bug.cgi?id=965629 Change-Id: I28086aacdca24054243449e74aa5f2d58e094a9d --- M js/lib/app_history.js M js/lib/chrome.js M js/lib/wikiapp.js 3 files changed, 23 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/firefox/wikipedia refs/changes/30/115330/1 diff --git a/js/lib/app_history.js b/js/lib/app_history.js index 86d3820..e288ab5 100644 --- a/js/lib/app_history.js +++ b/js/lib/app_history.js @@ -5,8 +5,10 @@ */ function addCurrentPage() { - var title = app.getCurrentTitle(); - var url = app.getCurrentUrl(); + var title = app.getCurrentTitle(), + url = app.getCurrentUrl(), + langUrl = app.getCurrentLangUrl(); + if(url == 'about:blank') { return; } @@ -23,6 +25,9 @@ } }); }); + if ( langUrl ) { + localStorage["lastReadPage"] = decodeURI( langUrl ); + } } // Removes first element from history diff --git a/js/lib/chrome.js b/js/lib/chrome.js index 7cc26fd..8986675 100644 --- a/js/lib/chrome.js +++ b/js/lib/chrome.js @@ -202,7 +202,8 @@ } function loadFirstPage() { - return app.loadMainPage(); + var lastReadPage = localStorage["lastReadPage"]; + return lastReadPage ? app.navigateToPage(lastReadPage) : app.loadMainPage(); } function isTwoColumnView() { diff --git a/js/lib/wikiapp.js b/js/lib/wikiapp.js index 58b4a49..d205839 100644 --- a/js/lib/wikiapp.js +++ b/js/lib/wikiapp.js @@ -70,8 +70,9 @@ return d; } - function setCurrentPage(page) { + function setCurrentPage(page, langUrl) { app.curPage = page; + app.curLangUrl = langUrl; chrome.renderHtml(page); setPageActionsState(true); @@ -102,7 +103,7 @@ app.curPage = null; } - function loadPage(title, language) { + function loadPage(title, language, langUrl) { var d = $.Deferred(); function doRequest() { @@ -110,7 +111,7 @@ if(page === null) { setErrorPage(404); } - setCurrentPage(page); + setCurrentPage(page, langUrl); d.resolve(page); }).fail(function(xhr, textStatus, errorThrown) { if(textStatus === "abort") { @@ -203,7 +204,7 @@ if(title === "") { title = "Main_Page"; // FIXME } - d = app.loadPage(title, lang); + d = app.loadPage(title, lang, url); d.done(function() { console.log("Navigating to " + title); if(options.hideCurrent) { @@ -222,6 +223,14 @@ function getCurrentUrl() { if(app.curPage) { return app.urlForTitle(app.curPage.title); + } else { + return null; + } + } + + function getCurrentLangUrl() { + if(app.curLangUrl) { + return app.curLangUrl; } else { return null; } @@ -296,6 +305,7 @@ navigateToPage: navigateToPage, getCurrentUrl: getCurrentUrl, getCurrentTitle: getCurrentTitle, + getCurrentLangUrl: getCurrentLangUrl, urlForTitle: urlForTitle, titleForUrl:titleForUrl, languageForUrl: languageForUrl, -- To view, visit https://gerrit.wikimedia.org/r/115330 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I28086aacdca24054243449e74aa5f2d58e094a9d Gerrit-PatchSet: 1 Gerrit-Project: apps/firefox/wikipedia Gerrit-Branch: master Gerrit-Owner: Dr0ptp4kt ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix "page goes blank after saving" bug - change (apps...wikipedia)
Yuvipanda has submitted this change and it was merged. Change subject: Fix "page goes blank after saving" bug .. Fix "page goes blank after saving" bug This was breaking if your internet was fast. ;) Fade-out of the web view to the progress indicator was getting canceled by the subsequent fade-in, but the listener's onAnimationEnd handler was still being called and hiding the webView completely. Added a check for cancelation, which seems to resolve it. Bug: 60696 Change-Id: I226568aa43fd5720af34ce285d6136b702b881c5 --- M wikipedia/src/main/java/org/wikipedia/Utils.java 1 file changed, 13 insertions(+), 2 deletions(-) Approvals: Yuvipanda: Verified; Looks good to me, approved diff --git a/wikipedia/src/main/java/org/wikipedia/Utils.java b/wikipedia/src/main/java/org/wikipedia/Utils.java index a669489..b394b5c 100644 --- a/wikipedia/src/main/java/org/wikipedia/Utils.java +++ b/wikipedia/src/main/java/org/wikipedia/Utils.java @@ -70,10 +70,21 @@ .alpha(0f) .setDuration(WikipediaApp.MEDIUM_ANIMATION_DURATION) .setListener(new AnimatorListenerAdapter() { +boolean wasCanceled = false; + +@Override +public void onAnimationCancel(Animator animation) { +wasCanceled = true; +} + @Override public void onAnimationEnd(Animator animation) { -view.setVisibility(View.GONE); -view.setAlpha(1.0f); +if (!wasCanceled) { +// Detect if we got canceled, and if so DON'T hide... +// There's another animation now pushing the alpha back up +view.setVisibility(View.GONE); +view.setAlpha(1.0f); +} } }); } -- To view, visit https://gerrit.wikimedia.org/r/115328 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I226568aa43fd5720af34ce285d6136b702b881c5 Gerrit-PatchSet: 2 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER Gerrit-Reviewer: Yuvipanda ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add 'showPassword' functionality to Create Account - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Add 'showPassword' functionality to Create Account .. Add 'showPassword' functionality to Create Account Checkboxes for now, will replace with fancier designs later on Change-Id: I1709b399ddbba6d6fa4c7b23e36868c022db09de --- M wikipedia/res/layout/activity_create_account.xml M wikipedia/src/main/java/org/wikipedia/Utils.java M wikipedia/src/main/java/org/wikipedia/createaccount/CreateAccountActivity.java M wikipedia/src/main/java/org/wikipedia/login/LoginActivity.java 4 files changed, 65 insertions(+), 33 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/res/layout/activity_create_account.xml b/wikipedia/res/layout/activity_create_account.xml index 7491f22..25c5d43 100644 --- a/wikipedia/res/layout/activity_create_account.xml +++ b/wikipedia/res/layout/activity_create_account.xml @@ -20,23 +20,44 @@ android:inputType="textNoSuggestions" /> - +android:orientation="horizontal"> + + + - +android:orientation="horizontal"> + + + + https://gerrit.wikimedia.org/r/115245 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1709b399ddbba6d6fa4c7b23e36868c022db09de Gerrit-PatchSet: 2 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Yuvipanda Gerrit-Reviewer: Brion VIBBER ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] SpecialUserlogin: Normalize username before passing to User:... - change (mediawiki/core)
Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/115329 Change subject: SpecialUserlogin: Normalize username before passing to User::newFromName .. SpecialUserlogin: Normalize username before passing to User::newFromName That method does some rather strict checking which is not desired here. Bug: 29621 Change-Id: I983e3f528491817f9f31f71a92d8d2946ce5941d --- M includes/specials/SpecialUserlogin.php 1 file changed, 8 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/29/115329/1 diff --git a/includes/specials/SpecialUserlogin.php b/includes/specials/SpecialUserlogin.php index eca1839..7e4bfa8 100644 --- a/includes/specials/SpecialUserlogin.php +++ b/includes/specials/SpecialUserlogin.php @@ -400,9 +400,15 @@ return Status::newFatal( 'sorbs_create_account_reason' ); } + // Normalize the name so that silly things don't cause "invalid username" errors. + // User::newFromName does some rather strict checking, rejecting e.g. leading/trailing/multiple spaces. + $title = Title::makeTitleSafe( NS_USER, $this->mUsername ); + if ( !is_object( $title ) ) { + return Status::newFatal( 'noname' ); + } + # Now create a dummy user ($u) and check if it is valid - $name = trim( $this->mUsername ); - $u = User::newFromName( $name, 'creatable' ); + $u = User::newFromName( $title->getText(), 'creatable' ); if ( !is_object( $u ) ) { return Status::newFatal( 'noname' ); } elseif ( 0 != $u->idForName() ) { -- To view, visit https://gerrit.wikimedia.org/r/115329 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I983e3f528491817f9f31f71a92d8d2946ce5941d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Only add event handler once; after edit we may reload multip... - change (apps...wikipedia)
Yuvipanda has submitted this change and it was merged. Change subject: Only add event handler once; after edit we may reload multiple times .. Only add event handler once; after edit we may reload multiple times This was causing multiple calls to section request/display. Change-Id: Ie73e0cbe991691613138955d39e0908b6048db84 --- M wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java 1 file changed, 21 insertions(+), 17 deletions(-) Approvals: Yuvipanda: Verified; Looks good to me, approved diff --git a/wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java b/wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java index 8c5e16a..6bc8a34 100644 --- a/wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java +++ b/wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java @@ -95,22 +95,6 @@ } private void populateNonLeadSections(final Page page) { -bridge.addListener("requestSection", new CommunicationBridge.JSEventListener() { -@Override -public void onMessage(String messageType, JSONObject messagePayload) { -try { -int index = messagePayload.optInt("index"); -JSONObject wrapper = new JSONObject(); -wrapper.put("section", page.getSections().get(index).toJSON()); -wrapper.put("index", index); -wrapper.put("isLast", index == page.getSections().size() - 1); -bridge.sendMessage("displaySection", wrapper); -} catch (JSONException e) { -// Won't happen -throw new RuntimeException(e); -} -} -}); editHandler = new EditHandler(this, bridge, page); bridge.sendMessage("startSectionsDisplay", new JSONObject()); } @@ -160,7 +144,7 @@ webView.getSettings().setDisplayZoomControls(false); bridge = new CommunicationBridge(webView, "file:///android_asset/index.html"); -Utils.addUtilityMethodsToBridge(getActivity(), bridge); +setupMessageHandlers(); linkHandler = new LinkHandler(getActivity(), bridge, title.getSite()); app = (WikipediaApp)getActivity().getApplicationContext(); api = ((WikipediaApp)getActivity().getApplicationContext()).getAPIForSite(title.getSite()); @@ -183,6 +167,26 @@ new QuickReturnHandler(webView, quickReturnBar); } +private void setupMessageHandlers() { +Utils.addUtilityMethodsToBridge(getActivity(), bridge); +bridge.addListener("requestSection", new CommunicationBridge.JSEventListener() { +@Override +public void onMessage(String messageType, JSONObject messagePayload) { +try { +int index = messagePayload.optInt("index"); +JSONObject wrapper = new JSONObject(); +wrapper.put("section", page.getSections().get(index).toJSON()); +wrapper.put("index", index); +wrapper.put("isLast", index == page.getSections().size() - 1); +bridge.sendMessage("displaySection", wrapper); +} catch (JSONException e) { +// Won't happen +throw new RuntimeException(e); +} +} +}); +} + @Override public void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); -- To view, visit https://gerrit.wikimedia.org/r/115321 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie73e0cbe991691613138955d39e0908b6048db84 Gerrit-PatchSet: 2 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER Gerrit-Reviewer: Yuvipanda ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Avoid "leaked window" errors by dismissing popups, not just ... - change (apps...wikipedia)
Yuvipanda has submitted this change and it was merged. Change subject: Avoid "leaked window" errors by dismissing popups, not just hiding them, on success .. Avoid "leaked window" errors by dismissing popups, not just hiding them, on success Change-Id: I45a2dc6d73f5b0891fea5f1124394d286f14d314 --- M wikipedia/src/main/java/org/wikipedia/editing/EditPreviewFragment.java M wikipedia/src/main/java/org/wikipedia/editing/EditSectionActivity.java 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Yuvipanda: Verified; Looks good to me, approved diff --git a/wikipedia/src/main/java/org/wikipedia/editing/EditPreviewFragment.java b/wikipedia/src/main/java/org/wikipedia/editing/EditPreviewFragment.java index a9cc961..64a0f8c 100644 --- a/wikipedia/src/main/java/org/wikipedia/editing/EditPreviewFragment.java +++ b/wikipedia/src/main/java/org/wikipedia/editing/EditPreviewFragment.java @@ -68,7 +68,7 @@ public void onFinish(String result) { displayPreview(result); previewHTML = result; -dialog.hide(); +dialog.dismiss(); } }.execute(); } diff --git a/wikipedia/src/main/java/org/wikipedia/editing/EditSectionActivity.java b/wikipedia/src/main/java/org/wikipedia/editing/EditSectionActivity.java index 705d0d0..0be9a89 100644 --- a/wikipedia/src/main/java/org/wikipedia/editing/EditSectionActivity.java +++ b/wikipedia/src/main/java/org/wikipedia/editing/EditSectionActivity.java @@ -181,7 +181,7 @@ @Override public void onFinish(EditingResult result) { if (result instanceof SuccessEditResult) { -progressDialog.hide(); +progressDialog.dismiss(); setResult(EditHandler.RESULT_REFRESH_PAGE); Toast.makeText(EditSectionActivity.this, R.string.edit_saved_successfully, Toast.LENGTH_LONG).show(); Utils.hideSoftKeyboard(EditSectionActivity.this); -- To view, visit https://gerrit.wikimedia.org/r/115317 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I45a2dc6d73f5b0891fea5f1124394d286f14d314 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER Gerrit-Reviewer: Yuvipanda ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix "page goes blank after saving" bug - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/115328 Change subject: Fix "page goes blank after saving" bug .. Fix "page goes blank after saving" bug This was breaking if your internet was fast. ;) Fade-out of the web view to the progress indicator was getting canceled by the subsequent fade-in, but the listener's onAnimationEnd handler was still being called and hiding the webView completely. Added a check for cancelation, which seems to resolve it. Bug: 60696 Change-Id: I226568aa43fd5720af34ce285d6136b702b881c5 --- M wikipedia/src/main/java/org/wikipedia/Utils.java 1 file changed, 13 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/28/115328/1 diff --git a/wikipedia/src/main/java/org/wikipedia/Utils.java b/wikipedia/src/main/java/org/wikipedia/Utils.java index 88f74ff..58e0423 100644 --- a/wikipedia/src/main/java/org/wikipedia/Utils.java +++ b/wikipedia/src/main/java/org/wikipedia/Utils.java @@ -70,10 +70,21 @@ .alpha(0f) .setDuration(WikipediaApp.MEDIUM_ANIMATION_DURATION) .setListener(new AnimatorListenerAdapter() { +boolean wasCanceled = false; + +@Override +public void onAnimationCancel(Animator animation) { +wasCanceled = true; +} + @Override public void onAnimationEnd(Animator animation) { -view.setVisibility(View.GONE); -view.setAlpha(1.0f); +if (!wasCanceled) { +// Detect if we got canceled, and if so DON'T hide... +// There's another animation now pushing the alpha back up +view.setVisibility(View.GONE); +view.setAlpha(1.0f); +} } }); } -- To view, visit https://gerrit.wikimedia.org/r/115328 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I226568aa43fd5720af34ce285d6136b702b881c5 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Enable on incubatorwiki - change (mediawiki...deploy)
jenkins-bot has submitted this change and it was merged. Change subject: Enable on incubatorwiki .. Enable on incubatorwiki Change-Id: Iafb1b9572696957915423cc052eda66aac2fd147 --- M conf/wmf/localsettings.js 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: GWicke: Looks good to me, approved jenkins-bot: Verified diff --git a/conf/wmf/localsettings.js b/conf/wmf/localsettings.js index 3d66bcb..afceb68 100644 --- a/conf/wmf/localsettings.js +++ b/conf/wmf/localsettings.js @@ -3,9 +3,10 @@ var dbname, interwikiMap = { 'testwiki': 'http://test.wikipedia.org/w/api.php', -'metawiki': 'http://meta.wikimedia.org/w/api.php', 'test2wiki': 'http://test2.wikipedia.org/w/api.php', +'metawiki': 'http://meta.wikimedia.org/w/api.php', +'incubatorwiki': 'http://incubator.wikimedia.org/w/api.php', 'sewikimedia': 'http://se.wikimedia.org/w/api.php' }, privateInterwikiMap = { -- To view, visit https://gerrit.wikimedia.org/r/114118 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iafb1b9572696957915423cc052eda66aac2fd147 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid/deploy Gerrit-Branch: master Gerrit-Owner: Jforrester Gerrit-Reviewer: GWicke Gerrit-Reviewer: Subramanya Sastry Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Minor type changes/Fix contrast - change (mediawiki...Popups)
Prtksxna has uploaded a new change for review. https://gerrit.wikimedia.org/r/115327 Change subject: Minor type changes/Fix contrast .. Minor type changes/Fix contrast Bug: 61411 Change-Id: Ia33b94f69c3cf655a278311801f64d32841af2e7 --- M resources/ext.popups.core.less 1 file changed, 10 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Popups refs/changes/27/115327/1 diff --git a/resources/ext.popups.core.less b/resources/ext.popups.core.less index 9f0ea51..69a2b1f 100644 --- a/resources/ext.popups.core.less +++ b/resources/ext.popups.core.less @@ -28,17 +28,18 @@ padding: 16px; padding-bottom: 48px; - h3 { - margin-top: 0; - padding: 0; - font-family: Georgia, Times, serif; - font-style: normal; - } - > div.mwe-popups-redirect { - color: #c9c9c9; - font-style: italic; + color: #555; + font-size: 0.85em; margin-bottom: 3px; + + h3 { + margin-top: 0; + padding: 0; + font: 2em Georgia, Times, serif; + font-weight: normal; + font-style: normal; + } } } -- To view, visit https://gerrit.wikimedia.org/r/115327 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia33b94f69c3cf655a278311801f64d32841af2e7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Popups Gerrit-Branch: master Gerrit-Owner: Prtksxna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add sequence support for upsert in DatabaseOracle - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Add sequence support for upsert in DatabaseOracle .. Add sequence support for upsert in DatabaseOracle In the same way as in selectInsert Bug: 53710 Change-Id: I26f891da808ecdc932e29eebda71df4c17a29617 --- M includes/db/DatabaseOracle.php 1 file changed, 30 insertions(+), 2 deletions(-) Approvals: Parent5446: Looks good to me, approved Freakolowsky: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/includes/db/DatabaseOracle.php b/includes/db/DatabaseOracle.php index d30..81907ba 100644 --- a/includes/db/DatabaseOracle.php +++ b/includes/db/DatabaseOracle.php @@ -641,8 +641,12 @@ } else { $first = false; } - - $sql .= $this->fieldBindStatement( $table, $col, $val ); + if ( $this->isQuotedIdentifier( $val ) ) { + $sql .= $this->removeIdentifierQuotes( $val ); + unset( $row[$col] ); + } else { + $sql .= $this->fieldBindStatement( $table, $col, $val ); + } } $sql .= ')'; @@ -773,6 +777,30 @@ return $retval; } + public function upsert( $table, array $rows, array $uniqueIndexes, array $set, + $fname = __METHOD__ + ) { + if ( !count( $rows ) ) { + return true; // nothing to do + } + + if ( !is_array( reset( $rows ) ) ) { + $rows = array( $rows ); + } + + $sequenceData = $this->getSequenceData( $table ); + if ( $sequenceData !== false ) { + // add sequence column to each list of columns, when not set + foreach ( $rows as &$row ) { + if ( !isset( $row[$sequenceData['column']] ) ) { + $row[$sequenceData['column']] = $this->addIdentifierQuotes('GET_SEQUENCE_VALUE(\'' . $sequenceData['sequence'] . '\')'); + } + } + } + + return parent::upsert( $table, $rows, $uniqueIndexes, $set, $fname ); + } + function tableName( $name, $format = 'quoted' ) { /* Replace reserved words with better ones -- To view, visit https://gerrit.wikimedia.org/r/110991 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I26f891da808ecdc932e29eebda71df4c17a29617 Gerrit-PatchSet: 5 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Umherirrender Gerrit-Reviewer: Bartosz Dziewoński Gerrit-Reviewer: Freakolowsky Gerrit-Reviewer: Lupo Gerrit-Reviewer: MarkAHershberger Gerrit-Reviewer: Nemo bis Gerrit-Reviewer: Parent5446 Gerrit-Reviewer: Umherirrender Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Story 1685: Improve red links support in Beta - change (mediawiki...MobileFrontend)
Kaldari has uploaded a new change for review. https://gerrit.wikimedia.org/r/115326 Change subject: Story 1685: Improve red links support in Beta .. Story 1685: Improve red links support in Beta * Make sure anonymous users don't see redlinks * Change pre-filled editor text for new pages * Add confirmation step at save of new page * Add toast message for successful page creation * Remove redundant setting of isNewEditor in child class Change-Id: I69a5326196259ec894053e8df8b8c5a60355de2a --- M MobileFrontend.i18n.php M includes/Resources.php M includes/formatters/MobileFormatter.php M javascripts/modules/editor/EditorApi.js M javascripts/modules/editor/EditorOverlay.js M javascripts/modules/editor/EditorOverlayBase.js 6 files changed, 48 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/26/115326/1 diff --git a/MobileFrontend.i18n.php b/MobileFrontend.i18n.php index 1afa14f..c83073d 100644 --- a/MobileFrontend.i18n.php +++ b/MobileFrontend.i18n.php @@ -312,11 +312,14 @@ 'mobile-frontend-editor-keep-editing' => 'Keep editing', 'mobile-frontend-editor-license' => 'By saving changes, you agree to our [//wikimediafoundation.org/wiki/Terms_of_use Terms of Use] and agree to release your text under the [//creativecommons.org/licenses/by-sa/3.0/ CC BY-SA 3.0 License] and [//en.wikipedia.org/wiki/Wikipedia:Text_of_the_GNU_Free_Documentation_License GFDL].', 'mobile-frontend-editor-placeholder' => 'This section is empty. Be the first to expand it!', + 'mobile-frontend-editor-placeholder-new-page' => '{{GENDER:$1|You}} {{GENDER:$1|are creating}} a new page on {{SITENAME}}!', 'mobile-frontend-editor-summary-placeholder' => 'Tell us what you changed (optional)', 'mobile-frontend-editor-cancel-confirm' => 'Do you really want to abandon your edit?', + 'mobile-frontend-editor-new-page-confirm' => '{{GENDER:$1|Are you sure you want to create}} a new page on {{SITENAME}}?', 'mobile-frontend-editor-wait' => 'Saving edit, please wait.', 'mobile-frontend-editor-success' => 'Success! Your edit was saved.', 'mobile-frontend-editor-success-landmark-1' => 'Congratulations, you are now a {{SITENAME}} editor!', + 'mobile-frontend-editor-success-new-page' => 'Congratulations on creating a new page!', 'mobile-frontend-editor-error' => 'Error, edit not saved.', 'mobile-frontend-editor-error-conflict' => 'Error, another user has edited this page.', 'mobile-frontend-editor-error-loading' => 'Error, can\'t load section.', @@ -938,8 +941,14 @@ See also: * {{msg-mw|Mobile-frontend-editor-save}}', 'mobile-frontend-editor-placeholder' => 'Placeholder text for empty sections.', + 'mobile-frontend-editor-placeholder-new-page' => 'Placeholder text for new pages. +Parameters: +* $1 - the user name for GENDER', 'mobile-frontend-editor-summary-placeholder' => 'A placeholder for the summary input field asking user what they changed (the field is optional).', 'mobile-frontend-editor-cancel-confirm' => 'Question asking user if they are positive about abandoning unsaved edit.', + 'mobile-frontend-editor-new-page-confirm' => 'Question asking user if they are positive they want to create a new page. +Parameters: +* $1 - the user name for GENDER', 'mobile-frontend-editor-wait' => 'Text that displays while a page edit is being saved.', 'mobile-frontend-editor-success' => 'Text that displays when a page edit has been successfully saved. @@ -951,6 +960,9 @@ See also: * {{msg-mw|Mobile-frontend-editor-success}}', + 'mobile-frontend-editor-success-new-page' => 'Text that displays when a new page has been successfully saved. + +Used as "toast" message.', 'mobile-frontend-editor-error' => 'Text that displays when there have been errors when saving a page edit. Used as "toast" error message.', diff --git a/includes/Resources.php b/includes/Resources.php index 8d2fc6f..726b96a 100644 --- a/includes/Resources.php +++ b/includes/Resources.php @@ -305,11 +305,14 @@ 'mobile-frontend-editor-keep-editing', 'mobile-frontend-editor-license' => array( 'parse' ), 'mobile-frontend-editor-placeholder', + 'mobile-frontend-editor-placeholder-new-page', 'mobile-frontend-editor-summary-placeholder', 'mobile-frontend-editor-cancel-confirm', + 'mobile-frontend-editor-new-page-confirm', 'mobile-frontend-editor-wait', 'mobile-frontend-editor-success', 'mobile-frontend-editor-success-landmark-1' => array( 'parse' ), + 'mobile-frontend-editor-success-new-page',
[MediaWiki-commits] [Gerrit] Add placeholders to MediaSizeWidget - change (VisualEditor/VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Add placeholders to MediaSizeWidget .. Add placeholders to MediaSizeWidget Add the ability to adjust input placeholders in media size widget. This is particularly aimed at the new 'default size' fix in ve-mw. Unfortunately, we usually don't have the placeholder details when the input widgets are instantiated, so the method added makes sure these are cached, appear on 0 values and can be retrieved. Also, the valid dimension check method was adapted to accomodate a situation where the widget is empty but its placeholders have data. Change-Id: I27d5efda12b7e57291211269f1f5fbc610aef4ad --- M modules/ve/ui/widgets/ve.ui.MediaSizeWidget.js 1 file changed, 69 insertions(+), 3 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve/ui/widgets/ve.ui.MediaSizeWidget.js b/modules/ve/ui/widgets/ve.ui.MediaSizeWidget.js index c36ea65..521da79 100644 --- a/modules/ve/ui/widgets/ve.ui.MediaSizeWidget.js +++ b/modules/ve/ui/widgets/ve.ui.MediaSizeWidget.js @@ -113,6 +113,43 @@ /* Methods */ /** + * Set placeholder dimensions in case the widget is empty or set to 0 values + * @param {Object} dimensions Height and width placeholders + */ +ve.ui.MediaSizeWidget.prototype.setPlaceholderDimensions = function ( dimensions ) { + dimensions = dimensions || {}; + + if ( !dimensions.height && this.getRatio() !== null && $.isNumeric( dimensions.width ) ) { + dimensions.height = Math.round( dimensions.width / this.getRatio() ); + } + if ( !dimensions.width && this.getRatio() !== null && $.isNumeric( dimensions.height ) ) { + dimensions.width = Math.round( dimensions.height * this.getRatio() ); + } + + this.placeholders = dimensions; + + // Set the inputs' placeholders + this.widthInput.$input.attr( 'placeholder', this.placeholders.width ); + this.heightInput.$input.attr( 'placeholder', this.placeholders.height ); +}; + +/** + * Return the values of the placeholder dimensions. + * @returns {Object} The width and height of the placeholder values + */ +ve.ui.MediaSizeWidget.prototype.getPlaceholderDimensions = function () { + return this.placeholders; +}; + +/** + * Check if both inputs are empty, so to use their placeholders + * @returns {Boolean} + */ +ve.ui.MediaSizeWidget.prototype.isEmpty = function () { + return ( this.widthInput.getValue() === '' && this.heightInput.getValue() === '' ); +}; + +/** * Overridden from ve.Scalable to allow one dimension to be set * at a time, write values back to inputs and show any errors. */ @@ -133,9 +170,20 @@ ve.Scalable.prototype.setCurrentDimensions.call( this, dimensions ); - // This will only update if the value has changed - this.widthInput.setValue( this.getCurrentDimensions().width ); - this.heightInput.setValue( this.getCurrentDimensions().height ); + if ( + // If placeholders are set and dimensions are 0x0, erase input values + // so placeholders are visible + this.getPlaceholderDimensions() && + ( dimensions.height === 0 || dimensions.width === 0 ) + ) { + // Use placeholders + this.widthInput.setValue( '' ); + this.heightInput.setValue( '' ); + } else { + // This will only update if the value has changed + this.widthInput.setValue( this.getCurrentDimensions().width ); + this.heightInput.setValue( this.getCurrentDimensions().height ); + } this.errorLabel.$element.toggle( !this.isCurrentDimensionsValid() ); this.$element.toggleClass( 've-ui-mediaSizeWidget-input-hasError', !this.isCurrentDimensionsValid() ); @@ -175,3 +223,21 @@ ve.ui.MediaSizeWidget.prototype.onButtonOriginalDimensionsClick = function () { this.setCurrentDimensions( this.getOriginalDimensions() ); }; + +/** + * Expand on Scalable's method of checking for valid dimensions. Allow for + * empty dimensions if the placeholders are set. + * @returns {Boolean} + */ +ve.ui.MediaSizeWidget.prototype.isCurrentDimensionsValid = function () { + if ( + this.placeholders && + this.heightInput.getValue() === '' && + this.widthInput.getValue() === '' + ) { + return true; + } else { + // Parent method + return ve.Scalable.prototype.isCurrentDimensionsValid.call( this ); + } +}; -- To view, visit https://gerrit.wikimedia.org/r/114773 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I27d5efda12b7e57291211269f1f5fbc610aef4ad Gerrit-PatchSet: 2 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Mooeypoo Gerrit-Revie
[MediaWiki-commits] [Gerrit] (FR #1378) preferred_language defaults to null - change (wikimedia...civicrm)
Mwalker has submitted this change and it was merged. Change subject: (FR #1378) preferred_language defaults to null .. (FR #1378) preferred_language defaults to null See http://issues.civicrm.org/jira/browse/CRM-14232 Change-Id: I7e904d30734070ad213bd9942048dc07c0de7fb9 --- M CRM/Admin/Form/Setting/Localization.php M CRM/Contact/BAO/Contact.php M CRM/Contact/Form/Edit/CommunicationPreferences.php M CRM/Contact/Form/Inline/CommunicationPreferences.php M CRM/Core/BAO/UFGroup.php M CRM/Core/Config/Variables.php M templates/CRM/Admin/Form/Setting/Localization.tpl 7 files changed, 33 insertions(+), 10 deletions(-) Approvals: Mwalker: Looks good to me, approved diff --git a/CRM/Admin/Form/Setting/Localization.php b/CRM/Admin/Form/Setting/Localization.php index 784b18c..f689266 100644 --- a/CRM/Admin/Form/Setting/Localization.php +++ b/CRM/Admin/Form/Setting/Localization.php @@ -97,6 +97,8 @@ } } +$this->addElement('checkbox', 'contactLanguageHasDefault', ts('New contacts have default language')); + $this->addElement('checkbox', 'inheritLocale', ts('Inherit CMS Language')); $this->addElement('text', 'monetaryThousandSeparator', ts('Thousands Separator'), array('size' => 2)); $this->addElement('text', 'monetaryDecimalPoint', ts('Decimal Delimiter'), array('size' => 2)); @@ -227,6 +229,10 @@ $values['inheritLocale'] = 0; } +if (!isset($values['contactLanguageHasDefault'])) { + $values['contactLanguageHasDefault'] = 0; +} + //cache contact fields retaining localized titles //though we changed localization, so reseting cache. CRM_Core_BAO_Cache::deleteGroup('contact fields'); diff --git a/CRM/Contact/BAO/Contact.php b/CRM/Contact/BAO/Contact.php index c204b66..406b2a9 100644 --- a/CRM/Contact/BAO/Contact.php +++ b/CRM/Contact/BAO/Contact.php @@ -267,8 +267,10 @@ $config = CRM_Core_Config::singleton(); // CRM-6942: set preferred language to the current language if it’s unset (and we’re creating a contact) -if (empty($params['contact_id']) && empty($params['preferred_language'])) { - $params['preferred_language'] = $config->lcMessages; +if ($config->contactLanguageHasDefault) { +if (empty($params['contact_id']) && empty($params['preferred_language'])) { + $params['preferred_language'] = $config->lcMessages; +} } // CRM-9739: set greeting & addressee if unset and we’re creating a contact diff --git a/CRM/Contact/Form/Edit/CommunicationPreferences.php b/CRM/Contact/Form/Edit/CommunicationPreferences.php index 6aa554a..8a22c1d 100644 --- a/CRM/Contact/Form/Edit/CommunicationPreferences.php +++ b/CRM/Contact/Form/Edit/CommunicationPreferences.php @@ -83,7 +83,7 @@ $form->add('select', 'preferred_language', ts('Preferred Language'), array( -'' => ts('- select -')) + +'' => ts('- unknown -')) + CRM_Core_PseudoConstant::languages() ); @@ -169,9 +169,11 @@ } // CRM-7119: set preferred_language to default if unset -if (empty($defaults['preferred_language'])) { - $config = CRM_Core_Config::singleton(); - $defaults['preferred_language'] = $config->lcMessages; +if ($config->contactLanguageHasDefault) { + if (empty($defaults['preferred_language'])) { +$config = CRM_Core_Config::singleton(); +$defaults['preferred_language'] = $config->lcMessages; + } } //set default from greeting types CRM-4575, CRM-9739 diff --git a/CRM/Contact/Form/Inline/CommunicationPreferences.php b/CRM/Contact/Form/Inline/CommunicationPreferences.php index 553bd02..10a6e2f 100644 --- a/CRM/Contact/Form/Inline/CommunicationPreferences.php +++ b/CRM/Contact/Form/Inline/CommunicationPreferences.php @@ -119,9 +119,11 @@ } // CRM-7119: set preferred_language to default if unset -if (empty($defaults['preferred_language'])) { - $config = CRM_Core_Config::singleton(); - $defaults['preferred_language'] = $config->lcMessages; +if ($config->contactLanguageHasDefault) { + if (empty($defaults['preferred_language'])) { +$config = CRM_Core_Config::singleton(); +$defaults['preferred_language'] = $config->lcMessages; + } } foreach (CRM_Contact_BAO_Contact::$_greetingTypes as $greeting) { diff --git a/CRM/Core/BAO/UFGroup.php b/CRM/Core/BAO/UFGroup.php index 439d533..ec5d816 100644 --- a/CRM/Core/BAO/UFGroup.php +++ b/CRM/Core/BAO/UFGroup.php @@ -1738,7 +1738,7 @@ $form->add('select', $name, $title, CRM_Core_SelectValues::pmf()); } elseif ($fieldName === 'preferred_language') { - $form->add('select', $name, $title, array('' => ts('- select -')) + CRM_Core_PseudoConstant::languages()); + $form->add('select', $name, $title, array('' => ts('- unknown -')) + CRM_Core_PseudoConstant::languages()); } elseif ($fieldName == 'external_identifier')
[MediaWiki-commits] [Gerrit] manually fix some bad tpl vars -- needs to be backported to ... - change (wikimedia...crm)
Adamw has uploaded a new change for review. https://gerrit.wikimedia.org/r/115325 Change subject: manually fix some bad tpl vars -- needs to be backported to upstream wiki .. manually fix some bad tpl vars -- needs to be backported to upstream wiki Change-Id: I8a593af488de16adef288073e46127d37225c0bd --- M sites/all/modules/thank_you/templates/html/thank_you.sh.html M sites/all/modules/thank_you/templates/html/thank_you.vi.html M sites/all/modules/thank_you/templates/html/thank_you.zh-tw.html 3 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/25/115325/1 diff --git a/sites/all/modules/thank_you/templates/html/thank_you.sh.html b/sites/all/modules/thank_you/templates/html/thank_you.sh.html index f24a79c..ff240bf 100644 --- a/sites/all/modules/thank_you/templates/html/thank_you.sh.html +++ b/sites/all/modules/thank_you/templates/html/thank_you.sh.html @@ -82,7 +82,7 @@ donacijama. Medjutim, ako ne želite da primate takvu elektronsku postu od nas, molimo Vas da kliknete na link odmah ispod i bićete uklonjeni sa tog spiska. -[$unsibscribeUrl Odjava] +Odjava diff --git a/sites/all/modules/thank_you/templates/html/thank_you.vi.html b/sites/all/modules/thank_you/templates/html/thank_you.vi.html index f75def5..3ac4e6b 100644 --- a/sites/all/modules/thank_you/templates/html/thank_you.vi.html +++ b/sites/all/modules/thank_you/templates/html/thank_you.vi.html @@ -67,7 +67,7 @@ lược 5 năm của Wikimedia Foundation. Bạn cũng có thể mua hàng hóa của Wikipedia tại https://shop.wikimedia.org";>shop.wikimedia.org. -Thông tin để bạn lưu giữ: Khoản đóng góp của bạn là số $contributionsId, +Thông tin để bạn lưu giữ: Khoản đóng góp của bạn là số {{ transaction_id }}, vào ngày {{contribution.receive_date}}, với giá trị {{contribution.contribution_source|l10n_currency(locale)}}. diff --git a/sites/all/modules/thank_you/templates/html/thank_you.zh-tw.html b/sites/all/modules/thank_you/templates/html/thank_you.zh-tw.html index de2a618..c755829 100644 --- a/sites/all/modules/thank_you/templates/html/thank_you.zh-tw.html +++ b/sites/all/modules/thank_you/templates/html/thank_you.zh-tw.html @@ -1,4 +1,4 @@ -親愛的$firstname, +親愛的 {{ first_name }}, 維基有您真是太美好了。萬分感謝您願意支持:營運維基媒體與其他姊妹計畫的非營利組織,維基媒體基金會。 -- To view, visit https://gerrit.wikimedia.org/r/115325 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8a593af488de16adef288073e46127d37225c0bd Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Adamw ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Delete unused and duplicated file. - change (wikimedia...modifications)
Dzahn has submitted this change and it was merged. Change subject: Delete unused and duplicated file. .. Delete unused and duplicated file. Bug: 56091 Change-Id: Ic90448e793bffe92b582068eb9d3a8ff8bc5f649 --- D template/en/custom/reports/weekly-bug-summary.html.tmpl 1 file changed, 0 insertions(+), 94 deletions(-) Approvals: Aklapper: Looks good to me, but someone else must approve Dzahn: Verified; Looks good to me, approved diff --git a/template/en/custom/reports/weekly-bug-summary.html.tmpl b/template/en/custom/reports/weekly-bug-summary.html.tmpl deleted file mode 100644 index a2d7f68..000 --- a/template/en/custom/reports/weekly-bug-summary.html.tmpl +++ /dev/null @@ -1,94 +0,0 @@ -[%# Wikimedia weekly bug summary template #%] - -[% PROCESS global/variables.none.tmpl %] - -[% PROCESS global/header.html.tmpl - title = "Wikimedia Weekly Bug Summary" -%] - -Total: [% totalbugs %] bugs and [% totalwishes %] enhancements - -[% new_open_bugs %] bugs opened, [% new_closed_bugs %] bugs closed in the last [% duration %] days -([% new_open_wishes %] enhancements opened, [% new_closed_wishes %] enhancements closed) - -Report top - [% sel = { name => 'tops'} %] - [% INCLUDE select %] -summary over the last - [% sel = { name => 'days'} %] - [% INCLUDE select %] -days and - - -Top [% top_number %] Wikimedia products with the most bugs: - - -Product -Openbugs -Opened inlast [% duration %] days -Closed inlast [% duration %] days -Change -Openenhancements -Opened inlast [% duration %] days -Closed inlast [% duration %] days -Change - - -[%- FOREACH pr = product_bug_lists %] - - [%- pr.name -%] - [%- pr.count -%] - +[%- pr.bugs_opened -%] - -[%- pr.bugs_closed -%] - [%- pr.bugs_change -%] - [%- pr.total_wishes -%] - +[%- pr.open_wishes -%] - -[%- pr.closed_wishes -%] - [%- pr.wishes_change -%] - Graph - -[% END %] - - -Top [% top_number %] people who resolved the most reports in the last [% duration %] days: - - - User# Resolved - -[%- FOREACH bh = bug_hunters_list %] - - [% bh.user FILTER html %] - [% bh.count %] - -[% END %] - - -Top [% top_number %] people who most quickly fixed a report in the last [% duration %] days: - - -UserElapsed time -[%- FOREACH bf = bug_fixers_list %] - - [% bf.name FILTER html %] - [% bf.formatted_elapsed %] ([% bf.bugid %]) - -[% END %] - - -[% PROCESS global/footer.html.tmpl %] - - -[%##%] -[%# Block for SELECT fields#%] -[%##%] - -[% BLOCK select %] - -[%- FOREACH x = ${sel.name} %] - - [% x FILTER html %] - -[% END %] - -[% END %] -- To view, visit https://gerrit.wikimedia.org/r/113460 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic90448e793bffe92b582068eb9d3a8ff8bc5f649 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/bugzilla/modifications Gerrit-Branch: master Gerrit-Owner: Aklapper Gerrit-Reviewer: Aklapper Gerrit-Reviewer: Dzahn ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update VisualEditor for cherry-pick - change (mediawiki/core)
Catrope has submitted this change and it was merged. Change subject: Update VisualEditor for cherry-pick .. Update VisualEditor for cherry-pick Change-Id: I5c587cab01628fc206493cf3c5c725e452f15c3c --- M extensions/VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Catrope: Verified; Looks good to me, approved diff --git a/extensions/VisualEditor b/extensions/VisualEditor index dc36dac..5d07a71 16 --- a/extensions/VisualEditor +++ b/extensions/VisualEditor -Subproject commit dc36daca4bc94a80b9d0d36492c742164aba6336 +Subproject commit 5d07a71174365e6e1427ccd28a574216e009dcea -- To view, visit https://gerrit.wikimedia.org/r/115324 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5c587cab01628fc206493cf3c5c725e452f15c3c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.23wmf15 Gerrit-Owner: Catrope Gerrit-Reviewer: Catrope ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update VisualEditor for cherry-pick - change (mediawiki/core)
Catrope has uploaded a new change for review. https://gerrit.wikimedia.org/r/115324 Change subject: Update VisualEditor for cherry-pick .. Update VisualEditor for cherry-pick Change-Id: I5c587cab01628fc206493cf3c5c725e452f15c3c --- M extensions/VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/24/115324/1 diff --git a/extensions/VisualEditor b/extensions/VisualEditor index dc36dac..5d07a71 16 --- a/extensions/VisualEditor +++ b/extensions/VisualEditor -Subproject commit dc36daca4bc94a80b9d0d36492c742164aba6336 +Subproject commit 5d07a71174365e6e1427ccd28a574216e009dcea -- To view, visit https://gerrit.wikimedia.org/r/115324 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5c587cab01628fc206493cf3c5c725e452f15c3c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.23wmf15 Gerrit-Owner: Catrope ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Replace custom template file by using existing Bugzilla hook - change (wikimedia...modifications)
Dzahn has submitted this change and it was merged. Change subject: Replace custom template file by using existing Bugzilla hook .. Replace custom template file by using existing Bugzilla hook Makes our diff smaller. I guess there's more low hanging fruit. Bug: 58556 Change-Id: I6edc7f5abb1c1a055132ab2f8bfe43118a7ad6f1 --- A extensions/Wikimedia/template/en/default/hook/list/table-before_table.html.tmpl D template/en/custom/list/table.html.tmpl 2 files changed, 2 insertions(+), 264 deletions(-) Approvals: Aklapper: Looks good to me, but someone else must approve Dzahn: Verified; Looks good to me, approved diff --git a/extensions/Wikimedia/template/en/default/hook/list/table-before_table.html.tmpl b/extensions/Wikimedia/template/en/default/hook/list/table-before_table.html.tmpl new file mode 100644 index 000..29aec4f --- /dev/null +++ b/extensions/Wikimedia/template/en/default/hook/list/table-before_table.html.tmpl @@ -0,0 +1,2 @@ +[%# See bug 40244 and bug 58556 %] +[% abbrev.product.maxlength = 13 %] diff --git a/template/en/custom/list/table.html.tmpl b/template/en/custom/list/table.html.tmpl deleted file mode 100644 index 6e40791..000 --- a/template/en/custom/list/table.html.tmpl +++ /dev/null @@ -1,264 +0,0 @@ -[%# The contents of this file are subject to the Mozilla Public - # License Version 1.1 (the "License"); you may not use this file - # except in compliance with the License. You may obtain a copy of - # the License at http://www.mozilla.org/MPL/ - # - # Software distributed under the License is distributed on an "AS - # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - # implied. See the License for the specific language governing - # rights and limitations under the License. - # - # The Original Code is the Bugzilla Bug Tracking System. - # - # The Initial Developer of the Original Code is Netscape Communications - # Corporation. Portions created by Netscape are - # Copyright (C) 1998 Netscape Communications Corporation. All - # Rights Reserved. - # - # Contributor(s): Myk Melez - # Jesse Clark - #%] - -[%%] -[%# Initialization #%] -[%%] - -[%# Don't display the table or do any processing if there are no bugs - # to display %] -[% RETURN IF !bugs.size %] - -[%# Columns whose titles or values should be abbreviated to make the list - # more compact. For columns whose titles should be abbreviated, - # the shortened title is included. For columns whose values should be - # abbreviated, a maximum length is provided along with the ellipsis that - # should be added to an abbreviated value, if any. - # wrap is set if a column's contents should be allowed to be word-wrapped - # by the browser. - #%] - -[% PROCESS "global/field-descs.none.tmpl" %] -[% field_descs.short_short_desc = field_descs.short_desc %] -[% field_descs.assigned_to_realname = field_descs.assigned_to %] -[% field_descs.reporter_realname= field_descs.reporter%] -[% field_descs.qa_contact_realname = field_descs.qa_contact %] - -[% abbrev = - { -"bug_severity" => { maxlength => 3 , title => "Sev" } , -"priority" => { maxlength => 7 , title => "Pri" } , -"rep_platform" => { maxlength => 3 , title => "HW" } , -"bug_status" => { maxlength => 4 } , -"assigned_to" => { maxlength => 30 , ellipsis => "..." } , -"assigned_to_realname" => { maxlength => 20 , ellipsis => "..." } , -"reporter" => { maxlength => 30 , ellipsis => "..." } , -"reporter_realname"=> { maxlength => 20 , ellipsis => "..." } , -"qa_contact" => { maxlength => 30 , ellipsis => "..." , title => "QAContact" } , -"qa_contact_realname" => { maxlength => 20 , ellipsis => "..." , title => "QAContact" } , -"resolution"=> { maxlength => 4 } , -"short_desc"=> { wrap => 1 } , -"short_short_desc" => { maxlength => 60 , ellipsis => "..." , wrap => 1 } , -"status_whiteboard" => { title => "Whiteboard" , wrap => 1 } , -"keywords" => { wrap => 1 } , -"flagtypes.name"=> { wrap => 1 } , -"component" => { maxlength => 8 , title => "Comp" } , -"product" => { maxlength => 13 } , -"version" => { maxlength => 5 , title => "Vers" } , -"op_sys"=> { maxlength => 4 } , -"bug_file_loc" => { maxlength => 30 } , -"target_milestone" => { title => "TargetM" } , -"longdescs.count" => { title => "# Comments" }, -"percentage_complete" => { format_value => "%d %%" } , - } -%] - -[% PROCESS bug/time.html.tmpl %] - -[% Hook.process("before_table") %] - -[%##
[MediaWiki-commits] [Gerrit] Do not log expected Flow exceptions - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: Do not log expected Flow exceptions .. Do not log expected Flow exceptions Bug: 61797 Change-Id: I990057accacc351e7b2773e4dc907bc69b2be884 --- M includes/Formatter/Contributions.php 1 file changed, 3 insertions(+), 1 deletion(-) Approvals: EBernhardson: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Formatter/Contributions.php b/includes/Formatter/Contributions.php index c8b3910..45bece5 100644 --- a/includes/Formatter/Contributions.php +++ b/includes/Formatter/Contributions.php @@ -16,7 +16,9 @@ try { return $this->formatReal( $pager, $row ); } catch ( FlowException $e ) { - \MWExceptionHandler::logException( $e ); + // Comment out for now since we expect some flow exceptions, when gerrit 111952 is + // merged, then we will turn this back on so we can catch unexpected exceptions. + //\MWExceptionHandler::logException( $e ); return false; } } -- To view, visit https://gerrit.wikimedia.org/r/115322 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I990057accacc351e7b2773e4dc907bc69b2be884 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Bsitu Gerrit-Reviewer: EBernhardson 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 hook in core for bmo's 'Needinfo' Bugzilla extension. - change (wikimedia...modifications)
Dzahn has submitted this change and it was merged. Change subject: Add hook in core for bmo's 'Needinfo' Bugzilla extension. .. Add hook in core for bmo's 'Needinfo' Bugzilla extension. Backport of http://bzr.mozilla.org/bugzilla/trunk/revision/8924 in upstream master. One requirement for bug 36064. Change-Id: I381c5dc82106587a7f9f7337e4e546528300aa0e --- M template/en/custom/bug/edit.html.tmpl 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Aklapper: Looks good to me, but someone else must approve Dzahn: Verified; Looks good to me, approved diff --git a/template/en/custom/bug/edit.html.tmpl b/template/en/custom/bug/edit.html.tmpl index 576b936..3848c84 100644 --- a/template/en/custom/bug/edit.html.tmpl +++ b/template/en/custom/bug/edit.html.tmpl @@ -1104,6 +1104,10 @@ [% PROCESS commit_button id=""%] +[%# WIKIMEDIA START Backport of bmo 944543 %] +[% Hook.process("after_comment_commit_button", 'bug/edit.html.tmpl') %] +[%# WIKIMEDIA END Backport of bmo 944543 %] + -- To view, visit https://gerrit.wikimedia.org/r/114168 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I381c5dc82106587a7f9f7337e4e546528300aa0e Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/bugzilla/modifications Gerrit-Branch: master Gerrit-Owner: Aklapper Gerrit-Reviewer: Aklapper Gerrit-Reviewer: Dzahn ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Do not log expected Flow exceptions - change (mediawiki...Flow)
Bsitu has uploaded a new change for review. https://gerrit.wikimedia.org/r/115322 Change subject: Do not log expected Flow exceptions .. Do not log expected Flow exceptions Bug: 61797 Change-Id: I990057accacc351e7b2773e4dc907bc69b2be884 --- M includes/Formatter/Contributions.php 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/22/115322/1 diff --git a/includes/Formatter/Contributions.php b/includes/Formatter/Contributions.php index c8b3910..45bece5 100644 --- a/includes/Formatter/Contributions.php +++ b/includes/Formatter/Contributions.php @@ -16,7 +16,9 @@ try { return $this->formatReal( $pager, $row ); } catch ( FlowException $e ) { - \MWExceptionHandler::logException( $e ); + // Comment out for now since we expect some flow exceptions, when gerrit 111952 is + // merged, then we will turn this back on so we can catch unexpected exceptions. + //\MWExceptionHandler::logException( $e ); return false; } } -- To view, visit https://gerrit.wikimedia.org/r/115322 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I990057accacc351e7b2773e4dc907bc69b2be884 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Bsitu ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Only add event handler once; after edit we may reload multip... - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/115321 Change subject: Only add event handler once; after edit we may reload multiple times .. Only add event handler once; after edit we may reload multiple times This was causing multiple calls to section request/display. Change-Id: Ie73e0cbe991691613138955d39e0908b6048db84 --- M wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java 1 file changed, 16 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/21/115321/1 diff --git a/wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java b/wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java index 8c5e16a..9329271 100644 --- a/wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java +++ b/wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java @@ -95,22 +95,6 @@ } private void populateNonLeadSections(final Page page) { -bridge.addListener("requestSection", new CommunicationBridge.JSEventListener() { -@Override -public void onMessage(String messageType, JSONObject messagePayload) { -try { -int index = messagePayload.optInt("index"); -JSONObject wrapper = new JSONObject(); -wrapper.put("section", page.getSections().get(index).toJSON()); -wrapper.put("index", index); -wrapper.put("isLast", index == page.getSections().size() - 1); -bridge.sendMessage("displaySection", wrapper); -} catch (JSONException e) { -// Won't happen -throw new RuntimeException(e); -} -} -}); editHandler = new EditHandler(this, bridge, page); bridge.sendMessage("startSectionsDisplay", new JSONObject()); } @@ -161,6 +145,22 @@ bridge = new CommunicationBridge(webView, "file:///android_asset/index.html"); Utils.addUtilityMethodsToBridge(getActivity(), bridge); +bridge.addListener("requestSection", new CommunicationBridge.JSEventListener() { +@Override +public void onMessage(String messageType, JSONObject messagePayload) { +try { +int index = messagePayload.optInt("index"); +JSONObject wrapper = new JSONObject(); +wrapper.put("section", page.getSections().get(index).toJSON()); +wrapper.put("index", index); +wrapper.put("isLast", index == page.getSections().size() - 1); +bridge.sendMessage("displaySection", wrapper); +} catch (JSONException e) { +// Won't happen +throw new RuntimeException(e); +} +} +}); linkHandler = new LinkHandler(getActivity(), bridge, title.getSite()); app = (WikipediaApp)getActivity().getApplicationContext(); api = ((WikipediaApp)getActivity().getApplicationContext()).getAPIForSite(title.getSite()); -- To view, visit https://gerrit.wikimedia.org/r/115321 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie73e0cbe991691613138955d39e0908b6048db84 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Multiply by 100 for percentages, not 200 - change (mediawiki...CirrusSearch)
jenkins-bot has submitted this change and it was merged. Change subject: Multiply by 100 for percentages, not 200 .. Multiply by 100 for percentages, not 200 Change-Id: I9516dca27b4a36335b5a8810618dd799b1dfd27a --- M maintenance/checkCounts.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Manybubbles: Looks good to me, approved jenkins-bot: Verified diff --git a/maintenance/checkCounts.php b/maintenance/checkCounts.php index ddcd630..8e860a4 100644 --- a/maintenance/checkCounts.php +++ b/maintenance/checkCounts.php @@ -39,7 +39,7 @@ public function execute() { $siteStats = SiteStats::pages(); $elasticsearch = Connection::getPageType( wfWikiId() )->count(); - $difference = round( 200.0 * abs( $siteStats - $elasticsearch ) / ( $siteStats + $elasticsearch ) ); + $difference = round( 100.0 * abs( $siteStats - $elasticsearch ) / ( $siteStats + $elasticsearch ) ); $this->output( "SiteStats=$siteStats\n" ); $this->output( "Elasticsearch=$elasticsearch\n" ); $this->output( "Percentage=$difference%\n"); -- To view, visit https://gerrit.wikimedia.org/r/115319 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9516dca27b4a36335b5a8810618dd799b1dfd27a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: Chad Gerrit-Reviewer: Manybubbles Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Always try to put redirects at index 0, offset 0 - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Always try to put redirects at index 0, offset 0 .. Always try to put redirects at index 0, offset 0 This is a hack to make redirects work whilst Parsoid just dumbly inserts them in- place, and should be removed once Parsoid handles that logic. Bug: 61862 Change-Id: Ie3dc85ec29db3197f1a13744f7974f0bec5d427d --- M modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js b/modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js index de1e1ae..aab4c54 100644 --- a/modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js +++ b/modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js @@ -309,7 +309,8 @@ } else { if ( newRedirectData ) { // There's no existing redirect but there is a new one, so create - this.metaList.insertMeta( newRedirectItemData ); + // HACK: Putting this at index 0, offset 0 so that it works – bug 61862 + this.metaList.insertMeta( newRedirectItemData, 0, 0 ); } } -- To view, visit https://gerrit.wikimedia.org/r/115309 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie3dc85ec29db3197f1a13744f7974f0bec5d427d Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: wmf/1.23wmf15 Gerrit-Owner: Catrope Gerrit-Reviewer: Catrope Gerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] phpunit test for XQuery generation - change (mediawiki...MathSearch)
jenkins-bot has submitted this change and it was merged. Change subject: phpunit test for XQuery generation .. phpunit test for XQuery generation Change-Id: Ic4dfed43fb32216477b7038e5903edbd7d91e37f --- M MathQueryObject.php M MathSearch.php M XQueryGenerator.php M XQueryGeneratorDB2.php M maintenance/ExportMathTable.php M maintenance/IndexBase.php A tests/MathXQueryTest.php 7 files changed, 317 insertions(+), 47 deletions(-) Approvals: Physikerwelt: Looks good to me, approved jenkins-bot: Verified diff --git a/MathQueryObject.php b/MathQueryObject.php index d82f2e8..da8d4ac 100644 --- a/MathQueryObject.php +++ b/MathQueryObject.php @@ -185,10 +185,13 @@ public function generateContentQueryString(){ $renderer = new MathLaTeXML($this->getTexQuery()); $renderer->setLaTeXMLSettings($this->getLaTeXMLCMMLSettings()); - $renderer->setAllowedRootElments(array('query')); - $renderer->render(true); - $this->cquery = $renderer->getMathml(); - return $this->cquery; + $renderer->setAllowedRootElements(array('query')); + if ( $renderer->render(true) ){ + $this->cquery = $renderer->getMathml(); + return $this->cquery; + } else { + wfDebugLog('math', 'error during geration of query string'. $renderer->getLastError()); + } } public function generatePresentationQueryString(){ diff --git a/MathSearch.php b/MathSearch.php index 744cdfd..e2ea9e5 100644 --- a/MathSearch.php +++ b/MathSearch.php @@ -66,4 +66,4 @@ $wgGroupPermissions['user']['MathDebug'] = true; -$wgMathSearchDB2Table = 'wiki.math'; \ No newline at end of file +$wgMathSearchDB2Table = 'math'; \ No newline at end of file diff --git a/XQueryGenerator.php b/XQueryGenerator.php index 5a13aa3..47e21df 100644 --- a/XQueryGenerator.php +++ b/XQueryGenerator.php @@ -17,13 +17,13 @@ private $lengthConstraint = ''; /** @var DOMDocument the MWS XML */ private $xml ; - + /** -* +* * @param String $cmmlQueryString that contains the MathML query expression */ public function __construct( $cmmlQueryString ){ - $this->xml = new DOMDocument(); + $this->xml = new DOMDocument(); $this->xml->preserveWhiteSpace = false; $this->xml->loadXML($cmmlQueryString); } @@ -31,40 +31,55 @@ /** * @return String the XQueryExpression. */ - public function getXQuery() { - $fixedConstraints = $this->generateConstraint( $this->xml->getElementsByTagName('expr')->item(0) ); + public function getXQuery() + { + $fixedConstraints = $this->generateConstraint($this->xml->getElementsByTagName('expr')->item(0), true); $qvarConstraintString = ''; foreach ($this->qvar as $key => $value) { - $first = $value[0]; - if ($qvarConstraintString) { - $qvarConstraintString .= ' and '; - } - $qvarConstraintString .= '$x' . $first; - $second = ''; - foreach ($value as $second) { - if ($second) { - $second.=' and $x' . $first; + $addstr = ''; + $newContent = false; + if (sizeof($value) > 1) { + $first = $value[0]; + if ($qvarConstraintString) { + $addstr .= "\n and "; } - $qvarConstraintString .= ' = $x' . $second; + $lastSecond = ''; + foreach ($value as $second) { + if ($second != $first) { + if ($lastSecond) { + $addstr .= ' and '; + } + $addstr .= '$x' . $first . ' = $x' . $second; + $lastSecond = $second; + $newContent = true; + } + } + } + if ( $newContent ){ + $qvarConstraintString .= $addstr; } } - $query = 'for $x in $m//*:' . $this->xml->getElementsByTagName('expr')->item(0)->firstChild->nodeName . '[' . -
[MediaWiki-commits] [Gerrit] Fix popup video size by ordering transcode settings properly - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Fix popup video size by ordering transcode settings properly .. Fix popup video size by ordering transcode settings properly Followup to Ib2dd92626 which appended the settings instead of prepending them. Per Michael Dale this was hitting a bad assumption in the player, which caused it to size for the smallest size instead of the largest one. Bug: 61760 Change-Id: I1343f0ec16112eb9d9519f0a9a900a63f157c6d0 --- M wmf-config/CommonSettings.php 1 file changed, 8 insertions(+), 2 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php index 276cd53..1150302 100644 --- a/wmf-config/CommonSettings.php +++ b/wmf-config/CommonSettings.php @@ -670,8 +670,14 @@ $wgMinimumVideoPlayerSize = $wmgMinimumVideoPlayerSize; // Enable low-res Theora transcodes for fallback players on slow machines - $wgEnabledTranscodeSet[] = WebVideoTranscode::ENC_OGV_360P; - $wgEnabledTranscodeSet[] = WebVideoTranscode::ENC_OGV_160P; + // Put them at the beginning of the array to keep ordering the way + // the popup player expects, so we pick the right WebM size in most + // cases. + // + // See https://bugzilla.wikimedia.org/61760 + // + array_unshift( $wgEnabledTranscodeSet, WebVideoTranscode::ENC_OGV_360P ); + array_unshift( $wgEnabledTranscodeSet, WebVideoTranscode::ENC_OGV_160P ); } if ( $wgUseContactPageFundraiser ) { -- To view, visit https://gerrit.wikimedia.org/r/115094 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1343f0ec16112eb9d9519f0a9a900a63f157c6d0 Gerrit-PatchSet: 3 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Brion VIBBER Gerrit-Reviewer: Catrope Gerrit-Reviewer: Reedy Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Enable VE in the "Recherche:" (104) namespace for frwikiversity - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Enable VE in the "Recherche:" (104) namespace for frwikiversity .. Enable VE in the "Recherche:" (104) namespace for frwikiversity Bug: 61874 Change-Id: I706b6e29d2156baa24dac8ea72247f76ee23a2e2 --- M wmf-config/InitialiseSettings.php 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index cc877f0..399aa75 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -10700,6 +10700,8 @@ '+enwiki' => array( 100 /* Portal */, 108 /* Book */, 118 /* Draft */ ), // Bug 56001 // Wiktionaries 'svwiktionary' => array( NS_USER ), // Bug 57356 + // Wikiversities + '+frwikiversity' => array( 104 ), // Bug 61874 // Wikimedia wikis '+sewikimedia' => array( 100 /* Projekt */ ), // bug 60882 // Private wikis -- To view, visit https://gerrit.wikimedia.org/r/115299 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I706b6e29d2156baa24dac8ea72247f76ee23a2e2 Gerrit-PatchSet: 2 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Jforrester Gerrit-Reviewer: Catrope Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make VisualEditor opt-out on Portuguese Wikibooks - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Make VisualEditor opt-out on Portuguese Wikibooks .. Make VisualEditor opt-out on Portuguese Wikibooks Bug: 61762 Change-Id: I315156278e013561dfd6a7b79471ed31a9fc0565 --- M visualeditor-default.dblist 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/visualeditor-default.dblist b/visualeditor-default.dblist index eb40e26..874f088 100644 --- a/visualeditor-default.dblist +++ b/visualeditor-default.dblist @@ -160,6 +160,7 @@ yowiki zeawiki zuwiki +ptwikibooks boardwiki collabwiki officewiki -- To view, visit https://gerrit.wikimedia.org/r/115213 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I315156278e013561dfd6a7b79471ed31a9fc0565 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Jforrester Gerrit-Reviewer: Catrope Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Shorten text in for preferred language. - change (apps...wikipedia)
Dr0ptp4kt has uploaded a new change for review. https://gerrit.wikimedia.org/r/115320 Change subject: Shorten text in for preferred language. .. Shorten text in for preferred language. * Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=965913 Change-Id: I5b850f00cad129783ee2ef94775cfa2e7ee8fa56 --- M css/wikiapp.css M js/lib/settings.js 2 files changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/apps/firefox/wikipedia refs/changes/20/115320/1 diff --git a/css/wikiapp.css b/css/wikiapp.css index c9faa80..eefd633 100644 --- a/css/wikiapp.css +++ b/css/wikiapp.css @@ -448,6 +448,7 @@ background-position: right; background-size: 32px; position: absolute; + overflow: hidden; /* Just in case the JS in seetings.js is off a bit */ top: 1.5em; left: 1.5em; right: 1em; diff --git a/js/lib/settings.js b/js/lib/settings.js index 7bd860d..7c4ef9c 100644 --- a/js/lib/settings.js +++ b/js/lib/settings.js @@ -95,11 +95,14 @@ // Adds a span containing the current select text to the dom. // This is needed to mask the uglified FirefoxOS select element. function setSelectText( $select ) { + var upperOptionTextWidth = Math.min(35, Math.floor( $( window ).width() / 9)); $select.parent() .append( $( '' ) .addClass( 'selectText' ) - .text( $select.children( 'option:selected' ).text() ) + .text( $select.children( 'option:selected' ).text().substring( 0, upperOptionTextWidth ) + .concat($select.children( 'option:selected' ).text().length > upperOptionTextWidth ? '...' : '') + ) ).append( $( '' ) .css( 'clear', 'both' ) -- To view, visit https://gerrit.wikimedia.org/r/115320 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5b850f00cad129783ee2ef94775cfa2e7ee8fa56 Gerrit-PatchSet: 1 Gerrit-Project: apps/firefox/wikipedia Gerrit-Branch: master Gerrit-Owner: Dr0ptp4kt ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Don't use parsed wikitext when dealing with CSS/JS - change (mediawiki...CirrusSearch)
jenkins-bot has submitted this change and it was merged. Change subject: Don't use parsed wikitext when dealing with CSS/JS .. Don't use parsed wikitext when dealing with CSS/JS They're bogus and don't work and lead to fun unpredictable results when things like unclosed tags are used in comments. Ideally we could skip the parse entirely. Bug: 61752 Change-Id: Ife47af3c5a769d5b4697105527f93a18425d8e58 --- M includes/BuildDocument/PageDataBuilder.php M tests/browser/features/full_text.feature M tests/browser/features/step_definitions/search_steps.rb A tests/browser/features/support/articles/some.css A tests/browser/features/support/articles/some.js M tests/browser/features/support/hooks.rb 6 files changed, 57 insertions(+), 2 deletions(-) Approvals: Chad: Looks good to me, approved jenkins-bot: Verified Objections: Hashar: There's a problem with this change, please improve diff --git a/includes/BuildDocument/PageDataBuilder.php b/includes/BuildDocument/PageDataBuilder.php index 38ba644..105e830 100644 --- a/includes/BuildDocument/PageDataBuilder.php +++ b/includes/BuildDocument/PageDataBuilder.php @@ -35,8 +35,21 @@ ); public function build() { - foreach( $this->parseFuncs as $f ) { - $this->$f(); + switch ( $this->content->getModel() ) { + case CONTENT_MODEL_CSS: + case CONTENT_MODEL_JAVASCRIPT: + // Don't use parser output here. It's useless and leads + // to weird results. Instead, clear everything. See bug 61752. + $this->doc->add( 'category', array() ); + $this->doc->add( 'outgoing_link', array() ); + $this->doc->add( 'template', array() ); + $this->doc->add( 'file_text', array() ); + $this->doc->add( 'heading', array() ); + break; + default: + foreach( $this->parseFuncs as $f ) { + $this->$f(); + } } return $this->doc; diff --git a/tests/browser/features/full_text.feature b/tests/browser/features/full_text.feature index 8062bf1..3419886 100644 --- a/tests/browser/features/full_text.feature +++ b/tests/browser/features/full_text.feature @@ -191,3 +191,13 @@ Scenario: I can find things that Elaticsearch typically thinks of as word breaks in redirect title When I search for ¢ Then Cent (currency) is the first search result + + @js_and_css + Scenario: JS pages don't corrupt the output +When I search for User:Tools/some.js jQuery +Then there is not alttitle on the first search result + + @js_and_css + Scenario: CSS pages don't corrupt the output +When I search for User:Tools/some.css jQuery +Then there is not alttitle on the first search result diff --git a/tests/browser/features/step_definitions/search_steps.rb b/tests/browser/features/step_definitions/search_steps.rb index b121259..d13833c 100644 --- a/tests/browser/features/step_definitions/search_steps.rb +++ b/tests/browser/features/step_definitions/search_steps.rb @@ -141,6 +141,9 @@ on(SearchResultsPage).first_result_highlighted_alttitle.should == highlighted end end +Then(/^there is not alttitle on the first search result$/) do + on(SearchResultsPage).first_result_alttitle_wrapper_element.should_not exist +end Then(/^(.+) is( not)? in the search results$/) do |title, not_searching| found = false on(SearchResultsPage).results.each do |result| diff --git a/tests/browser/features/support/articles/some.css b/tests/browser/features/support/articles/some.css new file mode 100644 index 000..9839344 --- /dev/null +++ b/tests/browser/features/support/articles/some.css @@ -0,0 +1,9 @@ +foo:before { + content: ""; + color: black; + background: #BDFFBD; +} + +foo:after jQuery { + content: ""; +} diff --git a/tests/browser/features/support/articles/some.js b/tests/browser/features/support/articles/some.js new file mode 100644 index 000..7bd73b8 --- /dev/null +++ b/tests/browser/features/support/articles/some.js @@ -0,0 +1,10 @@ +/*jshint browser: true, camelcase: true, curly: true, eqeqeq: true, immed: true, latedef: true, newcap: true, noarg: true, noempty: true, nonew: true, quotmark: true, undef: true, unused: true, strict: true, laxbreak: true, trailing: true, maxlen: 120, evil: true, onevar: true */ +/*global jQuery, console */ +(function($) { + 'use strict'; + var a = $('Correlatos<\/h3>'); + if (a === a) { +console.log(a); + } + // Note that even though this js isn't used for anything other than testing jslint will probably still check it. +})(jQuery); diff --git a/tests/b
[MediaWiki-commits] [Gerrit] remove kaulen, decom - change (operations/dns)
Dzahn has submitted this change and it was merged. Change subject: remove kaulen, decom .. remove kaulen, decom used to be misc. web services box in Tampa RT #6905 Change-Id: I008da52c072f160c370d36f432be262929e37c49 --- M templates/10.in-addr.arpa M templates/152.80.208.in-addr.arpa M templates/wikimedia.org M templates/wmnet 4 files changed, 0 insertions(+), 4 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa index 2dab107..a470616 100644 --- a/templates/10.in-addr.arpa +++ b/templates/10.in-addr.arpa @@ -532,7 +532,6 @@ 30 1H IN PTR stafford.mgmt.pmtpa.wmnet. 31 1H IN PTR ersch.mgmt.pmtpa.wmnet. 32 1H IN PTR formey.mgmt.pmtpa.wmnet. -34 1H IN PTR kaulen.mgmt.pmtpa.wmnet. 35 1H IN PTR tarin.mgmt.pmtpa.wmnet. 37 1H IN PTR pdf3.mgmt.pmtpa.wmnet. diff --git a/templates/152.80.208.in-addr.arpa b/templates/152.80.208.in-addr.arpa index c448697..d5662d2 100644 --- a/templates/152.80.208.in-addr.arpa +++ b/templates/152.80.208.in-addr.arpa @@ -66,7 +66,6 @@ 1451H IN PTR ae0-101.cr2-pmtpa.wikimedia.org. 1461H IN PTR stat1.wikimedia.org. 1471H IN PTR formey.wikimedia.org. -1491H IN PTR kaulen.wikimedia.org. 1541H IN PTR pdf2.wikimedia.org. 1551H IN PTR pdf1.wikimedia.org. diff --git a/templates/wikimedia.org b/templates/wikimedia.org index cddafb8..0fdb9c0 100644 --- a/templates/wikimedia.org +++ b/templates/wikimedia.org @@ -142,7 +142,6 @@ iodine 1H IN A208.80.154.146 iron 1H IN A208.80.154.151 1H IN 2620:0:861:2:208:80:154:151 -kaulen 1H IN A208.80.152.149 linne 1H IN A208.80.152.167 locke 1H IN A208.80.152.138 lutetium 1H IN A208.80.155.13 diff --git a/templates/wmnet b/templates/wmnet index 38d1fa8..57d917b 100644 --- a/templates/wmnet +++ b/templates/wmnet @@ -350,7 +350,6 @@ WMF39161H IN A10.1.8.42 hume 1H IN A10.1.252.190 stafford 1H IN A10.1.8.30 -kaulen 1H IN A10.1.8.34 labsdb1 1H IN A10.1.8.98 labsdb2 1H IN A10.1.8.99 labstore1 1H IN A10.1.8.74 -- To view, visit https://gerrit.wikimedia.org/r/115243 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I008da52c072f160c370d36f432be262929e37c49 Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: Dzahn Gerrit-Reviewer: Dzahn 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] Multiply by 100 for percentages, not 200 - change (mediawiki...CirrusSearch)
Chad has uploaded a new change for review. https://gerrit.wikimedia.org/r/115319 Change subject: Multiply by 100 for percentages, not 200 .. Multiply by 100 for percentages, not 200 Change-Id: I9516dca27b4a36335b5a8810618dd799b1dfd27a --- M maintenance/checkCounts.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/19/115319/1 diff --git a/maintenance/checkCounts.php b/maintenance/checkCounts.php index ddcd630..8e860a4 100644 --- a/maintenance/checkCounts.php +++ b/maintenance/checkCounts.php @@ -39,7 +39,7 @@ public function execute() { $siteStats = SiteStats::pages(); $elasticsearch = Connection::getPageType( wfWikiId() )->count(); - $difference = round( 200.0 * abs( $siteStats - $elasticsearch ) / ( $siteStats + $elasticsearch ) ); + $difference = round( 100.0 * abs( $siteStats - $elasticsearch ) / ( $siteStats + $elasticsearch ) ); $this->output( "SiteStats=$siteStats\n" ); $this->output( "Elasticsearch=$elasticsearch\n" ); $this->output( "Percentage=$difference%\n"); -- To view, visit https://gerrit.wikimedia.org/r/115319 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9516dca27b4a36335b5a8810618dd799b1dfd27a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: Chad ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] ishmael.wikimedia.org to use its own cert, not wildcard - change (operations/puppet)
RobH has submitted this change and it was merged. Change subject: ishmael.wikimedia.org to use its own cert, not wildcard .. ishmael.wikimedia.org to use its own cert, not wildcard Setting ishmael.wikimedia.org to install and use its own cert, rather than the wildcard Change-Id: Id5f19522f1927a28e5099579d3494fa67c5fb02f RT: 6732 --- A files/ssl/ishmael.wikimedia.org.pem M manifests/role/ishmael.pp M modules/ishmael/templates/apache/ishmael.wikimedia.org.erb 3 files changed, 34 insertions(+), 2 deletions(-) Approvals: RobH: Looks good to me, approved jenkins-bot: Verified diff --git a/files/ssl/ishmael.wikimedia.org.pem b/files/ssl/ishmael.wikimedia.org.pem new file mode 100644 index 000..5ee85c6 --- /dev/null +++ b/files/ssl/ishmael.wikimedia.org.pem @@ -0,0 +1,30 @@ +-BEGIN CERTIFICATE- +MIIFMDCCBBigAwIBAgIDEOLnMA0GCSqGSIb3DQEBBQUAMDwxCzAJBgNVBAYTAlVT +MRcwFQYDVQQKEw5HZW9UcnVzdCwgSW5jLjEUMBIGA1UEAxMLUmFwaWRTU0wgQ0Ew +HhcNMTQwMjIyMjMxNTAzWhcNMTUwMjI2MTkyMzQ2WjCBxDEpMCcGA1UEBRMgMEhj +U0RDZlBaMFRuZTl4TEN4VDZ2RzhjR2M2VUxvb2kxEzARBgNVBAsTCkdUMTgyODQz +MTUxMTAvBgNVBAsTKFNlZSB3d3cucmFwaWRzc2wuY29tL3Jlc291cmNlcy9jcHMg +KGMpMTQxLzAtBgNVBAsTJkRvbWFpbiBDb250cm9sIFZhbGlkYXRlZCAtIFJhcGlk +U1NMKFIpMR4wHAYDVQQDExVpc2htYWVsLndpa2ltZWRpYS5vcmcwggEiMA0GCSqG +SIb3DQEBAQUAA4IBDwAwggEKAoIBAQC144qrhl0YcppwjdiZw4jkmqoA0TSx4eh/ +lxM4tCGmlkamk97EpoerziwpRR3k+QnltCIfvKNdX/uwR4PvmVXnpe0o6zmTAuhe +48d/l82xQc1/aHePKtWJdBpwPH8an32toUO6f8JJS1B7Ell3FJ3tEmHW834Z68w5 +b0bUZShMSds40yvHahGgMkgD69dHAJ9c1TP3m2Y6u4358iaV6ihpIc/KeqM/ACOK +p/aLzePGEZdDshsNPHUai6V5DASNWqBjcJqUSVv5xruCJomhqDyTxKUkYzr+E72D +Jtu8se8u22yQl7uRDw/7Df1siMtN89KFT73UPyZ7vLV/7NTmHw2PAgMBAAGjggGw +MIIBrDAfBgNVHSMEGDAWgBRraT1qGEJK3Y8CZTn9NSSGeJEWMDAOBgNVHQ8BAf8E +BAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMCAGA1UdEQQZMBeC +FWlzaG1hZWwud2lraW1lZGlhLm9yZzBDBgNVHR8EPDA6MDigNqA0hjJodHRwOi8v +cmFwaWRzc2wtY3JsLmdlb3RydXN0LmNvbS9jcmxzL3JhcGlkc3NsLmNybDAdBgNV +HQ4EFgQU4sKeuAKRUzv1KuM5zLwEoEUaE6UwDAYDVR0TAQH/BAIwADB4BggrBgEF +BQcBAQRsMGowLQYIKwYBBQUHMAGGIWh0dHA6Ly9yYXBpZHNzbC1vY3NwLmdlb3Ry +dXN0LmNvbTA5BggrBgEFBQcwAoYtaHR0cDovL3JhcGlkc3NsLWFpYS5nZW90cnVz +dC5jb20vcmFwaWRzc2wuY3J0MEwGA1UdIARFMEMwQQYKYIZIAYb4RQEHNjAzMDEG +CCsGAQUFBwIBFiVodHRwOi8vd3d3Lmdlb3RydXN0LmNvbS9yZXNvdXJjZXMvY3Bz +MA0GCSqGSIb3DQEBBQUAA4IBAQA2AKUcWFC3YlcjD1/Es7YgPwgbZrQ345MAuI3k +wS+uNCGP64FZZsIwYKl48iuhc9J199ZLmiAOqZ+qX9C3JpPko34Hlhh+E9+ER81a +K9IFXCKLwAUlJjRmxwG7bbKauhNtogmgN7Vf6UQVsX0J2462VOvh78aqvmcFl1uE ++VX5vlQfuh2ojN69Qxb9CN5YIF8l5ZQyNpwvwUQkwHrzzeBpzinHiUEYVD8qNjdY +KL9A/AzEdQFzov6VHd7ikO28X1zqspIUsBQ5+222Ep1ws8bapQUUwLQT0dW/shGn +61LLOtu56IfaC7ekNDrn7HU1vM4trV+MJp6UhQj9vKM87HpS +-END CERTIFICATE- diff --git a/manifests/role/ishmael.pp b/manifests/role/ishmael.pp index 8a5a4cd..ba5f09e 100644 --- a/manifests/role/ishmael.pp +++ b/manifests/role/ishmael.pp @@ -4,6 +4,8 @@ system::role { 'role::ishmael': description => 'ishmael server' } +install_certificate{ 'ishmael.wikimedia.org': ca => 'RapidSSL_CA.pem' } + class { '::ishmael': site_name => 'ishmael.wikimedia.org', config_main => '/srv/ishmael/conf.php', diff --git a/modules/ishmael/templates/apache/ishmael.wikimedia.org.erb b/modules/ishmael/templates/apache/ishmael.wikimedia.org.erb index 795736a..3bf43ef 100644 --- a/modules/ishmael/templates/apache/ishmael.wikimedia.org.erb +++ b/modules/ishmael/templates/apache/ishmael.wikimedia.org.erb @@ -10,8 +10,8 @@ SSLProtocol -ALL +SSLv3 +TLSv1 SSLCipherSuite AES128-GCM-SHA256:RC4-SHA:RC4-MD5:DES-CBC3-SHA:AES128-SHA:AES256-SHA SSLHonorCipherOrder on - SSLCertificateFile /etc/ssl/private/star.wikimedia.org.pem - SSLCertificateKeyFile /etc/ssl/private/star.wikimedia.org.key + SSLCertificateFile /etc/ssl/private/ishmael.wikimedia.org.pem + SSLCertificateKeyFile /etc/ssl/private/ishmael.wikimedia.org.key SSLCACertificateFile /etc/ssl/certs/RapidSSL_CA.pem DocumentRoot <%= @docroot %> -- To view, visit https://gerrit.wikimedia.org/r/115318 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id5f19522f1927a28e5099579d3494fa67c5fb02f Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: RobH Gerrit-Reviewer: RobH Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] ishmael.wikimedia.org to use its own cert, not wildcard - change (operations/puppet)
RobH has uploaded a new change for review. https://gerrit.wikimedia.org/r/115318 Change subject: ishmael.wikimedia.org to use its own cert, not wildcard .. ishmael.wikimedia.org to use its own cert, not wildcard Setting ishmael.wikimedia.org to install and use its own cert, rather than the wildcard Change-Id: Id5f19522f1927a28e5099579d3494fa67c5fb02f RT: 6732 --- A files/ssl/ishmael.wikimedia.org.pem M manifests/role/ishmael.pp M modules/ishmael/templates/apache/ishmael.wikimedia.org.erb 3 files changed, 34 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/18/115318/1 diff --git a/files/ssl/ishmael.wikimedia.org.pem b/files/ssl/ishmael.wikimedia.org.pem new file mode 100644 index 000..5ee85c6 --- /dev/null +++ b/files/ssl/ishmael.wikimedia.org.pem @@ -0,0 +1,30 @@ +-BEGIN CERTIFICATE- +MIIFMDCCBBigAwIBAgIDEOLnMA0GCSqGSIb3DQEBBQUAMDwxCzAJBgNVBAYTAlVT +MRcwFQYDVQQKEw5HZW9UcnVzdCwgSW5jLjEUMBIGA1UEAxMLUmFwaWRTU0wgQ0Ew +HhcNMTQwMjIyMjMxNTAzWhcNMTUwMjI2MTkyMzQ2WjCBxDEpMCcGA1UEBRMgMEhj +U0RDZlBaMFRuZTl4TEN4VDZ2RzhjR2M2VUxvb2kxEzARBgNVBAsTCkdUMTgyODQz +MTUxMTAvBgNVBAsTKFNlZSB3d3cucmFwaWRzc2wuY29tL3Jlc291cmNlcy9jcHMg +KGMpMTQxLzAtBgNVBAsTJkRvbWFpbiBDb250cm9sIFZhbGlkYXRlZCAtIFJhcGlk +U1NMKFIpMR4wHAYDVQQDExVpc2htYWVsLndpa2ltZWRpYS5vcmcwggEiMA0GCSqG +SIb3DQEBAQUAA4IBDwAwggEKAoIBAQC144qrhl0YcppwjdiZw4jkmqoA0TSx4eh/ +lxM4tCGmlkamk97EpoerziwpRR3k+QnltCIfvKNdX/uwR4PvmVXnpe0o6zmTAuhe +48d/l82xQc1/aHePKtWJdBpwPH8an32toUO6f8JJS1B7Ell3FJ3tEmHW834Z68w5 +b0bUZShMSds40yvHahGgMkgD69dHAJ9c1TP3m2Y6u4358iaV6ihpIc/KeqM/ACOK +p/aLzePGEZdDshsNPHUai6V5DASNWqBjcJqUSVv5xruCJomhqDyTxKUkYzr+E72D +Jtu8se8u22yQl7uRDw/7Df1siMtN89KFT73UPyZ7vLV/7NTmHw2PAgMBAAGjggGw +MIIBrDAfBgNVHSMEGDAWgBRraT1qGEJK3Y8CZTn9NSSGeJEWMDAOBgNVHQ8BAf8E +BAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMCAGA1UdEQQZMBeC +FWlzaG1hZWwud2lraW1lZGlhLm9yZzBDBgNVHR8EPDA6MDigNqA0hjJodHRwOi8v +cmFwaWRzc2wtY3JsLmdlb3RydXN0LmNvbS9jcmxzL3JhcGlkc3NsLmNybDAdBgNV +HQ4EFgQU4sKeuAKRUzv1KuM5zLwEoEUaE6UwDAYDVR0TAQH/BAIwADB4BggrBgEF +BQcBAQRsMGowLQYIKwYBBQUHMAGGIWh0dHA6Ly9yYXBpZHNzbC1vY3NwLmdlb3Ry +dXN0LmNvbTA5BggrBgEFBQcwAoYtaHR0cDovL3JhcGlkc3NsLWFpYS5nZW90cnVz +dC5jb20vcmFwaWRzc2wuY3J0MEwGA1UdIARFMEMwQQYKYIZIAYb4RQEHNjAzMDEG +CCsGAQUFBwIBFiVodHRwOi8vd3d3Lmdlb3RydXN0LmNvbS9yZXNvdXJjZXMvY3Bz +MA0GCSqGSIb3DQEBBQUAA4IBAQA2AKUcWFC3YlcjD1/Es7YgPwgbZrQ345MAuI3k +wS+uNCGP64FZZsIwYKl48iuhc9J199ZLmiAOqZ+qX9C3JpPko34Hlhh+E9+ER81a +K9IFXCKLwAUlJjRmxwG7bbKauhNtogmgN7Vf6UQVsX0J2462VOvh78aqvmcFl1uE ++VX5vlQfuh2ojN69Qxb9CN5YIF8l5ZQyNpwvwUQkwHrzzeBpzinHiUEYVD8qNjdY +KL9A/AzEdQFzov6VHd7ikO28X1zqspIUsBQ5+222Ep1ws8bapQUUwLQT0dW/shGn +61LLOtu56IfaC7ekNDrn7HU1vM4trV+MJp6UhQj9vKM87HpS +-END CERTIFICATE- diff --git a/manifests/role/ishmael.pp b/manifests/role/ishmael.pp index 8a5a4cd..ba5f09e 100644 --- a/manifests/role/ishmael.pp +++ b/manifests/role/ishmael.pp @@ -4,6 +4,8 @@ system::role { 'role::ishmael': description => 'ishmael server' } +install_certificate{ 'ishmael.wikimedia.org': ca => 'RapidSSL_CA.pem' } + class { '::ishmael': site_name => 'ishmael.wikimedia.org', config_main => '/srv/ishmael/conf.php', diff --git a/modules/ishmael/templates/apache/ishmael.wikimedia.org.erb b/modules/ishmael/templates/apache/ishmael.wikimedia.org.erb index 795736a..3bf43ef 100644 --- a/modules/ishmael/templates/apache/ishmael.wikimedia.org.erb +++ b/modules/ishmael/templates/apache/ishmael.wikimedia.org.erb @@ -10,8 +10,8 @@ SSLProtocol -ALL +SSLv3 +TLSv1 SSLCipherSuite AES128-GCM-SHA256:RC4-SHA:RC4-MD5:DES-CBC3-SHA:AES128-SHA:AES256-SHA SSLHonorCipherOrder on - SSLCertificateFile /etc/ssl/private/star.wikimedia.org.pem - SSLCertificateKeyFile /etc/ssl/private/star.wikimedia.org.key + SSLCertificateFile /etc/ssl/private/ishmael.wikimedia.org.pem + SSLCertificateKeyFile /etc/ssl/private/ishmael.wikimedia.org.key SSLCACertificateFile /etc/ssl/certs/RapidSSL_CA.pem DocumentRoot <%= @docroot %> -- To view, visit https://gerrit.wikimedia.org/r/115318 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id5f19522f1927a28e5099579d3494fa67c5fb02f Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: RobH ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Avoid "leaked window" errors by dismissing popups, not just ... - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/115317 Change subject: Avoid "leaked window" errors by dismissing popups, not just hiding them, on success .. Avoid "leaked window" errors by dismissing popups, not just hiding them, on success Change-Id: I45a2dc6d73f5b0891fea5f1124394d286f14d314 --- M wikipedia/src/main/java/org/wikipedia/editing/EditPreviewFragment.java M wikipedia/src/main/java/org/wikipedia/editing/EditSectionActivity.java 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/17/115317/1 diff --git a/wikipedia/src/main/java/org/wikipedia/editing/EditPreviewFragment.java b/wikipedia/src/main/java/org/wikipedia/editing/EditPreviewFragment.java index a9cc961..64a0f8c 100644 --- a/wikipedia/src/main/java/org/wikipedia/editing/EditPreviewFragment.java +++ b/wikipedia/src/main/java/org/wikipedia/editing/EditPreviewFragment.java @@ -68,7 +68,7 @@ public void onFinish(String result) { displayPreview(result); previewHTML = result; -dialog.hide(); +dialog.dismiss(); } }.execute(); } diff --git a/wikipedia/src/main/java/org/wikipedia/editing/EditSectionActivity.java b/wikipedia/src/main/java/org/wikipedia/editing/EditSectionActivity.java index 705d0d0..0be9a89 100644 --- a/wikipedia/src/main/java/org/wikipedia/editing/EditSectionActivity.java +++ b/wikipedia/src/main/java/org/wikipedia/editing/EditSectionActivity.java @@ -181,7 +181,7 @@ @Override public void onFinish(EditingResult result) { if (result instanceof SuccessEditResult) { -progressDialog.hide(); +progressDialog.dismiss(); setResult(EditHandler.RESULT_REFRESH_PAGE); Toast.makeText(EditSectionActivity.this, R.string.edit_saved_successfully, Toast.LENGTH_LONG).show(); Utils.hideSoftKeyboard(EditSectionActivity.this); -- To view, visit https://gerrit.wikimedia.org/r/115317 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I45a2dc6d73f5b0891fea5f1124394d286f14d314 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fixing font size in beta - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: Fixing font size in beta .. Fixing font size in beta We have to use !important on the font-size of the html element since the html element cannot be targeted to stable or beta (as it is outside the body element). Thus we have to override the rule in typography.less. Bug: 61291 Change-Id: I6c52e55729bc2c1eedf00ddb6d2c4a39414e5148 --- M less/common/typographyNew.less 1 file changed, 5 insertions(+), 2 deletions(-) Approvals: JGonera: Looks good to me, approved jenkins-bot: Verified diff --git a/less/common/typographyNew.less b/less/common/typographyNew.less index 7d52a50..f47c754 100644 --- a/less/common/typographyNew.less +++ b/less/common/typographyNew.less @@ -2,8 +2,11 @@ @import "minerva.mixins"; html { - // When moving to stable, change @fontScalingFactor to 1.0 - font-size: 100%; + // When moving to stable, change @fontScalingFactor to 1.0. + // We have to use !important here since the html element cannot be targeted to stable + // or beta (as it is outside the body element). Thus we have to override the rule in + // typography.less. + font-size: 100% !important; } .beta, .alpha { -- To view, visit https://gerrit.wikimedia.org/r/114672 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6c52e55729bc2c1eedf00ddb6d2c4a39414e5148 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Kaldari Gerrit-Reviewer: JGonera Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Set uploader to current user in "patchset-created" event upo... - change (gerrit)
QChris has uploaded a new change for review. https://gerrit.wikimedia.org/r/115316 Change subject: Set uploader to current user in "patchset-created" event upon rebasing .. Set uploader to current user in "patchset-created" event upon rebasing When rebasing a change through the Web-UI (both old and new ChangeScreen), the corresponding patchset-created event had its patchSet.uploader set to the Change's owner instead of the current user. We now set it to the current user, so stream-events consumers can properly detect who uploaded the rebased patch set. Upstream-Bug: https://code.google.com/p/gerrit/issues/detail?id=2493 Bug: 60781 Change-Id: Iea9459c7015cde9e869dad5946bd1d3b2db5d51a --- M gerrit-server/src/main/java/com/google/gerrit/server/change/PatchSetInserter.java M gerrit-server/src/main/java/com/google/gerrit/server/changedetail/RebaseChange.java 2 files changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/gerrit refs/changes/16/115316/1 diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/change/PatchSetInserter.java b/gerrit-server/src/main/java/com/google/gerrit/server/change/PatchSetInserter.java index 74c358e..58b36b2 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/change/PatchSetInserter.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/change/PatchSetInserter.java @@ -114,6 +114,7 @@ private boolean draft; private boolean runHooks; private boolean sendMail; + private Account.Id uploader; @Inject public PatchSetInserter(ChangeHooks hooks, @@ -207,6 +208,11 @@ public PatchSetInserter setSendMail(boolean sendMail) { this.sendMail = sendMail; +return this; + } + + public PatchSetInserter setUploader(Account.Id uploader) { +this.uploader = uploader; return this; } @@ -337,6 +343,9 @@ patchSet.setRevision(new RevId(commit.name())); } patchSet.setDraft(draft); +if (uploader != null) { + patchSet.setUploader(uploader); +} } private void validate() throws InvalidChangeOperationException { diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/changedetail/RebaseChange.java b/gerrit-server/src/main/java/com/google/gerrit/server/changedetail/RebaseChange.java index b766cea..7825296 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/changedetail/RebaseChange.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/changedetail/RebaseChange.java @@ -299,6 +299,7 @@ .setCopyLabels(true) .setValidatePolicy(validate) .setDraft(originalPatchSet.isDraft()) +.setUploader(uploader.getAccountId()) .setSendMail(sendMail) .setRunHooks(runHooks); -- To view, visit https://gerrit.wikimedia.org/r/115316 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iea9459c7015cde9e869dad5946bd1d3b2db5d51a Gerrit-PatchSet: 1 Gerrit-Project: gerrit Gerrit-Branch: wmf Gerrit-Owner: QChris ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add scope to Exception class methods - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Add scope to Exception class methods .. Add scope to Exception class methods Change-Id: I0097aa9a6d9c178c85706b90484f7a68d3ddbc8b --- M includes/exception/BadTitleError.php M includes/exception/ErrorPageError.php M includes/exception/FatalError.php M includes/exception/MWException.php M includes/exception/PermissionsError.php M tests/phpunit/includes/exception/MWExceptionHandlerTest.php M tests/phpunit/includes/exception/MWExceptionTest.php 7 files changed, 29 insertions(+), 29 deletions(-) Approvals: Bartosz Dziewoński: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/exception/BadTitleError.php b/includes/exception/BadTitleError.php index b3d842d..2da3775 100644 --- a/includes/exception/BadTitleError.php +++ b/includes/exception/BadTitleError.php @@ -31,7 +31,7 @@ * @param string|Message $msg A message key (default: 'badtitletext') * @param array $params parameter to wfMessage() */ - function __construct( $msg = 'badtitletext', $params = array() ) { + public function __construct( $msg = 'badtitletext', $params = array() ) { parent::__construct( 'badtitle', $msg, $params ); } @@ -39,7 +39,7 @@ * Just like ErrorPageError::report() but additionally set * a 400 HTTP status code (bug 33646). */ - function report() { + public function report() { global $wgOut; // bug 33646: a badtitle error page need to return an error code diff --git a/includes/exception/ErrorPageError.php b/includes/exception/ErrorPageError.php index 439d8e4..7cd198b 100644 --- a/includes/exception/ErrorPageError.php +++ b/includes/exception/ErrorPageError.php @@ -34,7 +34,7 @@ * @param string|Message $msg Message key (string) for error text, or a Message object * @param array $params with parameters to wfMessage() */ - function __construct( $title, $msg, $params = array() ) { + public function __construct( $title, $msg, $params = array() ) { $this->title = $title; $this->msg = $msg; $this->params = $params; @@ -52,7 +52,7 @@ parent::__construct( $enMsg->text() ); } - function report() { + public function report() { global $wgOut; $wgOut->showErrorPage( $this->title, $this->msg, $this->params ); diff --git a/includes/exception/FatalError.php b/includes/exception/FatalError.php index 8953219..a7d672f 100644 --- a/includes/exception/FatalError.php +++ b/includes/exception/FatalError.php @@ -30,14 +30,14 @@ /** * @return string */ - function getHTML() { + public function getHTML() { return $this->getMessage(); } /** * @return string */ - function getText() { + public function getText() { return $this->getMessage(); } } diff --git a/includes/exception/MWException.php b/includes/exception/MWException.php index 80b6ac5..f344938 100644 --- a/includes/exception/MWException.php +++ b/includes/exception/MWException.php @@ -29,7 +29,7 @@ * * @return bool */ - function useOutputPage() { + public function useOutputPage() { return $this->useMessageCache() && !empty( $GLOBALS['wgFullyInitialised'] ) && !empty( $GLOBALS['wgOut'] ) && @@ -42,7 +42,7 @@ * @since 1.23 * @return boolean */ - function isLoggable() { + public function isLoggable() { return true; } @@ -51,7 +51,7 @@ * * @return bool */ - function useMessageCache() { + public function useMessageCache() { global $wgLang; foreach ( $this->getTrace() as $frame ) { @@ -70,7 +70,7 @@ * @param array $args arguments to pass to the callback functions * @return string|null string to output or null if any hook has been called */ - function runHooks( $name, $args = array() ) { + public function runHooks( $name, $args = array() ) { global $wgExceptionHooks; if ( !isset( $wgExceptionHooks ) || !is_array( $wgExceptionHooks ) ) { @@ -113,7 +113,7 @@ * The function also has other parameters that are arguments for the message * @return string message with arguments replaced */ - function msg( $key, $fallback /*[, params...] */ ) { + public function msg( $key, $fallback /*[, params...] */ ) { $args = array_slice( func_get_args(), 2 ); if ( $this->useMessageCache() ) { @@ -130,7 +130,7 @@ * * @return string html to output */ -
[MediaWiki-commits] [Gerrit] icinga-admin to use own cert, not wildcard - change (operations/puppet)
RobH has submitted this change and it was merged. Change subject: icinga-admin to use own cert, not wildcard .. icinga-admin to use own cert, not wildcard adding in the install of the icinga-admin.w.o certificate along with the apache vhost template change to support it Change-Id: I48c8ff1708e00ee447d5248371867705cbb1e17b RT: 6705 --- A files/ssl/icinga-admin.wikimedia.org.pem M manifests/misc/icinga.pp M templates/apache/sites/icinga.wikimedia.org.erb 3 files changed, 34 insertions(+), 3 deletions(-) Approvals: RobH: Looks good to me, approved jenkins-bot: Verified diff --git a/files/ssl/icinga-admin.wikimedia.org.pem b/files/ssl/icinga-admin.wikimedia.org.pem new file mode 100644 index 000..08d7774 --- /dev/null +++ b/files/ssl/icinga-admin.wikimedia.org.pem @@ -0,0 +1,30 @@ +-BEGIN CERTIFICATE- +MIIFOjCCBCKgAwIBAgIDEOLPMA0GCSqGSIb3DQEBBQUAMDwxCzAJBgNVBAYTAlVT +MRcwFQYDVQQKEw5HZW9UcnVzdCwgSW5jLjEUMBIGA1UEAxMLUmFwaWRTU0wgQ0Ew +HhcNMTQwMjIzMTUzOTEwWhcNMTUwMjI2MTg0MzQ1WjCByTEpMCcGA1UEBRMgN1k4 +ZVEzZHBOMW9FejBZMVljemhzNXRCd21yYk9mT0sxEzARBgNVBAsTCkdUMzU5NzQw +NDAxMTAvBgNVBAsTKFNlZSB3d3cucmFwaWRzc2wuY29tL3Jlc291cmNlcy9jcHMg +KGMpMTQxLzAtBgNVBAsTJkRvbWFpbiBDb250cm9sIFZhbGlkYXRlZCAtIFJhcGlk +U1NMKFIpMSMwIQYDVQQDExppY2luZ2EtYWRtaW4ud2lraW1lZGlhLm9yZzCCASIw +DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK/Qk0cPyjKf4ssCK4fJOgMVSuET ++9Ukt//GKeWf/ulGFpRtwodsGFhV0/ktV3C1kUxQvu7dTCStPXovPjZH/09S6E0w +0BvbGfOYggAsBwDBPADKLK5owPYb23Y52dkeeghV/xoAHhdJrR1XhUGIYLe+j3Vk +nrnuqEohhsE/E994jQS9vllnGYPTkTxh9TrASuxhlkFjUIMJJ0YzkKnHR1kEP2h5 +vIYOfa+PlrWSrZwbLa1WgOl4szL9Px+tsKhNqYhqsWEfZEGDjtUiEQcjahWMVI6F +eG61edNexs0u/+2XJ0a3jMLUm+jsI+q3EhYviLgfXubxUdj4eC3I0aZxC/UCAwEA +AaOCAbUwggGxMB8GA1UdIwQYMBaAFGtpPWoYQkrdjwJlOf01JIZ4kRYwMA4GA1Ud +DwEB/wQEAwIFoDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwJQYDVR0R +BB4wHIIaaWNpbmdhLWFkbWluLndpa2ltZWRpYS5vcmcwQwYDVR0fBDwwOjA4oDag +NIYyaHR0cDovL3JhcGlkc3NsLWNybC5nZW90cnVzdC5jb20vY3Jscy9yYXBpZHNz +bC5jcmwwHQYDVR0OBBYEFDk1IHhKbnFgAApMABBdcsVCRb3DMAwGA1UdEwEB/wQC +MAAweAYIKwYBBQUHAQEEbDBqMC0GCCsGAQUFBzABhiFodHRwOi8vcmFwaWRzc2wt +b2NzcC5nZW90cnVzdC5jb20wOQYIKwYBBQUHMAKGLWh0dHA6Ly9yYXBpZHNzbC1h +aWEuZ2VvdHJ1c3QuY29tL3JhcGlkc3NsLmNydDBMBgNVHSAERTBDMEEGCmCGSAGG ++EUBBzYwMzAxBggrBgEFBQcCARYlaHR0cDovL3d3dy5nZW90cnVzdC5jb20vcmVz +b3VyY2VzL2NwczANBgkqhkiG9w0BAQUFAAOCAQEAvj31+cWh6wO6zv79B/mcZZB3 +XdisFVgFyBWLMJKBC1lxFUy2aj+fXnvO/KcknzHISBFNT6gKb8YIn9B0xtw25oi5 +yG1vgKnOh5gmmKSDzHiUsn2ueiz4msNtrDzDwRFdjqrwj8H6PZee9YH14MmMqv13 +qhYzgXLqz9FqL+YjiAjZ1sz3kqVFwB4046Uv9zas3bpc9jAIr0PcvhB0cC07Hkgi +Rxrl831Y2yHDvFCa60FN9npqH1UQv8mxrA+pI/1HZlaW874o1qcFHSIoj1mI5Ia9 +z1nP22Sz9JIQe/0SaxI8AsHew3Fz4i7gWPV+7H1w1Zd5L/FGjLUVdVhalfBTgg== +-END CERTIFICATE- diff --git a/manifests/misc/icinga.pp b/manifests/misc/icinga.pp index e73b81b..a155f43 100644 --- a/manifests/misc/icinga.pp +++ b/manifests/misc/icinga.pp @@ -117,7 +117,8 @@ } apache_site { 'icinga': name => 'icinga.wikimedia.org' } - install_certificate{ 'icinga.wikimedia.org': } + install_certificate{ 'icinga.wikimedia.org': ca => 'RapidSSL_CA.pem' } + install_certificate{ 'icinga-admin.wikimedia.org': ca => 'RapidSSL_CA.pem' } } diff --git a/templates/apache/sites/icinga.wikimedia.org.erb b/templates/apache/sites/icinga.wikimedia.org.erb index 7dcfd53..a410d65 100644 --- a/templates/apache/sites/icinga.wikimedia.org.erb +++ b/templates/apache/sites/icinga.wikimedia.org.erb @@ -73,8 +73,8 @@ SSLProtocol -ALL +SSLv3 +TLSv1 SSLCipherSuite AES128-GCM-SHA256:RC4-SHA:RC4-MD5:DES-CBC3-SHA:AES128-SHA:AES256-SHA SSLHonorCipherOrder on - SSLCertificateFile /etc/ssl/private/star.wikimedia.org.pem - SSLCertificateKeyFile /etc/ssl/private/star.wikimedia.org.key + SSLCertificateFile /etc/ssl/private/icinga-admin.wikimedia.org.pem + SSLCertificateKeyFile /etc/ssl/private/icinga-admin.wikimedia.org.key SSLCACertificateFile /etc/ssl/certs/RapidSSL_CA.pem DocumentRoot /usr/share/icinga/htdocs -- To view, visit https://gerrit.wikimedia.org/r/115315 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I48c8ff1708e00ee447d5248371867705cbb1e17b Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: RobH Gerrit-Reviewer: RobH Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] icinga-admin to use own cert, not wildcard - change (operations/puppet)
RobH has uploaded a new change for review. https://gerrit.wikimedia.org/r/115315 Change subject: icinga-admin to use own cert, not wildcard .. icinga-admin to use own cert, not wildcard adding in the install of the icinga-admin.w.o certificate along with the apache vhost template change to support it Change-Id: I48c8ff1708e00ee447d5248371867705cbb1e17b RT: 6705 --- A files/ssl/icinga-admin.wikimedia.org.pem M manifests/misc/icinga.pp M templates/apache/sites/icinga.wikimedia.org.erb 3 files changed, 33 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/15/115315/1 diff --git a/files/ssl/icinga-admin.wikimedia.org.pem b/files/ssl/icinga-admin.wikimedia.org.pem new file mode 100644 index 000..08d7774 --- /dev/null +++ b/files/ssl/icinga-admin.wikimedia.org.pem @@ -0,0 +1,30 @@ +-BEGIN CERTIFICATE- +MIIFOjCCBCKgAwIBAgIDEOLPMA0GCSqGSIb3DQEBBQUAMDwxCzAJBgNVBAYTAlVT +MRcwFQYDVQQKEw5HZW9UcnVzdCwgSW5jLjEUMBIGA1UEAxMLUmFwaWRTU0wgQ0Ew +HhcNMTQwMjIzMTUzOTEwWhcNMTUwMjI2MTg0MzQ1WjCByTEpMCcGA1UEBRMgN1k4 +ZVEzZHBOMW9FejBZMVljemhzNXRCd21yYk9mT0sxEzARBgNVBAsTCkdUMzU5NzQw +NDAxMTAvBgNVBAsTKFNlZSB3d3cucmFwaWRzc2wuY29tL3Jlc291cmNlcy9jcHMg +KGMpMTQxLzAtBgNVBAsTJkRvbWFpbiBDb250cm9sIFZhbGlkYXRlZCAtIFJhcGlk +U1NMKFIpMSMwIQYDVQQDExppY2luZ2EtYWRtaW4ud2lraW1lZGlhLm9yZzCCASIw +DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK/Qk0cPyjKf4ssCK4fJOgMVSuET ++9Ukt//GKeWf/ulGFpRtwodsGFhV0/ktV3C1kUxQvu7dTCStPXovPjZH/09S6E0w +0BvbGfOYggAsBwDBPADKLK5owPYb23Y52dkeeghV/xoAHhdJrR1XhUGIYLe+j3Vk +nrnuqEohhsE/E994jQS9vllnGYPTkTxh9TrASuxhlkFjUIMJJ0YzkKnHR1kEP2h5 +vIYOfa+PlrWSrZwbLa1WgOl4szL9Px+tsKhNqYhqsWEfZEGDjtUiEQcjahWMVI6F +eG61edNexs0u/+2XJ0a3jMLUm+jsI+q3EhYviLgfXubxUdj4eC3I0aZxC/UCAwEA +AaOCAbUwggGxMB8GA1UdIwQYMBaAFGtpPWoYQkrdjwJlOf01JIZ4kRYwMA4GA1Ud +DwEB/wQEAwIFoDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwJQYDVR0R +BB4wHIIaaWNpbmdhLWFkbWluLndpa2ltZWRpYS5vcmcwQwYDVR0fBDwwOjA4oDag +NIYyaHR0cDovL3JhcGlkc3NsLWNybC5nZW90cnVzdC5jb20vY3Jscy9yYXBpZHNz +bC5jcmwwHQYDVR0OBBYEFDk1IHhKbnFgAApMABBdcsVCRb3DMAwGA1UdEwEB/wQC +MAAweAYIKwYBBQUHAQEEbDBqMC0GCCsGAQUFBzABhiFodHRwOi8vcmFwaWRzc2wt +b2NzcC5nZW90cnVzdC5jb20wOQYIKwYBBQUHMAKGLWh0dHA6Ly9yYXBpZHNzbC1h +aWEuZ2VvdHJ1c3QuY29tL3JhcGlkc3NsLmNydDBMBgNVHSAERTBDMEEGCmCGSAGG ++EUBBzYwMzAxBggrBgEFBQcCARYlaHR0cDovL3d3dy5nZW90cnVzdC5jb20vcmVz +b3VyY2VzL2NwczANBgkqhkiG9w0BAQUFAAOCAQEAvj31+cWh6wO6zv79B/mcZZB3 +XdisFVgFyBWLMJKBC1lxFUy2aj+fXnvO/KcknzHISBFNT6gKb8YIn9B0xtw25oi5 +yG1vgKnOh5gmmKSDzHiUsn2ueiz4msNtrDzDwRFdjqrwj8H6PZee9YH14MmMqv13 +qhYzgXLqz9FqL+YjiAjZ1sz3kqVFwB4046Uv9zas3bpc9jAIr0PcvhB0cC07Hkgi +Rxrl831Y2yHDvFCa60FN9npqH1UQv8mxrA+pI/1HZlaW874o1qcFHSIoj1mI5Ia9 +z1nP22Sz9JIQe/0SaxI8AsHew3Fz4i7gWPV+7H1w1Zd5L/FGjLUVdVhalfBTgg== +-END CERTIFICATE- diff --git a/manifests/misc/icinga.pp b/manifests/misc/icinga.pp index e73b81b..87e55fa 100644 --- a/manifests/misc/icinga.pp +++ b/manifests/misc/icinga.pp @@ -118,6 +118,7 @@ apache_site { 'icinga': name => 'icinga.wikimedia.org' } install_certificate{ 'icinga.wikimedia.org': } + install_certificate{ 'icinga-admin.wikimedia.org': } } diff --git a/templates/apache/sites/icinga.wikimedia.org.erb b/templates/apache/sites/icinga.wikimedia.org.erb index 7dcfd53..a410d65 100644 --- a/templates/apache/sites/icinga.wikimedia.org.erb +++ b/templates/apache/sites/icinga.wikimedia.org.erb @@ -73,8 +73,8 @@ SSLProtocol -ALL +SSLv3 +TLSv1 SSLCipherSuite AES128-GCM-SHA256:RC4-SHA:RC4-MD5:DES-CBC3-SHA:AES128-SHA:AES256-SHA SSLHonorCipherOrder on - SSLCertificateFile /etc/ssl/private/star.wikimedia.org.pem - SSLCertificateKeyFile /etc/ssl/private/star.wikimedia.org.key + SSLCertificateFile /etc/ssl/private/icinga-admin.wikimedia.org.pem + SSLCertificateKeyFile /etc/ssl/private/icinga-admin.wikimedia.org.key SSLCACertificateFile /etc/ssl/certs/RapidSSL_CA.pem DocumentRoot /usr/share/icinga/htdocs -- To view, visit https://gerrit.wikimedia.org/r/115315 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I48c8ff1708e00ee447d5248371867705cbb1e17b Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: RobH ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix ForeignDBViaLBRepo favicon - change (mediawiki/core)
Gergő Tisza has uploaded a new change for review. https://gerrit.wikimedia.org/r/115314 Change subject: Fix ForeignDBViaLBRepo favicon .. Fix ForeignDBViaLBRepo favicon Due to the weird inheritance structure of the FileRepo tree, ForeignDBViaLBRepo inherited the wrong getInfo behavior and returned the favicon of the local wiki. Change-Id: I4892247c0e4a2e05c9148efe089f0ff52459bbd0 Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/253 --- M includes/filerepo/ForeignDBViaLBRepo.php 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/14/115314/1 diff --git a/includes/filerepo/ForeignDBViaLBRepo.php b/includes/filerepo/ForeignDBViaLBRepo.php index 18f8d5d..8153ffb 100644 --- a/includes/filerepo/ForeignDBViaLBRepo.php +++ b/includes/filerepo/ForeignDBViaLBRepo.php @@ -90,4 +90,8 @@ protected function assertWritableRepo() { throw new MWException( get_class( $this ) . ': write operations are not supported.' ); } + + public function getInfo() { + return FileRepo::getInfo(); + } } -- To view, visit https://gerrit.wikimedia.org/r/115314 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4892247c0e4a2e05c9148efe089f0ff52459bbd0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gergő Tisza ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Stop processing if user taps 'x' before page loads. - change (apps...wikipedia)
Dr0ptp4kt has uploaded a new change for review. https://gerrit.wikimedia.org/r/115313 Change subject: Stop processing if user taps 'x' before page loads. .. Stop processing if user taps 'x' before page loads. * Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=966372 Change-Id: I54fb02fac2cc68eab3cd12db4233605a5ce12ca2 --- M js/lib/chrome.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/apps/firefox/wikipedia refs/changes/13/115313/1 diff --git a/js/lib/chrome.js b/js/lib/chrome.js index 7cc26fd..2491891 100644 --- a/js/lib/chrome.js +++ b/js/lib/chrome.js @@ -148,7 +148,7 @@ $("#searchForm").bind('submit', function() { if(isSpinning()) { if(curSpinningReq !== null) { - curSpinningReq.abort(); + window.stop(); curSpinningReq = null; chrome.hideSpinner(); } -- To view, visit https://gerrit.wikimedia.org/r/115313 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I54fb02fac2cc68eab3cd12db4233605a5ce12ca2 Gerrit-PatchSet: 1 Gerrit-Project: apps/firefox/wikipedia Gerrit-Branch: master Gerrit-Owner: Dr0ptp4kt ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: a1461f2..5b395c7 - change (mediawiki/extensions)
Jenkins-mwext-sync has uploaded a new change for review. https://gerrit.wikimedia.org/r/115312 Change subject: Syncronize VisualEditor: a1461f2..5b395c7 .. Syncronize VisualEditor: a1461f2..5b395c7 Change-Id: Ib3a7daae840fd74f61eb0e0cbd5b7ad88383d69e --- M VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions refs/changes/12/115312/1 diff --git a/VisualEditor b/VisualEditor index a1461f2..5b395c7 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit a1461f2e7d6c4c4ce2d4f80a53fe2554076f8075 +Subproject commit 5b395c71d584a656e3297ddd232331d517dad764 -- To view, visit https://gerrit.wikimedia.org/r/115312 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib3a7daae840fd74f61eb0e0cbd5b7ad88383d69e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions Gerrit-Branch: master Gerrit-Owner: Jenkins-mwext-sync ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: a1461f2..5b395c7 - change (mediawiki/extensions)
Jenkins-mwext-sync has submitted this change and it was merged. Change subject: Syncronize VisualEditor: a1461f2..5b395c7 .. Syncronize VisualEditor: a1461f2..5b395c7 Change-Id: Ib3a7daae840fd74f61eb0e0cbd5b7ad88383d69e --- M VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Jenkins-mwext-sync: Verified; Looks good to me, approved diff --git a/VisualEditor b/VisualEditor index a1461f2..5b395c7 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit a1461f2e7d6c4c4ce2d4f80a53fe2554076f8075 +Subproject commit 5b395c71d584a656e3297ddd232331d517dad764 -- To view, visit https://gerrit.wikimedia.org/r/115312 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib3a7daae840fd74f61eb0e0cbd5b7ad88383d69e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions Gerrit-Branch: master Gerrit-Owner: Jenkins-mwext-sync Gerrit-Reviewer: Jenkins-mwext-sync ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Always try to put redirects at index 0, offset 0 - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Always try to put redirects at index 0, offset 0 .. Always try to put redirects at index 0, offset 0 This is a hack to make redirects work whilst Parsoid just dumbly inserts them in- place, and should be removed once Parsoid handles that logic. Bug: 61862 Change-Id: Ie3dc85ec29db3197f1a13744f7974f0bec5d427d --- M modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js b/modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js index de1e1ae..aab4c54 100644 --- a/modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js +++ b/modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js @@ -309,7 +309,8 @@ } else { if ( newRedirectData ) { // There's no existing redirect but there is a new one, so create - this.metaList.insertMeta( newRedirectItemData ); + // HACK: Putting this at index 0, offset 0 so that it works – bug 61862 + this.metaList.insertMeta( newRedirectItemData, 0, 0 ); } } -- To view, visit https://gerrit.wikimedia.org/r/115287 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie3dc85ec29db3197f1a13744f7974f0bec5d427d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Jforrester Gerrit-Reviewer: Catrope Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: b7968f6..a1461f2 - change (mediawiki/extensions)
Jenkins-mwext-sync has submitted this change and it was merged. Change subject: Syncronize VisualEditor: b7968f6..a1461f2 .. Syncronize VisualEditor: b7968f6..a1461f2 Change-Id: Icf3587731dc22ec8135037e0712a0c931bf36002 --- M VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Jenkins-mwext-sync: Verified; Looks good to me, approved diff --git a/VisualEditor b/VisualEditor index b7968f6..a1461f2 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit b7968f655784d9543ba0de22a3ec2b729a56adb5 +Subproject commit a1461f2e7d6c4c4ce2d4f80a53fe2554076f8075 -- To view, visit https://gerrit.wikimedia.org/r/115311 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icf3587731dc22ec8135037e0712a0c931bf36002 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions Gerrit-Branch: master Gerrit-Owner: Jenkins-mwext-sync Gerrit-Reviewer: Jenkins-mwext-sync ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: b7968f6..a1461f2 - change (mediawiki/extensions)
Jenkins-mwext-sync has uploaded a new change for review. https://gerrit.wikimedia.org/r/115311 Change subject: Syncronize VisualEditor: b7968f6..a1461f2 .. Syncronize VisualEditor: b7968f6..a1461f2 Change-Id: Icf3587731dc22ec8135037e0712a0c931bf36002 --- M VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions refs/changes/11/115311/1 diff --git a/VisualEditor b/VisualEditor index b7968f6..a1461f2 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit b7968f655784d9543ba0de22a3ec2b729a56adb5 +Subproject commit a1461f2e7d6c4c4ce2d4f80a53fe2554076f8075 -- To view, visit https://gerrit.wikimedia.org/r/115311 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icf3587731dc22ec8135037e0712a0c931bf36002 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions Gerrit-Branch: master Gerrit-Owner: Jenkins-mwext-sync Gerrit-Reviewer: Jenkins-mwext-sync ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Wikibase parsing of diff=... parameter was different from core - change (mediawiki...Wikibase)
Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/115310 Change subject: Wikibase parsing of diff=... parameter was different from core .. Wikibase parsing of diff=... parameter was different from core Core logik is basically: * Check if the diff parameter does exists. * If yes, check if it is equal to 'prev'. * If it's equal to 'next'. * Convert everything else to a number. * If that conversion returns 0 compare to the current revision. * Else try to use the number to find a revision. * That may fail (e.g. for diff=-1). In other words: In core every non-numeric value including 'cur', 'curr', 'c', '0' and even the empty string and null (...?diff&oldid=123 will work) does exactly the same as 'cur'. Bug: 61749 Change-Id: Id7aab6ec65a23128fffe4c9e366213603a7e59c6 --- M repo/includes/ContentRetriever.php M repo/tests/phpunit/includes/ContentRetrieverTest.php 2 files changed, 15 insertions(+), 40 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/10/115310/1 diff --git a/repo/includes/ContentRetriever.php b/repo/includes/ContentRetriever.php index 10f0eb0..0bb1088 100644 --- a/repo/includes/ContentRetriever.php +++ b/repo/includes/ContentRetriever.php @@ -61,48 +61,20 @@ * @return Revision|null */ public function getDiffRevision( $oldId, $diffValue ) { - if ( $this->isSpecialDiffParam( $diffValue ) ) { - return $this->resolveDiffRevision( $oldId, $diffValue ); + $oldRevision = Revision::newFromId( $oldId ); + + if ( $diffValue === 'prev' ) { + return $oldRevision; + } else if ( $diffValue === 'next' ) { + return $oldRevision->getNext(); } - if ( is_numeric( $diffValue ) ) { - $revId = (int)$diffValue; - return Revision::newFromId( $revId ); + // All remaining non-numeric values including 'cur' become 0, see DifferenceEngine + $revId = intval( $diffValue ); + if ( $revId === 0 ) { + $revId = $oldRevision->getTitle()->getLatestRevID(); } - - // uses default handling for revision not found - // @todo error handling could be improved! - return null; - } - - /** -* @param mixed $diffValue -* -* @return boolean -*/ - protected function isSpecialDiffParam( $diffValue ) { - return in_array( $diffValue, array( 'prev', 'next', 'cur', '0' ), true ); - } - - /** -* For non-revision ids in the diff request param, get the correct revision -* -* @param int $oldId -* @param string|int $diffValue -* -* @return Revision -*/ - protected function resolveDiffRevision( $oldId, $diffValue ) { - $oldIdRev = Revision::newFromId( $oldId ); - - if ( $diffValue === 0 || $diffValue === 'cur' ) { - $curId = $oldIdRev->getTitle()->getLatestRevID(); - return Revision::newFromId( $curId ); - } elseif ( $diffValue === 'next' ) { - return $oldIdRev->getNext(); - } - - return $oldIdRev; + return Revision::newFromId( $revId ); } } diff --git a/repo/tests/phpunit/includes/ContentRetrieverTest.php b/repo/tests/phpunit/includes/ContentRetrieverTest.php index 6d904b3..d72b9e4 100644 --- a/repo/tests/phpunit/includes/ContentRetrieverTest.php +++ b/repo/tests/phpunit/includes/ContentRetrieverTest.php @@ -88,8 +88,11 @@ array( $content2, $revIds[0], array( 'diff' => 'next', 'oldid' => $revIds[0] ), $title, 'diff=next' ), array( $content2, $revIds[1], array( 'diff' => 'prev', 'oldid' => $revIds[1] ), $title, 'diff=prev' ), array( $content3, $revIds[1], array( 'diff' => 'cur', 'oldid' => $revIds[1] ), $title, 'diff=cur' ), + array( $content3, $revIds[1], array( 'diff' => 'c', 'oldid' => $revIds[1] ), $title, 'diff=c' ), + array( $content3, $revIds[1], array( 'diff' => '0', 'oldid' => $revIds[1] ), $title, 'diff=0' ), + array( $content3, $revIds[1], array( 'diff' => '', 'oldid' => $revIds[1] ), $title, 'diff=' ), array( $content3, $revIds[2], array(), $title, 'no query params' ), - array( null, $revIds[1], array( 'diff' => 'kitten', 'oldid' => $revIds[0] ), $title, 'diff=kitten' ) + array( null, $revIds[1], array( 'diff' => '-1', 'oldid' => $revIds[0] ), $title, 'diff=-1' ) ); } -- To view, visit https://gerrit.wiki
[MediaWiki-commits] [Gerrit] Don't let the user set a static redirect flag on a non-redirect - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Don't let the user set a static redirect flag on a non-redirect .. Don't let the user set a static redirect flag on a non-redirect Bug: 61865 Change-Id: I417d7a5e179f46022652a267de41fb4de8525391 --- M modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js b/modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js index 9e32e97..4263ba1 100644 --- a/modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js +++ b/modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js @@ -317,7 +317,7 @@ if ( currentStaticRedirectItem && ( !newStaticRedirectState || !newRedirectData ) ) { currentStaticRedirectItem.remove(); } - if ( !currentStaticRedirectItem && newStaticRedirectState ) { + if ( !currentStaticRedirectItem && newStaticRedirectState && newRedirectData ) { this.metaList.insertMeta( { 'type': 'mwStaticRedirect' } ); } } -- To view, visit https://gerrit.wikimedia.org/r/115239 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I417d7a5e179f46022652a267de41fb4de8525391 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Jforrester Gerrit-Reviewer: Catrope Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Always try to put redirects at index 0, offset 0 - change (mediawiki...VisualEditor)
Catrope has uploaded a new change for review. https://gerrit.wikimedia.org/r/115309 Change subject: Always try to put redirects at index 0, offset 0 .. Always try to put redirects at index 0, offset 0 This is a hack to make redirects work whilst Parsoid just dumbly inserts them in- place, and should be removed once Parsoid handles that logic. Bug: 61862 Change-Id: Ie3dc85ec29db3197f1a13744f7974f0bec5d427d --- M modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/09/115309/1 diff --git a/modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js b/modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js index de1e1ae..aab4c54 100644 --- a/modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js +++ b/modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js @@ -309,7 +309,8 @@ } else { if ( newRedirectData ) { // There's no existing redirect but there is a new one, so create - this.metaList.insertMeta( newRedirectItemData ); + // HACK: Putting this at index 0, offset 0 so that it works – bug 61862 + this.metaList.insertMeta( newRedirectItemData, 0, 0 ); } } -- To view, visit https://gerrit.wikimedia.org/r/115309 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie3dc85ec29db3197f1a13744f7974f0bec5d427d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: wmf/1.23wmf15 Gerrit-Owner: Catrope Gerrit-Reviewer: Jforrester ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 063b3f5..b7968f6 - change (mediawiki/extensions)
Jenkins-mwext-sync has submitted this change and it was merged. Change subject: Syncronize VisualEditor: 063b3f5..b7968f6 .. Syncronize VisualEditor: 063b3f5..b7968f6 Change-Id: I03f08f34cbed44e6bf12386289dfa6059ea32775 --- M VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Jenkins-mwext-sync: Verified; Looks good to me, approved diff --git a/VisualEditor b/VisualEditor index 063b3f5..b7968f6 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit 063b3f512d1b67b9e73f1c1420d6f5f6fcc6bc27 +Subproject commit b7968f655784d9543ba0de22a3ec2b729a56adb5 -- To view, visit https://gerrit.wikimedia.org/r/115308 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I03f08f34cbed44e6bf12386289dfa6059ea32775 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions Gerrit-Branch: master Gerrit-Owner: Jenkins-mwext-sync Gerrit-Reviewer: Jenkins-mwext-sync ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 063b3f5..b7968f6 - change (mediawiki/extensions)
Jenkins-mwext-sync has uploaded a new change for review. https://gerrit.wikimedia.org/r/115308 Change subject: Syncronize VisualEditor: 063b3f5..b7968f6 .. Syncronize VisualEditor: 063b3f5..b7968f6 Change-Id: I03f08f34cbed44e6bf12386289dfa6059ea32775 --- M VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions refs/changes/08/115308/1 diff --git a/VisualEditor b/VisualEditor index 063b3f5..b7968f6 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit 063b3f512d1b67b9e73f1c1420d6f5f6fcc6bc27 +Subproject commit b7968f655784d9543ba0de22a3ec2b729a56adb5 -- To view, visit https://gerrit.wikimedia.org/r/115308 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I03f08f34cbed44e6bf12386289dfa6059ea32775 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions Gerrit-Branch: master Gerrit-Owner: Jenkins-mwext-sync ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Disable redirect field unless the checkbox is set in setup - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Disable redirect field unless the checkbox is set in setup .. Disable redirect field unless the checkbox is set in setup The logic for this box is meant to prevent the user from setting a redirect unless they check the box first – but a simple forgotten line in set up to actually disable the box if the checkbox is unticked made this not work in the most-frequent case – when the page isn't a redirect, and the user is trying to make it into one. Bug: 61864 Change-Id: If250b24587a6f56fe545e4668d5e3517ffcff903 --- M modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js b/modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js index de1e1ae..9e32e97 100644 --- a/modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js +++ b/modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js @@ -236,6 +236,7 @@ // Redirect items (disabled states set by change event) this.enableRedirectInput.setValue( !!redirectTargetItem ); this.redirectTargetInput.setValue( redirectTarget ); + this.redirectTargetInput.setDisabled( !redirectTargetItem ); this.enableStaticRedirectInput.setValue( !!redirectStatic ); this.enableStaticRedirectInput.setDisabled( !redirectTargetItem ); this.redirectOptionsTouched = false; -- To view, visit https://gerrit.wikimedia.org/r/115237 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If250b24587a6f56fe545e4668d5e3517ffcff903 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Jforrester Gerrit-Reviewer: Catrope Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Show permission - change (mediawiki...MultimediaViewer)
jenkins-bot has submitted this change and it was merged. Change subject: Show permission .. Show permission Change-Id: I0b8b0626b36baba9732f7350213d8b53ec2cca95 Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/118 --- M MultimediaViewer.i18n.php M MultimediaViewer.php M MultimediaViewerHooks.php M resources/mmv/mmv.bootstrap.js M resources/mmv/mmv.less M resources/mmv/model/mmv.model.Image.js M resources/mmv/provider/mmv.provider.ImageInfo.js A resources/mmv/ui/img/x_gray.svg M resources/mmv/ui/mmv.ui.fileUsage.less A resources/mmv/ui/mmv.ui.less M resources/mmv/ui/mmv.ui.metadataPanel.js A resources/mmv/ui/mmv.ui.metadataPanel.less A resources/mmv/ui/mmv.ui.permission.js A resources/mmv/ui/mmv.ui.permission.less M tests/qunit/mmv.bootstrap.test.js M tests/qunit/mmv.model.test.js M tests/qunit/mmv.ui.metadataPanel.test.js A tests/qunit/mmv.ui.permission.test.js M tests/qunit/provider/mmv.provider.ImageInfo.test.js 19 files changed, 490 insertions(+), 18 deletions(-) Approvals: Gergő Tisza: Looks good to me, approved jenkins-bot: Verified diff --git a/MultimediaViewer.i18n.php b/MultimediaViewer.i18n.php index 104c9a2..4a13048 100644 --- a/MultimediaViewer.i18n.php +++ b/MultimediaViewer.i18n.php @@ -57,6 +57,9 @@ 'multimediaviewer-license-pd' => 'Public Domain', 'multimediaviewer-license-default' => 'View license', + 'multimediaviewer-permission-title' => 'License details', + 'multimediaviewer-permission-link' => 'view terms', + 'multimediaviewer-use-file' => 'Use this file', 'multimediaviewer-use-file-owt' => 'Use this file on a wiki page, as a thumbnail', 'multimediaviewer-use-file-own' => 'Use this file on a wiki page, inline', @@ -152,6 +155,8 @@ 'multimediaviewer-license-pd' => 'Very short label for Public Domain images, used in a link to the file information page that has more licensing information. {{Identical|Public domain}}', 'multimediaviewer-license-default' => 'Short label for a link to generic license information.', + 'multimediaviewer-permission-title' => 'Title of the box containing additional license terms', + 'multimediaviewer-permission-link' => 'Text of the link which shows additional license terms', 'multimediaviewer-use-file' => 'Link that opens a dialog with options for sharing the file, e.g. onwiki or on another site. Similar to the Commons gadget stockPhoto.', 'multimediaviewer-use-file-owt' => 'Label for input box which has wikitext used to show an image with the thumb option and a helpful caption. diff --git a/MultimediaViewer.php b/MultimediaViewer.php index 7ea99c8..704a28f 100644 --- a/MultimediaViewer.php +++ b/MultimediaViewer.php @@ -236,6 +236,10 @@ 'mmv.ui.js', ), + 'styles' => array( + 'mmv.ui.less', + ), + 'dependencies' => array( 'mmv.base', ), @@ -284,18 +288,43 @@ ), ), $moduleInfo( 'mmv/ui' ) ); + $wgResourceModules['mmv.ui.permission'] = array_merge( array( + 'scripts' => array( + 'mmv.ui.permission.js', + ), + + 'styles' => array( + 'mmv.ui.permission.less', + ), + + 'messages' => array( + 'multimediaviewer-permission-title', + ), + + 'dependencies' => array( + 'jquery.color', + 'mediawiki.jqueryMsg', + 'mmv.ui', + 'oojs', + ), + ), $moduleInfo( 'mmv/ui' ) ); + $wgResourceModules['mmv.ui.metadataPanel'] = array_merge( array( 'scripts' => array( 'mmv.ui.metadataPanel.js', ), - // Note: We should pull these styles out, but the LESS patch should get merged first. -// 'styles' => array( -// 'mmv.ui.metadataPanel.less', -// ), + + 'styles' => array( + 'mmv.ui.metadataPanel.less', + ), 'dependencies' => array( 'mmv.ui', 'mmv.ui.fileReuse', + 'mmv.ui.fileUsage', + 'mmv.ui.permission', + 'mmv.ui.description', + 'mmv.ui.categories', 'oojs', 'moment', ), @@ -311,6 +340,9 @@ 'multimediaviewer-datetime-created', 'multimediaviewer-datetime-uploaded', + // for license messages see end of file + 'multimediaviewer-permission-link', +
[MediaWiki-commits] [Gerrit] [wip] Limit thumbnail dimensions in media edit dialog - change (mediawiki...VisualEditor)
Mooeypoo has uploaded a new change for review. https://gerrit.wikimedia.org/r/115307 Change subject: [wip] Limit thumbnail dimensions in media edit dialog .. [wip] Limit thumbnail dimensions in media edit dialog Add a dynamic limit to image dimensions; image is limited to its max size if it is 'thumb' and unlimited in size otherwise. This change depends on ve-core Scalable/MediaSizeWidget adjustment https://gerrit.wikimedia.org/r/115306 Bug: 61282 Change-Id: I1247b1360ae50af039673fa3f2b3521e457ef578 --- M modules/ve-mw/ui/dialogs/ve.ui.MWMediaEditDialog.js 1 file changed, 29 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/07/115307/1 diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWMediaEditDialog.js b/modules/ve-mw/ui/dialogs/ve.ui.MWMediaEditDialog.js index 6bb50fe..008ae11 100644 --- a/modules/ve-mw/ui/dialogs/ve.ui.MWMediaEditDialog.js +++ b/modules/ve-mw/ui/dialogs/ve.ui.MWMediaEditDialog.js @@ -263,6 +263,7 @@ // Events this.applyButton.connect( this, { 'click': [ 'close', { 'action': 'apply' } ] } ); this.positionCheckbox.connect( this, { 'change': 'onPositionCheckboxChange' } ); + this.typeInput.connect( this, { 'select': 'onTypeChange' } ); // Initialization this.generalSettingsPage.$element.append( [ @@ -278,6 +279,22 @@ this.$body.append( this.bookletLayout.$element ); this.$foot.append( this.applyButton.$element ); +}; + +/** + * Handle type change, particularly to and from 'thumb' to make + * sure size is limited. + */ +ve.ui.MWMediaEditDialog.prototype.onTypeChange = function () { + if ( this.typeInput.getSelectedItem().getData() === 'thumb' ) { + // Tell the size widget to limit maxDimensions + this.sizeWidget.setEnforcedMax( true ); + } else { + // Don't limit the widget for other types (Wikitext doesn't) + this.sizeWidget.setEnforcedMax( false ); + } + // Re-validate the existing dimensions + this.sizeWidget.validateDimensions( true ); }; /** @@ -374,6 +391,16 @@ dialog.sizeErrorLabel.$element.show(); } ); } + + if ( + this.mediaNode.getAttribute( 'type' ) === 'thumb' && + !this.sizeWidget.getMaxDimensions() + ) { + // Tell the size widget to limit maxDimensions to image's original dimensions + this.sizeWidget.setEnforcedMax( true ); + } else { + this.sizeWidget.setEnforcedMax( false ); + } // Set initial alt text this.altTextInput.setValue( this.mediaNode.getAttribute( 'alt' ) || '' ); @@ -452,6 +479,8 @@ // Change attributes only if the values are valid if ( this.sizeWidget.isCurrentDimensionsValid() ) { attrs = this.sizeWidget.getCurrentDimensions(); + + // Deal with default size if ( this.mediaNode.getAttribute( 'defaultSize' ) && ( -- To view, visit https://gerrit.wikimedia.org/r/115307 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1247b1360ae50af039673fa3f2b3521e457ef578 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Mooeypoo ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Allow dynamic limit to maxDimensions - change (VisualEditor/VisualEditor)
Mooeypoo has uploaded a new change for review. https://gerrit.wikimedia.org/r/115306 Change subject: Allow dynamic limit to maxDimensions .. Allow dynamic limit to maxDimensions Make sure that the ability to limit to maximum dimensions is dyamic and can change. This is beneficial for when the image type changes to thumbnail (which requires a limit) or to anything else (that can allow for any size without limit.) Also, allow for a forced revalidation of the current size widget dimensions in case limits were applied or removed. Change-Id: I362c7c378c5ccd7a83495b03e4429c9b93c1e9ee --- M modules/ve/ui/widgets/ve.ui.MediaSizeWidget.js M modules/ve/ve.Scalable.js 2 files changed, 35 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/06/115306/1 diff --git a/modules/ve/ui/widgets/ve.ui.MediaSizeWidget.js b/modules/ve/ui/widgets/ve.ui.MediaSizeWidget.js index c36ea65..0820e0a 100644 --- a/modules/ve/ui/widgets/ve.ui.MediaSizeWidget.js +++ b/modules/ve/ui/widgets/ve.ui.MediaSizeWidget.js @@ -137,12 +137,29 @@ this.widthInput.setValue( this.getCurrentDimensions().width ); this.heightInput.setValue( this.getCurrentDimensions().height ); - this.errorLabel.$element.toggle( !this.isCurrentDimensionsValid() ); - this.$element.toggleClass( 've-ui-mediaSizeWidget-input-hasError', !this.isCurrentDimensionsValid() ); + this.validateDimensions( false ); this.preventChangeRecursion = false; }; +/** + * Explicitly call for validating the current dimensions. This is especially + * useful if we've changed conditions for the widget, like limiting image + * dimensions for thumbnails when the image type changes. Triggers the error + * class if needed. + * + * @param {boolean} isForced Force a re-evaluation even if this.valid is + * already set. + * @returns {boolean} Current dimensions are valid + */ +ve.ui.MediaSizeWidget.prototype.validateDimensions = function ( isForced ) { + var isValid = this.isCurrentDimensionsValid( isForced ); + this.errorLabel.$element.toggle( !isValid ); + this.$element.toggleClass( 've-ui-mediaSizeWidget-input-hasError', !isValid ); + + return isValid; +}; + /** */ ve.ui.MediaSizeWidget.prototype.setOriginalDimensions = function ( dimensions ) { // Parent method diff --git a/modules/ve/ve.Scalable.js b/modules/ve/ve.Scalable.js index 01df533..775106a 100644 --- a/modules/ve/ve.Scalable.js +++ b/modules/ve/ve.Scalable.js @@ -193,6 +193,14 @@ ve.Scalable.prototype.isEnforcedMax = function () { return this.enforceMax; }; +/** + * Set enforcement of maximum dimensions + * + * @param {boolean} Enforces the maximum dimensions + */ +ve.Scalable.prototype.setEnforcedMax = function ( isEnforcedMax ) { + this.enforceMax = isEnforcedMax; +}; /** * Get the fixed aspect ratio (width/height) @@ -310,10 +318,12 @@ /** * Checks whether the current dimensions are numeric and within range * + * @param {boolean} isForced Force a re-evaluation even if this.valid is + * already set. * @returns {boolean} Current dimensions are valid */ -ve.Scalable.prototype.isCurrentDimensionsValid = function () { - if ( this.valid === null ) { +ve.Scalable.prototype.isCurrentDimensionsValid = function ( isForced ) { + if ( this.valid === null || isForced ) { var dimensions = this.getCurrentDimensions(), minDimensions = this.isEnforcedMin() && this.getMinDimensions(), maxDimensions = this.isEnforcedMax() && this.getMaxDimensions(); @@ -323,14 +333,14 @@ $.isNumeric( dimensions.height ) && ( !minDimensions || ( - dimensions.width >= minDimensions.width && - dimensions.height >= minDimensions.height + dimensions.width >= this.getMinDimensions().width && + dimensions.height >= this.getMinDimensions().height ) ) && ( !maxDimensions || ( - dimensions.width <= maxDimensions.width && - dimensions.height <= maxDimensions.height + dimensions.width <= this.getMaxDimensions().width && + dimensions.height <= this.getMaxDimensions().height ) ) ); -- To view, visit https://gerrit.wikimedia.org/r/115306 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I362c7c378c5ccd7a83495b03e4429c9b93c1e9ee Gerrit
[MediaWiki-commits] [Gerrit] Avoid key fragmentation in FileBackend - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Avoid key fragmentation in FileBackend .. Avoid key fragmentation in FileBackend * Make sure that global backends do not prefix the cache keys with local wiki IDs for container and file stat entries. This causes fragmentation and breaks invalidation. Change-Id: Ic02d6e41f828dc82cc07c7d24c8af29c46392a9c --- M includes/filebackend/FileBackendStore.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Chad: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/filebackend/FileBackendStore.php b/includes/filebackend/FileBackendStore.php index 9a2ebb7..16300af 100644 --- a/includes/filebackend/FileBackendStore.php +++ b/includes/filebackend/FileBackendStore.php @@ -1565,7 +1565,7 @@ * @return string */ private function containerCacheKey( $container ) { - return wfMemcKey( 'backend', $this->getName(), 'container', $container ); + return "filebackend:{$this->name}:{$this->wikiId}:container:{$container}"; } /** @@ -1646,7 +1646,7 @@ * @return string */ private function fileCacheKey( $path ) { - return wfMemcKey( 'backend', $this->getName(), 'file', sha1( $path ) ); + return "filebackend:{$this->name}:{$this->wikiId}:file:" . sha1( $path ); } /** -- To view, visit https://gerrit.wikimedia.org/r/115300 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic02d6e41f828dc82cc07c7d24c8af29c46392a9c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz Gerrit-Reviewer: Chad Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Avoid key fragmentation in FileBackend - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Avoid key fragmentation in FileBackend .. Avoid key fragmentation in FileBackend * Make sure that global backends do not prefix the cache keys with local wiki IDs for container and file stat entries. This causes fragmentation and breaks invalidation. Change-Id: Ic02d6e41f828dc82cc07c7d24c8af29c46392a9c --- M includes/filebackend/FileBackendStore.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Aaron Schulz: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/filebackend/FileBackendStore.php b/includes/filebackend/FileBackendStore.php index 9a2ebb7..16300af 100644 --- a/includes/filebackend/FileBackendStore.php +++ b/includes/filebackend/FileBackendStore.php @@ -1565,7 +1565,7 @@ * @return string */ private function containerCacheKey( $container ) { - return wfMemcKey( 'backend', $this->getName(), 'container', $container ); + return "filebackend:{$this->name}:{$this->wikiId}:container:{$container}"; } /** @@ -1646,7 +1646,7 @@ * @return string */ private function fileCacheKey( $path ) { - return wfMemcKey( 'backend', $this->getName(), 'file', sha1( $path ) ); + return "filebackend:{$this->name}:{$this->wikiId}:file:" . sha1( $path ); } /** -- To view, visit https://gerrit.wikimedia.org/r/115301 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic02d6e41f828dc82cc07c7d24c8af29c46392a9c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.23wmf15 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] API: Add prop=redirects and list=allredirects - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: API: Add prop=redirects and list=allredirects .. API: Add prop=redirects and list=allredirects While redirects can be sort-of queried using list=backlinks with blfilterredir=redirects, we can get more accurate results with a module dedicated to this purpose. We can also get the fragment of the redirect without having to load the content of the redirect page and parse it. I'm a bit surprised I was able to put together a query for this that will work as a prop module. Or did I overlook something? And then we may as well add the corresponding list=allredirects, to work like alllinks, allfileusages, and alltransclusions. Bug: 57057 Change-Id: I81082aa9e4e3a3b2c66cc4f9970a97eed83a6a4f --- M RELEASE-NOTES-1.23 M includes/AutoLoader.php M includes/api/ApiQuery.php M includes/api/ApiQueryAllLinks.php A includes/api/ApiQueryRedirects.php 5 files changed, 324 insertions(+), 17 deletions(-) Approvals: Aaron Schulz: Looks good to me, approved jenkins-bot: Verified diff --git a/RELEASE-NOTES-1.23 b/RELEASE-NOTES-1.23 index 2350b8e..adf17b5 100644 --- a/RELEASE-NOTES-1.23 +++ b/RELEASE-NOTES-1.23 @@ -187,6 +187,8 @@ * (bug 58627) Provide language names on action=parse&prop=langlinks. * Deprecated llurl= in favour of llprop=url for action=query&prop=langlinks. * Added llprop=langname and llprop=autonym for action=query&prop=langlinks. +* prop=redirects is added, to return redirects to the pages in the query. +* list=allredirects is added, to list all redirects pointing to a namespace. === Languages updated in 1.23 === diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php index 54635e9..9a6d90b 100644 --- a/includes/AutoLoader.php +++ b/includes/AutoLoader.php @@ -355,6 +355,7 @@ 'ApiQueryRandom' => 'includes/api/ApiQueryRandom.php', 'ApiQueryRecentChanges' => 'includes/api/ApiQueryRecentChanges.php', 'ApiQueryFileRepoInfo' => 'includes/api/ApiQueryFileRepoInfo.php', + 'ApiQueryRedirects' => 'includes/api/ApiQueryRedirects.php', 'ApiQueryRevisions' => 'includes/api/ApiQueryRevisions.php', 'ApiQuerySearch' => 'includes/api/ApiQuerySearch.php', 'ApiQuerySiteinfo' => 'includes/api/ApiQuerySiteinfo.php', diff --git a/includes/api/ApiQuery.php b/includes/api/ApiQuery.php index c054bc1..49ab591 100644 --- a/includes/api/ApiQuery.php +++ b/includes/api/ApiQuery.php @@ -54,6 +54,7 @@ 'iwlinks' => 'ApiQueryIWLinks', 'langlinks' => 'ApiQueryLangLinks', 'pageprops' => 'ApiQueryPageProps', + 'redirects' => 'ApiQueryRedirects', 'revisions' => 'ApiQueryRevisions', 'stashimageinfo' => 'ApiQueryStashImageInfo', 'templates' => 'ApiQueryLinks', @@ -69,6 +70,7 @@ 'allimages' => 'ApiQueryAllImages', 'alllinks' => 'ApiQueryAllLinks', 'allpages' => 'ApiQueryAllPages', + 'allredirects' => 'ApiQueryAllLinks', 'alltransclusions' => 'ApiQueryAllLinks', 'allusers' => 'ApiQueryAllUsers', 'backlinks' => 'ApiQueryBacklinks', diff --git a/includes/api/ApiQueryAllLinks.php b/includes/api/ApiQueryAllLinks.php index bccc25f..7b5123d 100644 --- a/includes/api/ApiQueryAllLinks.php +++ b/includes/api/ApiQueryAllLinks.php @@ -31,15 +31,21 @@ */ class ApiQueryAllLinks extends ApiQueryGeneratorBase { + private $table, $tablePrefix, $indexTag, + $description, $descriptionWhat, $descriptionTargets, $descriptionLinking; + private $fieldTitle = 'title'; + private $dfltNamespace = NS_MAIN; + private $hasNamespace = true; + private $useIndex = null; + private $props = array(), $propHelp = array(); + public function __construct( $query, $moduleName ) { switch ( $moduleName ) { case 'alllinks': $prefix = 'al'; $this->table = 'pagelinks'; $this->tablePrefix = 'pl_'; - $this->fieldTitle = 'title'; - $this->dfltNamespace = NS_MAIN; - $this->hasNamespace = true; + $this->useIndex = 'pl_namespace'; $this->indexTag = 'l'; $this->description = 'Enumerate all links that point to a given namespace'; $this->descriptionWhat = 'link'; @@ -50,9 +56,8 @@ $prefix = 'at'; $this->table = 'templatelinks'; $this->tablePrefix = 'tl_'; - $this->fieldTitle = 'title'; $this->dfltNamespace
[MediaWiki-commits] [Gerrit] Update Wikidata build - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Update Wikidata build .. Update Wikidata build Fixes time input js, coordinate formatting, commons link formatting, and includes performance improvement. see: I3d474e2 (and compare https://test.wikidata.org/wiki/Q22 vs http://wikidata.beta.wmflabs.org/wiki/Q17230 - display/editing of time, coordinates and try clicking the commons link) Change-Id: I41e304da07ce27bb89d7a6c9607a49ef544497af --- M extensions/Wikidata 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Chad: Looks good to me, approved jenkins-bot: Verified diff --git a/extensions/Wikidata b/extensions/Wikidata index 0a431c5..c4a0b38 16 --- a/extensions/Wikidata +++ b/extensions/Wikidata -Subproject commit 0a431c5a1ba7b745431c3f8e60e9b3e3ec1b0a8d +Subproject commit c4a0b3899625d3aeb34b2e271a9807f11888e081 -- To view, visit https://gerrit.wikimedia.org/r/115208 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I41e304da07ce27bb89d7a6c9607a49ef544497af Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.23wmf15 Gerrit-Owner: Aude Gerrit-Reviewer: Chad Gerrit-Reviewer: Reedy Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] remove kaulen from puppet, dsh, dhcp - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: remove kaulen from puppet,dsh,dhcp .. remove kaulen from puppet,dsh,dhcp RT #6905 Change-Id: I1b52715a964a28c47d608bb453e067a181505ac3 --- M files/dsh/group/misc_pmtpa M files/dsh/group/pmtpa M manifests/site.pp M modules/install-server/files/dhcpd/linux-host-entries.ttyS1-57600 4 files changed, 0 insertions(+), 14 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/files/dsh/group/misc_pmtpa b/files/dsh/group/misc_pmtpa index 77de1cd..e3f43d8 100644 --- a/files/dsh/group/misc_pmtpa +++ b/files/dsh/group/misc_pmtpa @@ -7,7 +7,6 @@ fenari formey hume -kaulen linne manutius maurus diff --git a/files/dsh/group/pmtpa b/files/dsh/group/pmtpa index 9ac4015..1961e2a 100644 --- a/files/dsh/group/pmtpa +++ b/files/dsh/group/pmtpa @@ -4,7 +4,6 @@ fenari formey hume -kaulen linne mchenry sanger diff --git a/manifests/site.pp b/manifests/site.pp index 02354dd..ca22db7 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1280,13 +1280,6 @@ include search::searchqa } -node 'kaulen.wikimedia.org' { -$gid = '500' - -include standard -include admins::roots -} - ## labsdb dbs node 'labsdb1001.eqiad.wmnet' { class { 'role::db::labsdb': diff --git a/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-57600 b/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-57600 index 491f7b1..4b46ec4 100644 --- a/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-57600 +++ b/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-57600 @@ -43,11 +43,6 @@ fixed-address hume.wikimedia.org; } -host kaulen { - hardware ethernet 00:26:B9:5C:2C:85; - fixed-address kaulen.wikimedia.org; -} - host linne { hardware ethernet 00:1e:c9:ea:ab:a7; fixed-address linne.wikimedia.org; -- To view, visit https://gerrit.wikimedia.org/r/115246 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1b52715a964a28c47d608bb453e067a181505ac3 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn Gerrit-Reviewer: Dzahn Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Avoid key fragmentation in FileBackend - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Avoid key fragmentation in FileBackend .. Avoid key fragmentation in FileBackend * Make sure that global backends do not prefix the cache keys with local wiki IDs for container and file stat entries. This causes fragmentation and breaks invalidation. Change-Id: Ic02d6e41f828dc82cc07c7d24c8af29c46392a9c --- M includes/filebackend/FileBackendStore.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Chad: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/filebackend/FileBackendStore.php b/includes/filebackend/FileBackendStore.php index 50371f8..f63c1cf 100644 --- a/includes/filebackend/FileBackendStore.php +++ b/includes/filebackend/FileBackendStore.php @@ -1501,7 +1501,7 @@ * @return string */ private function containerCacheKey( $container ) { - return wfMemcKey( 'backend', $this->getName(), 'container', $container ); + return "filebackend:{$this->name}:{$this->wikiId}:container:{$container}"; } /** @@ -1585,7 +1585,7 @@ * @return string */ private function fileCacheKey( $path ) { - return wfMemcKey( 'backend', $this->getName(), 'file', sha1( $path ) ); + return "filebackend:{$this->name}:{$this->wikiId}:file:" . sha1( $path ); } /** -- To view, visit https://gerrit.wikimedia.org/r/115302 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic02d6e41f828dc82cc07c7d24c8af29c46392a9c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.23wmf14 Gerrit-Owner: Aaron Schulz Gerrit-Reviewer: Chad Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mwext-TimedMediaHandler-testextensions-master is now voting - change (integration/zuul-config)
jenkins-bot has submitted this change and it was merged. Change subject: mwext-TimedMediaHandler-testextensions-master is now voting .. mwext-TimedMediaHandler-testextensions-master is now voting We have set a bunch of workaround to get failling tests to be ignored by phpunit. Bug have been filled as blockers of bug 61875. Since tests are now passing, make them vote! Bug: 61875 Change-Id: I6e1b10d7cfce84a844e4208ccbf9a11e4303e7eb --- M layout.yaml 1 file changed, 0 insertions(+), 4 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/layout.yaml b/layout.yaml index b2b12b4..d064219 100644 --- a/layout.yaml +++ b/layout.yaml @@ -634,10 +634,6 @@ - name: ^mwext-FlaggedRevs-testextensions.* voting: false - # bug 61875 - - name: ^mwext-TimedMediaHandler-testextensions-.* -voting: false - # mwext-SideBarMenu-testextensions-master - name: ^mwext-SideBarMenu-testextensions-.* voting: false -- To view, visit https://gerrit.wikimedia.org/r/115305 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6e1b10d7cfce84a844e4208ccbf9a11e4303e7eb Gerrit-PatchSet: 1 Gerrit-Project: integration/zuul-config Gerrit-Branch: master Gerrit-Owner: Hashar 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] mwext-TimedMediaHandler-testextensions-master is now voting - change (integration/zuul-config)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/115305 Change subject: mwext-TimedMediaHandler-testextensions-master is now voting .. mwext-TimedMediaHandler-testextensions-master is now voting We have set a bunch of workaround to get failling tests to be ignored by phpunit. Bug have been filled as blockers of bug 61875. Since tests are now passing, make them vote! Bug: 61875 Change-Id: I6e1b10d7cfce84a844e4208ccbf9a11e4303e7eb --- M layout.yaml 1 file changed, 0 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/zuul-config refs/changes/05/115305/1 diff --git a/layout.yaml b/layout.yaml index b2b12b4..d064219 100644 --- a/layout.yaml +++ b/layout.yaml @@ -634,10 +634,6 @@ - name: ^mwext-FlaggedRevs-testextensions.* voting: false - # bug 61875 - - name: ^mwext-TimedMediaHandler-testextensions-.* -voting: false - # mwext-SideBarMenu-testextensions-master - name: ^mwext-SideBarMenu-testextensions-.* voting: false -- To view, visit https://gerrit.wikimedia.org/r/115305 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6e1b10d7cfce84a844e4208ccbf9a11e4303e7eb Gerrit-PatchSet: 1 Gerrit-Project: integration/zuul-config Gerrit-Branch: master Gerrit-Owner: Hashar ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Ignore TestVideoTranscode::testTranscodeJobs - change (mediawiki...TimedMediaHandler)
jenkins-bot has submitted this change and it was merged. Change subject: Ignore TestVideoTranscode::testTranscodeJobs .. Ignore TestVideoTranscode::testTranscodeJobs The test is broken for now. Filled bug 61878 to get it fixed properly. Bug: 61878 Change-Id: Iceeb66609024d009cdbd4f14e82e6de98a4262ef --- M tests/phpunit/TestVideoTranscode.php 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: MarkTraceur: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/phpunit/TestVideoTranscode.php b/tests/phpunit/TestVideoTranscode.php index 6ef2227..af0e6f1 100644 --- a/tests/phpunit/TestVideoTranscode.php +++ b/tests/phpunit/TestVideoTranscode.php @@ -12,6 +12,8 @@ * Test if a transcode job is added for a file once requested * * @dataProvider mediaFilesProvider +* Broken as per bug 61878 +* @group Broken */ function testTranscodeJobs( $file ){ // Upload the file to the mediaWiki system -- To view, visit https://gerrit.wikimedia.org/r/115304 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iceeb66609024d009cdbd4f14e82e6de98a4262ef Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: master Gerrit-Owner: Hashar Gerrit-Reviewer: MarkTraceur 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 EditorApi#prependText - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: Add EditorApi#prependText .. Add EditorApi#prependText This will be used in refactoring PhotoApi in following commits. Change-Id: Iee1b2349a4108bd4de4f3822e0c289d956398e24 --- M javascripts/modules/editor/EditorApi.js M tests/javascripts/modules/editor/test_EditorApi.js 2 files changed, 43 insertions(+), 3 deletions(-) Approvals: Kaldari: Looks good to me, approved jenkins-bot: Verified diff --git a/javascripts/modules/editor/EditorApi.js b/javascripts/modules/editor/EditorApi.js index 5a18714..6f45999 100644 --- a/javascripts/modules/editor/EditorApi.js +++ b/javascripts/modules/editor/EditorApi.js @@ -8,14 +8,14 @@ this.sectionId = options.sectionId; this.oldId = options.oldId; // return an empty section for new pages - this.content = options.isNew ? '' : null; + this.content = options.isNew ? '' : undefined; this.hasChanged = false; }, getContent: function() { var self = this, result = $.Deferred(), options; - if ( this.content !== null ) { + if ( this.content !== undefined ) { result.resolve( this.content ); } else { options = { @@ -67,6 +67,17 @@ }, /** +* Mark content as modified and set text that should be prepended to given +* section when #save is invoked. +* +* @param text String Text to be prepended. +*/ + setPrependText: function( text ) { + this.prependtext = text; + this.hasChanged = true; + }, + + /** * Save the new content of the section, previously set using #setContent. * * @param [options.summary] String Optional summary for the edit. @@ -90,7 +101,6 @@ var apiOptions = { action: 'edit', title: self.title, - text: self.content, summary: options.summary, captchaid: options.captchaId, captchaword: options.captchaWord, @@ -99,6 +109,12 @@ starttimestamp: self.timestamp }; + if ( self.content !== undefined ) { + apiOptions.text = self.content; + } else if ( self.prependtext ) { + apiOptions.prependtext = self.prependtext; + } + if ( $.isNumeric( self.sectionId ) ) { apiOptions.section = self.sectionId; } diff --git a/tests/javascripts/modules/editor/test_EditorApi.js b/tests/javascripts/modules/editor/test_EditorApi.js index a1e7fb1..e0f9f16 100644 --- a/tests/javascripts/modules/editor/test_EditorApi.js +++ b/tests/javascripts/modules/editor/test_EditorApi.js @@ -118,6 +118,30 @@ assert.strictEqual( editorApi.hasChanged, false, 'reset hasChanged' ); } ); + QUnit.test( '#save, after #prependText', 2, function( assert ) { + var editorApi = new EditorApi( { title: 'test' } ); + + this.sandbox.stub( editorApi, 'post' ).returns( $.Deferred().resolve( + { edit: { result: 'Success' } } + ) ); + + editorApi.setPrependText( 'abc' ); + editorApi.save( { summary: 'summary' } ).done( function() { + assert.ok( editorApi.post.calledWith( { + action: 'edit', + title: 'test', + prependtext: 'abc', + summary: 'summary', + captchaid: undefined, + captchaword: undefined, + token: 'fake token', + basetimestamp: undefined, + starttimestamp: undefined + } ), 'prepend text' ); + } ); + assert.strictEqual( editorApi.hasChanged, false, 'reset hasChanged' ); + } ); + QUnit.test( '#save, submit CAPTCHA', 2, function( assert ) { var editorApi = new EditorApi( { title: 'test', sectionId: 1 } );
[MediaWiki-commits] [Gerrit] Ignore TestVideoThumbnail::testApiThumbnails - change (mediawiki...TimedMediaHandler)
jenkins-bot has submitted this change and it was merged. Change subject: Ignore TestVideoThumbnail::testApiThumbnails .. Ignore TestVideoThumbnail::testApiThumbnails The test is broken for now and reports for each test case: Undefined index: thumbwidth Bug 61877 filled to get it fixed properly. Bug: 61877 Change-Id: Icb1cf6ed6c559381facb0c610385516f37ea13e3 --- M tests/phpunit/TestVideoThumbnail.php 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: MarkTraceur: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/phpunit/TestVideoThumbnail.php b/tests/phpunit/TestVideoThumbnail.php index 3db9d6d..b3c9ef8 100644 --- a/tests/phpunit/TestVideoThumbnail.php +++ b/tests/phpunit/TestVideoThumbnail.php @@ -10,6 +10,8 @@ * Once video files are uploaded test thumbnail generating * * @dataProvider mediaFilesProvider +* Broken as per bug 61877 +* @group Broken */ function testApiThumbnails( $file ){ // Upload the file to the mediaWiki system -- To view, visit https://gerrit.wikimedia.org/r/115303 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icb1cf6ed6c559381facb0c610385516f37ea13e3 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: master Gerrit-Owner: Hashar Gerrit-Reviewer: MarkTraceur Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Typo TesVideoTranscode -> TestVideoTranscode - change (mediawiki...TimedMediaHandler)
jenkins-bot has submitted this change and it was merged. Change subject: Typo TesVideoTranscode -> TestVideoTranscode .. Typo TesVideoTranscode -> TestVideoTranscode The class name was not matching the test file name (typo in class name). Change-Id: Ib491dc852e9795fec1df027e4382cffee0045216 --- M tests/phpunit/TestVideoTranscode.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: MarkTraceur: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/phpunit/TestVideoTranscode.php b/tests/phpunit/TestVideoTranscode.php index c6d97d5..6ef2227 100644 --- a/tests/phpunit/TestVideoTranscode.php +++ b/tests/phpunit/TestVideoTranscode.php @@ -4,7 +4,7 @@ * @author michael dale * @group medium */ -class TesVideoTranscode extends ApiTestCaseVideoUpload { +class TestVideoTranscode extends ApiTestCaseVideoUpload { /** * Once video files are uploaded test transcoding -- To view, visit https://gerrit.wikimedia.org/r/115273 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib491dc852e9795fec1df027e4382cffee0045216 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: master Gerrit-Owner: Hashar Gerrit-Reviewer: 01tonythomas <01tonytho...@gmail.com> Gerrit-Reviewer: Brian Wolff Gerrit-Reviewer: J Gerrit-Reviewer: MarkTraceur Gerrit-Reviewer: Mdale Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits