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.
This commit is contained in:
parent
53de5f348a
commit
e62dfc6f8a
2
boot.php
2
boot.php
@ -45,7 +45,7 @@ define ( 'RED_PLATFORM', 'Red Matrix' );
|
||||
define ( 'RED_VERSION', trim(file_get_contents('version.inc')) . 'R');
|
||||
define ( 'ZOT_REVISION', 1 );
|
||||
|
||||
define ( 'DB_UPDATE_VERSION', 1072 );
|
||||
define ( 'DB_UPDATE_VERSION', 1073 );
|
||||
|
||||
define ( 'EOL', '<br />' . "\r\n" );
|
||||
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user