From 34fd442821871dae610525f3e4d7fa804640c63f Mon Sep 17 00:00:00 2001
From: Hypolite Petovan <mrpetovan@gmail.com>
Date: Wed, 4 Apr 2018 22:53:55 -0400
Subject: [PATCH] Rename social.disable_cw pconfig to system.disable_cw

---
 include/conversation.php | 2 +-
 include/text.php         | 2 +-
 mod/settings.php         | 4 ++--
 src/Object/Post.php      | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/conversation.php b/include/conversation.php
index 9647fac35f..1b5f5a0983 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -757,7 +757,7 @@ function conversation(App $a, $items, $mode, $update, $preview = false, $order =
 
 				$profile_name_e = $profile_name;
 
-				if (!empty($item['content-warning']) && PConfig::get(local_user(), 'social', 'disable_cw', false)) {
+				if (!empty($item['content-warning']) && PConfig::get(local_user(), 'system', 'disable_cw', false)) {
 					$title_e = ucfirst($item['content-warning']);
 				} else {
 					$title_e = $item['title'];
diff --git a/include/text.php b/include/text.php
index 8a6fd00312..6522ada1c3 100644
--- a/include/text.php
+++ b/include/text.php
@@ -1271,7 +1271,7 @@ function prepare_body(array &$item, $attach = false, $is_preview = false)
 	// Compile eventual content filter reasons
 	$filter_reasons = [];
 	if (!$is_preview && !($item['self'] && local_user() == $item['uid'])) {
-		if (!empty($item['content-warning']) && (!local_user() || !PConfig::get(local_user(), 'social', 'disable_cw', false))) {
+		if (!empty($item['content-warning']) && (!local_user() || !PConfig::get(local_user(), 'system', 'disable_cw', false))) {
 			$filter_reasons[] = L10n::t('Content warning: %s', $item['content-warning']);
 		}
 
diff --git a/mod/settings.php b/mod/settings.php
index 3850c095b2..24aa43de61 100644
--- a/mod/settings.php
+++ b/mod/settings.php
@@ -212,7 +212,7 @@ function settings_post(App $a)
 		check_form_security_token_redirectOnErr('/settings/connectors', 'settings_connectors');
 
 		if (x($_POST, 'general-submit')) {
-			PConfig::set(local_user(), 'social', 'disable_cw', intval($_POST['disable_cw']));
+			PConfig::set(local_user(), 'system', 'disable_cw', intval($_POST['disable_cw']));
 			PConfig::set(local_user(), 'system', 'no_intelligent_shortening', intval($_POST['no_intelligent_shortening']));
 			PConfig::set(local_user(), 'system', 'ostatus_autofriend', intval($_POST['snautofollow']));
 			PConfig::set(local_user(), 'ostatus', 'default_group', $_POST['group-selection']);
@@ -787,7 +787,7 @@ function settings_content(App $a)
 	}
 
 	if (($a->argc > 1) && ($a->argv[1] === 'connectors')) {
-		$disable_cw                = intval(PConfig::get(local_user(), 'social', 'disable_cw'));
+		$disable_cw                = intval(PConfig::get(local_user(), 'system', 'disable_cw'));
 		$no_intelligent_shortening = intval(PConfig::get(local_user(), 'system', 'no_intelligent_shortening'));
 		$ostatus_autofriend        = intval(PConfig::get(local_user(), 'system', 'ostatus_autofriend'));
 		$default_group             = PConfig::get(local_user(), 'ostatus', 'default_group');
diff --git a/src/Object/Post.php b/src/Object/Post.php
index f47efbecd2..86e1414678 100644
--- a/src/Object/Post.php
+++ b/src/Object/Post.php
@@ -317,7 +317,7 @@ class Post extends BaseObject
 		$text_e       = strip_tags($body);
 		$name_e       = $profile_name;
 
-		if (!empty($item['content-warning']) && PConfig::get(local_user(), 'social', 'disable_cw', false)) {
+		if (!empty($item['content-warning']) && PConfig::get(local_user(), 'system', 'disable_cw', false)) {
 			$title_e = ucfirst($item['content-warning']);
 		} else {
 			$title_e = $item['title'];
-- 
2.39.5