From: Marcel Werk Date: Wed, 15 Jun 2016 14:23:02 +0000 (+0200) Subject: Removed obsolete code (privacy settings for share button) X-Git-Tag: 3.0.0_Beta_1~1433 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=527a8fc63908aa175c60b08b4d3ee368dbfdb274;p=GitHub%2FWoltLab%2FWCF.git Removed obsolete code (privacy settings for share button) --- diff --git a/com.woltlab.wcf/templates/shareButtonsPrivacySettings.tpl b/com.woltlab.wcf/templates/shareButtonsPrivacySettings.tpl deleted file mode 100644 index b14fc22b11..0000000000 --- a/com.woltlab.wcf/templates/shareButtonsPrivacySettings.tpl +++ /dev/null @@ -1,12 +0,0 @@ -{lang}wcf.message.share.privacy.description{/lang} - - - -
- -
diff --git a/wcfsetup/install/files/lib/data/user/User.class.php b/wcfsetup/install/files/lib/data/user/User.class.php index a9c98e5589..b6597f3640 100644 --- a/wcfsetup/install/files/lib/data/user/User.class.php +++ b/wcfsetup/install/files/lib/data/user/User.class.php @@ -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 + ]; } } diff --git a/wcfsetup/install/files/lib/data/user/UserAction.class.php b/wcfsetup/install/files/lib/data/user/UserAction.class.php index 1badfa82cb..d623975ecd 100644 --- a/wcfsetup/install/files/lib/data/user/UserAction.class.php +++ b/wcfsetup/install/files/lib/data/user/UserAction.class.php @@ -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 } } diff --git a/wcfsetup/install/lang/de.xml b/wcfsetup/install/lang/de.xml index 90c360b08b..abd8fb0e01 100644 --- a/wcfsetup/install/lang/de.xml +++ b/wcfsetup/install/lang/de.xml @@ -2363,8 +2363,6 @@ Fehler sind beispielsweise: - - diff --git a/wcfsetup/install/lang/en.xml b/wcfsetup/install/lang/en.xml index 40908fd35e..cda152f34a 100644 --- a/wcfsetup/install/lang/en.xml +++ b/wcfsetup/install/lang/en.xml @@ -2400,8 +2400,6 @@ Errors are: - - diff --git a/wcfsetup/setup/db/install.sql b/wcfsetup/setup/db/install.sql index 1a99576fed..ea73cea53f 100644 --- a/wcfsetup/setup/db/install.sql +++ b/wcfsetup/setup/db/install.sql @@ -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),