From 85032a1fa37868699ecbcf791dba7c37ee5a4337 Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 2 Aug 2014 14:56:17 -0700 Subject: db tables for extensible profile fields --- boot.php | 2 +- install/database.sql | 22 ++++++++++++++++++++++ install/update.php | 30 +++++++++++++++++++++++++++++- version.inc | 2 +- view/tpl/profile_edit.tpl | 18 ++++++------------ 5 files changed, 59 insertions(+), 15 deletions(-) diff --git a/boot.php b/boot.php index 83bf97508..beff28a46 100755 --- a/boot.php +++ b/boot.php @@ -47,7 +47,7 @@ define ( 'RED_PLATFORM', 'Red Matrix' ); define ( 'RED_VERSION', trim(file_get_contents('version.inc')) . 'R'); define ( 'ZOT_REVISION', 1 ); -define ( 'DB_UPDATE_VERSION', 1119 ); +define ( 'DB_UPDATE_VERSION', 1120 ); define ( 'EOL', '
' . "\r\n" ); define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' ); diff --git a/install/database.sql b/install/database.sql index 9d0401a44..bcb4d010c 100644 --- a/install/database.sql +++ b/install/database.sql @@ -799,6 +799,28 @@ CREATE TABLE IF NOT EXISTS `poll_elm` ( KEY `pelm_result` (`pelm_result`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE IF NOT EXISTS `profdef` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `field_name` char(255) NOT NULL DEFAULT '', + `field_type` char(16) NOT NULL DEFAULT '', + `field_desc` char(255) NOT NULL DEFAULT '', + `field_help` char(255) NOT NULL DEFAULT '', + PRIMARY KEY (`id`), + KEY `field_name` (`field_name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `profext` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `channel_id` int(10) unsigned NOT NULL DEFAULT '0', + `hash` char(255) NOT NULL DEFAULT '', + `k` char(255) NOT NULL DEFAULT '', + `v` mediumtext NOT NULL, + PRIMARY KEY (`id`), + KEY `channel_id` (`channel_id`), + KEY `hash` (`hash`), + KEY `k` (`k`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + CREATE TABLE IF NOT EXISTS `profile` ( `id` int(11) NOT NULL AUTO_INCREMENT, `profile_guid` char(64) NOT NULL DEFAULT '', diff --git a/install/update.php b/install/update.php index 0818cc888..9ce452275 100644 --- a/install/update.php +++ b/install/update.php @@ -1,6 +1,6 @@ -
- -{{if $advanced}} -{{$sexual}} -{{else}} -{{$sexual_min}} -{{/if}} -
-
- - -
+ {{if $advanced}} +
+ +{{$sexual}} +
+
-- cgit v1.2.3