Flags for Znote 1.5 reworked

Reworked flags for Znote 1.5 by not altering the tfs tables
This commit is contained in:
Tandloze
2015-08-13 17:13:35 +02:00
parent 66e0d6c99c
commit f749d5f0f9
248 changed files with 36 additions and 9 deletions

View File

@@ -32,6 +32,7 @@ CREATE TABLE IF NOT EXISTS `znote_accounts` (
`cooldown` int(10) DEFAULT 0,
`active` tinyint(4) NOT NULL DEFAULT '0',
`activekey` int(11) NOT NULL,
`flag` varchar(20) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;

View File

@@ -1088,9 +1088,11 @@ function user_create_account($register_data, $maildata) {
$ip = $register_data['ip'];
$created = $register_data['created'];
$flag = $register_data['flag'];
unset($register_data['ip']);
unset($register_data['created']);
unset($register_data['flag']);
if (config('TFSVersion') == 'TFS_10') $register_data['creation'] = $created;
@@ -1101,7 +1103,7 @@ function user_create_account($register_data, $maildata) {
$account_id = user_id($register_data['name']);
$activeKey = rand(100000000,999999999);
mysql_insert("INSERT INTO `znote_accounts` (`account_id`, `ip`, `created`, `activekey`) VALUES ('$account_id', '$ip', '$created', '$activeKey')");
mysql_insert("INSERT INTO `znote_accounts` (`account_id`, `ip`, `created`, `activekey`, `flag`) VALUES ('$account_id', '$ip', '$created', '$activeKey', '$flag')");
if ($maildata['register']) {