aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-01-31 23:54:53 -0800
committerfriendica <info@friendica.com>2012-01-31 23:54:53 -0800
commitc0c0f2dc151300f7578cf77a059403369edba07d (patch)
treed6731b4a052e7f055bd79b1ebde81d22e26a7401
parent86c0eac27d4ed2a454f752615a1b446cf2acd2b2 (diff)
downloadvolse-hubzilla-c0c0f2dc151300f7578cf77a059403369edba07d.tar.gz
volse-hubzilla-c0c0f2dc151300f7578cf77a059403369edba07d.tar.bz2
volse-hubzilla-c0c0f2dc151300f7578cf77a059403369edba07d.zip
add closeness attribute
-rwxr-xr-xboot.php2
-rwxr-xr-xdatabase.sql4
-rwxr-xr-xmod/register.php4
-rwxr-xr-xupdate.php6
4 files changed, 11 insertions, 5 deletions
diff --git a/boot.php b/boot.php
index 05df15b9c..696c9add2 100755
--- a/boot.php
+++ b/boot.php
@@ -11,7 +11,7 @@ require_once('include/cache.php');
define ( 'FRIENDICA_PLATFORM', 'Friendica');
define ( 'FRIENDICA_VERSION', '2.3.1241' );
define ( 'DFRN_PROTOCOL_VERSION', '2.22' );
-define ( 'DB_UPDATE_VERSION', 1118 );
+define ( 'DB_UPDATE_VERSION', 1119 );
define ( 'EOL', "<br />\r\n" );
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
diff --git a/database.sql b/database.sql
index 9a2e5c8dd..8abaa5a93 100755
--- a/database.sql
+++ b/database.sql
@@ -96,6 +96,7 @@ CREATE TABLE IF NOT EXISTS `contact` (
`pending` tinyint(1) NOT NULL DEFAULT '1',
`rating` tinyint(1) NOT NULL DEFAULT '0',
`reason` text NOT NULL,
+ `closeness` tinyint(2) NOT NULL DEFAULT '99',
`info` mediumtext NOT NULL,
`profile-id` int(11) NOT NULL DEFAULT '0',
`bdyear` CHAR( 4 ) NOT NULL COMMENT 'birthday notify flag',
@@ -116,7 +117,8 @@ CREATE TABLE IF NOT EXISTS `contact` (
KEY `blocked` (`blocked`),
KEY `readonly` (`readonly`),
KEY `hidden` (`hidden`),
- KEY `pending` (`pending`)
+ KEY `pending` (`pending`),
+ KEY `closeness` (`closeness`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
diff --git a/mod/register.php b/mod/register.php
index 89f561642..388b3e250 100755
--- a/mod/register.php
+++ b/mod/register.php
@@ -278,8 +278,8 @@ function register_post(&$a) {
return;
}
$r = q("INSERT INTO `contact` ( `uid`, `created`, `self`, `name`, `nick`, `photo`, `thumb`, `micro`, `blocked`, `pending`, `url`, `nurl`,
- `request`, `notify`, `poll`, `confirm`, `poco`, `name-date`, `uri-date`, `avatar-date` )
- VALUES ( %d, '%s', 1, '%s', '%s', '%s', '%s', '%s', 0, 0, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s' ) ",
+ `request`, `notify`, `poll`, `confirm`, `poco`, `name-date`, `uri-date`, `avatar-date`, `closeness` )
+ VALUES ( %d, '%s', 1, '%s', '%s', '%s', '%s', '%s', 0, 0, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', 0 ) ",
intval($newuid),
datetime_convert(),
dbesc($username),
diff --git a/update.php b/update.php
index d961f2932..e0591a3b3 100755
--- a/update.php
+++ b/update.php
@@ -1,6 +1,6 @@
<?php
-define( 'UPDATE_VERSION' , 1118 );
+define( 'UPDATE_VERSION' , 1119 );
/**
*
@@ -1012,3 +1012,7 @@ INDEX ( `mid` )
}
+function update_1118() {
+q("ALTER TABLE `contact` ADD `closeness` TINYINT( 2 ) NOT NULL DEFAULT '99' AFTER `reason` , ADD INDEX (`closensss`) ");
+q("update contact set closeness = 0 where self = 1");
+}