aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+studip@gmail.com>2025-02-28 22:53:47 +0000
committerDavid Siegfried <david.siegfried@uni-vechta.de>2025-02-28 22:53:47 +0000
commite4916ecdff98276a0604ebd60ac0869463a0c3c7 (patch)
treef1648ddfbd4b35c6f22aa760508b88f3daf393fd
parent165e0d14a0fcc83babd3846ce9de46fa6fb7b843 (diff)
remove sykpe, fixes #4677
Closes #4677 Merge request studip/studip!3999
-rw-r--r--app/controllers/profile.php6
-rw-r--r--app/controllers/settings/details.php9
-rw-r--r--app/views/profile/index.php5
-rw-r--r--app/views/settings/details.php7
-rw-r--r--db/migrations/6.0.44_remove_skype.php24
-rw-r--r--lib/classes/visibility/User_Visibility_Settings.php1
-rw-r--r--lib/models/User.php9
7 files changed, 24 insertions, 37 deletions
diff --git a/app/controllers/profile.php b/app/controllers/profile.php
index b00c2b2..d210ff4 100644
--- a/app/controllers/profile.php
+++ b/app/controllers/profile.php
@@ -107,12 +107,6 @@ class ProfileController extends AuthenticatedController
$this->privadr = $this->getVisibilityValue('privadr', 'privadr');
$this->homepage = $this->getVisibilityValue('Home', 'homepage');
- // skype informations
- $this->skype_name = '';
- if (Config::get()->ENABLE_SKYPE_INFO && Visibility::verify('skype_name', $this->current_user->user_id)) {
- $this->skype_name = UserConfig::get($this->current_user->user_id)->SKYPE_NAME;
- }
-
// get generic datafield entries
$this->shortDatafields = $this->getShortDatafields();
$this->longDatafields = $this->getLongDatafields();
diff --git a/app/controllers/settings/details.php b/app/controllers/settings/details.php
index 1ed1b61..8890045 100644
--- a/app/controllers/settings/details.php
+++ b/app/controllers/settings/details.php
@@ -64,15 +64,6 @@ class Settings_DetailsController extends Settings_SettingsController
$changed = false;
- if (Config::get()->ENABLE_SKYPE_INFO) {
- $new_skype_name = Request::get('skype_name');
- if ($new_skype_name != $this->config->SKYPE_NAME) {
- $this->config->store('SKYPE_NAME', $new_skype_name);
- Visibility::updatePrivacySettingWithTest(Request::get('skype_name'), _("Skype Name"), "skype_name", 'privatedata', 1, $this->user->user_id);
- $changed = true;
- }
- }
-
$mapping = [
'telefon' => 'privatnr',
'cell' => 'privatcell',
diff --git a/app/views/profile/index.php b/app/views/profile/index.php
index 9b7cb4f..6fadad4 100644
--- a/app/views/profile/index.php
+++ b/app/views/profile/index.php
@@ -28,11 +28,6 @@
<dd><?= htmlReady($private_cell) ?></dd>
<? endif ?>
- <? if ($skype_name) : ?>
- <dt><?= _('Skype') ?>:</dt>
- <dd><?= htmlReady($skype_name) ?></dd>
- <? endif ?>
-
<? if ($privadr) : ?>
<dt><?= _('Adresse (privat)') ?>:</dt>
<dd><?= htmlReady($privadr) ?></dd>
diff --git a/app/views/settings/details.php b/app/views/settings/details.php
index 8315de9..fddf292 100644
--- a/app/views/settings/details.php
+++ b/app/views/settings/details.php
@@ -27,13 +27,6 @@
value="<?= htmlReady($user->privadr) ?>"
<? if (!$controller->shallChange('user_info.privadr')) echo 'disabled'; ?>>
</label>
- <? if (Config::get()->ENABLE_SKYPE_INFO): ?>
- <label>
- <?= _('Skype Name') ?>
- <input type="text" name="skype_name"
- value="<?= htmlReady($config->SKYPE_NAME) ?>">
- </label>
- <? endif; ?>
<label>
<?= _('Motto') ?>
<input type="text" name="motto" id="motto"
diff --git a/db/migrations/6.0.44_remove_skype.php b/db/migrations/6.0.44_remove_skype.php
new file mode 100644
index 0000000..00654fb
--- /dev/null
+++ b/db/migrations/6.0.44_remove_skype.php
@@ -0,0 +1,24 @@
+<?php
+final class RemoveSkype extends Migration
+{
+ public function description()
+ {
+ return 'Removes ENABLE_SKYPE_INFO configuration';
+ }
+
+ public function up()
+ {
+ $query = "DELETE `config`, `config_values`
+ FROM `config`
+ LEFT JOIN `config_values` USING (`field`)
+ WHERE `field` = 'ENABLE_SKYPE_INFO'";
+ DBManager::get()->exec($query);
+ }
+
+ public function down()
+ {
+ $query = "INSERT INTO `config` (`field`, `value`, `type`, `range`, `section`, `mkdate`, `chdate`, `description`)
+ VALUES ('ENABLE_SKYPE_INFO', '0', 'boolean', 'global', 'privacy', 1170242666, 1170242666, 'Ermöglicht die Eingabe / Anzeige eines Skype Namens ')";
+ DBManager::get()->exec($query);
+ }
+}
diff --git a/lib/classes/visibility/User_Visibility_Settings.php b/lib/classes/visibility/User_Visibility_Settings.php
index 317d80b..975d55f 100644
--- a/lib/classes/visibility/User_Visibility_Settings.php
+++ b/lib/classes/visibility/User_Visibility_Settings.php
@@ -125,7 +125,6 @@ class User_Visibility_Settings extends SimpleORMap
'picture' => _('Eigenes Bild'),
'motto' => _('Motto'),
- 'skype_name' => _('Skype Name'),
'private_phone' => _('Private Telefonnummer'),
'private_cell' => _('Private Handynummer'),
'privadr' => _('Private Adresse'),
diff --git a/lib/models/User.php b/lib/models/User.php
index a8bb786..f7a19a7 100644
--- a/lib/models/User.php
+++ b/lib/models/User.php
@@ -846,15 +846,6 @@ class User extends AuthUserMd5 implements Range, PrivacyObject, Studip\Calendar\
'identifier' => 'privatedata'
];
}
- if (Config::get()->ENABLE_SKYPE_INFO) {
- if ($GLOBALS['user']->cfg->getValue('SKYPE_NAME') && empty($GLOBALS['NOT_HIDEABLE_FIELDS'][$this->perms]['skype_name'])) {
- $homepage_elements['skype_name'] = [
- 'name' => _('Skype Name'),
- 'visibility' => $homepage_visibility['skype_name'] ?? get_default_homepage_visibility($this->id),
- 'identifier' => 'privatedata'
- ];
- }
- }
if ($this->info->privatnr && empty($GLOBALS['NOT_HIDEABLE_FIELDS'][$this->perms]['Private Daten_phone'])) {
$homepage_elements['private_phone'] = [
'name' => _('Private Telefonnummer'),