aboutsummaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-12-23 15:13:09 -0800
committerfriendica <info@friendica.com>2013-12-23 15:13:09 -0800
commit63a42480c7eb36bdc8b63b31b2a4d222ba5751cd (patch)
treeb0bd80b8f114e2711152ce0374783a7106e068b1 /install
parent4517bdcff1aa75c5389f9fb29947012fca5df4e1 (diff)
downloadvolse-hubzilla-63a42480c7eb36bdc8b63b31b2a4d222ba5751cd.tar.gz
volse-hubzilla-63a42480c7eb36bdc8b63b31b2a4d222ba5751cd.tar.bz2
volse-hubzilla-63a42480c7eb36bdc8b63b31b2a4d222ba5751cd.zip
add account_level, is_foreigner and is_member functions; convert all e2ee user input and prompts to hex to avoid javascipt's lame handling of quotes. !!This breaks all prior encrypted posts.!!
Diffstat (limited to 'install')
-rw-r--r--install/database.sql4
-rw-r--r--install/update.php11
2 files changed, 13 insertions, 2 deletions
diff --git a/install/database.sql b/install/database.sql
index f73460937..cb332c75b 100644
--- a/install/database.sql
+++ b/install/database.sql
@@ -54,6 +54,7 @@ CREATE TABLE IF NOT EXISTS `account` (
`account_expires` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`account_expire_notified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`account_service_class` char(32) NOT NULL DEFAULT '',
+ `account_level` int(10) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`account_id`),
KEY `account_email` (`account_email`),
KEY `account_service_class` (`account_service_class`),
@@ -63,7 +64,8 @@ CREATE TABLE IF NOT EXISTS `account` (
KEY `account_lastlog` (`account_lastlog`),
KEY `account_expires` (`account_expires`),
KEY `account_default_channel` (`account_default_channel`),
- KEY `account_external` (`account_external`)
+ KEY `account_external` (`account_external`),
+ KEY `account_level` (`account_level`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `addon` (
diff --git a/install/update.php b/install/update.php
index 817e4b6bc..c731eab06 100644
--- a/install/update.php
+++ b/install/update.php
@@ -1,6 +1,6 @@
<?php
-define( 'UPDATE_VERSION' , 1086 );
+define( 'UPDATE_VERSION' , 1087 );
/**
*
@@ -948,3 +948,12 @@ function update_r1085() {
return UPDATE_FAILED;
}
+
+function update_r1086() {
+ $r = q("ALTER TABLE `account` ADD `account_level` INT UNSIGNED NOT NULL DEFAULT '0',
+ADD INDEX ( `account_level` )");
+ if($r)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+}
+