From 764ee785f5505c2be804a850b8e4029598d81739 Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 16 Jun 2013 19:14:01 -0700 Subject: We will need a per item comment policy to be able to determine in advance if we have permission to comment on something , and we'll need to send it out with all communications. The current check is not only flawed but also a huge performance hit. Also provide the ability for an item to disable commenting completely - such as for a webpage or wherever you want to prevent comments on one item, without requiring a change to your entire permission scheme. All of this is only partially implemented at the moment but we need the structures in place on several sites in order to finish it without breaking everything. --- install/database.sql | 2 ++ install/update.php | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'install') diff --git a/install/database.sql b/install/database.sql index 33dd9f31b..07f797dc4 100644 --- a/install/database.sql +++ b/install/database.sql @@ -462,6 +462,7 @@ CREATE TABLE IF NOT EXISTS `item` ( `inform` mediumtext NOT NULL, `location` char(255) NOT NULL DEFAULT '', `coord` char(255) NOT NULL DEFAULT '', + `comment_policy` char(255) NOT NULL DEFAULT '', `allow_cid` mediumtext NOT NULL, `allow_gid` mediumtext NOT NULL, `deny_cid` mediumtext NOT NULL, @@ -494,6 +495,7 @@ CREATE TABLE IF NOT EXISTS `item` ( KEY `mid` (`mid`), KEY `parent_mid` (`parent_mid`), KEY `uid_mid` (`mid`,`uid`), + KEY `comment_policy` (`comment_policy`), FULLTEXT KEY `title` (`title`), FULLTEXT KEY `body` (`body`), FULLTEXT KEY `allow_cid` (`allow_cid`), diff --git a/install/update.php b/install/update.php index 382e8723c..787c1d542 100644 --- a/install/update.php +++ b/install/update.php @@ -1,6 +1,6 @@ Date: Wed, 19 Jun 2013 18:06:14 -0700 Subject: infrastructure for future stuff --- install/database.sql | 4 +++- install/update.php | 10 +++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'install') diff --git a/install/database.sql b/install/database.sql index 07f797dc4..9964e98ea 100644 --- a/install/database.sql +++ b/install/database.sql @@ -826,13 +826,15 @@ CREATE TABLE IF NOT EXISTS `term` ( `type` tinyint(3) unsigned NOT NULL, `term` char(255) NOT NULL, `url` char(255) NOT NULL, + `imgurl` char(255) NOT NULL, PRIMARY KEY (`tid`), KEY `oid` (`oid`), KEY `otype` (`otype`), KEY `type` (`type`), KEY `term` (`term`), KEY `uid` (`uid`), - KEY `aid` (`aid`) + KEY `aid` (`aid`), + KEY `imgurl` (`imgurl`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `tokens` ( diff --git a/install/update.php b/install/update.php index 787c1d542..ba5ec0262 100644 --- a/install/update.php +++ b/install/update.php @@ -1,6 +1,6 @@ Date: Thu, 20 Jun 2013 18:36:02 -0700 Subject: Add site registration policy to site record. This is not yet used or stored, but potentially can be exchanged through directory mirrors to automatically create "open site" lists. --- install/database.sql | 4 +++- install/update.php | 11 ++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) (limited to 'install') diff --git a/install/database.sql b/install/database.sql index 9964e98ea..056124649 100644 --- a/install/database.sql +++ b/install/database.sql @@ -797,10 +797,12 @@ CREATE TABLE IF NOT EXISTS `site` ( `site_flags` int(11) NOT NULL DEFAULT '0', `site_update` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `site_directory` char(255) NOT NULL DEFAULT '', + `site_register` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`site_url`), KEY `site_flags` (`site_flags`), KEY `site_update` (`site_update`), - KEY `site_directory` (`site_directory`) + KEY `site_directory` (`site_directory`), + KEY `site_register` (`site_register`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `spam` ( diff --git a/install/update.php b/install/update.php index ba5ec0262..c57b8562e 100644 --- a/install/update.php +++ b/install/update.php @@ -1,6 +1,6 @@ Date: Thu, 27 Jun 2013 19:35:59 -0700 Subject: Basic ability to create "things" --- install/database.sql | 6 ++++-- install/update.php | 9 ++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) (limited to 'install') diff --git a/install/database.sql b/install/database.sql index 056124649..30b8edfd7 100644 --- a/install/database.sql +++ b/install/database.sql @@ -829,6 +829,7 @@ CREATE TABLE IF NOT EXISTS `term` ( `term` char(255) NOT NULL, `url` char(255) NOT NULL, `imgurl` char(255) NOT NULL, + `term_hash` char(255) NOT NULL DEFAULT '', PRIMARY KEY (`tid`), KEY `oid` (`oid`), KEY `otype` (`otype`), @@ -836,7 +837,8 @@ CREATE TABLE IF NOT EXISTS `term` ( KEY `term` (`term`), KEY `uid` (`uid`), KEY `aid` (`aid`), - KEY `imgurl` (`imgurl`) + KEY `imgurl` (`imgurl`), + KEY `term_hash` (`term_hash`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `tokens` ( @@ -933,7 +935,7 @@ CREATE TABLE IF NOT EXISTS `xlink` ( KEY `xlink_link` (`xlink_link`), KEY `xlink_updated` (`xlink_updated`), KEY `xlink_rating` (`xlink_rating`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=MyISAM DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `xprof` ( `xprof_hash` char(255) NOT NULL, diff --git a/install/update.php b/install/update.php index c57b8562e..ee95b7e01 100644 --- a/install/update.php +++ b/install/update.php @@ -1,6 +1,6 @@ Date: Sun, 30 Jun 2013 00:38:02 -0700 Subject: add age to directory profile - requires updating on each birthday and that part is still missing --- install/database.sql | 2 ++ install/update.php | 11 ++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'install') diff --git a/install/database.sql b/install/database.sql index 30b8edfd7..5cb0146f7 100644 --- a/install/database.sql +++ b/install/database.sql @@ -941,6 +941,7 @@ CREATE TABLE IF NOT EXISTS `xprof` ( `xprof_hash` char(255) NOT NULL, `xprof_desc` char(255) NOT NULL DEFAULT '', `xprof_dob` char(12) NOT NULL DEFAULT '', + `xprof_age` tinyint(3) NOT NULL DEFAULT '0', `xprof_gender` char(255) NOT NULL DEFAULT '', `xprof_marital` char(255) NOT NULL DEFAULT '', `xprof_sexual` char(255) NOT NULL DEFAULT '', @@ -952,6 +953,7 @@ CREATE TABLE IF NOT EXISTS `xprof` ( PRIMARY KEY (`xprof_hash`), KEY `xprof_desc` (`xprof_desc`), KEY `xprof_dob` (`xprof_dob`), + KEY `xprof_age` (`xprof_age`), KEY `xprof_gender` (`xprof_gender`), KEY `xprof_marital` (`xprof_marital`), KEY `xprof_sexual` (`xprof_sexual`), diff --git a/install/update.php b/install/update.php index ee95b7e01..ef436c688 100644 --- a/install/update.php +++ b/install/update.php @@ -1,6 +1,6 @@