From c1035c98e455548fe14fbf5443bb98137d4e3d5d Mon Sep 17 00:00:00 2001
From: Marc Alexander <admin@m-a-styles.de>
Date: Sun, 31 Jan 2016 23:49:17 +0100
Subject: [PATCH] [ticket/14492] Rename files to  help_phpbb and fix css
 tabbing

PHPBB3-14492
---
 ...nd_statistics.html => acp_help_phpbb.html} | 23 +------
 phpBB/adm/style/admin.css                     | 61 ++++++++++---------
 ...send_statistics.php => acp_help_phpbb.php} |  4 +-
 ...send_statistics.php => acp_help_phpbb.php} |  6 +-
 .../db/migration/data/v320/add_help_phpbb.php | 49 +++++++++++++++
 5 files changed, 87 insertions(+), 56 deletions(-)
 rename phpBB/adm/style/{acp_send_statistics.html => acp_help_phpbb.html} (78%)
 rename phpBB/includes/acp/{acp_send_statistics.php => acp_help_phpbb.php} (96%)
 rename phpBB/includes/acp/info/{acp_send_statistics.php => acp_help_phpbb.php} (68%)
 create mode 100644 phpBB/phpbb/db/migration/data/v320/add_help_phpbb.php

diff --git a/phpBB/adm/style/acp_send_statistics.html b/phpBB/adm/style/acp_help_phpbb.html
similarity index 78%
rename from phpBB/adm/style/acp_send_statistics.html
rename to phpBB/adm/style/acp_help_phpbb.html
index b45886f943..a984b25b25 100644
--- a/phpBB/adm/style/acp_send_statistics.html
+++ b/phpBB/adm/style/acp_help_phpbb.html
@@ -30,10 +30,10 @@
 		</div>
 		<dl class="send-stats-settings">
 			<dt>
-				<input id="enable-stats" type="checkbox" />
+				<input id="enable-stats" type="checkbox" checked="checked" />
 				<label for="enable-stats"></label>
 			</dt>
-			<dd>{L_YES}</dd>
+			<dd>{L_SEND_STATISTICS}</dd>
 		</dl>
 	</div>
 	<div class="send-stats-tile">
@@ -48,24 +48,5 @@
 		</dl>
 	</div>
 </div>
-<div style="clear: both; display: none;">
-<script type="text/javascript">
-//<![CDATA[
-var iframect = 0;
-
-function iframe_updated()
-{
-	if (iframect++ == 0)
-	{
-		return;
-	}
-
-	phpbb.toggleDisplay('questionnaire-form', -1);
-	phpbb.toggleDisplay('questionnaire-thanks', 1);
-}
-//]]>
-</script>
-
-</div>
 
 <!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css
index afa0bd5d31..d4df01dba7 100644
--- a/phpBB/adm/style/admin.css
+++ b/phpBB/adm/style/admin.css
@@ -2624,72 +2624,73 @@ fieldset.permissions .padding {
 }
 
 .send-stats-data-row {
-    background: #f9f9f9;
-    border-radius: 6px;
-    border: #DEDEDE 1px solid;
-    padding: 10px;
-    border-top-width: 0;
-    border-top-right-radius: 0;
-    border-top-left-radius: 0;
+	background: #f9f9f9;
+	border-radius: 6px;
+	border: #DEDEDE 1px solid;
+	padding: 10px;
+	border-top-width: 0;
+	border-top-right-radius: 0;
+	border-top-left-radius: 0;
 }
 
 .send-stats-data-hidden .configlist {
-    display: none;
+	display: none;
 }
 
 .send-stats-data-only-row {
-    border-radius: 6px !important;
-    border-bottom-width: 1px !important;
+	border-radius: 6px !important;
+	border-bottom-width: 1px !important;
 }
 
 .send-stats-data-hidden {
-    padding: 0;
-    border: none;
+	padding: 0;
+	border: none;
 }
 
 .send-stats-row > .send-stats-data-row:first-child {
-    background-color: #d9edf7;
-    border-bottom-width: 0;
-    border-top-right-radius: 6px;
-    border-top-left-radius: 6px;
-    border-top-width: 1px;
-    border-bottom-left-radius: 0;
-    border-bottom-right-radius: 0;
+	background-color: #d9edf7;
+	border-bottom-width: 0;
+	border-top-right-radius: 6px;
+	border-top-left-radius: 6px;
+	border-top-width: 1px;
+	border-bottom-left-radius: 0;
+	border-bottom-right-radius: 0;
 }
 
 .send-stats-settings dt, .send-stats-settings dd {
-    min-width: 25px;
+	min-width: 25px;
 }
 
 .send-stats-settings dd {
-    line-height: 1.5em;
+	line-height: 1.5em;
 }
 
 .send-stats-settings input {
-    display: none;
+	display: none;
 }
 
 .send-stats-settings input[type=checkbox] + label:before {
-    content: "\f096";
-    font-family: FontAwesome;
-    font-size: 1.5em;
+	content: "\f096";
+	font-family: FontAwesome;
+	font-size: 1.5em;
 }
 
 .send-stats-settings input[type=checkbox]:checked + label:before {
-    content: "\f14a";
-    color: #3c763d;
+	content: "\f14a";
+	color: #3c763d;
 }
 
 .send-stats-data-row a:hover span {
-    text-decoration: underline;
+	text-decoration: underline;
 }
 
 .send-stats-data-row a {
-    text-decoration: none;
+	text-decoration: none;
+	cursor: default;
 }
 
 .send-stats-data-row i {
-    padding-left: 6px;
+	padding-left: 6px;
 }
 
 .configlist {
diff --git a/phpBB/includes/acp/acp_send_statistics.php b/phpBB/includes/acp/acp_help_phpbb.php
similarity index 96%
rename from phpBB/includes/acp/acp_send_statistics.php
rename to phpBB/includes/acp/acp_help_phpbb.php
index 74da5996f1..cfe9619898 100644
--- a/phpBB/includes/acp/acp_send_statistics.php
+++ b/phpBB/includes/acp/acp_help_phpbb.php
@@ -19,7 +19,7 @@ if (!defined('IN_PHPBB'))
 	exit;
 }
 
-class acp_send_statistics
+class acp_help_phpbb
 {
 	var $u_action;
 
@@ -34,7 +34,7 @@ class acp_send_statistics
 
 		$collect_url = "https://www.phpbb.com/stats/receive_stats.php";
 
-		$this->tpl_name = 'acp_send_statistics';
+		$this->tpl_name = 'acp_help_phpbb';
 		$this->page_title = 'ACP_SEND_STATISTICS';
 
 		// generate a unique id if necessary
diff --git a/phpBB/includes/acp/info/acp_send_statistics.php b/phpBB/includes/acp/info/acp_help_phpbb.php
similarity index 68%
rename from phpBB/includes/acp/info/acp_send_statistics.php
rename to phpBB/includes/acp/info/acp_help_phpbb.php
index a0db1a48c4..17a07ec4f6 100644
--- a/phpBB/includes/acp/info/acp_send_statistics.php
+++ b/phpBB/includes/acp/info/acp_help_phpbb.php
@@ -11,15 +11,15 @@
 *
 */
 
-class acp_send_statistics_info
+class acp_help_phpbb_info
 {
 	function module()
 	{
 		return array(
-			'filename'	=> 'acp_send_statistics',
+			'filename'	=> 'acp_help_phpbb',
 			'title'		=> 'ACP_SEND_STATISTICS',
 			'modes'		=> array(
-				'send_statistics'		=> array('title' => 'ACP_SEND_STATISTICS', 'auth' => 'acl_a_server', 'cat' => array('ACP_SERVER_CONFIGURATION')),
+				'help_phpbb'	=> array('title' => 'ACP_SEND_STATISTICS', 'auth' => 'acl_a_server', 'cat' => array('ACP_SERVER_CONFIGURATION')),
 			),
 		);
 	}
diff --git a/phpBB/phpbb/db/migration/data/v320/add_help_phpbb.php b/phpBB/phpbb/db/migration/data/v320/add_help_phpbb.php
new file mode 100644
index 0000000000..4274f53520
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v320/add_help_phpbb.php
@@ -0,0 +1,49 @@
+<?php
+/**
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
+
+namespace phpbb\db\migration\data\v320;
+
+class add_help_phpbb extends \phpbb\db\migration\migration
+{
+	static public function depends_on()
+	{
+		return array(
+			'\phpbb\db\migration\data\v320\v320a2',
+		);
+	}
+
+	public function effectively_installed()
+	{
+		return isset($this->config['help_send_statistics']);
+	}
+
+	public function update_data()
+	{
+		return array(
+			array('config.add', array('help_send_statistics', true)),
+			array('module.remove', array(
+				'acp',
+				false,
+				'ACP_SEND_STATISTICS',
+			)),
+			array('module.add', array(
+				'acp',
+				'ACP_SERVER_CONFIGURATION',
+				array(
+					'module_basename'	=> 'acp_help_phpbb',
+					'modes'				=> array('help_phpbb'),
+				),
+			)),
+		);
+	}
+}