Removed obsolete code (privacy settings for share button)
authorMarcel Werk <burntime@woltlab.com>
Wed, 15 Jun 2016 14:23:02 +0000 (16:23 +0200)
committerMarcel Werk <burntime@woltlab.com>
Wed, 15 Jun 2016 14:23:02 +0000 (16:23 +0200)
com.woltlab.wcf/templates/shareButtonsPrivacySettings.tpl [deleted file]
wcfsetup/install/files/lib/data/user/User.class.php
wcfsetup/install/files/lib/data/user/UserAction.class.php
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml
wcfsetup/setup/db/install.sql

diff --git a/com.woltlab.wcf/templates/shareButtonsPrivacySettings.tpl b/com.woltlab.wcf/templates/shareButtonsPrivacySettings.tpl
deleted file mode 100644 (file)
index b14fc22..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-<small style="display: inline-block; max-width: 500px;">{lang}wcf.message.share.privacy.description{/lang}</small>
-
-<ul>
-       <li><label><input type="checkbox" name="facebook" value="1"{if $settings[facebook]} checked="checked"{/if}> {lang}wcf.message.share.facebook{/lang}</label></li>
-       <li><label><input type="checkbox" name="twitter" value="1"{if $settings[twitter]} checked="checked"{/if}> {lang}wcf.message.share.twitter{/lang}</label></li>
-       <li><label><input type="checkbox" name="google" value="1"{if $settings[google]} checked="checked"{/if}> {lang}wcf.message.share.google{/lang}</label></li>
-       <li><label><input type="checkbox" name="reddit" value="1"{if $settings[reddit]} checked="checked"{/if}> {lang}wcf.message.share.reddit{/lang}</label></li>
-</ul>
-
-<div class="formSubmit">
-       <input type="submit" value="{lang}wcf.global.button.submit{/lang}" accesskey="s">
-</div>
index a9c98e5589b4a602b8d5f15c62c93e4231d26c4e..b6597f3640f666951dec18238fd2d696e7ce678d 100644 (file)
@@ -62,7 +62,6 @@ use wcf\util\PasswordUtil;
  * @property-read      string          $notificationMailToken
  * @property-read      string          $authData
  * @property-read      integer         $likesReceived
- * @property-read      string          $socialNetworkPrivacySettings
  */
 final class User extends DatabaseObject implements IRouteController, IUserContent {
        /**
@@ -522,24 +521,16 @@ final class User extends DatabaseObject implements IRouteController, IUserConten
        
        /**
         * Returns the social network privacy settings of the user.
+        * @deprecated 3.0
         * 
         * @return      boolean[]
         */
        public function getSocialNetworkPrivacySettings() {
-               $settings = false;
-               if ($this->userID && WCF::getUser()->socialNetworkPrivacySettings) {
-                       $settings = @unserialize(WCF::getUser()->socialNetworkPrivacySettings);
-               }
-               
-               if ($settings === false) {
-                       $settings = [
-                               'facebook' => false,
-                               'google' => false,
-                               'reddit' => false,
-                               'twitter' => false
-                       ];
-               }
-               
-               return $settings;
+               return [
+                       'facebook' => false,
+                       'google' => false,
+                       'reddit' => false,
+                       'twitter' => false
+               ];
        }
 }
index 1badfa82cbb6b91873936b3dd72ce3870e34b46a..d623975ecd8dd3ba5b86eb5917f88e55ddf62d40 100644 (file)
@@ -251,10 +251,6 @@ class UserAction extends AbstractDatabaseObjectAction implements IClipboardActio
         * @return      User
         */
        public function create() {
-               if (!isset($this->parameters['data']['socialNetworkPrivacySettings'])) {
-                       $this->parameters['data']['socialNetworkPrivacySettings'] = '';
-               }
-               
                /** @var User $user */
                $user = parent::create();
                $userEditor = new UserEditor($user);
@@ -781,6 +777,7 @@ class UserAction extends AbstractDatabaseObjectAction implements IClipboardActio
        
        /**
         * Validates parameters to retrieve the social network privacy settings.
+        * @deprecated 3.0
         */
        public function validateGetSocialNetworkPrivacySettings() {
                // does nothing
@@ -788,59 +785,25 @@ class UserAction extends AbstractDatabaseObjectAction implements IClipboardActio
        
        /**
         * Returns the social network privacy settings.
-        * 
-        * @return      string[]
+        * @deprecated 3.0
         */
        public function getSocialNetworkPrivacySettings() {
-               $settings = @unserialize(WCF::getUser()->socialNetworkPrivacySettings);
-               if (!is_array($settings)) {
-                       $settings = [
-                               'facebook' => false,
-                               'google' => false,
-                               'reddit' => false,
-                               'twitter' => false
-                       ];
-               }
-               
-               WCF::getTPL()->assign([
-                       'settings' => $settings
-               ]);
-               
-               return [
-                       'template' => WCF::getTPL()->fetch('shareButtonsPrivacySettings')
-               ];
+               // does nothing
        }
        
        /**
         * Validates the 'saveSocialNetworkPrivacySettings' action.
+        * @deprecated 3.0
         */
        public function validateSaveSocialNetworkPrivacySettings() {
-               $this->readBoolean('facebook', true);
-               $this->readBoolean('google', true);
-               $this->readBoolean('reddit', true);
-               $this->readBoolean('twitter', true);
+               // does nothing
        }
        
        /**
         * Saves the social network privacy settings.
-        * 
-        * @return      boolean[]
+        * @deprecated 3.0
         */
        public function saveSocialNetworkPrivacySettings() {
-               $settings = [
-                       'facebook' => $this->parameters['facebook'],
-                       'google' => $this->parameters['google'],
-                       'reddit' => $this->parameters['reddit'],
-                       'twitter' => $this->parameters['twitter']
-               ];
-               
-               $userEditor = new UserEditor(WCF::getUser());
-               $userEditor->update([
-                       'socialNetworkPrivacySettings' => serialize($settings)
-               ]);
-               
-               return [
-                       'settings' => $settings
-               ];
+               // does nothing
        }
 }
index 90c360b08bd8695f1a21afb0eb6d824aa620c0d1..abd8fb0e01c6477cd96fc20fe0ff2b2769c52bc2 100644 (file)
@@ -2363,8 +2363,6 @@ Fehler sind beispielsweise:
                <item name="wcf.message.share.linkedIn"><![CDATA[LinkedIn]]></item>
                <item name="wcf.message.share.pinterest"><![CDATA[Pinterest]]></item>
                <item name="wcf.message.share.xing"><![CDATA[XING]]></item>
-               <item name="wcf.message.share.privacy"><![CDATA[Einstellungen zum Teilen]]></item>
-               <item name="wcf.message.share.privacy.description"><![CDATA[Die Anzahl der Teilungen auf der jeweiligen Plattform werden nur bei aktivierten Anbietern ermittelt, diese Angaben werden durch Ihren Browser direkt vom Anbieter abgefragt.]]></item>
                <item name="wcf.message.smilies"><![CDATA[Smileys]]></item>
                <item name="wcf.message.button.extendedReply"><![CDATA[Erweiterte Antwort]]></item>
                <item name="wcf.message.button.extendedEdit"><![CDATA[Erweiterte Bearbeitung]]></item>
index 40908fd35efb94c0534fed62415c80e852ac9f02..cda152f34a6d37014d441130228427c3e0abfa32 100644 (file)
@@ -2400,8 +2400,6 @@ Errors are:
                <item name="wcf.message.share.linkedIn"><![CDATA[LinkedIn]]></item>
                <item name="wcf.message.share.pinterest"><![CDATA[Pinterest]]></item>
                <item name="wcf.message.share.xing"><![CDATA[XING]]></item>
-               <item name="wcf.message.share.privacy"><![CDATA[Privacy Settings]]></item>
-               <item name="wcf.message.share.privacy.description"><![CDATA[Displaying the number of shares is only available for enabled providers, data will be fetched directly using your browser.]]></item>
                <item name="wcf.message.smilies"><![CDATA[Smilies]]></item>
                <item name="wcf.message.button.extendedReply"><![CDATA[More Options]]></item>
                <item name="wcf.message.button.extendedEdit"><![CDATA[More Options]]></item>
index 1a99576fed4b74c66f0fcd59c47f0a28dd81c6f3..ea73cea53fdd1a5444701d5c317ed9cffca88d02 100644 (file)
@@ -1281,7 +1281,6 @@ CREATE TABLE wcf1_user (
        notificationMailToken VARCHAR(20) NOT NULL DEFAULT '',
        authData VARCHAR(255) NOT NULL DEFAULT '',
        likesReceived MEDIUMINT(7) NOT NULL DEFAULT 0,
-       socialNetworkPrivacySettings TEXT,
        
        KEY username (username),
        KEY registrationDate (registrationDate),