aboutsummaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-09-19 22:27:12 -0700
committerfriendica <info@friendica.com>2013-09-19 22:27:12 -0700
commite62dfc6f8aa4b215682311bca427142b2fe30a88 (patch)
tree911760801b641cf2112152138f3c5eb7ecbf98da /install
parent53de5f348a019d6a19ccca49a811c1985d094126 (diff)
downloadvolse-hubzilla-e62dfc6f8aa4b215682311bca427142b2fe30a88.tar.gz
volse-hubzilla-e62dfc6f8aa4b215682311bca427142b2fe30a88.tar.bz2
volse-hubzilla-e62dfc6f8aa4b215682311bca427142b2fe30a88.zip
add a flag field to xtags so that we can filter tags based on whether or not the parent xchan is safe or not. Otherwise we'll have tags that lead to nowhere because the directory entry is hidden but the tag isn't. A successful porn site in the matrix could also swamp the directory with x-rated tags, even if the site was playing nice and did everything right to self-censor. Accomplishing this with joins would be horrendously inefficient, though it will take a bit of code re-org to get this flag where it needs to be when it's time to set keywords.
Diffstat (limited to 'install')
-rw-r--r--install/database.sql4
-rw-r--r--install/update.php9
2 files changed, 11 insertions, 2 deletions
diff --git a/install/database.sql b/install/database.sql
index a74b30d59..44e211630 100644
--- a/install/database.sql
+++ b/install/database.sql
@@ -1025,7 +1025,9 @@ CREATE TABLE IF NOT EXISTS `xtag` (
`xtag_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`xtag_hash` char(255) NOT NULL,
`xtag_term` char(255) NOT NULL DEFAULT '',
+ `xtag_flags` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`xtag_id`),
KEY `xtag_term` (`xtag_term`),
- KEY `xtag_hash` (`xtag_hash`)
+ KEY `xtag_hash` (`xtag_hash`),
+ KEY `xtag_flags` (`xtag_flags`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
diff --git a/install/update.php b/install/update.php
index ccbdd79fd..d2d6a0cb7 100644
--- a/install/update.php
+++ b/install/update.php
@@ -1,6 +1,6 @@
<?php
-define( 'UPDATE_VERSION' , 1072 );
+define( 'UPDATE_VERSION' , 1073 );
/**
*
@@ -813,3 +813,10 @@ ADD INDEX ( `ud_addr` ) ");
return UPDATE_FAILED;
}
+function update_r1072() {
+ $r = q("ALTER TABLE `xtag` ADD `xtag_flags` INT NOT NULL DEFAULT '0',
+ADD INDEX ( `xtag_flags` ) ");
+ if($r)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+}