Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F35540060
check_T312256.sh
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
Deniz_WMDE
Sep 29 2022, 3:33 PM
2022-09-29 15:33:15 (UTC+0)
Size
927 B
Referenced Files
None
Subscribers
None
check_T312256.sh
View Options
#!/bin/bash
# A small test to see if a wikibase.cloud wiki is affected by this problem https://phabricator.wikimedia.org/T312256
# based on https://github.com/wbstack/mediawiki/pull/275#issuecomment-1231626832
#
# input parameter: wiki url
#
# no output means the query didn't find any problematic values
set
-euo pipefail
WIKI
=
"
$1
"
RESULT
=
$(
curl -s
"https://
$WIKI
/query/sparql?query=SELECT%20%3Fitem%20WHERE%20%7B%0A%20%20%3Fproperty%20wikibase%3ApropertyType%20%3Chttp%3A%2F%2Fwikiba.se%2Fontology%23Quantity%3E%20.%0A%20%20%3Fproperty%20wikibase%3AdirectClaim%20%3FdirectProperty%20.%0A%20%20%3Fitem%20%3FdirectProperty%20%3Fo%20.%0A%20%20%3Fvaluenode%20%20%20%20%20wikibase%3AquantityUnit%20%20%20%20%20%3Funit.%0A%20%20FILTER(CONTAINS(STR(%3Funit)%2C%20%22.wiki.opencura.com%22))%0A%7D%20LIMIT%2010"
)
CHECK
=
$(
echo
"
$RESULT
"
|
grep
"<binding name='item'>"
)
if
[[
! -z
"
$CHECK
"
]]
;
then
echo
"
$WIKI
is affected"
fi
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
9755322
Default Alt Text
check_T312256.sh (927 B)
Attached To
Mode
P35183 check_T312256.sh
Attached
Detach File
Event Timeline
Log In to Comment