Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3984724
search-self-closing
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
tstarling
May 9 2016, 5:05 AM
2016-05-09 05:05:52 (UTC+0)
Size
423 B
Referenced Files
None
Subscribers
None
search-self-closing
View Options
#!/bin/bash
wiki
=
"
$1
"
tag
=
"
$2
"
if
[
-z
"
$tag
"
]
;
then
echo
"Usage
$0
<wiki> <tag>"
exit
1
fi
namespace
=
$(
echo
'print $wgContLang->getNsText(10);'
|
mwscript maintenance/eval.php --wiki
=
"
$wiki
"
)
echo
"
$namespace
:insource:
$tag
insource:/\<
$tag
[^>]*\/>/"
|
\
mwscript extensions/CirrusSearch/maintenance/runSearch.php --wiki
=
"
$wiki
"
\
|
php -r
'$r = json_decode(stream_get_contents(STDIN)); print "{$r->totalHits}\n";'
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3710763
Default Alt Text
search-self-closing (423 B)
Attached To
Mode
P3012 search-self-closing
Attached
Detach File
Event Timeline
Log In to Comment