From edc5566f79c94f7ad994eccc7a8bb0e586961cf4 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 26 Sep 2013 16:25:28 -0700 Subject: structure for channel unions --- boot.php | 2 +- include/identity.php | 2 +- include/zot.php | 3 ++- install/database.sql | 12 ++++++++++++ install/update.php | 18 +++++++++++++++++- mod/zfinger.php | 5 ----- version.inc | 2 +- 7 files changed, 34 insertions(+), 10 deletions(-) diff --git a/boot.php b/boot.php index b2ce372bb..3dbd7193e 100755 --- a/boot.php +++ b/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', 1073 ); +define ( 'DB_UPDATE_VERSION', 1074 ); define ( 'EOL', '
' . "\r\n" ); define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' ); diff --git a/include/identity.php b/include/identity.php index 98209c8ae..d6b6735f6 100644 --- a/include/identity.php +++ b/include/identity.php @@ -48,7 +48,7 @@ function validate_channelname($name) { function create_dir_account() { - create_account(array( + create_identity(array( 'account_id' => 'xxx', // This will create an identity with an (integer) account_id of 0, but account_id is required 'nickname' => 'dir', 'name' => 'Directory', diff --git a/include/zot.php b/include/zot.php index 0290bc402..0658f1738 100644 --- a/include/zot.php +++ b/include/zot.php @@ -1422,9 +1422,10 @@ function import_directory_profile($hash,$profile,$addr,$ud_flags = 1, $suppress_ // Self censored, make it so // These are not translated, so the German "erwachsenen" keyword will not censor the directory profile. Only the English form - "adult". + if(in_arrayi('nsfw',$clean) || in_arrayi('adult',$clean)) { q("update xchan set xchan_flags = (xchan_flags | %d) where xchan_hash = '%s' limit 1", - intval(XCHAN_FLAGS_CENSORED), + intval(XCHAN_FLAGS_SELFCENSORED), dbesc($hash) ); } diff --git a/install/database.sql b/install/database.sql index 44e211630..c92428975 100644 --- a/install/database.sql +++ b/install/database.sql @@ -835,6 +835,18 @@ CREATE TABLE IF NOT EXISTS `site` ( KEY `site_sellpage` (`site_sellpage`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE IF NOT EXISTS `source` ( + `src_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `src_channel_id` int(10) unsigned NOT NULL DEFAULT '0', + `src_channel_xchan` char(255) NOT NULL DEFAULT '', + `src_xchan` char(255) NOT NULL DEFAULT '', + `src_patt` mediumtext NOT NULL, + PRIMARY KEY (`src_id`), + KEY `src_channel_id` (`src_channel_id`), + KEY `src_channel_xchan` (`src_channel_xchan`), + KEY `src_xchan` (`src_xchan`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + CREATE TABLE IF NOT EXISTS `spam` ( `id` int(11) NOT NULL AUTO_INCREMENT, `uid` int(11) NOT NULL, diff --git a/install/update.php b/install/update.php index d2d6a0cb7..13f4fc63b 100644 --- a/install/update.php +++ b/install/update.php @@ -1,6 +1,6 @@