diff --git a/CHANGELOG b/CHANGELOG
index a3a974eb62..a37ed76f59 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,10 +1,64 @@
+Version 3.5.2 (2017-06-06)
+ Friendica Core:
+ Updates to the translations (DE, EN-GB, EN-US, ES, IT, PT-BR, RU) [translation teams]
+ Updates to the documentation [annando, beardyunixer, rabuzarus, tobiasd]
+ Updated the nginx example configuration [beardyunixer]
+ Code revision and refactoring [annando, hypolite, Quix0r, rebeka-catalina]
+ Background process is now done by the new worker process [annando]
+ Added support of Composer for dependencies [Hypolite]
+ Added support of Web app manifests [Rudloff]
+ Added basic robot.txt functionality if none exists [Shnoulle]
+ Added server blocklist [Hypolite, tobiasd]
+ Removed mcrypt dependency [annando]
+ Removed unused libraries [annando]
+ Removed Embedly integration [Hypolite]
+ Fixed a bug in the language detection for EN [Hypolite]
+ Fixed a bug in the probing mechanism on old PHP version [annando]
+ Improved API [annando, gerhard6380]
+ Improved Diaspora federation [annando]
+ Improved Mastodon federation [annando, Hypolite]
+ Improved import from OStatus threads [annando]
+ Improved the themes (frio, quattro) [fabrixxm, Hypolite, rabuzarus, Rudloff, strk, tobiasd]
+ Improved maintenance mode [annando]
+ Improved gcontact handling [annando]
+ Improved desktop notifications [rabuzarus]
+ Improved keyboard shortcuts for navigation [Rudloff]
+ Improved the installer [annando]
+ Improved openid handling [strk]
+ Improved php7 support [annando]
+ Improved display of notifications [annando]
+ Improved logging mechanism [beardyunixer]
+ Improved the worker [annando]
+ Behaviour clarification of the group filter / new tab [annando]
+ Old options for the pager and share element were removed [annando]
+ Support of PDO was added [annando]
+ Improved error logging for issues with the database [annando]
+ Improved compatibility to MySQL version 5.7+ [annando]
+
+ Friendica Addons:
+ Updates to the translation (RU) [pztrm]
+ (core) Fix blocking issue for Communityhome [annando]
+ Pledgie addon was updated to remove cert problems [tobiasd]
+ Securemail now uses openpgp-php and phpseclib [fabrixxm]
+ Superblock Configuration [tobiasd]
+ Twitter Connector updated to use with new deletion method [annando]
+
+ Closed Issues:
+ 1626, 1720, 2432, 2792, 2833, 2364, 2448, 2496, 2690, 2752, 2775,
+ 2803, 2956, 2957, 2961, 2971, 2995, 2999, 3011, 3053, 3107, 3114,
+ 3134, 3138, 3142, 3157, 3172, 3189, 3194, 3195, 3198, 3206, 3215,
+ 3217, 3220, 3237, 3242, 3255, 3256, 3260, 3268, 3273, 3274, 3285,
+ 3288, 3292, 3293, 3300, 3314, 3316, 3317, 3322, 3325, 3327, 3328,
+ 3331, 3334, 3336, 3346, 3347, 3358, 3359, 3383, 3387, 3401, 3406,
+ 3428, 3440, 3435, 3436, 3452
+
Version 3.5.1 (2017-03-12)
Friendica Core:
Updates to the translations (BG, CA, CS, DE, EO, ES, FR, IS, IT, NL, PL, PT-BR, RU, SV) [translation teams]
- Fix for a potential XSS vector [heluecht, thanks to Vít Šesták 'v6ak' for reporting the problem]
+ Fix for a potential XSS vector [annando, thanks to Vít Šesták 'v6ak' for reporting the problem]
Fix for ghost request notifications on single user instances [Hypolite]
Fix user language selection [tobiasd]
- Fix a problem with communication to Diaspora with set posting locations [heluecht]
+ Fix a problem with communication to Diaspora with set posting locations [annando]
Fix schema handling of direct links to a original posting [Rabuzarus]
Fix a bug in notification handling [Rabuzarus]
Adjustments for the Vagrant VM settings [silke, eelcomaljaars]
@@ -12,22 +66,22 @@ Version 3.5.1 (2017-03-12)
Improvements to the API and Friendica specific extensions [gerhard6380]
Improvements to the Browser Notification functionality [Hypolite]
Improvements to the themes [Hypolite, rabuzarus, rebeka-catalina, tobiasd]
- Improvements to the database handling [heluecht]
+ Improvements to the database handling [annando]
Improvements to the admin panel [tobiasd, Hypolite]
- Improvements to the update process [heluecht]
- Improvements to the handling of worker processes [heluecht]
- Improvements to the performance [heluecht, Hypolite]
+ Improvements to the update process [annando]
+ Improvements to the handling of worker processes [annando]
+ Improvements to the performance [annando, Hypolite]
Improvements to the documentation [Hypolite, tobiasd, rabuzarus, beardyunixer, eelcomaljaars]
Improvements to the BBCode / Markdown conversation [Hypolite]
- Improvements to the OStatus protocol implementation [heluecht]
+ Improvements to the OStatus protocol implementation [annando]
Improvements to the installation wizzard [tobiasd]
- Improvements to the Diaspora connectivity [heluecht, Hypolite]
+ Improvements to the Diaspora connectivity [annando, Hypolite]
Work on PHP7 compatibility [ddorian1]
Code cleanup [Hypolite, Quix0r]
- Initial federation with Mastodon [heluecht]
- The worker process can now also be started from the frontend [heluecht]
- Deletion of postings is now done in the background [heluecht]
- Extension of the DFRN transmitted information fields [heluecht]
+ Initial federation with Mastodon [annando]
+ The worker process can now also be started from the frontend [annando]
+ Deletion of postings is now done in the background [annando]
+ Extension of the DFRN transmitted information fields [annando]
Translations of the core are now in /view/lang [Hypolite, tobiasd]
Update of the fullCalendar library to 3.0.1 and adjusting the themes [rabuzarus]
ping now works with JSON as well [Hypolite]
@@ -46,16 +100,16 @@ Version 3.5.1 (2017-03-12)
Updates to the translations (DE, ES, FR, IT, PT-BR) [translation teams]
Improvements to the IFTTT addon [Hypolite]
Improvements to the language filter addon [strk]
- Improvements to the pump.io bridge [heluecht]
- Improvements to the jappixmini addon [heluecht]
- Improvements to the gpluspost addon [heluecht]
- Improvements to the performance of the Twitter bridge when using workers [heluecht]
- Diaspora Export addon is now working again [heluecht]
+ Improvements to the pump.io bridge [annando]
+ Improvements to the jappixmini addon [annando]
+ Improvements to the gpluspost addon [annando]
+ Improvements to the performance of the Twitter bridge when using workers [annando]
+ Diaspora Export addon is now working again [annando]
Pledgie badge now uses https protocol for embedding [tobiasd]
- Better posting loop prevention for the Google+/Twitter/GS connectors [heluecht]
+ Better posting loop prevention for the Google+/Twitter/GS connectors [annando]
One can now configure the message for wppost bridged blog postings [tobiasd]
- On some pages the result of the Rendertime is not shown anymore [heluecht]
- Twitter-bridge now supports quotes and long posts when importing tweets [heluecht]
+ On some pages the result of the Rendertime is not shown anymore [annando]
+ Twitter-bridge now supports quotes and long posts when importing tweets [annando]
Closed Issues
1019, 1163, 1612, 1613, 2103, 2177, 2252, 2260, 2403, 2991, 2614,
@@ -67,48 +121,48 @@ Version 3.5.1 (2017-03-12)
Version 3.5 (2016-09-13)
Friendica Core:
- NEW Optional local directory with possible federated contacts [heluecht]
+ NEW Optional local directory with possible federated contacts [annando]
NEW Autocompletion for @-mentions and BBCode tags [rabuzarus]
NEW Added a composer derived autoloader which allows composer autoloaders in addons/libraries [fabrixxm]
- NEW theme: frio [rabuzarus, heluecht, fabrixxm]
+ NEW theme: frio [rabuzarus, annando, fabrixxm]
Enhance .htaccess file (nerdoc, dissolve)
Updates to the translations (DE, ES, IS, IT, RU) [translation teams]
- Updates to the documentation [tobiasd, heluecht, mexcon, silke, rabuzarus, fabrixxm, Olivier Mehani, gerhard6380, ben utzer]
- Extended the BBCode by [abstract] tag used for bridged postings to networks with limited character length [heluecht]
- Code cleanup [heluecht, QuixOr]
- Improvements to the API and Friendica specific extensions [heluecht, fabrixxm, gerhard6380]
+ Updates to the documentation [tobiasd, annando, mexcon, silke, rabuzarus, fabrixxm, Olivier Mehani, gerhard6380, ben utzer]
+ Extended the BBCode by [abstract] tag used for bridged postings to networks with limited character length [annando]
+ Code cleanup [annando, QuixOr]
+ Improvements to the API and Friendica specific extensions [annando, fabrixxm, gerhard6380]
Improvements to the RSS/Atom feed import [mexcon]
- Improvements to the communication with federated networks (Diaspora, Hubzilla, OStatus) [heluecht]
- Improvements on the themes (quattro, vier, frost) [rabuzarus, fabrixxm, stieben, heluecht, Quix0r, tobiasd]
+ Improvements to the communication with federated networks (Diaspora, Hubzilla, OStatus) [annando]
+ Improvements on the themes (quattro, vier, frost) [rabuzarus, fabrixxm, stieben, annando, Quix0r, tobiasd]
Improvements to the ACL dialog [fabrixxm, rabuzarus]
- Improvements to the database structure and optimization of queries [heluecht]
- Improvements to the UI (contacts, hotkeys, remember me, ARIA, code hightlighting) [rabuzarus, heluecht, tobiasd]
- Improvements to the background process (poller, worker) [heluecht]
- Improvements to the admin panel [tobiasd, heluecht, fabrixxm]
- Improvements to the performance [heluecht]
+ Improvements to the database structure and optimization of queries [annando]
+ Improvements to the UI (contacts, hotkeys, remember me, ARIA, code hightlighting) [rabuzarus, annando, tobiasd]
+ Improvements to the background process (poller, worker) [annando]
+ Improvements to the admin panel [tobiasd, annando, fabrixxm]
+ Improvements to the performance [annando]
Improvements to the installation wizzard (language selection, RINO version, check required PHP modules, default theme is now vier) [tobiasd]
- Improvements to the relocation of nodes and accounts [heluecht]
- Improvements to the DDoS detection [heluecht]
- Improvements to the calendar/events module [heluecht, rabuzarus]
+ Improvements to the relocation of nodes and accounts [annando]
+ Improvements to the DDoS detection [annando]
+ Improvements to the calendar/events module [annando, rabuzarus]
Improvements to OpenID login [strk]
Improvements to the ShaShape font [andi]
- Reworked the implementation of the DFRN, Diaspora protocols [heluecht]
- Reworked the notifications code [fabrixxm, rabuzarus, heluecht]
+ Reworked the implementation of the DFRN, Diaspora protocols [annando]
+ Reworked the notifications code [fabrixxm, rabuzarus, annando]
Reworked the p/config code [fabrixxm, rabuzarus]
- Reworked XML generation [heluecht]
- Removed now unused simplepie from library [heluecht]
+ Reworked XML generation [annando]
+ Removed now unused simplepie from library [annando]
Friendica Addons
Updated to the translations (DE, ES, IS, NL, PT BR), [translation teams]
Piwik [tobiasd]
- Twitter Connector [heluecht]
- Pumpio Connector [heluecht]
- Rendertime [heluecht]
- wppost [heluecht]
+ Twitter Connector [annando]
+ Pumpio Connector [annando]
+ Rendertime [annando]
+ wppost [annando]
showmore [rabuzarus]
- fromgplus [heluecht]
- app.net Connector [heluecht]
- GNU Social Connector [heluecht]
+ fromgplus [annando]
+ app.net Connector [annando]
+ GNU Social Connector [annando]
LDAP [Olivier Mehani]
smileybutton [rabuzarus]
retriver [mexon]
diff --git a/INSTALL.txt b/INSTALL.txt
index 81dfdfd272..c42c089716 100644
--- a/INSTALL.txt
+++ b/INSTALL.txt
@@ -71,9 +71,14 @@ write or create files in your web directory, create an empty file called
.htconfig.php and make it writable by the web server.
5. Visit your website with a web browser and follow the instructions. Please
-note any error messages and correct these before continuing. If you are using
-SSL with a known signature authority (recommended), use the https: link to your
-website. If you are using a self-signed cert or no cert, use the http: link.
+note any error messages and correct these before continuing.
+
+If you are using SSL with a known signature authority (recommended), use the
+https: link to your website. If you are using a self-signed cert or no cert,
+use the http: link.
+
+If you need to specify a port for the connection to the database, you can do
+so in the host name setting for the database.
6. *If* the automated installation fails for any reason, check the following:
diff --git a/VERSION b/VERSION
index ded27b074d..b35d44161c 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-3.5.2-dev
+3.5.3-dev
diff --git a/boot.php b/boot.php
index e3fb320ac5..5417e0fa23 100644
--- a/boot.php
+++ b/boot.php
@@ -35,12 +35,13 @@ require_once 'include/features.php';
require_once 'include/identity.php';
require_once 'update.php';
require_once 'include/dbstructure.php';
+require_once 'include/poller.php';
define ( 'FRIENDICA_PLATFORM', 'Friendica');
define ( 'FRIENDICA_CODENAME', 'Asparagus');
-define ( 'FRIENDICA_VERSION', '3.5.2-dev' );
+define ( 'FRIENDICA_VERSION', '3.5.3-dev' );
define ( 'DFRN_PROTOCOL_VERSION', '2.23' );
-define ( 'DB_UPDATE_VERSION', 1224 );
+define ( 'DB_UPDATE_VERSION', 1229 );
/**
* @brief Constant with a HTML line break.
@@ -457,6 +458,13 @@ if (!defined("SIGTERM")) {
define("SIGTERM", 15);
}
+/**
+ * Depending on the PHP version this constant does exist - or not.
+ * See here: http://php.net/manual/en/curl.constants.php#117928
+ */
+if (!defined('CURLE_OPERATION_TIMEDOUT')) {
+ define('CURLE_OPERATION_TIMEDOUT', CURLE_OPERATION_TIMEOUTED);
+}
/**
*
* Reverse the effect of magic_quotes_gpc if it is enabled.
@@ -985,7 +993,7 @@ function notice($s) {
function info($s) {
$a = get_app();
- if (local_user() AND get_pconfig(local_user(), 'system', 'ignore_info')) {
+ if (local_user() && get_pconfig(local_user(), 'system', 'ignore_info')) {
return;
}
@@ -1055,7 +1063,7 @@ function proc_run($cmd) {
$arr = array('args' => $args, 'run_cmd' => true);
call_hooks("proc_run", $arr);
- if (!$arr['run_cmd'] OR ! count($args)) {
+ if (!$arr['run_cmd'] || ! count($args)) {
return;
}
@@ -1088,18 +1096,8 @@ function proc_run($cmd) {
return;
}
- // Checking number of workers
- $workers = q("SELECT COUNT(*) AS `workers` FROM `workerqueue` WHERE `executed` > '%s'", dbesc(NULL_DATE));
-
- // Get number of allowed number of worker threads
- $queues = intval(get_config("system", "worker_queues"));
-
- if ($queues == 0) {
- $queues = 4;
- }
-
// If there are already enough workers running, don't fork another one
- if ($workers[0]["workers"] >= $queues) {
+ if (poller_too_much_workers()) {
return;
}
@@ -1375,7 +1373,7 @@ function get_server() {
$server = get_config("system", "directory");
if ($server == "") {
- $server = "http://dir.friendi.ca";
+ $server = "http://dir.friendica.social";
}
return($server);
@@ -1409,7 +1407,7 @@ function clear_cache($basepath = "", $path = "") {
$path = $basepath;
}
- if (($path == "") OR (!is_dir($path))) {
+ if (($path == "") || (!is_dir($path))) {
return;
}
@@ -1426,10 +1424,10 @@ function clear_cache($basepath = "", $path = "") {
if ($dh = opendir($path)) {
while (($file = readdir($dh)) !== false) {
$fullpath = $path . "/" . $file;
- if ((filetype($fullpath) == "dir") and ($file != ".") and ($file != "..")) {
+ if ((filetype($fullpath) == "dir") && ($file != ".") && ($file != "..")) {
clear_cache($basepath, $fullpath);
}
- if ((filetype($fullpath) == "file") and (filectime($fullpath) < (time() - $cachetime))) {
+ if ((filetype($fullpath) == "file") && (filectime($fullpath) < (time() - $cachetime))) {
unlink($fullpath);
}
}
@@ -1446,7 +1444,7 @@ function get_itemcachepath() {
}
$itemcache = get_config('system', 'itemcache');
- if (($itemcache != "") AND App::directory_usable($itemcache)) {
+ if (($itemcache != "") && App::directory_usable($itemcache)) {
return $itemcache;
}
@@ -1473,7 +1471,7 @@ function get_itemcachepath() {
*/
function get_spoolpath() {
$spoolpath = get_config('system', 'spoolpath');
- if (($spoolpath != "") AND App::directory_usable($spoolpath)) {
+ if (($spoolpath != "") && App::directory_usable($spoolpath)) {
// We have a spool path and it is usable
return $spoolpath;
}
@@ -1508,7 +1506,7 @@ function get_temppath() {
$temppath = get_config("system", "temppath");
- if (($temppath != "") AND App::directory_usable($temppath)) {
+ if (($temppath != "") && App::directory_usable($temppath)) {
// We have a temp path and it is usable
return $temppath;
}
@@ -1517,7 +1515,7 @@ function get_temppath() {
$temppath = sys_get_temp_dir();
// Check if it is usable
- if (($temppath != "") AND App::directory_usable($temppath)) {
+ if (($temppath != "") && App::directory_usable($temppath)) {
// To avoid any interferences with other systems we create our own directory
$new_temppath = $temppath . "/" . $a->get_hostname();
if (!is_dir($new_temppath)) {
@@ -1640,7 +1638,7 @@ function argv($x) {
function infinite_scroll_data($module) {
if (get_pconfig(local_user(), 'system', 'infinite_scroll')
- AND ($module == "network") AND ($_GET["mode"] != "minimal")) {
+ && ($module == "network") && ($_GET["mode"] != "minimal")) {
// get the page number
if (is_string($_GET["page"])) {
@@ -1653,12 +1651,12 @@ function infinite_scroll_data($module) {
// try to get the uri from which we load the content
foreach ($_GET AS $param => $value) {
- if (($param != "page") AND ($param != "q")) {
+ if (($param != "page") && ($param != "q")) {
$reload_uri .= "&" . $param . "=" . urlencode($value);
}
}
- if (($a->page_offset != "") AND ! strstr($reload_uri, "&offset=")) {
+ if (($a->page_offset != "") && ! strstr($reload_uri, "&offset=")) {
$reload_uri .= "&offset=" . urlencode($a->page_offset);
}
diff --git a/database.sql b/database.sql
index 73547b3058..7f7e975e72 100644
--- a/database.sql
+++ b/database.sql
@@ -1,6 +1,6 @@
-- ------------------------------------------
--- Friendica 3.5.2-dev (Asparagus)
--- DB_UPDATE_VERSION 1221
+-- Friendica 3.5.3dev (Asparagus)
+-- DB_UPDATE_VERSION 1228
-- ------------------------------------------
@@ -193,7 +193,7 @@ CREATE TABLE IF NOT EXISTS `contact` (
--
CREATE TABLE IF NOT EXISTS `conv` (
`id` int(10) unsigned NOT NULL auto_increment,
- `guid` varchar(64) NOT NULL DEFAULT '',
+ `guid` varchar(255) NOT NULL DEFAULT '',
`recips` text,
`uid` int(11) NOT NULL DEFAULT 0,
`creator` varchar(255) NOT NULL DEFAULT '',
@@ -270,7 +270,7 @@ CREATE TABLE IF NOT EXISTS `fcontact` (
`updated` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
PRIMARY KEY(`id`),
INDEX `addr` (`addr`(32)),
- INDEX `url` (`url`)
+ UNIQUE INDEX `url` (`url`(190))
) DEFAULT COLLATE utf8mb4_general_ci;
--
@@ -355,7 +355,7 @@ CREATE TABLE IF NOT EXISTS `gcontact` (
`generation` tinyint(3) NOT NULL DEFAULT 0,
`server_url` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY(`id`),
- INDEX `nurl` (`nurl`(64)),
+ UNIQUE INDEX `nurl` (`nurl`(190)),
INDEX `name` (`name`(64)),
INDEX `nick` (`nick`(32)),
INDEX `addr` (`addr`(64)),
@@ -425,7 +425,7 @@ CREATE TABLE IF NOT EXISTS `gserver` (
`last_contact` datetime DEFAULT '0001-01-01 00:00:00',
`last_failure` datetime DEFAULT '0001-01-01 00:00:00',
PRIMARY KEY(`id`),
- INDEX `nurl` (`nurl`(32))
+ UNIQUE INDEX `nurl` (`nurl`(190))
) DEFAULT COLLATE utf8mb4_general_ci;
--
@@ -544,6 +544,7 @@ CREATE TABLE IF NOT EXISTS `item` (
INDEX `uid_parenturi` (`uid`,`parent-uri`(190)),
INDEX `uid_contactid_created` (`uid`,`contact-id`,`created`),
INDEX `authorid_created` (`author-id`,`created`),
+ INDEX `ownerid` (`owner-id`),
INDEX `uid_uri` (`uid`,`uri`(190)),
INDEX `resource-id` (`resource-id`),
INDEX `contactid_allowcid_allowpid_denycid_denygid` (`contact-id`,`allow_cid`(10),`allow_gid`(10),`deny_cid`(10),`deny_gid`(10)),
@@ -579,7 +580,7 @@ CREATE TABLE IF NOT EXISTS `locks` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(128) NOT NULL DEFAULT '',
`locked` tinyint(1) NOT NULL DEFAULT 0,
- `created` datetime DEFAULT '0001-01-01 00:00:00',
+ `pid` int(10) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY(`id`)
) DEFAULT COLLATE utf8mb4_general_ci;
@@ -589,7 +590,7 @@ CREATE TABLE IF NOT EXISTS `locks` (
CREATE TABLE IF NOT EXISTS `mail` (
`id` int(10) unsigned NOT NULL auto_increment,
`uid` int(10) unsigned NOT NULL DEFAULT 0,
- `guid` varchar(64) NOT NULL DEFAULT '',
+ `guid` varchar(255) NOT NULL DEFAULT '',
`from-name` varchar(255) NOT NULL DEFAULT '',
`from-photo` varchar(255) NOT NULL DEFAULT '',
`from-url` varchar(255) NOT NULL DEFAULT '',
@@ -608,7 +609,8 @@ CREATE TABLE IF NOT EXISTS `mail` (
INDEX `uid_seen` (`uid`,`seen`),
INDEX `convid` (`convid`),
INDEX `uri` (`uri`(64)),
- INDEX `parent-uri` (`parent-uri`(64))
+ INDEX `parent-uri` (`parent-uri`(64)),
+ INDEX `contactid` (`contact-id`)
) DEFAULT COLLATE utf8mb4_general_ci;
--
@@ -746,6 +748,7 @@ CREATE TABLE IF NOT EXISTS `photo` (
`deny_cid` mediumtext,
`deny_gid` mediumtext,
PRIMARY KEY(`id`),
+ INDEX `contactid` (`contact-id`),
INDEX `uid_contactid` (`uid`,`contact-id`),
INDEX `uid_profile` (`uid`,`profile`),
INDEX `uid_album_scale_created` (`uid`,`album`(32),`scale`,`created`),
@@ -1019,6 +1022,9 @@ CREATE TABLE IF NOT EXISTS `thread` (
INDEX `uid_network_created` (`uid`,`network`,`created`),
INDEX `uid_contactid_commented` (`uid`,`contact-id`,`commented`),
INDEX `uid_contactid_created` (`uid`,`contact-id`,`created`),
+ INDEX `contactid` (`contact-id`),
+ INDEX `ownerid` (`owner-id`),
+ INDEX `authorid` (`author-id`),
INDEX `uid_created` (`uid`,`created`),
INDEX `uid_commented` (`uid`,`commented`),
INDEX `uid_wall_created` (`uid`,`wall`,`created`)
@@ -1108,6 +1114,9 @@ CREATE TABLE IF NOT EXISTS `workerqueue` (
`created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
`pid` int(11) NOT NULL DEFAULT 0,
`executed` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
- PRIMARY KEY(`id`)
+ PRIMARY KEY(`id`),
+ INDEX `pid` (`pid`),
+ INDEX `parameter` (`parameter`(192)),
+ INDEX `priority_created` (`priority`,`created`)
) DEFAULT COLLATE utf8mb4_general_ci;
diff --git a/doc/Account-Basics.md b/doc/Account-Basics.md
index ef6a13f222..854e78b14e 100644
--- a/doc/Account-Basics.md
+++ b/doc/Account-Basics.md
@@ -10,10 +10,10 @@ Not all Friendica sites allow open registration.
If registration is allowed, you will see a "Register" link immediately below the login prompt on the site home page.
Following this link will take you to the site registration page.
The strength of our network is that lots of different sites are all completely compatible with each other.
-If the site you're visting doesn't allow registration, or you think you might prefer another one, you can find a [list of public servers here](http://dir.friendica.com/siteinfo), and find one that meets your needs.
+If the site you're visting doesn't allow registration, or you think you might prefer another one, you can find a [list of public servers here](https://dir.friendica.social/servers), and find one that meets your needs.
If you'd like to have your own server, you can do that too.
-Visit [the Friendica website](http://friendica.com/download) to download the code with setup instructions.
+Visit [the Friendica website](http://friendi.ca/) to download the code with setup instructions.
It's a very simple installation process that anybody experienced in hosting websites, or with basic Linux experience can handle easily.
###OpenID
diff --git a/doc/BBCode.md b/doc/BBCode.md
index 50fb406b05..6eebed4864 100644
--- a/doc/BBCode.md
+++ b/doc/BBCode.md
@@ -61,17 +61,17 @@ table.bbcodes > * > tr > th {
red |
- [url=http://www.friendica.com]Friendica[/url] |
- Friendica |
+ [url=http://friendi.ca]Friendica[/url] |
+ Friendica |
- [img]http://friendica.com/sites/default/files/friendika-32.png[/img] |
- |
+ [img]https://raw.githubusercontent.com/friendica/friendica/master/images/friendica-32.jpg[/img] |
+ |
- [img=64x32]http://friendica.com/sites/default/files/friendika-32.png[/img]
+ | [img=64x32]https://raw.githubusercontent.com/friendica/friendica/master/images/friendica-32.jpg[/img]
Note: provided height is simply discarded. |
- |
+ |
[size=xx-small]small text[/size] |
@@ -82,7 +82,7 @@ table.bbcodes > * > tr > th {
big text |
- [size=20]exact size[/size] (size can be any number, in pixel) |
+ [size=20]exact size[/size] (size can be any number, in pixels) |
exact size |
@@ -99,23 +99,23 @@ table.bbcodes > * > tr > th {
Result |
- [url]http://friendica.com[/url] |
- http://friendica.com |
+ [url]http://friendi.ca[/url] |
+ http://friendi.ca |
- [url=http://friendica.com]Friendica[/url] |
- Friendica |
+ [url=http://friendi.ca]Friendica[/url] |
+ Friendica |
- [bookmark]http://friendica.com[/bookmark]
-#^[url]http://friendica.com[/url] |
- |
+ [bookmark]http://friendi.ca[/bookmark]
+#^[url]http://friendi.ca[/url] |
+ |
- [bookmark=http://friendica.com]Bookmark[/bookmark]
-#^[url=http://friendica.com]Bookmark[/url]
-#[url=http://friendica.com]^[/url][url=http://friendica.com]Bookmark[/url] |
- |
+ [bookmark=http://friendi.ca]Bookmark[/bookmark]
+#^[url=http://friendi.ca]Bookmark[/url]
+#[url=http://friendi.ca]^[/url][url=http://friendi.ca]Bookmark[/url] |
+ |
[url=/posts/f16d77b0630f0134740c0cc47a0ea02a]Diaspora post with GUID[/url] |
@@ -490,7 +490,7 @@ Page title with a link to *url* will be shown.
## Map
-This require "openstreetmap" or "Google Maps" addon version 1.3 or newer.
+This requires "openstreetmap" or "Google Maps" addon version 1.3 or newer.
If the addon isn't activated, the raw coordinates are shown instead.
@@ -514,10 +514,10 @@ If the addon isn't activated, the raw coordinates are shown instead.
## Abstract for longer posts
-If you want to spread your post to several third party networks you can have the problem that these networks have a length limitation like on Twitter.
+If you want to spread your post to several third party networks you may have the problem that these networks have a length limitation like on Twitter.
-Friendica is using a semi intelligent mechanism to generate a fitting abstract.
-But it can be interesting to define a custom abstract that will only be displayed on the external network.
+Friendica uses a semi-intelligent mechanism to generate a fitting abstract.
+But it can be useful to define a custom abstract that will only be displayed on the external network.
This is done with the [abstract]-element.
@@ -566,7 +566,7 @@ Instead you have to name the explicit network:
[abstract]These days I had a strange encounter...[/abstract]
-[abstract=goog]Helly my dear Google+ followers. You have to read my newest blog post![/abstract]
+[abstract=goog]Hello my dear Google+ followers. You have to read my newest blog post![/abstract]
[abstract=face]Hello my Facebook friends. These days happened something really cool.[/abstract]
While taking pictures in the woods I had a really strange encounter... |
Google and Facebook will show the respective abstracts while the other networks will show the default one.
@@ -574,7 +574,7 @@ While taking pictures in the woods I had a really strange encounter... |
-The [abstract] element isn't working with connectors where we post the HTML like Tumblr, Wordpress or Pump.io.
+The [abstract] element is not working with connectors where we post HTML directly, like Tumblr, Wordpress or Pump.io.
For the native connections--that is to e.g. Friendica, Hubzilla, Diaspora or GNU Social--the full posting is used and the contacts instance will display the posting as desired.
## Special
diff --git a/doc/Bugs-and-Issues.md b/doc/Bugs-and-Issues.md
index d316971d2a..e2665be410 100644
--- a/doc/Bugs-and-Issues.md
+++ b/doc/Bugs-and-Issues.md
@@ -5,9 +5,9 @@ Bugs and Issues
If your server has a support page, you should report any bugs/issues you encounter there first.
Reporting to your support page before reporting to the developers makes their job easier, as they don't have to deal with bug reports that might not have anything to do with them.
-This helps us get new features faster.
+Reducing the workload in this way helps us get new features faster.
You can also contact the [friendica support forum](https://helpers.pyxis.uberspace.de/profile/helpers) and report your problem there.
-Maybe someone from another node encountered the problem as well and can help you.
+Bugs are rarely limited to one person, and the chances are somebody from another node has encountered the problem too, and will be able to help you.
If you're a technical user, or your site doesn't have a support page, you'll need to use the [Bug Tracker](https://github.com/friendica/friendica/issues).
Please perform a search to see if there's already an open bug that matches yours before submitting anything.
@@ -15,6 +15,6 @@ Please perform a search to see if there's already an open bug that matches yours
Try to provide as much information as you can about the bug, including the **full** text of any error messages or notices, and any steps required to replicate the problem in as much detail as possible.
It's generally better to provide too much information than not enough.
-See [this article](http://www.chiark.greenend.org.uk/~sgtatham/bugs.html) to learn more about submitting **good** bug reports.
+See [this article](http://www.chiark.greenend.org.uk/~sgtatham/bugs.html) to learn more about submitting **good** bug reports. The better your bug report, the more likely we are to be able to actually fix it.
-And last but not least: Better report an issue you encountered even if you don't write the perfect bug report!
+And last but not least: It is better to report an issue you encountered even if you can't write the perfect bug report!
\ No newline at end of file
diff --git a/doc/Chats.md b/doc/Chats.md
index 3698ad15da..4e392f8d8f 100644
--- a/doc/Chats.md
+++ b/doc/Chats.md
@@ -3,7 +3,7 @@ Chats
* [Home](help)
-There are two possibilities to use a chat on your friendica site
+There are two possibilities to use chat on your friendica site
* IRC Chat
* Jappix
@@ -14,13 +14,13 @@ IRC-Chat Plugin
After activating the plugin, you can find the chat at [yoursite.com/irc](../irc).
Note: you can use this chat without any login at your site so that everyone could use it.
-If you follow the link, you will see the login page of the IR chat.
+If you follow the link, you will see the login page of the IRC chat.
Now choose a nickname and a chatroom.
-You can choose every name for the room, even something like #superchatwhosenameisonlyknownbyme.
-At last, solve the captchas and click the connect button.
+You can choose any name you like for the room, even something like #superchatwhosenameisonlyknownbyme.
+Finally, solve the captchas and click the connect button.
The following window shows some text while connecting.
-This text isn't importend for you, just wait for the next window.
+This text isn't important, just wait for the next window.
The first line shows your name and your current IP address.
The right part of the window shows all users.
The lower part of the window contains an input field.
diff --git a/doc/Developers-Intro.md b/doc/Developers-Intro.md
index 3cda8ab466..137e5aaf54 100644
--- a/doc/Developers-Intro.md
+++ b/doc/Developers-Intro.md
@@ -64,6 +64,7 @@ Here's a few primers if you are new to Friendica or to the PSR-2 coding standard
* By default, strings are enclosed in single quotes, but feel free to use double quotes if it makes more sense (SQL queries, adding tabs and line feeds).
* Operators are wrapped by spaces, e.g. `$var === true`, `$var = 1 + 2` and `'string' . $concat . 'enation'`
* Braces are mandatory in conditions
+ * Boolean operators are `&&` and `||` for PHP conditions, `AND` and `OR` for SQL queries
* No closing PHP tag
* No trailing spaces
diff --git a/doc/FAQ.md b/doc/FAQ.md
index 36fe1a8b47..da58e09f7f 100644
--- a/doc/FAQ.md
+++ b/doc/FAQ.md
@@ -176,7 +176,7 @@ Depending on the features of the client you might encounter some glitches in usa
###Where I can find help?
If you have problems with your Friendica page, you can ask the community at the [Friendica Support Group](https://helpers.pyxis.uberspace.de/profile/helpers).
-If you can't use your default profile you can either use a test account [test server](http://friendica.com/node/31) respectively an account at a public site [list](http://dir.friendica.com/siteinfo) or you can use the Librelist mailing list.
+If you can't use your default profile you can use an account at a public site [list](https://dir.friendica.social/servers) or you can use the Librelist mailing list.
If you want to use the mailing list, please just send a mail to friendica AT librelist DOT com.
If you are a theme developer, you will find help at this forum: [Friendica Theme Developers](https://friendica.eu/profile/ftdevs).
@@ -188,7 +188,7 @@ Admin
###Can I configure multiple domains with the same code instance?
-No, this function is no longer supported from Friendica 3.3 onwards.
+No, this function is no longer supported as of Friendica 3.3 onwards.
diff --git a/doc/Forums.md b/doc/Forums.md
index 54e8e38791..78a3e193e5 100644
--- a/doc/Forums.md
+++ b/doc/Forums.md
@@ -22,7 +22,7 @@ This is the default selection.
Community Forum/Celebrity Accounts provide the ability for people to become friends/fans of the forum without requiring approval.
The exact setting you would use depends on how you wish to interact with people who join the page.
-The "Soapbox" setting let's the page owner control all communications.
+The "Soapbox" setting lets the page owner control all communications.
Everything you post will go out to the forum members, but there will be no opportunity for interaction.
This setting would typically be used for announcements or corporate communications.
diff --git a/doc/Install.md b/doc/Install.md
index a8ea2c0503..53df55be06 100644
--- a/doc/Install.md
+++ b/doc/Install.md
@@ -82,6 +82,8 @@ Restart mysql and you should be fine.
Point your web browser to the new site and follow the instructions.
Please note any error messages and correct these before continuing.
+If you need to specify a port for the connection to the database, you can do so in the host name setting for the database.
+
*If* the automated installation fails for any reason, check the following:
* Does ".htconfig.php" exist? If not, edit htconfig.php and change the system settings. Rename to .htconfig.php
diff --git a/doc/Making-Friends.md b/doc/Making-Friends.md
index 8f2985463e..448f125d79 100644
--- a/doc/Making-Friends.md
+++ b/doc/Making-Friends.md
@@ -9,7 +9,7 @@ How do you do it?
The Directories
---
-Friendica has two different kinds of "addressbook":
+Friendica has two different kinds of "address book":
The directory of the Friendica server you are registered on and the global directory that collects account information across all Friendica instances.
The first thing you can do is look at the **Directory**.
diff --git a/doc/Settings.md b/doc/Settings.md
index e84418a453..a1c5f56213 100644
--- a/doc/Settings.md
+++ b/doc/Settings.md
@@ -130,7 +130,7 @@ By default, any (valid) email address is allowed in registrations.
#### Allow Users to set remote_self
-If you enable the `Allow Users to set remote_self` users can select Atom feeds from their contact list being their *remote self* in die advanced contact settings.
+If you enable the `Allow Users to set remote_self` users can select Atom feeds from their contact list being their *remote self* in the advanced contact settings.
Which means that postings by the remote self are automatically reposted by Friendica in their names.
This feature can be used to let the user mirror e.g. blog postings into their Friendica postings.
@@ -212,7 +212,7 @@ To simplify this process there is a button at the top of the page to reload all
## Themes
The Themes section of the admin panel works similar to the Plugins section but let you control the themes on your Friendica node.
-Each theme has a dedicated suppage showing the current status, some information about the theme and a screen-shot of the Friendica interface using the theme.
+Each theme has a dedicated subpage showing the current status, some information about the theme and a screen-shot of the Friendica interface using the theme.
Should the theme offer special settings, admins can set a global default value here.
You can activate and deactivate themes on their dedicated sub-pages thus making them available for the users of the node.
diff --git a/doc/andfinally.md b/doc/andfinally.md
deleted file mode 100644
index f7aeb1bd45..0000000000
--- a/doc/andfinally.md
+++ /dev/null
@@ -1,22 +0,0 @@
-[[!meta title="And Finally..."]]
-
-And that brings the Quick Start to an end.
-
-Here are some more things to help get you started:
-
-**Groups**
-
-
-- Friendica Support - problems? This is the place to ask.
-
-- Let's Talk a group for finding people and groups who share similar interests.
-
-- Local Friendica a page for local Friendica groups
-
-
-**Documentation**
-
-- Connecting to more networks
-- Help Index
-
-
diff --git a/doc/api.md b/doc/api.md
index 04abaa5632..222ac89e64 100644
--- a/doc/api.md
+++ b/doc/api.md
@@ -3,7 +3,7 @@ Friendica API
* [Home](help)
-The Friendica API aims to be compatible to the [GNU Social API](http://wiki.gnusocial.de/gnusocial:api) and the [Twitter API](https://dev.twitter.com/rest/public).
+The Friendica API aims to be compatible with the [GNU Social API](http://wiki.gnusocial.de/gnusocial:api) and the [Twitter API](https://dev.twitter.com/rest/public).
Please refer to the linked documentation for further information.
@@ -43,13 +43,13 @@ In this document, endpoints which requires auth are marked with "AUTH" after end
* network: network of the user
#### Errors
-When an error occour in API call, an HTTP error code is returned, with an error message
+When an error occurs in API call, an HTTP error code is returned, with an error message
Usually:
-- 400 Bad Request: if parameter are missing or items can't be found
-- 403 Forbidden: if authenticated user is missing
-- 405 Method Not Allowed: if API was called with invalid method, eg. GET when API require POST
-- 501 Not Implemented: if requested API doesn't exists
-- 500 Internal Server Error: on other error contitions
+- 400 Bad Request: if parameters are missing or items can't be found
+- 403 Forbidden: if the authenticated user is missing
+- 405 Method Not Allowed: if API was called with an invalid method, eg. GET when API require POST
+- 501 Not Implemented: if the requested API doesn't exist
+- 500 Internal Server Error: on other error conditions
Error body is
@@ -89,7 +89,7 @@ Unofficial Twitter command. It shows all direct answers (excluding the original
* id: id of the post
* count: Items per page (default: 20)
* page: page number
-* since_id: minimal id
+* since_id: minimum id
* max_id: maximum id
* include_entities: "true" shows entities for pictures and links (Default: false)
@@ -103,7 +103,7 @@ Unofficial Twitter command. It shows all direct answers (excluding the original
#### Parameters
* count: Items per page (default: 20)
* page: page number
-* since_id: minimal id
+* since_id: minimum id
* max_id: maximum id
* getText: Defines the format of the status field. Can be "html" or "plain"
* include_entities: "true" shows entities for pictures and links (Default: false)
@@ -117,7 +117,7 @@ Unofficial Twitter command. It shows all direct answers (excluding the original
#### Parameters
* count: Items per page (default: 20)
* page: page number
-* since_id: minimal id
+* since_id: minimum id
* max_id: maximum id
* getText: Defines the format of the status field. Can be "html" or "plain"
* friendica_verbose: "true" enables different error returns (default: "false")
@@ -128,7 +128,7 @@ Shows all direct messages of a conversation
#### Parameters
* count: Items per page (default: 20)
* page: page number
-* since_id: minimal id
+* since_id: minimum id
* max_id: maximum id
* getText: Defines the format of the status field. Can be "html" or "plain"
* uri: URI of the conversation
@@ -139,7 +139,7 @@ Shows all direct messages of a conversation
#### Parameters
* count: Items per page (default: 20)
* page: page number
-* since_id: minimal id
+* since_id: minimum id
* max_id: maximum id
* getText: Defines the format of the status field. Can be "html" or "plain"
* include_entities: "true" shows entities for pictures and links (Default: false)
@@ -182,7 +182,7 @@ HTTP 400 BadRequest
#### Parameters
* count: Items per page (default: 20)
* page: page number
-* since_id: minimal id
+* since_id: minimum id
* max_id: maximum id
* include_entities: "true" shows entities for pictures and links (Default: false)
@@ -208,26 +208,26 @@ Set this values will result in an empty array.
---
### followers/ids (*; AUTH)
#### Parameters
-* stringify_ids: Should the id numbers be sent as text (true) or number (false)? (default: false)
+* stringify_ids: Send id numbers as text (true) or integers (false)? (default: false)
#### Unsupported parameters
* user_id
* screen_name
* cursor
-Friendica doesn't allow showing followers of other users.
+Friendica doesn't allow showing the followers of other users.
---
### friends/ids (*; AUTH)
#### Parameters
-* stringify_ids: Should the id numbers be sent as text (true) or number (false)? (default: false)
+* stringify_ids: Send the id numbers as text (true) or integers (false)? (default: false)
#### Unsupported parameters
* user_id
* screen_name
* cursor
-Friendica doesn't allow showing friends of other users.
+Friendica doesn't allow showing the friends of other users.
---
### help/test (*)
@@ -283,7 +283,7 @@ Friendica doesn't allow showing friends of other users.
#### Parameters
* count: Items per page (default: 20)
* page: page number
-* since_id: minimal id
+* since_id: minimum id
* max_id: maximum id
* exclude_replies: don't show replies (default: false)
* conversation_id: Shows all statuses of a given conversation.
@@ -299,7 +299,7 @@ Friendica doesn't allow showing friends of other users.
#### Parameters
* count: Items per page (default: 20)
* page: page number
-* since_id: minimal id
+* since_id: minimum id
* max_id: maximum id
* exclude_replies: don't show replies (default: false)
* conversation_id: Shows all statuses of a given conversation.
@@ -315,7 +315,7 @@ Friendica doesn't allow showing friends of other users.
#### Parameters
* count: Items per page (default: 20)
* page: page number
-* since_id: minimal id
+* since_id: minimum id
* max_id: maximum id
* include_entities: "true" shows entities for pictures and links (Default: false)
@@ -329,7 +329,7 @@ Friendica doesn't allow showing friends of other users.
#### Parameters
* count: Items per page (default: 20)
* page: page number
-* since_id: minimal id
+* since_id: minimum id
* max_id: maximum id
* exclude_replies: don't show replies (default: false)
* conversation_id: Shows all statuses of a given conversation.
@@ -343,7 +343,7 @@ Friendica doesn't allow showing friends of other users.
#### Parameters
* count: Items per page (default: 20)
* page: page number
-* since_id: minimal id
+* since_id: minimum id
* max_id: maximum id
* include_entities: "true" shows entities for pictures and links (Default: false)
@@ -403,7 +403,7 @@ Friendica doesn't allow showing friends of other users.
* screen_name: screen name (for technical reasons, this value is not unique!)
* count: Items per page (default: 20)
* page: page number
-* since_id: minimal id
+* since_id: minimum id
* max_id: maximum id
* exclude_replies: don't show replies (default: false)
* conversation_id: Shows all statuses of a given conversation.
@@ -426,7 +426,7 @@ It shows all direct answers (excluding the original post) to a given id.
* id: id of the post
* count: Items per page (default: 20)
* page: page number
-* since_id: minimal id
+* since_id: minimum id
* max_id: maximum id
* include_entities: "true" shows entities for pictures and links (Default: false)
@@ -640,7 +640,7 @@ If the note is linked to an item, the item is returned, just like one of the "st
If the note is not linked to an item, a success status is returned:
-* "success" (json) | "<status>success</status>" (xml)
+* "success" (json) | success;" (xml)
---
@@ -671,8 +671,8 @@ json
```
{
"id": "photo id"
- "created": "date(YYYY-MM-GG HH:MM:SS)",
- "edited": "date(YYYY-MM-GG HH:MM:SS)",
+ "created": "date(YYYY-MM-DD HH:MM:SS)",
+ "edited": "date(YYYY-MM-DD HH:MM:SS)",
"title": "photo title",
"desc": "photo description",
"album": "album name",
@@ -695,8 +695,8 @@ xml
```
photo id
- date(YYYY-MM-GG HH:MM:SS)
- date(YYYY-MM-GG HH:MM:SS)
+ date(YYYY-MM-DD HH:MM:SS)
+ date(YYYY-MM-DD HH:MM:SS)
photo title
photo description
album name
@@ -793,13 +793,13 @@ On error:
* album: name of the album to be deleted (always necessary)
* album_new (optional): can be used to change the album of a single photo if photo_id is specified
* allow_cid/allow_gid/deny_cid/deny_gid (optional): on create: empty string or omitting = public photo, specify in format '``````' for private photo;
- on update: keys need to be present with empty values for setting a private photo now to public
+ on update: keys need to be present with empty values for changing a private photo to public
both calls point to one function for creating AND updating photos.
Saves data for the scales 0-2 to database (see above for scale description).
Call adds non-visible entries to items table to enable authenticated contacts to comment/like the photo.
Client should pay attention to the fact that updated access rights are not transferred to the contacts. i.e. public photos remain publicly visible if they have been commented/liked before setting visibility back to a limited group.
-Currently it is best way to inform user that updating rights is not the best way, offer a solution to add photo as a new photo with the new rights.
+Currently it is best to inform user that updating rights is not the right way to do this, and offer a solution to add photo as a new photo with the new rights instead.
#### Return values
@@ -884,8 +884,8 @@ On success: Array of:
* profiles: array of the profile data
On error:
-HTTP 403 Forbidden: when no authentication provided
-HTTP 400 Bad Request: if given profile_id is not in db or not assigned to authenticated user
+HTTP 403 Forbidden: when no authentication was provided
+HTTP 400 Bad Request: if given profile_id is not in the database or is not assigned to the authenticated user
General description of profile data in API returns:
* profile_id
@@ -913,7 +913,7 @@ The following API calls are implemented in GNU Social but not in Friendica: (inc
* blocks/create
* blocks/destroy
-The following API calls from the Twitter API aren't implemented neither in Friendica nor in GNU Social:
+The following API calls from the Twitter API are not implemented in either Friendica or GNU Social:
* statuses/mentions_timeline
* statuses/retweets/:id
@@ -990,7 +990,6 @@ The following API calls from the Twitter API aren't implemented neither in Frien
## Usage Examples
### BASH / cURL
-Betamax has documentated some example API usage from a [bash script](https://en.wikipedia.org/wiki/Bash_(Unix_shell) employing [curl](https://en.wikipedia.org/wiki/CURL) (see [his posting](https://betamax65.de/display/betamax65/43539)).
/usr/bin/curl -u USER:PASS https://YOUR.FRIENDICA.TLD/api/statuses/update.xml -d source="some source id" -d status="the status you want to post"
diff --git a/doc/database/db_locks.md b/doc/database/db_locks.md
index 00556dd953..4de6fbf961 100644
--- a/doc/database/db_locks.md
+++ b/doc/database/db_locks.md
@@ -1,11 +1,11 @@
Table locks
===========
-| Field | Description | Type | Null | Key | Default | Extra |
-|---------|------------------|--------------|------|-----|---------------------|----------------|
-| id | sequential ID | int(11) | NO | PRI | NULL | auto_increment |
-| name | | varchar(128) | NO | | | |
-| locked | | tinyint(1) | NO | | 0 | |
-| created | | datetime | YES | | 0001-01-01 00:00:00 | |
+| Field | Description | Type | Null | Key | Default | Extra |
+|---------|------------------|------------------|------|-----|---------------------|----------------|
+| id | sequential ID | int(11) | NO | PRI | NULL | auto_increment |
+| name | | varchar(128) | NO | | | |
+| locked | | tinyint(1) | NO | | 0 | |
+| pid | Process ID | int(10) unsigned | NO | | 0 | |
Return to [database documentation](help/database)
diff --git a/doc/de/Account-Basics.md b/doc/de/Account-Basics.md
index ddd3d9ef89..9d2f3ac86c 100644
--- a/doc/de/Account-Basics.md
+++ b/doc/de/Account-Basics.md
@@ -9,37 +9,37 @@ Account - Basics
Nicht alle Friendica-Knoten bieten die Möglichkeit zur Registrierung.
Wenn die Registrierung möglich ist, wird ein "Registrieren"-Link unter dem Login-Feld auf der Startseite angezeigt, der zur Registrierungsseite führt.
Die Stärke unseres Netzwerks ist, dass die verschiedenen Knoten komplett kompatibel zueinander sind.
-Wenn der Knoten, den Du besuchst, keine Registrierung anbietet, oder wenn Du glaubst, dass Dir eine andere Seite möglicherweise besser gefällt, dann kannst Du hier eine Liste von öffentlichen Servern (Knoten) finden und den Knoten heraus suchen, der am Besten zu Deinen Anforderungen passt.
+Wenn der Knoten, den Du besuchst, keine Registrierung anbietet, oder wenn Du glaubst, dass Dir eine andere Seite möglicherweise besser gefällt, dann kannst Du hier eine Liste von öffentlichen Servern (Knoten) finden und den Knoten heraus suchen, der am Besten zu Deinen Anforderungen passt.
-Wenn Du Deinen eigenen Server aufsetzen willst, kannst Du das ebenfalls machen.
-Besuche die Friendica-Webseite, um den Code mit den Installationsanleitungen herunterzuladen.
+Wenn Du Deinen eigenen Server aufsetzen willst, kannst Du das ebenfalls machen.
+Besuche die Friendica-Webseite, um den Code mit den Installationsanleitungen herunterzuladen.
Es ist ein einfacher Installationsprozess, den jeder mit ein wenig Erfahrungen im Webseiten-Hosting oder mit grundlegenden Linux-Erfahrungen einfach handhaben kann.
*OpenID*
-Das erste Feld auf der Registrierungsseite ist für eine OpenID-Adresse.
-Wenn Du keine OpenID-Adresse hast oder nicht wünschst, diese zu nutzen, dann lasse das Feld frei.
-Wenn Du einen OpenID-Account hast und diesen nutzen willst, gib die Adresse in das Feld ein und klicke auf "Registrieren".
-Friendica wird versuchen, so viele Informationen wie möglich von Deinem OpenID-Provider zu übernehmen, um diese in Dein Profil auf dieser Seite einzutragen.
+Das erste Feld auf der Registrierungsseite ist für eine OpenID-Adresse.
+Wenn Du keine OpenID-Adresse hast oder nicht wünschst, diese zu nutzen, dann lasse das Feld frei.
+Wenn Du einen OpenID-Account hast und diesen nutzen willst, gib die Adresse in das Feld ein und klicke auf "Registrieren".
+Friendica wird versuchen, so viele Informationen wie möglich von Deinem OpenID-Provider zu übernehmen, um diese in Dein Profil auf dieser Seite einzutragen.
*Dein vollständiger Name*
-Bitte trage Deinen vollständigen Namen **so ein, wie Du ihn im System anzeigen lassen willst**.
+Bitte trage Deinen vollständigen Namen **so ein, wie Du ihn im System anzeigen lassen willst**.
Viele Leute nutzen ihren richtigen Namen hierfür, allerdings besteht für dich keine Pflicht, das auch so zu machen.
*Email-Adresse*
-Bitte trage eine richtige Email-Adresse ein.
-Deine Email-Adresse wird **niemals** veröffentlicht.
-Wir benötigen diese, um Dir Account-Informationen und die Login-Daten zu schicken.
-Du erhältst zudem von Zeit zu Zeit Benachrichtigungen über eingegangene Nachrichten oder Punkte, die Deine Aufmerksamkeit benötigen.
-Du hast aber auch die Möglichkeit, diese Nachrichten in Deinen Account-Einstellungen komplett abzuschalten.
+Bitte trage eine richtige Email-Adresse ein.
+Deine Email-Adresse wird **niemals** veröffentlicht.
+Wir benötigen diese, um Dir Account-Informationen und die Login-Daten zu schicken.
+Du erhältst zudem von Zeit zu Zeit Benachrichtigungen über eingegangene Nachrichten oder Punkte, die Deine Aufmerksamkeit benötigen.
+Du hast aber auch die Möglichkeit, diese Nachrichten in Deinen Account-Einstellungen komplett abzuschalten.
-Du musst nicht Deine Haupt-Email-Adresse sein, jedoch wird eine funktionierende Adresse benötigt.
-Ohne dieses kannst Du weder Dein Initialpasswort erhalten, noch Dein Passwort zurücksetzen.
+Du musst nicht Deine Haupt-Email-Adresse sein, jedoch wird eine funktionierende Adresse benötigt.
+Ohne dieses kannst Du weder Dein Initialpasswort erhalten, noch Dein Passwort zurücksetzen.
Dies ist die einzige persönliche Information, die korrekt sein muss.
@@ -85,7 +85,7 @@ Falls Du Schwierigkeiten beim Login hast, prüfe bitte, ob z. B. Deine Feststell
**Passwort ändern**
-Besuche nach Deinem ersten Login bitte die Einstellungsseite und wechsle das Passwort in eines, dass Du Dir merken kannst.
+Besuche nach Deinem ersten Login bitte die Einstellungsseite und wechsle das Passwort in eines, dass Du Dir merken kannst.
**Der Anfang**
@@ -95,7 +95,7 @@ Ein ['Tipp für neue Mitglieder'](newmember)-Link zeigt sich in den ersten beide
**Persönliche Daten exportieren**
-Du kannst eine Kopie Deiner persönlichen Daten in einer XML-Datei exportieren.
+Du kannst eine Kopie Deiner persönlichen Daten in einer XML-Datei exportieren.
Gehe hierzu in Deinen Einstellungen auf "Persönliche Daten exportieren".
diff --git a/doc/de/BBCode.md b/doc/de/BBCode.md
index 5dc8f3bb06..81dfcddc13 100644
--- a/doc/de/BBCode.md
+++ b/doc/de/BBCode.md
@@ -61,17 +61,17 @@ table.bbcodes > * > tr > th {
rot |
- [url=http://www.friendica.com]Friendica[/url] |
- Friendica |
+ [url=http://friendi.ca]Friendica[/url] |
+ Friendica |
- [img]http://friendica.com/sites/default/files/friendika-32.png[/img] |
- |
+ [img]https://raw.githubusercontent.com/friendica/friendica/master/images/friendica-32.jpg[/img] |
+ |
- [img=64x32]http://friendica.com/sites/default/files/friendika-32.png[/img]
+ | [img=64x32]https://raw.githubusercontent.com/friendica/friendica/master/images/friendica-32.jpg[/img]
Note: provided height is simply discarded. |
- |
+ |
[size=xx-small]kleiner Text[/size] |
@@ -99,23 +99,23 @@ table.bbcodes > * > tr > th {
Ergebnis |
- [url]http://friendica.com[/url] |
- http://friendica.com |
+ [url]http://friendi.ca[/url] |
+ http://friendi.ca |
- [url=http://friendica.com]Friendica[/url] |
- Friendica |
+ [url=http://friendi.ca.com]Friendica[/url] |
+ Friendica |
- [bookmark]http://friendica.com[/bookmark]
-#^[url]http://friendica.com[/url] |
- |
+ [bookmark]http://friendi.ca[/bookmark]
+#^[url]http://friendi.ca[/url] |
+ |
- [bookmark=http://friendica.com]Lesezeichen[/bookmark]
-#^[url=http://friendica.com]Lesezeichen[/url]
-#[url=http://friendica.com]^[/url][url=http://friendica.com]Lesezeichen[/url] |
- |
+ [bookmark=http://friendi.ca]Lesezeichen[/bookmark]
+#^[url=http://friendi.ca]Lesezeichen[/url]
+#[url=http://friendi.ca]^[/url][url=http://friendi.ca]Lesezeichen[/url] |
+ |
[url=/posts/f16d77b0630f0134740c0cc47a0ea02a]Diaspora Beitrag mit GUID[/url] |
diff --git a/doc/de/andfinally.md b/doc/de/andfinally.md
deleted file mode 100644
index a873b046d6..0000000000
--- a/doc/de/andfinally.md
+++ /dev/null
@@ -1,19 +0,0 @@
-... und zuletzt
-===============
-
-Und damit sind wir auch schon am Ende der Schnellstartanleitung.
-
-Hier sind noch einige weitere Dinge, die Dir den Start vereinfachen können.
-
-**Gruppen**
-
-
-- Friendica Support - Probleme? Dann ist das der Platz, um zu fragen!
-
-
-**Dokumentation**
-
-- Zu weiteren Netzwerken verbinden
-- Zur Startseite der Hilfe
-
-
diff --git a/doc/de/makingnewfriends.md b/doc/de/makingnewfriends.md
deleted file mode 100644
index 8b15cec900..0000000000
--- a/doc/de/makingnewfriends.md
+++ /dev/null
@@ -1,27 +0,0 @@
-Neue Freunde finden
-==============
-
-* [Zur Startseite der Hilfe](help)
-
-Hier siehst du die Kontaktvorschläge.
-Wenn du dich mal verirrt hast, kannst du diesen Link klicken und wieder hierher kommen.
-
-Diese Seite ist ein wenig wie die Kontaktvorschläge in Facebook.
-Jeder auf dieser Liste hat zugestimmt, als Kontaktvorschlag zu erscheinen.
-Das bedeutet, das sie Anfragen meist nicht ablehnen, da sie neue Leute kennenlernen wollen.
-
-Siehst du jemanden, dessen Aussehen du magst?
-Klicke auf den "Verbinden"-Button beim Foto.
-Als nächstes kommst du zur Seite "Freundschafts-/Kontaktanfrage".
-Fülle das Formular wie vorgegeben aus und trage optional eine kleine Notiz ein.
-Nun musst du nur noch auf die Bestätigung warten.
-Beachte dabei, dass es sich um reale Personen handelt und es somit etwas dauern kann.
-Jetzt, nachdem du jemanden hinzugefügt hast, weißt du vielleicht nicht mehr, wie du zurückkommst.
-Klicke einfach auf den Link oben auf dieser Seite und du kommst zurück zur Seite mit den Kontaktvorschlägen, um weitere Personen hinzuzufügen.
-
-Du willst nicht einfach Personen hinzufügen, die du nicht kennst?
-Kein Problem - an dieser Stelle kommen wir zu den Gruppen und Seiten.
-
-
-
-
diff --git a/doc/de/network.md b/doc/de/network.md
deleted file mode 100644
index 1544553198..0000000000
--- a/doc/de/network.md
+++ /dev/null
@@ -1,20 +0,0 @@
-Deine "Netzwerk"-Seite
-==============
-
-* [Zur Startseite der Hilfe](help)
-
-Das ist dein "Netzwerk"-Tab.
-Wenn du dich mal verirrt hast, kannst du diesen Link klicken, um wieder hierher zu kommen.
-
-Diese Seite ist ein wenig wie die News-Seite in Facebook oder der Stream in Diaspora.
-Hier findest du alle Beiträge deiner Kontakte, Gruppen und Feeds, die du eingetragen hast.
-Wenn du neu bist, siehst du hier noch nichts, falls du deinen Status im letzten Schritt noch nicht eingetragen hast.
-Wenn du bereits ein paar Freunde eingetragen hast, findest du hier ihre Beiträge.
-Hier kannst du Beiträge kommentieren, eintragen, dass du den Beitrag magst oder ablehnst oder die Profile durch einen Klick auf deren Namen anschauen und auf deren Seite ("Wall") Nachrichten schreiben.
-
-Nun wollen wir diese Seite mit Inhalt füllen.
-Der erste Schritt ist es, Leute zu deinem Account hinzuzufügen.
-
-
-
-
diff --git a/doc/events.md b/doc/events.md
index 0aca7a902b..81252987b7 100644
--- a/doc/events.md
+++ b/doc/events.md
@@ -9,15 +9,15 @@ Depending on the theme you are using, there might be an additional link from the
## Event Overview
-The overview page shows the calendar of the current month, plus eventually some days in the beginning and the end.
-Listed are all events for this month you created, or your contacts have shared with you.
+The overview page shows the calendar of the current month, plus a few days days at the beginning and the end.
+Listed are all events for this month, created by you, or shared with you by your contacts,
This includes birthday reminders for contacts who share their birthday with you.
From the controls, you can switch between month/week/day view.
Flip through the view forwards and backwards.
And return to *today*.
-To create a new event, you can either follow the link "Create New Event" or make a double click on the desired box in the calendarium for when the event should take place.
+To create a new event, you can either follow the link "Create New Event" or double click on the desired box in the calendar in which the event should take place.
With a click on an existing event a pop-up box will be opened which shows you the event.
From there you can edit the event or view the event at the source link, if you are the one who created the event.
@@ -31,14 +31,14 @@ Fields marked with a *** have to be filled.
* **Event Finishes**: enter the finishing date/time for the event here
When you click in one of these fields a pop-up will be opened that allows you to pick the day and the time.
-If you double clicked on the day box in the calendarium these fields will be pre-filled for you.
+If you double clicked on the day box in the calendar these fields will be pre-filled for you.
The finishing date/time has to be after the beginning date/time of the event.
But you don't have to specify it.
-If the event is open-end or the finishing date/time does not matter, just select the box below the two first fields.
+If the event is open-ended or the finishing date/time does not matter, just select the box below the two first fields.
-* **Adjust for viewer timezone**: If you check this box, the beginning and finisching times will automatically converted to the local time according to the timezone setting
+* **Adjust for viewer timezone**: If you check this box, the beginning and finishing times will automatically converted to the local time according to the timezone setting
-This might prevent too early birthday wishes, or the panic attac that you have forgotten the birthday from your buddy at the other end of the world.
+This might prevent early birthday wishes, or the panic that you have forgotten the birthday from your buddy at the other side of the world.
And similar events.
* **Title**: a title for the event
@@ -46,7 +46,7 @@ And similar events.
* **Location**: the location the event will took place
These three fields describe your events.
-In the descirption and location field you can use BBCode to format the text.
+In the description and location field you can use BBCode to format the text.
* **Share this event**: when this box is checked the ACL will be shown to let you select with whom you wish to share the event. This works just like the controls of any other posting.
@@ -59,13 +59,13 @@ When you publish an event, you can choose who shall receive it, as with a regula
The recipients will see the posting about the event in their network-stream.
Additionally it will be added to their calendar and thus be shown in their events overview page.
-Recipients of the event-posting can comment or dis-/like the event, as with a regular posting, but also announce that they will attend, not attend or may-be attend the event with a single click.
+Recipients of the event-posting can comment or dis-/like the event, as with a regular posting, and also announce that they will attend, not attend or may-be attend the event with a single click.
### Addons
#### OpenStreetMap
-If this addon is activated on you friendica node, the content of the location field will be mathced with the identification service of OSM when you submit the event.
+If this addon is activated on you friendica node, the content of the location field will be matched with the identification service of OSM when you submit the event.
Should OSM find anything matching, a map for the location will be embedded automatically at the end of the events view.
#### Calendar Export
diff --git a/doc/groupsandpages.md b/doc/groupsandpages.md
deleted file mode 100644
index 5cfbc653cf..0000000000
--- a/doc/groupsandpages.md
+++ /dev/null
@@ -1,11 +0,0 @@
-This is the global directory. If you get lost, you can click this link to bring yourself back here.
-
-On this page, you'll find a collection of groups, forums and celebrity pages. Groups are not real people. Connecting to them is similar to "liking" something on Facebook, or signing up for a new forum. You don't have to feel awkward about introducing yourself to a new person, because they're not people!
-
-When you connect to a group, all messages to that group will start appearing in your network tab. You can comment on these posts, or post to the group yourself without ever having to add any of the groups members. This is a great way to make friends dynamically - you'll find people you like and add each other naturally instead of adding random strangers. Simply find a group you're interested in, and connect to it the same way you did with people in the last section. There are a lot of groups, and you're likely to get lost. Remember the link at the top of this page will bring you back here.
-
-Once you've added some groups, move on to the next section.
-
-
-
-
diff --git a/doc/guide.md b/doc/guide.md
deleted file mode 100644
index d76af92e25..0000000000
--- a/doc/guide.md
+++ /dev/null
@@ -1,13 +0,0 @@
-First things first, let's make sure you're logged in to your account. If you're not already logged in, do so in the frame below.
-
-Once you've logged in (or if you are already logged in), you'll now be looking at your profile page.
-
-This is a bit like your Facebook wall. It's where all your status messgages are kept, and where your friends come to post on your wall. To write your status, simply click in the box that says "share". When you do this, the box will expand. You can see some formatting options at the top such as Bold, Italics and Underline, as well as ways to add links and pictures. At the bottom you'll find some more links. You can use these to upload pictures and files from your computer, share websites with a bit of preview text, or embed video and audio files from elsewhere on the web. You can also set your post location here.
-
-Once you've finished writing your post, click on the padlock icon to select who can see it. If you do not use the padlock icon, your post will be public. This means it will appear to anybody who views your profile, and in the community tab if your site has it enabled, as well as in the network tab of any of your contacts.
-
-Play around with this a bit, then when you're ready to move on, we'll take a look at the Network Tab
-
-
-
-
diff --git a/doc/htconfig.md b/doc/htconfig.md
index b2f7182960..9c556bb7cd 100644
--- a/doc/htconfig.md
+++ b/doc/htconfig.md
@@ -14,7 +14,7 @@ Especially don't do that with undocumented values.
The header of the section describes the category, the value is the parameter.
Example: To set the directory value please add this line to your .htconfig.php:
- $a->config['system']['directory'] = 'http://dir.friendi.ca';
+ $a->config['system']['directory'] = 'http://dir.friendica.social';
## jabber ##
* **debug** (Boolean) - Enable debug level for the jabber account synchronisation.
@@ -25,7 +25,7 @@ Example: To set the directory value please add this line to your .htconfig.php:
* **allowed_link_protocols** (Array) - Allowed protocols in links URLs, add at your own risk. http is always allowed.
* **birthday_input_format** - Default value is "ymd".
* **block_local_dir** (Boolean) - Blocks the access to the directory of the local users.
-* **auth_cookie_lifetime** (Integer) - Number of days that should pass without any activity from a before before the users who choosed "Remember me" when logging in from that browser is considered logged out. Defaults to 7.
+* **auth_cookie_lifetime** (Integer) - Number of days that should pass without any activity before a user who chose "Remember me" when logging in is considered logged out. Defaults to 7.
* **curl_range_bytes** - Maximum number of bytes that should be fetched. Default is 0, which mean "no limit".
* **db_log** - Name of a logfile to log slow database queries
* **db_loglimit** - If a database call lasts longer than this value it is logged
@@ -35,24 +35,27 @@ Example: To set the directory value please add this line to your .htconfig.php:
* **db_loglimit_index_high** - Number of index rows to be logged anyway (for any index)
* **db_log_index_blacklist** - Blacklist of indexes that shouldn't be watched
* **dbclean** (Boolean) - Enable the automatic database cleanup process
+* **dbclean-expire-days** (Integer) - Days after which remote items will be deleted. Own items, and marked or filed items are kept.
* **default_service_class** -
* **delivery_batch_count** - Number of deliveries per process. Default value is 1. (Disabled when using the worker)
* **diaspora_test** (Boolean) - For development only. Disables the message transfer.
-* **directory** - The path to global directory. If not set then "http://dir.friendi.ca" is used.
+* **directory** - The path to global directory. If not set then "http://dir.friendica.social" is used.
* **disable_email_validation** (Boolean) - Disables the check if a mail address is in a valid format and can be resolved via DNS.
* **disable_url_validation** (Boolean) - Disables the DNS lookup of an URL.
+* **dlogfile - location of the developer log file
* **event_input_format** - Default value is "ymd".
* **frontend_worker_timeout** - Value in minutes after we think that a frontend task was killed by the webserver. Default value is 10.
* **ignore_cache** (Boolean) - For development only. Disables the item cache.
* **like_no_comment** (Boolean) - Don't update the "commented" value of an item when it is liked.
* **local_block** (Boolean) - Used in conjunction with "block_public".
-* **local_search** (Boolean) - Blocks the search for not logged in users to prevent crawlers from blocking your system.
-* **max_connections** - The poller process isn't started when the maximum level of the possible database connections are used. When the system can't detect the maximum numbers of connection then this value can be used.
+* **local_search** (Boolean) - Blocks search for users who are not logged in to prevent crawlers from blocking your system.
+* **max_connections** - The maximum number of database connections which can be in use before the poller process is deferred to it's next interval. When the system can't detect the maximum numbers of connection then this value can be used.
* **max_connections_level** - The maximum level of connections that are allowed to let the poller start. It is a percentage value. Default value is 75.
* **max_contact_queue** - Default value is 500.
* **max_batch_queue** - Default value is 1000.
* **max_processes_backend** - Maximum number of concurrent database processes for background tasks. Default value is 5.
* **max_processes_frontend** - Maximum number of concurrent database processes for foreground tasks. Default value is 20.
+* **min_poll_interval** - minimal distance in minutes between two polls for a contact. Default is 1. Reasonable values are between 1 and 59.
* **memcache** (Boolean) - Use memcache. To use memcache the PECL extension "memcache" has to be installed and activated.
* **memcache_host** - Hostname of the memcache daemon. Default is '127.0.0.1'.
* **memcache_port** - Portnumber of the memcache daemon. Default is 11211.
@@ -114,3 +117,10 @@ If more then one account should be able to access the admin panel, seperate the
If you want to have a more personalized closing line for the notification emails you can set a variable for the admin_name.
$a->config['admin_name'] = "Marvin";
+
+## Database Settings
+
+The configuration variables db_host, db_user, db_pass and db_data are holding your credentials for the database connection.
+If you need to specify a port to access the database, you can do so by appending ":portnumber" to the db_host variable.
+
+ $db_host = 'your.mysqlhost.com:123456';
diff --git a/doc/makingnewfriends.md b/doc/makingnewfriends.md
deleted file mode 100644
index 7eff1eda10..0000000000
--- a/doc/makingnewfriends.md
+++ /dev/null
@@ -1,11 +0,0 @@
-This is your Suggested Friends page. If you get lost, you can click this link to bring yourself back here.
-
-This is a bit like the Friend Suggestions page of Facebook. Everybody on this list has agreed that they may be suggested as a friend. This means they're unlikely to refuse an introduction you send, and they want to meet new people too!
-
-See somebody you like the look of? Click the connect button beneath their photograph. This will bring you to the introductions page. Fill in the form as instructed, and add a small note (optional). Now, wait a bit and they'll accept your request - note that these are real people, and it might take a while. Now you've added one, you're probably lost. Click the link at the top of this page to go back to the suggested friends list and add some more.
-
-Feel uncomfortable adding people you don't know? Don't worry - that's where Groups and Pages come in!
-
-
-
-
diff --git a/doc/network.md b/doc/network.md
deleted file mode 100644
index 36be159eab..0000000000
--- a/doc/network.md
+++ /dev/null
@@ -1,14 +0,0 @@
-This is your Network Tab.
-If you get lost, you can click this link to bring yourself back here.
-
-This is a bit like the Newsfeed at Facebook or the Stream at Diaspora.
-It's where all the posts from your contacts, groups, and feeds will appear.
-If you're new, you won't see anything in this page, unless you posted your status in the last step.
-If you've already added a few friends, you'll be able to see their posts.
-Here, you can comment, like, or dislike posts, or click on somebody's name to visit their profile page where you can write on their wall.
-
-Now we need to fill it up, the first step, is to make some new friends.
-
-
-
-
diff --git a/doc/smarty3-templates.md b/doc/smarty3-templates.md
index 751ef20b31..fb70368968 100644
--- a/doc/smarty3-templates.md
+++ b/doc/smarty3-templates.md
@@ -35,7 +35,7 @@ Form Templates
To guarantee a consistent look and feel for input forms, i.e. in the settings sections, there are templates for the basic form fields. They are initialized with an array of data, depending on the tyle of the field.
-All of these take an array for holding the values, i.e. for an one line text input field, which is required and should be used to type email addesses use something along
+All of these take an array for holding the values, eg,. for a one line text input field, which is required and should be used to type email addesses use something along the lines of:
'$adminmail' => array('adminmail', t('Site administrator email address'), $adminmail, t('Your account email address must match this in order to use the web admin panel.'), 'required', '', 'email'),
diff --git a/doc/themes.md b/doc/themes.md
index b553debfd7..058eb49d83 100644
--- a/doc/themes.md
+++ b/doc/themes.md
@@ -3,7 +3,7 @@
* [Home](help)
To change the look of friendica you have to touch the themes.
-The current default theme is [duepunto zero](https://github.com/friendica/friendica/tree/master/view/theme/duepuntozero) but there are numerous others.
+The current default theme is [Vier](https://github.com/friendica/friendica/tree/master/view/theme/vier) but there are numerous others.
Have a look at [friendica-themes.com](http://friendica-themes.com) for an overview of the existing themes.
In case none of them suits your needs, there are several ways to change a theme.
If you need help theming, there is a forum @[ftdevs@friendica.eu](https://friendica.eu/profile/ftdevs) where you can ask theme specific questions and present your themes.
@@ -69,7 +69,7 @@ Many themes are more *theme families* then only one theme.
*duepunto zero* and *vier* allow easily to add new theme variation.
We will go through the process of creating a new variation for *duepunto zero*.
The same (well almost, some names change) procedure applies to the *vier* theme.
-And similar steps are needed for *quattro* but this theme is using [lessc](http://lesscss.org/#docs) to maintaine the CSS files..
+And similar steps are needed for *quattro* but this theme is using [lessc](http://lesscss.org/#docs) to maintain the CSS files..
In
@@ -159,7 +159,7 @@ If you think your color variation could be benifical for other friendica users a
### Inheritation
-Say, you like the duepuntozero but you want to have the content of the outer columns left and right exchanged.
+Say, you like the duepuntozero but you want to have the content of the outer columns left and right exchanged.
That would be not a color variation as shown above.
Instead we will create a new theme, duepuntozero_lr, inherit the properties of duepuntozero and make small changes to the underlying php files.
@@ -202,7 +202,7 @@ That done, you can select it in the settings like any other activated theme.
## Creating a Theme from Scratch
Keep patient.
-Basically what you have to do is identifying which template you have to change so it looks more like what you want.
+Basically what you have to do is identify which template you have to change so it looks more like what you want.
Adopt the CSS of the theme accordingly.
And iterate the process until you have the theme the way you want it.
@@ -243,11 +243,11 @@ For example, have a look at the theme.php of the *quattro* theme:
*/
You see the definition of the themes name, it's version and the initial author of the theme.
-These three information should be listed.
-If the original author is not anymore working on the theme, but a maintainer has taken over, the maintainer should be listed as well.
+These three pieces of information should be listed.
+If the original author is no longer working on the theme, but a maintainer has taken over, the maintainer should be listed as well.
The information from the theme header will be displayed in the admin panelö.
-Next crucial part of the theme.php file is a definition of an init function.
+The next crucial part of the theme.php file is a definition of an init function.
The name of the function is _init.
So in the case of quattro it is
@@ -256,7 +256,7 @@ So in the case of quattro it is
set_template_engine($a, 'smarty3');
}
-Here we have set the basic theme information, in this case they are empthy.
+Here we have set the basic theme information, in this case they are empty.
But the array needs to be set.
And we have set the template engine that should be used by friendica for this theme.
At the moment you should use the *smarty3* engine.
@@ -289,4 +289,4 @@ The default file is in
/view/default.php
if you want to change it, say adding a 4th column for banners of your favourite FLOSS projects, place a new default.php file in your theme directory.
-As with the theme.php file, you can use the properties of the $a variable with holds the friendica application to decide what content is displayed.
\ No newline at end of file
+As with the theme.php file, you can use the properties of the $a variable with holds the friendica application to decide what content is displayed.
diff --git a/doc/translations.md b/doc/translations.md
index 61d91bee5b..c14b685be1 100644
--- a/doc/translations.md
+++ b/doc/translations.md
@@ -6,7 +6,7 @@ Friendica translations
Translation Process
-------------------
-The strings used in the UI of Friendica is translated at [Transifex] [1] and then included in the git repository at github.
+The strings used in the UI of Friendica are translated at [Transifex] [1] and then included in the git repository at github.
If you want to help with translation for any language, be it correcting terms or translating friendica to a currently not supported language, please register an account at transifex.com and contact the friendica translation team there.
Translating friendica is simple.
@@ -22,7 +22,7 @@ If you want to help translating, please concentrate on the core messages.po file
We will only include translations with a sufficient translated messages.po file.
Translations of addons will only be included, when the core file is included as well.
-If you want to get your work into the source tree yourself, feel free to do so and contact us with and question that arises.
+If you want to get your work into the source tree yourself, feel free to do so and contact us with and questions that arise.
The process is simple and friendica ships with all the tools necessary.
The location of the translated files in the source tree is
diff --git a/include/Contact.php b/include/Contact.php
index bb6d8c1981..0aeabc9725 100644
--- a/include/Contact.php
+++ b/include/Contact.php
@@ -262,33 +262,33 @@ function get_contact_details_by_url($url, $uid = -1, $default = array()) {
$profile = $default;
}
- if (($profile["photo"] == "") AND isset($default["photo"])) {
+ if (($profile["photo"] == "") && isset($default["photo"])) {
$profile["photo"] = $default["photo"];
}
- if (($profile["name"] == "") AND isset($default["name"])) {
+ if (($profile["name"] == "") && isset($default["name"])) {
$profile["name"] = $default["name"];
}
- if (($profile["network"] == "") AND isset($default["network"])) {
+ if (($profile["network"] == "") && isset($default["network"])) {
$profile["network"] = $default["network"];
}
- if (($profile["thumb"] == "") AND isset($profile["photo"])) {
+ if (($profile["thumb"] == "") && isset($profile["photo"])) {
$profile["thumb"] = $profile["photo"];
}
- if (($profile["micro"] == "") AND isset($profile["thumb"])) {
+ if (($profile["micro"] == "") && isset($profile["thumb"])) {
$profile["micro"] = $profile["thumb"];
}
- if ((($profile["addr"] == "") OR ($profile["name"] == "")) AND ($profile["gid"] != 0) AND
+ if ((($profile["addr"] == "") || ($profile["name"] == "")) && ($profile["gid"] != 0) &&
in_array($profile["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS))) {
proc_run(PRIORITY_LOW, "include/update_gcontact.php", $profile["gid"]);
}
// Show contact details of Diaspora contacts only if connected
- if (($profile["cid"] == 0) AND ($profile["network"] == NETWORK_DIASPORA)) {
+ if (($profile["cid"] == 0) && ($profile["network"] == NETWORK_DIASPORA)) {
$profile["location"] = "";
$profile["about"] = "";
$profile["gender"] = "";
@@ -559,7 +559,7 @@ function get_contact($url, $uid = 0, $no_update = false) {
// Update the contact every 7 days
$update_photo = ($contacts[0]['avatar-date'] < datetime_convert('','','now -7 days'));
- if (!$update_photo OR $no_update) {
+ if (!$update_photo || $no_update) {
return $contact_id;
}
} elseif ($uid != 0) {
@@ -636,7 +636,7 @@ function get_contact($url, $uid = 0, $no_update = false) {
}
}
- if (count($contacts) > 1 AND $uid == 0 AND $contact_id != 0 AND $url != "") {
+ if (count($contacts) > 1 && $uid == 0 && $contact_id != 0 && $url != "") {
q("DELETE FROM `contact` WHERE `nurl` = '%s' AND `id` != %d AND NOT `self`",
dbesc(normalise_link($url)),
intval($contact_id));
@@ -654,9 +654,9 @@ function get_contact($url, $uid = 0, $no_update = false) {
}
// Only update if there had something been changed
- if ($data["addr"] != $contacts[0]["addr"] OR
- $data["alias"] != $contacts[0]["alias"] OR
- $data["name"] != $contacts[0]["name"] OR
+ if ($data["addr"] != $contacts[0]["addr"] ||
+ $data["alias"] != $contacts[0]["alias"] ||
+ $data["name"] != $contacts[0]["name"] ||
$data["nick"] != $contacts[0]["nick"]) {
q("UPDATE `contact` SET `addr` = '%s', `alias` = '%s', `name` = '%s', `nick` = '%s',
`name-date` = '%s', `uri-date` = '%s' WHERE `id` = %d",
@@ -769,7 +769,7 @@ function formatted_location($profile) {
if($profile['locality'])
$location .= $profile['locality'];
- if($profile['region'] AND ($profile['locality'] != $profile['region'])) {
+ if($profile['region'] && ($profile['locality'] != $profile['region'])) {
if($location)
$location .= ', ';
diff --git a/include/NotificationsManager.php b/include/NotificationsManager.php
index 7183393801..57c315c9d7 100644
--- a/include/NotificationsManager.php
+++ b/include/NotificationsManager.php
@@ -4,10 +4,12 @@
* @brief Methods for read and write notifications from/to database
* or for formatting notifications
*/
+
require_once 'include/html2plain.php';
require_once 'include/probe.php';
require_once 'include/datetime.php';
require_once 'include/bbcode.php';
+require_once 'include/Contact.php';
/**
* @brief Methods for read and write notifications from/to database
@@ -510,7 +512,7 @@ class NotificationsManager {
$myurl = substr($myurl,strpos($myurl,'://')+3);
$myurl = str_replace(array('www.','.'),array('','\\.'),$myurl);
$diasp_url = str_replace('/profile/','/u/',$myurl);
- $sql_extra = sprintf(" AND ( `item`.`author-link` regexp '%s' or `item`.`tag` regexp '%s' or `item`.`tag` regexp '%s' ) ",
+ $sql_extra = sprintf(" AND ( `item`.`author-link` regexp '%s' OR `item`.`tag` regexp '%s' OR `item`.`tag` regexp '%s' ) ",
dbesc($myurl . '$'),
dbesc($myurl . '\\]'),
dbesc($diasp_url . '\\]')
@@ -720,10 +722,12 @@ class NotificationsManager {
$sql_extra = " AND `ignore` = 0 ";
/// @todo Fetch contact details by "get_contact_details_by_url" instead of queries to contact, fcontact and gcontact
- $r = q("SELECT `intro`.`id` AS `intro_id`, `intro`.*, `contact`.*, `fcontact`.`name` AS `fname`,`fcontact`.`url` AS `furl`,`fcontact`.`photo` AS `fphoto`,`fcontact`.`request` AS `frequest`,
+ $r = q("SELECT `intro`.`id` AS `intro_id`, `intro`.*, `contact`.*,
+ `fcontact`.`name` AS `fname`, `fcontact`.`url` AS `furl`,
+ `fcontact`.`photo` AS `fphoto`, `fcontact`.`request` AS `frequest`,
`gcontact`.`location` AS `glocation`, `gcontact`.`about` AS `gabout`,
`gcontact`.`keywords` AS `gkeywords`, `gcontact`.`gender` AS `ggender`,
- `gcontact`.`network` AS `gnetwork`
+ `gcontact`.`network` AS `gnetwork`, `gcontact`.`addr` AS `gaddr`
FROM `intro`
LEFT JOIN `contact` ON `contact`.`id` = `intro`.`contact-id`
LEFT JOIN `gcontact` ON `gcontact`.`nurl` = `contact`.`nurl`
@@ -786,11 +790,7 @@ class NotificationsManager {
// Normal connection requests
} else {
- // Probe the contact url to get missing data
- $ret = probe_url($it["url"]);
-
- if ($it['gnetwork'] == "")
- $it['gnetwork'] = $ret["network"];
+ $it = $this->getMissingIntroData($it);
// Don't show these data until you are connected. Diaspora is doing the same.
if($it['gnetwork'] === NETWORK_DIASPORA) {
@@ -815,7 +815,7 @@ class NotificationsManager {
'post_newfriend' => (intval(get_pconfig(local_user(),'system','post_newfriend')) ? '1' : 0),
'url' => $it['url'],
'zrl' => zrl($it['url']),
- 'addr' => $ret['addr'],
+ 'addr' => $it['gaddr'],
'network' => $it['gnetwork'],
'knowyou' => $it['knowyou'],
'note' => $it['note'],
@@ -827,4 +827,38 @@ class NotificationsManager {
return $arr;
}
+
+ /**
+ * @brief Check for missing contact data and try to fetch the data from
+ * from other sources
+ *
+ * @param array $arr The input array with the intro data
+ *
+ * @return array The array with the intro data
+ */
+ private function getMissingIntroData($arr) {
+ // If the network and the addr isn't available from the gcontact
+ // table entry, take the one of the contact table entry
+ if ($arr['gnetwork'] == "") {
+ $arr['gnetwork'] = $arr['network'];
+ }
+ if ($arr['gaddr'] == "") {
+ $arr['gaddr'] = $arr['addr'];
+ }
+
+ // If the network and addr is still not available
+ // get the missing data data from other sources
+ if ($arr['gnetwork'] == "" || $arr['gaddr'] == "") {
+ $ret = get_contact_details_by_url($arr['url']);
+
+ if ($arr['gnetwork'] == "" && $ret['network'] != "") {
+ $arr['gnetwork'] = $ret['network'];
+ }
+ if ($arr['gaddr'] == "" && $ret['addr'] != "") {
+ $arr['gaddr'] = $ret['addr'];
+ }
+ }
+
+ return $arr;
+ }
}
diff --git a/include/Photo.php b/include/Photo.php
index 7341935767..5c3a52ffd5 100644
--- a/include/Photo.php
+++ b/include/Photo.php
@@ -778,21 +778,29 @@ function guess_image_type($filename, $fromcurl=false) {
* @return array Returns array of the different avatar sizes
*/
function update_contact_avatar($avatar, $uid, $cid, $force = false) {
-
- $r = q("SELECT `avatar`, `photo`, `thumb`, `micro` FROM `contact` WHERE `id` = %d LIMIT 1", intval($cid));
+ $r = q("SELECT `avatar`, `photo`, `thumb`, `micro`, `nurl` FROM `contact` WHERE `id` = %d LIMIT 1", intval($cid));
if (!dbm::is_result($r)) {
return false;
} else {
$data = array($r[0]["photo"], $r[0]["thumb"], $r[0]["micro"]);
}
- if (($r[0]["avatar"] != $avatar) OR $force) {
+ if (($r[0]["avatar"] != $avatar) || $force) {
$photos = import_profile_photo($avatar, $uid, $cid, true);
if ($photos) {
q("UPDATE `contact` SET `avatar` = '%s', `photo` = '%s', `thumb` = '%s', `micro` = '%s', `avatar-date` = '%s' WHERE `id` = %d",
dbesc($avatar), dbesc($photos[0]), dbesc($photos[1]), dbesc($photos[2]),
dbesc(datetime_convert()), intval($cid));
+
+ // Update the public contact (contact id = 0)
+ if ($uid != 0) {
+ $pcontact = dba::select('contact', array('id'), array('nurl' => $r[0]['nurl']), array('limit' => 1));
+ if (dbm::is_result($pcontact)) {
+ update_contact_avatar($avatar, 0, $pcontact['id'], $force);
+ }
+ }
+
return $photos;
}
}
@@ -817,7 +825,7 @@ function import_profile_photo($photo, $uid, $cid, $quit_on_error = false) {
$filename = basename($photo);
$img_str = fetch_url($photo, true);
- if ($quit_on_error AND ($img_str == "")) {
+ if ($quit_on_error && ($img_str == "")) {
return false;
}
@@ -847,14 +855,35 @@ function import_profile_photo($photo, $uid, $cid, $quit_on_error = false) {
$photo_failure = true;
}
- $photo = App::get_baseurl() . '/photo/' . $hash . '-4.' . $img->getExt();
- $thumb = App::get_baseurl() . '/photo/' . $hash . '-5.' . $img->getExt();
- $micro = App::get_baseurl() . '/photo/' . $hash . '-6.' . $img->getExt();
+ $suffix = '?ts='.time();
+
+ $photo = App::get_baseurl() . '/photo/' . $hash . '-4.' . $img->getExt() . $suffix;
+ $thumb = App::get_baseurl() . '/photo/' . $hash . '-5.' . $img->getExt() . $suffix;
+ $micro = App::get_baseurl() . '/photo/' . $hash . '-6.' . $img->getExt() . $suffix;
+
+ // Remove the cached photo
+ $a = get_app();
+ $basepath = $a->get_basepath();
+
+ if (is_dir($basepath."/photo")) {
+ $filename = $basepath.'/photo/'.$hash.'-4.'.$img->getExt();
+ if (file_exists($filename)) {
+ unlink($filename);
+ }
+ $filename = $basepath.'/photo/'.$hash.'-5.'.$img->getExt();
+ if (file_exists($filename)) {
+ unlink($filename);
+ }
+ $filename = $basepath.'/photo/'.$hash.'-6.'.$img->getExt();
+ if (file_exists($filename)) {
+ unlink($filename);
+ }
+ }
} else {
$photo_failure = true;
}
- if ($photo_failure AND $quit_on_error) {
+ if ($photo_failure && $quit_on_error) {
return false;
}
@@ -873,7 +902,7 @@ function get_photo_info($url) {
$data = Cache::get($url);
- if (is_null($data) OR !$data OR !is_array($data)) {
+ if (is_null($data) || !$data || !is_array($data)) {
$img_str = fetch_url($url, true, $redirects, 4);
$filesize = strlen($img_str);
@@ -967,7 +996,7 @@ function store_photo(App $a, $uid, $imagedata = "", $url = "") {
/// $default_cid = $r[0]['id'];
/// $community_page = (($r[0]['page-flags'] == PAGE_COMMUNITY) ? true : false);
- if ((strlen($imagedata) == 0) AND ($url == "")) {
+ if ((strlen($imagedata) == 0) && ($url == "")) {
logger("No image data and no url provided", LOGGER_DEBUG);
return(array());
} elseif (strlen($imagedata) == 0) {
@@ -1073,7 +1102,7 @@ function store_photo(App $a, $uid, $imagedata = "", $url = "") {
}
}
- if ($width > 160 AND $height > 160) {
+ if ($width > 160 && $height > 160) {
$x = 0;
$y = 0;
diff --git a/include/acl_selectors.php b/include/acl_selectors.php
index c7c6bb206a..6f08523ca9 100644
--- a/include/acl_selectors.php
+++ b/include/acl_selectors.php
@@ -209,7 +209,7 @@ function contact_select($selname, $selclass, $preselected = false, $size = 4, $p
$tabindex = ($tabindex > 0 ? "tabindex=\"$tabindex\"" : "");
- if ($privmail AND $preselected) {
+ if ($privmail && $preselected) {
$sql_extra .= " AND `id` IN (".implode(",", $preselected).")";
$hidepreselected = ' style="display: none;"';
} else {
@@ -261,7 +261,7 @@ function contact_select($selname, $selclass, $preselected = false, $size = 4, $p
$o .= "\r\n";
- if ($privmail AND $preselected) {
+ if ($privmail && $preselected) {
$o .= implode(", ", $receiverlist);
}
@@ -388,6 +388,9 @@ function populate_acl($user = null, $show_jotnets = false) {
}
function construct_acl_data(App $a, $user) {
+ // This function is now deactivated. It seems as if the generated data isn't used anywhere.
+ /// @todo Remove this function and all function calls before releasing Friendica 3.5.3
+ return;
// Get group and contact information for html ACL selector
$acl_data = acl_lookup($a, 'html');
diff --git a/include/api.php b/include/api.php
index 67e1917258..16ff0f4a05 100644
--- a/include/api.php
+++ b/include/api.php
@@ -456,10 +456,13 @@ $called_api = null;
* Contact url or False if contact id is unknown
*/
function api_unique_id_to_url($id) {
- $r = q("SELECT `url` FROM `contact` WHERE `uid` = 0 AND `id` = %d LIMIT 1",
- intval($id));
+ $r = dba::select('contact', array('url'), array('uid' => 0, 'id' => $id), array('limit' => 1));
- return (dbm::is_result($r) && $r[0]["url"]);
+ if (dbm::is_result($r)) {
+ return $r["url"];
+ } else {
+ return false;
+ }
}
/**
@@ -480,7 +483,7 @@ $called_api = null;
logger("api_get_user: Fetching user data for user ".$contact_id, LOGGER_DEBUG);
// Searching for contact URL
- if (!is_null($contact_id) AND (intval($contact_id) == 0)) {
+ if (!is_null($contact_id) && (intval($contact_id) == 0)) {
$user = dbesc(normalise_link($contact_id));
$url = $user;
$extra_query = "AND `contact`.`nurl` = '%s' ";
@@ -490,7 +493,7 @@ $called_api = null;
}
// Searching for contact id with uid = 0
- if (!is_null($contact_id) AND (intval($contact_id) != 0)) {
+ if (!is_null($contact_id) && (intval($contact_id) != 0)) {
$user = dbesc(api_unique_id_to_url($contact_id));
if ($user == "") {
@@ -535,7 +538,7 @@ $called_api = null;
}
}
- if (is_null($user) AND ($a->argc > (count($called_api) - 1)) AND (count($called_api) > 0)) {
+ if (is_null($user) && ($a->argc > (count($called_api) - 1)) && (count($called_api) > 0)) {
$argid = count($called_api);
list($user, $null) = explode(".", $a->argv[$argid]);
if (is_numeric($user)) {
@@ -597,7 +600,7 @@ $called_api = null;
$network_name = network_to_name($r[0]['network'], $r[0]['url']);
// If no nick where given, extract it from the address
- if (($r[0]['nick'] == "") OR ($r[0]['name'] == $r[0]['nick'])) {
+ if (($r[0]['nick'] == "") || ($r[0]['name'] == $r[0]['nick'])) {
$r[0]['nick'] = api_get_nick($r[0]["url"]);
}
@@ -713,7 +716,7 @@ $called_api = null;
$starred = 0;
// Add a nick if it isn't present there
- if (($uinfo[0]['nick'] == "") OR ($uinfo[0]['name'] == $uinfo[0]['nick'])) {
+ if (($uinfo[0]['nick'] == "") || ($uinfo[0]['name'] == $uinfo[0]['nick'])) {
$uinfo[0]['nick'] = api_get_nick($uinfo[0]["url"]);
}
@@ -746,7 +749,7 @@ $called_api = null;
'contributors_enabled' => false,
'is_translator' => false,
'is_translation_enabled' => false,
- 'following' => (($uinfo[0]['rel'] == CONTACT_IS_FOLLOWER) OR ($uinfo[0]['rel'] == CONTACT_IS_FRIEND)),
+ 'following' => (($uinfo[0]['rel'] == CONTACT_IS_FOLLOWER) || ($uinfo[0]['rel'] == CONTACT_IS_FRIEND)),
'follow_request_sent' => false,
'statusnet_blocking' => false,
'notifications' => false,
@@ -774,10 +777,10 @@ $called_api = null;
$status_user = api_get_user($a, $item["author-link"]);
- $status_user["protected"] = (($item["allow_cid"] != "") OR
- ($item["allow_gid"] != "") OR
- ($item["deny_cid"] != "") OR
- ($item["deny_gid"] != "") OR
+ $status_user["protected"] = (($item["allow_cid"] != "") ||
+ ($item["allow_gid"] != "") ||
+ ($item["deny_cid"] != "") ||
+ ($item["deny_gid"] != "") ||
$item["private"]);
if ($item['thr-parent'] == $item['uri']) {
@@ -1302,9 +1305,9 @@ $called_api = null;
$status_info["entities"] = $converted["entities"];
}
- if (($lastwall['item_network'] != "") AND ($status["source"] == 'web')) {
+ if (($lastwall['item_network'] != "") && ($status["source"] == 'web')) {
$status_info["source"] = network_to_name($lastwall['item_network'], $user_info['url']);
- } elseif (($lastwall['item_network'] != "") AND (network_to_name($lastwall['item_network'], $user_info['url']) != $status_info["source"])) {
+ } elseif (($lastwall['item_network'] != "") && (network_to_name($lastwall['item_network'], $user_info['url']) != $status_info["source"])) {
$status_info["source"] = trim($status_info["source"].' ('.network_to_name($lastwall['item_network'], $user_info['url']).')');
}
@@ -1390,11 +1393,11 @@ $called_api = null;
$user_info["status"]["entities"] = $converted["entities"];
}
- if (($lastwall['item_network'] != "") AND ($user_info["status"]["source"] == 'web')) {
+ if (($lastwall['item_network'] != "") && ($user_info["status"]["source"] == 'web')) {
$user_info["status"]["source"] = network_to_name($lastwall['item_network'], $user_info['url']);
}
- if (($lastwall['item_network'] != "") AND (network_to_name($lastwall['item_network'], $user_info['url']) != $user_info["status"]["source"])) {
+ if (($lastwall['item_network'] != "") && (network_to_name($lastwall['item_network'], $user_info['url']) != $user_info["status"]["source"])) {
$user_info["status"]["source"] = trim($user_info["status"]["source"] . ' (' . network_to_name($lastwall['item_network'], $user_info['url']) . ')');
}
@@ -2175,7 +2178,7 @@ $called_api = null;
`contact`.`id` AS `cid`
FROM `item`, `contact`
WHERE `item`.`uid` = %d
- AND `item`.`visible` = 1 and `item`.`moderated` = 0 AND `item`.`deleted` = 0
+ AND `item`.`visible` = 1 AND `item`.`moderated` = 0 AND `item`.`deleted` = 0
AND `item`.`starred` = 1
AND `contact`.`id` = `item`.`contact-id`
AND (NOT `contact`.`blocked` OR `contact`.`pending`)
@@ -2260,13 +2263,13 @@ $called_api = null;
$statustitle = trim($item['title']);
- if (($statustitle != '') and (strpos($statusbody, $statustitle) !== false)) {
+ if (($statustitle != '') && (strpos($statusbody, $statustitle) !== false)) {
$statustext = trim($statusbody);
} else {
$statustext = trim($statustitle."\n\n".$statusbody);
}
- if (($item["network"] == NETWORK_FEED) and (strlen($statustext)> 1000)) {
+ if (($item["network"] == NETWORK_FEED) && (strlen($statustext)> 1000)) {
$statustext = substr($statustext, 0, 1000)."... \n".$item["plink"];
}
@@ -2286,6 +2289,11 @@ $called_api = null;
$statushtml = "" . bbcode($item['title']) . "
\n" . $statushtml;
}
+ // feeds without body should contain the link
+ if (($item['network'] == NETWORK_FEED) && (strlen($item['body']) == 0)) {
+ $statushtml .= bbcode($item['plink']);
+ }
+
$entities = api_get_entitities($statustext, $body);
return array(
@@ -2394,8 +2402,8 @@ $called_api = null;
$offset = 0;
//foreach ($urls[1] AS $id=>$url) {
foreach ($ordered_urls AS $url) {
- if ((substr($url["title"], 0, 7) != "http://") AND (substr($url["title"], 0, 8) != "https://") AND
- !strpos($url["title"], "http://") AND !strpos($url["title"], "https://"))
+ if ((substr($url["title"], 0, 7) != "http://") && (substr($url["title"], 0, 8) != "https://") &&
+ !strpos($url["title"], "http://") && !strpos($url["title"], "https://"))
$display_url = $url["title"];
else {
$display_url = str_replace(array("http://www.", "https://www."), array("", ""), $url["url"]);
@@ -2447,7 +2455,7 @@ $called_api = null;
$scale = scale_image($image[0], $image[1], 150);
$sizes["thumb"] = array("w" => $scale["width"], "h" => $scale["height"], "resize" => "fit");
- if (($image[0] > 150) OR ($image[1] > 150)) {
+ if (($image[0] > 150) || ($image[1] > 150)) {
$scale = scale_image($image[0], $image[1], 340);
$sizes["small"] = array("w" => $scale["width"], "h" => $scale["height"], "resize" => "fit");
}
@@ -2455,7 +2463,7 @@ $called_api = null;
$scale = scale_image($image[0], $image[1], 600);
$sizes["medium"] = array("w" => $scale["width"], "h" => $scale["height"], "resize" => "fit");
- if (($image[0] > 600) OR ($image[1] > 600)) {
+ if (($image[0] > 600) || ($image[1] > 600)) {
$scale = scale_image($image[0], $image[1], 1024);
$sizes["large"] = array("w" => $scale["width"], "h" => $scale["height"], "resize" => "fit");
}
@@ -2660,7 +2668,7 @@ $called_api = null;
list($status_user, $owner_user) = api_item_get_user($a, $item);
// Look if the posts are matching if they should be filtered by user id
- if ($filter_user AND ($status_user["id"] != $user_info["id"])) {
+ if ($filter_user && ($status_user["id"] != $user_info["id"])) {
continue;
}
@@ -2704,9 +2712,9 @@ $called_api = null;
$status["entities"] = $converted["entities"];
}
- if (($item['item_network'] != "") AND ($status["source"] == 'web')) {
+ if (($item['item_network'] != "") && ($status["source"] == 'web')) {
$status["source"] = network_to_name($item['item_network'], $user_info['url']);
- } elseif (($item['item_network'] != "") AND (network_to_name($item['item_network'], $user_info['url']) != $status["source"])) {
+ } elseif (($item['item_network'] != "") && (network_to_name($item['item_network'], $user_info['url']) != $status["source"])) {
$status["source"] = trim($status["source"].' ('.network_to_name($item['item_network'], $user_info['url']).')');
}
@@ -2715,7 +2723,7 @@ $called_api = null;
// It doesn't work reliable with the link if its a feed
//$IsRetweet = ($item['owner-link'] != $item['author-link']);
//if ($IsRetweet)
- // $IsRetweet = (($item['owner-name'] != $item['author-name']) OR ($item['owner-avatar'] != $item['author-avatar']));
+ // $IsRetweet = (($item['owner-name'] != $item['author-name']) || ($item['owner-avatar'] != $item['author-avatar']));
if ($item["id"] == $item["parent"]) {
@@ -3014,7 +3022,7 @@ $called_api = null;
if (api_user() === false) throw new ForbiddenException();
- if (!x($_POST, "text") OR (!x($_POST,"screen_name") AND !x($_POST,"user_id"))) return;
+ if (!x($_POST, "text") || (!x($_POST,"screen_name") && !x($_POST,"user_id"))) return;
$sender = api_get_user($a);
@@ -3027,8 +3035,9 @@ $called_api = null;
api_best_nickname($r);
$recipient = api_get_user($a, $r[0]['nurl']);
- } else
+ } else {
$recipient = api_get_user($a, $_POST['user_id']);
+ }
$replyto = '';
$sub = '';
@@ -3740,8 +3749,7 @@ $called_api = null;
proc_run(PRIORITY_LOW, "include/directory.php", $url);
}
- require_once 'include/profile_update.php';
- profile_change();
+ proc_run(PRIORITY_LOW, 'include/profile_update.php', api_user());
// output for client
if ($data) {
@@ -3974,7 +3982,7 @@ $called_api = null;
}
function prepare_photo_data($type, $scale, $photo_id) {
- $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, ");
// added allow_cid, allow_gid, deny_cid, deny_gid to output as string like stored in database
@@ -4326,7 +4334,7 @@ $called_api = null;
$in_reply_to['user_id_str'] = NULL;
$in_reply_to['screen_name'] = NULL;
- if (($item['thr-parent'] != $item['uri']) AND (intval($item['parent']) != intval($item['id']))) {
+ if (($item['thr-parent'] != $item['uri']) && (intval($item['parent']) != intval($item['id']))) {
$r = q("SELECT `id` FROM `item` WHERE `uid` = %d AND `uri` = '%s' LIMIT 1",
intval($item['uid']),
dbesc($item['thr-parent']));
@@ -4407,7 +4415,7 @@ $called_api = null;
if (isset($data["text"]))
$body = $data["text"];
- if (($body == "") AND (isset($data["title"])))
+ if (($body == "") && (isset($data["title"])))
$body = $data["title"];
if (isset($data["url"]))
diff --git a/include/auth.php b/include/auth.php
index 5dfe9d3e06..d301f87055 100644
--- a/include/auth.php
+++ b/include/auth.php
@@ -29,7 +29,7 @@ if (isset($_COOKIE["Friendica"])) {
new_cookie($authcookiedays*24*60*60, $r[0]);
// Do the authentification if not done by now
- if (!isset($_SESSION) OR !isset($_SESSION['authenticated'])) {
+ if (!isset($_SESSION) || !isset($_SESSION['authenticated'])) {
authenticate_success($r[0]);
if (get_config('system','paranoia'))
diff --git a/include/auth_ejabberd.php b/include/auth_ejabberd.php
index 9211c5baf0..490ea0d1cb 100755
--- a/include/auth_ejabberd.php
+++ b/include/auth_ejabberd.php
@@ -89,7 +89,7 @@ class exAuth {
// Open the logfile if the logfile name is defined
if ($this->sLogFile != '')
- $this->rLogFile = fopen($this->sLogFile, "a") or die("Error opening log file: ". $this->sLogFile);
+ $this->rLogFile = fopen($this->sLogFile, "a") || die("Error opening log file: ". $this->sLogFile);
$this->writeLog("[exAuth] start");
diff --git a/include/bbcode.php b/include/bbcode.php
index 9a43cdb305..0c4e12c9ad 100644
--- a/include/bbcode.php
+++ b/include/bbcode.php
@@ -49,14 +49,14 @@ function bb_attachment($Text, $simplehtml = false, $tryoembed = true) {
$data["title"] = str_replace(array("http://", "https://"), "", $data["title"]);
}
- if (((strpos($data["text"], "[img=") !== false) OR (strpos($data["text"], "[img]") !== false)) AND ($data["image"] != "")) {
+ if (((strpos($data["text"], "[img=") !== false) || (strpos($data["text"], "[img]") !== false)) && ($data["image"] != "")) {
$data["preview"] = $data["image"];
$data["image"] = "";
}
if ($simplehtml == 7) {
$text = style_url_for_mastodon($data["url"]);
- } elseif (($simplehtml != 4) AND ($simplehtml != 0)) {
+ } elseif (($simplehtml != 4) && ($simplehtml != 0)) {
$text = sprintf('%s
', $data["url"], $data["title"]);
} else {
$text = sprintf('', $data["type"]);
@@ -71,13 +71,13 @@ function bb_attachment($Text, $simplehtml = false, $tryoembed = true) {
if (strstr(strtolower($oembed), "