Merge branch 'develop' into MySQL5.7
This commit is contained in:
commit
6b250d3ae9
2
boot.php
2
boot.php
|
@ -38,7 +38,7 @@ define ( 'FRIENDICA_PLATFORM', 'Friendica');
|
||||||
define ( 'FRIENDICA_CODENAME', 'Asparagus');
|
define ( 'FRIENDICA_CODENAME', 'Asparagus');
|
||||||
define ( 'FRIENDICA_VERSION', '3.5.2-dev' );
|
define ( 'FRIENDICA_VERSION', '3.5.2-dev' );
|
||||||
define ( 'DFRN_PROTOCOL_VERSION', '2.23' );
|
define ( 'DFRN_PROTOCOL_VERSION', '2.23' );
|
||||||
define ( 'DB_UPDATE_VERSION', 1216 );
|
define ( 'DB_UPDATE_VERSION', 1218 );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Constant with a HTML line break.
|
* @brief Constant with a HTML line break.
|
||||||
|
|
108
database.sql
108
database.sql
|
@ -1,6 +1,6 @@
|
||||||
-- ------------------------------------------
|
-- ------------------------------------------
|
||||||
-- Friendica 3.5.2-dev (Asparagus)
|
-- Friendica 3.5.2-dev (Asparagus)
|
||||||
-- DB_UPDATE_VERSION 1215
|
-- DB_UPDATE_VERSION 1218
|
||||||
-- ------------------------------------------
|
-- ------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ CREATE TABLE IF NOT EXISTS `addon` (
|
||||||
`plugin_admin` tinyint(1) NOT NULL DEFAULT 0,
|
`plugin_admin` tinyint(1) NOT NULL DEFAULT 0,
|
||||||
PRIMARY KEY(`id`),
|
PRIMARY KEY(`id`),
|
||||||
UNIQUE INDEX `name` (`name`)
|
UNIQUE INDEX `name` (`name`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TABLE attach
|
-- TABLE attach
|
||||||
|
@ -37,7 +37,7 @@ CREATE TABLE IF NOT EXISTS `attach` (
|
||||||
`deny_cid` mediumtext,
|
`deny_cid` mediumtext,
|
||||||
`deny_gid` mediumtext,
|
`deny_gid` mediumtext,
|
||||||
PRIMARY KEY(`id`)
|
PRIMARY KEY(`id`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TABLE auth_codes
|
-- TABLE auth_codes
|
||||||
|
@ -49,7 +49,7 @@ CREATE TABLE IF NOT EXISTS `auth_codes` (
|
||||||
`expires` int(11) NOT NULL DEFAULT 0,
|
`expires` int(11) NOT NULL DEFAULT 0,
|
||||||
`scope` varchar(250) NOT NULL DEFAULT '',
|
`scope` varchar(250) NOT NULL DEFAULT '',
|
||||||
PRIMARY KEY(`id`)
|
PRIMARY KEY(`id`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TABLE cache
|
-- TABLE cache
|
||||||
|
@ -61,7 +61,7 @@ CREATE TABLE IF NOT EXISTS `cache` (
|
||||||
`updated` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
|
`updated` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
|
||||||
PRIMARY KEY(`k`),
|
PRIMARY KEY(`k`),
|
||||||
INDEX `expire_mode_updated` (`expire_mode`,`updated`)
|
INDEX `expire_mode_updated` (`expire_mode`,`updated`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TABLE challenge
|
-- TABLE challenge
|
||||||
|
@ -74,7 +74,7 @@ CREATE TABLE IF NOT EXISTS `challenge` (
|
||||||
`type` varchar(255) NOT NULL DEFAULT '',
|
`type` varchar(255) NOT NULL DEFAULT '',
|
||||||
`last_update` varchar(255) NOT NULL DEFAULT '',
|
`last_update` varchar(255) NOT NULL DEFAULT '',
|
||||||
PRIMARY KEY(`id`)
|
PRIMARY KEY(`id`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TABLE clients
|
-- TABLE clients
|
||||||
|
@ -87,7 +87,7 @@ CREATE TABLE IF NOT EXISTS `clients` (
|
||||||
`icon` text,
|
`icon` text,
|
||||||
`uid` int(11) NOT NULL DEFAULT 0,
|
`uid` int(11) NOT NULL DEFAULT 0,
|
||||||
PRIMARY KEY(`client_id`)
|
PRIMARY KEY(`client_id`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TABLE config
|
-- TABLE config
|
||||||
|
@ -99,7 +99,7 @@ CREATE TABLE IF NOT EXISTS `config` (
|
||||||
`v` mediumtext,
|
`v` mediumtext,
|
||||||
PRIMARY KEY(`id`),
|
PRIMARY KEY(`id`),
|
||||||
UNIQUE INDEX `cat_k` (`cat`,`k`)
|
UNIQUE INDEX `cat_k` (`cat`,`k`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TABLE contact
|
-- TABLE contact
|
||||||
|
@ -159,7 +159,7 @@ CREATE TABLE IF NOT EXISTS `contact` (
|
||||||
`writable` tinyint(1) NOT NULL DEFAULT 0,
|
`writable` tinyint(1) NOT NULL DEFAULT 0,
|
||||||
`forum` tinyint(1) NOT NULL DEFAULT 0,
|
`forum` tinyint(1) NOT NULL DEFAULT 0,
|
||||||
`prv` tinyint(1) NOT NULL DEFAULT 0,
|
`prv` tinyint(1) NOT NULL DEFAULT 0,
|
||||||
`contact-type` int(11) unsigned NOT NULL DEFAULT 0,
|
`contact-type` int(11) NOT NULL DEFAULT 0,
|
||||||
`hidden` tinyint(1) NOT NULL DEFAULT 0,
|
`hidden` tinyint(1) NOT NULL DEFAULT 0,
|
||||||
`archive` tinyint(1) NOT NULL DEFAULT 0,
|
`archive` tinyint(1) NOT NULL DEFAULT 0,
|
||||||
`pending` tinyint(1) NOT NULL DEFAULT 1,
|
`pending` tinyint(1) NOT NULL DEFAULT 1,
|
||||||
|
@ -186,7 +186,7 @@ CREATE TABLE IF NOT EXISTS `contact` (
|
||||||
INDEX `nick_uid` (`nick`(32),`uid`),
|
INDEX `nick_uid` (`nick`(32),`uid`),
|
||||||
INDEX `dfrn-id` (`dfrn-id`),
|
INDEX `dfrn-id` (`dfrn-id`),
|
||||||
INDEX `issued-id` (`issued-id`)
|
INDEX `issued-id` (`issued-id`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TABLE conv
|
-- TABLE conv
|
||||||
|
@ -202,7 +202,7 @@ CREATE TABLE IF NOT EXISTS `conv` (
|
||||||
`subject` text,
|
`subject` text,
|
||||||
PRIMARY KEY(`id`),
|
PRIMARY KEY(`id`),
|
||||||
INDEX `uid` (`uid`)
|
INDEX `uid` (`uid`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TABLE event
|
-- TABLE event
|
||||||
|
@ -230,7 +230,7 @@ CREATE TABLE IF NOT EXISTS `event` (
|
||||||
`deny_gid` mediumtext,
|
`deny_gid` mediumtext,
|
||||||
PRIMARY KEY(`id`),
|
PRIMARY KEY(`id`),
|
||||||
INDEX `uid_start` (`uid`,`start`)
|
INDEX `uid_start` (`uid`,`start`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TABLE fcontact
|
-- TABLE fcontact
|
||||||
|
@ -256,7 +256,7 @@ CREATE TABLE IF NOT EXISTS `fcontact` (
|
||||||
PRIMARY KEY(`id`),
|
PRIMARY KEY(`id`),
|
||||||
INDEX `addr` (`addr`(32)),
|
INDEX `addr` (`addr`(32)),
|
||||||
INDEX `url` (`url`)
|
INDEX `url` (`url`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TABLE ffinder
|
-- TABLE ffinder
|
||||||
|
@ -267,7 +267,7 @@ CREATE TABLE IF NOT EXISTS `ffinder` (
|
||||||
`cid` int(10) unsigned NOT NULL DEFAULT 0,
|
`cid` int(10) unsigned NOT NULL DEFAULT 0,
|
||||||
`fid` int(10) unsigned NOT NULL DEFAULT 0,
|
`fid` int(10) unsigned NOT NULL DEFAULT 0,
|
||||||
PRIMARY KEY(`id`)
|
PRIMARY KEY(`id`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TABLE fserver
|
-- TABLE fserver
|
||||||
|
@ -279,7 +279,7 @@ CREATE TABLE IF NOT EXISTS `fserver` (
|
||||||
`key` text,
|
`key` text,
|
||||||
PRIMARY KEY(`id`),
|
PRIMARY KEY(`id`),
|
||||||
INDEX `server` (`server`(32))
|
INDEX `server` (`server`(32))
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TABLE fsuggest
|
-- TABLE fsuggest
|
||||||
|
@ -295,7 +295,7 @@ CREATE TABLE IF NOT EXISTS `fsuggest` (
|
||||||
`note` text,
|
`note` text,
|
||||||
`created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
|
`created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
|
||||||
PRIMARY KEY(`id`)
|
PRIMARY KEY(`id`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TABLE gcign
|
-- TABLE gcign
|
||||||
|
@ -307,7 +307,7 @@ CREATE TABLE IF NOT EXISTS `gcign` (
|
||||||
PRIMARY KEY(`id`),
|
PRIMARY KEY(`id`),
|
||||||
INDEX `uid` (`uid`),
|
INDEX `uid` (`uid`),
|
||||||
INDEX `gcid` (`gcid`)
|
INDEX `gcid` (`gcid`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TABLE gcontact
|
-- TABLE gcontact
|
||||||
|
@ -346,7 +346,7 @@ CREATE TABLE IF NOT EXISTS `gcontact` (
|
||||||
INDEX `addr` (`addr`(64)),
|
INDEX `addr` (`addr`(64)),
|
||||||
INDEX `hide_network_updated` (`hide`,`network`,`updated`),
|
INDEX `hide_network_updated` (`hide`,`network`,`updated`),
|
||||||
INDEX `updated` (`updated`)
|
INDEX `updated` (`updated`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TABLE glink
|
-- TABLE glink
|
||||||
|
@ -361,7 +361,7 @@ CREATE TABLE IF NOT EXISTS `glink` (
|
||||||
PRIMARY KEY(`id`),
|
PRIMARY KEY(`id`),
|
||||||
UNIQUE INDEX `cid_uid_gcid_zcid` (`cid`,`uid`,`gcid`,`zcid`),
|
UNIQUE INDEX `cid_uid_gcid_zcid` (`cid`,`uid`,`gcid`,`zcid`),
|
||||||
INDEX `gcid` (`gcid`)
|
INDEX `gcid` (`gcid`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TABLE group
|
-- TABLE group
|
||||||
|
@ -374,7 +374,7 @@ CREATE TABLE IF NOT EXISTS `group` (
|
||||||
`name` varchar(255) NOT NULL DEFAULT '',
|
`name` varchar(255) NOT NULL DEFAULT '',
|
||||||
PRIMARY KEY(`id`),
|
PRIMARY KEY(`id`),
|
||||||
INDEX `uid` (`uid`)
|
INDEX `uid` (`uid`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TABLE group_member
|
-- TABLE group_member
|
||||||
|
@ -388,7 +388,7 @@ CREATE TABLE IF NOT EXISTS `group_member` (
|
||||||
INDEX `contactid` (`contact-id`),
|
INDEX `contactid` (`contact-id`),
|
||||||
INDEX `gid_contactid` (`gid`,`contact-id`),
|
INDEX `gid_contactid` (`gid`,`contact-id`),
|
||||||
UNIQUE INDEX `uid_gid_contactid` (`uid`,`gid`,`contact-id`)
|
UNIQUE INDEX `uid_gid_contactid` (`uid`,`gid`,`contact-id`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TABLE gserver
|
-- TABLE gserver
|
||||||
|
@ -411,7 +411,7 @@ CREATE TABLE IF NOT EXISTS `gserver` (
|
||||||
`last_failure` datetime DEFAULT '0001-01-01 00:00:00',
|
`last_failure` datetime DEFAULT '0001-01-01 00:00:00',
|
||||||
PRIMARY KEY(`id`),
|
PRIMARY KEY(`id`),
|
||||||
INDEX `nurl` (`nurl`(32))
|
INDEX `nurl` (`nurl`(32))
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TABLE hook
|
-- TABLE hook
|
||||||
|
@ -424,7 +424,7 @@ CREATE TABLE IF NOT EXISTS `hook` (
|
||||||
`priority` int(11) unsigned NOT NULL DEFAULT 0,
|
`priority` int(11) unsigned NOT NULL DEFAULT 0,
|
||||||
PRIMARY KEY(`id`),
|
PRIMARY KEY(`id`),
|
||||||
UNIQUE INDEX `hook_file_function` (`hook`(50),`file`(80),`function`(60))
|
UNIQUE INDEX `hook_file_function` (`hook`(50),`file`(80),`function`(60))
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TABLE intro
|
-- TABLE intro
|
||||||
|
@ -442,7 +442,7 @@ CREATE TABLE IF NOT EXISTS `intro` (
|
||||||
`blocked` tinyint(1) NOT NULL DEFAULT 1,
|
`blocked` tinyint(1) NOT NULL DEFAULT 1,
|
||||||
`ignore` tinyint(1) NOT NULL DEFAULT 0,
|
`ignore` tinyint(1) NOT NULL DEFAULT 0,
|
||||||
PRIMARY KEY(`id`)
|
PRIMARY KEY(`id`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TABLE item
|
-- TABLE item
|
||||||
|
@ -539,7 +539,7 @@ CREATE TABLE IF NOT EXISTS `item` (
|
||||||
INDEX `uid_eventid` (`uid`,`event-id`),
|
INDEX `uid_eventid` (`uid`,`event-id`),
|
||||||
INDEX `uid_authorlink` (`uid`,`author-link`),
|
INDEX `uid_authorlink` (`uid`,`author-link`),
|
||||||
INDEX `uid_ownerlink` (`uid`,`owner-link`)
|
INDEX `uid_ownerlink` (`uid`,`owner-link`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TABLE item_id
|
-- TABLE item_id
|
||||||
|
@ -555,7 +555,7 @@ CREATE TABLE IF NOT EXISTS `item_id` (
|
||||||
INDEX `sid` (`sid`),
|
INDEX `sid` (`sid`),
|
||||||
INDEX `service` (`service`(32)),
|
INDEX `service` (`service`(32)),
|
||||||
INDEX `iid` (`iid`)
|
INDEX `iid` (`iid`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TABLE locks
|
-- TABLE locks
|
||||||
|
@ -566,7 +566,7 @@ CREATE TABLE IF NOT EXISTS `locks` (
|
||||||
`locked` tinyint(1) NOT NULL DEFAULT 0,
|
`locked` tinyint(1) NOT NULL DEFAULT 0,
|
||||||
`created` datetime DEFAULT '0001-01-01 00:00:00',
|
`created` datetime DEFAULT '0001-01-01 00:00:00',
|
||||||
PRIMARY KEY(`id`)
|
PRIMARY KEY(`id`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TABLE mail
|
-- TABLE mail
|
||||||
|
@ -594,7 +594,7 @@ CREATE TABLE IF NOT EXISTS `mail` (
|
||||||
INDEX `convid` (`convid`),
|
INDEX `convid` (`convid`),
|
||||||
INDEX `uri` (`uri`(64)),
|
INDEX `uri` (`uri`(64)),
|
||||||
INDEX `parent-uri` (`parent-uri`(64))
|
INDEX `parent-uri` (`parent-uri`(64))
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TABLE mailacct
|
-- TABLE mailacct
|
||||||
|
@ -614,7 +614,7 @@ CREATE TABLE IF NOT EXISTS `mailacct` (
|
||||||
`pubmail` tinyint(1) NOT NULL DEFAULT 0,
|
`pubmail` tinyint(1) NOT NULL DEFAULT 0,
|
||||||
`last_check` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
|
`last_check` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
|
||||||
PRIMARY KEY(`id`)
|
PRIMARY KEY(`id`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TABLE manage
|
-- TABLE manage
|
||||||
|
@ -625,7 +625,7 @@ CREATE TABLE IF NOT EXISTS `manage` (
|
||||||
`mid` int(11) NOT NULL DEFAULT 0,
|
`mid` int(11) NOT NULL DEFAULT 0,
|
||||||
PRIMARY KEY(`id`),
|
PRIMARY KEY(`id`),
|
||||||
UNIQUE INDEX `uid_mid` (`uid`,`mid`)
|
UNIQUE INDEX `uid_mid` (`uid`,`mid`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TABLE notify
|
-- TABLE notify
|
||||||
|
@ -653,7 +653,7 @@ CREATE TABLE IF NOT EXISTS `notify` (
|
||||||
INDEX `seen_uid_date` (`seen`,`uid`,`date`),
|
INDEX `seen_uid_date` (`seen`,`uid`,`date`),
|
||||||
INDEX `uid_date` (`uid`,`date`),
|
INDEX `uid_date` (`uid`,`date`),
|
||||||
INDEX `uid_type_link` (`uid`,`type`,`link`)
|
INDEX `uid_type_link` (`uid`,`type`,`link`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TABLE notify-threads
|
-- TABLE notify-threads
|
||||||
|
@ -665,7 +665,7 @@ CREATE TABLE IF NOT EXISTS `notify-threads` (
|
||||||
`parent-item` int(10) unsigned NOT NULL DEFAULT 0,
|
`parent-item` int(10) unsigned NOT NULL DEFAULT 0,
|
||||||
`receiver-uid` int(11) NOT NULL DEFAULT 0,
|
`receiver-uid` int(11) NOT NULL DEFAULT 0,
|
||||||
PRIMARY KEY(`id`)
|
PRIMARY KEY(`id`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TABLE oembed
|
-- TABLE oembed
|
||||||
|
@ -676,7 +676,7 @@ CREATE TABLE IF NOT EXISTS `oembed` (
|
||||||
`created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
|
`created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
|
||||||
PRIMARY KEY(`url`),
|
PRIMARY KEY(`url`),
|
||||||
INDEX `created` (`created`)
|
INDEX `created` (`created`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TABLE parsed_url
|
-- TABLE parsed_url
|
||||||
|
@ -689,7 +689,7 @@ CREATE TABLE IF NOT EXISTS `parsed_url` (
|
||||||
`created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
|
`created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
|
||||||
PRIMARY KEY(`url`,`guessing`,`oembed`),
|
PRIMARY KEY(`url`,`guessing`,`oembed`),
|
||||||
INDEX `created` (`created`)
|
INDEX `created` (`created`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TABLE pconfig
|
-- TABLE pconfig
|
||||||
|
@ -702,7 +702,7 @@ CREATE TABLE IF NOT EXISTS `pconfig` (
|
||||||
`v` mediumtext,
|
`v` mediumtext,
|
||||||
PRIMARY KEY(`id`),
|
PRIMARY KEY(`id`),
|
||||||
UNIQUE INDEX `uid_cat_k` (`uid`,`cat`,`k`)
|
UNIQUE INDEX `uid_cat_k` (`uid`,`cat`,`k`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TABLE photo
|
-- TABLE photo
|
||||||
|
@ -736,7 +736,7 @@ CREATE TABLE IF NOT EXISTS `photo` (
|
||||||
INDEX `uid_album_scale_created` (`uid`,`album`(32),`scale`,`created`),
|
INDEX `uid_album_scale_created` (`uid`,`album`(32),`scale`,`created`),
|
||||||
INDEX `uid_album_resource-id_created` (`uid`,`album`(32),`resource-id`(64),`created`),
|
INDEX `uid_album_resource-id_created` (`uid`,`album`(32),`resource-id`(64),`created`),
|
||||||
INDEX `resource-id` (`resource-id`(64))
|
INDEX `resource-id` (`resource-id`(64))
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TABLE poll
|
-- TABLE poll
|
||||||
|
@ -756,7 +756,7 @@ CREATE TABLE IF NOT EXISTS `poll` (
|
||||||
`q9` text,
|
`q9` text,
|
||||||
PRIMARY KEY(`id`),
|
PRIMARY KEY(`id`),
|
||||||
INDEX `uid` (`uid`)
|
INDEX `uid` (`uid`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TABLE poll_result
|
-- TABLE poll_result
|
||||||
|
@ -768,7 +768,7 @@ CREATE TABLE IF NOT EXISTS `poll_result` (
|
||||||
PRIMARY KEY(`id`),
|
PRIMARY KEY(`id`),
|
||||||
INDEX `poll_id` (`poll_id`),
|
INDEX `poll_id` (`poll_id`),
|
||||||
INDEX `choice` (`choice`)
|
INDEX `choice` (`choice`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TABLE process
|
-- TABLE process
|
||||||
|
@ -779,7 +779,7 @@ CREATE TABLE IF NOT EXISTS `process` (
|
||||||
`created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
|
`created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
|
||||||
PRIMARY KEY(`pid`),
|
PRIMARY KEY(`pid`),
|
||||||
INDEX `command` (`command`)
|
INDEX `command` (`command`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TABLE profile
|
-- TABLE profile
|
||||||
|
@ -829,7 +829,7 @@ CREATE TABLE IF NOT EXISTS `profile` (
|
||||||
`net-publish` tinyint(1) NOT NULL DEFAULT 0,
|
`net-publish` tinyint(1) NOT NULL DEFAULT 0,
|
||||||
PRIMARY KEY(`id`),
|
PRIMARY KEY(`id`),
|
||||||
INDEX `uid_is-default` (`uid`,`is-default`)
|
INDEX `uid_is-default` (`uid`,`is-default`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TABLE profile_check
|
-- TABLE profile_check
|
||||||
|
@ -842,7 +842,7 @@ CREATE TABLE IF NOT EXISTS `profile_check` (
|
||||||
`sec` varchar(255) NOT NULL DEFAULT '',
|
`sec` varchar(255) NOT NULL DEFAULT '',
|
||||||
`expire` int(11) NOT NULL DEFAULT 0,
|
`expire` int(11) NOT NULL DEFAULT 0,
|
||||||
PRIMARY KEY(`id`)
|
PRIMARY KEY(`id`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TABLE push_subscriber
|
-- TABLE push_subscriber
|
||||||
|
@ -857,7 +857,7 @@ CREATE TABLE IF NOT EXISTS `push_subscriber` (
|
||||||
`last_update` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
|
`last_update` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
|
||||||
`secret` varchar(255) NOT NULL DEFAULT '',
|
`secret` varchar(255) NOT NULL DEFAULT '',
|
||||||
PRIMARY KEY(`id`)
|
PRIMARY KEY(`id`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TABLE queue
|
-- TABLE queue
|
||||||
|
@ -876,7 +876,7 @@ CREATE TABLE IF NOT EXISTS `queue` (
|
||||||
INDEX `last` (`last`),
|
INDEX `last` (`last`),
|
||||||
INDEX `network` (`network`),
|
INDEX `network` (`network`),
|
||||||
INDEX `batch` (`batch`)
|
INDEX `batch` (`batch`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TABLE register
|
-- TABLE register
|
||||||
|
@ -890,7 +890,7 @@ CREATE TABLE IF NOT EXISTS `register` (
|
||||||
`language` varchar(16) NOT NULL DEFAULT '',
|
`language` varchar(16) NOT NULL DEFAULT '',
|
||||||
`note` text,
|
`note` text,
|
||||||
PRIMARY KEY(`id`)
|
PRIMARY KEY(`id`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TABLE search
|
-- TABLE search
|
||||||
|
@ -901,7 +901,7 @@ CREATE TABLE IF NOT EXISTS `search` (
|
||||||
`term` varchar(255) NOT NULL DEFAULT '',
|
`term` varchar(255) NOT NULL DEFAULT '',
|
||||||
PRIMARY KEY(`id`),
|
PRIMARY KEY(`id`),
|
||||||
INDEX `uid` (`uid`)
|
INDEX `uid` (`uid`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TABLE session
|
-- TABLE session
|
||||||
|
@ -914,7 +914,7 @@ CREATE TABLE IF NOT EXISTS `session` (
|
||||||
PRIMARY KEY(`id`),
|
PRIMARY KEY(`id`),
|
||||||
INDEX `sid` (`sid`(64)),
|
INDEX `sid` (`sid`(64)),
|
||||||
INDEX `expire` (`expire`)
|
INDEX `expire` (`expire`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TABLE sign
|
-- TABLE sign
|
||||||
|
@ -927,7 +927,7 @@ CREATE TABLE IF NOT EXISTS `sign` (
|
||||||
`signer` varchar(255) NOT NULL DEFAULT '',
|
`signer` varchar(255) NOT NULL DEFAULT '',
|
||||||
PRIMARY KEY(`id`),
|
PRIMARY KEY(`id`),
|
||||||
INDEX `iid` (`iid`)
|
INDEX `iid` (`iid`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TABLE spam
|
-- TABLE spam
|
||||||
|
@ -944,7 +944,7 @@ CREATE TABLE IF NOT EXISTS `spam` (
|
||||||
INDEX `spam` (`spam`),
|
INDEX `spam` (`spam`),
|
||||||
INDEX `ham` (`ham`),
|
INDEX `ham` (`ham`),
|
||||||
INDEX `term` (`term`)
|
INDEX `term` (`term`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TABLE term
|
-- TABLE term
|
||||||
|
@ -967,7 +967,7 @@ CREATE TABLE IF NOT EXISTS `term` (
|
||||||
INDEX `uid_otype_type_term_global_created` (`uid`,`otype`,`type`,`term`(32),`global`,`created`),
|
INDEX `uid_otype_type_term_global_created` (`uid`,`otype`,`type`,`term`(32),`global`,`created`),
|
||||||
INDEX `uid_otype_type_url` (`uid`,`otype`,`type`,`url`(64)),
|
INDEX `uid_otype_type_url` (`uid`,`otype`,`type`,`url`(64)),
|
||||||
INDEX `guid` (`guid`(64))
|
INDEX `guid` (`guid`(64))
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TABLE thread
|
-- TABLE thread
|
||||||
|
@ -1007,7 +1007,7 @@ CREATE TABLE IF NOT EXISTS `thread` (
|
||||||
INDEX `uid_created` (`uid`,`created`),
|
INDEX `uid_created` (`uid`,`created`),
|
||||||
INDEX `uid_commented` (`uid`,`commented`),
|
INDEX `uid_commented` (`uid`,`commented`),
|
||||||
INDEX `uid_wall_created` (`uid`,`wall`,`created`)
|
INDEX `uid_wall_created` (`uid`,`wall`,`created`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TABLE tokens
|
-- TABLE tokens
|
||||||
|
@ -1020,7 +1020,7 @@ CREATE TABLE IF NOT EXISTS `tokens` (
|
||||||
`scope` varchar(200) NOT NULL DEFAULT '',
|
`scope` varchar(200) NOT NULL DEFAULT '',
|
||||||
`uid` int(11) NOT NULL DEFAULT 0,
|
`uid` int(11) NOT NULL DEFAULT 0,
|
||||||
PRIMARY KEY(`id`)
|
PRIMARY KEY(`id`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TABLE user
|
-- TABLE user
|
||||||
|
@ -1071,7 +1071,7 @@ CREATE TABLE IF NOT EXISTS `user` (
|
||||||
`openidserver` text,
|
`openidserver` text,
|
||||||
PRIMARY KEY(`uid`),
|
PRIMARY KEY(`uid`),
|
||||||
INDEX `nickname` (`nickname`(32))
|
INDEX `nickname` (`nickname`(32))
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TABLE userd
|
-- TABLE userd
|
||||||
|
@ -1081,7 +1081,7 @@ CREATE TABLE IF NOT EXISTS `userd` (
|
||||||
`username` varchar(255) NOT NULL,
|
`username` varchar(255) NOT NULL,
|
||||||
PRIMARY KEY(`id`),
|
PRIMARY KEY(`id`),
|
||||||
INDEX `username` (`username`(32))
|
INDEX `username` (`username`(32))
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TABLE workerqueue
|
-- TABLE workerqueue
|
||||||
|
@ -1094,5 +1094,5 @@ CREATE TABLE IF NOT EXISTS `workerqueue` (
|
||||||
`pid` int(11) NOT NULL DEFAULT 0,
|
`pid` int(11) NOT NULL DEFAULT 0,
|
||||||
`executed` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
|
`executed` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
|
||||||
PRIMARY KEY(`id`)
|
PRIMARY KEY(`id`)
|
||||||
) DEFAULT CHARSET=utf8mb4;
|
) DEFAULT COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
|
|
10
doc/KeyboardShortcuts.md
Normal file
10
doc/KeyboardShortcuts.md
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
Keyboard shortcuts in Friendica
|
||||||
|
=======================
|
||||||
|
|
||||||
|
* [Home](help)
|
||||||
|
|
||||||
|
General
|
||||||
|
-------
|
||||||
|
|
||||||
|
* j: Scroll to next thread
|
||||||
|
* k: Scroll to previous thread
|
|
@ -6,12 +6,10 @@ If you are the admin of a Friendica node, you have access to the so called **Adm
|
||||||
|
|
||||||
On the front page of the admin panel you will see a summary of information about your node.
|
On the front page of the admin panel you will see a summary of information about your node.
|
||||||
These information include the amount of messages currently being processed in the queues.
|
These information include the amount of messages currently being processed in the queues.
|
||||||
The first number is the number of messages being actively sent.
|
The first number is the number of messages which could not been delivered for various reasons.
|
||||||
This number should decrease quickly.
|
|
||||||
The second is the messages which could for various reasons not being delivered.
|
|
||||||
They will be resend later.
|
They will be resend later.
|
||||||
You can have a quick glance into that second queus in the "Inspect Queue" section of the admin panel.
|
You can have a quick glance into that second queus in the "Inspect Queue" section of the admin panel.
|
||||||
If you have activated the background workers, there is a third number representing the count of jobs queued for the workers.
|
The second number represents the current number of jobs for the background workers.
|
||||||
These worker tasks are prioritised and are done accordingly.
|
These worker tasks are prioritised and are done accordingly.
|
||||||
|
|
||||||
Then you get an overview of the accounts on your node, which can be moderated in the "Users" section of the panel.
|
Then you get an overview of the accounts on your node, which can be moderated in the "Users" section of the panel.
|
||||||
|
|
|
@ -14,7 +14,6 @@ Database Tables
|
||||||
| [config](help/database/db_config) | main configuration storage |
|
| [config](help/database/db_config) | main configuration storage |
|
||||||
| [contact](help/database/db_contact) | contact table |
|
| [contact](help/database/db_contact) | contact table |
|
||||||
| [conv](help/database/db_conv) | private messages |
|
| [conv](help/database/db_conv) | private messages |
|
||||||
| [deliverq](help/database/db_deliverq) | |
|
|
||||||
| [event](help/database/db_event) | Events |
|
| [event](help/database/db_event) | Events |
|
||||||
| [fcontact](help/database/db_fcontact) | friend suggestion stuff |
|
| [fcontact](help/database/db_fcontact) | friend suggestion stuff |
|
||||||
| [ffinder](help/database/db_ffinder) | friend suggestion stuff |
|
| [ffinder](help/database/db_ffinder) | friend suggestion stuff |
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
Table deliverq
|
|
||||||
==============
|
|
||||||
|
|
||||||
| Field | Description | Type | Null | Key | Default | Extra |
|
|
||||||
|---------|------------------|------------------|------|-----|---------|----------------|
|
|
||||||
| id | sequential ID | int(10) unsigned | NO | PRI | NULL | auto_increment |
|
|
||||||
| cmd | | varchar(32) | NO | | | |
|
|
||||||
| item | | int(11) | NO | | 0 | |
|
|
||||||
| contact | | int(11) | NO | | 0 | |
|
|
||||||
|
|
||||||
|
|
||||||
Return to [database documentation](help/database)
|
|
|
@ -5,17 +5,14 @@
|
||||||
Wenn du der Administrator einer Friendica Instanz bist, hast du Zugriff auf das so genannte **Admin Panel** in dem du die Friendica Instanz konfigurieren kannst,
|
Wenn du der Administrator einer Friendica Instanz bist, hast du Zugriff auf das so genannte **Admin Panel** in dem du die Friendica Instanz konfigurieren kannst,
|
||||||
|
|
||||||
Auf der Startseite des Admin Panels werden die Informationen zu der Instanz zusammengefasst.
|
Auf der Startseite des Admin Panels werden die Informationen zu der Instanz zusammengefasst.
|
||||||
Diese Informationen beinhalten die Anzahl der Nachrichten, die sich aktuell in den Warteschlangen befinden.
|
Die erste Zahl gibt die Anzahl von Nachrichten an, die nicht zugestellt werden konnten.
|
||||||
Hierbei ist die erste Zahl die Zahl der Nachrichten die gerade aktiv verteilt werden.
|
|
||||||
Diese Zahl sollte sich relativ schnell sinken.
|
|
||||||
Die zweite Zahl gibt die Anzahl von Nachrichten an, die nicht zugestellt werden konnten.
|
|
||||||
Die Zustellung wird zu einem späteren Zeitpunkt noch einmal versucht.
|
Die Zustellung wird zu einem späteren Zeitpunkt noch einmal versucht.
|
||||||
Unter dem Punkt "Warteschlange Inspizieren" kannst du einen schnellen Blick auf die zweite Warteschlange werfen.
|
Unter dem Punkt "Warteschlange Inspizieren" kannst du einen schnellen Blick auf die zweite Warteschlange werfen.
|
||||||
Solltest du für die Hintergrundprozesse die Worker aktiviert haben, wird eine dritte Zahl angezeigt.
|
Die zweite Zahl steht für die Anzahl der Aufgaben, die die Worker noch vor sich haben.
|
||||||
Diese repräsentiert die Anzahl der Aufgaben, die die Worker noch vor sich haben.
|
Die Worker arbeiten Hintergrundprozesse ab.
|
||||||
Die Aufgaben der Worker sind priorisiert und werden anhand dieser Prioritäten abgearbeitet.
|
Die Aufgaben der Worker sind priorisiert und werden anhand dieser Prioritäten abgearbeitet.
|
||||||
|
|
||||||
Des weiteren findest du eine Übersicht über die Accounts auf dem Friendica Knoten, die unter dem Punkt "Nutzer" moderiert werden können.
|
Desweiteren findest du eine Übersicht über die Accounts auf dem Friendica Knoten, die unter dem Punkt "Nutzer" moderiert werden können.
|
||||||
Sowie eine Liste der derzeit aktivierten Addons.
|
Sowie eine Liste der derzeit aktivierten Addons.
|
||||||
Diese Liste ist verlinkt, so dass du schnellen Zugriff auf die Informationsseiten der einzelnen Addons hast.
|
Diese Liste ist verlinkt, so dass du schnellen Zugriff auf die Informationsseiten der einzelnen Addons hast.
|
||||||
Abschließend findest du auf der Startseite des Admin Panels die installierte Version von Friendica.
|
Abschließend findest du auf der Startseite des Admin Panels die installierte Version von Friendica.
|
||||||
|
|
|
@ -502,7 +502,7 @@ function acl_lookup(App $a, $out_type = 'json') {
|
||||||
INNER JOIN `group_member` ON `group_member`.`gid`=`group`.`id` AND `group_member`.`uid` = `group`.`uid`
|
INNER JOIN `group_member` ON `group_member`.`gid`=`group`.`id` AND `group_member`.`uid` = `group`.`uid`
|
||||||
WHERE NOT `group`.`deleted` AND `group`.`uid` = %d
|
WHERE NOT `group`.`deleted` AND `group`.`uid` = %d
|
||||||
$sql_extra
|
$sql_extra
|
||||||
GROUP BY `group`.`name`
|
GROUP BY `group`.`name`, `group`.`id`
|
||||||
ORDER BY `group`.`name`
|
ORDER BY `group`.`name`
|
||||||
LIMIT %d,%d",
|
LIMIT %d,%d",
|
||||||
intval(local_user()),
|
intval(local_user()),
|
||||||
|
@ -610,46 +610,50 @@ function acl_lookup(App $a, $out_type = 'json') {
|
||||||
$items = array_merge($groups, $contacts);
|
$items = array_merge($groups, $contacts);
|
||||||
|
|
||||||
if ($conv_id) {
|
if ($conv_id) {
|
||||||
/* if $conv_id is set, get unknow contacts in thread */
|
/*
|
||||||
/* but first get know contacts url to filter them out */
|
* if $conv_id is set, get unknown contacts in thread
|
||||||
function _contact_link($i){ return dbesc($i['link']); }
|
* but first get known contacts url to filter them out
|
||||||
$known_contacts = array_map(_contact_link, $contacts);
|
*/
|
||||||
$unknow_contacts=array();
|
$known_contacts = array_map(
|
||||||
$r = q("SELECT `author-avatar`,`author-name`,`author-link`
|
function ($i) {
|
||||||
|
return dbesc($i['link']);
|
||||||
|
}
|
||||||
|
, $contacts);
|
||||||
|
|
||||||
|
$unknown_contacts = array();
|
||||||
|
$r = q("SELECT `author-link`
|
||||||
FROM `item` WHERE `parent` = %d
|
FROM `item` WHERE `parent` = %d
|
||||||
AND (`author-name` LIKE '%%%s%%' OR `author-link` LIKE '%%%s%%')
|
AND (`author-name` LIKE '%%%s%%' OR `author-link` LIKE '%%%s%%')
|
||||||
AND `author-link` NOT IN ('%s')
|
AND `author-link` NOT IN ('%s')
|
||||||
GROUP BY `author-link`
|
GROUP BY `author-link`, `author-avatar`, `author-name`
|
||||||
ORDER BY `author-name` ASC
|
ORDER BY `author-name` ASC
|
||||||
",
|
",
|
||||||
intval($conv_id),
|
intval($conv_id),
|
||||||
dbesc($search),
|
dbesc($search),
|
||||||
dbesc($search),
|
dbesc($search),
|
||||||
implode("','", $known_contacts)
|
implode("', '", $known_contacts)
|
||||||
);
|
);
|
||||||
if (dbm::is_result($r)){
|
if (dbm::is_result($r)) {
|
||||||
foreach ($r as $row) {
|
foreach ($r as $row) {
|
||||||
// nickname..
|
$contact = get_contact_details_by_url($row['author-link']);
|
||||||
$up = parse_url($row['author-link']);
|
|
||||||
$nick = explode("/",$up['path']);
|
if (count($contact) > 0) {
|
||||||
$nick = $nick[count($nick)-1];
|
$unknown_contacts[] = array(
|
||||||
$nick .= "@".$up['host'];
|
'type' => 'c',
|
||||||
// /nickname
|
'photo' => proxy_url($contact['micro'], false, PROXY_SIZE_MICRO),
|
||||||
$unknow_contacts[] = array(
|
'name' => htmlentities($contact['name']),
|
||||||
'type' => 'c',
|
'id' => intval($contact['cid']),
|
||||||
'photo' => proxy_url($row['author-avatar'], false, PROXY_SIZE_MICRO),
|
'network' => $contact['network'],
|
||||||
'name' => htmlentities($row['author-name']),
|
'link' => $contact['url'],
|
||||||
'id' => '',
|
'nick' => htmlentities($contact['nick'] ? : $contact['addr']),
|
||||||
'network' => 'unknown',
|
'forum' => $contact['forum']
|
||||||
'link' => $row['author-link'],
|
);
|
||||||
'nick' => htmlentities($nick),
|
}
|
||||||
'forum' => false
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$items = array_merge($items, $unknow_contacts);
|
$items = array_merge($items, $unknown_contacts);
|
||||||
$tot += count($unknow_contacts);
|
$tot += count($unknown_contacts);
|
||||||
}
|
}
|
||||||
|
|
||||||
$results = array(
|
$results = array(
|
||||||
|
|
|
@ -3064,7 +3064,7 @@ use \Friendica\Core\Config;
|
||||||
function api_fr_photos_list($type) {
|
function api_fr_photos_list($type) {
|
||||||
if (api_user()===false) throw new ForbiddenException();
|
if (api_user()===false) throw new ForbiddenException();
|
||||||
$r = q("select `resource-id`, max(scale) as scale, album, filename, type from photo
|
$r = q("select `resource-id`, max(scale) as scale, album, filename, type from photo
|
||||||
where uid = %d and album != 'Contact Photos' group by `resource-id`",
|
where uid = %d and album != 'Contact Photos' group by `resource-id`, album, filename, type",
|
||||||
intval(local_user())
|
intval(local_user())
|
||||||
);
|
);
|
||||||
$typetoext = array(
|
$typetoext = array(
|
||||||
|
@ -3099,11 +3099,14 @@ use \Friendica\Core\Config;
|
||||||
|
|
||||||
$scale = (x($_REQUEST, 'scale') ? intval($_REQUEST['scale']) : false);
|
$scale = (x($_REQUEST, 'scale') ? intval($_REQUEST['scale']) : false);
|
||||||
$scale_sql = ($scale === false ? "" : sprintf("and scale=%d",intval($scale)));
|
$scale_sql = ($scale === false ? "" : sprintf("and scale=%d",intval($scale)));
|
||||||
$data_sql = ($scale === false ? "" : "data, ");
|
$data_sql = ($scale === false ? "" : "ANY_VALUE(data) AS data,");
|
||||||
|
|
||||||
$r = q("select %s `resource-id`, `created`, `edited`, `title`, `desc`, `album`, `filename`,
|
$r = q("select %s ANY_VALUE(`resource-id`) AS `resource-id`, ANY_VALUE(`created`) AS `created`,
|
||||||
`type`, `height`, `width`, `datasize`, `profile`, min(`scale`) as minscale, max(`scale`) as maxscale
|
ANY_VALUE(`edited`) AS `edited`, ANY_VALUE(`title`) AS `title`, ANY_VALUE(`desc`) AS `desc`,
|
||||||
from photo where `uid` = %d and `resource-id` = '%s' %s group by `resource-id`",
|
ANY_VALUE(`album`) AS `album`, ANY_VALUE(`filename`) AS `filename`, ANY_VALUE(`type`) AS `type`,
|
||||||
|
ANY_VALUE(`height`) AS `height`, ANY_VALUE(`width`) AS `width`, ANY_VALUE(`datasize`) AS `datasize`,
|
||||||
|
ANY_VALUE(`profile`) AS `profile`, min(`scale`) as minscale, max(`scale`) as maxscale
|
||||||
|
from photo where `uid` = %d and `resource-id` = '%s' %s",
|
||||||
$data_sql,
|
$data_sql,
|
||||||
intval(local_user()),
|
intval(local_user()),
|
||||||
dbesc($_REQUEST['photo_id']),
|
dbesc($_REQUEST['photo_id']),
|
||||||
|
|
|
@ -20,6 +20,7 @@ class dba {
|
||||||
private $driver;
|
private $driver;
|
||||||
public $connected = false;
|
public $connected = false;
|
||||||
public $error = false;
|
public $error = false;
|
||||||
|
private $_server_info = '';
|
||||||
|
|
||||||
function __construct($server, $user, $pass, $db, $install = false) {
|
function __construct($server, $user, $pass, $db, $install = false) {
|
||||||
$a = get_app();
|
$a = get_app();
|
||||||
|
@ -103,18 +104,20 @@ class dba {
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function server_info() {
|
public function server_info() {
|
||||||
switch ($this->driver) {
|
if ($this->_server_info == '') {
|
||||||
case 'pdo':
|
switch ($this->driver) {
|
||||||
$version = $this->db->getAttribute(PDO::ATTR_SERVER_VERSION);
|
case 'pdo':
|
||||||
break;
|
$this->_server_info = $this->db->getAttribute(PDO::ATTR_SERVER_VERSION);
|
||||||
case 'mysqli':
|
break;
|
||||||
$version = $this->db->server_info;
|
case 'mysqli':
|
||||||
break;
|
$this->_server_info = $this->db->server_info;
|
||||||
case 'mysql':
|
break;
|
||||||
$version = mysql_get_server_info($this->db);
|
case 'mysql':
|
||||||
break;
|
$this->_server_info = mysql_get_server_info($this->db);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return $version;
|
return $this->_server_info;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -474,6 +477,26 @@ class dba {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Replaces ANY_VALUE() function by MIN() function,
|
||||||
|
* if the database server does not support ANY_VALUE().
|
||||||
|
*
|
||||||
|
* Considerations for Standard SQL, or MySQL with ONLY_FULL_GROUP_BY (default since 5.7.5).
|
||||||
|
* ANY_VALUE() is available from MySQL 5.7.5 https://dev.mysql.com/doc/refman/5.7/en/miscellaneous-functions.html
|
||||||
|
* A standard fall-back is to use MIN().
|
||||||
|
*
|
||||||
|
* @param string $sql An SQL string without the values
|
||||||
|
* @return string The input SQL string modified if necessary.
|
||||||
|
*/
|
||||||
|
public function any_value_fallback($sql) {
|
||||||
|
$server_info = $this->server_info();
|
||||||
|
if (version_compare($server_info, '5.7.5', '<') ||
|
||||||
|
(stripos($server_info, 'MariaDB') !== false)) {
|
||||||
|
$sql = str_ireplace('ANY_VALUE(', 'MIN(', $sql);
|
||||||
|
}
|
||||||
|
return $sql;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function printable($s) {
|
function printable($s) {
|
||||||
|
@ -514,6 +537,7 @@ function q($sql) {
|
||||||
unset($args[0]);
|
unset($args[0]);
|
||||||
|
|
||||||
if ($db && $db->connected) {
|
if ($db && $db->connected) {
|
||||||
|
$sql = $db->any_value_fallback($sql);
|
||||||
$stmt = @vsprintf($sql,$args); // Disabled warnings
|
$stmt = @vsprintf($sql,$args); // Disabled warnings
|
||||||
//logger("dba: q: $stmt", LOGGER_ALL);
|
//logger("dba: q: $stmt", LOGGER_ALL);
|
||||||
if ($stmt === false)
|
if ($stmt === false)
|
||||||
|
@ -550,6 +574,7 @@ function qu($sql) {
|
||||||
unset($args[0]);
|
unset($args[0]);
|
||||||
|
|
||||||
if ($db && $db->connected) {
|
if ($db && $db->connected) {
|
||||||
|
$sql = $db->any_value_fallback($sql);
|
||||||
$stmt = @vsprintf($sql,$args); // Disabled warnings
|
$stmt = @vsprintf($sql,$args); // Disabled warnings
|
||||||
if ($stmt === false)
|
if ($stmt === false)
|
||||||
logger('dba: vsprintf error: ' . print_r(debug_backtrace(),true), LOGGER_DEBUG);
|
logger('dba: vsprintf error: ' . print_r(debug_backtrace(),true), LOGGER_DEBUG);
|
||||||
|
|
|
@ -78,8 +78,18 @@ function update_fail($update_id, $error_message){
|
||||||
function table_structure($table) {
|
function table_structure($table) {
|
||||||
$structures = q("DESCRIBE `%s`", $table);
|
$structures = q("DESCRIBE `%s`", $table);
|
||||||
|
|
||||||
|
$full_columns = q("SHOW FULL COLUMNS FROM `%s`", $table);
|
||||||
|
|
||||||
$indexes = q("SHOW INDEX FROM `%s`", $table);
|
$indexes = q("SHOW INDEX FROM `%s`", $table);
|
||||||
|
|
||||||
|
$table_status = q("SHOW TABLE STATUS WHERE `name` = '%s'", $table);
|
||||||
|
|
||||||
|
if (dbm::is_result($table_status)) {
|
||||||
|
$table_status = $table_status[0];
|
||||||
|
} else {
|
||||||
|
$table_status = array();
|
||||||
|
}
|
||||||
|
|
||||||
$fielddata = array();
|
$fielddata = array();
|
||||||
$indexdata = array();
|
$indexdata = array();
|
||||||
|
|
||||||
|
@ -104,7 +114,6 @@ function table_structure($table) {
|
||||||
|
|
||||||
$indexdata[$index["Key_name"]][] = $column;
|
$indexdata[$index["Key_name"]][] = $column;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dbm::is_result($structures)) {
|
if (dbm::is_result($structures)) {
|
||||||
foreach ($structures AS $field) {
|
foreach ($structures AS $field) {
|
||||||
$fielddata[$field["Field"]]["type"] = $field["Type"];
|
$fielddata[$field["Field"]]["type"] = $field["Type"];
|
||||||
|
@ -125,10 +134,16 @@ function table_structure($table) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return(array("fields"=>$fielddata, "indexes"=>$indexdata));
|
if (dbm::is_result($full_columns)) {
|
||||||
|
foreach ($full_columns AS $column) {
|
||||||
|
$fielddata[$column["Field"]]["Collation"] = $column["Collation"];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return array("fields" => $fielddata, "indexes" => $indexdata, "table_status" => $table_status);
|
||||||
}
|
}
|
||||||
|
|
||||||
function print_structure($database, $charset) {
|
function print_structure($database) {
|
||||||
echo "-- ------------------------------------------\n";
|
echo "-- ------------------------------------------\n";
|
||||||
echo "-- ".FRIENDICA_PLATFORM." ".FRIENDICA_VERSION." (".FRIENDICA_CODENAME,")\n";
|
echo "-- ".FRIENDICA_PLATFORM." ".FRIENDICA_VERSION." (".FRIENDICA_CODENAME,")\n";
|
||||||
echo "-- DB_UPDATE_VERSION ".DB_UPDATE_VERSION."\n";
|
echo "-- DB_UPDATE_VERSION ".DB_UPDATE_VERSION."\n";
|
||||||
|
@ -137,7 +152,7 @@ function print_structure($database, $charset) {
|
||||||
echo "--\n";
|
echo "--\n";
|
||||||
echo "-- TABLE $name\n";
|
echo "-- TABLE $name\n";
|
||||||
echo "--\n";
|
echo "--\n";
|
||||||
db_create_table($name, $structure['fields'], $charset, true, false, $structure["indexes"]);
|
db_create_table($name, $structure['fields'], true, false, $structure["indexes"]);
|
||||||
|
|
||||||
echo "\n";
|
echo "\n";
|
||||||
}
|
}
|
||||||
|
@ -148,13 +163,7 @@ function update_structure($verbose, $action, $tables=null, $definition=null) {
|
||||||
|
|
||||||
if ($action) {
|
if ($action) {
|
||||||
Config::set('system', 'maintenance', 1);
|
Config::set('system', 'maintenance', 1);
|
||||||
Config::set('system', 'maintenance_reason', 'Database update');
|
Config::set('system', 'maintenance_reason', sprintf(t(': Database update'), dbm::date().' '.date('e')));
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($a->config["system"]["db_charset"])) {
|
|
||||||
$charset = $a->config["system"]["db_charset"];
|
|
||||||
} else {
|
|
||||||
$charset = "utf8";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$errors = false;
|
$errors = false;
|
||||||
|
@ -168,16 +177,18 @@ function update_structure($verbose, $action, $tables=null, $definition=null) {
|
||||||
$tables = q("SHOW TABLES");
|
$tables = q("SHOW TABLES");
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($tables AS $table) {
|
if (dbm::is_result($tables)) {
|
||||||
$table = current($table);
|
foreach ($tables AS $table) {
|
||||||
|
$table = current($table);
|
||||||
|
|
||||||
logger(sprintf('updating structure for table %s ...', $table), LOGGER_DEBUG);
|
logger(sprintf('updating structure for table %s ...', $table), LOGGER_DEBUG);
|
||||||
$database[$table] = table_structure($table);
|
$database[$table] = table_structure($table);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the definition
|
// Get the definition
|
||||||
if (is_null($definition)) {
|
if (is_null($definition)) {
|
||||||
$definition = db_definition($charset);
|
$definition = db_definition();
|
||||||
}
|
}
|
||||||
|
|
||||||
// MySQL >= 5.7.4 doesn't support the IGNORE keyword in ALTER TABLE statements
|
// MySQL >= 5.7.4 doesn't support the IGNORE keyword in ALTER TABLE statements
|
||||||
|
@ -194,7 +205,7 @@ function update_structure($verbose, $action, $tables=null, $definition=null) {
|
||||||
$group_by = "";
|
$group_by = "";
|
||||||
$sql3 = "";
|
$sql3 = "";
|
||||||
if (!isset($database[$name])) {
|
if (!isset($database[$name])) {
|
||||||
$r = db_create_table($name, $structure["fields"], $charset, $verbose, $action, $structure['indexes']);
|
$r = db_create_table($name, $structure["fields"], $verbose, $action, $structure['indexes']);
|
||||||
if (!dbm::is_result($r)) {
|
if (!dbm::is_result($r)) {
|
||||||
$errors .= t('Errors encountered creating database tables.').$name.EOL;
|
$errors .= t('Errors encountered creating database tables.').$name.EOL;
|
||||||
}
|
}
|
||||||
|
@ -252,17 +263,25 @@ function update_structure($verbose, $action, $tables=null, $definition=null) {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Compare the field definition
|
// Compare the field definition
|
||||||
$current_field_definition = implode(",",$database[$name]["fields"][$fieldname]);
|
$field_definition = $database[$name]["fields"][$fieldname];
|
||||||
$new_field_definition = implode(",",$parameters);
|
|
||||||
|
// Define the default collation if not given
|
||||||
|
if (!isset($parameters['Collation']) AND !is_null($field_definition['Collation'])) {
|
||||||
|
$parameters['Collation'] = 'utf8mb4_general_ci';
|
||||||
|
} else {
|
||||||
|
$parameters['Collation'] = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
$current_field_definition = implode(",", $field_definition);
|
||||||
|
$new_field_definition = implode(",", $parameters);
|
||||||
if ($current_field_definition != $new_field_definition) {
|
if ($current_field_definition != $new_field_definition) {
|
||||||
$sql2=db_modify_table_field($fieldname, $parameters);
|
$sql2 = db_modify_table_field($fieldname, $parameters);
|
||||||
if ($sql3 == "") {
|
if ($sql3 == "") {
|
||||||
$sql3 = "ALTER" . $ignore . " TABLE `".$temp_name."` ".$sql2;
|
$sql3 = "ALTER" . $ignore . " TABLE `".$temp_name."` ".$sql2;
|
||||||
} else {
|
} else {
|
||||||
$sql3 .= ", ".$sql2;
|
$sql3 .= ", ".$sql2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -288,10 +307,23 @@ function update_structure($verbose, $action, $tables=null, $definition=null) {
|
||||||
$group_by = db_group_by($indexname, $fieldnames);
|
$group_by = db_group_by($indexname, $fieldnames);
|
||||||
}
|
}
|
||||||
if ($sql2 != "") {
|
if ($sql2 != "") {
|
||||||
if ($sql3 == "")
|
if ($sql3 == "") {
|
||||||
$sql3 = "ALTER" . $ignore . " TABLE `".$temp_name."` ".$sql2;
|
$sql3 = "ALTER" . $ignore . " TABLE `".$temp_name."` ".$sql2;
|
||||||
else
|
} else {
|
||||||
$sql3 .= ", ".$sql2;
|
$sql3 .= ", ".$sql2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($database[$name]["table_status"]["Collation"])) {
|
||||||
|
if ($database[$name]["table_status"]["Collation"] != 'utf8mb4_general_ci') {
|
||||||
|
$sql2 = "DEFAULT COLLATE utf8mb4_general_ci";
|
||||||
|
|
||||||
|
if ($sql3 == "") {
|
||||||
|
$sql3 = "ALTER" . $ignore . " TABLE `".$temp_name."` ".$sql2;
|
||||||
|
} else {
|
||||||
|
$sql3 .= ", ".$sql2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -323,6 +355,8 @@ function update_structure($verbose, $action, $tables=null, $definition=null) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action) {
|
if ($action) {
|
||||||
|
Config::set('system', 'maintenance_reason', sprintf(t('%s: updating %s table.'), dbm::date().' '.date('e'), $name));
|
||||||
|
|
||||||
// Ensure index conversion to unique removes duplicates
|
// Ensure index conversion to unique removes duplicates
|
||||||
if ($is_unique) {
|
if ($is_unique) {
|
||||||
if ($ignore != "") {
|
if ($ignore != "") {
|
||||||
|
@ -376,6 +410,10 @@ function update_structure($verbose, $action, $tables=null, $definition=null) {
|
||||||
function db_field_command($parameters, $create = true) {
|
function db_field_command($parameters, $create = true) {
|
||||||
$fieldstruct = $parameters["type"];
|
$fieldstruct = $parameters["type"];
|
||||||
|
|
||||||
|
if (!is_null($parameters["Collation"])) {
|
||||||
|
$fieldstruct .= " COLLATE ".$parameters["Collation"];
|
||||||
|
}
|
||||||
|
|
||||||
if ($parameters["not null"])
|
if ($parameters["not null"])
|
||||||
$fieldstruct .= " NOT NULL";
|
$fieldstruct .= " NOT NULL";
|
||||||
|
|
||||||
|
@ -395,7 +433,7 @@ function db_field_command($parameters, $create = true) {
|
||||||
return($fieldstruct);
|
return($fieldstruct);
|
||||||
}
|
}
|
||||||
|
|
||||||
function db_create_table($name, $fields, $charset, $verbose, $action, $indexes=null) {
|
function db_create_table($name, $fields, $verbose, $action, $indexes=null) {
|
||||||
global $a, $db;
|
global $a, $db;
|
||||||
|
|
||||||
$r = true;
|
$r = true;
|
||||||
|
@ -420,7 +458,7 @@ function db_create_table($name, $fields, $charset, $verbose, $action, $indexes=n
|
||||||
|
|
||||||
$sql = implode(",\n\t", $sql_rows);
|
$sql = implode(",\n\t", $sql_rows);
|
||||||
|
|
||||||
$sql = sprintf("CREATE TABLE IF NOT EXISTS `%s` (\n\t", dbesc($name)).$sql."\n) DEFAULT CHARSET=".$charset;
|
$sql = sprintf("CREATE TABLE IF NOT EXISTS `%s` (\n\t", dbesc($name)).$sql."\n) DEFAULT COLLATE utf8mb4_general_ci";
|
||||||
if ($verbose)
|
if ($verbose)
|
||||||
echo $sql.";\n";
|
echo $sql.";\n";
|
||||||
|
|
||||||
|
@ -503,18 +541,7 @@ function db_group_by($indexname, $fieldnames) {
|
||||||
return $sql;
|
return $sql;
|
||||||
}
|
}
|
||||||
|
|
||||||
function db_index_suffix($charset, $reduce = 0) {
|
function db_definition() {
|
||||||
if ($charset != "utf8mb4") {
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
// On utf8mb4 indexes can only have a length of 191
|
|
||||||
$indexlength = 191 - $reduce;
|
|
||||||
|
|
||||||
return "(".$indexlength.")";
|
|
||||||
}
|
|
||||||
|
|
||||||
function db_definition($charset) {
|
|
||||||
|
|
||||||
$database = array();
|
$database = array();
|
||||||
|
|
||||||
|
@ -671,7 +698,7 @@ function db_definition($charset) {
|
||||||
"writable" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"),
|
"writable" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"),
|
||||||
"forum" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"),
|
"forum" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"),
|
||||||
"prv" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"),
|
"prv" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"),
|
||||||
"contact-type" => array("type" => "int(11) unsigned", "not null" => "1", "default" => "0"),
|
"contact-type" => array("type" => "int(11)", "not null" => "1", "default" => "0"),
|
||||||
"hidden" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"),
|
"hidden" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"),
|
||||||
"archive" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"),
|
"archive" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"),
|
||||||
"pending" => array("type" => "tinyint(1)", "not null" => "1", "default" => "1"),
|
"pending" => array("type" => "tinyint(1)", "not null" => "1", "default" => "1"),
|
||||||
|
@ -1658,9 +1685,7 @@ function dbstructure_run(&$argv, &$argc) {
|
||||||
set_config('system','build',DB_UPDATE_VERSION);
|
set_config('system','build',DB_UPDATE_VERSION);
|
||||||
return;
|
return;
|
||||||
case "dumpsql":
|
case "dumpsql":
|
||||||
// For the dump that is used to create the database.sql we always assume utfmb4
|
print_structure(db_definition());
|
||||||
$charset = "utf8mb4";
|
|
||||||
print_structure(db_definition($charset), $charset);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -516,7 +516,8 @@ function notifier_run(&$argv, &$argc){
|
||||||
$r0 = Diaspora::relay_list();
|
$r0 = Diaspora::relay_list();
|
||||||
}
|
}
|
||||||
|
|
||||||
$r1 = q("SELECT DISTINCT(`batch`), `id`, `name`,`network` FROM `contact` WHERE `network` = '%s'
|
$r1 = q("SELECT `batch`, ANY_VALUE(`id`) AS `id`, ANY_VALUE(`name`) AS `name`, ANY_VALUE(`network`) AS `network`
|
||||||
|
FROM `contact` WHERE `network` = '%s'
|
||||||
AND `uid` = %d AND `rel` != %d AND NOT `blocked` AND NOT `pending` AND NOT `archive` GROUP BY `batch` ORDER BY rand()",
|
AND `uid` = %d AND `rel` != %d AND NOT `blocked` AND NOT `pending` AND NOT `archive` GROUP BY `batch` ORDER BY rand()",
|
||||||
dbesc(NETWORK_DIASPORA),
|
dbesc(NETWORK_DIASPORA),
|
||||||
intval($owner['uid']),
|
intval($owner['uid']),
|
||||||
|
|
|
@ -720,11 +720,11 @@ class ostatus {
|
||||||
$conversations = q("SELECT `term`.`oid`, `term`.`url`, `term`.`uid` FROM `term`
|
$conversations = q("SELECT `term`.`oid`, `term`.`url`, `term`.`uid` FROM `term`
|
||||||
STRAIGHT_JOIN `thread` ON `thread`.`iid` = `term`.`oid` AND `thread`.`uid` = `term`.`uid`
|
STRAIGHT_JOIN `thread` ON `thread`.`iid` = `term`.`oid` AND `thread`.`uid` = `term`.`uid`
|
||||||
WHERE `term`.`type` = 7 AND `term`.`term` > '%s' AND `thread`.`mention`
|
WHERE `term`.`type` = 7 AND `term`.`term` > '%s' AND `thread`.`mention`
|
||||||
GROUP BY `term`.`url`, `term`.`uid` ORDER BY `term`.`term` DESC", dbesc($start));
|
GROUP BY `term`.`url`, `term`.`uid`, `term`.`oid`, `term`.`term` ORDER BY `term`.`term` DESC", dbesc($start));
|
||||||
} else {
|
} else {
|
||||||
$conversations = q("SELECT `oid`, `url`, `uid` FROM `term`
|
$conversations = q("SELECT `oid`, `url`, `uid` FROM `term`
|
||||||
WHERE `type` = 7 AND `term` > '%s'
|
WHERE `type` = 7 AND `term` > '%s'
|
||||||
GROUP BY `url`, `uid` ORDER BY `term` DESC", dbesc($start));
|
GROUP BY `url`, `uid`, `oid`, `term` ORDER BY `term` DESC", dbesc($start));
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($conversations AS $conversation) {
|
foreach ($conversations AS $conversation) {
|
||||||
|
|
|
@ -48,7 +48,7 @@ function photo_albums($uid, $update = false) {
|
||||||
if (!Config::get('system', 'no_count', false)) {
|
if (!Config::get('system', 'no_count', false)) {
|
||||||
/// @todo This query needs to be renewed. It is really slow
|
/// @todo This query needs to be renewed. It is really slow
|
||||||
// At this time we just store the data in the cache
|
// At this time we just store the data in the cache
|
||||||
$albums = qu("SELECT COUNT(DISTINCT `resource-id`) AS `total`, `album`
|
$albums = qu("SELECT COUNT(DISTINCT `resource-id`) AS `total`, `album`, ANY_VALUE(`created`) AS `created`
|
||||||
FROM `photo`
|
FROM `photo`
|
||||||
WHERE `uid` = %d AND `album` != '%s' AND `album` != '%s' $sql_extra
|
WHERE `uid` = %d AND `album` != '%s' AND `album` != '%s' $sql_extra
|
||||||
GROUP BY `album` ORDER BY `created` DESC",
|
GROUP BY `album` ORDER BY `created` DESC",
|
||||||
|
@ -59,9 +59,8 @@ function photo_albums($uid, $update = false) {
|
||||||
} else {
|
} else {
|
||||||
// This query doesn't do the count and is much faster
|
// This query doesn't do the count and is much faster
|
||||||
$albums = qu("SELECT DISTINCT(`album`), '' AS `total`
|
$albums = qu("SELECT DISTINCT(`album`), '' AS `total`
|
||||||
FROM `photo`
|
FROM `photo` USE INDEX (`uid_album_scale_created`)
|
||||||
WHERE `uid` = %d AND `album` != '%s' AND `album` != '%s' $sql_extra
|
WHERE `uid` = %d AND `album` != '%s' AND `album` != '%s' $sql_extra",
|
||||||
GROUP BY `album` ORDER BY `created` DESC",
|
|
||||||
intval($uid),
|
intval($uid),
|
||||||
dbesc('Contact Photos'),
|
dbesc('Contact Photos'),
|
||||||
dbesc(t('Contact Photos'))
|
dbesc(t('Contact Photos'))
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
* @todo Detect if it is a forum
|
* @todo Detect if it is a forum
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
use \Friendica\Core\Config;
|
||||||
|
|
||||||
require_once('include/datetime.php');
|
require_once('include/datetime.php');
|
||||||
require_once("include/Scrape.php");
|
require_once("include/Scrape.php");
|
||||||
require_once("include/network.php");
|
require_once("include/network.php");
|
||||||
|
@ -1656,6 +1658,20 @@ function poco_discover_federation() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Disvover Mastodon servers
|
||||||
|
if (!Config::get('system','ostatus_disabled')) {
|
||||||
|
$serverdata = fetch_url("https://instances.mastodon.xyz/instances.json");
|
||||||
|
|
||||||
|
if ($serverdata) {
|
||||||
|
$servers = json_decode($serverdata);
|
||||||
|
|
||||||
|
foreach ($servers AS $server) {
|
||||||
|
$url = (is_null($server->https_score) ? 'http' : 'https').'://'.$server->name;
|
||||||
|
proc_run(PRIORITY_LOW, "include/discover_poco.php", "server", base64_encode($url));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Currently disabled, since the service isn't available anymore.
|
// Currently disabled, since the service isn't available anymore.
|
||||||
// It is not removed since I hope that there will be a successor.
|
// It is not removed since I hope that there will be a successor.
|
||||||
// Discover GNU Social Servers.
|
// Discover GNU Social Servers.
|
||||||
|
@ -2096,7 +2112,7 @@ function update_gcontact($contact) {
|
||||||
fix_alternate_contact_address($contact);
|
fix_alternate_contact_address($contact);
|
||||||
|
|
||||||
if (!isset($contact["updated"]))
|
if (!isset($contact["updated"]))
|
||||||
$contact["updated"] = datetime_convert();
|
$contact["updated"] = dbm::date();
|
||||||
|
|
||||||
if ($contact["server_url"] == "") {
|
if ($contact["server_url"] == "") {
|
||||||
$server_url = $contact["url"];
|
$server_url = $contact["url"];
|
||||||
|
@ -2151,7 +2167,7 @@ function update_gcontact($contact) {
|
||||||
dbesc($contact["gender"]), dbesc($contact["keywords"]), intval($contact["hide"]),
|
dbesc($contact["gender"]), dbesc($contact["keywords"]), intval($contact["hide"]),
|
||||||
intval($contact["nsfw"]), intval($contact["contact-type"]), dbesc($contact["alias"]),
|
intval($contact["nsfw"]), intval($contact["contact-type"]), dbesc($contact["alias"]),
|
||||||
dbesc($contact["notify"]), dbesc($contact["url"]), dbesc($contact["location"]),
|
dbesc($contact["notify"]), dbesc($contact["url"]), dbesc($contact["location"]),
|
||||||
dbesc($contact["about"]), intval($contact["generation"]), dbesc($contact["updated"]),
|
dbesc($contact["about"]), intval($contact["generation"]), dbesc(dbm::date($contact["updated"])),
|
||||||
dbesc($contact["server_url"]), dbesc($contact["connect"]),
|
dbesc($contact["server_url"]), dbesc($contact["connect"]),
|
||||||
dbesc(normalise_link($contact["url"])), intval($contact["generation"]));
|
dbesc(normalise_link($contact["url"])), intval($contact["generation"]));
|
||||||
|
|
||||||
|
|
24
js/main.js
24
js/main.js
|
@ -322,6 +322,30 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Scroll to the next/previous thread when pressing J and K
|
||||||
|
$(document).keydown(function (event) {
|
||||||
|
var threads = $('.thread_level_1');
|
||||||
|
if ((event.keyCode === 74 || event.keyCode === 75) && !$(event.target).is('textarea, input')) {
|
||||||
|
var scrollTop = $(window).scrollTop();
|
||||||
|
if (event.keyCode === 75) {
|
||||||
|
threads = $(threads.get().reverse());
|
||||||
|
}
|
||||||
|
threads.each(function(key, item) {
|
||||||
|
var comparison;
|
||||||
|
var top = $(item).offset().top - 100;
|
||||||
|
if (event.keyCode === 74) {
|
||||||
|
comparison = top > scrollTop + 1;
|
||||||
|
} else if (event.keyCode === 75) {
|
||||||
|
comparison = top < scrollTop - 1;
|
||||||
|
}
|
||||||
|
if (comparison) {
|
||||||
|
$('html, body').animate({ scrollTop: top }, 200);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// Set an event listener for infinite scroll
|
// Set an event listener for infinite scroll
|
||||||
if(typeof infinite_scroll !== 'undefined') {
|
if(typeof infinite_scroll !== 'undefined') {
|
||||||
$(window).scroll(function(e){
|
$(window).scroll(function(e){
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
/* ACL selector json backend */
|
/* ACL selector json backend */
|
||||||
|
|
||||||
require_once("include/acl_selectors.php");
|
require_once 'include/acl_selectors.php';
|
||||||
|
|
||||||
function acl_init(App $a) {
|
function acl_init(App $a) {
|
||||||
acl_lookup($a);
|
acl_lookup($a);
|
||||||
|
|
|
@ -290,7 +290,8 @@ function admin_page_federation(App $a) {
|
||||||
foreach ($platforms as $p) {
|
foreach ($platforms as $p) {
|
||||||
// get a total count for the platform, the name and version of the
|
// get a total count for the platform, the name and version of the
|
||||||
// highest version and the protocol tpe
|
// highest version and the protocol tpe
|
||||||
$c = qu('SELECT COUNT(*) AS `total`, `platform`, `network`, `version` FROM `gserver`
|
$c = qu('SELECT COUNT(*) AS `total`, ANY_VALUE(`platform`) AS `platform`,
|
||||||
|
ANY_VALUE(`network`) AS `network`, MAX(`version`) AS `version` FROM `gserver`
|
||||||
WHERE `platform` LIKE "%s" AND `last_contact` >= `last_failure`
|
WHERE `platform` LIKE "%s" AND `last_contact` >= `last_failure`
|
||||||
ORDER BY `version` ASC;', $p);
|
ORDER BY `version` ASC;', $p);
|
||||||
$total = $total + $c[0]['total'];
|
$total = $total + $c[0]['total'];
|
||||||
|
@ -474,9 +475,6 @@ function admin_page_summary(App $a) {
|
||||||
$r = qu("SELECT COUNT(`id`) AS `count` FROM `register`");
|
$r = qu("SELECT COUNT(`id`) AS `count` FROM `register`");
|
||||||
$pending = $r[0]['count'];
|
$pending = $r[0]['count'];
|
||||||
|
|
||||||
$r = qu("SELECT COUNT(*) AS `total` FROM `deliverq` WHERE 1");
|
|
||||||
$deliverq = (($r) ? $r[0]['total'] : 0);
|
|
||||||
|
|
||||||
$r = qu("SELECT COUNT(*) AS `total` FROM `queue` WHERE 1");
|
$r = qu("SELECT COUNT(*) AS `total` FROM `queue` WHERE 1");
|
||||||
$queue = (($r) ? $r[0]['total'] : 0);
|
$queue = (($r) ? $r[0]['total'] : 0);
|
||||||
|
|
||||||
|
@ -485,7 +483,7 @@ function admin_page_summary(App $a) {
|
||||||
|
|
||||||
// We can do better, but this is a quick queue status
|
// We can do better, but this is a quick queue status
|
||||||
|
|
||||||
$queues = array('label' => t('Message queues'), 'deliverq' => $deliverq, 'queue' => $queue, 'workerq' => $workerqueue);
|
$queues = array('label' => t('Message queues'), 'queue' => $queue, 'workerq' => $workerqueue);
|
||||||
|
|
||||||
|
|
||||||
$t = get_markup_template("admin_summary.tpl");
|
$t = get_markup_template("admin_summary.tpl");
|
||||||
|
|
26
mod/manifest.php
Normal file
26
mod/manifest.php
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
<?php
|
||||||
|
use Friendica\Core\Config;
|
||||||
|
|
||||||
|
function manifest_content(App $a) {
|
||||||
|
|
||||||
|
$tpl = get_markup_template('manifest.tpl');
|
||||||
|
|
||||||
|
header('Content-type: application/manifest+json');
|
||||||
|
|
||||||
|
$touch_icon = Config::get('system', 'touch_icon', 'images/friendica-128.png');
|
||||||
|
if ($touch_icon == '') {
|
||||||
|
$touch_icon = 'images/friendica-128.png';
|
||||||
|
}
|
||||||
|
|
||||||
|
$o = replace_macros($tpl, array(
|
||||||
|
'$baseurl' => App::get_baseurl(),
|
||||||
|
'$touch_icon' => $touch_icon,
|
||||||
|
'$title' => Config::get('config', 'sitename', 'Friendica'),
|
||||||
|
));
|
||||||
|
|
||||||
|
echo $o;
|
||||||
|
|
||||||
|
killme();
|
||||||
|
|
||||||
|
}
|
||||||
|
?>
|
|
@ -349,7 +349,7 @@ function message_content(App $a) {
|
||||||
|
|
||||||
$o .= $header;
|
$o .= $header;
|
||||||
|
|
||||||
$r = q("SELECT count(*) AS `total` FROM `mail`
|
$r = q("SELECT count(*) AS `total` FROM `mail`, ANY_VALUE(`created`) AS `created`
|
||||||
WHERE `mail`.`uid` = %d GROUP BY `parent-uri` ORDER BY `created` DESC",
|
WHERE `mail`.`uid` = %d GROUP BY `parent-uri` ORDER BY `created` DESC",
|
||||||
intval(local_user())
|
intval(local_user())
|
||||||
);
|
);
|
||||||
|
@ -528,9 +528,14 @@ function message_content(App $a) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_messages($user, $lstart, $lend) {
|
function get_messages($user, $lstart, $lend) {
|
||||||
|
//TODO: rewritte with a sub-query to get the first message of each private thread with certainty
|
||||||
return q("SELECT max(`mail`.`created`) AS `mailcreated`, min(`mail`.`seen`) AS `mailseen`,
|
return q("SELECT max(`mail`.`created`) AS `mailcreated`, min(`mail`.`seen`) AS `mailseen`,
|
||||||
`mail`.* , `contact`.`name`, `contact`.`url`, `contact`.`thumb` , `contact`.`network`,
|
ANY_VALUE(`mail`.`id`), ANY_VALUE(`mail`.`uid`), ANY_VALUE(`mail`.`guid`), ANY_VALUE(`mail`.`from-name`),
|
||||||
|
ANY_VALUE(`mail`.`from-photo`), ANY_VALUE(`mail`.`from-url`), ANY_VALUE(`mail`.`contact-id`),
|
||||||
|
ANY_VALUE(`mail`.`convid`), ANY_VALUE(`mail`.`title`), ANY_VALUE(`mail`.`body`), ANY_VALUE(`mail`.`seen`),
|
||||||
|
ANY_VALUE(`mail`.`reply`), ANY_VALUE(`mail`.`replied`), ANY_VALUE(`mail`.`unknown`),
|
||||||
|
ANY_VALUE(`mail`.`uri`), ANY_VALUE(`mail`.`parent-uri`), ANY_VALUE(`mail`.`created`),
|
||||||
|
ANY_VALUE(`contact`.`name`), ANY_VALUE(`contact`.`url`), ANY_VALUE(`contact`.`thumb`), ANY_VALUE(`contact`.`network`),
|
||||||
count( * ) as count
|
count( * ) as count
|
||||||
FROM `mail` LEFT JOIN `contact` ON `mail`.`contact-id` = `contact`.`id`
|
FROM `mail` LEFT JOIN `contact` ON `mail`.`contact-id` = `contact`.`id`
|
||||||
WHERE `mail`.`uid` = %d GROUP BY `parent-uri` ORDER BY `mailcreated` DESC LIMIT %d , %d ",
|
WHERE `mail`.`uid` = %d GROUP BY `parent-uri` ORDER BY `mailcreated` DESC LIMIT %d , %d ",
|
||||||
|
|
|
@ -1240,7 +1240,9 @@ function photos_content(App $a) {
|
||||||
$order = 'DESC';
|
$order = 'DESC';
|
||||||
}
|
}
|
||||||
|
|
||||||
$r = q("SELECT `resource-id`, `id`, `filename`, type, max(`scale`) AS `scale`, `desc` FROM `photo` WHERE `uid` = %d AND `album` = '%s'
|
$r = q("SELECT `resource-id`, ANY_VALUE(`id`) AS `id`, ANY_VALUE(`filename`) AS `filename`,
|
||||||
|
ANY_VALUE(`type`) AS `type`, max(`scale`) AS `scale`, ANY_VALUE(`desc`) as `desc`
|
||||||
|
FROM `photo` WHERE `uid` = %d AND `album` = '%s'
|
||||||
AND `scale` <= 4 $sql_extra GROUP BY `resource-id` ORDER BY `created` $order LIMIT %d , %d",
|
AND `scale` <= 4 $sql_extra GROUP BY `resource-id` ORDER BY `created` $order LIMIT %d , %d",
|
||||||
intval($owner_uid),
|
intval($owner_uid),
|
||||||
dbesc($album),
|
dbesc($album),
|
||||||
|
|
|
@ -199,7 +199,7 @@ function ping_init(App $a)
|
||||||
$cachekey = "ping_init:".local_user();
|
$cachekey = "ping_init:".local_user();
|
||||||
$ev = Cache::get($cachekey);
|
$ev = Cache::get($cachekey);
|
||||||
if (is_null($ev)) {
|
if (is_null($ev)) {
|
||||||
$ev = qu("SELECT count(`event`.`id`) AS total, type, start, adjust FROM `event`
|
$ev = qu("SELECT type, start, adjust FROM `event`
|
||||||
WHERE `event`.`uid` = %d AND `start` < '%s' AND `finish` > '%s' and `ignore` = 0
|
WHERE `event`.`uid` = %d AND `start` < '%s' AND `finish` > '%s' and `ignore` = 0
|
||||||
ORDER BY `start` ASC ",
|
ORDER BY `start` ASC ",
|
||||||
intval(local_user()),
|
intval(local_user()),
|
||||||
|
@ -212,7 +212,7 @@ function ping_init(App $a)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dbm::is_result($ev)) {
|
if (dbm::is_result($ev)) {
|
||||||
$all_events = intval($ev[0]['total']);
|
$all_events = count($ev);
|
||||||
|
|
||||||
if ($all_events) {
|
if ($all_events) {
|
||||||
$str_now = datetime_convert('UTC', $a->timezone, 'now', 'Y-m-d');
|
$str_now = datetime_convert('UTC', $a->timezone, 'now', 'Y-m-d');
|
||||||
|
|
|
@ -210,7 +210,7 @@ function profile_content(App $a, $update = 0) {
|
||||||
|
|
||||||
if ($update) {
|
if ($update) {
|
||||||
|
|
||||||
$r = q("SELECT distinct(parent) AS `item_id`, `item`.`network` AS `item_network`
|
$r = q("SELECT distinct(parent) AS `item_id`, `item`.`network` AS `item_network`, `item`.`created`
|
||||||
FROM `item` INNER JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
|
FROM `item` INNER JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
|
||||||
AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
|
AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
|
||||||
WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND
|
WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND
|
||||||
|
|
|
@ -214,7 +214,7 @@ function search_content(App $a) {
|
||||||
FROM `item` %s
|
FROM `item` %s
|
||||||
WHERE %s AND (`item`.`uid` = 0 OR (`item`.`uid` = %s AND NOT `item`.`global`))
|
WHERE %s AND (`item`.`uid` = 0 OR (`item`.`uid` = %s AND NOT `item`.`global`))
|
||||||
$sql_extra
|
$sql_extra
|
||||||
GROUP BY `item`.`uri` ORDER BY `item`.`id` DESC LIMIT %d , %d",
|
GROUP BY `item`.`uri`, `item`.`id` ORDER BY `item`.`id` DESC LIMIT %d , %d",
|
||||||
item_fieldlists(), item_joins(), item_condition(),
|
item_fieldlists(), item_joins(), item_condition(),
|
||||||
intval(local_user()),
|
intval(local_user()),
|
||||||
intval($a->pager['start']), intval($a->pager['itemspage']));
|
intval($a->pager['start']), intval($a->pager['itemspage']));
|
||||||
|
|
|
@ -356,7 +356,9 @@ function videos_content(App $a) {
|
||||||
$a->set_pager_itemspage(20);
|
$a->set_pager_itemspage(20);
|
||||||
}
|
}
|
||||||
|
|
||||||
$r = q("SELECT hash, `id`, `filename`, filetype FROM `attach`
|
$r = q("SELECT hash, ANY_VALUE(`id`) AS `id`, ANY_VALUE(`created`) AS `created`,
|
||||||
|
ANY_VALUE(`filename`) AS `filename`, ANY_VALUE(`filetype`) as `filetype`
|
||||||
|
FROM `attach`
|
||||||
WHERE `uid` = %d AND filetype LIKE '%%video%%'
|
WHERE `uid` = %d AND filetype LIKE '%%video%%'
|
||||||
$sql_extra GROUP BY hash ORDER BY `created` DESC LIMIT %d , %d",
|
$sql_extra GROUP BY hash ORDER BY `created` DESC LIMIT %d , %d",
|
||||||
intval($a->data['user']['uid']),
|
intval($a->data['user']['uid']),
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
define('UPDATE_VERSION' , 1216);
|
define('UPDATE_VERSION' , 1218);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt>{{$queues.label}}</dt>
|
<dt>{{$queues.label}}</dt>
|
||||||
<dd>{{$queues.deliverq}} - <a href="{{$baseurl}}/admin/queue">{{$queues.queue}}</a> - {{$queues.workerq}}</dd>
|
<dd><a href="{{$baseurl}}/admin/queue">{{$queues.queue}}</a> - {{$queues.workerq}}</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<dl>
|
<dl>
|
||||||
<dt>{{$pending.0}}</dt>
|
<dt>{{$pending.0}}</dt>
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
<link rel="apple-touch-icon" href="{{$touch_icon}}"/>
|
<link rel="apple-touch-icon" href="{{$touch_icon}}"/>
|
||||||
|
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||||
|
<link rel="manifest" href="{{$baseurl}}/manifest" />
|
||||||
<script>
|
<script>
|
||||||
// Prevents links to switch to Safari in a home screen app - see https://gist.github.com/irae/1042167
|
// Prevents links to switch to Safari in a home screen app - see https://gist.github.com/irae/1042167
|
||||||
(function(a,b,c){if(c in b&&b[c]){var d,e=a.location,f=/^(a|html)$/i;a.addEventListener("click",function(a){d=a.target;while(!f.test(d.nodeName))d=d.parentNode;"href"in d&&(chref=d.href).replace(e.href,"").indexOf("#")&&(!/^[a-z\+\.\-]+:/i.test(chref)||chref.indexOf(e.protocol+"//"+e.host)===0)&&(a.preventDefault(),e.href=d.href)},!1)}})(document,window.navigator,"standalone");
|
(function(a,b,c){if(c in b&&b[c]){var d,e=a.location,f=/^(a|html)$/i;a.addEventListener("click",function(a){d=a.target;while(!f.test(d.nodeName))d=d.parentNode;"href"in d&&(chref=d.href).replace(e.href,"").indexOf("#")&&(!/^[a-z\+\.\-]+:/i.test(chref)||chref.indexOf(e.protocol+"//"+e.host)===0)&&(a.preventDefault(),e.href=d.href)},!1)}})(document,window.navigator,"standalone");
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="hover-card-actions-connection">
|
<div class="hover-card-actions-connection">
|
||||||
{{if $profile.actions.network}}<a class="btn btn-labeled btn-primary btn-sm" href="{{$profile.actions.network.1}}" title="{{$profile.actions.network.0}}"><i class="fa fa-cloud" aria-hidden="true"></i></a>{{/if}}
|
{{if $profile.actions.network}}<a class="btn btn-labeled btn-primary btn-sm" href="{{$profile.actions.network.1}}" title="{{$profile.actions.network.0}}"><i class="fa fa-cloud" aria-hidden="true"></i></a>{{/if}}
|
||||||
{{if $profile.actions.edit}}<a class="btn btn-labeled btn-primary btn-sm" href="{{$profile.actions.edit.1}}" title="{{$profile.actions.edit.0}}"><i class="fa fa-pencil" aria-hidden="true"></i></a>{{/if}}
|
{{if $profile.actions.edit}}<a class="btn btn-labeled btn-primary btn-sm" href="{{$profile.actions.edit.1}}" title="{{$profile.actions.edit.0}}"><i class="fa fa-user" aria-hidden="true"></i></a>{{/if}}
|
||||||
{{if $profile.actions.follow}}<a class="btn btn-labeled btn-primary btn-sm" href="{{$profile.actions.follow.1}}" title="{{$profile.actions.follow.0}}"><i class="fa fa-user-plus" aria-hidden="true"></i></a>{{/if}}
|
{{if $profile.actions.follow}}<a class="btn btn-labeled btn-primary btn-sm" href="{{$profile.actions.follow.1}}" title="{{$profile.actions.follow.0}}"><i class="fa fa-user-plus" aria-hidden="true"></i></a>{{/if}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
9
view/templates/manifest.tpl
Normal file
9
view/templates/manifest.tpl
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"name": "{{$title}}",
|
||||||
|
"start_url": "{{$baseurl}}",
|
||||||
|
"display": "standalone",
|
||||||
|
"description": "A Decentralized Social Network",
|
||||||
|
"icons": [{
|
||||||
|
"src": "{{$baseurl}}/{{$touch_icon}}"
|
||||||
|
}]
|
||||||
|
}
|
|
@ -42,7 +42,6 @@
|
||||||
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="media-body">
|
<div class="media-body">
|
||||||
|
@ -51,7 +50,7 @@
|
||||||
{{if $contact.photo_menu.pm }}<button type="button" class="contact-action-link btn-link" onclick="addToModal('{{$contact.photo_menu.pm.1}}')" data-toggle="tooltip" title="{{$contact.photo_menu.pm.0}}"><i class="fa fa-envelope" aria-hidden="true"></i></button>{{/if}}
|
{{if $contact.photo_menu.pm }}<button type="button" class="contact-action-link btn-link" onclick="addToModal('{{$contact.photo_menu.pm.1}}')" data-toggle="tooltip" title="{{$contact.photo_menu.pm.0}}"><i class="fa fa-envelope" aria-hidden="true"></i></button>{{/if}}
|
||||||
{{if $contact.photo_menu.poke }}<button type="button" class="contact-action-link btn-link" onclick="addToModal('{{$contact.photo_menu.poke.1}}')" data-toggle="tooltip" title="{{$contact.photo_menu.poke.0}}"><i class="fa fa-heartbeat" aria-hidden="true"></i></button>{{/if}}
|
{{if $contact.photo_menu.poke }}<button type="button" class="contact-action-link btn-link" onclick="addToModal('{{$contact.photo_menu.poke.1}}')" data-toggle="tooltip" title="{{$contact.photo_menu.poke.0}}"><i class="fa fa-heartbeat" aria-hidden="true"></i></button>{{/if}}
|
||||||
{{if $contact.photo_menu.network}}<a class="contact-action-link btn-link" href="{{$contact.photo_menu.network.1}}" data-toggle="tooltip" title="{{$contact.photo_menu.network.0}}"><i class="fa fa-cloud" aria-hidden="true"></i></a>{{/if}}
|
{{if $contact.photo_menu.network}}<a class="contact-action-link btn-link" href="{{$contact.photo_menu.network.1}}" data-toggle="tooltip" title="{{$contact.photo_menu.network.0}}"><i class="fa fa-cloud" aria-hidden="true"></i></a>{{/if}}
|
||||||
{{if $contact.photo_menu.edit }}<a class="contact-action-link btn-link" href="{{$contact.photo_menu.edit.1}}" data-toggle="tooltip" title="{{$contact.photo_menu.edit.0}}"><i class="fa fa-pencil" aria-hidden="true"></i></a>{{/if}}
|
{{if $contact.photo_menu.edit }}<a class="contact-action-link btn-link" href="{{$contact.photo_menu.edit.1}}" data-toggle="tooltip" title="{{$contact.photo_menu.edit.0}}"><i class="fa fa-user" aria-hidden="true"></i></a>{{/if}}
|
||||||
{{if $contact.photo_menu.drop }}<button type="button" class="contact-action-link btn-link" onclick="addToModal('{{$contact.photo_menu.drop.1}}')" data-toggle="tooltip" title="{{$contact.photo_menu.drop.0}}"><i class="fa fa-user-times" aria-hidden="true"></i></button>{{/if}}
|
{{if $contact.photo_menu.drop }}<button type="button" class="contact-action-link btn-link" onclick="addToModal('{{$contact.photo_menu.drop.1}}')" data-toggle="tooltip" title="{{$contact.photo_menu.drop.0}}"><i class="fa fa-user-times" aria-hidden="true"></i></button>{{/if}}
|
||||||
{{if $contact.photo_menu.follow }}<a class="contact-action-link btn-link" href="{{$contact.photo_menu.follow.1}}" data-toggle="tooltip" title="{{$contact.photo_menu.follow.0}}"><i class="fa fa-user-plus" aria-hidden="true"></i></a>{{/if}}
|
{{if $contact.photo_menu.follow }}<a class="contact-action-link btn-link" href="{{$contact.photo_menu.follow.1}}" data-toggle="tooltip" title="{{$contact.photo_menu.follow.0}}"><i class="fa fa-user-plus" aria-hidden="true"></i></a>{{/if}}
|
||||||
{{if $contact.photo_menu.hide }}<a class="contact-action-link btn-link" href="{{$contact.photo_menu.hide.1}}" data-toggle="tooltip" title="{{$contact.photo_menu.hide.0}}"><i class="fa fa-times" aria-hidden="true"></i></a>{{/if}}
|
{{if $contact.photo_menu.hide }}<a class="contact-action-link btn-link" href="{{$contact.photo_menu.hide.1}}" data-toggle="tooltip" title="{{$contact.photo_menu.hide.0}}"><i class="fa fa-times" aria-hidden="true"></i></a>{{/if}}
|
||||||
|
|
|
@ -41,6 +41,7 @@
|
||||||
<link rel="apple-touch-icon" href="{{$touch_icon}}"/>
|
<link rel="apple-touch-icon" href="{{$touch_icon}}"/>
|
||||||
|
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||||
|
<link rel="manifest" href="{{$baseurl}}/manifest" />
|
||||||
<script>
|
<script>
|
||||||
// Prevents links to switch to Safari in a home screen app - see https://gist.github.com/irae/1042167
|
// Prevents links to switch to Safari in a home screen app - see https://gist.github.com/irae/1042167
|
||||||
(function(a,b,c){if(c in b&&b[c]){var d,e=a.location,f=/^(a|html)$/i;a.addEventListener("click",function(a){d=a.target;while(!f.test(d.nodeName))d=d.parentNode;"href"in d&&(chref=d.href).replace(e.href,"").indexOf("#")&&(!/^[a-z\+\.\-]+:/i.test(chref)||chref.indexOf(e.protocol+"//"+e.host)===0)&&(a.preventDefault(),e.href=d.href)},!1)}})(document,window.navigator,"standalone");
|
(function(a,b,c){if(c in b&&b[c]){var d,e=a.location,f=/^(a|html)$/i;a.addEventListener("click",function(a){d=a.target;while(!f.test(d.nodeName))d=d.parentNode;"href"in d&&(chref=d.href).replace(e.href,"").indexOf("#")&&(!/^[a-z\+\.\-]+:/i.test(chref)||chref.indexOf(e.protocol+"//"+e.host)===0)&&(a.preventDefault(),e.href=d.href)},!1)}})(document,window.navigator,"standalone");
|
||||||
|
|
Loading…
Reference in a new issue