Gotcha..
I made a file called “mw-version.php file in /var/www/html/ with the following php: <?php $url = "https://en.wikipedia.org/w"; $p = xml_parser_create(); xml_parse_into_struct($p, file_get_contents($url."/api.php?action=query&meta=siteinfo&siprop=extensions&format=xml"), $vals, $index); xml_parser_free($p); $i=0; foreach($vals as $item) { foreach(explode(",", var_export($item, true)) as $mytext) { if( (strstr($mytext,"'NAME'")) || (strstr($mytext,"'VERSION'")) ) { $mytext = str_replace("'","",$mytext); $mytext = str_replace("\n","",$mytext); $mytext = str_replace("NAME => ","",$mytext); $mytext = str_replace(" VERSION => "," = ",$mytext); print($mytext); } } $i++;print("<br/>\n".$i." - "); } ?>
And it did essentially what I wanted
Thanks!
-Rich
Thanks for sharing your script Rich, however it still does not appear to be the easiest solution to me.
Anyways judging from the numerous reactions we got so far nobody coding for MediaWiki core thinks that an easier way to provide somewhat decent setup information to issue reports is desired. So let's just coninue as always.
Cheers Karsten
Am 15.09.2017 um 19:55 schrieb Evans, Richard K. (GRC-H000):
Gotcha..
I made a file called “mw-version.php file in /var/www/html/ with the following php:
<?php $url = "https://en.wikipedia.org/w"; $p = xml_parser_create(); xml_parse_into_struct($p, file_get_contents($url."/api.php?action=query&meta=siteinfo&siprop=extensions&format=xml"), $vals, $index); xml_parser_free($p); $i=0; foreach($vals as $item) { foreach(explode(",", var_export($item, true)) as $mytext) { if( (strstr($mytext,"'NAME'")) || (strstr($mytext,"'VERSION'")) ) { $mytext = str_replace("'","",$mytext); $mytext = str_replace("\n","",$mytext); $mytext = str_replace("NAME => ","",$mytext); $mytext = str_replace(" VERSION => "," = ",$mytext); print($mytext); } } $i++;print("<br/>\n".$i." - "); } ?>
And it did essentially what I wanted
Thanks!
-Rich
MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Hi,
On 09/16/2017 03:32 AM, [[kgh]] wrote:
Anyways judging from the numerous reactions we got so far nobody coding for MediaWiki core thinks that an easier way to provide somewhat decent setup information to issue reports is desired. So let's just coninue as always.
I think the request here is a good one. I would be in favor of adding a maintenance script that output a plain text copy of version information to input into bug reports (something similar to `php -i` maybe). I'm not sure if it makes sense to have it accessible via the web.
-- Legoktm
Heiya Legoktm,
thanks for your input on this. Now I think it is worth creating a respective task on phabricator and so I did: [0].
Cheers Karsten
[0] https://phabricator.wikimedia.org/T176643
Am 19.09.2017 um 03:16 schrieb Legoktm:
Hi,
On 09/16/2017 03:32 AM, [[kgh]] wrote:
Anyways judging from the numerous reactions we got so far nobody coding for MediaWiki core thinks that an easier way to provide somewhat decent setup information to issue reports is desired. So let's just coninue as always.
I think the request here is a good one. I would be in favor of adding a maintenance script that output a plain text copy of version information to input into bug reports (something similar to `php -i` maybe). I'm not sure if it makes sense to have it accessible via the web.
-- Legoktm
MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
mediawiki-l@lists.wikimedia.org