remember users' data licenses for comprehensibility
This commit is contained in:
parent
762b36013e
commit
06d832c392
@ -250,6 +250,13 @@
|
||||
*/
|
||||
$opt['logic']['node']['id'] = 4;
|
||||
|
||||
/* data license for new registered users:
|
||||
0 = not specified
|
||||
1 = old Opencaching.de license
|
||||
2 = CC BY-NC-ND 3.0
|
||||
*/
|
||||
$opt['logic']['license'] = 2;
|
||||
|
||||
/* location of uploaded images
|
||||
*/
|
||||
$opt['logic']['pictures']['dir'] = $opt['rootpath'] . 'images/uploads';
|
||||
|
@ -25,3 +25,5 @@ date commit ID change
|
||||
2012-11-17 39a25f99 removed cache_waypoint_pool.cache_id and index cache_id
|
||||
added cache_waypoint_pool.uuid and index uuid
|
||||
changed caches.wp_oc to 'NOT NULL'
|
||||
2013-02-15 new table data_licenses
|
||||
added user.data_license
|
||||
|
@ -12,6 +12,7 @@
|
||||
-- countries
|
||||
-- countries_list_default
|
||||
-- countries_options
|
||||
-- data_licenses
|
||||
-- languages
|
||||
-- languages_list_default
|
||||
-- log_types
|
||||
@ -511,6 +512,12 @@ INSERT INTO `countries_options` (`country`, `display`, `gmLat`, `gmLon`, `gmZoom
|
||||
INSERT INTO `countries_options` (`country`, `display`, `gmLat`, `gmLon`, `gmZoom`, `nodeId`) VALUES ('TR', '1', '38.0307856938229', '33.90380859375', '6', '0');
|
||||
INSERT INTO `countries_options` (`country`, `display`, `gmLat`, `gmLon`, `gmZoom`, `nodeId`) VALUES ('US', '1', '30.1451271833761', '-94.658203125', '4', '10');
|
||||
|
||||
-- Table data_licenses
|
||||
SET NAMES 'utf8';
|
||||
TRUNCATE TABLE `data_licenses`;
|
||||
INSERT INTO `data_licenses` (`id`, `license`) VALUES ('1', 'old Opencaching.de license');
|
||||
INSERT INTO `data_licenses` (`id`, `license`) VALUES ('2', 'CC BY-NC-ND 3.0');
|
||||
|
||||
-- Table languages
|
||||
SET NAMES 'utf8';
|
||||
TRUNCATE TABLE `languages`;
|
||||
|
@ -33,6 +33,7 @@ CREATE TABLE `user` (
|
||||
`no_htmledit_flag` tinyint(1) NOT NULL default '0',
|
||||
`notify_radius` int(10) unsigned NOT NULL default '0',
|
||||
`admin` tinyint(3) unsigned NOT NULL default '0',
|
||||
`data_license` tinyint(1) NOT NULL default '0',
|
||||
PRIMARY KEY (`user_id`),
|
||||
UNIQUE KEY `username` (`username`),
|
||||
UNIQUE KEY `uuid` (`uuid`),
|
||||
|
@ -42,6 +42,8 @@ class user
|
||||
|
||||
function __construct($nNewUserId=ID_NEW)
|
||||
{
|
||||
global $opt;
|
||||
|
||||
$this->reUser = new rowEditor('user');
|
||||
$this->reUser->addPKInt('user_id', null, false, RE_INSERT_AUTOINCREMENT);
|
||||
$this->reUser->addString('username', '', false);
|
||||
@ -71,6 +73,7 @@ class user
|
||||
$this->reUser->addBoolean('no_htmledit_flag', false, false);
|
||||
$this->reUser->addInt('notify_radius', 0, false);
|
||||
$this->reUser->addInt('admin', 0, false);
|
||||
$this->reUser->addInt('data_license', $opt['logic']['license'], false);
|
||||
$this->reUser->addInt('node', 0, false);
|
||||
|
||||
$this->reUserStat = new rowEditor('stat_user');
|
||||
@ -751,7 +754,10 @@ class user
|
||||
if ($this->canDisable())
|
||||
if (!$this->disable())
|
||||
return 'disable user failed';
|
||||
|
||||
|
||||
// remember that data license was declined
|
||||
sql("UPDATE user SET data_license=1 WHERE user_id='&1'", $this->getUserId());
|
||||
|
||||
/*
|
||||
* set all cache_desc and hint to ''
|
||||
*/
|
||||
|
@ -367,6 +367,7 @@ function export()
|
||||
$stab[] = 'countries';
|
||||
$stab[] = 'countries_list_default';
|
||||
$stab[] = 'countries_options';
|
||||
$stab[] = 'data_licenses';
|
||||
$stab[] = 'languages';
|
||||
$stab[] = 'languages_list_default';
|
||||
$stab[] = 'log_types';
|
||||
|
Loading…
x
Reference in New Issue
Block a user