aboutsummaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-06-16 19:14:01 -0700
committerfriendica <info@friendica.com>2013-06-16 19:14:01 -0700
commit764ee785f5505c2be804a850b8e4029598d81739 (patch)
tree236e56e5549ce14272f39939c17c581ce365764e /install
parent99252d65bfd59fb704d32f7dde4c62b080303d33 (diff)
downloadvolse-hubzilla-764ee785f5505c2be804a850b8e4029598d81739.tar.gz
volse-hubzilla-764ee785f5505c2be804a850b8e4029598d81739.tar.bz2
volse-hubzilla-764ee785f5505c2be804a850b8e4029598d81739.zip
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.
Diffstat (limited to 'install')
-rw-r--r--install/database.sql2
-rw-r--r--install/update.php9
2 files changed, 10 insertions, 1 deletions
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 @@
<?php
-define( 'UPDATE_VERSION' , 1043 );
+define( 'UPDATE_VERSION' , 1044 );
/**
*
@@ -541,3 +541,10 @@ ADD `hubloc_connected` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', ADD IND
}
+function update_r1043() {
+ $r = q("ALTER TABLE `item` ADD `comment_policy` CHAR( 255 ) NOT NULL DEFAULT '' AFTER `coord` ,
+ADD INDEX ( `comment_policy` ) ");
+ if($r)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+}