data license - more changes

This commit is contained in:
following
2013-02-12 19:06:26 +01:00
parent 48801e6841
commit faba5ee4c6
2 changed files with 17 additions and 4 deletions
+1 -1
View File
@@ -5749,7 +5749,7 @@ INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUE
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1801', 'DE', 'Hilfe', '2012-11-09 19:32:00');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1802', 'DE', 'Warnung: Diese Cachemeldung wird bereits von einem anderen Admin bearbeitet. Bitte sprich dich mit ihm ab, bevor du sie \übernimmst!', '2013-01-30 16:28:00');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1804', 'DE', 'Datenlizenz', '2013-02-09 18:29:08');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1805', 'DE', 'Der Inhalt von www.opencaching.de steht unter einer <br /><a rel=\"license\" href=\"http://creativecommons.org/licenses/by-nc-nd/3.0/de/\">Creative Commons Namensnennung-NichtKommerziell-KeineBearbeitun-3.0-Deutschland</a>-Lizenz</a>.', '2013-02-09 18:30:58');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1805', 'DE', 'Der Inhalt von www.opencaching.de steht unter einer <br /><a rel=\"license\" href=\"http://creativecommons.org/licenses/by-nc-nd/3.0/de/\">Creative Commons Namensnennung-NichtKommerziell-KeineBearbeitung-3.0-Deutschland</a>-Lizenz</a>.', '2013-02-09 18:30:58');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1806', 'DE', 'Bitte waehle nur eine der Lösch-/Sperroptionen aus!', '2013-02-09 17:34:01');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1807', 'DE', 'Mit dem Absenden akzeptiere ich die <a href=\"articles.php?page=impressum#tos\" target=\"_blank\">Opencaching.de-Nutzungsbedingungen</a> und <a href=\"articles.php?page=impressum#datalicense\" target=\"_blank\">-Datenlizenz</a>.', '2013-02-09 19:13:15');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1808', 'DE', 'Die <a target=\"_blank\" href=\"articles.php?page=dsb\">Datenschutzbelehrung</a>, die <a href=\"articles.php?page=impressum#tos\" target=\"_blank\">Nutzungsbedingungen</a> und die <a href=\"articles.php?page=impressum#datalicense\" target=\"_blank\">Datenlizenz</a> habe ich gelesen und bin damit einverstanden.', '2013-02-09 19:07:09');
+16 -3
View File
@@ -723,6 +723,17 @@ class user
}
function canDisableDueLicense()
{
global $login;
$login->verify();
if ($login->userid != $this->nUserId && ($login->admin & ADMIN_USER) != ADMIN_USER)
return false;
else
return true;
}
/**
* disables user (if not disabled), removes all licensed content from db and
* replaces every picture with a dummy one
@@ -735,7 +746,9 @@ class user
global $translate;
// check if disabled, disable if not
if ($this->canDisable())
if (!$this->canDisableDueLicense())
return 'this user must not be disabled';
if ($this->canDisable())
if (!$this->disable())
return 'disable user failed';
@@ -790,9 +803,9 @@ class user
// set text ''
sql("UPDATE `cache_logs` " .
"SET `text`='&1' WHERE `user_id`='&2'",
"<em>Der Logtext wurde entfernt, weil der Benutzer die Opencaching.de-Datenlizenz abgelehnt hat." .
"<em>Dieser Logtext wurde entfernt, weil der Benutzer die Opencaching.de-Datenlizenz abgelehnt hat." .
"<br /><br />" .
"The text has been deleted because the used declined the Opencaching.de data license.</em>",
"This text has been deleted because the used declined the Opencaching.de data license.</em>",
$this->getUserId());
// replace pictures