db tables for extensible profile fields
This commit is contained in:
parent
6dd3a170a7
commit
85032a1fa3
2
boot.php
2
boot.php
@ -47,7 +47,7 @@ define ( 'RED_PLATFORM', 'Red Matrix' );
|
|||||||
define ( 'RED_VERSION', trim(file_get_contents('version.inc')) . 'R');
|
define ( 'RED_VERSION', trim(file_get_contents('version.inc')) . 'R');
|
||||||
define ( 'ZOT_REVISION', 1 );
|
define ( 'ZOT_REVISION', 1 );
|
||||||
|
|
||||||
define ( 'DB_UPDATE_VERSION', 1119 );
|
define ( 'DB_UPDATE_VERSION', 1120 );
|
||||||
|
|
||||||
define ( 'EOL', '<br />' . "\r\n" );
|
define ( 'EOL', '<br />' . "\r\n" );
|
||||||
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
|
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
|
||||||
|
@ -799,6 +799,28 @@ CREATE TABLE IF NOT EXISTS `poll_elm` (
|
|||||||
KEY `pelm_result` (`pelm_result`)
|
KEY `pelm_result` (`pelm_result`)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
) 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` (
|
CREATE TABLE IF NOT EXISTS `profile` (
|
||||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
`profile_guid` char(64) NOT NULL DEFAULT '',
|
`profile_guid` char(64) NOT NULL DEFAULT '',
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
define( 'UPDATE_VERSION' , 1119 );
|
define( 'UPDATE_VERSION' , 1120 );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -1323,3 +1323,31 @@ ADD INDEX ( `account_password_changed` )");
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function update_r1119() {
|
||||||
|
$r1 = q("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");
|
||||||
|
|
||||||
|
$r2 = q("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");
|
||||||
|
|
||||||
|
if($r1 && $r2)
|
||||||
|
return UPDATE_SUCCESS;
|
||||||
|
return UPDATE_FAILED;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
2014-08-01.754
|
2014-08-02.755
|
||||||
|
@ -125,25 +125,19 @@
|
|||||||
|
|
||||||
<div id="profile-edit-marital-end"></div>
|
<div id="profile-edit-marital-end"></div>
|
||||||
|
|
||||||
<div id="profile-edit-sexual-wrapper" >
|
|
||||||
<label id="profile-edit-sexual-label" for="sexual-select" >{{$lbl_sexual}} </label>
|
|
||||||
{{if $advanced}}
|
|
||||||
{{$sexual}}
|
|
||||||
{{else}}
|
|
||||||
{{$sexual_min}}
|
|
||||||
{{/if}}
|
|
||||||
</div>
|
|
||||||
<div id="profile-edit-sexual-end"></div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div id="profile-edit-homepage-wrapper" >
|
<div id="profile-edit-homepage-wrapper" >
|
||||||
<label id="profile-edit-homepage-label" for="profile-edit-homepage" >{{$lbl_homepage}} </label>
|
<label id="profile-edit-homepage-label" for="profile-edit-homepage" >{{$lbl_homepage}} </label>
|
||||||
<input type="text" size="32" name="homepage" id="profile-edit-homepage" value="{{$homepage}}" />
|
<input type="text" size="32" name="homepage" id="profile-edit-homepage" value="{{$homepage}}" />
|
||||||
</div>
|
</div>
|
||||||
<div id="profile-edit-homepage-end"></div>
|
<div id="profile-edit-homepage-end"></div>
|
||||||
|
|
||||||
|
|
||||||
{{if $advanced}}
|
{{if $advanced}}
|
||||||
|
<div id="profile-edit-sexual-wrapper" >
|
||||||
|
<label id="profile-edit-sexual-label" for="sexual-select" >{{$lbl_sexual}} </label>
|
||||||
|
{{$sexual}}
|
||||||
|
</div>
|
||||||
|
<div id="profile-edit-sexual-end"></div>
|
||||||
|
|
||||||
<div id="profile-edit-politic-wrapper" >
|
<div id="profile-edit-politic-wrapper" >
|
||||||
<label id="profile-edit-politic-label" for="profile-edit-politic" >{{$lbl_politic}} </label>
|
<label id="profile-edit-politic-label" for="profile-edit-politic" >{{$lbl_politic}} </label>
|
||||||
|
Reference in New Issue
Block a user