1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-13 21:26:28 +02:00

[ticket/16287] After installation an error is given over statistics submission

The phpBB.com website required specific fields to be available for the
statistics. This change switched over to a new statistics page on
www.phpbb.com that uses form fields instead, and that returns JSON as value.

PHPBB3-16287
This commit is contained in:
paul sohier
2020-01-02 15:21:34 +01:00
parent dce0441ecf
commit f866a8fd1b
4 changed files with 19 additions and 10 deletions

View File

@ -38,10 +38,12 @@
<dd>{L_SEND_STATISTICS_LONG}</dd>
</dl>
</div>
<script>
var statsData = {S_STATS_DATA};
</script>
<!-- EVENT acp_help_phpbb_stats_after -->
<fieldset>
<p class="submit-buttons">
<input type="hidden" name="systemdata" value="{RAW_DATA}" />
<input type="hidden" name="help_send_statistics_time" value="{COLLECT_STATS_TIME}" />
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />
</p>
@ -52,7 +54,11 @@
<form action="{U_COLLECT_STATS}" method="post" target="questionaire_result" id="questionnaire-form">
<fieldset>
<p class="submit-buttons">
<input type="hidden" name="systemdata" value="{RAW_DATA}" />
<!-- BEGIN providers -->
<!-- BEGIN values -->
<input type="hidden" name="{providers.NAME}[{providers.values.KEY}]" value="{providers.values.VALUE}" />
<!-- END values -->
<!-- END providers -->
<input class="button1" type="submit" id="submit_stats" name="submit" value="{L_SEND_STATISTICS}" />
</p>
</fieldset>

View File

@ -1,4 +1,4 @@
/* global phpbb */
/* global phpbb, statsData */
(function($) { // Avoid conflicts with other libraries
@ -87,7 +87,7 @@ phpbb.prepareSendStats = function () {
$.ajax({
url: $this.attr('data-ajax-action').replace('&amp;', '&'),
type: 'POST',
data: 'systemdata=' + encodeURIComponent($this.find('input[name=systemdata]').val()),
data: statsData,
success: returnHandler,
error: errorHandler,
cache: false