]> git.mxchange.org Git - friendica.git/commitdiff
Merge remote-tracking branch 'upstream/develop' into 1704-mastodon
authorMichael <heluecht@pirati.ca>
Thu, 20 Apr 2017 05:44:31 +0000 (05:44 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 20 Apr 2017 05:44:31 +0000 (05:44 +0000)
Conflicts:
include/bbcode.php

83 files changed:
boot.php
database.sql
doc/Settings.md
doc/database/db_attach.md
doc/database/db_cache.md
doc/database/db_contact.md
doc/database/db_conv.md
doc/database/db_event.md
doc/database/db_fcontact.md
doc/database/db_fsuggest.md
doc/database/db_gcontact.md
doc/database/db_glink.md
doc/database/db_gserver.md
doc/database/db_intro.md
doc/database/db_item.md
doc/database/db_locks.md
doc/database/db_mail.md
doc/database/db_mailacct.md
doc/database/db_notify.md
doc/database/db_oembed.md
doc/database/db_parsed_url.md
doc/database/db_photo.md
doc/database/db_profile.md
doc/database/db_queue.md
doc/database/db_register.md
doc/database/db_spam.md
doc/database/db_term.md
doc/database/db_thread.md
doc/database/db_user.md
doc/database/db_workerqueue.md
doc/de/Settings.md
friendica_test_data.sql
htconfig.php
include/Contact.php
include/acl_selectors.php
include/api.php
include/attach.php
include/bb2diaspora.php
include/bbcode.php
include/cli_startup.php
include/contact_selectors.php
include/contact_widgets.php
include/conversation.php
include/cron.php
include/cronhooks.php
include/datetime.php
include/dba.php
include/dbstructure.php
include/dfrn.php
include/diaspora.php
include/directory.php
include/identity.php
include/items.php
include/notifier.php
include/ostatus.php
include/pgettext.php
include/photos.php
include/socgraph.php
js/acl.js
js/autocomplete.js
js/main.js
mod/admin.php
mod/hovercard.php
mod/install.php
mod/message.php
mod/network.php
mod/notifications.php
mod/photos.php
mod/ping.php
mod/profile.php
mod/profiles.php
mod/search.php
mod/videos.php
update.php
util/vagrant_provision.sh
view/templates/admin_site.tpl
view/templates/htconfig.tpl
view/theme/frio/img/dynamic.php [deleted file]
view/theme/frio/js/textedit.js
view/theme/frio/js/theme.js
view/theme/frio/php/default.php
view/theme/frio/templates/comment_item.tpl
view/theme/frost/templates/admin_site.tpl

index 05588b8d2c419cc40eb360f41da0960e6db7bb3c..c44599477aafdc6a05a4e33a27d0edf9a299d77d 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -38,7 +38,7 @@ define ( 'FRIENDICA_PLATFORM',     'Friendica');
 define ( 'FRIENDICA_CODENAME',     'Asparagus');
 define ( 'FRIENDICA_VERSION',      '3.5.2-dev' );
 define ( 'DFRN_PROTOCOL_VERSION',  '2.23'    );
-define ( 'DB_UPDATE_VERSION',      1218      );
+define ( 'DB_UPDATE_VERSION',      1219      );
 
 /**
  * @brief Constant with a HTML line break.
@@ -1367,11 +1367,15 @@ class App {
                $cmdline = implode($args, " ");
 
                if (get_config('system', 'proc_windows')) {
-                       proc_close(proc_open('cmd /c start /b ' . $cmdline, array(), $foo, dirname(__FILE__)));
+                       $resource = proc_open('cmd /c start /b ' . $cmdline, array(), $foo, dirname(__FILE__));
                } else {
-                       proc_close(proc_open($cmdline . " &", array(), $foo, dirname(__FILE__)));
+                       $resource = proc_open($cmdline . " &", array(), $foo, dirname(__FILE__));
                }
-
+               if (!is_resource($resource)) {
+                       logger('We got no resource for command '.$cmdline, LOGGER_DEBUG);
+                       return;
+               }
+               proc_close($resource);
        }
 
        /**
index af33d1697bfed9f8f65c2dc615059914ff2cbcd2..69da511b0348763e279a5ca60ce1b788b5204779 100644 (file)
@@ -1,6 +1,6 @@
 -- ------------------------------------------
 -- Friendica 3.5.2-dev (Asparagus)
--- DB_UPDATE_VERSION 1218
+-- DB_UPDATE_VERSION 1219
 -- ------------------------------------------
 
 
@@ -169,7 +169,7 @@ CREATE TABLE IF NOT EXISTS `contact` (
        `info` mediumtext,
        `profile-id` int(11) NOT NULL DEFAULT 0,
        `bdyear` varchar(4) NOT NULL DEFAULT '',
-       `bd` date NOT NULL DEFAULT '0000-00-00',
+       `bd` date NOT NULL DEFAULT '0001-01-01',
        `notify_new_posts` tinyint(1) NOT NULL DEFAULT 0,
        `fetch_further_information` tinyint(1) NOT NULL DEFAULT 0,
        `ffi_keyword_blacklist` text,
@@ -328,7 +328,7 @@ CREATE TABLE IF NOT EXISTS `gcontact` (
        `about` text,
        `keywords` text,
        `gender` varchar(32) NOT NULL DEFAULT '',
-       `birthday` varchar(32) NOT NULL DEFAULT '0000-00-00',
+       `birthday` varchar(32) NOT NULL DEFAULT '0001-01-01',
        `community` tinyint(1) NOT NULL DEFAULT 0,
        `contact-type` tinyint(1) NOT NULL DEFAULT -1,
        `hide` tinyint(1) NOT NULL DEFAULT 0,
@@ -792,7 +792,7 @@ CREATE TABLE IF NOT EXISTS `profile` (
        `hide-friends` tinyint(1) NOT NULL DEFAULT 0,
        `name` varchar(255) NOT NULL DEFAULT '',
        `pdesc` varchar(255) NOT NULL DEFAULT '',
-       `dob` varchar(32) NOT NULL DEFAULT '0000-00-00',
+       `dob` varchar(32) NOT NULL DEFAULT '0001-01-01',
        `address` varchar(255) NOT NULL DEFAULT '',
        `locality` varchar(255) NOT NULL DEFAULT '',
        `region` varchar(255) NOT NULL DEFAULT '',
index 3652562720d440e8f6cb6970cf5e6b4de0005448..13424a5a48acf16e5b70d39959a71317b0d5e67b 100644 (file)
@@ -133,6 +133,9 @@ By default, any (valid) email address is allowed in registrations.
 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.
 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.
+It is disabled by default, as it causes additional load on the server and may be misused to distribute SPAM.
+
 As admin of the node you can also set this flag directly in the database.
 Before doing so, you should be sure you know what you do and have a backup of the database.
 
@@ -167,6 +170,19 @@ This will mean you cannot connect (at all) to self-signed SSL sites.
 
 ### Worker
 
+This section allows you to configure the background process that is triggered by the `cron` job that was created during the installation.
+The process does check the available system resources before creating a new worker for a task.
+Because of this, it may happen that the maximum number of worker processes you allow will not be reached.
+
+If your server setup does not allow you to use the `proc_open` function of PHP, please disable it in this section.
+
+The tasks for the background process have priorities.
+To guarantee that important tasks are executed even though the system has a lot of work to do, it is useful to enable the *fastlane*.
+
+Should you not be able to run a cron job on your server, you can also activate the *frontend* worker.
+If you have done so, you can call `example.com/worker` (replace example.com with your actual domain name) on a regular basis from an external servie.
+This will then trigger the execution of the background process.
+
 ### Relocate
 
 ## Users
index f47380cd95099a4f902d92dcc7760307222038eb..7dde8f860d563da15a9930ef7f98e827b84543c3 100644 (file)
@@ -10,8 +10,8 @@ Table attach
 | filetype   | mimetype                                              | varchar(64)  | NO   |     |                     |                 |
 | filesize   | size in bytes                                         | int(11)      | NO   |     | 0                   |                 |
 | data       | file data                                             | longblob     | NO   |     | NULL                |                 |
-| created    | creation time                                         | datetime     | NO   |     | 0000-00-00 00:00:00 |                 |
-| edited     | last edit time                                        | datetime     | NO   |     | 0000-00-00 00:00:00 |                 |
+| created    | creation time                                         | datetime     | NO   |     | 0001-01-01 00:00:00 |                 |
+| edited     | last edit time                                        | datetime     | NO   |     | 0001-01-01 00:00:00 |                 |
 | allow_cid  | Access Control - list of allowed contact.id '<19><78> | mediumtext   | NO   |     | NULL                |                 |
 | allow_gid  | Access Control - list of allowed groups               | mediumtext   | NO   |     | NULL                |                 |
 | deny_cid   | Access Control - list of denied contact.id            | mediumtext   | NO   |     | NULL                |                 |
index 333adaa2c1ccf56b3bfc55caa121cf2a7228e8f3..3675474a5ab7b74bccd24477ad6e4f5c23ed3909 100644 (file)
@@ -5,7 +5,7 @@ Table cache
 | ------------ | ---------------------------------- | ------------ | ---- | --- | ------------------- | ----- |
 | k            | horizontal width + url or resource | varchar(255) | NO   | PRI | NULL                |       |
 | v            | OEmbed response from site          | text         | NO   |     | NULL                |       |
-| updated      | datetime of cache insertion        | datetime     | NO   | MUL | 0000-00-00 00:00:00 |       |
+| updated      | datetime of cache insertion        | datetime     | NO   | MUL | 0001-01-01 00:00:00 |       |
 | expire_mode  |                                    | int(11)      | NO   |     | 0                   |       |
 
 Return to [database documentation](help/database)
index 2e3ebc3130a1b166febe9af96efa2be7346e05b9..eb5c505d13ef27dc1587ca1c9396df7494daf59b 100644 (file)
@@ -5,7 +5,7 @@ Table contact
 |---------------------------|-----------------------------------------------------------|--------------|------|-----|---------------------|----------------|
 | id                        | sequential ID                                             | int(11)      | NO   | PRI | NULL                | auto_increment |
 | uid                       | user.id of the owner of this data                         | int(11)      | NO   | MUL | 0                   |                |
-| created                   |                                                           | datetime     | NO   |     | 0000-00-00 00:00:00 |                |
+| created                   |                                                           | datetime     | NO   |     | 0001-01-01 00:00:00 |                |
 | self                      | 1 if the contact is the user him/her self                 | tinyint(1)   | NO   |     | 0                   |                |
 | remote_self               |                                                           | tinyint(1)   | NO   |     | 0                   |                |
 | rel                       | The kind of the relation between the user and the contact | tinyint(1)   | NO   |     | 0                   |                |
@@ -41,14 +41,14 @@ Table contact
 | usehub                    |                                                           | tinyint(1)   | NO   |     | 0                   |                |
 | subhub                    |                                                           | tinyint(1)   | NO   |     | 0                   |                |
 | hub-verify                |                                                           | varchar(255) | NO   |     |                     |                |
-| last-update               | Date of the last try to update the contact info           | datetime     | NO   |     | 0000-00-00 00:00:00 |                |
-| success_update            | Date of the last successful contact update                | datetime     | NO   |     | 0000-00-00 00:00:00 |                |
-| failure_update            | Date of the last failed update                            | datetime     | NO   |     | 0000-00-00 00:00:00 |                |
-| name-date                 |                                                           | datetime     | NO   |     | 0000-00-00 00:00:00 |                |
-| uri-date                  |                                                           | datetime     | NO   |     | 0000-00-00 00:00:00 |                |
-| avatar-date               |                                                           | datetime     | NO   |     | 0000-00-00 00:00:00 |                |
-| term-date                 |                                                           | datetime     | NO   |     | 0000-00-00 00:00:00 |                |
-| last-item                 | date of the last post                                     | datetime     | NO   |     | 0000-00-00 00:00:00 |                |
+| last-update               | Date of the last try to update the contact info           | datetime     | NO   |     | 0001-01-01 00:00:00 |                |
+| success_update            | Date of the last successful contact update                | datetime     | NO   |     | 0001-01-01 00:00:00 |                |
+| failure_update            | Date of the last failed update                            | datetime     | NO   |     | 0001-01-01 00:00:00 |                |
+| name-date                 |                                                           | datetime     | NO   |     | 0001-01-01 00:00:00 |                |
+| uri-date                  |                                                           | datetime     | NO   |     | 0001-01-01 00:00:00 |                |
+| avatar-date               |                                                           | datetime     | NO   |     | 0001-01-01 00:00:00 |                |
+| term-date                 |                                                           | datetime     | NO   |     | 0001-01-01 00:00:00 |                |
+| last-item                 | date of the last post                                     | datetime     | NO   |     | 0001-01-01 00:00:00 |                |
 | priority                  |                                                           | tinyint(3)   | NO   |     | 0                   |                |
 | blocked                   |                                                           | tinyint(1)   | NO   |     | 1                   |                |
 | readonly                  | posts of the contact are readonly                         | tinyint(1)   | NO   |     | 0                   |                |
@@ -64,7 +64,7 @@ Table contact
 | info                      |                                                           | mediumtext   | NO   |     | NULL                |                |
 | profile-id                |                                                           | int(11)      | NO   |     | 0                   |                |
 | bdyear                    |                                                           | varchar(4)   | NO   |     |                     |                |
-| bd                        |                                                           | date         | NO   |     | 0000-00-00          |                |
+| bd                        |                                                           | date         | NO   |     | 0001-01-01          |                |
 | notify_new_posts          |                                                           | tinyint(1)   | NO   |     | 0                   |                |
 | fetch_further_information |                                                           | tinyint(1)   | NO   |     | 0                   |                |
 | ffi_keyword_blacklist     |                                                           | mediumtext   | NO   |     | NULL                |                |
index f20074d61ddb454b1e0c75a5a0148ee3daa723b4..f70191b88e5e1df42c8d1e62c58ddd467e5f2172 100644 (file)
@@ -8,8 +8,8 @@ Table conv
 | recips  | sender_handle;recipient_handle            | mediumtext       | NO   |     | NULL                |                 |
 | uid     | user_id of the owner of this data         | int(11)          | NO   | MUL | 0                   |                 |
 | creator | handle of creator                         | varchar(255)     | NO   |     |                     |                 |
-| created | creation timestamp                        | datetime         | NO   |     | 0000-00-00 00:00:00 |                 |
-| updated | edited timestamp                          | datetime         | NO   |     | 0000-00-00 00:00:00 |                 |
+| created | creation timestamp                        | datetime         | NO   |     | 0001-01-01 00:00:00 |                 |
+| updated | edited timestamp                          | datetime         | NO   |     | 0001-01-01 00:00:00 |                 |
 | subject | subject of initial message                | mediumtext       | NO   |     | NULL                |                 |
 
 Return to [database documentation](help/database)
index d45ddd20636d03de792c867e54e4ad6aae17f11f..2c0650a8d8baf3677c1acac1a02f5c2311695a8c 100644 (file)
@@ -7,10 +7,10 @@ Table event
 | uid        | user_id of the owner of this data                      | int(11)             | NO   | MUL | 0                   |                 |
 | cid        | contact_id (ID of the contact in contact table)        | int(11)             | NO   |     | 0                   |                 |
 | uri        |                                                        | varchar(255)        | NO   |     |                     |                 |
-| created    |  creation time                                         | datetime            | NO   |     | 0000-00-00 00:00:00 |                 |
-| edited     | last edit time                                         | datetime            | NO   |     | 0000-00-00 00:00:00 |                 |
-| start      | event start time                                       | datetime            | NO   |     | 0000-00-00 00:00:00 |                 |
-| finish     | event end time                                         | datetime            | NO   |     | 0000-00-00 00:00:00 |                 |
+| created    |  creation time                                         | datetime            | NO   |     | 0001-01-01 00:00:00 |                 |
+| edited     | last edit time                                         | datetime            | NO   |     | 0001-01-01 00:00:00 |                 |
+| start      | event start time                                       | datetime            | NO   |     | 0001-01-01 00:00:00 |                 |
+| finish     | event end time                                         | datetime            | NO   |     | 0001-01-01 00:00:00 |                 |
 | summary    |  short description or title of the event               | text                | NO   |     | NULL                |                 |
 | desc       | event description                                      | text                | NO   |     | NULL                |                 |
 | location   | event location                                         | text                | NO   |     | NULL                |                 |
index 2801605229587010b598721c0ab951e5c5abc680..d9a786acc98072c179c426869fcb9d83106192d2 100644 (file)
@@ -19,6 +19,6 @@ Table fcontact
 | network  |               | varchar(32)      | NO   |     |                     |                 |
 | alias    |               | varchar(255)     | NO   |     |                     |                 |
 | pubkey   |               | text             | NO   |     | NULL                |                 |
-| updated  |               | datetime         | NO   |     | 0000-00-00 00:00:00 |                 |
+| updated  |               | datetime         | NO   |     | 0001-01-01 00:00:00 |                 |
 
 Return to [database documentation](help/database)
index b8751a478c757604afafdfa3f748d23503f8f441..e461895c805b835263295cbb9233cf5e4f854a09 100644 (file)
@@ -11,6 +11,6 @@ Table fsuggest
 | request |             | varchar(255) | NO   |     |                     |                 |
 | photo   |             | varchar(255) | NO   |     |                     |                 |
 | note    |             | text         | NO   |     | NULL                |                 |
-| created |             | datetime     | NO   |     | 0000-00-00 00:00:00 |                 |
+| created |             | datetime     | NO   |     | 0001-01-01 00:00:00 |                 |
 
 Return to [database documentation](help/database)
index c47e72622816f760c7e3f07f83b94456fb15f276..3c0118a33dcb5cda5d21ccb21664b658ee537c62 100644 (file)
@@ -10,15 +10,15 @@ Table gcontact
 | nurl         |                                    | varchar(255)     | NO   | MUL |                     |                |
 | photo        | Link to the profile photo          | varchar(255)     | NO   |     |                     |                |
 | connect      |                                    | varchar(255)     | NO   |     |                     |                |
-| created      |                                    | datetime         | NO   |     | 0000-00-00 00:00:00 |                |
-| updated      |                                    | datetime         | YES  | MUL | 0000-00-00 00:00:00 |                |
-| last_contact |                                    | datetime         | YES  |     | 0000-00-00 00:00:00 |                |
-| last_failure |                                    | datetime         | YES  |     | 0000-00-00 00:00:00 |                |
+| created      |                                    | datetime         | NO   |     | 0001-01-01 00:00:00 |                |
+| updated      |                                    | datetime         | YES  | MUL | 0001-01-01 00:00:00 |                |
+| last_contact |                                    | datetime         | YES  |     | 0001-01-01 00:00:00 |                |
+| last_failure |                                    | datetime         | YES  |     | 0001-01-01 00:00:00 |                |
 | location     |                                    | varchar(255)     | NO   |     |                     |                |
 | about        |                                    | text             | NO   |     | NULL                |                |
 | keywords     | puplic keywords (interests)        | text             | NO   |     | NULL                |                |
 | gender       |                                    | varchar(32)      | NO   |     |                     |                |
-| birthday     |                                    | varchar(32)      | NO   |     | 0000-00-00          |                |
+| birthday     |                                    | varchar(32)      | NO   |     | 0001-01-01          |                |
 | community    | 1 if contact is forum account      | tinyint(1)       | NO   |     | 0                   |                |
 | hide         | 1 = should be hidden from search   | tinyint(1)       | NO   |     | 0                   |                |
 | nsfw         | 1 = contact posts nsfw content     | tinyint(1)       | NO   |     | 0                   |                |
index eb2f10bc6746bdba82929af2a2837541c6174859..734eb04b9d1939e8dcf8e77fb18ff5c18fab2c88 100644 (file)
@@ -8,6 +8,6 @@ Table glink
 | uid     |                  | int(11)          | NO   |     | 0                   |                |
 | gcid    |                  | int(11)          | NO   | MUL | 0                   |                |
 | zcid    |                  | int(11)          | NO   | MUL | 0                   |                |
-| updated |                  | datetime         | NO   |     | 0000-00-00 00:00:00 |                |
+| updated |                  | datetime         | NO   |     | 0001-01-01 00:00:00 |                |
 
 Return to [database documentation](help/database)
index b62b802726bdfb0715c20a15eddc604818cd6bb3..4b2107fc55a9bc276f2f9ab27643ec22c74fe33c 100644 (file)
@@ -14,10 +14,10 @@ Table gserver
 | noscrape        |                  | varchar(255)     | NO   |     |                     |                |
 | network         |                  | varchar(32)      | NO   |     |                     |                |
 | platform        |                  | varchar(255)     | NO   |     |                     |                |
-| created         |                  | datetime         | NO   |     | 0000-00-00 00:00:00 |                |
-| last_poco_query |                  | datetime         | YES  |     | 0000-00-00 00:00:00 |                |
-| last_contact    |                  | datetime         | YES  |     | 0000-00-00 00:00:00 |                |
-| last_failure    |                  | datetime         | YES  |     | 0000-00-00 00:00:00 |                |
+| created         |                  | datetime         | NO   |     | 0001-01-01 00:00:00 |                |
+| last_poco_query |                  | datetime         | YES  |     | 0001-01-01 00:00:00 |                |
+| last_contact    |                  | datetime         | YES  |     | 0001-01-01 00:00:00 |                |
+| last_failure    |                  | datetime         | YES  |     | 0001-01-01 00:00:00 |                |
 
 
 Return to [database documentation](help/database)
index 9eb68532c41c2788cea8c370e4c1e3d498b0c48f..a71154a4f9de3c6d594bb51629faf472e5795835 100644 (file)
@@ -11,7 +11,7 @@ Table intro
 | duplex     |                  | tinyint(1)       | NO   |     | 0                   |                |
 | note       |                  | text             | NO   |     | NULL                |                |
 | hash       |                  | varchar(255)     | NO   |     |                     |                |
-| datetime   |                  | datetime         | NO   |     | 0000-00-00 00:00:00 |                |
+| datetime   |                  | datetime         | NO   |     | 0001-01-01 00:00:00 |                |
 | blocked    |                  | tinyint(1)       | NO   |     | 1                   |                |
 | ignore     |                  | tinyint(1)       | NO   |     | 0                   |                |
 
index 7981d29956805ba2d985a7313330607cf5044b11..d24d92bad8f16139a70d8bcd48194e7d4694dc91 100644 (file)
@@ -16,11 +16,11 @@ Table item
 | parent-uri    | uri of the parent to this item                                                                                                                             | varchar(255)        | NO   | MUL |                     |                |
 | extid         |                                                                                                                                                            | varchar(255         | NO   | MUL |                     |                |
 | thr-parent    | If the parent of this item is not the top-level item in the conversation, the uri of the immediate parent; otherwise set to parent-uri                     | varchar(255)        | NO   |     |                     |                |
-| created       | Creation timestamp.                                                                                                                                        | datetime            | NO   |     | 0000-00-00 00:00:00 |                |
-| edited        | Date of  last edit (default is created)                                                                                                                    | datetime            | NO   |     | 0000-00-00 00:00:00 |                |
-| commented     | Date of last comment/reply to this item                                                                                                                    | datetime            | NO   |     | 0000-00-00 00:00:00 |                |
-| received      | datetime                                                                                                                                                   | datetime            | NO   |     | 0000-00-00 00:00:00 |                |
-| changed       | Date that something in the conversation changed, indicating clients should fetch the conversation again                                                    | datetime            | NO   |     | 0000-00-00 00:00:00 |                |
+| created       | Creation timestamp.                                                                                                                                        | datetime            | NO   |     | 0001-01-01 00:00:00 |                |
+| edited        | Date of  last edit (default is created)                                                                                                                    | datetime            | NO   |     | 0001-01-01 00:00:00 |                |
+| commented     | Date of last comment/reply to this item                                                                                                                    | datetime            | NO   |     | 0001-01-01 00:00:00 |                |
+| received      | datetime                                                                                                                                                   | datetime            | NO   |     | 0001-01-01 00:00:00 |                |
+| changed       | Date that something in the conversation changed, indicating clients should fetch the conversation again                                                    | datetime            | NO   |     | 0001-01-01 00:00:00 |                |
 | owner-name    | Name of the owner of this item                                                                                                                             | varchar(255)        | NO   |     |                     |                |
 | owner-link    | Link to the profile page of the owner of this item                                                                                                         | varchar(255)        | NO   |     |                     |                |
 | owner-avatar  | Link to the avatar picture of the owner of this item                                                                                                       | varchar(255)        | NO   |     |                     |                |
index f9b93ff666061efdf5185608941d3244336b7778..00556dd9538f484b0cdc417785d8eb1c3ba3bc52 100644 (file)
@@ -6,6 +6,6 @@ Table locks
 | id      | sequential ID    | int(11)      | NO   | PRI | NULL                | auto_increment |
 | name    |                  | varchar(128) | NO   |     |                     |                |
 | locked  |                  | tinyint(1)   | NO   |     | 0                   |                |
-| created |                  | datetime     | YES  |     | 0000-00-00 00:00:00 |                |
+| created |                  | datetime     | YES  |     | 0001-01-01 00:00:00 |                |
 
 Return to [database documentation](help/database)
index 7047da96a5d9362d1e6ba24d244b2df4a60fb703..623b8c9c85661a36f7dc308c77efc0f21b275b1a 100644 (file)
@@ -19,6 +19,6 @@ Table mail
 | unknown    | if sender not in the contact table this is 1 | varchar(255)     | NO   |     | 0                   |                 |
 | uri        |                                              | varchar(255)     | NO   | MUL |                     |                 |
 | parent-uri |                                              | varchar(255)     | NO   | MUL |                     |                 |
-| created    | creation time of the private message         | datetime         | NO   |     | 0000-00-00 00:00:00 |                 |
+| created    | creation time of the private message         | datetime         | NO   |     | 0001-01-01 00:00:00 |                 |
 
 Return to [database documentation](help/database)
index 1c2deb8153d57309f82b38d559e062a2e382f73e..9f6484f818e4c7e005b281b9fddefb20b5c430cd 100644 (file)
@@ -15,6 +15,6 @@ Table mailacct
 | action       |                  | int(11)      | NO   |     | 0                   |                |
 | movetofolder |                  | varchar(255) | NO   |     |                     |                |
 | pubmail      |                  | tinyint(1)   | NO   |     | 0                   |                |
-| last_check   |                  | datetime     | NO   |     | 0000-00-00 00:00:00 |                |
+| last_check   |                  | datetime     | NO   |     | 0001-01-01 00:00:00 |                |
 
 Return to [database documentation](help/database)
index b2bae647172a9be16e13fda517db56af36a0c1de..fbf0db7705ed2af9cb232d9cec136dc84787df72 100644 (file)
@@ -9,7 +9,7 @@ Table notify
 | name       |                                   | varchar(255) | NO   |     |                     |                 |
 | url        |                                   | varchar(255) | NO   |     |                     |                 |
 | photo      |                                   | varchar(255) | NO   |     |                     |                 |
-| date       |                                   | datetime     | NO   |     | 0000-00-00 00:00:00 |                 |
+| date       |                                   | datetime     | NO   |     | 0001-01-01 00:00:00 |                 |
 | msg        |                                   | mediumtext   | YES  |     | NULL                |                 |
 | uid        | user.id of the owner of this data | int(11)      | NO   | MUL | 0                   |                 |
 | link       |                                   | varchar(255) | NO   |     |                     |                 |
index 5e994eca39f91f86b954a45d4ebff1b54013b6d6..080c9824cbe49a76504c72644c6bcdbf8ed723d6 100644 (file)
@@ -5,6 +5,6 @@ Table oembed
 | ------------ | ---------------------------------- | ------------ | ---- | --- | ------------------- | ----- |
 | url          | page url                           | varchar(255) | NO   | PRI | NULL                |       |
 | content      | OEmbed data of the page            | text         | NO   |     | NULL                |       |
-| created      | datetime of creation               | datetime     | NO   | MUL | 0000-00-00 00:00:00 |       |
+| created      | datetime of creation               | datetime     | NO   | MUL | 0001-01-01 00:00:00 |       |
 
 Return to [database documentation](help/database)
index ada42c2ea621505accf89e1ee1bee3d3eca864f3..343e5a8bed9c8b94de0b8044bcd73e8feae997bc 100644 (file)
@@ -7,6 +7,6 @@ Table parsed_url
 | guessing     | is the "guessing" mode active?     | tinyint(1)   | NO   | PRI | 0                   |       |
 | oembed       | is the data the result of oembed?  | tinyint(1)   | NO   | PRI | 0                   |       |
 | content      | page data                          | text         | NO   |     | NULL                |       |
-| created      | datetime of creation               | datetime     | NO   | MUL | 0000-00-00 00:00:00 |       |
+| created      | datetime of creation               | datetime     | NO   | MUL | 0001-01-01 00:00:00 |       |
 
 Return to [database documentation](help/database)
index 2d5bf0938e76e99d6cb0ab21c575cb3293ecfc10..2bb7473e214f1d4ad6c3333a476aeef88acf4e67 100644 (file)
@@ -8,8 +8,8 @@ Table photo
 | contact-id  | contact.id                                             | int(10) unsigned | NO   |     | 0                   |                 |
 | guid        | A unique identifier for this photo                     | varchar(64)      | NO   | MUL |                     |                 |
 | resource-id |                                                        | varchar(255)     | NO   | MUL |                     |                 |
-| created     | creation date                                          | datetime         | NO   |     | 0000-00-00 00:00:00 |                 |
-| edited      | last edited date                                       | datetime         | NO   |     | 0000-00-00 00:00:00 |                 |
+| created     | creation date                                          | datetime         | NO   |     | 0001-01-01 00:00:00 |                 |
+| edited      | last edited date                                       | datetime         | NO   |     | 0001-01-01 00:00:00 |                 |
 | title       |                                                        | varchar(255)     | NO   |     |                     |                 |
 | desc        |                                                        | text             | NO   |     | NULL                |                 |
 | album       | The name of the album to which the photo belongs       | varchar(255)     | NO   |     |                     |                 |
index fba351a2d93ece93c58b41eeabc0a539fdd7ebff..265eb1c58be9f89e862505e4ccbd372295e914b4 100644 (file)
@@ -10,7 +10,7 @@ Table profile
 | hide-friends | Hide friend list from viewers of this profile | tinyint(1)   | NO   |     | 0                   |                |
 | name         |                                               | varchar(255) | NO   |     |                     |                |
 | pdesc        | Title or description                          | varchar(255) | NO   |     |                     |                |
-| dob          | Day of birth                                  | varchar(32)  | NO   |     | 0000-00-00          |                |
+| dob          | Day of birth                                  | varchar(32)  | NO   |     | 0001-01-01          |                |
 | address      |                                               | varchar(255) | NO   |     |                     |                |
 | locality     |                                               | varchar(255) | NO   |     |                     |                |
 | region       |                                               | varchar(255) | NO   |     |                     |                |
@@ -20,7 +20,7 @@ Table profile
 | gender       |                                               | varchar(32)  | NO   |     |                     |                |
 | marital      |                                               | varchar(255) | NO   |     |                     |                |
 | with         |                                               | text         | NO   |     | NULL                |                |
-| howlong      |                                               | datetime     | NO   |     | 0000-00-00 00:00:00 |                |
+| howlong      |                                               | datetime     | NO   |     | 0001-01-01 00:00:00 |                |
 | sexual       |                                               | varchar(255) | NO   |     |                     |                |
 | politic      |                                               | varchar(255) | NO   |     |                     |                |
 | religion     |                                               | varchar(255) | NO   |     |                     |                |
index 44bb69c2ec4230a2f03eb0c0f562487768b078be..6b19f02f282ea8df769c975156a3c42509048e23 100644 (file)
@@ -6,8 +6,8 @@ Table queue
 | id      | sequential ID    | int(11)     | NO   | PRI | NULL                | auto_increment |
 | cid     |                  | int(11)     | NO   | MUL | 0                   |                |
 | network |                  | varchar(32) | NO   | MUL |                     |                |
-| created |                  | datetime    | NO   | MUL | 0000-00-00 00:00:00 |                |
-| last    |                  | datetime    | NO   | MUL | 0000-00-00 00:00:00 |                |
+| created |                  | datetime    | NO   | MUL | 0001-01-01 00:00:00 |                |
+| last    |                  | datetime    | NO   | MUL | 0001-01-01 00:00:00 |                |
 | content |                  | mediumtext  | NO   |     | NULL                |                |
 | batch   |                  | tinyint(1)  | NO   | MUL | 0                   |                |
 
index ac2769b9006f2c3138f0b9e3c54029f8c37916c0..974a2dc67391f7015c182892d719ab584b197c71 100644 (file)
@@ -5,7 +5,7 @@ Table register
 | -------- | ------------- | ---------------- | ---- | --- | ------------------- | --------------- |
 | id       | sequential ID | int(11) unsigned | NO   | PRI | NULL                | auto_increment  |
 | hash     |               | varchar(255)     | NO   |     |                     |                 |
-| created  |               | datetime         | NO   |     | 0000-00-00 00:00:00 |                 |
+| created  |               | datetime         | NO   |     | 0001-01-01 00:00:00 |                 |
 | uid      | user.id       | int(11) unsigned | NO   |     |                     |                 |
 | password |               | varchar(255)     | NO   |     |                     |                 |
 | language |               | varchar(16)      | NO   |     |                     |                 |
index f1428a68219726664d8d6d5019e454dcf2c65c52..dc27e1b471ee4ae3a9bd48d4778a28a8e750a197 100644 (file)
@@ -8,6 +8,6 @@ Table spam
 | spam  |             | int(11)      | NO   | MUL | 0                   |                 |
 | ham   |             | int(11)      | NO   | MUL | 0                   |                 |
 | term  |             | varchar(255) | NO   | MUL |                     |                 |
-| date  |             | datetime     | NO   |     | 0000-00-00 00:00:00 |                 |
+| date  |             | datetime     | NO   |     | 0001-01-01 00:00:00 |                 |
 
 Return to [database documentation](help/database)
index 0240685a0cd47336548339be04bcb52cc7fe9cbc..d18bf1c3b1958aed529b9db72c505bc271d54476 100644 (file)
@@ -12,8 +12,8 @@ Table term
 | aid      |               | int(10) unsigned    | NO   |     | 0                   |                |
 | uid      |               | int(10) unsigned    | NO   | MUL | 0                   |                |
 | guid     |               | varchar(255)        | NO   | MUL |                     |                |
-| created  |               | datetime            | NO   |     | 0000-00-00 00:00:00 |                |
-| received |               | datetime            | NO   |     | 0000-00-00 00:00:00 |                |
+| created  |               | datetime            | NO   |     | 0001-01-01 00:00:00 |                |
+| received |               | datetime            | NO   |     | 0001-01-01 00:00:00 |                |
 | global   |               | tinyint(1)          | NO   |     | 0                   |                |
 
 Return to [database documentation](help/database)
index d6484b76097ca432436737477d8b1622656ccf90..13b70b4511006a406407dc6e83fdd1bc7cac0c6c 100644 (file)
@@ -9,11 +9,11 @@ Table thread
 | gcontact-id | Global Contact   | int(11) unsigned | NO   |     | 0                   |       |
 | owner-id    | Item owner       | int(11) unsigned | NO   | MUL | 0                   |       |
 | author-id   | Item author      | int(11) unsigned | NO   | MUL | 0                   |       |
-| created     |                  | datetime         | NO   | MUL | 0000-00-00 00:00:00 |       |
-| edited      |                  | datetime         | NO   |     | 0000-00-00 00:00:00 |       |
-| commented   |                  | datetime         | NO   | MUL | 0000-00-00 00:00:00 |       |
-| received    |                  | datetime         | NO   |     | 0000-00-00 00:00:00 |       |
-| changed     |                  | datetime         | NO   |     | 0000-00-00 00:00:00 |       |
+| created     |                  | datetime         | NO   | MUL | 0001-01-01 00:00:00 |       |
+| edited      |                  | datetime         | NO   |     | 0001-01-01 00:00:00 |       |
+| commented   |                  | datetime         | NO   | MUL | 0001-01-01 00:00:00 |       |
+| received    |                  | datetime         | NO   |     | 0001-01-01 00:00:00 |       |
+| changed     |                  | datetime         | NO   |     | 0001-01-01 00:00:00 |       |
 | wall        |                  | tinyint(1)       | NO   | MUL | 0                   |       |
 | private     |                  | tinyint(1)       | NO   |     | 0                   |       |
 | pubmail     |                  | tinyint(1)       | NO   |     | 0                   |       |
index 21ca211d731fc98f7b2c7e0bada1d9955f6b5bec..e9306f8c5a9f2228bc05f8657cd122732219705c 100644 (file)
@@ -12,8 +12,8 @@ Table user
 | openid                   |                                                                                         | varchar(255)        | NO   |     |                     |                |
 | timezone                 | PHP-legal timezone                                                                      | varchar(128)        | NO   |     |                     |                |
 | language                 | default language                                                                        | varchar(32)         | NO   |     | en                  |                |
-| register_date            | timestamp of registration                                                               | datetime            | NO   |     | 0000-00-00 00:00:00 |                |
-| login_date               | timestamp of last login                                                                 | datetime            | NO   |     | 0000-00-00 00:00:00 |                |
+| register_date            | timestamp of registration                                                               | datetime            | NO   |     | 0001-01-01 00:00:00 |                |
+| login_date               | timestamp of last login                                                                 | datetime            | NO   |     | 0001-01-01 00:00:00 |                |
 | default-location         | Default for item.location                                                               | varchar(255)        | NO   |     |                     |                |
 | allow_location           | 1 allows to display the location                                                        | tinyint(1)          | NO   |     | 0                   |                |
 | theme                    | user theme preference                                                                   | varchar(255)        | NO   |     |                     |                |
@@ -36,8 +36,8 @@ Table user
 | expire                   |                                                                                         | int(11) unsigned    | NO   |     | 0                   |                |
 | account_removed          | if 1 the account is removed                                                             | tinyint(1)          | NO   |     | 0                   |                |
 | account_expired          |                                                                                         | tinyint(1)          | NO   |     | 0                   |                |
-| account_expires_on       | timestamp when account expires and will be deleted                                      | datetime            | NO   |     | 0000-00-00 00:00:00 |                |
-| expire_notification_sent | timestamp of last warning of account expiration                                         | datetime            | NO   |     | 0000-00-00 00:00:00 |                |
+| account_expires_on       | timestamp when account expires and will be deleted                                      | datetime            | NO   |     | 0001-01-01 00:00:00 |                |
+| expire_notification_sent | timestamp of last warning of account expiration                                         | datetime            | NO   |     | 0001-01-01 00:00:00 |                |
 | service_class            | service class for this account, determines what if any limits/restrictions are in place | varchar(32)         | NO   |     |                     |                |
 | def_gid                  |                                                                                         | int(11)             | NO   |     | 0                   |                |
 | allow_cid                | default permission for this user                                                        | mediumtext          | NO   |     | NULL                |                |
index b1f5245aeaa467c5b9c2d434006d0c6becbd61fc..8ab68466be9f02a9e03467a6a20ec95c00cb8b03 100644 (file)
@@ -6,8 +6,8 @@ Table workerqueue
 | id        | sequential ID    | int(11)             | NO   | PRI | NULL                | auto_increment |
 | parameter |                  | text                | NO   |     | NULL                |                |
 | priority  |                  | tinyint(3) unsigned | NO   |     | 0                   |                |
-| created   |                  | datetime            | NO   | MUL | 0000-00-00 00:00:00 |                |
+| created   |                  | datetime            | NO   | MUL | 0001-01-01 00:00:00 |                |
 | pid       |                  | int(11)             | NO   |     | 0                   |                |
-| executed  |                  | datetime            | NO   |     | 0000-00-00 00:00:00 |                |
+| executed  |                  | datetime            | NO   |     | 0001-01-01 00:00:00 |                |
 
 Return to [database documentation](help/database)
index 68e17adc787b19d9be28dc4e5f8b2a192a91b762..a6390505553c93d2d171d1ce501d865b5e7dfba7 100644 (file)
@@ -126,6 +126,10 @@ Wildcards werden akzeptiert (Wildcard-Unterstützung unter Windows benötigt PHP
 Webb du die Option `Nutzern erlauben das remote_self Flag zu setzen` aktivierst, können alle Nutzer Atom Feeds in den erweiterten Einstellungen des Kontakts als "Entferntes Konto" markieren.
 Dadurch werden automatisch alle Beiträge dieser Feeds für diesen Nutzer gespiegelt und an die Kontakte bei Friendica verteilt.
 
+Dieses Feature kann z.B. dafür genutzt werden Blogbeiträge zu spiegeln.
+In der Grundeinstellung ist es nicht aktiviert, da es zusätzliche Last auf dem Server verursachen kann.
+Außerdem könnte es durch Nutzer als Spam Verteiler missbraucht werden.
+
 Als Administrator der Friendica Instanz kannst du diese Einstellungen ansonsten nur direkt in der Datenbank vornehmen.
 Bevor du das tust solltest du sicherstellen, dass du ein Backup der Datenbank hast und genau weißt was die Änderungen an der Datenbank bewirken, die du vornehmen willst.
 
@@ -162,6 +166,19 @@ Das führt dazu, dass du keinerlei Verbindung zu einer selbst unterzeichneten SS
 
 ### Worker
 
+In diesem Abschnitt kann der Hintergrund-Prozess konfiguriert werden.
+Bevor ein neuer *Worker* Prozess gestartet wird, überprüft das System, dass die vorhandenen Resourchen ausrechend sind,
+Aus diesem Grund kann es sein, dass die maximale Zahl der Hintergrungprozesse nicht erreicht wird.
+
+Sollte die PHP Funktion `proc_open` auf dem Server nicht verfügbar sein, kann die Verwendung durch Friendica hier unterbunden werden.
+
+Die Aufgaben die im Hintergrund erledigt werden, haben Prioritäten zugeteilt.
+Um garantieren zu können, das wichtige Prozesse schnellst möglich abgearbeitet werden können, selbst wenn das System gerade stark belastet ist, sollte die *fastlane* aktiviert sein.
+
+Wenn es auf deinem Server nicht möglich ist, einen cron Job zu starten, kannst du den *frontend* Worker einschalten.
+Nachdem dies geschehen ist, kannst du `example.com/worker` (tausche example.com mit dem echten Domainnamen aus) aufrufen werden.
+Dadurch werden dann die Aufgaben aktiviert, die der cron Job sonst aktivieren würde.
+
 ### Umsiedeln
 
 ## Nutzer
index 45080e44d0fd9a3f92e4d53417184634a7a1a957..8ee0ff7702f5dfc61d18e204d60478919cc05946 100644 (file)
@@ -7,7 +7,7 @@
 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
 /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
 /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
-/*!40101 SET NAMES utf8 */;
+/*!40101 SET NAMES utf8mb4 */;
 /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
 /*!40103 SET TIME_ZONE='+00:00' */;
 /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
@@ -19,7 +19,7 @@
 -- Current Database: `friendica`
 --
 
-CREATE DATABASE /*!32312 IF NOT EXISTS*/ `friendica` /*!40100 DEFAULT CHARACTER SET latin1 */;
+CREATE DATABASE /*!32312 IF NOT EXISTS*/ `friendica` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci */;
 
 USE `friendica`;
 
@@ -29,7 +29,7 @@ USE `friendica`;
 
 DROP TABLE IF EXISTS `addon`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+/*!40101 SET character_set_client = utf8mb4 */;
 CREATE TABLE `addon` (
   `id` int(11) NOT NULL AUTO_INCREMENT,
   `name` varchar(255) NOT NULL DEFAULT '',
@@ -39,7 +39,7 @@ CREATE TABLE `addon` (
   `timestamp` bigint(20) NOT NULL DEFAULT '0',
   `plugin_admin` tinyint(1) NOT NULL DEFAULT '0',
   PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -57,7 +57,7 @@ UNLOCK TABLES;
 
 DROP TABLE IF EXISTS `attach`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+/*!40101 SET character_set_client = utf8mb4 */;
 CREATE TABLE `attach` (
   `id` int(11) NOT NULL AUTO_INCREMENT,
   `uid` int(11) NOT NULL DEFAULT '0',
@@ -66,14 +66,14 @@ CREATE TABLE `attach` (
   `filetype` varchar(64) NOT NULL DEFAULT '',
   `filesize` int(11) NOT NULL DEFAULT '0',
   `data` longblob NOT NULL,
-  `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
-  `edited` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+  `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
+  `edited` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
   `allow_cid` mediumtext NOT NULL,
   `allow_gid` mediumtext NOT NULL,
   `deny_cid` mediumtext NOT NULL,
   `deny_gid` mediumtext NOT NULL,
   PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -91,7 +91,7 @@ UNLOCK TABLES;
 
 DROP TABLE IF EXISTS `auth_codes`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+/*!40101 SET character_set_client = utf8mb4 */;
 CREATE TABLE `auth_codes` (
   `id` varchar(40) NOT NULL,
   `client_id` varchar(20) NOT NULL DEFAULT '',
@@ -99,7 +99,7 @@ CREATE TABLE `auth_codes` (
   `expires` int(11) NOT NULL DEFAULT '0',
   `scope` varchar(250) NOT NULL DEFAULT '',
   PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -117,14 +117,14 @@ UNLOCK TABLES;
 
 DROP TABLE IF EXISTS `cache`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+/*!40101 SET character_set_client = utf8mb4 */;
 CREATE TABLE `cache` (
   `k` varchar(255) NOT NULL,
   `v` text NOT NULL,
-  `updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+  `updated` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
   PRIMARY KEY (`k`),
   KEY `updated` (`updated`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -143,7 +143,7 @@ UNLOCK TABLES;
 
 DROP TABLE IF EXISTS `challenge`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+/*!40101 SET character_set_client = utf8mb4 */;
 CREATE TABLE `challenge` (
   `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
   `challenge` varchar(255) NOT NULL DEFAULT '',
@@ -152,7 +152,7 @@ CREATE TABLE `challenge` (
   `type` varchar(255) NOT NULL DEFAULT '',
   `last_update` varchar(255) NOT NULL DEFAULT '',
   PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -170,7 +170,7 @@ UNLOCK TABLES;
 
 DROP TABLE IF EXISTS `clients`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+/*!40101 SET character_set_client = utf8mb4 */;
 CREATE TABLE `clients` (
   `client_id` varchar(20) NOT NULL,
   `pw` varchar(20) NOT NULL DEFAULT '',
@@ -179,7 +179,7 @@ CREATE TABLE `clients` (
   `icon` text,
   `uid` int(11) NOT NULL DEFAULT '0',
   PRIMARY KEY (`client_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -197,7 +197,7 @@ UNLOCK TABLES;
 
 DROP TABLE IF EXISTS `config`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+/*!40101 SET character_set_client = utf8mb4 */;
 CREATE TABLE `config` (
   `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
   `cat` varchar(255) NOT NULL DEFAULT '',
@@ -205,7 +205,7 @@ CREATE TABLE `config` (
   `v` text NOT NULL,
   PRIMARY KEY (`id`),
   KEY `cat_k` (`cat`(30),`k`(30))
-) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -224,11 +224,11 @@ UNLOCK TABLES;
 
 DROP TABLE IF EXISTS `contact`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+/*!40101 SET character_set_client = utf8mb4 */;
 CREATE TABLE `contact` (
   `id` int(11) NOT NULL AUTO_INCREMENT,
   `uid` int(11) NOT NULL DEFAULT '0',
-  `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+  `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
   `self` tinyint(1) NOT NULL DEFAULT '0',
   `remote_self` tinyint(1) NOT NULL DEFAULT '0',
   `rel` tinyint(1) NOT NULL DEFAULT '0',
@@ -264,12 +264,12 @@ CREATE TABLE `contact` (
   `usehub` tinyint(1) NOT NULL DEFAULT '0',
   `subhub` tinyint(1) NOT NULL DEFAULT '0',
   `hub-verify` varchar(255) NOT NULL DEFAULT '',
-  `last-update` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
-  `success_update` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
-  `name-date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
-  `uri-date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
-  `avatar-date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
-  `term-date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+  `last-update` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
+  `success_update` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
+  `name-date` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
+  `uri-date` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
+  `avatar-date` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
+  `term-date` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
   `priority` tinyint(3) NOT NULL DEFAULT '0',
   `blocked` tinyint(1) NOT NULL DEFAULT '1',
   `readonly` tinyint(1) NOT NULL DEFAULT '0',
@@ -285,13 +285,13 @@ CREATE TABLE `contact` (
   `info` mediumtext NOT NULL,
   `profile-id` int(11) NOT NULL DEFAULT '0',
   `bdyear` varchar(4) NOT NULL DEFAULT '',
-  `bd` date NOT NULL DEFAULT '0000-00-00',
+  `bd` date NOT NULL DEFAULT '0001-01-01',
   `notify_new_posts` tinyint(1) NOT NULL DEFAULT '0',
   `fetch_further_information` tinyint(1) NOT NULL DEFAULT '0',
   `ffi_keyword_blacklist` mediumtext NOT NULL,
   PRIMARY KEY (`id`),
   KEY `uid` (`uid`)
-) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb4;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -300,7 +300,7 @@ CREATE TABLE `contact` (
 
 LOCK TABLES `contact` WRITE;
 /*!40000 ALTER TABLE `contact` DISABLE KEYS */;
-INSERT INTO `contact` VALUES (1,1,'2015-02-02 11:24:17',1,0,0,0,'','admin','admin','','','','','','http://192.168.22.10/photo/profile/1.jpg','http://192.168.22.10/photo/avatar/1.jpg','http://192.168.22.10/photo/micro/1.jpg','','','','http://192.168.22.10/profile/admin','http://192.168.22.10/profile/admin','','','','','','http://192.168.22.10/dfrn_request/admin','http://192.168.22.10/dfrn_notify/admin','http://192.168.22.10/dfrn_poll/admin','http://192.168.22.10/dfrn_confirm/admin','http://192.168.22.10/poco/admin',0,0,0,0,'','0000-00-00 00:00:00','0000-00-00 00:00:00','2015-02-02 11:24:17','2015-02-02 11:24:17','2015-02-02 11:24:17','0000-00-00 00:00:00',0,0,0,0,0,0,0,0,0,0,'',0,'',0,'','0000-00-00',0,0,''),(2,2,'2015-02-02 12:02:11',1,0,0,0,'','friendica1','friendica1','','','','','','http://192.168.22.10/photo/profile/2.jpg','http://192.168.22.10/photo/avatar/2.jpg','http://192.168.22.10/photo/micro/2.jpg','','','','http://192.168.22.10/profile/friendica1','http://192.168.22.10/profile/friendica1','','','','','','http://192.168.22.10/dfrn_request/friendica1','http://192.168.22.10/dfrn_notify/friendica1','http://192.168.22.10/dfrn_poll/friendica1','http://192.168.22.10/dfrn_confirm/friendica1','http://192.168.22.10/poco/friendica1',0,0,0,0,'','0000-00-00 00:00:00','0000-00-00 00:00:00','2015-02-02 12:02:11','2015-02-02 12:02:11','2015-02-02 12:02:11','0000-00-00 00:00:00',0,0,0,0,0,0,0,0,0,0,'',0,'',0,'','0000-00-00',0,0,''),(3,3,'2015-02-02 12:02:40',1,0,0,0,'','friendica2','friendica2','','','','','','http://192.168.22.10/photo/profile/3.jpg','http://192.168.22.10/photo/avatar/3.jpg','http://192.168.22.10/photo/micro/3.jpg','','','','http://192.168.22.10/profile/friendica2','http://192.168.22.10/profile/friendica2','','','','','','http://192.168.22.10/dfrn_request/friendica2','http://192.168.22.10/dfrn_notify/friendica2','http://192.168.22.10/dfrn_poll/friendica2','http://192.168.22.10/dfrn_confirm/friendica2','http://192.168.22.10/poco/friendica2',0,0,0,0,'','0000-00-00 00:00:00','0000-00-00 00:00:00','2015-02-02 12:02:40','2015-02-02 12:02:40','2015-02-02 12:02:40','0000-00-00 00:00:00',0,0,0,0,0,0,0,0,0,0,'',0,'',0,'','0000-00-00',0,0,''),(4,4,'2015-02-02 12:03:07',1,0,0,0,'','friendica3','friendica3','','','','','','http://192.168.22.10/photo/profile/4.jpg','http://192.168.22.10/photo/avatar/4.jpg','http://192.168.22.10/photo/micro/4.jpg','','','','http://192.168.22.10/profile/friendica3','http://192.168.22.10/profile/friendica3','','','','','','http://192.168.22.10/dfrn_request/friendica3','http://192.168.22.10/dfrn_notify/friendica3','http://192.168.22.10/dfrn_poll/friendica3','http://192.168.22.10/dfrn_confirm/friendica3','http://192.168.22.10/poco/friendica3',0,0,0,0,'','0000-00-00 00:00:00','0000-00-00 00:00:00','2015-02-02 12:03:07','2015-02-02 12:03:07','2015-02-02 12:03:07','0000-00-00 00:00:00',0,0,0,0,0,0,0,0,0,0,'',0,'',0,'','0000-00-00',0,0,''),(5,5,'2015-02-02 12:04:06',1,0,0,0,'','friendica5','friendica5','','','','','','http://192.168.22.10/photo/profile/5.jpg','http://192.168.22.10/photo/avatar/5.jpg','http://192.168.22.10/photo/micro/5.jpg','','','','http://192.168.22.10/profile/friendica5','http://192.168.22.10/profile/friendica5','','','','','','http://192.168.22.10/dfrn_request/friendica5','http://192.168.22.10/dfrn_notify/friendica5','http://192.168.22.10/dfrn_poll/friendica5','http://192.168.22.10/dfrn_confirm/friendica5','http://192.168.22.10/poco/friendica5',0,0,0,0,'','0000-00-00 00:00:00','0000-00-00 00:00:00','2015-02-02 12:04:06','2015-02-02 12:04:06','2015-02-02 12:04:06','0000-00-00 00:00:00',0,0,0,0,0,0,0,0,0,0,'',0,'',0,'','0000-00-00',0,0,''),(6,6,'2015-02-02 12:04:29',1,0,0,0,'','friendica4','friendica4','','','','','','http://192.168.22.10/photo/profile/6.jpg','http://192.168.22.10/photo/avatar/6.jpg','http://192.168.22.10/photo/micro/6.jpg','','','','http://192.168.22.10/profile/friendica4','http://192.168.22.10/profile/friendica4','','','','','','http://192.168.22.10/dfrn_request/friendica4','http://192.168.22.10/dfrn_notify/friendica4','http://192.168.22.10/dfrn_poll/friendica4','http://192.168.22.10/dfrn_confirm/friendica4','http://192.168.22.10/poco/friendica4',0,0,0,0,'','0000-00-00 00:00:00','0000-00-00 00:00:00','2015-02-02 12:04:29','2015-02-02 12:04:29','2015-02-02 12:04:29','0000-00-00 00:00:00',0,0,0,0,0,0,0,0,0,0,'',0,'',0,'','0000-00-00',0,0,''),(7,4,'2015-02-02 18:41:17',0,0,3,1,'dfrn','friendica2','friendica2','','','','','','http://192.168.22.10/photo/343e3e9f0f5a36ea763c101490db9ca6-4.jpg','http://192.168.22.10/photo/343e3e9f0f5a36ea763c101490db9ca6-5.jpg','http://192.168.22.10/photo/343e3e9f0f5a36ea763c101490db9ca6-6.jpg','-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA4QpA4flE9v17fh+yrMpR\nU4iKSxLOF/8ROTotrdQsk8HcHkPS7E60QUaRK45gDc9O+7FU1+90V+oo0BqdkJFL\nbFtTogP5fdNSD3ApHz7s03oBX9JenU/8JhxaH1VwEs3lLDlFrywngiYcEDZIeLGZ\nIFK1GWP79+ZwJ9WWoBhzCD4hg4excOWPwwQMjCLYAzI5INEPTw+R3CKD6EsnVLu0\nS+u3zBBsL/A+bgDDfgZoD6igJQlvenK5jStgfbiuVp1mqdXKJ8D+rYz5FQ72Yn3r\nn6AvrXcPQMbLSaUK5m1Ug7beasuhRJ5Z7TVtJ/RLNgA3mOX2A2Vy1i38VYmcTaG5\nom8AYeI/nSvMzJt7FYXOBdxKnSW0UhkXsjBQavefz7sp2Lhcw5U+7eaPi2fIkYio\nVHKU2r8uiJPFfUMAbHA2+rScBjn2lYZH0nfMKrZTzva7y6d19EOsO2aP5e4XNjU8\n0tX/C1iy6LPMCf7xG844iROXi7NPJJoTgx/Sl6+o0oqBl9J5wJDK5U33rUSqYI/p\nsPEfaStqA5CgBAvAsq0N+NQQndJzGfuYaIdfleyUSLIchHhEICE4SN62RHZ6VTlg\nIVCva4xdBrGlkGV/IgE228FwgX4GWELclfUH/KwcGHChlY8dTtVZHbTCuizvPLvl\nXuZQ9ROdQiwkYwGJA/bhM3kCAwEAAQ==\n-----END PUBLIC KEY-----\n','af2c1bff1518afaf2df6d3600a7f2f036cc758f0044c4c3c7649cf53edcb4faa','','http://192.168.22.10/profile/friendica2','http://192.168.22.10/profile/friendica2','','','','-----BEGIN PRIVATE KEY-----\nMIIJQwIBADANBgkqhkiG9w0BAQEFAASCCS0wggkpAgEAAoICAQCp8Dy/Kp04TBGT\n4n0FpcvC2VuOXQb62qzikK7x7PXny/ObmM0L/Ew5tw71qsOnZECDy6tcow7NAMxQ\nbrALF/xJexHxVPBTj4RYxLIPGCzxFhTWYhzWm+R4pYOsvfqJJ7X6Re9Qc6NXb7U9\nAnrHYjJgHAA9POPDE5JOE+6Z9P0zzCpLIJi+pjm49CKu7VXLwQR25lKmjyXq6EDj\nYIk/WkzhBsiknaA9Rg7IDM0ssp820i8SRr3GQLyMfyTNPCIqB3lejaDZNpyo9AEI\nSGuc8O2ei9LJ/cg6aWR1D4hZxMg4LzZneggrh9jdZhyED+ZPhWtpp179T8KhxMqP\ng5Z+EZr2RIHwBiSbcuzGZQ1QgQb57/gJTsKlKWGHptdg1H/KxHGlexylpIF5X5pQ\nPLxBcmE3VtxJEIUP9Sf1/11DBrCl6ZQ1xhBiD31MGqz3pJiR5k2gQBalqPlVODPY\nBlaOTPS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p+Gl3bqq1i3ri\nnTpmvn3IbYdxYX6pjeDyQhIdaWuoNHYFeu2UDWbdoEvQwL8a9x4zxxDU2qKCbKnY\nNlCQolpeP/lrWLNKMxIZ4FRHCzlU0f24PKiF1I2Tnw17MoK7XFWNvZREkWh6A5Gq\nd+eIPuEgL0icNfYWc9Ckv4fuywLe9lrF2VqdeZoPctOBYNlNVsZgJD4vieKGmw4G\nOqkCggEBALkyBL734pf4dlyKmZeTGvv3Y8f45QmJSivGIksuTBDSF5MSLOL5hQwX\nnTnbi48X2fmFxfuPxkO4fhAjioVG0HXwr9+6CTYQmi6MK6lfFEKAh6JNO45GBRuO\nCWbsFUIrIcPULYkArtyeVz7bWs0yWUpzguddO1ekso3bZlk3fPp5Kt5b1wJAkz56\nPsYvAp9oLG0Pc1wPDJVBocsDtDVnZCxxz/rViuajut84llz5/9l0iGzB4bJrA2uG\nVX0A1gkaHRb3VdpF4856/pJAoH2ljh1U+5iquHBuvvK4vMxFeN+1fVm9c/Ksb2OU\ndLrR3o8mxnuDuIMDIUjpEZaR+FYKCSQ=\n-----END PRIVATE KEY-----\n','','http://192.168.22.10/dfrn_request/friendica2','http://192.168.22.10/dfrn_notify/friendica2','http://192.168.22.10/dfrn_poll/friendica2','http://192.168.22.10/dfrn_confirm/friendica2','http://192.168.22.10/poco/friendica2',0,0,0,0,'','2015-02-02 18:50:08','2015-02-02 18:50:08','2015-02-02 18:50:08','2015-02-02 18:41:48','2015-02-02 18:41:48','0000-00-00 00:00:00',0,0,0,1,0,0,0,0,0,0,'',99,'',0,'','0000-00-00',0,0,''),(8,3,'2015-02-02 18:41:21',0,0,3,1,'dfrn','friendica3','friendica3','','','','','','http://192.168.22.10/photo/1f4766db71f0f2d503287947c1d67dcd-4.jpg','http://192.168.22.10/photo/1f4766db71f0f2d503287947c1d67dcd-5.jpg','http://192.168.22.10/photo/1f4766db71f0f2d503287947c1d67dcd-6.jpg','-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAliSi9id9Ll1dpzXC/lL6\n2/5FYxdn0XYb5I2JeXBNopwbXOLDsnnzXlV2NN8riZaYRQcIbS00OuAvyYj/IG3i\nDykD2zPjVnLEWADtj1YhLSgKcfQgv6Cj/7CPdb1Rg3icbvWdVY9wabcblVa9k+qr\ngK273C47lCQzXgvMtPst1DOzxtVCGmPJJHKjXZ8hDvf/IS0pVGa0zIv9kdofqQV9\nD5u5LuNzRuEGnrpAzpfzMueDppBrrrr37sKrZfCvyYHZ/ouFgZ3bY9NNVnjuFItP\nrcDlJPL8NhGmmzuYtI03MLor+1yVdBKLIJ3G2Bxzn5tynjSX9XZzOQgC3+YVH4TU\n7WDUHjTWJ9mliD2M1WXCp2Lwc/pV1Prnvv057pAqdiMhnddzucV9nLk9X9fR8xyy\nC7PRwx0hkB427EtAYaOTr3RtInP6+cm+3M7wd6ZKTqWAU+Pi20RNrQRsqfHJ7+hx\n+i5rIG6/knB/C+MAAutEH25oY8kJYtJzXid2OBSE462DTuYaee9aGHUDNy+HQau8\nBhJ4/Wsc7Nf/7GRZ38SVT/HQShl47B1AG5AyomyWgwn9J2KJ8kMuScPmBv5u7Mwq\nSjLk5pLkwyUtZwUu8UtsFKw9HLcRksGSze5s2cbw3rf/6jgKycT72Bfm1fjRnv6s\nXt1GdSzfG9zVHuEwRDgTX3UCAwEAAQ==\n-----END PUBLIC KEY-----\n','','af2c1bff1518afaf2df6d3600a7f2f036cc758f0044c4c3c7649cf53edcb4faa','http://192.168.22.10/profile/friendica3','http://192.168.22.10/profile/friendica3','','','-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAqfA8vyqdOEwRk+J9BaXL\nwtlbjl0G+tqs4pCu8ez158vzm5jNC/xMObcO9arDp2RAg8urXKMOzQDMUG6wCxf8\nSXsR8VTwU4+EWMSyDxgs8RYU1mIc1pvkeKWDrL36iSe1+kXvUHOjV2+1PQJ6x2Iy\nYBwAPTzjwxOSThPumfT9M8wqSyCYvqY5uPQiru1Vy8EEduZSpo8l6uhA42CJP1pM\n4QbIpJ2gPUYOyAzNLLKfNtIvEka9xkC8jH8kzTwiKgd5Xo2g2TacqPQBCEhrnPDt\nnovSyf3IOmlkdQ+IWcTIOC82Z3oIK4fY3WYchA/mT4Vraade/U/CocTKj4OWfhGa\n9kSB8AYkm3LsxmUNUIEG+e/4CU7CpSlhh6bXYNR/ysRxpXscpaSBeV+aUDy8QXJh\nN1bcSRCFD/Un9f9dQwawpemUNcYQYg99TBqs96SYkeZNoEAWpaj5VTgz2AZWjkz0\nuXbgm1E5/g6kfvIoACU7MP3SGtcTqEY7TAeZzcq4oyCB2YoBf9w7Z5zBKNYjSRVI\nEa/kegdbJcvFtqhY4FZZ+MmyXX/B1fFFhjUe4WaMzxupVNeQnmwHh+2RFdRVEXNE\n9ch2CQ1iF2rqJ69hvKviZAsefbTErs2+CcDo3xF4FFgKUk2stSjVyHNf8yWL+E2m\nnOlQAAH+DA7w28kTeT++o+0CAwEAAQ==\n-----END PUBLIC KEY-----\n','','','http://192.168.22.10/dfrn_request/friendica3','http://192.168.22.10/dfrn_notify/friendica3','http://192.168.22.10/dfrn_poll/friendica3','http://192.168.22.10/dfrn_confirm/friendica3','http://192.168.22.10/poco/friendica3',1,0,0,0,'','2015-02-02 18:50:03','2015-02-02 18:50:03','2015-02-02 18:50:03','2015-02-02 18:41:48','2015-02-02 18:41:48','0000-00-00 00:00:00',0,0,0,1,0,0,0,0,0,0,'',99,'',0,'','0000-00-00',0,0,''),(9,6,'2015-02-02 18:44:07',0,0,3,1,'dfrn','friendica5','friendica5','','','','','','http://192.168.22.10/photo/75b60a2a1e6b2cdf2eb3637955a7a5c2-4.jpg','http://192.168.22.10/photo/75b60a2a1e6b2cdf2eb3637955a7a5c2-5.jpg','http://192.168.22.10/photo/75b60a2a1e6b2cdf2eb3637955a7a5c2-6.jpg','-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAyvuTsaZaTgPDm69uxixR\n8qd0ylkeA/IY3KDsI4vjrLuF7WLmU07lzQXmilQJ+MlipIju+wFXx3a8ksavEYpP\n9ZU9YrpXe7zneHRLTxgMDH9IMbSCIUAkEsozpzF02Ft0+G36tzIET2oTuU6uLtx6\nI5ifmF/qFC+4avAoABQg8qfOPpuaP3AJ6FppqEifUsb0lTWqP4zg7PQXC36oKIJ0\nUDuQniVy8lTxVfkhoi/aHZw0khVXe6tDK7C0ALg5U7jLTDNdJ1R0v5iC41QK4CEt\n5x4x008mdk6xLKGZiou1UuEPv/+WSQU1Q21JFzNVGBASkRu7dUVH6k+59VQr3ONI\n5bdbAZviVY3ezFNtBeWWfDk06BWoZwX67eGG/dVsCPnEkuP9CpemcwwGZbYCIqf0\n++5h0CU41CjNShHdBD+Q+ZQmT3I4sAlPZ7x90nA9KfuKM9QyTPQ9EmK2bxq7TKvV\nzLqHptL5mC/VH4FbO1eKf7p/f7XxOaeXGANUaRSPwLSO7lk8lkl/wj7sNJYGYygC\nMLTqH8GTizpyPkSDv5xO6bYn/g3BYFuUM5x1MZVS8MdG2a3L8UzRiXUsm/AjnfSV\nImN2+8bHJI0wy9zRxfEaG8pvbupb7UU5zWr3WRkSVr84Bq1SJNxLfWZj3GHLaesr\nu3exEdYGfxLuG1zHIROVwlcCAwEAAQ==\n-----END PUBLIC KEY-----\n','','1457f73164eefae32c107b310f3720c83bb5c7f9df88de0114714f4c77055337','http://192.168.22.10/profile/friendica5','http://192.168.22.10/profile/friendica5','','','-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA4HA9qXSYftx7tS6kTVvs\nBhVx7hPK57GIpUU6azuFGqmrAqEEsBh2+oLTDzYGvq7UW5NAbL6QdvoFkJC4tTJK\nwfMO7noAhBzzrLpGjJn6W1v7OaGX1VAQM32+dqgUP7aJF91DKx8nCcAqo8yPp4gr\nUe1Ev5Yrsa9so6XRXEI0n7PHTgRir8HIAHC4sDl1THuUdahD0q5hy+7ymyUHHEsF\nJJIC4zCuFNGdk2wqDdG534FAU5CKOL/OZW1n9vbumU8zwk3hdt5rmzxyxx6ji9KU\nJiSLSErGLo0xQklT2N+DND61SgSqKk2JDmnD6NtCb9u9Q06E+jpT4mKrTrxURqa0\nQ0So/7ZbJJWb2y7Yd7KTN8pvVzC3Set9+YXH8EVypVsAW/Io6KoUiFEuJhp1291R\nVXjt4opm3unxNVCYnl/Ui/p0mw9QjuaEx9/7Iu/RUKjXFWzqmzpXEinfVk6rscC5\nTJn7BAZFkhZD85YSmSuPkDbtiAS99uIyO2jaD1G29lkVzdG74KW54r2Np6rIOgqK\n4Gsr8H7LM/R03jBMPCjHtWT0bOyT6ySzqdq9YHsW/9Fr5uBL5EeOuL/xKuRNaaQs\nIflXwfcb35ouz5PDeP3T8m1tBhwWN2kiWVCiQuRQINhG1vFHU28Yof3XAQ3iWiV+\nfPp/WfEiQ/HnkJdmlwq82eECAwEAAQ==\n-----END PUBLIC KEY-----\n','','','http://192.168.22.10/dfrn_request/friendica5','http://192.168.22.10/dfrn_notify/friendica5','http://192.168.22.10/dfrn_poll/friendica5','http://192.168.22.10/dfrn_confirm/friendica5','http://192.168.22.10/poco/friendica5',0,1,0,0,'','2015-02-02 18:50:05','2015-02-02 18:50:05','2015-02-02 18:50:05','2015-02-02 18:45:30','2015-02-02 18:45:30','0000-00-00 00:00:00',0,0,0,1,0,0,0,0,0,0,'',99,'',0,'','0000-00-00',0,0,''),(10,5,'2015-02-02 18:45:10',0,0,3,1,'dfrn','friendica4','friendica4','','','','','','http://192.168.22.10/photo/d04134664ffd0d558b08ee01f6859f3a-4.jpg','http://192.168.22.10/photo/d04134664ffd0d558b08ee01f6859f3a-5.jpg','http://192.168.22.10/photo/d04134664ffd0d558b08ee01f6859f3a-6.jpg','-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA3nCYawg+HTyQgV7a7Osg\nCXeACOitKLhcb2WDTN/lLOMO7n1lSm3Kdv1dbOc0/lkAPeB2XsLF/aDfoUPWWg4Q\n/oRPrXFIi2dK/cIQVvgOhebQheztAYPJyaYYMWVK7bLbPuKVTyzALqkWD8Zjjtit\n4Uvm3kjmcofKr+/Lw+VFaEBMESQDbP5eTDtQeDGGjluWQMj1/D+V/Tcm+SMrAVIv\njyklQEhBJlYGJ+LsfXv4XXbeH73dkIXkQW5JgWQyPCloJ+PxmmjjEDozsdgmFQXq\n6T9HFVHvW2O2lmDoaTrbIGrULWBpslKZJJrV+LgtkzhP4uuKfJPD2DpMJ4+ixtBE\nzM/o+EuYDTz0P3dTvwruq1t8gUYcQOVUzEp1LM0qYDMVY86XneW1W5xghztl5zqy\nGBMBvjVIFvMVL1cVeXze4zpwwKln2cArepToSpN7lmy9EgBd9mZrVLWosZShB9R0\n05kBc2Tfv7FlixwZ1P8rwJn9sEEs9oa6TnRLL+7L8eqapg6vUI1G7e0HWWEjdHsR\nrYVHYW+ogtOYjrQ1Tfh1W2PtNaez5fGYVBDjC+1vy0scJmqrgy00z7MHBT2WTOAL\noHbdedhpa3UZ0FrsCto+vqil8BcF5aBhi2Hi5YdKtbY3EBsaabcSO2joc7rlmee4\nxdKfDRYXCPysFPhZNgIW708CAwEAAQ==\n-----END PUBLIC KEY-----\n','1457f73164eefae32c107b310f3720c83bb5c7f9df88de0114714f4c77055337','','http://192.168.22.10/profile/friendica4','http://192.168.22.10/profile/friendica4','','','','-----BEGIN PRIVATE KEY-----\nMIIJRAIBADANBgkqhkiG9w0BAQEFAASCCS4wggkqAgEAAoICAQDgcD2pdJh+3Hu1\nLqRNW+wGFXHuE8rnsYilRTprO4UaqasCoQSwGHb6gtMPNga+rtRbk0BsvpB2+gWQ\nkLi1MkrB8w7uegCEHPOsukaMmfpbW/s5oZfVUBAzfb52qBQ/tokX3UMrHycJwCqj\nzI+niCtR7US/liuxr2yjpdFcQjSfs8dOBGKvwcgAcLiwO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O7Np/R/tmsJMYNRGfZ2nEMyPlQr60Tjfnl2FDt3ny5\nEc8skgiE0u1sIZLSAM5YV5MU37YCYeK1K3NUGYi2WMoHHbzwBPeIB0o+wc9s0/oT\nRiiilQTmUlATd9YlDJJKQqbPkEvg5whZnoZM/yBQnwKCAQBFZt9mBiW1nFa0apfo\nlL6rjlY5elsYj3LIw4VTYT1VNsBbjWgzALSdqn1W09VQImKSsH+aih6W4FJosypw\noo3mdccpuAShxBfL+kcORH/cPNLRM3PPi6PTpTqhfI+Mwr3yRRBbe27zy4XxMCpE\nr9fsUFTJo5gnho24XiJ21rIco1/uNpTbgTcN+b8opksFyBXw7XsW7fEWrGrSP0kK\nrKPlF0C376gdVNCP8eehH1XE5ziCLePiZbHk+pJeut+IyRX2MD/wD5SBmxZt/exP\nqkMk7/bItBXbJMLOAY5qOkDK8NBh2+BdDI+AFnDe7H9IF+eGR7IbOLXG9sQl0VV1\nrNqRAoIBAQDcaPs8IbbP5SdAGRUMotS94XRdnJOTuJ6jev1zS1yvp/8ptMdkByoy\nqXw4UKUXpQOUDr82B/MPWSRAS5xjXogfbYIeBLm6CpYtjV+XhGJcGbBg/wVUMKvz\nFreSCIEICWi7OiGQG9j7E1hLWpMI59LBFHgLBX6KvNAiuQbTeEHus243FXFlD9Sl\ne+k4tw1/CNgPozRfrLJF+uxUH0P9kYXFXFxXff2PK7VLr3/2Je7uV1ckPLlAJCFI\nnEQpdPjPmRhmohiHv5NHlqLVNX8I0XincM1XPdD/qiIqP+asrc9CF4z/Od9F0XSP\nuAn81wfguN+AIeC3BnIO1RLZnpAEwUWW\n-----END PRIVATE KEY-----\n','','http://192.168.22.10/dfrn_request/friendica4','http://192.168.22.10/dfrn_notify/friendica4','http://192.168.22.10/dfrn_poll/friendica4','http://192.168.22.10/dfrn_confirm/friendica4','http://192.168.22.10/poco/friendica4',0,0,0,0,'','2015-02-02 18:50:11','2015-02-02 18:50:11','2015-02-02 18:50:11','2015-02-02 18:45:30','2015-02-02 18:45:30','0000-00-00 00:00:00',0,0,0,1,0,0,0,0,0,0,'',99,'',0,'','0000-00-00',0,0,''),(11,3,'2015-02-02 18:49:20',0,0,3,1,'dfrn','friendica1','friendica1','','','','','','http://192.168.22.10/photo/389cca68d9a2e64538a81680925703b8-4.jpg','http://192.168.22.10/photo/389cca68d9a2e64538a81680925703b8-5.jpg','http://192.168.22.10/photo/389cca68d9a2e64538a81680925703b8-6.jpg','-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA8/tIxRBs81u0V6ug4VXh\nG8omo+8YIckQqL5m7jWJqQ3v0fCrjyO8EcrjXhKC6esafSOlVhgxzFOkqNH8rRGF\ntF00suNJXy/0fh6EFFvifX1hQw1ZCXXlHxmmM4yNkGOzbRXPeVuSxyn1OtQNGRnB\nSGeqdCZc4QMtgPbVPwTTWYB4rSbVGYbEa5vpqY0OFnlIwC+BtQrd0xFEO7+FGfmv\n2jRt7ImRiyFazef0NhZL890IFeB5+rF8fifC3o7OP0kzB75+z5LkBfnsveZCriaj\nwHjUmMOa/hTOVHw4qYIq6XY4Q2OgaGTs2xqBz4/gniKjNSBbRyYy45prFOuJTLmO\ns07078nfg3NbWq5JkszwPen+gcvc4Pv38z2DBc2RxjgU0YbY4ZV053GIzd8hutA4\nm+eD1Cl0NZcEd9OYi3dtXWACPsf2C0/FsouAj1juXWxeRZ9exHphs0tCXt/RPgyK\nOqFPaPRCBL6MUvM0N1yR2TVk3s3Uq0k/4AExcplJGuZt8bMDIGR6g3RF+bXn3eLb\n9SnpnLSIMpHS/N/JVQzMs4W8tkdwi2OiIeNWhYrFH/stfU7KPYXdwVfduDTAv9LA\nY5Yk8oMomfL5b097eKDdzXFJ3rKUXktobl74REtgAfXEA3OgqCXUGPLbS45I8gsZ\nxBFRmmPH3SuOCQSRkY0gb/UCAwEAAQ==\n-----END PUBLIC KEY-----\n','4968c78f8a9df6fc4e43949748a0e94567dc0f83166cf83cd8e0f98f406e1b3f','','http://192.168.22.10/profile/friendica1','http://192.168.22.10/profile/friendica1','','','','-----BEGIN PRIVATE KEY-----\nMIIJQwIBADANBgkqhkiG9w0BAQEFAASCCS0wggkpAgEAAoICAQCjZo+s91a7V4+A\nBcZd/axeCE1p9HDhxwEwDWGoAePFzaksP4MyreLJWgf51LwAzYaEoeyYv+iyUEMt\nfkn/9VLWuA4qRG8yKQVqh28OdDPUdwsvIo7TmFgkVBL3yOuPts0EeJddle+CBOCO\nViXl5LgVf2pPY5ELIPmOUOQdk6IX6aixV42gt4L8V+hQVCS+b4S+LmGBTxr8e8XD\nTYEY1kQQpUtXU9G1A0kdr4bxGuA0WNY3pplbOwV1/F1YYpwtANslhuV6FTKgEjCd\noQhRaKFH0lp0HMu7s48R7UgPjVkP1c5MOAXqJo3biqMyFctAx78jaHij0VONr2qL\nayYTPfY0fypBb5uKfYquvcRQO6v/oaiZ4jP0hLszekBo4sPqtDduMWwlzEmEDqNT\nMctn0ADpgnvmPT69OSSyFE6d2dxcPbP77v5hjF3UJ6inzqzuxE2NxYK5UfhUwL3Y\nBynrZISwN+THekkABx9/tqwLCd2z68ocoaJi/tc2oQKSGwNgk/pa7Gg9zkgMdhQK\nAzYcn+cNpODx6LOKi7ILhiNEISHU6CnobbUpwNZrESL0fhSwxqTMV6s9zCQxdtVX\nhhrzhh9MCz0fRi8wYvU3ZIbEsP36iXAyqUhRHm3LZoH6VL/qHLZIlZGKEK48cbLo\npqiPzsGMazBECJvRg3mWC7mfzEQqAQIDAQABAoICAGFrR2PHP0WIiby5NLBbCoYx\niv4Nx7NEc5fTkpKZNdR7rk38O9teQqTrcW/o/oG4B2hSJf5YBIMzSSn5bmMVP2NW\n7tMSY/1S6bC+uF60tyYIJ3ndr6vF218lZP2oI5FWWls9Dnm0Z8xr3fnesM+kkn/2\nrEpSwWoSKddIsQhVOcHqBDJfUcgtQQHz40TpNdL4J/s/KdDvedZocNrk/X/yVzhZ\nZFbXWWMDZ3c0bE6ZSGzNPkKFqE71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HJ6L6Urou7sxdnXULT+iMW+/oEob8ZezbDRLWjiln95rhwUnu17B7paZmIVe6Cy\n/FhZIOns6kkCi8CcaS3V3qLfXQrQSfI=\n-----END PRIVATE KEY-----\n','','http://192.168.22.10/dfrn_request/friendica1','http://192.168.22.10/dfrn_notify/friendica1','http://192.168.22.10/dfrn_poll/friendica1','http://192.168.22.10/dfrn_confirm/friendica1','http://192.168.22.10/poco/friendica1',0,0,0,0,'','2015-02-02 19:00:09','2015-02-02 19:00:09','2015-02-02 19:00:14','2015-02-02 18:51:35','2015-02-02 18:51:35','0000-00-00 00:00:00',0,0,0,1,0,0,0,0,0,0,'',99,'',0,'','0000-00-00',0,0,''),(12,2,'2015-02-02 18:49:41',0,0,3,1,'dfrn','friendica2','friendica2','','','','','','http://192.168.22.10/photo/b18ee0c7f160fdbf8f5d91a56a07a13c-4.jpg','http://192.168.22.10/photo/b18ee0c7f160fdbf8f5d91a56a07a13c-5.jpg','http://192.168.22.10/photo/b18ee0c7f160fdbf8f5d91a56a07a13c-6.jpg','-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA4QpA4flE9v17fh+yrMpR\nU4iKSxLOF/8ROTotrdQsk8HcHkPS7E60QUaRK45gDc9O+7FU1+90V+oo0BqdkJFL\nbFtTogP5fdNSD3ApHz7s03oBX9JenU/8JhxaH1VwEs3lLDlFrywngiYcEDZIeLGZ\nIFK1GWP79+ZwJ9WWoBhzCD4hg4excOWPwwQMjCLYAzI5INEPTw+R3CKD6EsnVLu0\nS+u3zBBsL/A+bgDDfgZoD6igJQlvenK5jStgfbiuVp1mqdXKJ8D+rYz5FQ72Yn3r\nn6AvrXcPQMbLSaUK5m1Ug7beasuhRJ5Z7TVtJ/RLNgA3mOX2A2Vy1i38VYmcTaG5\nom8AYeI/nSvMzJt7FYXOBdxKnSW0UhkXsjBQavefz7sp2Lhcw5U+7eaPi2fIkYio\nVHKU2r8uiJPFfUMAbHA2+rScBjn2lYZH0nfMKrZTzva7y6d19EOsO2aP5e4XNjU8\n0tX/C1iy6LPMCf7xG844iROXi7NPJJoTgx/Sl6+o0oqBl9J5wJDK5U33rUSqYI/p\nsPEfaStqA5CgBAvAsq0N+NQQndJzGfuYaIdfleyUSLIchHhEICE4SN62RHZ6VTlg\nIVCva4xdBrGlkGV/IgE228FwgX4GWELclfUH/KwcGHChlY8dTtVZHbTCuizvPLvl\nXuZQ9ROdQiwkYwGJA/bhM3kCAwEAAQ==\n-----END PUBLIC KEY-----\n','','4968c78f8a9df6fc4e43949748a0e94567dc0f83166cf83cd8e0f98f406e1b3f','http://192.168.22.10/profile/friendica2','http://192.168.22.10/profile/friendica2','','','-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAo2aPrPdWu1ePgAXGXf2s\nXghNafRw4ccBMA1hqAHjxc2pLD+DMq3iyVoH+dS8AM2GhKHsmL/oslBDLX5J//VS\n1rgOKkRvMikFaodvDnQz1HcLLyKO05hYJFQS98jrj7bNBHiXXZXvggTgjlYl5eS4\nFX9qT2ORCyD5jlDkHZOiF+mosVeNoLeC/FfoUFQkvm+Evi5hgU8a/HvFw02BGNZE\nEKVLV1PRtQNJHa+G8RrgNFjWN6aZWzsFdfxdWGKcLQDbJYblehUyoBIwnaEIUWih\nR9JadBzLu7OPEe1ID41ZD9XOTDgF6iaN24qjMhXLQMe/I2h4o9FTja9qi2smEz32\nNH8qQW+bin2Krr3EUDur/6GomeIz9IS7M3pAaOLD6rQ3bjFsJcxJhA6jUzHLZ9AA\n6YJ75j0+vTkkshROndncXD2z++7+YYxd1Ceop86s7sRNjcWCuVH4VMC92Acp62SE\nsDfkx3pJAAcff7asCwnds+vKHKGiYv7XNqECkhsDYJP6WuxoPc5IDHYUCgM2HJ/n\nDaTg8eiziouyC4YjRCEh1Ogp6G21KcDWaxEi9H4UsMakzFerPcwkMXbVV4Ya84Yf\nTAs9H0YvMGL1N2SGxLD9+olwMqlIUR5ty2aB+lS/6hy2SJWRihCuPHGy6Kaoj87B\njGswRAib0YN5lgu5n8xEKgECAwEAAQ==\n-----END PUBLIC KEY-----\n','','','http://192.168.22.10/dfrn_request/friendica2','http://192.168.22.10/dfrn_notify/friendica2','http://192.168.22.10/dfrn_poll/friendica2','http://192.168.22.10/dfrn_confirm/friendica2','http://192.168.22.10/poco/friendica2',1,0,0,0,'','2015-02-02 19:00:21','2015-02-02 19:00:21','2015-02-02 19:00:21','2015-02-02 18:51:34','2015-02-02 18:51:34','0000-00-00 00:00:00',0,0,0,1,0,0,0,0,0,0,'',99,'',0,'','0000-00-00',0,0,''),(13,4,'2015-02-02 18:50:05',0,0,3,1,'dfrn','friendica1','friendica1','','','','','','http://192.168.22.10/photo/ba266e976726cba185c218750c545814-4.jpg','http://192.168.22.10/photo/ba266e976726cba185c218750c545814-5.jpg','http://192.168.22.10/photo/ba266e976726cba185c218750c545814-6.jpg','-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA8/tIxRBs81u0V6ug4VXh\nG8omo+8YIckQqL5m7jWJqQ3v0fCrjyO8EcrjXhKC6esafSOlVhgxzFOkqNH8rRGF\ntF00suNJXy/0fh6EFFvifX1hQw1ZCXXlHxmmM4yNkGOzbRXPeVuSxyn1OtQNGRnB\nSGeqdCZc4QMtgPbVPwTTWYB4rSbVGYbEa5vpqY0OFnlIwC+BtQrd0xFEO7+FGfmv\n2jRt7ImRiyFazef0NhZL890IFeB5+rF8fifC3o7OP0kzB75+z5LkBfnsveZCriaj\nwHjUmMOa/hTOVHw4qYIq6XY4Q2OgaGTs2xqBz4/gniKjNSBbRyYy45prFOuJTLmO\ns07078nfg3NbWq5JkszwPen+gcvc4Pv38z2DBc2RxjgU0YbY4ZV053GIzd8hutA4\nm+eD1Cl0NZcEd9OYi3dtXWACPsf2C0/FsouAj1juXWxeRZ9exHphs0tCXt/RPgyK\nOqFPaPRCBL6MUvM0N1yR2TVk3s3Uq0k/4AExcplJGuZt8bMDIGR6g3RF+bXn3eLb\n9SnpnLSIMpHS/N/JVQzMs4W8tkdwi2OiIeNWhYrFH/stfU7KPYXdwVfduDTAv9LA\nY5Yk8oMomfL5b097eKDdzXFJ3rKUXktobl74REtgAfXEA3OgqCXUGPLbS45I8gsZ\nxBFRmmPH3SuOCQSRkY0gb/UCAwEAAQ==\n-----END PUBLIC KEY-----\n','1993beda190780abf81b6585d66643d9c14726c3fc5876604985b687f74877f5','','http://192.168.22.10/profile/friendica1','http://192.168.22.10/profile/friendica1','','','','-----BEGIN PRIVATE KEY-----\nMIIJQQIBADANBgkqhkiG9w0BAQEFAASCCSswggknAgEAAoICAQClyqb0yY9wQ4jm\nPo9836jQWx2FxXtGZ/hPVNSG9/ig+PGdwL+kQy/95yz80A2J+Bu5zd9ePe9Xt2fL\nEw8qX1pVqxMb1WL6L6rmRIy7JGEcRbmggoN/sp+1bCstxVWKTgJYcYv6rgL7aeEP\n3RRt1LcwpqLD9oeIpkHMJ/LnCksCJTgxGwsbJcsRGFd4smgVjL+kcAfiWQjajkim\nU6FbB6K3KrxeNcM//i6vRX0fx7B1PLuEroMfE6VfX/2TW0Gcn4P6VTCJeCMDU+iq\nD4ae880zykRKZyKeFnlG4oe7yYI/n3YD6PglfNgmfH4HoK5oYK6YhZHLWUOg+pQl\nbIf69b60U5f7tnlhtz3mkF0w7HO1TS/6W0BAQABXohv/96RMeZOV1rvHR1fNiDSg\nSWjDbHDeTbaSPyR9czOg+DysfIZc4xVK8Bt10MWz/3Telij95UZS5Lw7YYHlCVVC\n8Q1aeeNM9fm0w8mFcQ0FTYBAkWxP9E9cUbKkGS17lma1uq0sePLTCvzHtrM0zScA\nmneY5ZYAHfhsXmTVuK4tKuDP4d6sfH7zTDm39zSJnI9DNTzK+D8CCPEULqJdeHKa\nuWcL3lO/mtmlL/RwaLIGuvd2OG1+6iGQ8pvxtt792FkzmHWP5HgaQ3+ikYUcTda4\nk4DPhzz9STz+dX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xg22IZwDrNuMzCq5ekhise\nEQKCAQB4AUuBYKS4cAA7t5PSZG3TWrej9+8QMygzDDSpxQt/nyBM3Gzy58YOIczS\nQhgUGhwSA9HF2ghdJ5pyHpuT0OVWNtCpZr7NGlq28dYjC6vbr36b79xrW+poPFv7\nfOSSLHOxW/rqvWxconkMYfUDgSay333r+t3KNPzNwPRjawZBL91I2Dnjy2XgogT+\nXV9Xr0mQ5g8iQAV+HNYXYuQxlAkbVkpLyJAvacPjrgQ6+BrQMhzklKo6h4RW9PS9\n9PopqjwsXCKR1VnZhkhbt66xqmkEOtyl6ytYhUKDlzI3z8V1yK8V7hGhM2P17ksr\nNjUrIANF0eZWxtdfweUXB3ncY1qM\n-----END PRIVATE KEY-----\n','','http://192.168.22.10/dfrn_request/friendica1','http://192.168.22.10/dfrn_notify/friendica1','http://192.168.22.10/dfrn_poll/friendica1','http://192.168.22.10/dfrn_confirm/friendica1','http://192.168.22.10/poco/friendica1',0,0,0,0,'','2015-02-02 19:00:15','2015-02-02 19:00:15','2015-02-02 19:00:15','2015-02-02 18:52:24','2015-02-02 18:52:24','0000-00-00 00:00:00',0,0,0,1,0,0,0,0,0,0,'',99,'',0,'','0000-00-00',0,0,''),(14,2,'2015-02-02 18:50:08',0,0,3,1,'dfrn','friendica3','friendica3','','','','','','http://192.168.22.10/photo/1fc6596c195944666e18cbd313795942-4.jpg','http://192.168.22.10/photo/1fc6596c195944666e18cbd313795942-5.jpg','http://192.168.22.10/photo/1fc6596c195944666e18cbd313795942-6.jpg','-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAliSi9id9Ll1dpzXC/lL6\n2/5FYxdn0XYb5I2JeXBNopwbXOLDsnnzXlV2NN8riZaYRQcIbS00OuAvyYj/IG3i\nDykD2zPjVnLEWADtj1YhLSgKcfQgv6Cj/7CPdb1Rg3icbvWdVY9wabcblVa9k+qr\ngK273C47lCQzXgvMtPst1DOzxtVCGmPJJHKjXZ8hDvf/IS0pVGa0zIv9kdofqQV9\nD5u5LuNzRuEGnrpAzpfzMueDppBrrrr37sKrZfCvyYHZ/ouFgZ3bY9NNVnjuFItP\nrcDlJPL8NhGmmzuYtI03MLor+1yVdBKLIJ3G2Bxzn5tynjSX9XZzOQgC3+YVH4TU\n7WDUHjTWJ9mliD2M1WXCp2Lwc/pV1Prnvv057pAqdiMhnddzucV9nLk9X9fR8xyy\nC7PRwx0hkB427EtAYaOTr3RtInP6+cm+3M7wd6ZKTqWAU+Pi20RNrQRsqfHJ7+hx\n+i5rIG6/knB/C+MAAutEH25oY8kJYtJzXid2OBSE462DTuYaee9aGHUDNy+HQau8\nBhJ4/Wsc7Nf/7GRZ38SVT/HQShl47B1AG5AyomyWgwn9J2KJ8kMuScPmBv5u7Mwq\nSjLk5pLkwyUtZwUu8UtsFKw9HLcRksGSze5s2cbw3rf/6jgKycT72Bfm1fjRnv6s\nXt1GdSzfG9zVHuEwRDgTX3UCAwEAAQ==\n-----END PUBLIC KEY-----\n','','1993beda190780abf81b6585d66643d9c14726c3fc5876604985b687f74877f5','http://192.168.22.10/profile/friendica3','http://192.168.22.10/profile/friendica3','','','-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEApcqm9MmPcEOI5j6PfN+o\n0FsdhcV7Rmf4T1TUhvf4oPjxncC/pEMv/ecs/NANifgbuc3fXj3vV7dnyxMPKl9a\nVasTG9Vi+i+q5kSMuyRhHEW5oIKDf7KftWwrLcVVik4CWHGL+q4C+2nhD90UbdS3\nMKaiw/aHiKZBzCfy5wpLAiU4MRsLGyXLERhXeLJoFYy/pHAH4lkI2o5IplOhWwei\ntyq8XjXDP/4ur0V9H8ewdTy7hK6DHxOlX1/9k1tBnJ+D+lUwiXgjA1Poqg+GnvPN\nM8pESmcinhZ5RuKHu8mCP592A+j4JXzYJnx+B6CuaGCumIWRy1lDoPqUJWyH+vW+\ntFOX+7Z5Ybc95pBdMOxztU0v+ltAQEAAV6Ib//ekTHmTlda7x0dXzYg0oElow2xw\n3k22kj8kfXMzoPg8rHyGXOMVSvAbddDFs/903pYo/eVGUuS8O2GB5QlVQvENWnnj\nTPX5tMPJhXENBU2AQJFsT/RPXFGypBkte5ZmtbqtLHjy0wr8x7azNM0nAJp3mOWW\nAB34bF5k1biuLSrgz+HerHx+80w5t/c0iZyPQzU8yvg/AgjxFC6iXXhymrlnC95T\nv5rZpS/0cGiyBrr3djhtfuohkPKb8bbe/dhZM5h1j+R4GkN/opGFHE3WuJOAz4c8\n/Uk8/nV2D84EYndDyfsEAFECAwEAAQ==\n-----END PUBLIC KEY-----\n','','','http://192.168.22.10/dfrn_request/friendica3','http://192.168.22.10/dfrn_notify/friendica3','http://192.168.22.10/dfrn_poll/friendica3','http://192.168.22.10/dfrn_confirm/friendica3','http://192.168.22.10/poco/friendica3',1,0,0,0,'','2015-02-02 19:00:12','2015-02-02 19:00:12','2015-02-02 19:00:12','2015-02-02 18:52:24','2015-02-02 18:52:24','0000-00-00 00:00:00',0,0,0,1,0,0,0,0,0,0,'',99,'',0,'','0000-00-00',0,0,''),(15,5,'2015-02-02 18:50:52',0,0,3,1,'dfrn','friendica1','friendica1','','','','','','http://192.168.22.10/photo/73de577b8bcc76d9358ab8536f0a5cca-4.jpg','http://192.168.22.10/photo/73de577b8bcc76d9358ab8536f0a5cca-5.jpg','http://192.168.22.10/photo/73de577b8bcc76d9358ab8536f0a5cca-6.jpg','-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA8/tIxRBs81u0V6ug4VXh\nG8omo+8YIckQqL5m7jWJqQ3v0fCrjyO8EcrjXhKC6esafSOlVhgxzFOkqNH8rRGF\ntF00suNJXy/0fh6EFFvifX1hQw1ZCXXlHxmmM4yNkGOzbRXPeVuSxyn1OtQNGRnB\nSGeqdCZc4QMtgPbVPwTTWYB4rSbVGYbEa5vpqY0OFnlIwC+BtQrd0xFEO7+FGfmv\n2jRt7ImRiyFazef0NhZL890IFeB5+rF8fifC3o7OP0kzB75+z5LkBfnsveZCriaj\nwHjUmMOa/hTOVHw4qYIq6XY4Q2OgaGTs2xqBz4/gniKjNSBbRyYy45prFOuJTLmO\ns07078nfg3NbWq5JkszwPen+gcvc4Pv38z2DBc2RxjgU0YbY4ZV053GIzd8hutA4\nm+eD1Cl0NZcEd9OYi3dtXWACPsf2C0/FsouAj1juXWxeRZ9exHphs0tCXt/RPgyK\nOqFPaPRCBL6MUvM0N1yR2TVk3s3Uq0k/4AExcplJGuZt8bMDIGR6g3RF+bXn3eLb\n9SnpnLSIMpHS/N/JVQzMs4W8tkdwi2OiIeNWhYrFH/stfU7KPYXdwVfduDTAv9LA\nY5Yk8oMomfL5b097eKDdzXFJ3rKUXktobl74REtgAfXEA3OgqCXUGPLbS45I8gsZ\nxBFRmmPH3SuOCQSRkY0gb/UCAwEAAQ==\n-----END PUBLIC KEY-----\n','0bc099852fd312feafb2cba2fa0019cf973e643951ddbf6ffdf6fad5aa58f25a','','http://192.168.22.10/profile/friendica1','http://192.168.22.10/profile/friendica1','','','','-----BEGIN PRIVATE KEY-----\nMIIJQgIBADANBgkqhkiG9w0BAQEFAASCCSwwggkoAgEAAoICAQDbCtvcmn1RIKfD\nUusiez0aVlimCIEltnEjNeKz/2PTRZqMWdrkhbWMGtYuWBq6FmK3yWB9MkNtyKDE\npo4ncGeWMKtPk2oyY7wyV2KazTKGpfrymwKqF3/YYmbiLSAWpzpBThP0Dd7Eg35Y\nyeCTbKzYN7hp2VUR52j6XxhxgLbj97bnd7+oBst+TN4ZTZ061xjWDexpWYiQR1ck\nBS+0JKxh89t6n3oA64CPY/e3W8vJ5BIaW/PW4rHAwWU4fa4PKUcepHin5yYC1n5h\nQLBbpPOShLBeGisJ1370bVi/yfdYUohxGVFmy1u863VF3I0iTDuvSDSvdfud/Vrt\nJaCnHL9FKhhYMpW8cDTxCttNZ0fu927f5ftLbnmm/JQOGR7E/6JFmDkMWUCGG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fziBVlSL\n6U4lDpzGyzASuxYGNuhJLCFLypH0ONS58oe5IfQMulMxKRDOtA4X5LCV6LBYR0Wb\nTAxgjbvUYB9xdDnBGzYi7Tzg+rm9tQ6nqqF61cBFkmBeaPm0QOK/QXE1SnXOTJJA\nDWkUHCiDkWLDIxtg9klYKSVbuzShNIKN0mNvz83k9f1oFGY9jYC4BEG/UiAw7Cop\nV6wvbTN03+fJfyk7tZh7OKnq6DIXKUQaxFuY7WqUbN6IoKgDuFPy8wGtU4lj9g4E\n0OECggEAG+9Bz9Tzp+JWhGXVsQ5NAKFHw2SJFFFCqFe27hVS7R7E+wJx84i6AEuh\nMWA7bxKHU4XJ5waCmxLLiY9BTb8lkYzT0gttl7O6J5mWTW/wT4VDZGSywQpt0uVD\nNPRpKAvFumXJccaWDz9Oz9oChk4P93a0kZi/H59uePb95xW8MXsVPIjiq/PjVewY\nsKRqEXeE3qeahieyz9ac9Dc2MJVvuuot3wRM3YERgjzZAfSqK8Lo4rSHgiGg4iYj\n2IoxAN007n4ZSiXH/qUtMAIOQGFfO1jqmt6dZkt3kJ9+2JkYa01vnLUvA9KViPI3\n3fhPNAoXmu3k6cGhzDjNG5bQVWIU8g==\n-----END PRIVATE KEY-----\n','','http://192.168.22.10/dfrn_request/friendica1','http://192.168.22.10/dfrn_notify/friendica1','http://192.168.22.10/dfrn_poll/friendica1','http://192.168.22.10/dfrn_confirm/friendica1','http://192.168.22.10/poco/friendica1',0,0,0,0,'','2015-02-02 19:00:06','2015-02-02 19:00:06','2015-02-02 19:00:06','2015-02-02 18:51:07','2015-02-02 18:51:07','0000-00-00 00:00:00',0,0,0,1,0,0,0,0,0,0,'',99,'',0,'','0000-00-00',0,0,''),(16,2,'2015-02-02 18:50:55',0,0,3,1,'dfrn','friendica5','friendica5','','','','','','http://192.168.22.10/photo/01072618a17425401fafdeb40fcd79ac-4.jpg','http://192.168.22.10/photo/01072618a17425401fafdeb40fcd79ac-5.jpg','http://192.168.22.10/photo/01072618a17425401fafdeb40fcd79ac-6.jpg','-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAyvuTsaZaTgPDm69uxixR\n8qd0ylkeA/IY3KDsI4vjrLuF7WLmU07lzQXmilQJ+MlipIju+wFXx3a8ksavEYpP\n9ZU9YrpXe7zneHRLTxgMDH9IMbSCIUAkEsozpzF02Ft0+G36tzIET2oTuU6uLtx6\nI5ifmF/qFC+4avAoABQg8qfOPpuaP3AJ6FppqEifUsb0lTWqP4zg7PQXC36oKIJ0\nUDuQniVy8lTxVfkhoi/aHZw0khVXe6tDK7C0ALg5U7jLTDNdJ1R0v5iC41QK4CEt\n5x4x008mdk6xLKGZiou1UuEPv/+WSQU1Q21JFzNVGBASkRu7dUVH6k+59VQr3ONI\n5bdbAZviVY3ezFNtBeWWfDk06BWoZwX67eGG/dVsCPnEkuP9CpemcwwGZbYCIqf0\n++5h0CU41CjNShHdBD+Q+ZQmT3I4sAlPZ7x90nA9KfuKM9QyTPQ9EmK2bxq7TKvV\nzLqHptL5mC/VH4FbO1eKf7p/f7XxOaeXGANUaRSPwLSO7lk8lkl/wj7sNJYGYygC\nMLTqH8GTizpyPkSDv5xO6bYn/g3BYFuUM5x1MZVS8MdG2a3L8UzRiXUsm/AjnfSV\nImN2+8bHJI0wy9zRxfEaG8pvbupb7UU5zWr3WRkSVr84Bq1SJNxLfWZj3GHLaesr\nu3exEdYGfxLuG1zHIROVwlcCAwEAAQ==\n-----END PUBLIC KEY-----\n','','0bc099852fd312feafb2cba2fa0019cf973e643951ddbf6ffdf6fad5aa58f25a','http://192.168.22.10/profile/friendica5','http://192.168.22.10/profile/friendica5','','','-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA2wrb3Jp9USCnw1LrIns9\nGlZYpgiBJbZxIzXis/9j00WajFna5IW1jBrWLlgauhZit8lgfTJDbcigxKaOJ3Bn\nljCrT5NqMmO8Mldims0yhqX68psCqhd/2GJm4i0gFqc6QU4T9A3exIN+WMngk2ys\n2De4adlVEedo+l8YcYC24/e253e/qAbLfkzeGU2dOtcY1g3saVmIkEdXJAUvtCSs\nYfPbep96AOuAj2P3t1vLyeQSGlvz1uKxwMFlOH2uDylHHqR4p+cmAtZ+YUCwW6Tz\nkoSwXhorCdd+9G1Yv8n3WFKIcRlRZstbvOt1RdyNIkw7r0g0r3X7nf1a7SWgpxy/\nRSoYWDKVvHA08QrbTWdH7vdu3+X7S255pvyUDhkexP+iRZg5DFlAhhq+8018qpxp\nJ9zdSo5gTX0RonwNKSUKmR1mMg7F01v22qzbBspM95446NOOUS7xh3wKDGn7joPr\na54kH4u5Aya/v4qZ8QDGKYVzkX5xZY19kSz1iBzixsSlIHaa43cTqHOy+xA54sPp\nlJe/yMSpAo3itt7DIz33HcJnwwRxTKTLZwqfxOB3rdu2GVpLA6JIEvl7OOLFfOcS\nS+9QankJK/J7Xe/aldmWqQBogx9dLW7XGTPSDF/unNctazg0K84aWUbH7Nc9bC5G\nvszuTsVfiavruK0UCE0qQtkCAwEAAQ==\n-----END PUBLIC KEY-----\n','','','http://192.168.22.10/dfrn_request/friendica5','http://192.168.22.10/dfrn_notify/friendica5','http://192.168.22.10/dfrn_poll/friendica5','http://192.168.22.10/dfrn_confirm/friendica5','http://192.168.22.10/poco/friendica5',1,0,0,0,'','2015-02-02 19:00:18','2015-02-02 19:00:18','2015-02-02 19:00:18','2015-02-02 18:51:07','2015-02-02 18:51:07','0000-00-00 00:00:00',0,0,0,1,0,0,0,0,0,0,'',99,'',0,'','0000-00-00',0,0,''),(17,6,'2015-02-02 18:51:55',0,0,3,1,'dfrn','friendica1','friendica1','','','','','','http://192.168.22.10/photo/b4cbb73d1178aab3424a788419bbe016-4.jpg','http://192.168.22.10/photo/b4cbb73d1178aab3424a788419bbe016-5.jpg','http://192.168.22.10/photo/b4cbb73d1178aab3424a788419bbe016-6.jpg','-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA8/tIxRBs81u0V6ug4VXh\nG8omo+8YIckQqL5m7jWJqQ3v0fCrjyO8EcrjXhKC6esafSOlVhgxzFOkqNH8rRGF\ntF00suNJXy/0fh6EFFvifX1hQw1ZCXXlHxmmM4yNkGOzbRXPeVuSxyn1OtQNGRnB\nSGeqdCZc4QMtgPbVPwTTWYB4rSbVGYbEa5vpqY0OFnlIwC+BtQrd0xFEO7+FGfmv\n2jRt7ImRiyFazef0NhZL890IFeB5+rF8fifC3o7OP0kzB75+z5LkBfnsveZCriaj\nwHjUmMOa/hTOVHw4qYIq6XY4Q2OgaGTs2xqBz4/gniKjNSBbRyYy45prFOuJTLmO\ns07078nfg3NbWq5JkszwPen+gcvc4Pv38z2DBc2RxjgU0YbY4ZV053GIzd8hutA4\nm+eD1Cl0NZcEd9OYi3dtXWACPsf2C0/FsouAj1juXWxeRZ9exHphs0tCXt/RPgyK\nOqFPaPRCBL6MUvM0N1yR2TVk3s3Uq0k/4AExcplJGuZt8bMDIGR6g3RF+bXn3eLb\n9SnpnLSIMpHS/N/JVQzMs4W8tkdwi2OiIeNWhYrFH/stfU7KPYXdwVfduDTAv9LA\nY5Yk8oMomfL5b097eKDdzXFJ3rKUXktobl74REtgAfXEA3OgqCXUGPLbS45I8gsZ\nxBFRmmPH3SuOCQSRkY0gb/UCAwEAAQ==\n-----END PUBLIC KEY-----\n','cd8d6796a986b38a7fb102d05cb41dabe3bdd042f05bf2e5d184a9fdae0255fc','','http://192.168.22.10/profile/friendica1','http://192.168.22.10/profile/friendica1','','','','-----BEGIN PRIVATE KEY-----\nMIIJQwIBADANBgkqhkiG9w0BAQEFAASCCS0wggkpAgEAAoICAQDCyqFtB4TgbrcJ\n59saeXpo/P+01pHCILBzYKhWhrPDhzI2S+ByaeGbMm/ID2EqGrMxBiJs8gPzPVLk\nF1o/V2HWwelM/adgSoT8zihpebfOTjMFB3ExenheLqym7dbigt2f11ArDCF9wPli\nKgOuSwhb9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z0Ie9a3tjhQ2AZukg/EpKyDhBY6Gwze3zwbB9pa3q6OKNCgIznS1\nxwO1gSdhkTS58W5jOv7y0/hzF3rzv7G/mhQM9vd/kWfQKR+93p/kzj0DIG6Bo8op\nWwJEas+mogeitHdZEW6jV/mvy+lPBT+ipCwacEp9AoIBAQCr9T16tMfm/jsvfdPu\n7yaDeII+ar/LlWlxNOGYjC7932CQZdvdygVCSPhndkIWjaXOoQQB4glwUcj1Hkc8\nLDShhtwJM0TQ0lemStPpHyb3mxSrBo1rCciPV+71IdwQsKzm2sYOIGx7QGGNciUT\np3ehSJDFM4XFuDJyeHaGLoLrBP/e68SIwOgdIoNX/kW1VXwHYODM7C++Y4iDu9XH\n+K9BOXJ/erUOxsOXhP32UGnTm0LErzLavuFwM/H0kvl/BldHOfPVbbbwBxTcxrIH\n9APUukQ77GHpehoxhFxW7IuLFoUMsZGLV/h0MVXBTLIYYnuj/PANhMcEH9Yn7Rq4\nPdjJAoIBAEYONbywm3BUYvpQeN+PZPgfNAdRsFCU+dlPCFGA02fzF5H/NmKxIT6A\naqU7AA2W7ZmgRHuXMVGf+0q19xPvzi2LVZpSnfHI0eq28c5ai/Tig6stW/FYNDdl\n828a+ZAXvksesiGwD2R53aAF5NNvOIGsaL31T5d5aka1wUQw7bzx8w7OhW+jP+qj\nAq/pMBapUML5TTAhE5wBJI+F6qoIpp7BomMO36nSzaofqS4I96r2kcTb1bNBGErw\no8HHBbXTrZ/vz8i8h5bGoikI0YbxplPaLTylUxuxv0x+gmlaZLbSfjosgfxTGmDu\nyi/YAMIgyQM3WSd9kEzLbr40D8NRK8w=\n-----END PRIVATE KEY-----\n','','http://192.168.22.10/dfrn_request/friendica1','http://192.168.22.10/dfrn_notify/friendica1','http://192.168.22.10/dfrn_poll/friendica1','http://192.168.22.10/dfrn_confirm/friendica1','http://192.168.22.10/poco/friendica1',0,0,0,0,'','2015-02-02 19:00:03','2015-02-02 19:00:03','2015-02-02 19:00:16','2015-02-02 18:53:04','2015-02-02 18:53:04','0000-00-00 00:00:00',0,0,0,1,0,0,0,0,0,0,'',99,'',0,'','0000-00-00',0,0,''),(18,2,'2015-02-02 18:52:03',0,0,3,1,'dfrn','friendica4','friendica4','','','','','','http://192.168.22.10/photo/0f1ac566d253bcd264437b7f7a347f88-4.jpg','http://192.168.22.10/photo/0f1ac566d253bcd264437b7f7a347f88-5.jpg','http://192.168.22.10/photo/0f1ac566d253bcd264437b7f7a347f88-6.jpg','-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA3nCYawg+HTyQgV7a7Osg\nCXeACOitKLhcb2WDTN/lLOMO7n1lSm3Kdv1dbOc0/lkAPeB2XsLF/aDfoUPWWg4Q\n/oRPrXFIi2dK/cIQVvgOhebQheztAYPJyaYYMWVK7bLbPuKVTyzALqkWD8Zjjtit\n4Uvm3kjmcofKr+/Lw+VFaEBMESQDbP5eTDtQeDGGjluWQMj1/D+V/Tcm+SMrAVIv\njyklQEhBJlYGJ+LsfXv4XXbeH73dkIXkQW5JgWQyPCloJ+PxmmjjEDozsdgmFQXq\n6T9HFVHvW2O2lmDoaTrbIGrULWBpslKZJJrV+LgtkzhP4uuKfJPD2DpMJ4+ixtBE\nzM/o+EuYDTz0P3dTvwruq1t8gUYcQOVUzEp1LM0qYDMVY86XneW1W5xghztl5zqy\nGBMBvjVIFvMVL1cVeXze4zpwwKln2cArepToSpN7lmy9EgBd9mZrVLWosZShB9R0\n05kBc2Tfv7FlixwZ1P8rwJn9sEEs9oa6TnRLL+7L8eqapg6vUI1G7e0HWWEjdHsR\nrYVHYW+ogtOYjrQ1Tfh1W2PtNaez5fGYVBDjC+1vy0scJmqrgy00z7MHBT2WTOAL\noHbdedhpa3UZ0FrsCto+vqil8BcF5aBhi2Hi5YdKtbY3EBsaabcSO2joc7rlmee4\nxdKfDRYXCPysFPhZNgIW708CAwEAAQ==\n-----END PUBLIC KEY-----\n','','cd8d6796a986b38a7fb102d05cb41dabe3bdd042f05bf2e5d184a9fdae0255fc','http://192.168.22.10/profile/friendica4','http://192.168.22.10/profile/friendica4','','','-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAwsqhbQeE4G63CefbGnl6\naPz/tNaRwiCwc2CoVoazw4cyNkvgcmnhmzJvyA9hKhqzMQYibPID8z1S5BdaP1dh\n1sHpTP2nYEqE/M4oaXm3zk4zBQdxMXp4Xi6spu3W4oLdn9dQKwwhfcD5YioDrksI\nW/SUEgZIR7XwclVU5Shyj/Z5ssllXqOWSPXAifQ5TcP3PbqEl+IFuN3X9P6J51cH\nemeDLaGqSpoiOlg5Y7E73kZYiXq1xUW5l4c2/wJ2FKeGmWvJaXh+06hkN5fd80Y6\n89vSRsQoaPXnsTrdymquNZIi7yGxJU/uZz8ZD158PQwC5ucGE1ockA8PIUUi6DcJ\nZfSFQjuzrlFsqKaJS7MQc+nysLRdrbjBcQKQHEYbQA2PHRZ9rU/9flICNTSPV4f5\ni7WwicjU1BvYcD/1WEacOPYZ76NCae4VaJvaP6cQpevcd3w9IbN1iC3JVf89oKYp\nBLPpT/T3VI0d17Uugg/51Yz+4RTmYZSZ/SMgCUfG4uE19m8y/j2fSUC6RTqISBsG\nDCRbIu7rnUkS5HvcxtVKwkHT6cANVUFatFIIfy4/e0aE7RO7TvCqJ+WBuK7WA0uS\nabbFxBP6e/eDUDEQI8TIGuMn/fnHRTqchnPmuoTKAZaihh1NU2Jo8+K4s7AbPcwZ\nZpzi1oJnWhSxsGEeGilylk8CAwEAAQ==\n-----END PUBLIC KEY-----\n','','','http://192.168.22.10/dfrn_request/friendica4','http://192.168.22.10/dfrn_notify/friendica4','http://192.168.22.10/dfrn_poll/friendica4','http://192.168.22.10/dfrn_confirm/friendica4','http://192.168.22.10/poco/friendica4',1,0,0,0,'','2015-02-02 19:00:24','2015-02-02 19:00:24','2015-02-02 19:00:24','2015-02-02 18:53:03','2015-02-02 18:53:03','0000-00-00 00:00:00',0,0,0,1,0,0,0,0,0,0,'',99,'',0,'','0000-00-00',0,0,'');
+INSERT INTO `contact` VALUES (1,1,'2015-02-02 11:24:17',1,0,0,0,'','admin','admin','','','','','','http://192.168.22.10/photo/profile/1.jpg','http://192.168.22.10/photo/avatar/1.jpg','http://192.168.22.10/photo/micro/1.jpg','','','','http://192.168.22.10/profile/admin','http://192.168.22.10/profile/admin','','','','','','http://192.168.22.10/dfrn_request/admin','http://192.168.22.10/dfrn_notify/admin','http://192.168.22.10/dfrn_poll/admin','http://192.168.22.10/dfrn_confirm/admin','http://192.168.22.10/poco/admin',0,0,0,0,'','0001-01-01 00:00:00','0001-01-01 00:00:00','2015-02-02 11:24:17','2015-02-02 11:24:17','2015-02-02 11:24:17','0001-01-01 00:00:00',0,0,0,0,0,0,0,0,0,0,'',0,'',0,'','0001-01-01',0,0,''),(2,2,'2015-02-02 12:02:11',1,0,0,0,'','friendica1','friendica1','','','','','','http://192.168.22.10/photo/profile/2.jpg','http://192.168.22.10/photo/avatar/2.jpg','http://192.168.22.10/photo/micro/2.jpg','','','','http://192.168.22.10/profile/friendica1','http://192.168.22.10/profile/friendica1','','','','','','http://192.168.22.10/dfrn_request/friendica1','http://192.168.22.10/dfrn_notify/friendica1','http://192.168.22.10/dfrn_poll/friendica1','http://192.168.22.10/dfrn_confirm/friendica1','http://192.168.22.10/poco/friendica1',0,0,0,0,'','0001-01-01 00:00:00','0001-01-01 00:00:00','2015-02-02 12:02:11','2015-02-02 12:02:11','2015-02-02 12:02:11','0001-01-01 00:00:00',0,0,0,0,0,0,0,0,0,0,'',0,'',0,'','0001-01-01',0,0,''),(3,3,'2015-02-02 12:02:40',1,0,0,0,'','friendica2','friendica2','','','','','','http://192.168.22.10/photo/profile/3.jpg','http://192.168.22.10/photo/avatar/3.jpg','http://192.168.22.10/photo/micro/3.jpg','','','','http://192.168.22.10/profile/friendica2','http://192.168.22.10/profile/friendica2','','','','','','http://192.168.22.10/dfrn_request/friendica2','http://192.168.22.10/dfrn_notify/friendica2','http://192.168.22.10/dfrn_poll/friendica2','http://192.168.22.10/dfrn_confirm/friendica2','http://192.168.22.10/poco/friendica2',0,0,0,0,'','0001-01-01 00:00:00','0001-01-01 00:00:00','2015-02-02 12:02:40','2015-02-02 12:02:40','2015-02-02 12:02:40','0001-01-01 00:00:00',0,0,0,0,0,0,0,0,0,0,'',0,'',0,'','0001-01-01',0,0,''),(4,4,'2015-02-02 12:03:07',1,0,0,0,'','friendica3','friendica3','','','','','','http://192.168.22.10/photo/profile/4.jpg','http://192.168.22.10/photo/avatar/4.jpg','http://192.168.22.10/photo/micro/4.jpg','','','','http://192.168.22.10/profile/friendica3','http://192.168.22.10/profile/friendica3','','','','','','http://192.168.22.10/dfrn_request/friendica3','http://192.168.22.10/dfrn_notify/friendica3','http://192.168.22.10/dfrn_poll/friendica3','http://192.168.22.10/dfrn_confirm/friendica3','http://192.168.22.10/poco/friendica3',0,0,0,0,'','0001-01-01 00:00:00','0001-01-01 00:00:00','2015-02-02 12:03:07','2015-02-02 12:03:07','2015-02-02 12:03:07','0001-01-01 00:00:00',0,0,0,0,0,0,0,0,0,0,'',0,'',0,'','0001-01-01',0,0,''),(5,5,'2015-02-02 12:04:06',1,0,0,0,'','friendica5','friendica5','','','','','','http://192.168.22.10/photo/profile/5.jpg','http://192.168.22.10/photo/avatar/5.jpg','http://192.168.22.10/photo/micro/5.jpg','','','','http://192.168.22.10/profile/friendica5','http://192.168.22.10/profile/friendica5','','','','','','http://192.168.22.10/dfrn_request/friendica5','http://192.168.22.10/dfrn_notify/friendica5','http://192.168.22.10/dfrn_poll/friendica5','http://192.168.22.10/dfrn_confirm/friendica5','http://192.168.22.10/poco/friendica5',0,0,0,0,'','0001-01-01 00:00:00','0001-01-01 00:00:00','2015-02-02 12:04:06','2015-02-02 12:04:06','2015-02-02 12:04:06','0001-01-01 00:00:00',0,0,0,0,0,0,0,0,0,0,'',0,'',0,'','0001-01-01',0,0,''),(6,6,'2015-02-02 12:04:29',1,0,0,0,'','friendica4','friendica4','','','','','','http://192.168.22.10/photo/profile/6.jpg','http://192.168.22.10/photo/avatar/6.jpg','http://192.168.22.10/photo/micro/6.jpg','','','','http://192.168.22.10/profile/friendica4','http://192.168.22.10/profile/friendica4','','','','','','http://192.168.22.10/dfrn_request/friendica4','http://192.168.22.10/dfrn_notify/friendica4','http://192.168.22.10/dfrn_poll/friendica4','http://192.168.22.10/dfrn_confirm/friendica4','http://192.168.22.10/poco/friendica4',0,0,0,0,'','0001-01-01 00:00:00','0001-01-01 00:00:00','2015-02-02 12:04:29','2015-02-02 12:04:29','2015-02-02 12:04:29','0001-01-01 00:00:00',0,0,0,0,0,0,0,0,0,0,'',0,'',0,'','0001-01-01',0,0,''),(7,4,'2015-02-02 18:41:17',0,0,3,1,'dfrn','friendica2','friendica2','','','','','','http://192.168.22.10/photo/343e3e9f0f5a36ea763c101490db9ca6-4.jpg','http://192.168.22.10/photo/343e3e9f0f5a36ea763c101490db9ca6-5.jpg','http://192.168.22.10/photo/343e3e9f0f5a36ea763c101490db9ca6-6.jpg','-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA4QpA4flE9v17fh+yrMpR\nU4iKSxLOF/8ROTotrdQsk8HcHkPS7E60QUaRK45gDc9O+7FU1+90V+oo0BqdkJFL\nbFtTogP5fdNSD3ApHz7s03oBX9JenU/8JhxaH1VwEs3lLDlFrywngiYcEDZIeLGZ\nIFK1GWP79+ZwJ9WWoBhzCD4hg4excOWPwwQMjCLYAzI5INEPTw+R3CKD6EsnVLu0\nS+u3zBBsL/A+bgDDfgZoD6igJQlvenK5jStgfbiuVp1mqdXKJ8D+rYz5FQ72Yn3r\nn6AvrXcPQMbLSaUK5m1Ug7beasuhRJ5Z7TVtJ/RLNgA3mOX2A2Vy1i38VYmcTaG5\nom8AYeI/nSvMzJt7FYXOBdxKnSW0UhkXsjBQavefz7sp2Lhcw5U+7eaPi2fIkYio\nVHKU2r8uiJPFfUMAbHA2+rScBjn2lYZH0nfMKrZTzva7y6d19EOsO2aP5e4XNjU8\n0tX/C1iy6LPMCf7xG844iROXi7NPJJoTgx/Sl6+o0oqBl9J5wJDK5U33rUSqYI/p\nsPEfaStqA5CgBAvAsq0N+NQQndJzGfuYaIdfleyUSLIchHhEICE4SN62RHZ6VTlg\nIVCva4xdBrGlkGV/IgE228FwgX4GWELclfUH/KwcGHChlY8dTtVZHbTCuizvPLvl\nXuZQ9ROdQiwkYwGJA/bhM3kCAwEAAQ==\n-----END PUBLIC KEY-----\n','af2c1bff1518afaf2df6d3600a7f2f036cc758f0044c4c3c7649cf53edcb4faa','','http://192.168.22.10/profile/friendica2','http://192.168.22.10/profile/friendica2','','','','-----BEGIN PRIVATE KEY-----\nMIIJQwIBADANBgkqhkiG9w0BAQEFAASCCS0wggkpAgEAAoICAQCp8Dy/Kp04TBGT\n4n0FpcvC2VuOXQb62qzikK7x7PXny/ObmM0L/Ew5tw71qsOnZECDy6tcow7NAMxQ\nbrALF/xJexHxVPBTj4RYxLIPGCzxFhTWYhzWm+R4pYOsvfqJJ7X6Re9Qc6NXb7U9\nAnrHYjJgHAA9POPDE5JOE+6Z9P0zzCpLIJi+pjm49CKu7VXLwQR25lKmjyXq6EDj\nYIk/WkzhBsiknaA9Rg7IDM0ssp820i8SRr3GQLyMfyTNPCIqB3lejaDZNpyo9AEI\nSGuc8O2ei9LJ/cg6aWR1D4hZxMg4LzZneggrh9jdZhyED+ZPhWtpp179T8KhxMqP\ng5Z+EZr2RIHwBiSbcuzGZQ1QgQb57/gJTsKlKWGHptdg1H/KxHGlexylpIF5X5pQ\nPLxBcmE3VtxJEIUP9Sf1/11DBrCl6ZQ1xhBiD31MGqz3pJiR5k2gQBalqPlVODPY\nBlaOTPS5duCbUTn+DqR+8igAJTsw/dIa1xOoRjtMB5nNyrijIIHZigF/3DtnnMEo\n1iNJFUgRr+R6B1sly8W2qFjgVln4ybJdf8HV8UWGNR7hZozPG6lU15CebAeH7ZEV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iF1I2Tnw17MoK7XFWNvZREkWh6A5Gq\nd+eIPuEgL0icNfYWc9Ckv4fuywLe9lrF2VqdeZoPctOBYNlNVsZgJD4vieKGmw4G\nOqkCggEBALkyBL734pf4dlyKmZeTGvv3Y8f45QmJSivGIksuTBDSF5MSLOL5hQwX\nnTnbi48X2fmFxfuPxkO4fhAjioVG0HXwr9+6CTYQmi6MK6lfFEKAh6JNO45GBRuO\nCWbsFUIrIcPULYkArtyeVz7bWs0yWUpzguddO1ekso3bZlk3fPp5Kt5b1wJAkz56\nPsYvAp9oLG0Pc1wPDJVBocsDtDVnZCxxz/rViuajut84llz5/9l0iGzB4bJrA2uG\nVX0A1gkaHRb3VdpF4856/pJAoH2ljh1U+5iquHBuvvK4vMxFeN+1fVm9c/Ksb2OU\ndLrR3o8mxnuDuIMDIUjpEZaR+FYKCSQ=\n-----END PRIVATE KEY-----\n','','http://192.168.22.10/dfrn_request/friendica2','http://192.168.22.10/dfrn_notify/friendica2','http://192.168.22.10/dfrn_poll/friendica2','http://192.168.22.10/dfrn_confirm/friendica2','http://192.168.22.10/poco/friendica2',0,0,0,0,'','2015-02-02 18:50:08','2015-02-02 18:50:08','2015-02-02 18:50:08','2015-02-02 18:41:48','2015-02-02 18:41:48','0001-01-01 00:00:00',0,0,0,1,0,0,0,0,0,0,'',99,'',0,'','0001-01-01',0,0,''),(8,3,'2015-02-02 18:41:21',0,0,3,1,'dfrn','friendica3','friendica3','','','','','','http://192.168.22.10/photo/1f4766db71f0f2d503287947c1d67dcd-4.jpg','http://192.168.22.10/photo/1f4766db71f0f2d503287947c1d67dcd-5.jpg','http://192.168.22.10/photo/1f4766db71f0f2d503287947c1d67dcd-6.jpg','-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAliSi9id9Ll1dpzXC/lL6\n2/5FYxdn0XYb5I2JeXBNopwbXOLDsnnzXlV2NN8riZaYRQcIbS00OuAvyYj/IG3i\nDykD2zPjVnLEWADtj1YhLSgKcfQgv6Cj/7CPdb1Rg3icbvWdVY9wabcblVa9k+qr\ngK273C47lCQzXgvMtPst1DOzxtVCGmPJJHKjXZ8hDvf/IS0pVGa0zIv9kdofqQV9\nD5u5LuNzRuEGnrpAzpfzMueDppBrrrr37sKrZfCvyYHZ/ouFgZ3bY9NNVnjuFItP\nrcDlJPL8NhGmmzuYtI03MLor+1yVdBKLIJ3G2Bxzn5tynjSX9XZzOQgC3+YVH4TU\n7WDUHjTWJ9mliD2M1WXCp2Lwc/pV1Prnvv057pAqdiMhnddzucV9nLk9X9fR8xyy\nC7PRwx0hkB427EtAYaOTr3RtInP6+cm+3M7wd6ZKTqWAU+Pi20RNrQRsqfHJ7+hx\n+i5rIG6/knB/C+MAAutEH25oY8kJYtJzXid2OBSE462DTuYaee9aGHUDNy+HQau8\nBhJ4/Wsc7Nf/7GRZ38SVT/HQShl47B1AG5AyomyWgwn9J2KJ8kMuScPmBv5u7Mwq\nSjLk5pLkwyUtZwUu8UtsFKw9HLcRksGSze5s2cbw3rf/6jgKycT72Bfm1fjRnv6s\nXt1GdSzfG9zVHuEwRDgTX3UCAwEAAQ==\n-----END PUBLIC KEY-----\n','','af2c1bff1518afaf2df6d3600a7f2f036cc758f0044c4c3c7649cf53edcb4faa','http://192.168.22.10/profile/friendica3','http://192.168.22.10/profile/friendica3','','','-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAqfA8vyqdOEwRk+J9BaXL\nwtlbjl0G+tqs4pCu8ez158vzm5jNC/xMObcO9arDp2RAg8urXKMOzQDMUG6wCxf8\nSXsR8VTwU4+EWMSyDxgs8RYU1mIc1pvkeKWDrL36iSe1+kXvUHOjV2+1PQJ6x2Iy\nYBwAPTzjwxOSThPumfT9M8wqSyCYvqY5uPQiru1Vy8EEduZSpo8l6uhA42CJP1pM\n4QbIpJ2gPUYOyAzNLLKfNtIvEka9xkC8jH8kzTwiKgd5Xo2g2TacqPQBCEhrnPDt\nnovSyf3IOmlkdQ+IWcTIOC82Z3oIK4fY3WYchA/mT4Vraade/U/CocTKj4OWfhGa\n9kSB8AYkm3LsxmUNUIEG+e/4CU7CpSlhh6bXYNR/ysRxpXscpaSBeV+aUDy8QXJh\nN1bcSRCFD/Un9f9dQwawpemUNcYQYg99TBqs96SYkeZNoEAWpaj5VTgz2AZWjkz0\nuXbgm1E5/g6kfvIoACU7MP3SGtcTqEY7TAeZzcq4oyCB2YoBf9w7Z5zBKNYjSRVI\nEa/kegdbJcvFtqhY4FZZ+MmyXX/B1fFFhjUe4WaMzxupVNeQnmwHh+2RFdRVEXNE\n9ch2CQ1iF2rqJ69hvKviZAsefbTErs2+CcDo3xF4FFgKUk2stSjVyHNf8yWL+E2m\nnOlQAAH+DA7w28kTeT++o+0CAwEAAQ==\n-----END PUBLIC KEY-----\n','','','http://192.168.22.10/dfrn_request/friendica3','http://192.168.22.10/dfrn_notify/friendica3','http://192.168.22.10/dfrn_poll/friendica3','http://192.168.22.10/dfrn_confirm/friendica3','http://192.168.22.10/poco/friendica3',1,0,0,0,'','2015-02-02 18:50:03','2015-02-02 18:50:03','2015-02-02 18:50:03','2015-02-02 18:41:48','2015-02-02 18:41:48','0001-01-01 00:00:00',0,0,0,1,0,0,0,0,0,0,'',99,'',0,'','0001-01-01',0,0,''),(9,6,'2015-02-02 18:44:07',0,0,3,1,'dfrn','friendica5','friendica5','','','','','','http://192.168.22.10/photo/75b60a2a1e6b2cdf2eb3637955a7a5c2-4.jpg','http://192.168.22.10/photo/75b60a2a1e6b2cdf2eb3637955a7a5c2-5.jpg','http://192.168.22.10/photo/75b60a2a1e6b2cdf2eb3637955a7a5c2-6.jpg','-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAyvuTsaZaTgPDm69uxixR\n8qd0ylkeA/IY3KDsI4vjrLuF7WLmU07lzQXmilQJ+MlipIju+wFXx3a8ksavEYpP\n9ZU9YrpXe7zneHRLTxgMDH9IMbSCIUAkEsozpzF02Ft0+G36tzIET2oTuU6uLtx6\nI5ifmF/qFC+4avAoABQg8qfOPpuaP3AJ6FppqEifUsb0lTWqP4zg7PQXC36oKIJ0\nUDuQniVy8lTxVfkhoi/aHZw0khVXe6tDK7C0ALg5U7jLTDNdJ1R0v5iC41QK4CEt\n5x4x008mdk6xLKGZiou1UuEPv/+WSQU1Q21JFzNVGBASkRu7dUVH6k+59VQr3ONI\n5bdbAZviVY3ezFNtBeWWfDk06BWoZwX67eGG/dVsCPnEkuP9CpemcwwGZbYCIqf0\n++5h0CU41CjNShHdBD+Q+ZQmT3I4sAlPZ7x90nA9KfuKM9QyTPQ9EmK2bxq7TKvV\nzLqHptL5mC/VH4FbO1eKf7p/f7XxOaeXGANUaRSPwLSO7lk8lkl/wj7sNJYGYygC\nMLTqH8GTizpyPkSDv5xO6bYn/g3BYFuUM5x1MZVS8MdG2a3L8UzRiXUsm/AjnfSV\nImN2+8bHJI0wy9zRxfEaG8pvbupb7UU5zWr3WRkSVr84Bq1SJNxLfWZj3GHLaesr\nu3exEdYGfxLuG1zHIROVwlcCAwEAAQ==\n-----END PUBLIC KEY-----\n','','1457f73164eefae32c107b310f3720c83bb5c7f9df88de0114714f4c77055337','http://192.168.22.10/profile/friendica5','http://192.168.22.10/profile/friendica5','','','-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA4HA9qXSYftx7tS6kTVvs\nBhVx7hPK57GIpUU6azuFGqmrAqEEsBh2+oLTDzYGvq7UW5NAbL6QdvoFkJC4tTJK\nwfMO7noAhBzzrLpGjJn6W1v7OaGX1VAQM32+dqgUP7aJF91DKx8nCcAqo8yPp4gr\nUe1Ev5Yrsa9so6XRXEI0n7PHTgRir8HIAHC4sDl1THuUdahD0q5hy+7ymyUHHEsF\nJJIC4zCuFNGdk2wqDdG534FAU5CKOL/OZW1n9vbumU8zwk3hdt5rmzxyxx6ji9KU\nJiSLSErGLo0xQklT2N+DND61SgSqKk2JDmnD6NtCb9u9Q06E+jpT4mKrTrxURqa0\nQ0So/7ZbJJWb2y7Yd7KTN8pvVzC3Set9+YXH8EVypVsAW/Io6KoUiFEuJhp1291R\nVXjt4opm3unxNVCYnl/Ui/p0mw9QjuaEx9/7Iu/RUKjXFWzqmzpXEinfVk6rscC5\nTJn7BAZFkhZD85YSmSuPkDbtiAS99uIyO2jaD1G29lkVzdG74KW54r2Np6rIOgqK\n4Gsr8H7LM/R03jBMPCjHtWT0bOyT6ySzqdq9YHsW/9Fr5uBL5EeOuL/xKuRNaaQs\nIflXwfcb35ouz5PDeP3T8m1tBhwWN2kiWVCiQuRQINhG1vFHU28Yof3XAQ3iWiV+\nfPp/WfEiQ/HnkJdmlwq82eECAwEAAQ==\n-----END PUBLIC KEY-----\n','','','http://192.168.22.10/dfrn_request/friendica5','http://192.168.22.10/dfrn_notify/friendica5','http://192.168.22.10/dfrn_poll/friendica5','http://192.168.22.10/dfrn_confirm/friendica5','http://192.168.22.10/poco/friendica5',0,1,0,0,'','2015-02-02 18:50:05','2015-02-02 18:50:05','2015-02-02 18:50:05','2015-02-02 18:45:30','2015-02-02 18:45:30','0001-01-01 00:00:00',0,0,0,1,0,0,0,0,0,0,'',99,'',0,'','0001-01-01',0,0,''),(10,5,'2015-02-02 18:45:10',0,0,3,1,'dfrn','friendica4','friendica4','','','','','','http://192.168.22.10/photo/d04134664ffd0d558b08ee01f6859f3a-4.jpg','http://192.168.22.10/photo/d04134664ffd0d558b08ee01f6859f3a-5.jpg','http://192.168.22.10/photo/d04134664ffd0d558b08ee01f6859f3a-6.jpg','-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA3nCYawg+HTyQgV7a7Osg\nCXeACOitKLhcb2WDTN/lLOMO7n1lSm3Kdv1dbOc0/lkAPeB2XsLF/aDfoUPWWg4Q\n/oRPrXFIi2dK/cIQVvgOhebQheztAYPJyaYYMWVK7bLbPuKVTyzALqkWD8Zjjtit\n4Uvm3kjmcofKr+/Lw+VFaEBMESQDbP5eTDtQeDGGjluWQMj1/D+V/Tcm+SMrAVIv\njyklQEhBJlYGJ+LsfXv4XXbeH73dkIXkQW5JgWQyPCloJ+PxmmjjEDozsdgmFQXq\n6T9HFVHvW2O2lmDoaTrbIGrULWBpslKZJJrV+LgtkzhP4uuKfJPD2DpMJ4+ixtBE\nzM/o+EuYDTz0P3dTvwruq1t8gUYcQOVUzEp1LM0qYDMVY86XneW1W5xghztl5zqy\nGBMBvjVIFvMVL1cVeXze4zpwwKln2cArepToSpN7lmy9EgBd9mZrVLWosZShB9R0\n05kBc2Tfv7FlixwZ1P8rwJn9sEEs9oa6TnRLL+7L8eqapg6vUI1G7e0HWWEjdHsR\nrYVHYW+ogtOYjrQ1Tfh1W2PtNaez5fGYVBDjC+1vy0scJmqrgy00z7MHBT2WTOAL\noHbdedhpa3UZ0FrsCto+vqil8BcF5aBhi2Hi5YdKtbY3EBsaabcSO2joc7rlmee4\nxdKfDRYXCPysFPhZNgIW708CAwEAAQ==\n-----END PUBLIC KEY-----\n','1457f73164eefae32c107b310f3720c83bb5c7f9df88de0114714f4c77055337','','http://192.168.22.10/profile/friendica4','http://192.168.22.10/profile/friendica4','','','','-----BEGIN PRIVATE KEY-----\nMIIJRAIBADANBgkqhkiG9w0BAQEFAASCCS4wggkqAgEAAoICAQDgcD2pdJh+3Hu1\nLqRNW+wGFXHuE8rnsYilRTprO4UaqasCoQSwGHb6gtMPNga+rtRbk0BsvpB2+gWQ\nkLi1MkrB8w7uegCEHPOsukaMmfpbW/s5oZfVUBAzfb52qBQ/tokX3UMrHycJwCqj\nzI+niCtR7US/liuxr2yjpdFcQjSfs8dOBGKvwcgAcLiwOXVMe5R1qEPSrmHL7vKb\nJQccSwUkkgLjMK4U0Z2TbCoN0bnfgUBTkIo4v85lbWf29u6ZTzPCTeF23mubPHLH\nHqOL0pQmJItISsYujTFCSVPY34M0PrVKBKo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mUlATd9YlDJJKQqbPkEvg5whZnoZM/yBQnwKCAQBFZt9mBiW1nFa0apfo\nlL6rjlY5elsYj3LIw4VTYT1VNsBbjWgzALSdqn1W09VQImKSsH+aih6W4FJosypw\noo3mdccpuAShxBfL+kcORH/cPNLRM3PPi6PTpTqhfI+Mwr3yRRBbe27zy4XxMCpE\nr9fsUFTJo5gnho24XiJ21rIco1/uNpTbgTcN+b8opksFyBXw7XsW7fEWrGrSP0kK\nrKPlF0C376gdVNCP8eehH1XE5ziCLePiZbHk+pJeut+IyRX2MD/wD5SBmxZt/exP\nqkMk7/bItBXbJMLOAY5qOkDK8NBh2+BdDI+AFnDe7H9IF+eGR7IbOLXG9sQl0VV1\nrNqRAoIBAQDcaPs8IbbP5SdAGRUMotS94XRdnJOTuJ6jev1zS1yvp/8ptMdkByoy\nqXw4UKUXpQOUDr82B/MPWSRAS5xjXogfbYIeBLm6CpYtjV+XhGJcGbBg/wVUMKvz\nFreSCIEICWi7OiGQG9j7E1hLWpMI59LBFHgLBX6KvNAiuQbTeEHus243FXFlD9Sl\ne+k4tw1/CNgPozRfrLJF+uxUH0P9kYXFXFxXff2PK7VLr3/2Je7uV1ckPLlAJCFI\nnEQpdPjPmRhmohiHv5NHlqLVNX8I0XincM1XPdD/qiIqP+asrc9CF4z/Od9F0XSP\nuAn81wfguN+AIeC3BnIO1RLZnpAEwUWW\n-----END PRIVATE KEY-----\n','','http://192.168.22.10/dfrn_request/friendica4','http://192.168.22.10/dfrn_notify/friendica4','http://192.168.22.10/dfrn_poll/friendica4','http://192.168.22.10/dfrn_confirm/friendica4','http://192.168.22.10/poco/friendica4',0,0,0,0,'','2015-02-02 18:50:11','2015-02-02 18:50:11','2015-02-02 18:50:11','2015-02-02 18:45:30','2015-02-02 18:45:30','0001-01-01 00:00:00',0,0,0,1,0,0,0,0,0,0,'',99,'',0,'','0001-01-01',0,0,''),(11,3,'2015-02-02 18:49:20',0,0,3,1,'dfrn','friendica1','friendica1','','','','','','http://192.168.22.10/photo/389cca68d9a2e64538a81680925703b8-4.jpg','http://192.168.22.10/photo/389cca68d9a2e64538a81680925703b8-5.jpg','http://192.168.22.10/photo/389cca68d9a2e64538a81680925703b8-6.jpg','-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA8/tIxRBs81u0V6ug4VXh\nG8omo+8YIckQqL5m7jWJqQ3v0fCrjyO8EcrjXhKC6esafSOlVhgxzFOkqNH8rRGF\ntF00suNJXy/0fh6EFFvifX1hQw1ZCXXlHxmmM4yNkGOzbRXPeVuSxyn1OtQNGRnB\nSGeqdCZc4QMtgPbVPwTTWYB4rSbVGYbEa5vpqY0OFnlIwC+BtQrd0xFEO7+FGfmv\n2jRt7ImRiyFazef0NhZL890IFeB5+rF8fifC3o7OP0kzB75+z5LkBfnsveZCriaj\nwHjUmMOa/hTOVHw4qYIq6XY4Q2OgaGTs2xqBz4/gniKjNSBbRyYy45prFOuJTLmO\ns07078nfg3NbWq5JkszwPen+gcvc4Pv38z2DBc2RxjgU0YbY4ZV053GIzd8hutA4\nm+eD1Cl0NZcEd9OYi3dtXWACPsf2C0/FsouAj1juXWxeRZ9exHphs0tCXt/RPgyK\nOqFPaPRCBL6MUvM0N1yR2TVk3s3Uq0k/4AExcplJGuZt8bMDIGR6g3RF+bXn3eLb\n9SnpnLSIMpHS/N/JVQzMs4W8tkdwi2OiIeNWhYrFH/stfU7KPYXdwVfduDTAv9LA\nY5Yk8oMomfL5b097eKDdzXFJ3rKUXktobl74REtgAfXEA3OgqCXUGPLbS45I8gsZ\nxBFRmmPH3SuOCQSRkY0gb/UCAwEAAQ==\n-----END PUBLIC KEY-----\n','4968c78f8a9df6fc4e43949748a0e94567dc0f83166cf83cd8e0f98f406e1b3f','','http://192.168.22.10/profile/friendica1','http://192.168.22.10/profile/friendica1','','','','-----BEGIN PRIVATE KEY-----\nMIIJQwIBADANBgkqhkiG9w0BAQEFAASCCS0wggkpAgEAAoICAQCjZo+s91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168.22.10/dfrn_request/friendica1','http://192.168.22.10/dfrn_notify/friendica1','http://192.168.22.10/dfrn_poll/friendica1','http://192.168.22.10/dfrn_confirm/friendica1','http://192.168.22.10/poco/friendica1',0,0,0,0,'','2015-02-02 19:00:09','2015-02-02 19:00:09','2015-02-02 19:00:14','2015-02-02 18:51:35','2015-02-02 18:51:35','0001-01-01 00:00:00',0,0,0,1,0,0,0,0,0,0,'',99,'',0,'','0001-01-01',0,0,''),(12,2,'2015-02-02 18:49:41',0,0,3,1,'dfrn','friendica2','friendica2','','','','','','http://192.168.22.10/photo/b18ee0c7f160fdbf8f5d91a56a07a13c-4.jpg','http://192.168.22.10/photo/b18ee0c7f160fdbf8f5d91a56a07a13c-5.jpg','http://192.168.22.10/photo/b18ee0c7f160fdbf8f5d91a56a07a13c-6.jpg','-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA4QpA4flE9v17fh+yrMpR\nU4iKSxLOF/8ROTotrdQsk8HcHkPS7E60QUaRK45gDc9O+7FU1+90V+oo0BqdkJFL\nbFtTogP5fdNSD3ApHz7s03oBX9JenU/8JhxaH1VwEs3lLDlFrywngiYcEDZIeLGZ\nIFK1GWP79+ZwJ9WWoBhzCD4hg4excOWPwwQMjCLYAzI5INEPTw+R3CKD6EsnVLu0\nS+u3zBBsL/A+bgDDfgZoD6igJQlvenK5jStgfbiuVp1mqdXKJ8D+rYz5FQ72Yn3r\nn6AvrXcPQMbLSaUK5m1Ug7beasuhRJ5Z7TVtJ/RLNgA3mOX2A2Vy1i38VYmcTaG5\nom8AYeI/nSvMzJt7FYXOBdxKnSW0UhkXsjBQavefz7sp2Lhcw5U+7eaPi2fIkYio\nVHKU2r8uiJPFfUMAbHA2+rScBjn2lYZH0nfMKrZTzva7y6d19EOsO2aP5e4XNjU8\n0tX/C1iy6LPMCf7xG844iROXi7NPJJoTgx/Sl6+o0oqBl9J5wJDK5U33rUSqYI/p\nsPEfaStqA5CgBAvAsq0N+NQQndJzGfuYaIdfleyUSLIchHhEICE4SN62RHZ6VTlg\nIVCva4xdBrGlkGV/IgE228FwgX4GWELclfUH/KwcGHChlY8dTtVZHbTCuizvPLvl\nXuZQ9ROdQiwkYwGJA/bhM3kCAwEAAQ==\n-----END PUBLIC KEY-----\n','','4968c78f8a9df6fc4e43949748a0e94567dc0f83166cf83cd8e0f98f406e1b3f','http://192.168.22.10/profile/friendica2','http://192.168.22.10/profile/friendica2','','','-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAo2aPrPdWu1ePgAXGXf2s\nXghNafRw4ccBMA1hqAHjxc2pLD+DMq3iyVoH+dS8AM2GhKHsmL/oslBDLX5J//VS\n1rgOKkRvMikFaodvDnQz1HcLLyKO05hYJFQS98jrj7bNBHiXXZXvggTgjlYl5eS4\nFX9qT2ORCyD5jlDkHZOiF+mosVeNoLeC/FfoUFQkvm+Evi5hgU8a/HvFw02BGNZE\nEKVLV1PRtQNJHa+G8RrgNFjWN6aZWzsFdfxdWGKcLQDbJYblehUyoBIwnaEIUWih\nR9JadBzLu7OPEe1ID41ZD9XOTDgF6iaN24qjMhXLQMe/I2h4o9FTja9qi2smEz32\nNH8qQW+bin2Krr3EUDur/6GomeIz9IS7M3pAaOLD6rQ3bjFsJcxJhA6jUzHLZ9AA\n6YJ75j0+vTkkshROndncXD2z++7+YYxd1Ceop86s7sRNjcWCuVH4VMC92Acp62SE\nsDfkx3pJAAcff7asCwnds+vKHKGiYv7XNqECkhsDYJP6WuxoPc5IDHYUCgM2HJ/n\nDaTg8eiziouyC4YjRCEh1Ogp6G21KcDWaxEi9H4UsMakzFerPcwkMXbVV4Ya84Yf\nTAs9H0YvMGL1N2SGxLD9+olwMqlIUR5ty2aB+lS/6hy2SJWRihCuPHGy6Kaoj87B\njGswRAib0YN5lgu5n8xEKgECAwEAAQ==\n-----END PUBLIC KEY-----\n','','','http://192.168.22.10/dfrn_request/friendica2','http://192.168.22.10/dfrn_notify/friendica2','http://192.168.22.10/dfrn_poll/friendica2','http://192.168.22.10/dfrn_confirm/friendica2','http://192.168.22.10/poco/friendica2',1,0,0,0,'','2015-02-02 19:00:21','2015-02-02 19:00:21','2015-02-02 19:00:21','2015-02-02 18:51:34','2015-02-02 18:51:34','0001-01-01 00:00:00',0,0,0,1,0,0,0,0,0,0,'',99,'',0,'','0001-01-01',0,0,''),(13,4,'2015-02-02 18:50:05',0,0,3,1,'dfrn','friendica1','friendica1','','','','','','http://192.168.22.10/photo/ba266e976726cba185c218750c545814-4.jpg','http://192.168.22.10/photo/ba266e976726cba185c218750c545814-5.jpg','http://192.168.22.10/photo/ba266e976726cba185c218750c545814-6.jpg','-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA8/tIxRBs81u0V6ug4VXh\nG8omo+8YIckQqL5m7jWJqQ3v0fCrjyO8EcrjXhKC6esafSOlVhgxzFOkqNH8rRGF\ntF00suNJXy/0fh6EFFvifX1hQw1ZCXXlHxmmM4yNkGOzbRXPeVuSxyn1OtQNGRnB\nSGeqdCZc4QMtgPbVPwTTWYB4rSbVGYbEa5vpqY0OFnlIwC+BtQrd0xFEO7+FGfmv\n2jRt7ImRiyFazef0NhZL890IFeB5+rF8fifC3o7OP0kzB75+z5LkBfnsveZCriaj\nwHjUmMOa/hTOVHw4qYIq6XY4Q2OgaGTs2xqBz4/gniKjNSBbRyYy45prFOuJTLmO\ns07078nfg3NbWq5JkszwPen+gcvc4Pv38z2DBc2RxjgU0YbY4ZV053GIzd8hutA4\nm+eD1Cl0NZcEd9OYi3dtXWACPsf2C0/FsouAj1juXWxeRZ9exHphs0tCXt/RPgyK\nOqFPaPRCBL6MUvM0N1yR2TVk3s3Uq0k/4AExcplJGuZt8bMDIGR6g3RF+bXn3eLb\n9SnpnLSIMpHS/N/JVQzMs4W8tkdwi2OiIeNWhYrFH/stfU7KPYXdwVfduDTAv9LA\nY5Yk8oMomfL5b097eKDdzXFJ3rKUXktobl74REtgAfXEA3OgqCXUGPLbS45I8gsZ\nxBFRmmPH3SuOCQSRkY0gb/UCAwEAAQ==\n-----END PUBLIC KEY-----\n','1993beda190780abf81b6585d66643d9c14726c3fc5876604985b687f74877f5','','http://192.168.22.10/profile/friendica1','http://192.168.22.10/profile/friendica1','','','','-----BEGIN PRIVATE KEY-----\nMIIJQQIBADANBgkqhkiG9w0BAQEFAASCCSswggknAgEAAoICAQClyqb0yY9wQ4jm\nPo9836jQWx2FxXtGZ/hPVNSG9/ig+PGdwL+kQy/95yz80A2J+Bu5zd9ePe9Xt2fL\nEw8qX1pVqxMb1WL6L6rmRIy7JGEcRbmggoN/sp+1bCstxVWKTgJYcYv6rgL7aeEP\n3RRt1LcwpqLD9oeIpkHMJ/LnCksCJTgxGwsbJcsRGFd4smgVjL+kcAfiWQjajkim\nU6FbB6K3KrxeNcM//i6vRX0fx7B1PLuEroMfE6VfX/2TW0Gcn4P6VTCJeCMDU+iq\nD4ae880zykRKZyKeFnlG4oe7yYI/n3YD6PglfNgmfH4HoK5oYK6YhZHLWUOg+pQl\nbIf69b60U5f7tnlhtz3mkF0w7HO1TS/6W0BAQABXohv/96RMeZOV1rvHR1fNiDSg\nSWjDbHDeTbaSPyR9czOg+DysfIZc4xVK8Bt10MWz/3Telij95UZS5Lw7YYHlCVVC\n8Q1aeeNM9fm0w8mFcQ0FTYBAkWxP9E9cUbKkGS17lma1uq0sePLTCvzHtrM0zScA\nmneY5ZYAHfhsXmTVuK4tKuDP4d6sfH7zTDm39zSJnI9DNTzK+D8CCPEULqJdeHKa\nuWcL3lO/mtmlL/RwaLIGuvd2OG1+6iGQ8pvxtt792FkzmHWP5HgaQ3+ikYUcTda4\nk4DPhzz9STz+dXYPzgRid0PJ+wQAUQIDAQABAoICAD/VO90J8glGZ2JG+hYZQzUd\nr8s+ks0z4L4iqkVhGkBYOScE/IRxPfwjUwXv0RarCXnLk1IExK9gNT1SFEe7ONu9\nJ3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CpZr7NGlq28dYjC6vbr36b79xrW+poPFv7\nfOSSLHOxW/rqvWxconkMYfUDgSay333r+t3KNPzNwPRjawZBL91I2Dnjy2XgogT+\nXV9Xr0mQ5g8iQAV+HNYXYuQxlAkbVkpLyJAvacPjrgQ6+BrQMhzklKo6h4RW9PS9\n9PopqjwsXCKR1VnZhkhbt66xqmkEOtyl6ytYhUKDlzI3z8V1yK8V7hGhM2P17ksr\nNjUrIANF0eZWxtdfweUXB3ncY1qM\n-----END PRIVATE KEY-----\n','','http://192.168.22.10/dfrn_request/friendica1','http://192.168.22.10/dfrn_notify/friendica1','http://192.168.22.10/dfrn_poll/friendica1','http://192.168.22.10/dfrn_confirm/friendica1','http://192.168.22.10/poco/friendica1',0,0,0,0,'','2015-02-02 19:00:15','2015-02-02 19:00:15','2015-02-02 19:00:15','2015-02-02 18:52:24','2015-02-02 18:52:24','0001-01-01 00:00:00',0,0,0,1,0,0,0,0,0,0,'',99,'',0,'','0001-01-01',0,0,''),(14,2,'2015-02-02 18:50:08',0,0,3,1,'dfrn','friendica3','friendica3','','','','','','http://192.168.22.10/photo/1fc6596c195944666e18cbd313795942-4.jpg','http://192.168.22.10/photo/1fc6596c195944666e18cbd313795942-5.jpg','http://192.168.22.10/photo/1fc6596c195944666e18cbd313795942-6.jpg','-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAliSi9id9Ll1dpzXC/lL6\n2/5FYxdn0XYb5I2JeXBNopwbXOLDsnnzXlV2NN8riZaYRQcIbS00OuAvyYj/IG3i\nDykD2zPjVnLEWADtj1YhLSgKcfQgv6Cj/7CPdb1Rg3icbvWdVY9wabcblVa9k+qr\ngK273C47lCQzXgvMtPst1DOzxtVCGmPJJHKjXZ8hDvf/IS0pVGa0zIv9kdofqQV9\nD5u5LuNzRuEGnrpAzpfzMueDppBrrrr37sKrZfCvyYHZ/ouFgZ3bY9NNVnjuFItP\nrcDlJPL8NhGmmzuYtI03MLor+1yVdBKLIJ3G2Bxzn5tynjSX9XZzOQgC3+YVH4TU\n7WDUHjTWJ9mliD2M1WXCp2Lwc/pV1Prnvv057pAqdiMhnddzucV9nLk9X9fR8xyy\nC7PRwx0hkB427EtAYaOTr3RtInP6+cm+3M7wd6ZKTqWAU+Pi20RNrQRsqfHJ7+hx\n+i5rIG6/knB/C+MAAutEH25oY8kJYtJzXid2OBSE462DTuYaee9aGHUDNy+HQau8\nBhJ4/Wsc7Nf/7GRZ38SVT/HQShl47B1AG5AyomyWgwn9J2KJ8kMuScPmBv5u7Mwq\nSjLk5pLkwyUtZwUu8UtsFKw9HLcRksGSze5s2cbw3rf/6jgKycT72Bfm1fjRnv6s\nXt1GdSzfG9zVHuEwRDgTX3UCAwEAAQ==\n-----END PUBLIC KEY-----\n','','1993beda190780abf81b6585d66643d9c14726c3fc5876604985b687f74877f5','http://192.168.22.10/profile/friendica3','http://192.168.22.10/profile/friendica3','','','-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEApcqm9MmPcEOI5j6PfN+o\n0FsdhcV7Rmf4T1TUhvf4oPjxncC/pEMv/ecs/NANifgbuc3fXj3vV7dnyxMPKl9a\nVasTG9Vi+i+q5kSMuyRhHEW5oIKDf7KftWwrLcVVik4CWHGL+q4C+2nhD90UbdS3\nMKaiw/aHiKZBzCfy5wpLAiU4MRsLGyXLERhXeLJoFYy/pHAH4lkI2o5IplOhWwei\ntyq8XjXDP/4ur0V9H8ewdTy7hK6DHxOlX1/9k1tBnJ+D+lUwiXgjA1Poqg+GnvPN\nM8pESmcinhZ5RuKHu8mCP592A+j4JXzYJnx+B6CuaGCumIWRy1lDoPqUJWyH+vW+\ntFOX+7Z5Ybc95pBdMOxztU0v+ltAQEAAV6Ib//ekTHmTlda7x0dXzYg0oElow2xw\n3k22kj8kfXMzoPg8rHyGXOMVSvAbddDFs/903pYo/eVGUuS8O2GB5QlVQvENWnnj\nTPX5tMPJhXENBU2AQJFsT/RPXFGypBkte5ZmtbqtLHjy0wr8x7azNM0nAJp3mOWW\nAB34bF5k1biuLSrgz+HerHx+80w5t/c0iZyPQzU8yvg/AgjxFC6iXXhymrlnC95T\nv5rZpS/0cGiyBrr3djhtfuohkPKb8bbe/dhZM5h1j+R4GkN/opGFHE3WuJOAz4c8\n/Uk8/nV2D84EYndDyfsEAFECAwEAAQ==\n-----END PUBLIC KEY-----\n','','','http://192.168.22.10/dfrn_request/friendica3','http://192.168.22.10/dfrn_notify/friendica3','http://192.168.22.10/dfrn_poll/friendica3','http://192.168.22.10/dfrn_confirm/friendica3','http://192.168.22.10/poco/friendica3',1,0,0,0,'','2015-02-02 19:00:12','2015-02-02 19:00:12','2015-02-02 19:00:12','2015-02-02 18:52:24','2015-02-02 18:52:24','0001-01-01 00:00:00',0,0,0,1,0,0,0,0,0,0,'',99,'',0,'','0001-01-01',0,0,''),(15,5,'2015-02-02 18:50:52',0,0,3,1,'dfrn','friendica1','friendica1','','','','','','http://192.168.22.10/photo/73de577b8bcc76d9358ab8536f0a5cca-4.jpg','http://192.168.22.10/photo/73de577b8bcc76d9358ab8536f0a5cca-5.jpg','http://192.168.22.10/photo/73de577b8bcc76d9358ab8536f0a5cca-6.jpg','-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA8/tIxRBs81u0V6ug4VXh\nG8omo+8YIckQqL5m7jWJqQ3v0fCrjyO8EcrjXhKC6esafSOlVhgxzFOkqNH8rRGF\ntF00suNJXy/0fh6EFFvifX1hQw1ZCXXlHxmmM4yNkGOzbRXPeVuSxyn1OtQNGRnB\nSGeqdCZc4QMtgPbVPwTTWYB4rSbVGYbEa5vpqY0OFnlIwC+BtQrd0xFEO7+FGfmv\n2jRt7ImRiyFazef0NhZL890IFeB5+rF8fifC3o7OP0kzB75+z5LkBfnsveZCriaj\nwHjUmMOa/hTOVHw4qYIq6XY4Q2OgaGTs2xqBz4/gniKjNSBbRyYy45prFOuJTLmO\ns07078nfg3NbWq5JkszwPen+gcvc4Pv38z2DBc2RxjgU0YbY4ZV053GIzd8hutA4\nm+eD1Cl0NZcEd9OYi3dtXWACPsf2C0/FsouAj1juXWxeRZ9exHphs0tCXt/RPgyK\nOqFPaPRCBL6MUvM0N1yR2TVk3s3Uq0k/4AExcplJGuZt8bMDIGR6g3RF+bXn3eLb\n9SnpnLSIMpHS/N/JVQzMs4W8tkdwi2OiIeNWhYrFH/stfU7KPYXdwVfduDTAv9LA\nY5Yk8oMomfL5b097eKDdzXFJ3rKUXktobl74REtgAfXEA3OgqCXUGPLbS45I8gsZ\nxBFRmmPH3SuOCQSRkY0gb/UCAwEAAQ==\n-----END PUBLIC KEY-----\n','0bc099852fd312feafb2cba2fa0019cf973e643951ddbf6ffdf6fad5aa58f25a','','http://192.168.22.10/profile/friendica1','http://192.168.22.10/profile/friendica1','','','','-----BEGIN PRIVATE KEY-----\nMIIJQgIBADANBgkqhkiG9w0BAQEFAASCCSwwggkoAgEAAoICAQDbCtvcmn1RIKfD\nUusiez0aVlimCIEltnEjNeKz/2PTRZqMWdrkhbWMGtYuWBq6FmK3yWB9MkNtyKDE\npo4ncGeWMKtPk2oyY7wyV2KazTKGpfrymwKqF3/YYmbiLSAWpzpBThP0Dd7Eg35Y\nyeCTbKzYN7hp2VUR52j6XxhxgLbj97bnd7+oBst+TN4ZTZ061xjWDexpWYiQR1ck\nBS+0JKxh89t6n3oA64CPY/e3W8vJ5BIaW/PW4rHAwWU4fa4PKUcepHin5yYC1n5h\nQLBbpPOShLBeGisJ1370bVi/yfdYUohxGVFmy1u863VF3I0iTDuvSDSvdfud/Vrt\nJaCnHL9FKhhYMpW8cDTxCttNZ0fu927f5ftLbnmm/JQOGR7E/6JFmDkMWUCGGr7z\nTXyqnGkn3N1KjmBNfRGifA0pJQqZHWYyDsXTW/barNsGykz3njjo045RLvGHfAoM\nafuOg+trniQfi7kDJr+/ipnxAMYphXORfnFljX2RLPWIHOLGxKUgdprjdx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BeaPm0QOK/QXE1SnXOTJJA\nDWkUHCiDkWLDIxtg9klYKSVbuzShNIKN0mNvz83k9f1oFGY9jYC4BEG/UiAw7Cop\nV6wvbTN03+fJfyk7tZh7OKnq6DIXKUQaxFuY7WqUbN6IoKgDuFPy8wGtU4lj9g4E\n0OECggEAG+9Bz9Tzp+JWhGXVsQ5NAKFHw2SJFFFCqFe27hVS7R7E+wJx84i6AEuh\nMWA7bxKHU4XJ5waCmxLLiY9BTb8lkYzT0gttl7O6J5mWTW/wT4VDZGSywQpt0uVD\nNPRpKAvFumXJccaWDz9Oz9oChk4P93a0kZi/H59uePb95xW8MXsVPIjiq/PjVewY\nsKRqEXeE3qeahieyz9ac9Dc2MJVvuuot3wRM3YERgjzZAfSqK8Lo4rSHgiGg4iYj\n2IoxAN007n4ZSiXH/qUtMAIOQGFfO1jqmt6dZkt3kJ9+2JkYa01vnLUvA9KViPI3\n3fhPNAoXmu3k6cGhzDjNG5bQVWIU8g==\n-----END PRIVATE KEY-----\n','','http://192.168.22.10/dfrn_request/friendica1','http://192.168.22.10/dfrn_notify/friendica1','http://192.168.22.10/dfrn_poll/friendica1','http://192.168.22.10/dfrn_confirm/friendica1','http://192.168.22.10/poco/friendica1',0,0,0,0,'','2015-02-02 19:00:06','2015-02-02 19:00:06','2015-02-02 19:00:06','2015-02-02 18:51:07','2015-02-02 18:51:07','0001-01-01 00:00:00',0,0,0,1,0,0,0,0,0,0,'',99,'',0,'','0001-01-01',0,0,''),(16,2,'2015-02-02 18:50:55',0,0,3,1,'dfrn','friendica5','friendica5','','','','','','http://192.168.22.10/photo/01072618a17425401fafdeb40fcd79ac-4.jpg','http://192.168.22.10/photo/01072618a17425401fafdeb40fcd79ac-5.jpg','http://192.168.22.10/photo/01072618a17425401fafdeb40fcd79ac-6.jpg','-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAyvuTsaZaTgPDm69uxixR\n8qd0ylkeA/IY3KDsI4vjrLuF7WLmU07lzQXmilQJ+MlipIju+wFXx3a8ksavEYpP\n9ZU9YrpXe7zneHRLTxgMDH9IMbSCIUAkEsozpzF02Ft0+G36tzIET2oTuU6uLtx6\nI5ifmF/qFC+4avAoABQg8qfOPpuaP3AJ6FppqEifUsb0lTWqP4zg7PQXC36oKIJ0\nUDuQniVy8lTxVfkhoi/aHZw0khVXe6tDK7C0ALg5U7jLTDNdJ1R0v5iC41QK4CEt\n5x4x008mdk6xLKGZiou1UuEPv/+WSQU1Q21JFzNVGBASkRu7dUVH6k+59VQr3ONI\n5bdbAZviVY3ezFNtBeWWfDk06BWoZwX67eGG/dVsCPnEkuP9CpemcwwGZbYCIqf0\n++5h0CU41CjNShHdBD+Q+ZQmT3I4sAlPZ7x90nA9KfuKM9QyTPQ9EmK2bxq7TKvV\nzLqHptL5mC/VH4FbO1eKf7p/f7XxOaeXGANUaRSPwLSO7lk8lkl/wj7sNJYGYygC\nMLTqH8GTizpyPkSDv5xO6bYn/g3BYFuUM5x1MZVS8MdG2a3L8UzRiXUsm/AjnfSV\nImN2+8bHJI0wy9zRxfEaG8pvbupb7UU5zWr3WRkSVr84Bq1SJNxLfWZj3GHLaesr\nu3exEdYGfxLuG1zHIROVwlcCAwEAAQ==\n-----END PUBLIC KEY-----\n','','0bc099852fd312feafb2cba2fa0019cf973e643951ddbf6ffdf6fad5aa58f25a','http://192.168.22.10/profile/friendica5','http://192.168.22.10/profile/friendica5','','','-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA2wrb3Jp9USCnw1LrIns9\nGlZYpgiBJbZxIzXis/9j00WajFna5IW1jBrWLlgauhZit8lgfTJDbcigxKaOJ3Bn\nljCrT5NqMmO8Mldims0yhqX68psCqhd/2GJm4i0gFqc6QU4T9A3exIN+WMngk2ys\n2De4adlVEedo+l8YcYC24/e253e/qAbLfkzeGU2dOtcY1g3saVmIkEdXJAUvtCSs\nYfPbep96AOuAj2P3t1vLyeQSGlvz1uKxwMFlOH2uDylHHqR4p+cmAtZ+YUCwW6Tz\nkoSwXhorCdd+9G1Yv8n3WFKIcRlRZstbvOt1RdyNIkw7r0g0r3X7nf1a7SWgpxy/\nRSoYWDKVvHA08QrbTWdH7vdu3+X7S255pvyUDhkexP+iRZg5DFlAhhq+8018qpxp\nJ9zdSo5gTX0RonwNKSUKmR1mMg7F01v22qzbBspM95446NOOUS7xh3wKDGn7joPr\na54kH4u5Aya/v4qZ8QDGKYVzkX5xZY19kSz1iBzixsSlIHaa43cTqHOy+xA54sPp\nlJe/yMSpAo3itt7DIz33HcJnwwRxTKTLZwqfxOB3rdu2GVpLA6JIEvl7OOLFfOcS\nS+9QankJK/J7Xe/aldmWqQBogx9dLW7XGTPSDF/unNctazg0K84aWUbH7Nc9bC5G\nvszuTsVfiavruK0UCE0qQtkCAwEAAQ==\n-----END PUBLIC KEY-----\n','','','http://192.168.22.10/dfrn_request/friendica5','http://192.168.22.10/dfrn_notify/friendica5','http://192.168.22.10/dfrn_poll/friendica5','http://192.168.22.10/dfrn_confirm/friendica5','http://192.168.22.10/poco/friendica5',1,0,0,0,'','2015-02-02 19:00:18','2015-02-02 19:00:18','2015-02-02 19:00:18','2015-02-02 18:51:07','2015-02-02 18:51:07','0001-01-01 00:00:00',0,0,0,1,0,0,0,0,0,0,'',99,'',0,'','0001-01-01',0,0,''),(17,6,'2015-02-02 18:51:55',0,0,3,1,'dfrn','friendica1','friendica1','','','','','','http://192.168.22.10/photo/b4cbb73d1178aab3424a788419bbe016-4.jpg','http://192.168.22.10/photo/b4cbb73d1178aab3424a788419bbe016-5.jpg','http://192.168.22.10/photo/b4cbb73d1178aab3424a788419bbe016-6.jpg','-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA8/tIxRBs81u0V6ug4VXh\nG8omo+8YIckQqL5m7jWJqQ3v0fCrjyO8EcrjXhKC6esafSOlVhgxzFOkqNH8rRGF\ntF00suNJXy/0fh6EFFvifX1hQw1ZCXXlHxmmM4yNkGOzbRXPeVuSxyn1OtQNGRnB\nSGeqdCZc4QMtgPbVPwTTWYB4rSbVGYbEa5vpqY0OFnlIwC+BtQrd0xFEO7+FGfmv\n2jRt7ImRiyFazef0NhZL890IFeB5+rF8fifC3o7OP0kzB75+z5LkBfnsveZCriaj\nwHjUmMOa/hTOVHw4qYIq6XY4Q2OgaGTs2xqBz4/gniKjNSBbRyYy45prFOuJTLmO\ns07078nfg3NbWq5JkszwPen+gcvc4Pv38z2DBc2RxjgU0YbY4ZV053GIzd8hutA4\nm+eD1Cl0NZcEd9OYi3dtXWACPsf2C0/FsouAj1juXWxeRZ9exHphs0tCXt/RPgyK\nOqFPaPRCBL6MUvM0N1yR2TVk3s3Uq0k/4AExcplJGuZt8bMDIGR6g3RF+bXn3eLb\n9SnpnLSIMpHS/N/JVQzMs4W8tkdwi2OiIeNWhYrFH/stfU7KPYXdwVfduDTAv9LA\nY5Yk8oMomfL5b097eKDdzXFJ3rKUXktobl74REtgAfXEA3OgqCXUGPLbS45I8gsZ\nxBFRmmPH3SuOCQSRkY0gb/UCAwEAAQ==\n-----END PUBLIC KEY-----\n','cd8d6796a986b38a7fb102d05cb41dabe3bdd042f05bf2e5d184a9fdae0255fc','','http://192.168.22.10/profile/friendica1','http://192.168.22.10/profile/friendica1','','','','-----BEGIN PRIVATE KEY-----\nMIIJQwIBADANBgkqhkiG9w0BAQEFAASCCS0wggkpAgEAAoICAQDCyqFtB4TgbrcJ\n59saeXpo/P+01pHCILBzYKhWhrPDhzI2S+ByaeGbMm/ID2EqGrMxBiJs8gPzPVLk\nF1o/V2HWwelM/adgSoT8zihpebfOTjMFB3ExenheLqym7dbigt2f11ArDCF9wPli\nKgOuSwhb9JQSBkhHtfByVVTlKHKP9nmyyWVeo5ZI9cCJ9DlNw/c9uoSX4gW43df0\n/onnVwd6Z4MtoapKmiI6WDljsTveRliJerXFRbmXhzb/AnYUp4aZa8lpeH7TqGQ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op\nWwJEas+mogeitHdZEW6jV/mvy+lPBT+ipCwacEp9AoIBAQCr9T16tMfm/jsvfdPu\n7yaDeII+ar/LlWlxNOGYjC7932CQZdvdygVCSPhndkIWjaXOoQQB4glwUcj1Hkc8\nLDShhtwJM0TQ0lemStPpHyb3mxSrBo1rCciPV+71IdwQsKzm2sYOIGx7QGGNciUT\np3ehSJDFM4XFuDJyeHaGLoLrBP/e68SIwOgdIoNX/kW1VXwHYODM7C++Y4iDu9XH\n+K9BOXJ/erUOxsOXhP32UGnTm0LErzLavuFwM/H0kvl/BldHOfPVbbbwBxTcxrIH\n9APUukQ77GHpehoxhFxW7IuLFoUMsZGLV/h0MVXBTLIYYnuj/PANhMcEH9Yn7Rq4\nPdjJAoIBAEYONbywm3BUYvpQeN+PZPgfNAdRsFCU+dlPCFGA02fzF5H/NmKxIT6A\naqU7AA2W7ZmgRHuXMVGf+0q19xPvzi2LVZpSnfHI0eq28c5ai/Tig6stW/FYNDdl\n828a+ZAXvksesiGwD2R53aAF5NNvOIGsaL31T5d5aka1wUQw7bzx8w7OhW+jP+qj\nAq/pMBapUML5TTAhE5wBJI+F6qoIpp7BomMO36nSzaofqS4I96r2kcTb1bNBGErw\no8HHBbXTrZ/vz8i8h5bGoikI0YbxplPaLTylUxuxv0x+gmlaZLbSfjosgfxTGmDu\nyi/YAMIgyQM3WSd9kEzLbr40D8NRK8w=\n-----END PRIVATE KEY-----\n','','http://192.168.22.10/dfrn_request/friendica1','http://192.168.22.10/dfrn_notify/friendica1','http://192.168.22.10/dfrn_poll/friendica1','http://192.168.22.10/dfrn_confirm/friendica1','http://192.168.22.10/poco/friendica1',0,0,0,0,'','2015-02-02 19:00:03','2015-02-02 19:00:03','2015-02-02 19:00:16','2015-02-02 18:53:04','2015-02-02 18:53:04','0001-01-01 00:00:00',0,0,0,1,0,0,0,0,0,0,'',99,'',0,'','0001-01-01',0,0,''),(18,2,'2015-02-02 18:52:03',0,0,3,1,'dfrn','friendica4','friendica4','','','','','','http://192.168.22.10/photo/0f1ac566d253bcd264437b7f7a347f88-4.jpg','http://192.168.22.10/photo/0f1ac566d253bcd264437b7f7a347f88-5.jpg','http://192.168.22.10/photo/0f1ac566d253bcd264437b7f7a347f88-6.jpg','-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA3nCYawg+HTyQgV7a7Osg\nCXeACOitKLhcb2WDTN/lLOMO7n1lSm3Kdv1dbOc0/lkAPeB2XsLF/aDfoUPWWg4Q\n/oRPrXFIi2dK/cIQVvgOhebQheztAYPJyaYYMWVK7bLbPuKVTyzALqkWD8Zjjtit\n4Uvm3kjmcofKr+/Lw+VFaEBMESQDbP5eTDtQeDGGjluWQMj1/D+V/Tcm+SMrAVIv\njyklQEhBJlYGJ+LsfXv4XXbeH73dkIXkQW5JgWQyPCloJ+PxmmjjEDozsdgmFQXq\n6T9HFVHvW2O2lmDoaTrbIGrULWBpslKZJJrV+LgtkzhP4uuKfJPD2DpMJ4+ixtBE\nzM/o+EuYDTz0P3dTvwruq1t8gUYcQOVUzEp1LM0qYDMVY86XneW1W5xghztl5zqy\nGBMBvjVIFvMVL1cVeXze4zpwwKln2cArepToSpN7lmy9EgBd9mZrVLWosZShB9R0\n05kBc2Tfv7FlixwZ1P8rwJn9sEEs9oa6TnRLL+7L8eqapg6vUI1G7e0HWWEjdHsR\nrYVHYW+ogtOYjrQ1Tfh1W2PtNaez5fGYVBDjC+1vy0scJmqrgy00z7MHBT2WTOAL\noHbdedhpa3UZ0FrsCto+vqil8BcF5aBhi2Hi5YdKtbY3EBsaabcSO2joc7rlmee4\nxdKfDRYXCPysFPhZNgIW708CAwEAAQ==\n-----END PUBLIC KEY-----\n','','cd8d6796a986b38a7fb102d05cb41dabe3bdd042f05bf2e5d184a9fdae0255fc','http://192.168.22.10/profile/friendica4','http://192.168.22.10/profile/friendica4','','','-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAwsqhbQeE4G63CefbGnl6\naPz/tNaRwiCwc2CoVoazw4cyNkvgcmnhmzJvyA9hKhqzMQYibPID8z1S5BdaP1dh\n1sHpTP2nYEqE/M4oaXm3zk4zBQdxMXp4Xi6spu3W4oLdn9dQKwwhfcD5YioDrksI\nW/SUEgZIR7XwclVU5Shyj/Z5ssllXqOWSPXAifQ5TcP3PbqEl+IFuN3X9P6J51cH\nemeDLaGqSpoiOlg5Y7E73kZYiXq1xUW5l4c2/wJ2FKeGmWvJaXh+06hkN5fd80Y6\n89vSRsQoaPXnsTrdymquNZIi7yGxJU/uZz8ZD158PQwC5ucGE1ockA8PIUUi6DcJ\nZfSFQjuzrlFsqKaJS7MQc+nysLRdrbjBcQKQHEYbQA2PHRZ9rU/9flICNTSPV4f5\ni7WwicjU1BvYcD/1WEacOPYZ76NCae4VaJvaP6cQpevcd3w9IbN1iC3JVf89oKYp\nBLPpT/T3VI0d17Uugg/51Yz+4RTmYZSZ/SMgCUfG4uE19m8y/j2fSUC6RTqISBsG\nDCRbIu7rnUkS5HvcxtVKwkHT6cANVUFatFIIfy4/e0aE7RO7TvCqJ+WBuK7WA0uS\nabbFxBP6e/eDUDEQI8TIGuMn/fnHRTqchnPmuoTKAZaihh1NU2Jo8+K4s7AbPcwZ\nZpzi1oJnWhSxsGEeGilylk8CAwEAAQ==\n-----END PUBLIC KEY-----\n','','','http://192.168.22.10/dfrn_request/friendica4','http://192.168.22.10/dfrn_notify/friendica4','http://192.168.22.10/dfrn_poll/friendica4','http://192.168.22.10/dfrn_confirm/friendica4','http://192.168.22.10/poco/friendica4',1,0,0,0,'','2015-02-02 19:00:24','2015-02-02 19:00:24','2015-02-02 19:00:24','2015-02-02 18:53:03','2015-02-02 18:53:03','0001-01-01 00:00:00',0,0,0,1,0,0,0,0,0,0,'',99,'',0,'','0001-01-01',0,0,'');
 /*!40000 ALTER TABLE `contact` ENABLE KEYS */;
 UNLOCK TABLES;
 
@@ -310,19 +310,19 @@ UNLOCK TABLES;
 
 DROP TABLE IF EXISTS `conv`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+/*!40101 SET character_set_client = utf8mb4 */;
 CREATE TABLE `conv` (
   `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
   `guid` varchar(64) NOT NULL DEFAULT '',
   `recips` mediumtext NOT NULL,
   `uid` int(11) NOT NULL DEFAULT '0',
   `creator` varchar(255) NOT NULL DEFAULT '',
-  `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
-  `updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+  `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
+  `updated` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
   `subject` mediumtext NOT NULL,
   PRIMARY KEY (`id`),
   KEY `uid` (`uid`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -340,14 +340,14 @@ UNLOCK TABLES;
 
 DROP TABLE IF EXISTS `deliverq`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+/*!40101 SET character_set_client = utf8mb4 */;
 CREATE TABLE `deliverq` (
   `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
   `cmd` varchar(32) NOT NULL DEFAULT '',
   `item` int(11) NOT NULL DEFAULT '0',
   `contact` int(11) NOT NULL DEFAULT '0',
   PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -365,14 +365,14 @@ UNLOCK TABLES;
 
 DROP TABLE IF EXISTS `dsprphotoq`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+/*!40101 SET character_set_client = utf8mb4 */;
 CREATE TABLE `dsprphotoq` (
   `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
   `uid` int(11) NOT NULL DEFAULT '0',
   `msg` mediumtext NOT NULL,
   `attempt` tinyint(4) NOT NULL DEFAULT '0',
   PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -390,16 +390,16 @@ UNLOCK TABLES;
 
 DROP TABLE IF EXISTS `event`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+/*!40101 SET character_set_client = utf8mb4 */;
 CREATE TABLE `event` (
   `id` int(11) NOT NULL AUTO_INCREMENT,
   `uid` int(11) NOT NULL DEFAULT '0',
   `cid` int(11) NOT NULL DEFAULT '0',
   `uri` varchar(255) NOT NULL DEFAULT '',
-  `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
-  `edited` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
-  `start` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
-  `finish` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+  `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
+  `edited` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
+  `start` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
+  `finish` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
   `summary` text NOT NULL,
   `desc` text NOT NULL,
   `location` text NOT NULL,
@@ -413,7 +413,7 @@ CREATE TABLE `event` (
   `deny_gid` mediumtext NOT NULL,
   PRIMARY KEY (`id`),
   KEY `uid` (`uid`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -431,7 +431,7 @@ UNLOCK TABLES;
 
 DROP TABLE IF EXISTS `fcontact`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+/*!40101 SET character_set_client = utf8mb4 */;
 CREATE TABLE `fcontact` (
   `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
   `url` varchar(255) NOT NULL DEFAULT '',
@@ -448,10 +448,10 @@ CREATE TABLE `fcontact` (
   `network` varchar(32) NOT NULL DEFAULT '',
   `alias` varchar(255) NOT NULL DEFAULT '',
   `pubkey` text NOT NULL,
-  `updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+  `updated` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
   PRIMARY KEY (`id`),
   KEY `addr` (`addr`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -469,14 +469,14 @@ UNLOCK TABLES;
 
 DROP TABLE IF EXISTS `ffinder`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+/*!40101 SET character_set_client = utf8mb4 */;
 CREATE TABLE `ffinder` (
   `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
   `uid` int(10) unsigned NOT NULL DEFAULT '0',
   `cid` int(10) unsigned NOT NULL DEFAULT '0',
   `fid` int(10) unsigned NOT NULL DEFAULT '0',
   PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -494,7 +494,7 @@ UNLOCK TABLES;
 
 DROP TABLE IF EXISTS `fserver`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+/*!40101 SET character_set_client = utf8mb4 */;
 CREATE TABLE `fserver` (
   `id` int(11) NOT NULL AUTO_INCREMENT,
   `server` varchar(255) NOT NULL DEFAULT '',
@@ -502,7 +502,7 @@ CREATE TABLE `fserver` (
   `key` text NOT NULL,
   PRIMARY KEY (`id`),
   KEY `server` (`server`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -520,7 +520,7 @@ UNLOCK TABLES;
 
 DROP TABLE IF EXISTS `fsuggest`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+/*!40101 SET character_set_client = utf8mb4 */;
 CREATE TABLE `fsuggest` (
   `id` int(11) NOT NULL AUTO_INCREMENT,
   `uid` int(11) NOT NULL DEFAULT '0',
@@ -530,9 +530,9 @@ CREATE TABLE `fsuggest` (
   `request` varchar(255) NOT NULL DEFAULT '',
   `photo` varchar(255) NOT NULL DEFAULT '',
   `note` text NOT NULL,
-  `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+  `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
   PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -550,7 +550,7 @@ UNLOCK TABLES;
 
 DROP TABLE IF EXISTS `gcign`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+/*!40101 SET character_set_client = utf8mb4 */;
 CREATE TABLE `gcign` (
   `id` int(11) NOT NULL AUTO_INCREMENT,
   `uid` int(11) NOT NULL DEFAULT '0',
@@ -558,7 +558,7 @@ CREATE TABLE `gcign` (
   PRIMARY KEY (`id`),
   KEY `uid` (`uid`),
   KEY `gcid` (`gcid`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -576,7 +576,7 @@ UNLOCK TABLES;
 
 DROP TABLE IF EXISTS `gcontact`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+/*!40101 SET character_set_client = utf8mb4 */;
 CREATE TABLE `gcontact` (
   `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
   `name` varchar(255) NOT NULL DEFAULT '',
@@ -584,7 +584,7 @@ CREATE TABLE `gcontact` (
   `nurl` varchar(255) NOT NULL DEFAULT '',
   `photo` varchar(255) NOT NULL DEFAULT '',
   `connect` varchar(255) NOT NULL DEFAULT '',
-  `updated` datetime DEFAULT '0000-00-00 00:00:00',
+  `updated` datetime DEFAULT '0001-01-01 00:00:00',
   `location` varchar(255) NOT NULL DEFAULT '',
   `about` text NOT NULL,
   `keywords` text NOT NULL,
@@ -592,7 +592,7 @@ CREATE TABLE `gcontact` (
   `network` varchar(255) NOT NULL DEFAULT '',
   PRIMARY KEY (`id`),
   KEY `nurl` (`nurl`)
-) ENGINE=InnoDB AUTO_INCREMENT=157 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=157 DEFAULT CHARSET=utf8mb4;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -601,7 +601,7 @@ CREATE TABLE `gcontact` (
 
 LOCK TABLES `gcontact` WRITE;
 /*!40000 ALTER TABLE `gcontact` DISABLE KEYS */;
-INSERT INTO `gcontact` VALUES (1,'Keith','https://friendika.me4.it/profile/keith','http://friendika.me4.it/profile/keith','https://friendika.me4.it/photo/custom/300/1.jpg?rev=2014-07-27+19%3A34%3A36','','0000-00-00 00:00:00','','','','','dspr'),(2,'Manuel Freiria','https://friendika.me4.it/profile/manolofreiria','http://friendika.me4.it/profile/manolofreiria','https://friendika.me4.it/photo/custom/300/254.jpg?rev=2014-09-06+23%3A58%3A50','','0000-00-00 00:00:00','','','','','dspr'),(3,'José Manuel Goig','https://friendika.me4.it/profile/jmgoig','http://friendika.me4.it/profile/jmgoig','https://friendika.me4.it/photo/custom/300/283.jpg?rev=2014-12-16+10%3A11%3A40','','0000-00-00 00:00:00','','','','','dspr'),(4,'Keith','https://friendica.eu/profile/support','http://friendica.eu/profile/support','https://friendica.eu/photo/custom/300/1.jpg?rev=2011-12-21+14%3A41%3A44','','0000-00-00 00:00:00','','','','','dspr'),(5,'Henrike Van Mortis','https://friendica.eu/profile/hvm','http://friendica.eu/profile/hvm','https://friendica.eu/photo/custom/300/250.jpg','','0000-00-00 00:00:00','','','','','dspr'),(6,'offene Ablage: nothing to hide','https://friendica.eu/profile/o2myfrdca01','http://friendica.eu/profile/o2myfrdca01','https://friendica.eu/photo/custom/300/259.jpg?rev=2012-02-16+16%3A49%3A37','','0000-00-00 00:00:00','','','','','dspr'),(7,'Friendica Theme Developers','https://friendica.eu/profile/ftdevs','http://friendica.eu/profile/ftdevs','https://friendica.eu/photo/custom/300/366.jpg?rev=2012-03-01+11%3A58%3A18','','0000-00-00 00:00:00','','','','','dspr'),(8,'Nepesh Hacker','https://friendica.eu/profile/arescorpio','http://friendica.eu/profile/arescorpio','https://friendica.eu/photo/custom/300/516.jpg?rev=2012-11-07+22%3A39%3A38','','0000-00-00 00:00:00','','','','','dspr'),(9,'Rolf Rupp','https://friendica.eu/profile/rcr','http://friendica.eu/profile/rcr','https://friendica.eu/photo/custom/300/841.jpg?rev=2014-01-09+22%3A15%3A09','','0000-00-00 00:00:00','','','','','dspr'),(10,'Daniel Steinbacher','https://friendica.eu/profile/damez','http://friendica.eu/profile/damez','https://friendica.eu/photo/custom/300/1791.jpg?rev=2015-01-15+16%3A49%3A29','','0000-00-00 00:00:00','','','','','dspr'),(11,'Pirate Times','https://friendica.eu/profile/piratetimes','http://friendica.eu/profile/piratetimes','https://friendica.eu/photo/custom/300/885.jpg?rev=2014-01-21+11%3A09%3A35','','0000-00-00 00:00:00','','','','','dspr'),(12,'Jacques','https://friendica.eu/profile/jacques','http://friendica.eu/profile/jacques','https://friendica.eu/photo/custom/300/907.jpg?rev=2015-01-15+14%3A37%3A37','','0000-00-00 00:00:00','','','','','dspr'),(13,'Montse Freire','https://friendica.eu/profile/auga09','http://friendica.eu/profile/auga09','https://friendica.eu/photo/custom/300/934.jpg?rev=2014-02-16+14%3A17%3A30','','0000-00-00 00:00:00','','','','','dspr'),(14,'oremus','https://friendica.eu/profile/oremus','http://friendica.eu/profile/oremus','https://friendica.eu/photo/custom/300/1073.jpg?rev=2014-04-29+15%3A09%3A50','','0000-00-00 00:00:00','','','','','dspr'),(15,'ppp','https://friendica.eu/profile/ppp','http://friendica.eu/profile/ppp','https://friendica.eu/photo/custom/300/1134.jpg?rev=2014-06-01+12%3A58%3A28','','0000-00-00 00:00:00','','','','','dspr'),(16,'Krin Bouch','https://friendica.eu/profile/krinbouch','http://friendica.eu/profile/krinbouch','https://friendica.eu/photo/custom/300/1471.jpg?rev=2014-09-20+14%3A18%3A24','','0000-00-00 00:00:00','','','','','dspr'),(17,'Miguel Menéndez','https://friendica.eu/profile/miguelmenendez','http://friendica.eu/profile/miguelmenendez','https://friendica.eu/photo/custom/300/1508.jpg?rev=2014-10-26+15%3A21%3A28','','0000-00-00 00:00:00','','','','','dspr'),(18,'Alexandre Pólvora','https://friendica.eu/profile/discomplex','http://friendica.eu/profile/discomplex','https://friendica.eu/photo/custom/300/1522.jpg?rev=2014-11-05+23%3A54%3A57','','0000-00-00 00:00:00','','','','','dspr'),(19,'Chak\'pur','https://friendica.eu/profile/murokka','http://friendica.eu/profile/murokka','https://friendica.eu/photo/custom/300/1535.jpg?rev=2014-11-13+09%3A13%3A55','','0000-00-00 00:00:00','','','','','dspr'),(20,'Samuel Contraste','https://friendica.eu/profile/stace-melunor','http://friendica.eu/profile/stace-melunor','https://friendica.eu/photo/custom/300/1586.jpg?rev=2014-11-28+13%3A01%3A22','','0000-00-00 00:00:00','','','','','dspr'),(21,'Martin Langlotz','https://friendica.eu/profile/numan','http://friendica.eu/profile/numan','https://friendica.eu/photo/custom/300/1621.jpg?rev=2014-12-02+10%3A37%3A34','','0000-00-00 00:00:00','','','','','dspr'),(22,'Elie Bissery','https://friendica.eu/profile/eilsib','http://friendica.eu/profile/eilsib','https://friendica.eu/photo/custom/300/1680.jpg?rev=2014-12-17+16%3A05%3A23','','0000-00-00 00:00:00','','','','','dspr'),(23,'Cécile Maitre','https://friendica.eu/profile/cecile','http://friendica.eu/profile/cecile','https://friendica.eu/photo/custom/300/1703.jpg?rev=2014-12-23+19%3A29%3A41','','0000-00-00 00:00:00','','','','','dspr'),(24,'Ralf Gerdes','https://friendica.eu/profile/ralf','http://friendica.eu/profile/ralf','https://friendica.eu/photo/custom/300/1739.jpg?rev=2014-12-30+12%3A43%3A12','','0000-00-00 00:00:00','','','','','dspr'),(25,'Loran Btn','https://friendica.eu/profile/loran_mcfly','http://friendica.eu/profile/loran_mcfly','https://friendica.eu/photo/custom/300/1781.jpg?rev=2015-01-11+09%3A10%3A33','','0000-00-00 00:00:00','','','','','dspr'),(26,'Jörn Rinne','https://friendica.eu/profile/lefou','http://friendica.eu/profile/lefou','https://friendica.eu/photo/custom/300/1782.jpg?rev=2015-01-11+15%3A39%3A33','','0000-00-00 00:00:00','','','','','dspr'),(27,'Lud Wig','https://friendica.eu/profile/ludwig','http://friendica.eu/profile/ludwig','https://friendica.eu/photo/custom/300/1810.jpg?rev=2015-01-25+04%3A41%3A20','','0000-00-00 00:00:00','','','','','dspr'),(28,'Rike','http://mist.loozah.com/profile/rike','http://mist.loozah.com/profile/rike','http://mist.loozah.com/photo/custom/300/2.jpg?rev=2012-02-03+14%3A10%3A17','','0000-00-00 00:00:00','','','','','dspr'),(29,'Torsten Peh','http://mist.loozah.com/profile/torsten_peh','http://mist.loozah.com/profile/torsten_peh','http://mist.loozah.com/photo/custom/300/13.jpg?rev=2012-05-15+12%3A58%3A18','','0000-00-00 00:00:00','','','','','dspr'),(30,'der buffer','http://mist.loozah.com/profile/derbuffer','http://mist.loozah.com/profile/derbuffer','http://mist.loozah.com/photo/custom/300/98.jpg?rev=2013-07-27+00%3A10%3A59','','0000-00-00 00:00:00','','','','','dspr'),(31,'Marcel','http://mist.loozah.com/profile/mkay','http://mist.loozah.com/profile/mkay','http://mist.loozah.com/photo/custom/300/24.jpg?rev=2012-06-14+19%3A06%3A37','','0000-00-00 00:00:00','','','','','dspr'),(32,'Gianluca Zoni','http://mist.loozah.com/profile/zoninoz','http://mist.loozah.com/profile/zoninoz','http://mist.loozah.com/photo/custom/300/56.jpg?rev=2012-09-12+15%3A38%3A42','','0000-00-00 00:00:00','','','','','dspr'),(33,'Jo A','http://mist.loozah.com/profile/joooo','http://mist.loozah.com/profile/joooo','http://mist.loozah.com/photo/custom/300/64.jpg?rev=2012-11-12+15%3A32%3A02','','0000-00-00 00:00:00','','','','','dspr'),(34,'Lass Mi Randa Den Sie Will Ja','https://friendica.styliztique.biz/profile/stb','http://friendica.styliztique.biz/profile/stb','https://friendica.styliztique.biz/photo/custom/300/20.jpg?rev=2013-09-06+16%3A04%3A10','','0000-00-00 00:00:00','','','','','dspr'),(35,'кαÑ\8fισz Ð¼â˜ Ñ\8fку','https://karl.marx.pm/profile/kmarky','http://karl.marx.pm/profile/kmarky','https://karl.marx.pm/photo/custom/300/11.jpg?rev=2014-01-17+09%3A48%3A33','','0000-00-00 00:00:00','','','','','dspr'),(36,'Indignados','https://karl.marx.pm/profile/indignados','http://karl.marx.pm/profile/indignados','https://karl.marx.pm/photo/custom/300/44.jpg?rev=2012-05-27+14%3A53%3A52','','0000-00-00 00:00:00','','','','','dspr'),(37,'Anarkia','https://karl.marx.pm/profile/anarquia','http://karl.marx.pm/profile/anarquia','https://karl.marx.pm/photo/custom/300/45.jpg?rev=2012-05-29+11%3A01%3A11','','0000-00-00 00:00:00','','','','','dspr'),(38,'Planeta Pirata','https://karl.marx.pm/profile/pirata','http://karl.marx.pm/profile/pirata','https://karl.marx.pm/photo/custom/300/46.jpg?rev=2012-05-27+15%3A20%3A12','','0000-00-00 00:00:00','','','','','dspr'),(39,'Grupo GNU | Linux','https://karl.marx.pm/profile/gnu','http://karl.marx.pm/profile/gnu','https://karl.marx.pm/photo/custom/300/47.jpg?rev=2012-05-27+15%3A34%3A20','','0000-00-00 00:00:00','','','','','dspr'),(40,'Ecologia','https://karl.marx.pm/profile/eco','http://karl.marx.pm/profile/eco','https://karl.marx.pm/photo/custom/300/57.jpg?rev=2012-06-09+06%3A42%3A04','','0000-00-00 00:00:00','','','','','dspr'),(41,'Grupo antiFa Friendica','https://karl.marx.pm/profile/antifa','http://karl.marx.pm/profile/antifa','https://karl.marx.pm/photo/custom/300/60.jpg?rev=2012-06-11+08%3A46%3A48','','0000-00-00 00:00:00','','','','','dspr'),(42,'Facebook (alias Feisbuk)','https://karl.marx.pm/profile/facebook','http://karl.marx.pm/profile/facebook','https://karl.marx.pm/photo/custom/300/61.jpg?rev=2014-01-17+09%3A50%3A44','','0000-00-00 00:00:00','','','','','dspr'),(43,'Todo Cine','https://karl.marx.pm/profile/cine','http://karl.marx.pm/profile/cine','https://karl.marx.pm/photo/custom/300/65.jpg?rev=2012-06-15+07%3A20%3A01','','0000-00-00 00:00:00','','','','','dspr'),(44,'Rivera Valdez','https://karl.marx.pm/profile/riveravaldez','http://karl.marx.pm/profile/riveravaldez','https://karl.marx.pm/photo/custom/300/205.jpg?rev=2013-06-18+10%3A58%3A46','','0000-00-00 00:00:00','','','','','dspr'),(45,'Tazman Devil','https://karl.marx.pm/profile/tazman','http://karl.marx.pm/profile/tazman','https://karl.marx.pm/photo/custom/300/228.jpg?rev=2013-08-24+02%3A59%3A52','','0000-00-00 00:00:00','','','','','dspr'),(46,'Tiago Casal Ribeiro','https://karl.marx.pm/profile/tiago','http://karl.marx.pm/profile/tiago','https://karl.marx.pm/photo/custom/300/391.jpg?rev=2014-10-30+17%3A10%3A40','','0000-00-00 00:00:00','','','','','dspr'),(47,'Protestation','https://karl.marx.pm/profile/protestation_','http://karl.marx.pm/profile/protestation_','https://karl.marx.pm/photo/custom/300/414.jpg','','0000-00-00 00:00:00','','','','','dspr'),(48,'Arto','https://myfriendica.net/profile/arto','http://myfriendica.net/profile/arto','https://myfriendica.net/photo/custom/300/5.jpg?rev=2012-04-29+18%3A36%3A29','','0000-00-00 00:00:00','','','','','dspr'),(49,'Gatoso Kot','https://myfriendica.net/profile/gatoso','http://myfriendica.net/profile/gatoso','https://myfriendica.net/photo/custom/300/159.jpg?rev=2013-04-05+05%3A51%3A58','','0000-00-00 00:00:00','','','','','dspr'),(50,'Believing Prayer','https://myfriendica.net/profile/believingprayer','http://myfriendica.net/profile/believingprayer','https://myfriendica.net/photo/custom/300/11.jpg?rev=2012-03-19+13%3A12%3A07','','0000-00-00 00:00:00','','','','','dspr'),(51,'Avery Jenkins','https://myfriendica.net/profile/docaltmed','http://myfriendica.net/profile/docaltmed','https://myfriendica.net/photo/custom/300/17.jpg?rev=2012-03-27+11%3A05%3A26','','0000-00-00 00:00:00','','','','','dspr'),(52,'Vincent','https://myfriendica.net/profile/influencepc','http://myfriendica.net/profile/influencepc','https://myfriendica.net/photo/custom/300/55.jpg?rev=2012-04-26+12%3A47%3A48','','0000-00-00 00:00:00','','','','','dspr'),(53,'Berlin Group','https://myfriendica.net/profile/berlin','http://myfriendica.net/profile/berlin','https://myfriendica.net/photo/custom/300/65.jpg?rev=2012-04-28+09%3A21%3A19','','0000-00-00 00:00:00','','','','','dspr'),(54,'jcsesecuneta@myfriendica.net','https://myfriendica.net/profile/jcsesecuneta','http://myfriendica.net/profile/jcsesecuneta','https://myfriendica.net/photo/custom/300/281.jpg?rev=2013-09-06+11%3A51%3A59','','0000-00-00 00:00:00','','','','','dspr'),(55,'Sam I','https://myfriendica.net/profile/sam01','http://myfriendica.net/profile/sam01','https://myfriendica.net/photo/custom/300/183.jpg?rev=2013-06-28+15%3A34%3A46','','0000-00-00 00:00:00','','','','','dspr'),(56,'Stephen Judge','https://myfriendica.net/profile/stephen','http://myfriendica.net/profile/stephen','https://myfriendica.net/photo/custom/300/294.jpg?rev=2014-02-25+15%3A07%3A05','','0000-00-00 00:00:00','','','','','dspr'),(57,'潘隆å\90‰ Tony Phuah','https://myfriendica.net/profile/tonyphuah','http://myfriendica.net/profile/tonyphuah','https://myfriendica.net/photo/custom/300/304.jpg?rev=2013-11-02+00%3A37%3A59','','0000-00-00 00:00:00','','','','','dspr'),(58,'Lina María Largo','https://myfriendica.net/profile/linamaria','http://myfriendica.net/profile/linamaria','https://myfriendica.net/photo/custom/300/332.jpg?rev=2013-12-18+08%3A14%3A24','','0000-00-00 00:00:00','','','','','dspr'),(59,'Petra L.','https://myfriendica.net/profile/petra-l','http://myfriendica.net/profile/petra-l','https://myfriendica.net/photo/custom/300/349.jpg?rev=2014-04-05+13%3A41%3A25','','0000-00-00 00:00:00','','','','','dspr'),(60,'Panko','https://myfriendica.net/profile/panko','http://myfriendica.net/profile/panko','https://myfriendica.net/photo/custom/300/354.jpg?rev=2014-07-30+14%3A22%3A42','','0000-00-00 00:00:00','','','','','dspr'),(61,'Jorge','https://myfriendica.net/profile/soloojos','http://myfriendica.net/profile/soloojos','https://myfriendica.net/photo/custom/300/370.jpg?rev=2014-03-02+16%3A20%3A32','','0000-00-00 00:00:00','','','','','dspr'),(62,'Sebas Pedersen','https://myfriendica.net/profile/sebasped','http://myfriendica.net/profile/sebasped','https://myfriendica.net/photo/custom/300/373.jpg?rev=2015-01-15+23%3A04%3A06','','0000-00-00 00:00:00','','','','','dspr'),(63,'ivan zlax','https://myfriendica.net/profile/zlaxyi','http://myfriendica.net/profile/zlaxyi','https://myfriendica.net/photo/custom/300/376.jpg?rev=2014-03-09+09%3A56%3A13','','0000-00-00 00:00:00','','','','','dspr'),(64,'Shimriez','https://myfriendica.net/profile/shimriez','http://myfriendica.net/profile/shimriez','https://myfriendica.net/photo/custom/300/403.jpg?rev=2014-06-21+17%3A18%3A05','','0000-00-00 00:00:00','','','','','dspr'),(65,'Sitesonix Web Solutions','https://myfriendica.net/profile/sitesonix','http://myfriendica.net/profile/sitesonix','https://myfriendica.net/photo/custom/300/445.jpg?rev=2014-06-13+17%3A25%3A54','','0000-00-00 00:00:00','','','','','dspr'),(66,'Bastian Lang','https://myfriendica.net/profile/raudy93','http://myfriendica.net/profile/raudy93','https://myfriendica.net/photo/custom/300/436.jpg?rev=2014-05-29+12%3A40%3A00','','0000-00-00 00:00:00','','','','','dspr'),(67,'Simó Albert i Beltran','https://myfriendica.net/profile/sim6','http://myfriendica.net/profile/sim6','https://myfriendica.net/photo/custom/300/419.jpg?rev=2014-05-14+16%3A14%3A04','','0000-00-00 00:00:00','','','','','dspr'),(68,'RT Griffiti','https://myfriendica.net/profile/rtgriffiti','http://myfriendica.net/profile/rtgriffiti','https://myfriendica.net/photo/custom/300/437.jpg?rev=2014-05-30+01%3A17%3A19','','0000-00-00 00:00:00','','','','','dspr'),(69,'Damian','https://myfriendica.net/profile/deb92','http://myfriendica.net/profile/deb92','https://myfriendica.net/photo/custom/300/462.jpg?rev=2014-07-29+18%3A18%3A26','','0000-00-00 00:00:00','','','','','dspr'),(70,'Ciril Earth','https://myfriendica.net/profile/cirilearth','http://myfriendica.net/profile/cirilearth','https://myfriendica.net/photo/custom/300/519.jpg?rev=2014-12-22+12%3A19%3A09','','0000-00-00 00:00:00','','','','','dspr'),(71,'The SOS Card Project','https://myfriendica.net/profile/the_sos_card_project','http://myfriendica.net/profile/the_sos_card_project','https://myfriendica.net/photo/custom/300/524.jpg?rev=2014-12-26+19%3A54%3A41','','0000-00-00 00:00:00','','','','','dspr'),(72,'Hauke Altmann','https://snarl.de/profile/tugelblend','http://snarl.de/profile/tugelblend','https://www.snarl.de/photo/profile/5.jpg','','2015-01-25 05:02:28','Berlin','Softwaredeveloper, friendica enthusiast, member of <a href=\"http://www.graffitiresearchlab.de/,\" target=\"_blank\">http://www.graffitiresearchlab.de/,</a> cyclist','graffiti, friendica, graffiti, research, lab, diy, collectivism, urban, art, surfing, berlin, opensource, critical, mass, freifunk','','dfrn'),(73,'Chris Thina','https://snarl.de/profile/chillkroete','http://snarl.de/profile/chillkroete','https://snarl.de/photo/profile/69.jpg','','2014-01-11 11:59:56','','','','','dfrn'),(74,'Dirk Schlechter','https://snarl.de/profile/viewfinder','http://snarl.de/profile/viewfinder','https://snarl.de/photo/profile/106.jpg','','2014-03-24 16:20:54','','','','Männlich','dfrn'),(75,'Tauschring Prenzelberg','https://snarl.de/profile/prenzeltausch','http://snarl.de/profile/prenzeltausch','https://snarl.de/photo/profile/117.jpg','','2015-01-25 19:31:54','Berlin','Haareschneiden gegen Waschmaschinenreparatur?<br>Autotransport gegen Katze gie&szlig;en?<br>Der Prenzelberger Tauschring<br>sucht weitere Mitglieder.<br>Komm doch mal vorbei:<br>Treffen jeden 2. &amp; 4. Montag im Monat<br>im Kiezladen in der Dunckerstr. 14, 19-20 Uhr<br>prenzeltausch.thing.de','tauschring, zeitkonto','Intersex','dfrn'),(76,'Panko','https://snarl.de/profile/panko','http://snarl.de/profile/panko','https://snarl.de/photo/profile/141.jpg','@','2015-02-02 11:31:46','La Vila Joiosa','','debian, linux, gnu, gnu/linux, scifi, horror, xmpp, jabber, friendica, pump, freesoftware, darts, dardos, dards, punk, rock, ska, reggae, beer','Home','dfrn'),(77,'Berlin Group','https://snarl.de/profile/berlin','http://snarl.de/profile/berlin','https://snarl.de/photo/profile/0.jpg','','2012-04-28 09:21:19','Berlin','Eine Gruppe f&uuml;r alle Friendicianer, die an der geilsten Stadt Deutschlands interessiert sind.','berlin','','dfrn'),(78,'Daniel C. Würl','https://snarl.de/profile/decadentgray','http://snarl.de/profile/decadentgray','https://snarl.de/photo/profile/158.jpg','','2014-08-29 02:20:44','','','','','dfrn'),(79,'Michaela Gruber','https://snarl.de/profile/starling','http://snarl.de/profile/starling','https://snarl.de/photo/profile/160.jpg','','2014-09-03 18:19:10','','','','','dfrn'),(80,'Kristian R.','https://snarl.de/profile/z428','http://snarl.de/profile/z428','https://snarl.de/photo/profile/181.jpg','','2015-01-30 13:47:31','','Software engineer (#java, #javaee, #python, mainly server-sided and backend), art and imaging addict mainly using #gimp, #opensource / #softwarelibre # freesoftware software user and promoter, lover of bizarre #music (especially #netaudio stuff, #metal, #postrock, more open-minded #indie), #vegetarian, 30something and a few other things.<br>kr428 virtually everywhere, including twitter, identica et al.','linux, gimp, photography, music, java, opensource, gnome, philosophy, spirituality, art','Männlich','dfrn'),(81,'Georg Hofer','https://snarl.de/profile/ironhead','http://snarl.de/profile/ironhead','https://snarl.de/photo/profile/228.jpg','','2014-12-31 15:47:14','','','','','dfrn'),(82,'Nick Power','https://snarl.de/profile/veganvincent','http://snarl.de/profile/veganvincent','https://snarl.de/photo/profile/240.jpg','','2015-01-26 16:59:02','','','','','dfrn'),(83,'Yushin W','https://snarl.de/profile/opduur','http://snarl.de/profile/opduur','https://snarl.de/photo/profile/254.jpg','','2015-01-28 19:44:40','','','freesoftware, floss, foss, opensource, linux, vim, cli, command-line, creativecommons, ocw, oer, commons, sustainability, energy, lohas, mdg, sdg','','dfrn'),(84,'Oradon','https://oradon.pegasus.uberspace.de/profile/oradon','http://oradon.pegasus.uberspace.de/profile/oradon','https://oradon.pegasus.uberspace.de/photo/custom/300/1.jpg','','0000-00-00 00:00:00','','','','','dspr'),(85,'Stuttgart','https://oradon.pegasus.uberspace.de/profile/stuttgart','http://oradon.pegasus.uberspace.de/profile/stuttgart','https://oradon.pegasus.uberspace.de/photo/custom/300/12.jpg','','0000-00-00 00:00:00','','','','','dspr'),(86,'Olivier','https://friendica.free-beer.ch/profile/olivier','http://friendica.free-beer.ch/profile/olivier','https://friendica.free-beer.ch/photo/custom/300/1.jpg?rev=2012-05-02+09%3A02%3A19','','0000-00-00 00:00:00','','','','','dspr'),(87,'pogonator','https://friendica.free-beer.ch/profile/pogonator','http://friendica.free-beer.ch/profile/pogonator','https://friendica.free-beer.ch/photo/custom/300/396.jpg?rev=2013-06-22+07%3A51%3A38','','0000-00-00 00:00:00','','','','','dspr'),(88,'Claus Muehlenkamp','https://friendica.free-beer.ch/profile/clausmuehlenkamp','http://friendica.free-beer.ch/profile/clausmuehlenkamp','https://friendica.free-beer.ch/photo/custom/300/368.jpg?rev=2013-06-12+21%3A21%3A07','','0000-00-00 00:00:00','','','','','dspr'),(89,'Jörg Hartmann','https://friendica.free-beer.ch/profile/jh72de','http://friendica.free-beer.ch/profile/jh72de','https://friendica.free-beer.ch/photo/custom/300/295.jpg?rev=2013-04-09+19%3A21%3A01','','0000-00-00 00:00:00','','','','','dspr'),(90,'Carlos Solís','https://friendica.free-beer.ch/profile/csolisr','http://friendica.free-beer.ch/profile/csolisr','https://friendica.free-beer.ch/photo/custom/300/22.jpg?rev=2012-05-31+23%3A00%3A24','','0000-00-00 00:00:00','','','','','dspr'),(91,'Frederic Guilbault','https://friendica.free-beer.ch/profile/border','http://friendica.free-beer.ch/profile/border','https://friendica.free-beer.ch/photo/custom/300/23.jpg?rev=2012-06-01+02%3A24%3A09','','0000-00-00 00:00:00','','','','','dspr'),(92,'Sun Sunich','https://friendica.free-beer.ch/profile/sunsunich','http://friendica.free-beer.ch/profile/sunsunich','https://friendica.free-beer.ch/photo/custom/300/337.jpg?rev=2013-06-06+19%3A54%3A58','','0000-00-00 00:00:00','','','','','dspr'),(93,'Jaun Santiago','https://friendica.free-beer.ch/profile/juansantiago','http://friendica.free-beer.ch/profile/juansantiago','https://friendica.free-beer.ch/photo/custom/300/94.jpg?rev=2012-08-05+21%3A12%3A40','','0000-00-00 00:00:00','','','','','dspr'),(94,'Axel','https://friendica.free-beer.ch/profile/axel','http://friendica.free-beer.ch/profile/axel','https://friendica.free-beer.ch/photo/custom/300/61.jpg?rev=2014-01-08+17%3A14%3A05','','0000-00-00 00:00:00','','','','','dspr'),(95,'Alexander Jobst','https://friendica.free-beer.ch/profile/alexanderjobst','http://friendica.free-beer.ch/profile/alexanderjobst','https://friendica.free-beer.ch/photo/custom/300/77.jpg?rev=2012-07-11+08%3A19%3A36','','0000-00-00 00:00:00','','','','','dspr'),(96,'Matija Å uklje','https://friendica.free-beer.ch/profile/hook','http://friendica.free-beer.ch/profile/hook','https://friendica.free-beer.ch/photo/custom/300/336.jpg?rev=2013-06-02+20%3A40%3A51','','0000-00-00 00:00:00','','','','','dspr'),(97,'Brando','https://friendica.free-beer.ch/profile/dysfunctional','http://friendica.free-beer.ch/profile/dysfunctional','https://friendica.free-beer.ch/photo/custom/300/89.jpg?rev=2012-07-28+04%3A35%3A53','','0000-00-00 00:00:00','','','','','dspr'),(98,'Max Anton','https://friendica.free-beer.ch/profile/ntimes','http://friendica.free-beer.ch/profile/ntimes','https://friendica.free-beer.ch/photo/custom/300/98.jpg?rev=2012-08-08+21%3A32%3A00','','0000-00-00 00:00:00','','','','','dspr'),(99,'Inyan','https://friendica.free-beer.ch/profile/inyan','http://friendica.free-beer.ch/profile/inyan','https://friendica.free-beer.ch/photo/custom/300/111.jpg?rev=2012-08-18+19%3A01%3A17','','0000-00-00 00:00:00','','','','','dspr'),(100,'亗 Dr. Emporio Efikz äº—','https://friendica.free-beer.ch/profile/dr_emporio_efikz','http://friendica.free-beer.ch/profile/dr_emporio_efikz','https://friendica.free-beer.ch/photo/custom/300/108.jpg?rev=2012-08-17+01%3A48%3A09','','0000-00-00 00:00:00','','','','','dspr'),(101,'w2bh.- free-beer.ch','https://friendica.free-beer.ch/profile/w2bh','http://friendica.free-beer.ch/profile/w2bh','https://friendica.free-beer.ch/photo/custom/300/104.jpg?rev=2012-08-15+10%3A52%3A29','','0000-00-00 00:00:00','','','','','dspr'),(102,'Torsten Schilinsky','https://friendica.free-beer.ch/profile/torsten1968','http://friendica.free-beer.ch/profile/torsten1968','https://friendica.free-beer.ch/photo/custom/300/107.jpg?rev=2012-09-18+11%3A17%3A42','','0000-00-00 00:00:00','','','','','dspr'),(103,'Ecologie Libidinale','https://friendica.free-beer.ch/profile/ecologielibidinale','http://friendica.free-beer.ch/profile/ecologielibidinale','https://friendica.free-beer.ch/photo/custom/300/118.jpg?rev=2012-08-23+18%3A19%3A23','','0000-00-00 00:00:00','','','','','dspr'),(104,'Robert Bonie','https://friendica.free-beer.ch/profile/robrob','http://friendica.free-beer.ch/profile/robrob','https://friendica.free-beer.ch/photo/custom/300/138.jpg?rev=2012-09-07+17%3A57%3A21','','0000-00-00 00:00:00','','','','','dspr'),(105,'Marius Katcá','https://friendica.free-beer.ch/profile/marius_katca','http://friendica.free-beer.ch/profile/marius_katca','https://friendica.free-beer.ch/photo/custom/300/143.jpg?rev=2012-09-10+11%3A02%3A55','','0000-00-00 00:00:00','','','','','dspr'),(106,'Yossefa Mekyton','https://friendica.free-beer.ch/profile/jooxz','http://friendica.free-beer.ch/profile/jooxz','https://friendica.free-beer.ch/photo/custom/300/413.jpg?rev=2013-06-29+18%3A54%3A44','','0000-00-00 00:00:00','','','','','dspr'),(107,'Xurxo Ventos','https://friendica.free-beer.ch/profile/xurxoventos','http://friendica.free-beer.ch/profile/xurxoventos','https://friendica.free-beer.ch/photo/custom/300/412.jpg?rev=2013-06-29+10%3A07%3A23','','0000-00-00 00:00:00','','','','','dspr'),(108,'Fergus Ferrier','https://friendica.free-beer.ch/profile/rufusson','http://friendica.free-beer.ch/profile/rufusson','https://friendica.free-beer.ch/photo/custom/300/146.jpg?rev=2012-09-14+01%3A11%3A23','','0000-00-00 00:00:00','','','','','dspr'),(109,'Arescorpio Nepesh','https://friendica.free-beer.ch/profile/arescorpio','http://friendica.free-beer.ch/profile/arescorpio','https://friendica.free-beer.ch/photo/custom/300/158.jpg?rev=2012-10-05+19%3A05%3A49','','0000-00-00 00:00:00','','','','','dspr'),(110,'Shiroikuma','https://friendica.free-beer.ch/profile/shiroikuma','http://friendica.free-beer.ch/profile/shiroikuma','https://friendica.free-beer.ch/photo/custom/300/334.jpg?rev=2013-06-02+09%3A59%3A35','','0000-00-00 00:00:00','','','','','dspr'),(111,'FreeBeer Klampf','https://friendica.free-beer.ch/profile/klampfattacke','http://friendica.free-beer.ch/profile/klampfattacke','https://friendica.free-beer.ch/photo/custom/300/167.jpg?rev=2012-10-27+02%3A34%3A19','','0000-00-00 00:00:00','','','','','dspr'),(112,'Raphael Vieira','https://friendica.free-beer.ch/profile/barba_negra','http://friendica.free-beer.ch/profile/barba_negra','https://friendica.free-beer.ch/photo/custom/300/772.jpg?rev=2014-05-04+03%3A45%3A51','','0000-00-00 00:00:00','','','','','dspr'),(113,'Marina Soler','https://friendica.free-beer.ch/profile/marisoler','http://friendica.free-beer.ch/profile/marisoler','https://friendica.free-beer.ch/photo/custom/300/514.jpg?rev=2013-09-01+18%3A38%3A55','','0000-00-00 00:00:00','','','','','dspr'),(114,'Als Ob','https://friendica.free-beer.ch/profile/derhuaba','http://friendica.free-beer.ch/profile/derhuaba','https://friendica.free-beer.ch/photo/custom/300/842.jpg?rev=2014-08-06+23%3A24%3A06','','0000-00-00 00:00:00','','','','','dspr'),(115,'Colin Steele','https://friendica.free-beer.ch/profile/emberleaf','http://friendica.free-beer.ch/profile/emberleaf','https://friendica.free-beer.ch/photo/custom/300/245.jpg?rev=2013-02-23+16%3A54%3A57','','0000-00-00 00:00:00','','','','','dspr'),(116,'Max Mustermann','https://friendica.free-beer.ch/profile/jan_sofasurfer','http://friendica.free-beer.ch/profile/jan_sofasurfer','https://friendica.free-beer.ch/photo/custom/300/246.jpg?rev=2013-02-24+13%3A17%3A05','','0000-00-00 00:00:00','','','','','dspr'),(117,'Nicola Sisto Alessandro Vaccarone','https://friendica.free-beer.ch/profile/nk','http://friendica.free-beer.ch/profile/nk','https://friendica.free-beer.ch/photo/custom/300/286.jpg?rev=2014-03-05+18%3A14%3A39','','0000-00-00 00:00:00','','','','','dspr'),(118,'Pascal Daniel Angst','https://friendica.free-beer.ch/profile/pascala','http://friendica.free-beer.ch/profile/pascala','https://friendica.free-beer.ch/photo/custom/300/268.jpg?rev=2013-03-16+14%3A39%3A19','','0000-00-00 00:00:00','','','','','dspr'),(119,'Bodhi SparkleSnapdragon Goforth','https://friendica.free-beer.ch/profile/snapdragon','http://friendica.free-beer.ch/profile/snapdragon','https://friendica.free-beer.ch/photo/custom/300/494.jpg?rev=2013-08-15+14%3A51%3A39','','0000-00-00 00:00:00','','','','','dspr'),(120,'AntiChristos44 BodhiSattva','https://friendica.free-beer.ch/profile/ac44bo','http://friendica.free-beer.ch/profile/ac44bo','https://friendica.free-beer.ch/photo/custom/300/440.jpg?rev=2013-07-15+01%3A55%3A24','','0000-00-00 00:00:00','','','','','dspr'),(121,'Michael Moroni','https://friendica.free-beer.ch/profile/airon90','http://friendica.free-beer.ch/profile/airon90','https://friendica.free-beer.ch/photo/custom/300/547.jpg?rev=2013-09-27+11%3A19%3A56','','0000-00-00 00:00:00','','','','','dspr'),(122,'Martin Neujahr','https://friendica.free-beer.ch/profile/funkymartin','http://friendica.free-beer.ch/profile/funkymartin','https://friendica.free-beer.ch/photo/custom/300/557.jpg?rev=2013-10-04+06%3A33%3A29','','0000-00-00 00:00:00','','','','','dspr'),(123,'Florian Traverse','https://friendica.free-beer.ch/profile/temsa','http://friendica.free-beer.ch/profile/temsa','https://friendica.free-beer.ch/photo/custom/300/548.jpg?rev=2013-09-28+06%3A16%3A05','','0000-00-00 00:00:00','','','','','dspr'),(124,'Picaflor Azul','https://friendica.free-beer.ch/profile/picaflor','http://friendica.free-beer.ch/profile/picaflor','https://friendica.free-beer.ch/photo/custom/300/549.jpg?rev=2013-09-28+15%3A36%3A46','','0000-00-00 00:00:00','','','','','dspr'),(125,'edson duarte','https://friendica.free-beer.ch/profile/vaugs3roty','http://friendica.free-beer.ch/profile/vaugs3roty','https://friendica.free-beer.ch/photo/custom/300/570.jpg?rev=2013-10-13+18%3A01%3A06','','0000-00-00 00:00:00','','','','','dspr'),(126,'Don Viktoranghelo De Cuyo','https://friendica.free-beer.ch/profile/lechju','http://friendica.free-beer.ch/profile/lechju','https://friendica.free-beer.ch/photo/custom/300/583.jpg?rev=2013-11-02+22%3A56%3A06','','0000-00-00 00:00:00','','','','','dspr'),(127,'Liselotte Vinberg','https://friendica.free-beer.ch/profile/musikmamma','http://friendica.free-beer.ch/profile/musikmamma','https://friendica.free-beer.ch/photo/custom/300/589.jpg?rev=2013-11-02+18%3A22%3A16','','0000-00-00 00:00:00','','','','','dspr'),(128,'Arlo James Barnes','https://friendica.free-beer.ch/profile/arlojamesbarnes','http://friendica.free-beer.ch/profile/arlojamesbarnes','https://friendica.free-beer.ch/photo/custom/300/593.jpg?rev=2013-11-04+21%3A56%3A10','','0000-00-00 00:00:00','','','','','dspr'),(129,'Roxana Diaz','https://friendica.free-beer.ch/profile/heindys','http://friendica.free-beer.ch/profile/heindys','https://friendica.free-beer.ch/photo/custom/300/774.jpg?rev=2014-05-10+09%3A51%3A52','','0000-00-00 00:00:00','','','','','dspr'),(130,'Armin Lutz','https://friendica.free-beer.ch/profile/zebra','http://friendica.free-beer.ch/profile/zebra','https://friendica.free-beer.ch/photo/custom/300/612.jpg?rev=2013-11-20+12%3A36%3A03','','0000-00-00 00:00:00','','','','','dspr'),(131,'Philipp Obenauer','https://friendica.free-beer.ch/profile/clandestino','http://friendica.free-beer.ch/profile/clandestino','https://friendica.free-beer.ch/photo/custom/300/621.jpg?rev=2013-12-14+11%3A09%3A01','','0000-00-00 00:00:00','','','','','dspr'),(132,'ѕтєιикαмÏ\81f','https://friendica.free-beer.ch/profile/steinkampf','http://friendica.free-beer.ch/profile/steinkampf','https://friendica.free-beer.ch/photo/custom/300/652.jpg?rev=2014-01-19+13%3A36%3A41','','0000-00-00 00:00:00','','','','','dspr'),(133,'Jerry Briardy','https://friendica.free-beer.ch/profile/bookman37','http://friendica.free-beer.ch/profile/bookman37','https://friendica.free-beer.ch/photo/custom/300/651.jpg?rev=2013-12-31+06%3A49%3A25','','0000-00-00 00:00:00','','','','','dspr'),(134,'D2O','https://friendica.free-beer.ch/profile/d2o','http://friendica.free-beer.ch/profile/d2o','https://friendica.free-beer.ch/photo/custom/300/673.jpg?rev=2014-01-16+14%3A57%3A25','','0000-00-00 00:00:00','','','','','dspr'),(135,'Marc Leunig','https://friendica.free-beer.ch/profile/miefda','http://friendica.free-beer.ch/profile/miefda','https://friendica.free-beer.ch/photo/custom/300/675.jpg?rev=2014-01-16+20%3A51%3A38','','0000-00-00 00:00:00','','','','','dspr'),(136,'Sebas Pesersen','https://friendica.free-beer.ch/profile/sebasped','http://friendica.free-beer.ch/profile/sebasped','https://friendica.free-beer.ch/photo/custom/300/714.jpg?rev=2014-02-16+21%3A33%3A10','','0000-00-00 00:00:00','','','','','dspr'),(137,'Redrick Deckard','https://friendica.free-beer.ch/profile/red','http://friendica.free-beer.ch/profile/red','https://friendica.free-beer.ch/photo/custom/300/724.jpg?rev=2014-03-02+17%3A12%3A30','','0000-00-00 00:00:00','','','','','dspr'),(138,'Rui Bernardo','https://friendica.free-beer.ch/profile/rui_miguel','http://friendica.free-beer.ch/profile/rui_miguel','https://friendica.free-beer.ch/photo/custom/300/729.jpg?rev=2014-03-05+15%3A46%3A11','','0000-00-00 00:00:00','','','','','dspr'),(139,'Manoel Nascimento','https://friendica.free-beer.ch/profile/manoelnascimento','http://friendica.free-beer.ch/profile/manoelnascimento','https://friendica.free-beer.ch/photo/custom/300/734.jpg?rev=2014-03-09+14%3A15%3A23','','0000-00-00 00:00:00','','','','','dspr'),(140,'ilma','https://friendica.free-beer.ch/profile/ilma','http://friendica.free-beer.ch/profile/ilma','https://friendica.free-beer.ch/photo/custom/300/739.jpg?rev=2014-03-14+03%3A41%3A44','','0000-00-00 00:00:00','','','','','dspr'),(141,'David Mccauley','https://friendica.free-beer.ch/profile/opticalrevenge','http://friendica.free-beer.ch/profile/opticalrevenge','https://friendica.free-beer.ch/photo/custom/300/746.jpg?rev=2014-03-22+18%3A30%3A05','','0000-00-00 00:00:00','','','','','dspr'),(142,'Atterratio Aeternus','https://friendica.free-beer.ch/profile/atterratio','http://friendica.free-beer.ch/profile/atterratio','https://friendica.free-beer.ch/photo/custom/300/753.jpg?rev=2014-04-04+01%3A23%3A23','','0000-00-00 00:00:00','','','','','dspr'),(143,'Markus Krüger','https://friendica.free-beer.ch/profile/kreuzmacher','http://friendica.free-beer.ch/profile/kreuzmacher','https://friendica.free-beer.ch/photo/custom/300/800.jpg?rev=2014-06-26+05%3A48%3A58','','0000-00-00 00:00:00','','','','','dspr'),(144,'Master O Disaster','https://friendica.free-beer.ch/profile/masterodisaster','http://friendica.free-beer.ch/profile/masterodisaster','https://friendica.free-beer.ch/photo/custom/300/855.jpg?rev=2014-08-18+20%3A31%3A42','','0000-00-00 00:00:00','','','','','dspr'),(145,'eyal72','https://friendica.free-beer.ch/profile/eyal72','http://friendica.free-beer.ch/profile/eyal72','https://friendica.free-beer.ch/photo/custom/300/872.jpg?rev=2014-09-03+22%3A35%3A36','','0000-00-00 00:00:00','','','','','dspr'),(146,'Ed Wes','https://friendica.free-beer.ch/profile/edwes','http://friendica.free-beer.ch/profile/edwes','https://friendica.free-beer.ch/photo/custom/300/1206.jpg','','0000-00-00 00:00:00','','','','','dspr'),(147,'Romoli Marco','https://friendica.free-beer.ch/profile/redleghorn','http://friendica.free-beer.ch/profile/redleghorn','https://friendica.free-beer.ch/photo/custom/300/1270.jpg?rev=2014-11-26+16%3A57%3A51','','0000-00-00 00:00:00','','','','','dspr'),(148,'Michael Rueetschli','http://social.rueetschli.org/profile/rueetschli','http://social.rueetschli.org/profile/rueetschli','http://social.rueetschli.org/photo/custom/300/1.jpg?rev=2014-03-14+09%3A30%3A42','','0000-00-00 00:00:00','','','','','dspr'),(149,'Land Ei','http://social.rueetschli.org/profile/land_ei','http://social.rueetschli.org/profile/land_ei','http://social.rueetschli.org/photo/custom/300/32.jpg?rev=2014-07-25+17%3A03%3A43','','0000-00-00 00:00:00','','','','','dspr'),(150,'Jim Wiskey','http://social.rueetschli.org/profile/gsxrpilot','http://social.rueetschli.org/profile/gsxrpilot','http://social.rueetschli.org/photo/custom/300/36.jpg?rev=2014-08-21+01%3A47%3A44','','0000-00-00 00:00:00','','','','','dspr'),(151,'Kevin K.','http://social.rueetschli.org/profile/dj-atropine','http://social.rueetschli.org/profile/dj-atropine','http://social.rueetschli.org/photo/custom/300/66.jpg?rev=2014-12-31+13%3A05%3A29','','0000-00-00 00:00:00','','','','','dspr'),(152,'friendica2','http://192.168.22.10/profile/friendica2','http://192.168.22.10/profile/friendica2','http://192.168.22.10/photo/avatar/3.jpg','','2015-02-02 19:00:21','','','','','stat'),(153,'friendica5','http://192.168.22.10/profile/friendica5','http://192.168.22.10/profile/friendica5','http://192.168.22.10/photo/avatar/5.jpg','','2015-02-02 19:00:18','','','','','stat'),(154,'friendica4','http://192.168.22.10/profile/friendica4','http://192.168.22.10/profile/friendica4','http://192.168.22.10/photo/avatar/6.jpg','','2015-02-02 19:00:24','','','','','stat'),(155,'friendica1','http://192.168.22.10/profile/friendica1','http://192.168.22.10/profile/friendica1','http://192.168.22.10/photo/profile/2.jpg','','2015-02-02 12:02:11','','','','','stat'),(156,'friendica3','http://192.168.22.10/profile/friendica3','http://192.168.22.10/profile/friendica3','http://192.168.22.10/photo/1fc6596c195944666e18cbd313795942-4.jpg','','2015-02-02 19:00:12','','','','','dfrn');
+INSERT INTO `gcontact` VALUES (1,'Keith','https://friendika.me4.it/profile/keith','http://friendika.me4.it/profile/keith','https://friendika.me4.it/photo/custom/300/1.jpg?rev=2014-07-27+19%3A34%3A36','','0001-01-01 00:00:00','','','','','dspr'),(2,'Manuel Freiria','https://friendika.me4.it/profile/manolofreiria','http://friendika.me4.it/profile/manolofreiria','https://friendika.me4.it/photo/custom/300/254.jpg?rev=2014-09-06+23%3A58%3A50','','0001-01-01 00:00:00','','','','','dspr'),(3,'José Manuel Goig','https://friendika.me4.it/profile/jmgoig','http://friendika.me4.it/profile/jmgoig','https://friendika.me4.it/photo/custom/300/283.jpg?rev=2014-12-16+10%3A11%3A40','','0001-01-01 00:00:00','','','','','dspr'),(4,'Keith','https://friendica.eu/profile/support','http://friendica.eu/profile/support','https://friendica.eu/photo/custom/300/1.jpg?rev=2011-12-21+14%3A41%3A44','','0001-01-01 00:00:00','','','','','dspr'),(5,'Henrike Van Mortis','https://friendica.eu/profile/hvm','http://friendica.eu/profile/hvm','https://friendica.eu/photo/custom/300/250.jpg','','0001-01-01 00:00:00','','','','','dspr'),(6,'offene Ablage: nothing to hide','https://friendica.eu/profile/o2myfrdca01','http://friendica.eu/profile/o2myfrdca01','https://friendica.eu/photo/custom/300/259.jpg?rev=2012-02-16+16%3A49%3A37','','0001-01-01 00:00:00','','','','','dspr'),(7,'Friendica Theme Developers','https://friendica.eu/profile/ftdevs','http://friendica.eu/profile/ftdevs','https://friendica.eu/photo/custom/300/366.jpg?rev=2012-03-01+11%3A58%3A18','','0001-01-01 00:00:00','','','','','dspr'),(8,'Nepesh Hacker','https://friendica.eu/profile/arescorpio','http://friendica.eu/profile/arescorpio','https://friendica.eu/photo/custom/300/516.jpg?rev=2012-11-07+22%3A39%3A38','','0001-01-01 00:00:00','','','','','dspr'),(9,'Rolf Rupp','https://friendica.eu/profile/rcr','http://friendica.eu/profile/rcr','https://friendica.eu/photo/custom/300/841.jpg?rev=2014-01-09+22%3A15%3A09','','0001-01-01 00:00:00','','','','','dspr'),(10,'Daniel Steinbacher','https://friendica.eu/profile/damez','http://friendica.eu/profile/damez','https://friendica.eu/photo/custom/300/1791.jpg?rev=2015-01-15+16%3A49%3A29','','0001-01-01 00:00:00','','','','','dspr'),(11,'Pirate Times','https://friendica.eu/profile/piratetimes','http://friendica.eu/profile/piratetimes','https://friendica.eu/photo/custom/300/885.jpg?rev=2014-01-21+11%3A09%3A35','','0001-01-01 00:00:00','','','','','dspr'),(12,'Jacques','https://friendica.eu/profile/jacques','http://friendica.eu/profile/jacques','https://friendica.eu/photo/custom/300/907.jpg?rev=2015-01-15+14%3A37%3A37','','0001-01-01 00:00:00','','','','','dspr'),(13,'Montse Freire','https://friendica.eu/profile/auga09','http://friendica.eu/profile/auga09','https://friendica.eu/photo/custom/300/934.jpg?rev=2014-02-16+14%3A17%3A30','','0001-01-01 00:00:00','','','','','dspr'),(14,'oremus','https://friendica.eu/profile/oremus','http://friendica.eu/profile/oremus','https://friendica.eu/photo/custom/300/1073.jpg?rev=2014-04-29+15%3A09%3A50','','0001-01-01 00:00:00','','','','','dspr'),(15,'ppp','https://friendica.eu/profile/ppp','http://friendica.eu/profile/ppp','https://friendica.eu/photo/custom/300/1134.jpg?rev=2014-06-01+12%3A58%3A28','','0001-01-01 00:00:00','','','','','dspr'),(16,'Krin Bouch','https://friendica.eu/profile/krinbouch','http://friendica.eu/profile/krinbouch','https://friendica.eu/photo/custom/300/1471.jpg?rev=2014-09-20+14%3A18%3A24','','0001-01-01 00:00:00','','','','','dspr'),(17,'Miguel Menéndez','https://friendica.eu/profile/miguelmenendez','http://friendica.eu/profile/miguelmenendez','https://friendica.eu/photo/custom/300/1508.jpg?rev=2014-10-26+15%3A21%3A28','','0001-01-01 00:00:00','','','','','dspr'),(18,'Alexandre Pólvora','https://friendica.eu/profile/discomplex','http://friendica.eu/profile/discomplex','https://friendica.eu/photo/custom/300/1522.jpg?rev=2014-11-05+23%3A54%3A57','','0001-01-01 00:00:00','','','','','dspr'),(19,'Chak\'pur','https://friendica.eu/profile/murokka','http://friendica.eu/profile/murokka','https://friendica.eu/photo/custom/300/1535.jpg?rev=2014-11-13+09%3A13%3A55','','0001-01-01 00:00:00','','','','','dspr'),(20,'Samuel Contraste','https://friendica.eu/profile/stace-melunor','http://friendica.eu/profile/stace-melunor','https://friendica.eu/photo/custom/300/1586.jpg?rev=2014-11-28+13%3A01%3A22','','0001-01-01 00:00:00','','','','','dspr'),(21,'Martin Langlotz','https://friendica.eu/profile/numan','http://friendica.eu/profile/numan','https://friendica.eu/photo/custom/300/1621.jpg?rev=2014-12-02+10%3A37%3A34','','0001-01-01 00:00:00','','','','','dspr'),(22,'Elie Bissery','https://friendica.eu/profile/eilsib','http://friendica.eu/profile/eilsib','https://friendica.eu/photo/custom/300/1680.jpg?rev=2014-12-17+16%3A05%3A23','','0001-01-01 00:00:00','','','','','dspr'),(23,'Cécile Maitre','https://friendica.eu/profile/cecile','http://friendica.eu/profile/cecile','https://friendica.eu/photo/custom/300/1703.jpg?rev=2014-12-23+19%3A29%3A41','','0001-01-01 00:00:00','','','','','dspr'),(24,'Ralf Gerdes','https://friendica.eu/profile/ralf','http://friendica.eu/profile/ralf','https://friendica.eu/photo/custom/300/1739.jpg?rev=2014-12-30+12%3A43%3A12','','0001-01-01 00:00:00','','','','','dspr'),(25,'Loran Btn','https://friendica.eu/profile/loran_mcfly','http://friendica.eu/profile/loran_mcfly','https://friendica.eu/photo/custom/300/1781.jpg?rev=2015-01-11+09%3A10%3A33','','0001-01-01 00:00:00','','','','','dspr'),(26,'Jörn Rinne','https://friendica.eu/profile/lefou','http://friendica.eu/profile/lefou','https://friendica.eu/photo/custom/300/1782.jpg?rev=2015-01-11+15%3A39%3A33','','0001-01-01 00:00:00','','','','','dspr'),(27,'Lud Wig','https://friendica.eu/profile/ludwig','http://friendica.eu/profile/ludwig','https://friendica.eu/photo/custom/300/1810.jpg?rev=2015-01-25+04%3A41%3A20','','0001-01-01 00:00:00','','','','','dspr'),(28,'Rike','http://mist.loozah.com/profile/rike','http://mist.loozah.com/profile/rike','http://mist.loozah.com/photo/custom/300/2.jpg?rev=2012-02-03+14%3A10%3A17','','0001-01-01 00:00:00','','','','','dspr'),(29,'Torsten Peh','http://mist.loozah.com/profile/torsten_peh','http://mist.loozah.com/profile/torsten_peh','http://mist.loozah.com/photo/custom/300/13.jpg?rev=2012-05-15+12%3A58%3A18','','0001-01-01 00:00:00','','','','','dspr'),(30,'der buffer','http://mist.loozah.com/profile/derbuffer','http://mist.loozah.com/profile/derbuffer','http://mist.loozah.com/photo/custom/300/98.jpg?rev=2013-07-27+00%3A10%3A59','','0001-01-01 00:00:00','','','','','dspr'),(31,'Marcel','http://mist.loozah.com/profile/mkay','http://mist.loozah.com/profile/mkay','http://mist.loozah.com/photo/custom/300/24.jpg?rev=2012-06-14+19%3A06%3A37','','0001-01-01 00:00:00','','','','','dspr'),(32,'Gianluca Zoni','http://mist.loozah.com/profile/zoninoz','http://mist.loozah.com/profile/zoninoz','http://mist.loozah.com/photo/custom/300/56.jpg?rev=2012-09-12+15%3A38%3A42','','0001-01-01 00:00:00','','','','','dspr'),(33,'Jo A','http://mist.loozah.com/profile/joooo','http://mist.loozah.com/profile/joooo','http://mist.loozah.com/photo/custom/300/64.jpg?rev=2012-11-12+15%3A32%3A02','','0001-01-01 00:00:00','','','','','dspr'),(34,'Lass Mi Randa Den Sie Will Ja','https://friendica.styliztique.biz/profile/stb','http://friendica.styliztique.biz/profile/stb','https://friendica.styliztique.biz/photo/custom/300/20.jpg?rev=2013-09-06+16%3A04%3A10','','0001-01-01 00:00:00','','','','','dspr'),(35,'кαÑ\8fισz Ð¼â˜ Ñ\8fку','https://karl.marx.pm/profile/kmarky','http://karl.marx.pm/profile/kmarky','https://karl.marx.pm/photo/custom/300/11.jpg?rev=2014-01-17+09%3A48%3A33','','0001-01-01 00:00:00','','','','','dspr'),(36,'Indignados','https://karl.marx.pm/profile/indignados','http://karl.marx.pm/profile/indignados','https://karl.marx.pm/photo/custom/300/44.jpg?rev=2012-05-27+14%3A53%3A52','','0001-01-01 00:00:00','','','','','dspr'),(37,'Anarkia','https://karl.marx.pm/profile/anarquia','http://karl.marx.pm/profile/anarquia','https://karl.marx.pm/photo/custom/300/45.jpg?rev=2012-05-29+11%3A01%3A11','','0001-01-01 00:00:00','','','','','dspr'),(38,'Planeta Pirata','https://karl.marx.pm/profile/pirata','http://karl.marx.pm/profile/pirata','https://karl.marx.pm/photo/custom/300/46.jpg?rev=2012-05-27+15%3A20%3A12','','0001-01-01 00:00:00','','','','','dspr'),(39,'Grupo GNU | Linux','https://karl.marx.pm/profile/gnu','http://karl.marx.pm/profile/gnu','https://karl.marx.pm/photo/custom/300/47.jpg?rev=2012-05-27+15%3A34%3A20','','0001-01-01 00:00:00','','','','','dspr'),(40,'Ecologia','https://karl.marx.pm/profile/eco','http://karl.marx.pm/profile/eco','https://karl.marx.pm/photo/custom/300/57.jpg?rev=2012-06-09+06%3A42%3A04','','0001-01-01 00:00:00','','','','','dspr'),(41,'Grupo antiFa Friendica','https://karl.marx.pm/profile/antifa','http://karl.marx.pm/profile/antifa','https://karl.marx.pm/photo/custom/300/60.jpg?rev=2012-06-11+08%3A46%3A48','','0001-01-01 00:00:00','','','','','dspr'),(42,'Facebook (alias Feisbuk)','https://karl.marx.pm/profile/facebook','http://karl.marx.pm/profile/facebook','https://karl.marx.pm/photo/custom/300/61.jpg?rev=2014-01-17+09%3A50%3A44','','0001-01-01 00:00:00','','','','','dspr'),(43,'Todo Cine','https://karl.marx.pm/profile/cine','http://karl.marx.pm/profile/cine','https://karl.marx.pm/photo/custom/300/65.jpg?rev=2012-06-15+07%3A20%3A01','','0001-01-01 00:00:00','','','','','dspr'),(44,'Rivera Valdez','https://karl.marx.pm/profile/riveravaldez','http://karl.marx.pm/profile/riveravaldez','https://karl.marx.pm/photo/custom/300/205.jpg?rev=2013-06-18+10%3A58%3A46','','0001-01-01 00:00:00','','','','','dspr'),(45,'Tazman Devil','https://karl.marx.pm/profile/tazman','http://karl.marx.pm/profile/tazman','https://karl.marx.pm/photo/custom/300/228.jpg?rev=2013-08-24+02%3A59%3A52','','0001-01-01 00:00:00','','','','','dspr'),(46,'Tiago Casal Ribeiro','https://karl.marx.pm/profile/tiago','http://karl.marx.pm/profile/tiago','https://karl.marx.pm/photo/custom/300/391.jpg?rev=2014-10-30+17%3A10%3A40','','0001-01-01 00:00:00','','','','','dspr'),(47,'Protestation','https://karl.marx.pm/profile/protestation_','http://karl.marx.pm/profile/protestation_','https://karl.marx.pm/photo/custom/300/414.jpg','','0001-01-01 00:00:00','','','','','dspr'),(48,'Arto','https://myfriendica.net/profile/arto','http://myfriendica.net/profile/arto','https://myfriendica.net/photo/custom/300/5.jpg?rev=2012-04-29+18%3A36%3A29','','0001-01-01 00:00:00','','','','','dspr'),(49,'Gatoso Kot','https://myfriendica.net/profile/gatoso','http://myfriendica.net/profile/gatoso','https://myfriendica.net/photo/custom/300/159.jpg?rev=2013-04-05+05%3A51%3A58','','0001-01-01 00:00:00','','','','','dspr'),(50,'Believing Prayer','https://myfriendica.net/profile/believingprayer','http://myfriendica.net/profile/believingprayer','https://myfriendica.net/photo/custom/300/11.jpg?rev=2012-03-19+13%3A12%3A07','','0001-01-01 00:00:00','','','','','dspr'),(51,'Avery Jenkins','https://myfriendica.net/profile/docaltmed','http://myfriendica.net/profile/docaltmed','https://myfriendica.net/photo/custom/300/17.jpg?rev=2012-03-27+11%3A05%3A26','','0001-01-01 00:00:00','','','','','dspr'),(52,'Vincent','https://myfriendica.net/profile/influencepc','http://myfriendica.net/profile/influencepc','https://myfriendica.net/photo/custom/300/55.jpg?rev=2012-04-26+12%3A47%3A48','','0001-01-01 00:00:00','','','','','dspr'),(53,'Berlin Group','https://myfriendica.net/profile/berlin','http://myfriendica.net/profile/berlin','https://myfriendica.net/photo/custom/300/65.jpg?rev=2012-04-28+09%3A21%3A19','','0001-01-01 00:00:00','','','','','dspr'),(54,'jcsesecuneta@myfriendica.net','https://myfriendica.net/profile/jcsesecuneta','http://myfriendica.net/profile/jcsesecuneta','https://myfriendica.net/photo/custom/300/281.jpg?rev=2013-09-06+11%3A51%3A59','','0001-01-01 00:00:00','','','','','dspr'),(55,'Sam I','https://myfriendica.net/profile/sam01','http://myfriendica.net/profile/sam01','https://myfriendica.net/photo/custom/300/183.jpg?rev=2013-06-28+15%3A34%3A46','','0001-01-01 00:00:00','','','','','dspr'),(56,'Stephen Judge','https://myfriendica.net/profile/stephen','http://myfriendica.net/profile/stephen','https://myfriendica.net/photo/custom/300/294.jpg?rev=2014-02-25+15%3A07%3A05','','0001-01-01 00:00:00','','','','','dspr'),(57,'潘隆å\90‰ Tony Phuah','https://myfriendica.net/profile/tonyphuah','http://myfriendica.net/profile/tonyphuah','https://myfriendica.net/photo/custom/300/304.jpg?rev=2013-11-02+00%3A37%3A59','','0001-01-01 00:00:00','','','','','dspr'),(58,'Lina María Largo','https://myfriendica.net/profile/linamaria','http://myfriendica.net/profile/linamaria','https://myfriendica.net/photo/custom/300/332.jpg?rev=2013-12-18+08%3A14%3A24','','0001-01-01 00:00:00','','','','','dspr'),(59,'Petra L.','https://myfriendica.net/profile/petra-l','http://myfriendica.net/profile/petra-l','https://myfriendica.net/photo/custom/300/349.jpg?rev=2014-04-05+13%3A41%3A25','','0001-01-01 00:00:00','','','','','dspr'),(60,'Panko','https://myfriendica.net/profile/panko','http://myfriendica.net/profile/panko','https://myfriendica.net/photo/custom/300/354.jpg?rev=2014-07-30+14%3A22%3A42','','0001-01-01 00:00:00','','','','','dspr'),(61,'Jorge','https://myfriendica.net/profile/soloojos','http://myfriendica.net/profile/soloojos','https://myfriendica.net/photo/custom/300/370.jpg?rev=2014-03-02+16%3A20%3A32','','0001-01-01 00:00:00','','','','','dspr'),(62,'Sebas Pedersen','https://myfriendica.net/profile/sebasped','http://myfriendica.net/profile/sebasped','https://myfriendica.net/photo/custom/300/373.jpg?rev=2015-01-15+23%3A04%3A06','','0001-01-01 00:00:00','','','','','dspr'),(63,'ivan zlax','https://myfriendica.net/profile/zlaxyi','http://myfriendica.net/profile/zlaxyi','https://myfriendica.net/photo/custom/300/376.jpg?rev=2014-03-09+09%3A56%3A13','','0001-01-01 00:00:00','','','','','dspr'),(64,'Shimriez','https://myfriendica.net/profile/shimriez','http://myfriendica.net/profile/shimriez','https://myfriendica.net/photo/custom/300/403.jpg?rev=2014-06-21+17%3A18%3A05','','0001-01-01 00:00:00','','','','','dspr'),(65,'Sitesonix Web Solutions','https://myfriendica.net/profile/sitesonix','http://myfriendica.net/profile/sitesonix','https://myfriendica.net/photo/custom/300/445.jpg?rev=2014-06-13+17%3A25%3A54','','0001-01-01 00:00:00','','','','','dspr'),(66,'Bastian Lang','https://myfriendica.net/profile/raudy93','http://myfriendica.net/profile/raudy93','https://myfriendica.net/photo/custom/300/436.jpg?rev=2014-05-29+12%3A40%3A00','','0001-01-01 00:00:00','','','','','dspr'),(67,'Simó Albert i Beltran','https://myfriendica.net/profile/sim6','http://myfriendica.net/profile/sim6','https://myfriendica.net/photo/custom/300/419.jpg?rev=2014-05-14+16%3A14%3A04','','0001-01-01 00:00:00','','','','','dspr'),(68,'RT Griffiti','https://myfriendica.net/profile/rtgriffiti','http://myfriendica.net/profile/rtgriffiti','https://myfriendica.net/photo/custom/300/437.jpg?rev=2014-05-30+01%3A17%3A19','','0001-01-01 00:00:00','','','','','dspr'),(69,'Damian','https://myfriendica.net/profile/deb92','http://myfriendica.net/profile/deb92','https://myfriendica.net/photo/custom/300/462.jpg?rev=2014-07-29+18%3A18%3A26','','0001-01-01 00:00:00','','','','','dspr'),(70,'Ciril Earth','https://myfriendica.net/profile/cirilearth','http://myfriendica.net/profile/cirilearth','https://myfriendica.net/photo/custom/300/519.jpg?rev=2014-12-22+12%3A19%3A09','','0001-01-01 00:00:00','','','','','dspr'),(71,'The SOS Card Project','https://myfriendica.net/profile/the_sos_card_project','http://myfriendica.net/profile/the_sos_card_project','https://myfriendica.net/photo/custom/300/524.jpg?rev=2014-12-26+19%3A54%3A41','','0001-01-01 00:00:00','','','','','dspr'),(72,'Hauke Altmann','https://snarl.de/profile/tugelblend','http://snarl.de/profile/tugelblend','https://www.snarl.de/photo/profile/5.jpg','','2015-01-25 05:02:28','Berlin','Softwaredeveloper, friendica enthusiast, member of <a href=\"http://www.graffitiresearchlab.de/,\" target=\"_blank\">http://www.graffitiresearchlab.de/,</a> cyclist','graffiti, friendica, graffiti, research, lab, diy, collectivism, urban, art, surfing, berlin, opensource, critical, mass, freifunk','','dfrn'),(73,'Chris Thina','https://snarl.de/profile/chillkroete','http://snarl.de/profile/chillkroete','https://snarl.de/photo/profile/69.jpg','','2014-01-11 11:59:56','','','','','dfrn'),(74,'Dirk Schlechter','https://snarl.de/profile/viewfinder','http://snarl.de/profile/viewfinder','https://snarl.de/photo/profile/106.jpg','','2014-03-24 16:20:54','','','','Männlich','dfrn'),(75,'Tauschring Prenzelberg','https://snarl.de/profile/prenzeltausch','http://snarl.de/profile/prenzeltausch','https://snarl.de/photo/profile/117.jpg','','2015-01-25 19:31:54','Berlin','Haareschneiden gegen Waschmaschinenreparatur?<br>Autotransport gegen Katze gie&szlig;en?<br>Der Prenzelberger Tauschring<br>sucht weitere Mitglieder.<br>Komm doch mal vorbei:<br>Treffen jeden 2. &amp; 4. Montag im Monat<br>im Kiezladen in der Dunckerstr. 14, 19-20 Uhr<br>prenzeltausch.thing.de','tauschring, zeitkonto','Intersex','dfrn'),(76,'Panko','https://snarl.de/profile/panko','http://snarl.de/profile/panko','https://snarl.de/photo/profile/141.jpg','@','2015-02-02 11:31:46','La Vila Joiosa','','debian, linux, gnu, gnu/linux, scifi, horror, xmpp, jabber, friendica, pump, freesoftware, darts, dardos, dards, punk, rock, ska, reggae, beer','Home','dfrn'),(77,'Berlin Group','https://snarl.de/profile/berlin','http://snarl.de/profile/berlin','https://snarl.de/photo/profile/0.jpg','','2012-04-28 09:21:19','Berlin','Eine Gruppe f&uuml;r alle Friendicianer, die an der geilsten Stadt Deutschlands interessiert sind.','berlin','','dfrn'),(78,'Daniel C. Würl','https://snarl.de/profile/decadentgray','http://snarl.de/profile/decadentgray','https://snarl.de/photo/profile/158.jpg','','2014-08-29 02:20:44','','','','','dfrn'),(79,'Michaela Gruber','https://snarl.de/profile/starling','http://snarl.de/profile/starling','https://snarl.de/photo/profile/160.jpg','','2014-09-03 18:19:10','','','','','dfrn'),(80,'Kristian R.','https://snarl.de/profile/z428','http://snarl.de/profile/z428','https://snarl.de/photo/profile/181.jpg','','2015-01-30 13:47:31','','Software engineer (#java, #javaee, #python, mainly server-sided and backend), art and imaging addict mainly using #gimp, #opensource / #softwarelibre # freesoftware software user and promoter, lover of bizarre #music (especially #netaudio stuff, #metal, #postrock, more open-minded #indie), #vegetarian, 30something and a few other things.<br>kr428 virtually everywhere, including twitter, identica et al.','linux, gimp, photography, music, java, opensource, gnome, philosophy, spirituality, art','Männlich','dfrn'),(81,'Georg Hofer','https://snarl.de/profile/ironhead','http://snarl.de/profile/ironhead','https://snarl.de/photo/profile/228.jpg','','2014-12-31 15:47:14','','','','','dfrn'),(82,'Nick Power','https://snarl.de/profile/veganvincent','http://snarl.de/profile/veganvincent','https://snarl.de/photo/profile/240.jpg','','2015-01-26 16:59:02','','','','','dfrn'),(83,'Yushin W','https://snarl.de/profile/opduur','http://snarl.de/profile/opduur','https://snarl.de/photo/profile/254.jpg','','2015-01-28 19:44:40','','','freesoftware, floss, foss, opensource, linux, vim, cli, command-line, creativecommons, ocw, oer, commons, sustainability, energy, lohas, mdg, sdg','','dfrn'),(84,'Oradon','https://oradon.pegasus.uberspace.de/profile/oradon','http://oradon.pegasus.uberspace.de/profile/oradon','https://oradon.pegasus.uberspace.de/photo/custom/300/1.jpg','','0001-01-01 00:00:00','','','','','dspr'),(85,'Stuttgart','https://oradon.pegasus.uberspace.de/profile/stuttgart','http://oradon.pegasus.uberspace.de/profile/stuttgart','https://oradon.pegasus.uberspace.de/photo/custom/300/12.jpg','','0001-01-01 00:00:00','','','','','dspr'),(86,'Olivier','https://friendica.free-beer.ch/profile/olivier','http://friendica.free-beer.ch/profile/olivier','https://friendica.free-beer.ch/photo/custom/300/1.jpg?rev=2012-05-02+09%3A02%3A19','','0001-01-01 00:00:00','','','','','dspr'),(87,'pogonator','https://friendica.free-beer.ch/profile/pogonator','http://friendica.free-beer.ch/profile/pogonator','https://friendica.free-beer.ch/photo/custom/300/396.jpg?rev=2013-06-22+07%3A51%3A38','','0001-01-01 00:00:00','','','','','dspr'),(88,'Claus Muehlenkamp','https://friendica.free-beer.ch/profile/clausmuehlenkamp','http://friendica.free-beer.ch/profile/clausmuehlenkamp','https://friendica.free-beer.ch/photo/custom/300/368.jpg?rev=2013-06-12+21%3A21%3A07','','0001-01-01 00:00:00','','','','','dspr'),(89,'Jörg Hartmann','https://friendica.free-beer.ch/profile/jh72de','http://friendica.free-beer.ch/profile/jh72de','https://friendica.free-beer.ch/photo/custom/300/295.jpg?rev=2013-04-09+19%3A21%3A01','','0001-01-01 00:00:00','','','','','dspr'),(90,'Carlos Solís','https://friendica.free-beer.ch/profile/csolisr','http://friendica.free-beer.ch/profile/csolisr','https://friendica.free-beer.ch/photo/custom/300/22.jpg?rev=2012-05-31+23%3A00%3A24','','0001-01-01 00:00:00','','','','','dspr'),(91,'Frederic Guilbault','https://friendica.free-beer.ch/profile/border','http://friendica.free-beer.ch/profile/border','https://friendica.free-beer.ch/photo/custom/300/23.jpg?rev=2012-06-01+02%3A24%3A09','','0001-01-01 00:00:00','','','','','dspr'),(92,'Sun Sunich','https://friendica.free-beer.ch/profile/sunsunich','http://friendica.free-beer.ch/profile/sunsunich','https://friendica.free-beer.ch/photo/custom/300/337.jpg?rev=2013-06-06+19%3A54%3A58','','0001-01-01 00:00:00','','','','','dspr'),(93,'Jaun Santiago','https://friendica.free-beer.ch/profile/juansantiago','http://friendica.free-beer.ch/profile/juansantiago','https://friendica.free-beer.ch/photo/custom/300/94.jpg?rev=2012-08-05+21%3A12%3A40','','0001-01-01 00:00:00','','','','','dspr'),(94,'Axel','https://friendica.free-beer.ch/profile/axel','http://friendica.free-beer.ch/profile/axel','https://friendica.free-beer.ch/photo/custom/300/61.jpg?rev=2014-01-08+17%3A14%3A05','','0001-01-01 00:00:00','','','','','dspr'),(95,'Alexander Jobst','https://friendica.free-beer.ch/profile/alexanderjobst','http://friendica.free-beer.ch/profile/alexanderjobst','https://friendica.free-beer.ch/photo/custom/300/77.jpg?rev=2012-07-11+08%3A19%3A36','','0001-01-01 00:00:00','','','','','dspr'),(96,'Matija Å uklje','https://friendica.free-beer.ch/profile/hook','http://friendica.free-beer.ch/profile/hook','https://friendica.free-beer.ch/photo/custom/300/336.jpg?rev=2013-06-02+20%3A40%3A51','','0001-01-01 00:00:00','','','','','dspr'),(97,'Brando','https://friendica.free-beer.ch/profile/dysfunctional','http://friendica.free-beer.ch/profile/dysfunctional','https://friendica.free-beer.ch/photo/custom/300/89.jpg?rev=2012-07-28+04%3A35%3A53','','0001-01-01 00:00:00','','','','','dspr'),(98,'Max Anton','https://friendica.free-beer.ch/profile/ntimes','http://friendica.free-beer.ch/profile/ntimes','https://friendica.free-beer.ch/photo/custom/300/98.jpg?rev=2012-08-08+21%3A32%3A00','','0001-01-01 00:00:00','','','','','dspr'),(99,'Inyan','https://friendica.free-beer.ch/profile/inyan','http://friendica.free-beer.ch/profile/inyan','https://friendica.free-beer.ch/photo/custom/300/111.jpg?rev=2012-08-18+19%3A01%3A17','','0001-01-01 00:00:00','','','','','dspr'),(100,'亗 Dr. Emporio Efikz äº—','https://friendica.free-beer.ch/profile/dr_emporio_efikz','http://friendica.free-beer.ch/profile/dr_emporio_efikz','https://friendica.free-beer.ch/photo/custom/300/108.jpg?rev=2012-08-17+01%3A48%3A09','','0001-01-01 00:00:00','','','','','dspr'),(101,'w2bh.- free-beer.ch','https://friendica.free-beer.ch/profile/w2bh','http://friendica.free-beer.ch/profile/w2bh','https://friendica.free-beer.ch/photo/custom/300/104.jpg?rev=2012-08-15+10%3A52%3A29','','0001-01-01 00:00:00','','','','','dspr'),(102,'Torsten Schilinsky','https://friendica.free-beer.ch/profile/torsten1968','http://friendica.free-beer.ch/profile/torsten1968','https://friendica.free-beer.ch/photo/custom/300/107.jpg?rev=2012-09-18+11%3A17%3A42','','0001-01-01 00:00:00','','','','','dspr'),(103,'Ecologie Libidinale','https://friendica.free-beer.ch/profile/ecologielibidinale','http://friendica.free-beer.ch/profile/ecologielibidinale','https://friendica.free-beer.ch/photo/custom/300/118.jpg?rev=2012-08-23+18%3A19%3A23','','0001-01-01 00:00:00','','','','','dspr'),(104,'Robert Bonie','https://friendica.free-beer.ch/profile/robrob','http://friendica.free-beer.ch/profile/robrob','https://friendica.free-beer.ch/photo/custom/300/138.jpg?rev=2012-09-07+17%3A57%3A21','','0001-01-01 00:00:00','','','','','dspr'),(105,'Marius Katcá','https://friendica.free-beer.ch/profile/marius_katca','http://friendica.free-beer.ch/profile/marius_katca','https://friendica.free-beer.ch/photo/custom/300/143.jpg?rev=2012-09-10+11%3A02%3A55','','0001-01-01 00:00:00','','','','','dspr'),(106,'Yossefa Mekyton','https://friendica.free-beer.ch/profile/jooxz','http://friendica.free-beer.ch/profile/jooxz','https://friendica.free-beer.ch/photo/custom/300/413.jpg?rev=2013-06-29+18%3A54%3A44','','0001-01-01 00:00:00','','','','','dspr'),(107,'Xurxo Ventos','https://friendica.free-beer.ch/profile/xurxoventos','http://friendica.free-beer.ch/profile/xurxoventos','https://friendica.free-beer.ch/photo/custom/300/412.jpg?rev=2013-06-29+10%3A07%3A23','','0001-01-01 00:00:00','','','','','dspr'),(108,'Fergus Ferrier','https://friendica.free-beer.ch/profile/rufusson','http://friendica.free-beer.ch/profile/rufusson','https://friendica.free-beer.ch/photo/custom/300/146.jpg?rev=2012-09-14+01%3A11%3A23','','0001-01-01 00:00:00','','','','','dspr'),(109,'Arescorpio Nepesh','https://friendica.free-beer.ch/profile/arescorpio','http://friendica.free-beer.ch/profile/arescorpio','https://friendica.free-beer.ch/photo/custom/300/158.jpg?rev=2012-10-05+19%3A05%3A49','','0001-01-01 00:00:00','','','','','dspr'),(110,'Shiroikuma','https://friendica.free-beer.ch/profile/shiroikuma','http://friendica.free-beer.ch/profile/shiroikuma','https://friendica.free-beer.ch/photo/custom/300/334.jpg?rev=2013-06-02+09%3A59%3A35','','0001-01-01 00:00:00','','','','','dspr'),(111,'FreeBeer Klampf','https://friendica.free-beer.ch/profile/klampfattacke','http://friendica.free-beer.ch/profile/klampfattacke','https://friendica.free-beer.ch/photo/custom/300/167.jpg?rev=2012-10-27+02%3A34%3A19','','0001-01-01 00:00:00','','','','','dspr'),(112,'Raphael Vieira','https://friendica.free-beer.ch/profile/barba_negra','http://friendica.free-beer.ch/profile/barba_negra','https://friendica.free-beer.ch/photo/custom/300/772.jpg?rev=2014-05-04+03%3A45%3A51','','0001-01-01 00:00:00','','','','','dspr'),(113,'Marina Soler','https://friendica.free-beer.ch/profile/marisoler','http://friendica.free-beer.ch/profile/marisoler','https://friendica.free-beer.ch/photo/custom/300/514.jpg?rev=2013-09-01+18%3A38%3A55','','0001-01-01 00:00:00','','','','','dspr'),(114,'Als Ob','https://friendica.free-beer.ch/profile/derhuaba','http://friendica.free-beer.ch/profile/derhuaba','https://friendica.free-beer.ch/photo/custom/300/842.jpg?rev=2014-08-06+23%3A24%3A06','','0001-01-01 00:00:00','','','','','dspr'),(115,'Colin Steele','https://friendica.free-beer.ch/profile/emberleaf','http://friendica.free-beer.ch/profile/emberleaf','https://friendica.free-beer.ch/photo/custom/300/245.jpg?rev=2013-02-23+16%3A54%3A57','','0001-01-01 00:00:00','','','','','dspr'),(116,'Max Mustermann','https://friendica.free-beer.ch/profile/jan_sofasurfer','http://friendica.free-beer.ch/profile/jan_sofasurfer','https://friendica.free-beer.ch/photo/custom/300/246.jpg?rev=2013-02-24+13%3A17%3A05','','0001-01-01 00:00:00','','','','','dspr'),(117,'Nicola Sisto Alessandro Vaccarone','https://friendica.free-beer.ch/profile/nk','http://friendica.free-beer.ch/profile/nk','https://friendica.free-beer.ch/photo/custom/300/286.jpg?rev=2014-03-05+18%3A14%3A39','','0001-01-01 00:00:00','','','','','dspr'),(118,'Pascal Daniel Angst','https://friendica.free-beer.ch/profile/pascala','http://friendica.free-beer.ch/profile/pascala','https://friendica.free-beer.ch/photo/custom/300/268.jpg?rev=2013-03-16+14%3A39%3A19','','0001-01-01 00:00:00','','','','','dspr'),(119,'Bodhi SparkleSnapdragon Goforth','https://friendica.free-beer.ch/profile/snapdragon','http://friendica.free-beer.ch/profile/snapdragon','https://friendica.free-beer.ch/photo/custom/300/494.jpg?rev=2013-08-15+14%3A51%3A39','','0001-01-01 00:00:00','','','','','dspr'),(120,'AntiChristos44 BodhiSattva','https://friendica.free-beer.ch/profile/ac44bo','http://friendica.free-beer.ch/profile/ac44bo','https://friendica.free-beer.ch/photo/custom/300/440.jpg?rev=2013-07-15+01%3A55%3A24','','0001-01-01 00:00:00','','','','','dspr'),(121,'Michael Moroni','https://friendica.free-beer.ch/profile/airon90','http://friendica.free-beer.ch/profile/airon90','https://friendica.free-beer.ch/photo/custom/300/547.jpg?rev=2013-09-27+11%3A19%3A56','','0001-01-01 00:00:00','','','','','dspr'),(122,'Martin Neujahr','https://friendica.free-beer.ch/profile/funkymartin','http://friendica.free-beer.ch/profile/funkymartin','https://friendica.free-beer.ch/photo/custom/300/557.jpg?rev=2013-10-04+06%3A33%3A29','','0001-01-01 00:00:00','','','','','dspr'),(123,'Florian Traverse','https://friendica.free-beer.ch/profile/temsa','http://friendica.free-beer.ch/profile/temsa','https://friendica.free-beer.ch/photo/custom/300/548.jpg?rev=2013-09-28+06%3A16%3A05','','0001-01-01 00:00:00','','','','','dspr'),(124,'Picaflor Azul','https://friendica.free-beer.ch/profile/picaflor','http://friendica.free-beer.ch/profile/picaflor','https://friendica.free-beer.ch/photo/custom/300/549.jpg?rev=2013-09-28+15%3A36%3A46','','0001-01-01 00:00:00','','','','','dspr'),(125,'edson duarte','https://friendica.free-beer.ch/profile/vaugs3roty','http://friendica.free-beer.ch/profile/vaugs3roty','https://friendica.free-beer.ch/photo/custom/300/570.jpg?rev=2013-10-13+18%3A01%3A06','','0001-01-01 00:00:00','','','','','dspr'),(126,'Don Viktoranghelo De Cuyo','https://friendica.free-beer.ch/profile/lechju','http://friendica.free-beer.ch/profile/lechju','https://friendica.free-beer.ch/photo/custom/300/583.jpg?rev=2013-11-02+22%3A56%3A06','','0001-01-01 00:00:00','','','','','dspr'),(127,'Liselotte Vinberg','https://friendica.free-beer.ch/profile/musikmamma','http://friendica.free-beer.ch/profile/musikmamma','https://friendica.free-beer.ch/photo/custom/300/589.jpg?rev=2013-11-02+18%3A22%3A16','','0001-01-01 00:00:00','','','','','dspr'),(128,'Arlo James Barnes','https://friendica.free-beer.ch/profile/arlojamesbarnes','http://friendica.free-beer.ch/profile/arlojamesbarnes','https://friendica.free-beer.ch/photo/custom/300/593.jpg?rev=2013-11-04+21%3A56%3A10','','0001-01-01 00:00:00','','','','','dspr'),(129,'Roxana Diaz','https://friendica.free-beer.ch/profile/heindys','http://friendica.free-beer.ch/profile/heindys','https://friendica.free-beer.ch/photo/custom/300/774.jpg?rev=2014-05-10+09%3A51%3A52','','0001-01-01 00:00:00','','','','','dspr'),(130,'Armin Lutz','https://friendica.free-beer.ch/profile/zebra','http://friendica.free-beer.ch/profile/zebra','https://friendica.free-beer.ch/photo/custom/300/612.jpg?rev=2013-11-20+12%3A36%3A03','','0001-01-01 00:00:00','','','','','dspr'),(131,'Philipp Obenauer','https://friendica.free-beer.ch/profile/clandestino','http://friendica.free-beer.ch/profile/clandestino','https://friendica.free-beer.ch/photo/custom/300/621.jpg?rev=2013-12-14+11%3A09%3A01','','0001-01-01 00:00:00','','','','','dspr'),(132,'ѕтєιикαмÏ\81f','https://friendica.free-beer.ch/profile/steinkampf','http://friendica.free-beer.ch/profile/steinkampf','https://friendica.free-beer.ch/photo/custom/300/652.jpg?rev=2014-01-19+13%3A36%3A41','','0001-01-01 00:00:00','','','','','dspr'),(133,'Jerry Briardy','https://friendica.free-beer.ch/profile/bookman37','http://friendica.free-beer.ch/profile/bookman37','https://friendica.free-beer.ch/photo/custom/300/651.jpg?rev=2013-12-31+06%3A49%3A25','','0001-01-01 00:00:00','','','','','dspr'),(134,'D2O','https://friendica.free-beer.ch/profile/d2o','http://friendica.free-beer.ch/profile/d2o','https://friendica.free-beer.ch/photo/custom/300/673.jpg?rev=2014-01-16+14%3A57%3A25','','0001-01-01 00:00:00','','','','','dspr'),(135,'Marc Leunig','https://friendica.free-beer.ch/profile/miefda','http://friendica.free-beer.ch/profile/miefda','https://friendica.free-beer.ch/photo/custom/300/675.jpg?rev=2014-01-16+20%3A51%3A38','','0001-01-01 00:00:00','','','','','dspr'),(136,'Sebas Pesersen','https://friendica.free-beer.ch/profile/sebasped','http://friendica.free-beer.ch/profile/sebasped','https://friendica.free-beer.ch/photo/custom/300/714.jpg?rev=2014-02-16+21%3A33%3A10','','0001-01-01 00:00:00','','','','','dspr'),(137,'Redrick Deckard','https://friendica.free-beer.ch/profile/red','http://friendica.free-beer.ch/profile/red','https://friendica.free-beer.ch/photo/custom/300/724.jpg?rev=2014-03-02+17%3A12%3A30','','0001-01-01 00:00:00','','','','','dspr'),(138,'Rui Bernardo','https://friendica.free-beer.ch/profile/rui_miguel','http://friendica.free-beer.ch/profile/rui_miguel','https://friendica.free-beer.ch/photo/custom/300/729.jpg?rev=2014-03-05+15%3A46%3A11','','0001-01-01 00:00:00','','','','','dspr'),(139,'Manoel Nascimento','https://friendica.free-beer.ch/profile/manoelnascimento','http://friendica.free-beer.ch/profile/manoelnascimento','https://friendica.free-beer.ch/photo/custom/300/734.jpg?rev=2014-03-09+14%3A15%3A23','','0001-01-01 00:00:00','','','','','dspr'),(140,'ilma','https://friendica.free-beer.ch/profile/ilma','http://friendica.free-beer.ch/profile/ilma','https://friendica.free-beer.ch/photo/custom/300/739.jpg?rev=2014-03-14+03%3A41%3A44','','0001-01-01 00:00:00','','','','','dspr'),(141,'David Mccauley','https://friendica.free-beer.ch/profile/opticalrevenge','http://friendica.free-beer.ch/profile/opticalrevenge','https://friendica.free-beer.ch/photo/custom/300/746.jpg?rev=2014-03-22+18%3A30%3A05','','0001-01-01 00:00:00','','','','','dspr'),(142,'Atterratio Aeternus','https://friendica.free-beer.ch/profile/atterratio','http://friendica.free-beer.ch/profile/atterratio','https://friendica.free-beer.ch/photo/custom/300/753.jpg?rev=2014-04-04+01%3A23%3A23','','0001-01-01 00:00:00','','','','','dspr'),(143,'Markus Krüger','https://friendica.free-beer.ch/profile/kreuzmacher','http://friendica.free-beer.ch/profile/kreuzmacher','https://friendica.free-beer.ch/photo/custom/300/800.jpg?rev=2014-06-26+05%3A48%3A58','','0001-01-01 00:00:00','','','','','dspr'),(144,'Master O Disaster','https://friendica.free-beer.ch/profile/masterodisaster','http://friendica.free-beer.ch/profile/masterodisaster','https://friendica.free-beer.ch/photo/custom/300/855.jpg?rev=2014-08-18+20%3A31%3A42','','0001-01-01 00:00:00','','','','','dspr'),(145,'eyal72','https://friendica.free-beer.ch/profile/eyal72','http://friendica.free-beer.ch/profile/eyal72','https://friendica.free-beer.ch/photo/custom/300/872.jpg?rev=2014-09-03+22%3A35%3A36','','0001-01-01 00:00:00','','','','','dspr'),(146,'Ed Wes','https://friendica.free-beer.ch/profile/edwes','http://friendica.free-beer.ch/profile/edwes','https://friendica.free-beer.ch/photo/custom/300/1206.jpg','','0001-01-01 00:00:00','','','','','dspr'),(147,'Romoli Marco','https://friendica.free-beer.ch/profile/redleghorn','http://friendica.free-beer.ch/profile/redleghorn','https://friendica.free-beer.ch/photo/custom/300/1270.jpg?rev=2014-11-26+16%3A57%3A51','','0001-01-01 00:00:00','','','','','dspr'),(148,'Michael Rueetschli','http://social.rueetschli.org/profile/rueetschli','http://social.rueetschli.org/profile/rueetschli','http://social.rueetschli.org/photo/custom/300/1.jpg?rev=2014-03-14+09%3A30%3A42','','0001-01-01 00:00:00','','','','','dspr'),(149,'Land Ei','http://social.rueetschli.org/profile/land_ei','http://social.rueetschli.org/profile/land_ei','http://social.rueetschli.org/photo/custom/300/32.jpg?rev=2014-07-25+17%3A03%3A43','','0001-01-01 00:00:00','','','','','dspr'),(150,'Jim Wiskey','http://social.rueetschli.org/profile/gsxrpilot','http://social.rueetschli.org/profile/gsxrpilot','http://social.rueetschli.org/photo/custom/300/36.jpg?rev=2014-08-21+01%3A47%3A44','','0001-01-01 00:00:00','','','','','dspr'),(151,'Kevin K.','http://social.rueetschli.org/profile/dj-atropine','http://social.rueetschli.org/profile/dj-atropine','http://social.rueetschli.org/photo/custom/300/66.jpg?rev=2014-12-31+13%3A05%3A29','','0001-01-01 00:00:00','','','','','dspr'),(152,'friendica2','http://192.168.22.10/profile/friendica2','http://192.168.22.10/profile/friendica2','http://192.168.22.10/photo/avatar/3.jpg','','2015-02-02 19:00:21','','','','','stat'),(153,'friendica5','http://192.168.22.10/profile/friendica5','http://192.168.22.10/profile/friendica5','http://192.168.22.10/photo/avatar/5.jpg','','2015-02-02 19:00:18','','','','','stat'),(154,'friendica4','http://192.168.22.10/profile/friendica4','http://192.168.22.10/profile/friendica4','http://192.168.22.10/photo/avatar/6.jpg','','2015-02-02 19:00:24','','','','','stat'),(155,'friendica1','http://192.168.22.10/profile/friendica1','http://192.168.22.10/profile/friendica1','http://192.168.22.10/photo/profile/2.jpg','','2015-02-02 12:02:11','','','','','stat'),(156,'friendica3','http://192.168.22.10/profile/friendica3','http://192.168.22.10/profile/friendica3','http://192.168.22.10/photo/1fc6596c195944666e18cbd313795942-4.jpg','','2015-02-02 19:00:12','','','','','dfrn');
 /*!40000 ALTER TABLE `gcontact` ENABLE KEYS */;
 UNLOCK TABLES;
 
@@ -611,19 +611,19 @@ UNLOCK TABLES;
 
 DROP TABLE IF EXISTS `glink`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+/*!40101 SET character_set_client = utf8mb4 */;
 CREATE TABLE `glink` (
   `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
   `cid` int(11) NOT NULL DEFAULT '0',
   `uid` int(11) NOT NULL DEFAULT '0',
   `gcid` int(11) NOT NULL DEFAULT '0',
   `zcid` int(11) NOT NULL DEFAULT '0',
-  `updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+  `updated` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
   PRIMARY KEY (`id`),
   KEY `cid_uid_gcid_zcid` (`cid`,`uid`,`gcid`,`zcid`),
   KEY `gcid` (`gcid`),
   KEY `zcid` (`zcid`)
-) ENGINE=InnoDB AUTO_INCREMENT=189 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=189 DEFAULT CHARSET=utf8mb4;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -642,7 +642,7 @@ UNLOCK TABLES;
 
 DROP TABLE IF EXISTS `group`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+/*!40101 SET character_set_client = utf8mb4 */;
 CREATE TABLE `group` (
   `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
   `uid` int(10) unsigned NOT NULL DEFAULT '0',
@@ -651,7 +651,7 @@ CREATE TABLE `group` (
   `name` varchar(255) NOT NULL DEFAULT '',
   PRIMARY KEY (`id`),
   KEY `uid` (`uid`)
-) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -670,7 +670,7 @@ UNLOCK TABLES;
 
 DROP TABLE IF EXISTS `group_member`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+/*!40101 SET character_set_client = utf8mb4 */;
 CREATE TABLE `group_member` (
   `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
   `uid` int(10) unsigned NOT NULL DEFAULT '0',
@@ -678,7 +678,7 @@ CREATE TABLE `group_member` (
   `contact-id` int(10) unsigned NOT NULL DEFAULT '0',
   PRIMARY KEY (`id`),
   KEY `uid_gid_contactid` (`uid`,`gid`,`contact-id`)
-) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8mb4;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -697,13 +697,13 @@ UNLOCK TABLES;
 
 DROP TABLE IF EXISTS `guid`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+/*!40101 SET character_set_client = utf8mb4 */;
 CREATE TABLE `guid` (
   `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
   `guid` varchar(255) NOT NULL DEFAULT '',
   PRIMARY KEY (`id`),
   KEY `guid` (`guid`)
-) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8mb4;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -722,7 +722,7 @@ UNLOCK TABLES;
 
 DROP TABLE IF EXISTS `hook`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+/*!40101 SET character_set_client = utf8mb4 */;
 CREATE TABLE `hook` (
   `id` int(11) NOT NULL AUTO_INCREMENT,
   `hook` varchar(255) NOT NULL DEFAULT '',
@@ -731,7 +731,7 @@ CREATE TABLE `hook` (
   `priority` int(11) unsigned NOT NULL DEFAULT '0',
   PRIMARY KEY (`id`),
   KEY `hook_file_function` (`hook`(30),`file`(60),`function`(30))
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -749,7 +749,7 @@ UNLOCK TABLES;
 
 DROP TABLE IF EXISTS `intro`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+/*!40101 SET character_set_client = utf8mb4 */;
 CREATE TABLE `intro` (
   `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
   `uid` int(10) unsigned NOT NULL DEFAULT '0',
@@ -759,11 +759,11 @@ CREATE TABLE `intro` (
   `duplex` tinyint(1) NOT NULL DEFAULT '0',
   `note` text NOT NULL,
   `hash` varchar(255) NOT NULL DEFAULT '',
-  `datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+  `datetime` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
   `blocked` tinyint(1) NOT NULL DEFAULT '1',
   `ignore` tinyint(1) NOT NULL DEFAULT '0',
   PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -782,7 +782,7 @@ UNLOCK TABLES;
 
 DROP TABLE IF EXISTS `item`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+/*!40101 SET character_set_client = utf8mb4 */;
 CREATE TABLE `item` (
   `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
   `guid` varchar(255) NOT NULL DEFAULT '',
@@ -796,11 +796,11 @@ CREATE TABLE `item` (
   `parent-uri` varchar(255) NOT NULL DEFAULT '',
   `extid` varchar(255) NOT NULL DEFAULT '',
   `thr-parent` varchar(255) NOT NULL DEFAULT '',
-  `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
-  `edited` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
-  `commented` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
-  `received` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
-  `changed` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+  `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
+  `edited` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
+  `commented` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
+  `received` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
+  `changed` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
   `owner-name` varchar(255) NOT NULL DEFAULT '',
   `owner-link` varchar(255) NOT NULL DEFAULT '',
   `owner-avatar` varchar(255) NOT NULL DEFAULT '',
@@ -876,7 +876,7 @@ CREATE TABLE `item` (
   KEY `uid_eventid` (`uid`,`event-id`),
   KEY `uid_authorlink` (`uid`,`author-link`),
   KEY `uid_ownerlink` (`uid`,`owner-link`)
-) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8mb4;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -895,7 +895,7 @@ UNLOCK TABLES;
 
 DROP TABLE IF EXISTS `item_id`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+/*!40101 SET character_set_client = utf8mb4 */;
 CREATE TABLE `item_id` (
   `id` int(11) NOT NULL AUTO_INCREMENT,
   `iid` int(11) NOT NULL DEFAULT '0',
@@ -907,7 +907,7 @@ CREATE TABLE `item_id` (
   KEY `sid` (`sid`),
   KEY `service` (`service`),
   KEY `iid` (`iid`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -925,14 +925,14 @@ UNLOCK TABLES;
 
 DROP TABLE IF EXISTS `locks`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+/*!40101 SET character_set_client = utf8mb4 */;
 CREATE TABLE `locks` (
   `id` int(11) NOT NULL AUTO_INCREMENT,
   `name` varchar(128) NOT NULL DEFAULT '',
   `locked` tinyint(1) NOT NULL DEFAULT '0',
-  `created` datetime DEFAULT '0000-00-00 00:00:00',
+  `created` datetime DEFAULT '0001-01-01 00:00:00',
   PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -950,7 +950,7 @@ UNLOCK TABLES;
 
 DROP TABLE IF EXISTS `mail`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+/*!40101 SET character_set_client = utf8mb4 */;
 CREATE TABLE `mail` (
   `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
   `uid` int(10) unsigned NOT NULL DEFAULT '0',
@@ -968,7 +968,7 @@ CREATE TABLE `mail` (
   `unknown` tinyint(1) NOT NULL DEFAULT '0',
   `uri` varchar(255) NOT NULL DEFAULT '',
   `parent-uri` varchar(255) NOT NULL DEFAULT '',
-  `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+  `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
   PRIMARY KEY (`id`),
   KEY `uid` (`uid`),
   KEY `guid` (`guid`),
@@ -976,7 +976,7 @@ CREATE TABLE `mail` (
   KEY `reply` (`reply`),
   KEY `uri` (`uri`),
   KEY `parent-uri` (`parent-uri`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -994,7 +994,7 @@ UNLOCK TABLES;
 
 DROP TABLE IF EXISTS `mailacct`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+/*!40101 SET character_set_client = utf8mb4 */;
 CREATE TABLE `mailacct` (
   `id` int(11) NOT NULL AUTO_INCREMENT,
   `uid` int(11) NOT NULL DEFAULT '0',
@@ -1008,9 +1008,9 @@ CREATE TABLE `mailacct` (
   `action` int(11) NOT NULL DEFAULT '0',
   `movetofolder` varchar(255) NOT NULL DEFAULT '',
   `pubmail` tinyint(1) NOT NULL DEFAULT '0',
-  `last_check` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+  `last_check` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
   PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -1028,14 +1028,14 @@ UNLOCK TABLES;
 
 DROP TABLE IF EXISTS `manage`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+/*!40101 SET character_set_client = utf8mb4 */;
 CREATE TABLE `manage` (
   `id` int(11) NOT NULL AUTO_INCREMENT,
   `uid` int(11) NOT NULL DEFAULT '0',
   `mid` int(11) NOT NULL DEFAULT '0',
   PRIMARY KEY (`id`),
   KEY `uid_mid` (`uid`,`mid`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -1053,7 +1053,7 @@ UNLOCK TABLES;
 
 DROP TABLE IF EXISTS `notify`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+/*!40101 SET character_set_client = utf8mb4 */;
 CREATE TABLE `notify` (
   `id` int(11) NOT NULL AUTO_INCREMENT,
   `hash` varchar(64) NOT NULL DEFAULT '',
@@ -1061,7 +1061,7 @@ CREATE TABLE `notify` (
   `name` varchar(255) NOT NULL DEFAULT '',
   `url` varchar(255) NOT NULL DEFAULT '',
   `photo` varchar(255) NOT NULL DEFAULT '',
-  `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+  `date` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
   `msg` mediumtext NOT NULL,
   `uid` int(11) NOT NULL DEFAULT '0',
   `link` varchar(255) NOT NULL DEFAULT '',
@@ -1071,7 +1071,7 @@ CREATE TABLE `notify` (
   `otype` varchar(16) NOT NULL DEFAULT '',
   PRIMARY KEY (`id`),
   KEY `uid` (`uid`)
-) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8mb4;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -1090,7 +1090,7 @@ UNLOCK TABLES;
 
 DROP TABLE IF EXISTS `notify-threads`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+/*!40101 SET character_set_client = utf8mb4 */;
 CREATE TABLE `notify-threads` (
   `id` int(11) NOT NULL AUTO_INCREMENT,
   `notify-id` int(11) NOT NULL DEFAULT '0',
@@ -1100,7 +1100,7 @@ CREATE TABLE `notify-threads` (
   PRIMARY KEY (`id`),
   KEY `master-parent-item` (`master-parent-item`),
   KEY `receiver-uid` (`receiver-uid`)
-) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -1119,7 +1119,7 @@ UNLOCK TABLES;
 
 DROP TABLE IF EXISTS `pconfig`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+/*!40101 SET character_set_client = utf8mb4 */;
 CREATE TABLE `pconfig` (
   `id` int(11) NOT NULL AUTO_INCREMENT,
   `uid` int(11) NOT NULL DEFAULT '0',
@@ -1128,7 +1128,7 @@ CREATE TABLE `pconfig` (
   `v` mediumtext NOT NULL,
   PRIMARY KEY (`id`),
   KEY `uid_cat_k` (`uid`,`cat`(30),`k`(30))
-) ENGINE=InnoDB AUTO_INCREMENT=79 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=79 DEFAULT CHARSET=utf8mb4;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -1147,15 +1147,15 @@ UNLOCK TABLES;
 
 DROP TABLE IF EXISTS `photo`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+/*!40101 SET character_set_client = utf8mb4 */;
 CREATE TABLE `photo` (
   `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
   `uid` int(10) unsigned NOT NULL DEFAULT '0',
   `contact-id` int(10) unsigned NOT NULL DEFAULT '0',
   `guid` varchar(64) NOT NULL DEFAULT '',
   `resource-id` varchar(255) NOT NULL DEFAULT '',
-  `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
-  `edited` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+  `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
+  `edited` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
   `title` varchar(255) NOT NULL DEFAULT '',
   `desc` text NOT NULL,
   `album` varchar(255) NOT NULL DEFAULT '',
@@ -1175,7 +1175,7 @@ CREATE TABLE `photo` (
   KEY `uid` (`uid`),
   KEY `resource-id` (`resource-id`),
   KEY `guid` (`guid`)
-) ENGINE=InnoDB AUTO_INCREMENT=55 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=55 DEFAULT CHARSET=utf8mb4;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -1194,7 +1194,7 @@ UNLOCK TABLES;
 
 DROP TABLE IF EXISTS `poll`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+/*!40101 SET character_set_client = utf8mb4 */;
 CREATE TABLE `poll` (
   `id` int(11) NOT NULL AUTO_INCREMENT,
   `uid` int(11) NOT NULL DEFAULT '0',
@@ -1210,7 +1210,7 @@ CREATE TABLE `poll` (
   `q9` mediumtext NOT NULL,
   PRIMARY KEY (`id`),
   KEY `uid` (`uid`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -1228,7 +1228,7 @@ UNLOCK TABLES;
 
 DROP TABLE IF EXISTS `poll_result`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+/*!40101 SET character_set_client = utf8mb4 */;
 CREATE TABLE `poll_result` (
   `id` int(11) NOT NULL AUTO_INCREMENT,
   `poll_id` int(11) NOT NULL DEFAULT '0',
@@ -1236,7 +1236,7 @@ CREATE TABLE `poll_result` (
   PRIMARY KEY (`id`),
   KEY `poll_id` (`poll_id`),
   KEY `choice` (`choice`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -1254,7 +1254,7 @@ UNLOCK TABLES;
 
 DROP TABLE IF EXISTS `profile`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+/*!40101 SET character_set_client = utf8mb4 */;
 CREATE TABLE `profile` (
   `id` int(11) NOT NULL AUTO_INCREMENT,
   `uid` int(11) NOT NULL DEFAULT '0',
@@ -1263,7 +1263,7 @@ CREATE TABLE `profile` (
   `hide-friends` tinyint(1) NOT NULL DEFAULT '0',
   `name` varchar(255) NOT NULL DEFAULT '',
   `pdesc` varchar(255) NOT NULL DEFAULT '',
-  `dob` varchar(32) NOT NULL DEFAULT '0000-00-00',
+  `dob` varchar(32) NOT NULL DEFAULT '0001-01-01',
   `address` varchar(255) NOT NULL DEFAULT '',
   `locality` varchar(255) NOT NULL DEFAULT '',
   `region` varchar(255) NOT NULL DEFAULT '',
@@ -1273,7 +1273,7 @@ CREATE TABLE `profile` (
   `gender` varchar(32) NOT NULL DEFAULT '',
   `marital` varchar(255) NOT NULL DEFAULT '',
   `with` text NOT NULL,
-  `howlong` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+  `howlong` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
   `sexual` varchar(255) NOT NULL DEFAULT '',
   `politic` varchar(255) NOT NULL DEFAULT '',
   `religion` varchar(255) NOT NULL DEFAULT '',
@@ -1299,7 +1299,7 @@ CREATE TABLE `profile` (
   `net-publish` tinyint(1) NOT NULL DEFAULT '0',
   PRIMARY KEY (`id`),
   KEY `hometown` (`hometown`)
-) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -1308,7 +1308,7 @@ CREATE TABLE `profile` (
 
 LOCK TABLES `profile` WRITE;
 /*!40000 ALTER TABLE `profile` DISABLE KEYS */;
-INSERT INTO `profile` VALUES (1,1,'default',1,0,'admin','','0000-00-00','','','','','','','','','','0000-00-00 00:00:00','','','','','','','','','','','','','','','','','','','','http://192.168.22.10/photo/profile/1.jpg','http://192.168.22.10/photo/avatar/1.jpg',0,0),(2,2,'default',1,0,'friendica1','','0000-00-00','','','','','','','','','','0000-00-00 00:00:00','','','','','','','','','','','','','','','','','','','','http://192.168.22.10/photo/profile/2.jpg','http://192.168.22.10/photo/avatar/2.jpg',0,0),(3,3,'default',1,0,'friendica2','','0000-00-00','','','','','','','','','','0000-00-00 00:00:00','','','','','','','','','','','','','','','','','','','','http://192.168.22.10/photo/profile/3.jpg','http://192.168.22.10/photo/avatar/3.jpg',0,0),(4,4,'default',1,0,'friendica3','','0000-00-00','','','','','','','','','','0000-00-00 00:00:00','','','','','','','','','','','','','','','','','','','','http://192.168.22.10/photo/profile/4.jpg','http://192.168.22.10/photo/avatar/4.jpg',0,0),(5,5,'default',1,0,'friendica5','','0000-00-00','','','','','','','','','','0000-00-00 00:00:00','','','','','','','','','','','','','','','','','','','','http://192.168.22.10/photo/profile/5.jpg','http://192.168.22.10/photo/avatar/5.jpg',0,0),(6,6,'default',1,0,'friendica4','','0000-00-00','','','','','','','','','','0000-00-00 00:00:00','','','','','','','','','','','','','','','','','','','','http://192.168.22.10/photo/profile/6.jpg','http://192.168.22.10/photo/avatar/6.jpg',0,0);
+INSERT INTO `profile` VALUES (1,1,'default',1,0,'admin','','0001-01-01','','','','','','','','','','0001-01-01 00:00:00','','','','','','','','','','','','','','','','','','','','http://192.168.22.10/photo/profile/1.jpg','http://192.168.22.10/photo/avatar/1.jpg',0,0),(2,2,'default',1,0,'friendica1','','0001-01-01','','','','','','','','','','0001-01-01 00:00:00','','','','','','','','','','','','','','','','','','','','http://192.168.22.10/photo/profile/2.jpg','http://192.168.22.10/photo/avatar/2.jpg',0,0),(3,3,'default',1,0,'friendica2','','0001-01-01','','','','','','','','','','0001-01-01 00:00:00','','','','','','','','','','','','','','','','','','','','http://192.168.22.10/photo/profile/3.jpg','http://192.168.22.10/photo/avatar/3.jpg',0,0),(4,4,'default',1,0,'friendica3','','0001-01-01','','','','','','','','','','0001-01-01 00:00:00','','','','','','','','','','','','','','','','','','','','http://192.168.22.10/photo/profile/4.jpg','http://192.168.22.10/photo/avatar/4.jpg',0,0),(5,5,'default',1,0,'friendica5','','0001-01-01','','','','','','','','','','0001-01-01 00:00:00','','','','','','','','','','','','','','','','','','','','http://192.168.22.10/photo/profile/5.jpg','http://192.168.22.10/photo/avatar/5.jpg',0,0),(6,6,'default',1,0,'friendica4','','0001-01-01','','','','','','','','','','0001-01-01 00:00:00','','','','','','','','','','','','','','','','','','','','http://192.168.22.10/photo/profile/6.jpg','http://192.168.22.10/photo/avatar/6.jpg',0,0);
 /*!40000 ALTER TABLE `profile` ENABLE KEYS */;
 UNLOCK TABLES;
 
@@ -1318,7 +1318,7 @@ UNLOCK TABLES;
 
 DROP TABLE IF EXISTS `profile_check`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+/*!40101 SET character_set_client = utf8mb4 */;
 CREATE TABLE `profile_check` (
   `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
   `uid` int(10) unsigned NOT NULL DEFAULT '0',
@@ -1327,7 +1327,7 @@ CREATE TABLE `profile_check` (
   `sec` varchar(255) NOT NULL DEFAULT '',
   `expire` int(11) NOT NULL DEFAULT '0',
   PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -1345,7 +1345,7 @@ UNLOCK TABLES;
 
 DROP TABLE IF EXISTS `push_subscriber`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+/*!40101 SET character_set_client = utf8mb4 */;
 CREATE TABLE `push_subscriber` (
   `id` int(11) NOT NULL AUTO_INCREMENT,
   `uid` int(11) NOT NULL DEFAULT '0',
@@ -1353,10 +1353,10 @@ CREATE TABLE `push_subscriber` (
   `topic` varchar(255) NOT NULL DEFAULT '',
   `nickname` varchar(255) NOT NULL DEFAULT '',
   `push` int(11) NOT NULL DEFAULT '0',
-  `last_update` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+  `last_update` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
   `secret` varchar(255) NOT NULL DEFAULT '',
   PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -1374,13 +1374,13 @@ UNLOCK TABLES;
 
 DROP TABLE IF EXISTS `queue`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+/*!40101 SET character_set_client = utf8mb4 */;
 CREATE TABLE `queue` (
   `id` int(11) NOT NULL AUTO_INCREMENT,
   `cid` int(11) NOT NULL DEFAULT '0',
   `network` varchar(32) NOT NULL DEFAULT '',
-  `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
-  `last` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+  `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
+  `last` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
   `content` mediumtext NOT NULL,
   `batch` tinyint(1) NOT NULL DEFAULT '0',
   PRIMARY KEY (`id`),
@@ -1389,7 +1389,7 @@ CREATE TABLE `queue` (
   KEY `last` (`last`),
   KEY `network` (`network`),
   KEY `batch` (`batch`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -1407,16 +1407,16 @@ UNLOCK TABLES;
 
 DROP TABLE IF EXISTS `register`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+/*!40101 SET character_set_client = utf8mb4 */;
 CREATE TABLE `register` (
   `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
   `hash` varchar(255) NOT NULL DEFAULT '',
-  `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+  `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
   `uid` int(11) unsigned NOT NULL DEFAULT '0',
   `password` varchar(255) NOT NULL DEFAULT '',
   `language` varchar(16) NOT NULL DEFAULT '',
   PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -1434,7 +1434,7 @@ UNLOCK TABLES;
 
 DROP TABLE IF EXISTS `search`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+/*!40101 SET character_set_client = utf8mb4 */;
 CREATE TABLE `search` (
   `id` int(11) NOT NULL AUTO_INCREMENT,
   `uid` int(11) NOT NULL DEFAULT '0',
@@ -1442,7 +1442,7 @@ CREATE TABLE `search` (
   PRIMARY KEY (`id`),
   KEY `uid` (`uid`),
   KEY `term` (`term`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -1460,7 +1460,7 @@ UNLOCK TABLES;
 
 DROP TABLE IF EXISTS `session`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+/*!40101 SET character_set_client = utf8mb4 */;
 CREATE TABLE `session` (
   `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
   `sid` varchar(255) NOT NULL DEFAULT '',
@@ -1469,7 +1469,7 @@ CREATE TABLE `session` (
   PRIMARY KEY (`id`),
   KEY `sid` (`sid`),
   KEY `expire` (`expire`)
-) ENGINE=InnoDB AUTO_INCREMENT=123 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=123 DEFAULT CHARSET=utf8mb4;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -1488,7 +1488,7 @@ UNLOCK TABLES;
 
 DROP TABLE IF EXISTS `sign`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+/*!40101 SET character_set_client = utf8mb4 */;
 CREATE TABLE `sign` (
   `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
   `iid` int(10) unsigned NOT NULL DEFAULT '0',
@@ -1499,7 +1499,7 @@ CREATE TABLE `sign` (
   PRIMARY KEY (`id`),
   KEY `iid` (`iid`),
   KEY `retract_iid` (`retract_iid`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -1517,20 +1517,20 @@ UNLOCK TABLES;
 
 DROP TABLE IF EXISTS `spam`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+/*!40101 SET character_set_client = utf8mb4 */;
 CREATE TABLE `spam` (
   `id` int(11) NOT NULL AUTO_INCREMENT,
   `uid` int(11) NOT NULL DEFAULT '0',
   `spam` int(11) NOT NULL DEFAULT '0',
   `ham` int(11) NOT NULL DEFAULT '0',
   `term` varchar(255) NOT NULL DEFAULT '',
-  `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+  `date` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
   PRIMARY KEY (`id`),
   KEY `uid` (`uid`),
   KEY `spam` (`spam`),
   KEY `ham` (`ham`),
   KEY `term` (`term`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -1548,7 +1548,7 @@ UNLOCK TABLES;
 
 DROP TABLE IF EXISTS `term`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+/*!40101 SET character_set_client = utf8mb4 */;
 CREATE TABLE `term` (
   `tid` int(10) unsigned NOT NULL AUTO_INCREMENT,
   `oid` int(10) unsigned NOT NULL DEFAULT '0',
@@ -1564,7 +1564,7 @@ CREATE TABLE `term` (
   KEY `type_term` (`type`,`term`),
   KEY `uid_otype_type_term_tid` (`uid`,`otype`,`type`,`term`,`tid`),
   KEY `otype_type_term_tid` (`otype`,`type`,`term`,`tid`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -1582,16 +1582,16 @@ UNLOCK TABLES;
 
 DROP TABLE IF EXISTS `thread`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+/*!40101 SET character_set_client = utf8mb4 */;
 CREATE TABLE `thread` (
   `iid` int(10) unsigned NOT NULL DEFAULT '0',
   `uid` int(10) unsigned NOT NULL DEFAULT '0',
   `contact-id` int(11) unsigned NOT NULL DEFAULT '0',
-  `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
-  `edited` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
-  `commented` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
-  `received` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
-  `changed` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+  `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
+  `edited` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
+  `commented` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
+  `received` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
+  `changed` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
   `wall` tinyint(1) NOT NULL DEFAULT '0',
   `private` tinyint(1) NOT NULL DEFAULT '0',
   `pubmail` tinyint(1) NOT NULL DEFAULT '0',
@@ -1617,7 +1617,7 @@ CREATE TABLE `thread` (
   KEY `wall_private_received` (`wall`,`private`,`received`),
   KEY `uid_created` (`uid`,`created`),
   KEY `uid_commented` (`uid`,`commented`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -1636,7 +1636,7 @@ UNLOCK TABLES;
 
 DROP TABLE IF EXISTS `tokens`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+/*!40101 SET character_set_client = utf8mb4 */;
 CREATE TABLE `tokens` (
   `id` varchar(40) NOT NULL,
   `secret` text NOT NULL,
@@ -1645,7 +1645,7 @@ CREATE TABLE `tokens` (
   `scope` varchar(200) NOT NULL DEFAULT '',
   `uid` int(11) NOT NULL DEFAULT '0',
   PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -1663,7 +1663,7 @@ UNLOCK TABLES;
 
 DROP TABLE IF EXISTS `user`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+/*!40101 SET character_set_client = utf8mb4 */;
 CREATE TABLE `user` (
   `uid` int(11) NOT NULL AUTO_INCREMENT,
   `guid` varchar(64) NOT NULL DEFAULT '',
@@ -1674,8 +1674,8 @@ CREATE TABLE `user` (
   `openid` varchar(255) NOT NULL DEFAULT '',
   `timezone` varchar(128) NOT NULL DEFAULT '',
   `language` varchar(32) NOT NULL DEFAULT 'en',
-  `register_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
-  `login_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+  `register_date` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
+  `login_date` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
   `default-location` varchar(255) NOT NULL DEFAULT '',
   `allow_location` tinyint(1) NOT NULL DEFAULT '0',
   `theme` varchar(255) NOT NULL DEFAULT '',
@@ -1698,8 +1698,8 @@ CREATE TABLE `user` (
   `expire` int(11) unsigned NOT NULL DEFAULT '0',
   `account_removed` tinyint(1) NOT NULL DEFAULT '0',
   `account_expired` tinyint(1) NOT NULL DEFAULT '0',
-  `account_expires_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
-  `expire_notification_sent` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+  `account_expires_on` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
+  `expire_notification_sent` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
   `service_class` varchar(32) NOT NULL DEFAULT '',
   `def_gid` int(11) NOT NULL DEFAULT '0',
   `allow_cid` mediumtext NOT NULL,
@@ -1709,7 +1709,7 @@ CREATE TABLE `user` (
   `openidserver` text NOT NULL,
   PRIMARY KEY (`uid`),
   KEY `nickname` (`nickname`)
-) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -1718,7 +1718,7 @@ CREATE TABLE `user` (
 
 LOCK TABLES `user` WRITE;
 /*!40000 ALTER TABLE `user` DISABLE KEYS */;
-INSERT INTO `user` VALUES (1,'a76680835da79303','admin','6a4e012bd9583858a5a6fa15f58bd86a25af266d3a4344f1ec2018b778f29ba83be86eb45e6dc204e11276f4a99eff4e2144fbe15e756c2c88e999649aae7d94','admin','vagrant@friendica.dev','','UTC','en','2015-02-02 11:24:17','2015-02-02 11:26:23','',0,'','-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAoPnn8yXCAdkLCgHLlA7I\nMZZH4XnzS93NgpoaFWpGgdX9hbHjmHpbY+0rD1Q0FsOC9W+R3qsDypkstJ4CqPZ9\nSHDs2QupZ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S8aJAZCnq/KT5Spolsoj\n5FUtU9BHEmDdiyaFizpRbd7BQo2oZRPGoDEhAiEA2Fjcj5mCi0s5Fd6K+kEeRz0i\neuqHQF1DXUr1EENJAqsCIQDIS74g1E5fzeY60z6qpoNCLCoBrLnCrmHuR+GZkCKI\nUQIgF1NtZGYutwoDO6Jk5ZqDwzaKMyp6LqxfiP198qTuiEUCID2lqlgaYCD2k3Tp\njbEiXOXiB+/KBMaZu4SGVTZZeXdxAiEAo0RKX6prYeQ+rXTpuxMczrHkZuD+DTSB\nRRHgZxABlf4=\n-----END PRIVATE KEY-----\n',1,0,0,0,0,0,10,703,0,0,'',10,0,0,0,'0000-00-00 00:00:00','0000-00-00 00:00:00','',1,'','','','',''),(2,'ea011657ce99b36d','friendica1','dbfada587308ebdfd1da52a5acd46c889d8467ea5051e16fe3dd034d153f897d4878f4b99f43282c2b7425c5136482833a79070ed1846fe40804aecd77738435','friendica1','friendica1@friendica.dev','','UTC','en','2015-02-02 12:02:11','2015-02-02 18:48:19','',0,'','-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA8/tIxRBs81u0V6ug4VXh\nG8omo+8YIckQqL5m7jWJqQ3v0fCrjyO8EcrjXhKC6esafSOlVhgxzFOkqNH8rRGF\ntF00suNJXy/0fh6EFFvifX1hQw1ZCXXlHxmmM4yNkGOzbRXPeVuSxyn1OtQNGRnB\nSGeqdCZc4QMtgPbVPwTTWYB4rSbVGYbEa5vpqY0OFnlIwC+BtQrd0xFEO7+FGfmv\n2jRt7ImRiyFazef0NhZL890IFeB5+rF8fifC3o7OP0kzB75+z5LkBfnsveZCriaj\nwHjUmMOa/hTOVHw4qYIq6XY4Q2OgaGTs2xqBz4/gniKjNSBbRyYy45prFOuJTLmO\ns07078nfg3NbWq5JkszwPen+gcvc4Pv38z2DBc2RxjgU0YbY4ZV053GIzd8hutA4\nm+eD1Cl0NZcEd9OYi3dtXWACPsf2C0/FsouAj1juX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dhZGHVIMkV3QysrMdgxV+pTBUmR\nGALfZtI/OrQggWCtH4StNseDuq7dRi+AKdMnFGkVp34wcIxQyugHp3yn5/q0ZPCS\nbBP6bi+oh8AJ+FCtkwkIMP3DtTK0j7XuQh+r3XBGl/2yFg0zjsxnNx8tiWa6iTXD\nfai6tjup3C3Dz3hn0oIkSHtk0cbDEYODQFOm+yxU5LmMQ10lPpKf0//q5gOMwgqe\nEk81drQ0dOIvjtf9wV3gNG+1YsIK0H8DsWolySmnjPZ8BP2CusBGIrdUY9Q/ukDo\nvmU1V1rzKCbc8QX/G36jwrNistIgKWf8\n-----END PRIVATE KEY-----\n','-----BEGIN PUBLIC KEY-----\nMFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBALg2gbuc+ZJFLmGwm4gzIJ5Lu6yci9rm\nRr6KGQS5FZ5ELZzqABX/hAi1psB3UvzywfVgus/3Al65CTCI+CdH5nMCAwEAAQ==\n-----END PUBLIC KEY-----\n','-----BEGIN PRIVATE KEY-----\nMIIBVgIBADANBgkqhkiG9w0BAQEFAASCAUAwggE8AgEAAkEAuDaBu5z5kkUuYbCb\niDMgnku7rJyL2uZGvooZBLkVnkQtnOoAFf+ECLWmwHdS/PLB9WC6z/cCXrkJMIj4\nJ0fmcwIDAQABAkEAiiS+F275rdpZlQL3MCV/UZZjsGdZbhgAd4Vii6ss7hjXCA2l\n/74l9K0YiP3R2gg3pepvONN0ohXbzxflkIKs2QIhANyzg9YTIUKolr0xoOjVkjrf\nAPhdbQWgkHz/GVB2XFAPAiEA1az/r0XRIsTkImmI+FicYmfocH1kCHm+HDqVnngj\nH10CIQClg2dCm5QdBowNlPOEye5hgi6bFI2XY8QYScO1SR6P1wIgOPmnN9IzAMVl\nW3OujSH7mRXB2fTlbokf0yEf8iBwpRUCIQC94ofddRjyue2GlUcnNjLjJ9aNVkz7\njdZ8ohUKgtkFJw==\n-----END PRIVATE KEY-----\n',1,0,0,0,0,0,10,703,0,0,'',10,0,0,0,'0000-00-00 00:00:00','0000-00-00 00:00:00','',2,'','','','',''),(3,'9e44e9d0b279a4a3','friendica2','2d8912fdf66ea84e9904308bc9fe9e1e6e822af2028749ef2f63e25189f30880fb0378912d08ddbfd100a900d3df2d1a40ca1f1f3a0fcf3571de7a8e9dba6beb','friendica2','friendica2@friendica.dev','','UTC','en','2015-02-02 12:02:40','2015-02-02 18:59:46','',0,'','-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA4QpA4flE9v17fh+yrMpR\nU4iKSxLOF/8ROTotrdQsk8HcHkPS7E60QUaRK45gDc9O+7FU1+90V+oo0BqdkJFL\nbFtTogP5fdNSD3ApHz7s03oBX9JenU/8JhxaH1VwEs3lLDlFrywngiYcEDZIeLGZ\nIFK1GWP79+ZwJ9WWoBhzCD4hg4excOWPwwQMjCLYAzI5INEPTw+R3CKD6EsnVLu0\nS+u3zBBsL/A+bgDDfgZoD6igJQlvenK5jStgfbiuVp1mqdXKJ8D+rYz5FQ72Yn3r\nn6AvrXcPQMbLSaUK5m1Ug7beasuhRJ5Z7TVtJ/RLNgA3mOX2A2Vy1i38VYmcTaG5\nom8AYeI/nSvMzJt7FYXOBdxKnSW0UhkXsjBQavefz7sp2Lhcw5U+7eaPi2fIkYio\nVHKU2r8uiJPFfUMAbHA2+rScBjn2lYZH0nfMKrZTzva7y6d19EOsO2aP5e4XNjU8\n0tX/C1iy6LPMCf7xG844iROXi7NPJJoTgx/Sl6+o0oqBl9J5wJDK5U33rUSqYI/p\nsPEfaStqA5CgBAvAsq0N+NQQndJzGfuYaIdfleyUSLIchHhEICE4SN62RHZ6VTlg\nIVCva4xdBrGlkGV/IgE228FwgX4GWELclfUH/KwcGHChlY8dTtVZHbTCuizvPLvl\nXuZQ9ROdQiwkYwGJA/bhM3kCAwEAAQ==\n-----END PUBLIC KEY-----\n','-----BEGIN PRIVATE KEY-----\nMIIJQwIBADANBgkqhkiG9w0BAQEFAASCCS0wggkpAgEAAoICAQD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Jslk=\n-----END PRIVATE KEY-----\n','-----BEGIN PUBLIC KEY-----\nMFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAMr1t2Z+nHjBXTuRT8qj8aGt2mkqAT5W\nI/Nl9my/Vo+z3AqfysE9KKXBKtUy/8tRDe1rru1rlGX7aNu8OaXUzzMCAwEAAQ==\n-----END PUBLIC KEY-----\n','-----BEGIN PRIVATE KEY-----\nMIIBVAIBADANBgkqhkiG9w0BAQEFAASCAT4wggE6AgEAAkEAyvW3Zn6ceMFdO5FP\nyqPxoa3aaSoBPlYj82X2bL9Wj7PcCp/KwT0opcEq1TL/y1EN7Wuu7WuUZfto27w5\npdTPMwIDAQABAkBbbD211JiFKIzntTgdDqZcbuSwdHRk8QZ2sFpFeBb02YEzDD4C\n70N82B4ewogtvat+PYh7Wf8suQ9PoQMJasihAiEA8ao57LgZKM7xX1YrQrwMOreb\nn03bLsO14CwUJZzAaVECIQDW/70AQMj+cSfbdkiNUa3CqBJyLeGhOpbxxg2RMRWP\nQwIgW2AN/t+tQ6zbvzyJpvYLebgq85UwpwIBJv4DsCUQ68ECIApY0G28sG+eXn6v\nWJqEfcpKcGjSUHOD8FO+ZlTAefslAiEAi6bjWnnaFDqwO2amwtlUeylNM6Qxp7lG\nSo91wUVaDd4=\n-----END PRIVATE KEY-----\n',1,0,0,0,0,0,10,703,0,0,'',10,0,0,0,'0000-00-00 00:00:00','0000-00-00 00:00:00','',3,'','','','',''),(4,'8f624e0d807c4b3a','friendica3','a4fe179880e01243799458e9090e87bc40746eac1c7f9c2373678d7cb3b15a547fdef510a3670988f567ceaef2aa5a52e98aaac0bf677d0ddff56cbe845814f2','friendica3','friendica3@friendica.dev','','UTC','en','2015-02-02 12:03:07','2015-02-02 18:57:06','',0,'','-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAliSi9id9Ll1dpzXC/lL6\n2/5FYxdn0XYb5I2JeXBNopwbXOLDsnnzXlV2NN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74TQHFEsu+cfw1N1UNfn/BLg\nWENiGwIDAQABAkBrZJDRgvpoBAiHZgwo1BGhtiOL0BI4DC30QFjuxQmXshIf+RpN\nzDTdQBMNYMUavTtlXthCBAzHYV7equiFEPDxAiEA+H4kcGLEvUMYy1u7aZRuX6Hk\n4Cqa6TvGgis0bw5d5g8CIQDX1lYM8fAEAoPX8Rekp/cdvHV04xvlYfEGOaa2iwov\nNQIgZrsPqX7Lw0r39yqnYlDBCLxPePVkMcRKnwnplXglDbUCICzAD89XSkBKlTNs\nlU5aVO4haOj3PY1tpR95TIuEgHQRAiEAyfKMJJImU9/HKDONz60iLndP98DOf/UP\naA7kFdSlfhc=\n-----END PRIVATE KEY-----\n',1,0,0,0,0,0,10,703,0,0,'',10,0,0,0,'0000-00-00 00:00:00','0000-00-00 00:00:00','',4,'','','','',''),(5,'c23f1ab5f7ca5c73','friendica5','c4020916e31735b16a8e851be06c5a94e7c95d544ad69c05a92b9ebf2992216a2dcb65d4c731405af0e4c098edaf53f49444f01842db3bed2c561ce982639600','friendica5','friendica5@friendica.dev','','UTC','en','2015-02-02 12:04:05','2015-02-02 18:43:16','',0,'','-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAyvuTsaZaTgPDm69uxixR\n8qd0ylkeA/IY3KDsI4vjrLuF7WLmU07lzQXmilQJ+MlipIju+wFXx3a8ksavEYpP\n9ZU9YrpXe7zneHRLTxgMDH9IMbSCIUAkEsozpzF02Ft0+G36tzIET2oTuU6uLtx6\nI5ifmF/qFC+4avAoABQg8qfOPpuaP3AJ6FppqEifUsb0lTWqP4zg7PQXC36oKIJ0\nUDuQniVy8lTxVfkhoi/aHZw0khVXe6tDK7C0ALg5U7jLTDNdJ1R0v5iC41QK4CEt\n5x4x008mdk6xLKGZiou1UuEPv/+WSQU1Q21JFzNVGBASkRu7dUVH6k+59VQr3ONI\n5bdbAZviVY3ezFNtBeWWfDk06BWoZwX67eGG/dVsCPn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J3wm0N+\n-----END PRIVATE KEY-----\n',1,0,0,0,0,0,10,703,0,0,'',10,0,0,0,'0000-00-00 00:00:00','0000-00-00 00:00:00','',5,'','','','',''),(6,'ac116e1d642da69c','friendica4','537485cc08fae106246d8990a7f6d615900611eea6356c8efa75fc6cd6b4221fec27c0a753bac3366eca50426a12fa186277036eaf5ab3fc8a533089cb43f954','friendica4','friendica4@friendica.dev','','UTC','en','2015-02-02 12:04:29','2015-02-02 18:52:53','',0,'','-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA3nCYawg+HTyQgV7a7Osg\nCXeACOitKLhcb2WDTN/lLOMO7n1lSm3Kdv1dbOc0/lkAPeB2XsLF/aDfoUPWWg4Q\n/oRPrXFIi2dK/cIQVvgOhebQheztAYPJyaYYMWVK7bLbPuKVTyzALqkWD8Zjjtit\n4Uvm3kjmcofKr+/Lw+VFaEBMESQDbP5eTDtQeDGGjluWQMj1/D+V/Tcm+SMrAVIv\njyklQEhBJlYGJ+LsfXv4XXbeH73dkIXkQW5JgWQyPCloJ+PxmmjjEDozsdgmFQXq\n6T9HFVHvW2O2lmDoaTrbIGrULWBpslKZJJrV+LgtkzhP4uuKfJPD2DpMJ4+ixtBE\nzM/o+EuYDTz0P3dTvwruq1t8gUYcQOVUzEp1LM0qYDMVY86XneW1W5xghztl5zqy\nGBMBvjVIFvMVL1cVeXze4zpwwKln2cArepToSpN7lmy9EgBd9mZrVLWosZShB9R0\n05kBc2Tfv7FlixwZ1P8rwJn9sEEs9oa6TnRLL+7L8eqapg6vUI1G7e0HWWEjdHsR\nrYVHYW+ogtOYjrQ1Tfh1W2PtNaez5fGYVBDjC+1vy0scJmqrgy00z7MHBT2WTOAL\noHbdedhpa3UZ0FrsCto+vqil8BcF5aBhi2Hi5YdKtbY3EBsaabcSO2joc7rlmee4\nxdKfDRYXCPysFPhZNgIW708CAwEAAQ==\n-----END PUBLIC KEY-----\n','-----BEGIN PRIVATE K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PF/lmCqW+f5Vu6PLDjkAhP\nigTbSRJm04IWeuH+480HXjZRuHMclA4=\n-----END PRIVATE KEY-----\n','-----BEGIN PUBLIC KEY-----\nMFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBALwNfVA38nGCbi/oAewWsIAfRzrAC9np\nPTYGiYfhOxgI3uXkdwMvcrvW98XGugYAHMAJbuHP2aPOnKiZCNKRLeMCAwEAAQ==\n-----END PUBLIC KEY-----\n','-----BEGIN PRIVATE KEY-----\nMIIBVQIBADANBgkqhkiG9w0BAQEFAASCAT8wggE7AgEAAkEAvA19UDfycYJuL+gB\n7BawgB9HOsAL2ek9NgaJh+E7GAje5eR3Ay9yu9b3xca6BgAcwAlu4c/Zo86cqJkI\n0pEt4wIDAQABAkBUfKsEU151aOggVdgnPbpmlabm2kl4ybVahG1dwu9NyEjttz0/\nEFyN2IQzorUefkhow1jpNC8LGJ8t1dyrXZLhAiEA6eYzvYBXdPUoia4yF8ChRRFp\nSFYgmPIj5FR3MEfKHpUCIQDN0k3BfXBtFLawe1VDEs8CvtWOCjJux+15Si07Mj+U\nlwIhAOgQlV88Ogl5v8myglLctWUwnDO/+EGnZQMC5uqJH7ltAiBJ2/QnQTp9Cnfc\nsQWRwkgjNhQwmpwqgPhJFENTAN8sFQIhAIO04kWVXMXGVCGRVlvPOlHzrIBp3d+N\no/Wp+OK69U1n\n-----END PRIVATE KEY-----\n',1,0,0,0,0,0,10,703,0,0,'',10,0,0,0,'0000-00-00 00:00:00','0000-00-00 00:00:00','',6,'','','','','');
+INSERT INTO `user` VALUES (1,'a76680835da79303','admin','6a4e012bd9583858a5a6fa15f58bd86a25af266d3a4344f1ec2018b778f29ba83be86eb45e6dc204e11276f4a99eff4e2144fbe15e756c2c88e999649aae7d94','admin','vagrant@friendica.dev','','UTC','en','2015-02-02 11:24:17','2015-02-02 11:26:23','',0,'','-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAoPnn8y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E2eUfT9Zofl7rYrHdjiV+XZIugo1V3h41NH/LSmYg8iUhJJ\nnjqwGwIDAQABAkAl8HMXEOxrKbBpzYbSyd8/u4yv/o57S8aJAZCnq/KT5Spolsoj\n5FUtU9BHEmDdiyaFizpRbd7BQo2oZRPGoDEhAiEA2Fjcj5mCi0s5Fd6K+kEeRz0i\neuqHQF1DXUr1EENJAqsCIQDIS74g1E5fzeY60z6qpoNCLCoBrLnCrmHuR+GZkCKI\nUQIgF1NtZGYutwoDO6Jk5ZqDwzaKMyp6LqxfiP198qTuiEUCID2lqlgaYCD2k3Tp\njbEiXOXiB+/KBMaZu4SGVTZZeXdxAiEAo0RKX6prYeQ+rXTpuxMczrHkZuD+DTSB\nRRHgZxABlf4=\n-----END PRIVATE KEY-----\n',1,0,0,0,0,0,10,703,0,0,'',10,0,0,0,'0001-01-01 00:00:00','0001-01-01 00:00:00','',1,'','','','',''),(2,'ea011657ce99b36d','friendica1','dbfada587308ebdfd1da52a5acd46c889d8467ea5051e16fe3dd034d153f897d4878f4b99f43282c2b7425c5136482833a79070ed1846fe40804aecd77738435','friendica1','friendica1@friendica.dev','','UTC','en','2015-02-02 12:02:11','2015-02-02 18:48:19','',0,'','-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA8/tIxRBs81u0V6ug4VXh\nG8omo+8YIckQqL5m7jWJqQ3v0fCrjyO8EcrjXhKC6esafSOlVhgxzFOkqNH8rRGF\ntF00suNJXy/0fh6EFFvifX1hQw1ZCXXlHxmmM4yNkGOzbRXPeVuSxyn1OtQNGRnB\nSGeqdCZc4QMtgPbVPwTTWYB4rSbVGYbEa5vpqY0OFnlIwC+BtQrd0xFEO7+FGfmv\n2jRt7ImRiyFazef0NhZL890IFeB5+rF8fifC3o7OP0kzB75+z5LkBfnsveZCriaj\nwHjUmMOa/hTOVHw4qYIq6XY4Q2OgaGTs2xqBz4/gniKjNSBbRyYy45prFOuJTLmO\ns07078nfg3N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NjLjJ9aNVkz7\njdZ8ohUKgtkFJw==\n-----END PRIVATE KEY-----\n',1,0,0,0,0,0,10,703,0,0,'',10,0,0,0,'0001-01-01 00:00:00','0001-01-01 00:00:00','',2,'','','','',''),(3,'9e44e9d0b279a4a3','friendica2','2d8912fdf66ea84e9904308bc9fe9e1e6e822af2028749ef2f63e25189f30880fb0378912d08ddbfd100a900d3df2d1a40ca1f1f3a0fcf3571de7a8e9dba6beb','friendica2','friendica2@friendica.dev','','UTC','en','2015-02-02 12:02:40','2015-02-02 18:59:46','',0,'','-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA4QpA4flE9v17fh+yrMpR\nU4iKSxLOF/8ROTotrdQsk8HcHkPS7E60QUaRK45gDc9O+7FU1+90V+oo0BqdkJFL\nbFtTogP5fdNSD3ApHz7s03oBX9JenU/8JhxaH1VwEs3lLDlFrywngiYcEDZIeLGZ\nIFK1GWP79+ZwJ9WWoBhzCD4hg4excOWPwwQMjCLYAzI5INEPTw+R3CKD6EsnVLu0\nS+u3zBBsL/A+bgDDfgZoD6igJQlvenK5jStgfbiuVp1mqdXKJ8D+rYz5FQ72Yn3r\nn6AvrXcPQMbLSaUK5m1Ug7beasuhRJ5Z7TVtJ/RLNgA3mOX2A2Vy1i38VYmcTaG5\nom8AYeI/nSvMzJt7FYXOBdxKnSW0UhkXsjBQavefz7sp2Lhcw5U+7eaPi2fIkYio\nVHKU2r8uiJPFfUMAbHA2+rScBjn2lYZH0nfMKrZTzva7y6d19EOsO2aP5e4XNjU8\n0tX/C1iy6LPMCf7xG844iROXi7NPJJoTgx/Sl6+o0oqBl9J5wJDK5U33rUSqYI/p\nsPEfaStqA5CgBAvAsq0N+NQQndJzGfuYaIdfleyUSLIchHhEICE4SN62RHZ6VTlg\nIVCva4xdBrGlkGV/IgE228FwgX4GWELclfUH/KwcGHChlY8dTtVZHbTCuizvPLvl\nXuZQ9ROdQiwkYwGJA/bhM3kCAwE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GTGHOTn2k1+QgQzFT46XN64zP1QZO05JDEo7M/Ffzov5bz4FvcGyxZfCXlvmfc+a\n3XJwnl4GIBdvQSoa/8wxMTsWdV8Jslk=\n-----END PRIVATE KEY-----\n','-----BEGIN PUBLIC KEY-----\nMFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAMr1t2Z+nHjBXTuRT8qj8aGt2mkqAT5W\nI/Nl9my/Vo+z3AqfysE9KKXBKtUy/8tRDe1rru1rlGX7aNu8OaXUzzMCAwEAAQ==\n-----END PUBLIC KEY-----\n','-----BEGIN PRIVATE KEY-----\nMIIBVAIBADANBgkqhkiG9w0BAQEFAASCAT4wggE6AgEAAkEAyvW3Zn6ceMFdO5FP\nyqPxoa3aaSoBPlYj82X2bL9Wj7PcCp/KwT0opcEq1TL/y1EN7Wuu7WuUZfto27w5\npdTPMwIDAQABAkBbbD211JiFKIzntTgdDqZcbuSwdHRk8QZ2sFpFeBb02YEzDD4C\n70N82B4ewogtvat+PYh7Wf8suQ9PoQMJasihAiEA8ao57LgZKM7xX1YrQrwMOreb\nn03bLsO14CwUJZzAaVECIQDW/70AQMj+cSfbdkiNUa3CqBJyLeGhOpbxxg2RMRWP\nQwIgW2AN/t+tQ6zbvzyJpvYLebgq85UwpwIBJv4DsCUQ68ECIApY0G28sG+eXn6v\nWJqEfcpKcGjSUHOD8FO+ZlTAefslAiEAi6bjWnnaFDqwO2amwtlUeylNM6Qxp7lG\nSo91wUVaDd4=\n-----END PRIVATE KEY-----\n',1,0,0,0,0,0,10,703,0,0,'',10,0,0,0,'0001-01-01 00:00:00','0001-01-01 00:00:00','',3,'','','','',''),(4,'8f624e0d807c4b3a','friendica3','a4fe179880e01243799458e9090e87bc40746eac1c7f9c2373678d7cb3b15a547fdef510a3670988f567ceaef2aa5a52e98aaac0bf677d0ddff56cbe845814f2','friendica3','friendica3@friendica.dev','','UTC','en','2015-02-02 12:03:07','2015-02-02 18:57:06','',0,'','-----BEGIN PUBLIC KEY-----\nMIICIjANBgk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ADANBgkqhkiG9w0BAQEFAASCAT4wggE6AgEAAkEA0YH9k8nk/FColu8n\n0NDwmufp8jgpo4l44NHQaVQ9HwzQ+G7shP4szpaW74TQHFEsu+cfw1N1UNfn/BLg\nWENiGwIDAQABAkBrZJDRgvpoBAiHZgwo1BGhtiOL0BI4DC30QFjuxQmXshIf+RpN\nzDTdQBMNYMUavTtlXthCBAzHYV7equiFEPDxAiEA+H4kcGLEvUMYy1u7aZRuX6Hk\n4Cqa6TvGgis0bw5d5g8CIQDX1lYM8fAEAoPX8Rekp/cdvHV04xvlYfEGOaa2iwov\nNQIgZrsPqX7Lw0r39yqnYlDBCLxPePVkMcRKnwnplXglDbUCICzAD89XSkBKlTNs\nlU5aVO4haOj3PY1tpR95TIuEgHQRAiEAyfKMJJImU9/HKDONz60iLndP98DOf/UP\naA7kFdSlfhc=\n-----END PRIVATE KEY-----\n',1,0,0,0,0,0,10,703,0,0,'',10,0,0,0,'0001-01-01 00:00:00','0001-01-01 00:00:00','',4,'','','','',''),(5,'c23f1ab5f7ca5c73','friendica5','c4020916e31735b16a8e851be06c5a94e7c95d544ad69c05a92b9ebf2992216a2dcb65d4c731405af0e4c098edaf53f49444f01842db3bed2c561ce982639600','friendica5','friendica5@friendica.dev','','UTC','en','2015-02-02 12:04:05','2015-02-02 18:43:16','',0,'','-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAyvuTsaZaTgPDm69uxixR\n8qd0ylkeA/IY3KDsI4vjrLuF7WLmU07lzQXmilQJ+MlipIju+wFXx3a8ksavEYpP\n9ZU9YrpXe7zneHRLTxgMDH9IMbSCIUAkEsozpzF02Ft0+G36tzIET2oTuU6uLtx6\nI5ifmF/qFC+4avAoABQg8qfOPpuaP3AJ6FppqEifUsb0lTWqP4zg7PQXC36oKIJ0\nUDuQniVy8lTxVfkhoi/aHZw0khVXe6tDK7C0ALg5U7jLTDNdJ1R0v5iC41QK4CEt\n5x4x008mdk6xL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L3UUv10CIQCMtW+jYj4iJDHK\ndHAdxIofkPpp9WXwgaH5f5r1dd56vQIhANL5tpKSMdGSNThQZz8UnDSt7kIc6btK\nORPv/J3wm0N+\n-----END PRIVATE KEY-----\n',1,0,0,0,0,0,10,703,0,0,'',10,0,0,0,'0001-01-01 00:00:00','0001-01-01 00:00:00','',5,'','','','',''),(6,'ac116e1d642da69c','friendica4','537485cc08fae106246d8990a7f6d615900611eea6356c8efa75fc6cd6b4221fec27c0a753bac3366eca50426a12fa186277036eaf5ab3fc8a533089cb43f954','friendica4','friendica4@friendica.dev','','UTC','en','2015-02-02 12:04:29','2015-02-02 18:52:53','',0,'','-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA3nCYawg+HTyQgV7a7Osg\nCXeACOitKLhcb2WDTN/lLOMO7n1lSm3Kdv1dbOc0/lkAPeB2XsLF/aDfoUPWWg4Q\n/oRPrXFIi2dK/cIQVvgOhebQheztAYPJyaYYMWVK7bLbPuKVTyzALqkWD8Zjjtit\n4Uvm3kjmcofKr+/Lw+VFaEBMESQDbP5eTDtQeDGGjluWQMj1/D+V/Tcm+SMrAVIv\njyklQEhBJlYGJ+LsfXv4XXbeH73dkIXkQW5JgWQyPCloJ+PxmmjjEDozsdgmFQXq\n6T9HFVHvW2O2lmDoaTrbIGrULWBpslKZJJrV+LgtkzhP4uuKfJPD2DpMJ4+ixtBE\nzM/o+EuYDTz0P3dTvwruq1t8gUYcQOVUzEp1LM0qYDMVY86XneW1W5xghztl5zqy\nGBMBvjVIFvMVL1cVeXze4zpwwKln2cArepToSpN7lmy9EgBd9mZrVLWosZShB9R0\n05kBc2Tfv7FlixwZ1P8rwJn9sEEs9oa6TnRLL+7L8eqapg6vUI1G7e0HWWEjdHsR\nrYVHYW+ogtOYjrQ1Tfh1W2PtNaez5fGYVBDjC+1vy0scJmqrgy00z7MHBT2WTOAL\noHbdedhpa3UZ0FrsCto+vqil8BcF5aBhi2H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46Prjog2fl+pnX8tVnXewdWTQHv9mys6wtCW6ANDzHvcOj4onX4Tq\nL3GF2z1HFFZ5mx39P+wcirffJecKeyJ5SvDSkWwPesPF/lmCqW+f5Vu6PLDjkAhP\nigTbSRJm04IWeuH+480HXjZRuHMclA4=\n-----END PRIVATE KEY-----\n','-----BEGIN PUBLIC KEY-----\nMFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBALwNfVA38nGCbi/oAewWsIAfRzrAC9np\nPTYGiYfhOxgI3uXkdwMvcrvW98XGugYAHMAJbuHP2aPOnKiZCNKRLeMCAwEAAQ==\n-----END PUBLIC KEY-----\n','-----BEGIN PRIVATE KEY-----\nMIIBVQIBADANBgkqhkiG9w0BAQEFAASCAT8wggE7AgEAAkEAvA19UDfycYJuL+gB\n7BawgB9HOsAL2ek9NgaJh+E7GAje5eR3Ay9yu9b3xca6BgAcwAlu4c/Zo86cqJkI\n0pEt4wIDAQABAkBUfKsEU151aOggVdgnPbpmlabm2kl4ybVahG1dwu9NyEjttz0/\nEFyN2IQzorUefkhow1jpNC8LGJ8t1dyrXZLhAiEA6eYzvYBXdPUoia4yF8ChRRFp\nSFYgmPIj5FR3MEfKHpUCIQDN0k3BfXBtFLawe1VDEs8CvtWOCjJux+15Si07Mj+U\nlwIhAOgQlV88Ogl5v8myglLctWUwnDO/+EGnZQMC5uqJH7ltAiBJ2/QnQTp9Cnfc\nsQWRwkgjNhQwmpwqgPhJFENTAN8sFQIhAIO04kWVXMXGVCGRVlvPOlHzrIBp3d+N\no/Wp+OK69U1n\n-----END PRIVATE KEY-----\n',1,0,0,0,0,0,10,703,0,0,'',10,0,0,0,'0001-01-01 00:00:00','0001-01-01 00:00:00','',6,'','','','','');
 /*!40000 ALTER TABLE `user` ENABLE KEYS */;
 UNLOCK TABLES;
 
@@ -1728,13 +1728,13 @@ UNLOCK TABLES;
 
 DROP TABLE IF EXISTS `userd`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+/*!40101 SET character_set_client = utf8mb4 */;
 CREATE TABLE `userd` (
   `id` int(11) NOT NULL AUTO_INCREMENT,
   `username` varchar(255) NOT NULL,
   PRIMARY KEY (`id`),
   KEY `username` (`username`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
index 5967e79f4e1efec7ca934aea20d801c343833945..4ea97e9aeb760f659a3d45adb9aa6a04ac5d9a78 100644 (file)
@@ -16,7 +16,7 @@ $db_user = 'mysqlusername';
 $db_pass = 'mysqlpassword';
 $db_data = 'mysqldatabasename';
 
-// Set the database connection charset to UTF8.
+// Set the database connection charset to full Unicode (utf8mb4).
 // Changing this value will likely corrupt the special characters.
 // You have been warned.
 $a->config['system']['db_charset'] = "utf8mb4";
@@ -87,7 +87,7 @@ $a->config['system']['no_regfullname'] = true;
 //$a->config['system']['block_local_dir'] = false;
 
 // Location of the global directory
-$a->config['system']['directory'] = 'http://dir.friendi.ca';
+$a->config['system']['directory'] = 'https://dir.friendica.social';
 
 // Allowed protocols in link URLs; HTTP protocols always are accepted
 $a->config['system']['allowed_link_protocols'] = array('ftp', 'ftps', 'mailto', 'cid', 'gopher');
index fc9f660f1377e81aba7ae63f274f9dff1a418302..6f662cdf151bb13ad620dfc1487290e5b9dd08f7 100644 (file)
@@ -212,6 +212,10 @@ function unmark_for_death($contact) {
 function get_contact_details_by_url($url, $uid = -1, $default = array()) {
        static $cache = array();
 
+       if ($url == '') {
+               return $default;
+       }
+
        if ($uid == -1) {
                $uid = local_user();
        }
@@ -254,7 +258,7 @@ function get_contact_details_by_url($url, $uid = -1, $default = array()) {
 
                // "bd" always contains the upcoming birthday of a contact.
                // "birthday" might contain the birthday including the year of birth.
-               if ($profile["birthday"] != "0000-00-00") {
+               if ($profile["birthday"] > '0001-01-01') {
                        $bd_timestamp = strtotime($profile["birthday"]);
                        $month = date("m", $bd_timestamp);
                        $day = date("d", $bd_timestamp);
@@ -271,7 +275,7 @@ function get_contact_details_by_url($url, $uid = -1, $default = array()) {
                                $profile["bd"] = (++$current_year)."-".$month."-".$day;
                        }
                } else {
-                       $profile["bd"] = "0000-00-00";
+                       $profile["bd"] = '0001-01-01';
                }
        } else {
                $profile = $default;
@@ -307,7 +311,7 @@ function get_contact_details_by_url($url, $uid = -1, $default = array()) {
                $profile["location"] = "";
                $profile["about"] = "";
                $profile["gender"] = "";
-               $profile["birthday"] = "0000-00-00";
+               $profile["birthday"] = '0001-01-01';
        }
 
        $cache[$url][$uid] = $profile;
@@ -328,6 +332,10 @@ function get_contact_details_by_url($url, $uid = -1, $default = array()) {
 function get_contact_details_by_addr($addr, $uid = -1) {
        static $cache = array();
 
+       if ($addr == '') {
+               return array();
+       }
+
        if ($uid == -1) {
                $uid = local_user();
        }
@@ -534,6 +542,10 @@ function get_contact($url, $uid = 0, $no_update = false) {
        $data = array();
        $contact_id = 0;
 
+       if ($url == '') {
+               return 0;
+       }
+
        // We first try the nurl (http://server.tld/nick), most common case
        $contacts = q("SELECT `id`, `avatar-date` FROM `contact`
                                        WHERE `nurl` = '%s'
index 9c3eab58ba0fe4d8214a7e39357bc8ebe6590ec9..f57af575afa3091124e3dff1716d6b288c6c62fe 100644 (file)
@@ -4,11 +4,11 @@
  * @file include/acl_selectors.php
  */
 
-require_once("include/contact_selectors.php");
-require_once("include/contact_widgets.php");
-require_once("include/DirSearch.php");
-require_once("include/features.php");
-require_once("mod/proxy.php");
+require_once "include/contact_selectors.php";
+require_once "include/contact_widgets.php";
+require_once "include/DirSearch.php";
+require_once "include/features.php";
+require_once "mod/proxy.php";
 
 
 /**
@@ -35,10 +35,11 @@ function group_select($selname,$selclass,$preselected = false,$size = 4) {
 
        if (dbm::is_result($r)) {
                foreach ($r as $rr) {
-                       if((is_array($preselected)) && in_array($rr['id'], $preselected))
+                       if ((is_array($preselected)) && in_array($rr['id'], $preselected)) {
                                $selected = " selected=\"selected\" ";
-                       else
+                       } else {
                                $selected = '';
+                       }
 
                        $trimmed = mb_substr($rr['name'],0,12);
 
@@ -54,7 +55,8 @@ function group_select($selname,$selclass,$preselected = false,$size = 4) {
        return $o;
 }
 
-
+/// @TODO after an optional parameter, no mandadory parameter can follow
+/// @TODO find proper type-hints
 function contact_selector($selname, $selclass, $preselected = false, $options) {
 
        $a = get_app();
@@ -66,40 +68,42 @@ function contact_selector($selname, $selclass, $preselected = false, $options) {
        $size = 4;
 
        if (is_array($options)) {
-               if (x($options,'size'))
+               if (x($options, 'size'))
                        $size = $options['size'];
 
-               if (x($options,'mutual_friends')) {
+               if (x($options, 'mutual_friends')) {
                        $mutual = true;
                }
-               if (x($options,'single')) {
+               if (x($options, 'single')) {
                        $single = true;
                }
-               if (x($options,'multiple')) {
+               if (x($options, 'multiple')) {
                        $single = false;
                }
-               if (x($options,'exclude')) {
+               if (x($options, 'exclude')) {
                        $exclude = $options['exclude'];
                }
 
-               if (x($options,'networks')) {
-                       switch($options['networks']) {
+               if (x($options, 'networks')) {
+                       switch ($options['networks']) {
                                case 'DFRN_ONLY':
                                        $networks = array(NETWORK_DFRN);
                                        break;
                                case 'PRIVATE':
-                                       if(is_array($a->user) && $a->user['prvnets'])
-                                               $networks = array(NETWORK_DFRN,NETWORK_MAIL,NETWORK_DIASPORA);
-                                       else
-                                               $networks = array(NETWORK_DFRN,NETWORK_FACEBOOK,NETWORK_MAIL, NETWORK_DIASPORA);
+                                       if (is_array($a->user) && $a->user['prvnets']) {
+                                               $networks = array(NETWORK_DFRN, NETWORK_MAIL, NETWORK_DIASPORA);
+                                       } else {
+                                               $networks = array(NETWORK_DFRN, NETWORK_FACEBOOK, NETWORK_MAIL, NETWORK_DIASPORA);
+                                       }
                                        break;
                                case 'TWO_WAY':
-                                       if(is_array($a->user) && $a->user['prvnets'])
-                                               $networks = array(NETWORK_DFRN,NETWORK_MAIL,NETWORK_DIASPORA);
-                                       else
-                                               $networks = array(NETWORK_DFRN,NETWORK_FACEBOOK,NETWORK_MAIL,NETWORK_DIASPORA,NETWORK_OSTATUS);
+                                       if (is_array($a->user) && $a->user['prvnets']) {
+                                               $networks = array(NETWORK_DFRN, NETWORK_MAIL, NETWORK_DIASPORA);
+                                       } else {
+                                               $networks = array(NETWORK_DFRN, NETWORK_FACEBOOK, NETWORK_MAIL, NETWORK_DIASPORA, NETWORK_OSTATUS);
+                                       }
                                        break;
-                               default:
+                               default: /// @TODO Maybe log this call?
                                        break;
                        }
                }
@@ -113,26 +117,30 @@ function contact_selector($selname, $selclass, $preselected = false, $options) {
 
        $sql_extra = '';
 
-       if($x['mutual']) {
+       if (x($x, 'mutual')) {
                $sql_extra .= sprintf(" AND `rel` = %d ", intval(CONTACT_IS_FRIEND));
        }
 
-       if(intval($x['exclude']))
+       if (x($x, 'exclude')) {
                $sql_extra .= sprintf(" AND `id` != %d ", intval($x['exclude']));
+       }
 
-       if(is_array($x['networks']) && count($x['networks'])) {
-               for($y = 0; $y < count($x['networks']) ; $y ++)
+       if (is_array($x['networks']) && count($x['networks'])) {
+               /// @TODO rewrite to foreach()
+               for ($y = 0; $y < count($x['networks']) ; $y ++) {
                        $x['networks'][$y] = "'" . dbesc($x['networks'][$y]) . "'";
-               $str_nets = implode(',',$x['networks']);
+               }
+               $str_nets = implode(',', $x['networks']);
                $sql_extra .= " AND `network` IN ( $str_nets ) ";
        }
 
        $tabindex = (x($options, 'tabindex') ? "tabindex=\"" . $options["tabindex"] . "\"" : "");
 
-       if($x['single'])
+       if ($x['single']) {
                $o .= "<select name=\"$selname\" id=\"$selclass\" class=\"$selclass\" size=\"" . $x['size'] . "\" $tabindex >\r\n";
-       else
+       } else {
                $o .= "<select name=\"{$selname}[]\" id=\"$selclass\" class=\"$selclass\" multiple=\"multiple\" size=\"" . $x['size'] . "$\" $tabindex >\r\n";
+       }
 
        $r = q("SELECT `id`, `name`, `url`, `network` FROM `contact`
                WHERE `uid` = %d AND NOT `self` AND NOT `blocked` AND NOT `pending` AND NOT `archive` AND `notify` != ''
@@ -174,7 +182,7 @@ function contact_selector($selname, $selclass, $preselected = false, $options) {
 
 function contact_select($selname, $selclass, $preselected = false, $size = 4, $privmail = false, $celeb = false, $privatenet = false, $tabindex = null) {
 
-       require_once("include/bbcode.php");
+       require_once "include/bbcode.php";
 
        $a = get_app();
 
@@ -185,29 +193,32 @@ function contact_select($selname, $selclass, $preselected = false, $size = 4, $p
 
        $sql_extra = '';
 
-       if($privmail || $celeb) {
+       if ($privmail || $celeb) {
                $sql_extra .= sprintf(" AND `rel` = %d ", intval(CONTACT_IS_FRIEND));
        }
 
-       if($privmail)
+       if ($privmail) {
                $sql_extra .= sprintf(" AND `network` IN ('%s' , '%s') ",
                                        NETWORK_DFRN, NETWORK_DIASPORA);
-       elseif($privatenet)
+       } elseif ($privatenet) {
                $sql_extra .= sprintf(" AND `network` IN ('%s' , '%s', '%s', '%s') ",
                                        NETWORK_DFRN, NETWORK_MAIL, NETWORK_FACEBOOK, NETWORK_DIASPORA);
+       }
 
        $tabindex = ($tabindex > 0 ? "tabindex=\"$tabindex\"" : "");
 
        if ($privmail AND $preselected) {
                $sql_extra .= " AND `id` IN (".implode(",", $preselected).")";
                $hidepreselected = ' style="display: none;"';
-       } else
+       } else {
                $hidepreselected = "";
+       }
 
-       if($privmail)
+       if ($privmail) {
                $o .= "<select name=\"$selname\" id=\"$selclass\" class=\"$selclass\" size=\"$size\" $tabindex $hidepreselected>\r\n";
-       else
+       } else {
                $o .= "<select name=\"{$selname}[]\" id=\"$selclass\" class=\"$selclass\" multiple=\"multiple\" size=\"$size\" $tabindex >\r\n";
+       }
 
        $r = q("SELECT `id`, `name`, `url`, `network` FROM `contact`
                WHERE `uid` = %d AND NOT `self` AND NOT `blocked` AND NOT `pending` AND NOT `archive` AND `notify` != ''
@@ -229,8 +240,7 @@ function contact_select($selname, $selclass, $preselected = false, $size = 4, $p
                foreach ($r as $rr) {
                        if ((is_array($preselected)) && in_array($rr['id'], $preselected)) {
                                $selected = " selected=\"selected\" ";
-                       }
-                       else {
+                       } else {
                                $selected = '';
                        }
 
@@ -249,8 +259,9 @@ function contact_select($selname, $selclass, $preselected = false, $size = 4, $p
 
        $o .= "</select>\r\n";
 
-       if ($privmail AND $preselected)
+       if ($privmail AND $preselected) {
                $o .= implode(", ", $receiverlist);
+       }
 
        call_hooks($a->module . '_post_' . $selname, $o);
 
@@ -259,7 +270,7 @@ function contact_select($selname, $selclass, $preselected = false, $size = 4, $p
 
 
 function fixacl(&$item) {
-       $item = intval(str_replace(array('<','>'),array('',''),$item));
+       $item = intval(str_replace(array('<', '>'), array('', ''), $item));
 }
 
 function prune_deadguys($arr) {
@@ -268,7 +279,7 @@ function prune_deadguys($arr) {
                return $arr;
        }
 
-       $str = dbesc(implode(',',$arr));
+       $str = dbesc(implode(',', $arr));
 
        $r = q("SELECT `id` FROM `contact` WHERE `id` IN ( " . $str . ") AND `blocked` = 0 AND `pending` = 0 AND `archive` = 0 ");
 
@@ -287,7 +298,7 @@ function prune_deadguys($arr) {
 function get_acl_permissions($user = null) {
        $allow_cid = $allow_gid = $deny_cid = $deny_gid = false;
 
-       if(is_array($user)) {
+       if (is_array($user)) {
                $allow_cid = ((strlen($user['allow_cid']))
                        ? explode('><', $user['allow_cid']) : array() );
                $allow_gid = ((strlen($user['allow_gid']))
@@ -318,34 +329,36 @@ function populate_acl($user = null, $show_jotnets = false) {
        $perms = get_acl_permissions($user);
 
        $jotnets = '';
-       if($show_jotnets) {
+       if ($show_jotnets) {
                $mail_disabled = ((function_exists('imap_open') && (! get_config('system','imap_disabled'))) ? 0 : 1);
 
                $mail_enabled = false;
                $pubmail_enabled = false;
 
-               if(! $mail_disabled) {
+               if (! $mail_disabled) {
                        $r = q("SELECT `pubmail` FROM `mailacct` WHERE `uid` = %d AND `server` != '' LIMIT 1",
                                intval(local_user())
                        );
                        if (dbm::is_result($r)) {
                                $mail_enabled = true;
-                               if(intval($r[0]['pubmail']))
+                               if (intval($r[0]['pubmail'])) {
                                        $pubmail_enabled = true;
+                               }
                        }
                }
 
                if (!$user['hidewall']) {
-                       if($mail_enabled) {
+                       if ($mail_enabled) {
                                $selected = (($pubmail_enabled) ? ' checked="checked" ' : '');
                                $jotnets .= '<div class="profile-jot-net"><input type="checkbox" name="pubmail_enable"' . $selected . ' value="1" /> ' . t("Post to Email") . '</div>';
                        }
 
                        call_hooks('jot_networks', $jotnets);
-               } else
+               } else {
                        $jotnets .= sprintf(t('Connectors disabled, since "%s" is enabled.'),
                                            t('Hide your profile details from unknown viewers?'));
                }
+       }
 
        $tpl = get_markup_template("acl_selector.tpl");
        $o = replace_macros($tpl, array(
@@ -363,7 +376,7 @@ function populate_acl($user = null, $show_jotnets = false) {
                '$aclModalTitle' => t('Permissions'),
                '$aclModalDismiss' => t('Close'),
                '$features' => array(
-               "aclautomention"=>(feature_enabled($user['uid'],"aclautomention")?"true":"false")
+               'aclautomention' => (feature_enabled($user['uid'], "aclautomention") ? "true" : "false")
                ),
        ));
 
@@ -379,24 +392,26 @@ function construct_acl_data(App $a, $user) {
 
        $user_defaults = get_acl_permissions($user);
 
-       if($acl_data['groups']) {
-               foreach($acl_data['groups'] as $key=>$group) {
+       if ($acl_data['groups']) {
+               foreach ($acl_data['groups'] as $key => $group) {
                        // Add a "selected" flag to groups that are posted to by default
-                       if($user_defaults['allow_gid'] &&
-                          in_array($group['id'], $user_defaults['allow_gid']) && !in_array($group['id'], $user_defaults['deny_gid']) )
+                       if ($user_defaults['allow_gid'] &&
+                                       in_array($group['id'], $user_defaults['allow_gid']) && !in_array($group['id'], $user_defaults['deny_gid']) ) {
                                $acl_data['groups'][$key]['selected'] = 1;
-                       else
+                       } else {
                                $acl_data['groups'][$key]['selected'] = 0;
+                       }
                }
        }
-       if($acl_data['contacts']) {
-               foreach($acl_data['contacts'] as $key=>$contact) {
+       if ($acl_data['contacts']) {
+               foreach ($acl_data['contacts'] as $key => $contact) {
                        // Add a "selected" flag to groups that are posted to by default
-                       if($user_defaults['allow_cid'] &&
-                          in_array($contact['id'], $user_defaults['allow_cid']) && !in_array($contact['id'], $user_defaults['deny_cid']) )
+                       if ($user_defaults['allow_cid'] &&
+                                       in_array($contact['id'], $user_defaults['allow_cid']) && !in_array($contact['id'], $user_defaults['deny_cid']) ) {
                                $acl_data['contacts'][$key]['selected'] = 1;
-                       else
+                       } else {
                                $acl_data['contacts'][$key]['selected'] = 0;
+                       }
                }
        }
 
@@ -419,23 +434,25 @@ function acl_lookup(App $a, $out_type = 'json') {
 
        // For use with jquery.textcomplete for private mail completion
 
-       if(x($_REQUEST,'query') && strlen($_REQUEST['query'])) {
-               if(! $type)
+       if (x($_REQUEST, 'query') && strlen($_REQUEST['query'])) {
+               if (! $type) {
                        $type = 'm';
+               }
                $search = $_REQUEST['query'];
        }
 
        logger("Searching for ".$search." - type ".$type, LOGGER_DEBUG);
 
-       if ($search!=""){
+       if ($search != "") {
                $sql_extra = "AND `name` LIKE '%%".dbesc($search)."%%'";
                $sql_extra2 = "AND (`attag` LIKE '%%".dbesc($search)."%%' OR `name` LIKE '%%".dbesc($search)."%%' OR `nick` LIKE '%%".dbesc($search)."%%')";
        } else {
+               /// @TODO Avoid these needless else blocks by putting variable-initialization atop of if()
                $sql_extra = $sql_extra2 = "";
        }
 
        // count groups and contacts
-       if ($type=='' || $type=='g'){
+       if ($type == '' || $type == 'g') {
                $r = q("SELECT COUNT(*) AS g FROM `group` WHERE `deleted` = 0 AND `uid` = %d $sql_extra",
                        intval(local_user())
                );
@@ -446,8 +463,8 @@ function acl_lookup(App $a, $out_type = 'json') {
 
        $sql_extra2 .= " ".unavailable_networks();
 
-       // autocomplete for editor mentions
-       if ($type=='' || $type=='c'){
+       if ($type == '' || $type == 'c') {
+               // autocomplete for editor mentions
                $r = q("SELECT COUNT(*) AS c FROM `contact`
                                WHERE `uid` = %d AND NOT `self`
                                AND NOT `blocked` AND NOT `pending` AND NOT `archive`
@@ -493,7 +510,7 @@ function acl_lookup(App $a, $out_type = 'json') {
        $groups = array();
        $contacts = array();
 
-       if ($type=='' || $type=='g'){
+       if ($type == '' || $type == 'g') {
 
                /// @todo We should cache this query.
                // This can be done when we can delete cache entries via wildcard
@@ -502,7 +519,7 @@ function acl_lookup(App $a, $out_type = 'json') {
                                INNER JOIN `group_member` ON `group_member`.`gid`=`group`.`id` AND `group_member`.`uid` = `group`.`uid`
                                WHERE NOT `group`.`deleted` AND `group`.`uid` = %d
                                        $sql_extra
-                               GROUP BY `group`.`name`
+                               GROUP BY `group`.`name`, `group`.`id`
                                ORDER BY `group`.`name`
                                LIMIT %d,%d",
                        intval(local_user()),
@@ -510,7 +527,7 @@ function acl_lookup(App $a, $out_type = 'json') {
                        intval($count)
                );
 
-               foreach($r as $g){
+               foreach ($r as $g) {
 //             logger('acl: group: ' . $g['name'] . ' members: ' . $g['uids']);
                        $groups[] = array(
                                "type"  => "g",
@@ -524,7 +541,7 @@ function acl_lookup(App $a, $out_type = 'json') {
                }
        }
 
-       if ($type==''){
+       if ($type == '') {
 
                $r = q("SELECT `id`, `name`, `nick`, `micro`, `network`, `url`, `attag`, `forum`, `prv` FROM `contact`
                        WHERE `uid` = %d AND NOT `self` AND NOT `blocked` AND NOT `pending` AND NOT `archive` AND `notify` != ''
@@ -534,9 +551,7 @@ function acl_lookup(App $a, $out_type = 'json') {
                        intval(local_user()),
                        dbesc(NETWORK_OSTATUS), dbesc(NETWORK_STATUSNET)
                );
-       }
-       elseif ($type=='c'){
-
+       } elseif ($type == 'c') {
                $r = q("SELECT `id`, `name`, `nick`, `micro`, `network`, `url`, `attag`, `forum`, `prv` FROM `contact`
                        WHERE `uid` = %d AND NOT `self` AND NOT `blocked` AND NOT `pending` AND NOT `archive` AND `notify` != ''
                        AND NOT (`network` IN ('%s'))
@@ -546,7 +561,7 @@ function acl_lookup(App $a, $out_type = 'json') {
                        dbesc(NETWORK_STATUSNET)
                );
        }
-       elseif($type == 'm') {
+       elseif ($type == 'm') {
                $r = q("SELECT `id`, `name`, `nick`, `micro`, `network`, `url`, `attag` FROM `contact`
                        WHERE `uid` = %d AND NOT `self` AND NOT `blocked` AND NOT `pending` AND NOT `archive`
                        AND `network` IN ('%s','%s','%s')
@@ -593,7 +608,7 @@ function acl_lookup(App $a, $out_type = 'json') {
 
 
        if (dbm::is_result($r)) {
-               foreach ($r as $g){
+               foreach ($r as $g) {
                        $contacts[] = array(
                                'type'    => 'c',
                                'photo'   => proxy_url($g['micro'], false, PROXY_SIZE_MICRO),
@@ -602,7 +617,7 @@ function acl_lookup(App $a, $out_type = 'json') {
                                'network' => $g['network'],
                                'link'    => $g['url'],
                                'nick'    => htmlentities(($g['attag']) ? $g['attag'] : $g['nick']),
-                               'forum'   => ((x($g['forum']) || x($g['prv'])) ? 1 : 0),
+                               'forum'   => ((x($g, 'forum') || x($g, 'prv')) ? 1 : 0),
                        );
                }
        }
@@ -625,7 +640,7 @@ function acl_lookup(App $a, $out_type = 'json') {
                                FROM `item` WHERE `parent` = %d
                                        AND (`author-name` LIKE '%%%s%%' OR `author-link` LIKE '%%%s%%')
                                        AND `author-link` NOT IN ('%s')
-                               GROUP BY `author-link`
+                               GROUP BY `author-link`, `author-avatar`, `author-name`
                                ORDER BY `author-name` ASC
                                ",
                                intval($conv_id),
@@ -669,7 +684,7 @@ function acl_lookup(App $a, $out_type = 'json') {
 
        call_hooks('acl_lookup_end', $results);
 
-       if($out_type === 'html') {
+       if ($out_type === 'html') {
                $o = array(
                        'tot'      => $results['tot'],
                        'start'    => $results['start'],
index 9fc853340af520d22f9a56b945906a7bd54e9fd2..97c09c20a907acf8dc41c2e052bd8bc239f936e3 100644 (file)
@@ -8,39 +8,36 @@
 
 use \Friendica\Core\Config;
 
-       require_once('include/HTTPExceptions.php');
-
-       require_once('include/bbcode.php');
-       require_once('include/datetime.php');
-       require_once('include/conversation.php');
-       require_once('include/oauth.php');
-       require_once('include/html2plain.php');
-       require_once('mod/share.php');
-       require_once('include/Photo.php');
-       require_once('mod/item.php');
-       require_once('include/security.php');
-       require_once('include/contact_selectors.php');
-       require_once('include/html2bbcode.php');
-       require_once('mod/wall_upload.php');
-       require_once('mod/proxy.php');
-       require_once('include/message.php');
-       require_once('include/group.php');
-       require_once('include/like.php');
-       require_once('include/NotificationsManager.php');
-       require_once('include/plaintext.php');
-       require_once('include/xml.php');
-
-
-       define('API_METHOD_ANY','*');
-       define('API_METHOD_GET','GET');
-       define('API_METHOD_POST','POST,PUT');
-       define('API_METHOD_DELETE','POST,DELETE');
-
-
-
-       $API = Array();
-       $called_api = Null;
-
+require_once 'include/HTTPExceptions.php';
+require_once 'include/bbcode.php';
+require_once 'include/datetime.php';
+require_once 'include/conversation.php';
+require_once 'include/oauth.php';
+require_once 'include/html2plain.php';
+require_once 'mod/share.php';
+require_once 'include/Photo.php';
+require_once 'mod/item.php';
+require_once 'include/security.php';
+require_once 'include/contact_selectors.php';
+require_once 'include/html2bbcode.php';
+require_once 'mod/wall_upload.php';
+require_once 'mod/proxy.php';
+require_once 'include/message.php';
+require_once 'include/group.php';
+require_once 'include/like.php';
+require_once 'include/NotificationsManager.php';
+require_once 'include/plaintext.php';
+require_once 'include/xml.php';
+
+define('API_METHOD_ANY', '*');
+define('API_METHOD_GET', 'GET');
+define('API_METHOD_POST', 'POST,PUT');
+define('API_METHOD_DELETE', 'POST,DELETE');
+
+$API = array();
+$called_api = null;
+
+/// @TODO Fix intending
        /**
         * @brief Auth API user
         *
@@ -49,8 +46,9 @@ use \Friendica\Core\Config;
         * into a page, and visitors will post something without noticing it).
         */
        function api_user() {
-               if ($_SESSION['allow_api'])
+               if (x($_SESSION, 'allow_api')) {
                        return local_user();
+               }
 
                return false;
        }
@@ -67,16 +65,18 @@ use \Friendica\Core\Config;
         *              Client source name, default to "api" if unset/unknown
         */
        function api_source() {
-               if (requestdata('source'))
-                       return (requestdata('source'));
+               if (requestdata('source')) {
+                       return requestdata('source');
+               }
 
                // Support for known clients that doesn't send a source name
-               if (strstr($_SERVER['HTTP_USER_AGENT'], "Twidere"))
-                       return ("Twidere");
+               if (strpos($_SERVER['HTTP_USER_AGENT'], "Twidere") !== false) {
+                       return "Twidere";
+               }
 
                logger("Unrecognized user-agent ".$_SERVER['HTTP_USER_AGENT'], LOGGER_DEBUG);
 
-               return ("api");
+               return "api";
        }
 
        /**
@@ -85,8 +85,8 @@ use \Friendica\Core\Config;
         * @param string $str Source date, as UTC
         * @return string Date in UTC formatted as "D M d H:i:s +0000 Y"
         */
-       function api_date($str){
-               //Wed May 23 06:01:13 +0000 2007
+       function api_date($str) {
+               // Wed May 23 06:01:13 +0000 2007
                return datetime_convert('UTC', 'UTC', $str, "D M d H:i:s +0000 Y" );
        }
 
@@ -98,25 +98,27 @@ use \Friendica\Core\Config;
         * @param string $path API URL path, relative to App::get_baseurl()
         * @param string $func Function name to call on path request
         * @param bool $auth API need logged user
-        * @param string $method
-        *      HTTP method reqiured to call this endpoint.
-        *      One of API_METHOD_ANY, API_METHOD_GET, API_METHOD_POST.
-        *  Default to API_METHOD_ANY
+        * @param string $method HTTP method reqiured to call this endpoint.
+        *
+        * One of API_METHOD_ANY, API_METHOD_GET, API_METHOD_POST.
+        * Default to API_METHOD_ANY
         */
-       function api_register_func($path, $func, $auth=false, $method=API_METHOD_ANY){
+       function api_register_func($path, $func, $auth = false, $method = API_METHOD_ANY) {
                global $API;
+
                $API[$path] = array(
-                       'func'=>$func,
-                       'auth'=>$auth,
-                       'method'=> $method
+                       'func'   => $func,
+                       'auth'   => $auth,
+                       'method' => $method,
                );
 
                // Workaround for hotot
                $path = str_replace("api/", "api/1.1/", $path);
+
                $API[$path] = array(
-                       'func'=>$func,
-                       'auth'=>$auth,
-                       'method'=> $method
+                       'func'   => $func,
+                       'auth'   => $auth,
+                       'method' => $method,
                );
        }
 
@@ -136,34 +138,34 @@ use \Friendica\Core\Config;
         * @hook 'logged_in'
         *              array $user     logged user record
         */
-       function api_login(App $a){
+       function api_login(App $a) {
                // login with oauth
-               try{
+               try {
                        $oauth = new FKOAuth1();
                        list($consumer,$token) = $oauth->verify_request(OAuthRequest::from_request());
-                       if (!is_null($token)){
+                       if (!is_null($token)) {
                                $oauth->loginUser($token->uid);
                                call_hooks('logged_in', $a->user);
                                return;
                        }
-                       echo __file__.__line__.__function__."<pre>"; var_dump($consumer, $token); die();
-               }catch(Exception $e){
+                       echo __FILE__.__LINE__.__FUNCTION__ . "<pre>";
+                       var_dump($consumer, $token);
+                       die();
+               } catch (Exception $e) {
                        logger($e);
                }
 
-
-
                // workaround for HTTP-auth in CGI mode
-               if(x($_SERVER,'REDIRECT_REMOTE_USER')) {
-                       $userpass = base64_decode(substr($_SERVER["REDIRECT_REMOTE_USER"],6)) ;
-                       if(strlen($userpass)) {
+               if (x($_SERVER, 'REDIRECT_REMOTE_USER')) {
+                       $userpass = base64_decode(substr($_SERVER["REDIRECT_REMOTE_USER"], 6)) ;
+                       if (strlen($userpass)) {
                                list($name, $password) = explode(':', $userpass);
                                $_SERVER['PHP_AUTH_USER'] = $name;
                                $_SERVER['PHP_AUTH_PW'] = $password;
                        }
                }
 
-               if (!isset($_SERVER['PHP_AUTH_USER'])) {
+               if (!x($_SERVER, 'PHP_AUTH_USER')) {
                        logger('API_login: ' . print_r($_SERVER,true), LOGGER_DEBUG);
                        header('WWW-Authenticate: Basic realm="Friendica"');
                        throw new UnauthorizedException("This API requires login");
@@ -171,55 +173,51 @@ use \Friendica\Core\Config;
 
                $user = $_SERVER['PHP_AUTH_USER'];
                $password = $_SERVER['PHP_AUTH_PW'];
-               $encrypted = hash('whirlpool',trim($password));
+               $encrypted = hash('whirlpool', trim($password));
 
                // allow "user@server" login (but ignore 'server' part)
-               $at=strstr($user, "@", true);
-               if ( $at ) $user=$at;
+               $at = strstr($user, "@", true);
+               if ($at) {
+                       $user = $at;
+               }
 
-               /**
-                *  next code from mod/auth.php. needs better solution
-                */
+               // next code from mod/auth.php. needs better solution
                $record = null;
 
                $addon_auth = array(
                        'username' => trim($user),
                        'password' => trim($password),
                        'authenticated' => 0,
-                       'user_record' => null
+                       'user_record' => null,
                );
 
-               /**
-                *
+               /*
                 * A plugin indicates successful login by setting 'authenticated' to non-zero value and returning a user record
                 * Plugins should never set 'authenticated' except to indicate success - as hooks may be chained
                 * and later plugins should not interfere with an earlier one that succeeded.
-                *
                 */
-
                call_hooks('authenticate', $addon_auth);
 
-               if(($addon_auth['authenticated']) && (count($addon_auth['user_record']))) {
+               if (($addon_auth['authenticated']) && (count($addon_auth['user_record']))) {
                        $record = $addon_auth['user_record'];
-               }
-               else {
+               } else {
                        // process normal login request
-
                        $r = q("SELECT * FROM `user` WHERE (`email` = '%s' OR `nickname` = '%s')
                                AND `password` = '%s' AND NOT `blocked` AND NOT `account_expired` AND NOT `account_removed` AND `verified` LIMIT 1",
                                dbesc(trim($user)),
                                dbesc(trim($user)),
                                dbesc($encrypted)
                        );
-                       if (dbm::is_result($r))
+                       if (dbm::is_result($r)) {
                                $record = $r[0];
+                       }
                }
 
-               if((! $record) || (! count($record))) {
-                       logger('API_login failure: ' . print_r($_SERVER,true), LOGGER_DEBUG);
+               if ((! $record) || (! count($record))) {
+                       logger('API_login failure: ' . print_r($_SERVER, true), LOGGER_DEBUG);
                        header('WWW-Authenticate: Basic realm="Friendica"');
-                       #header('HTTP/1.0 401 Unauthorized');
-                       #die('This api requires login');
+                       //header('HTTP/1.0 401 Unauthorized');
+                       //die('This api requires login');
                        throw new UnauthorizedException("This API requires login");
                }
 
@@ -242,8 +240,10 @@ use \Friendica\Core\Config;
         * @return bool
         */
         function api_check_method($method) {
-               if ($method=="*") return True;
-               return strpos($method, $_SERVER['REQUEST_METHOD']) !== false;
+               if ($method == "*") {
+                       return true;
+               }
+               return (strpos($method, $_SERVER['REQUEST_METHOD']) !== false);
         }
 
        /**
@@ -254,39 +254,51 @@ use \Friendica\Core\Config;
         * @param App $a
         * @return string API call result
         */
-       function api_call(App $a){
+       function api_call(App $a) {
                global $API, $called_api;
 
-               $type="json";
-               if (strpos($a->query_string, ".xml")>0) $type="xml";
-               if (strpos($a->query_string, ".json")>0) $type="json";
-               if (strpos($a->query_string, ".rss")>0) $type="rss";
-               if (strpos($a->query_string, ".atom")>0) $type="atom";
+               $type = "json";
+               if (strpos($a->query_string, ".xml") > 0) {
+                       $type = "xml";
+               }
+               if (strpos($a->query_string, ".json") > 0) {
+                       $type = "json";
+               }
+               if (strpos($a->query_string, ".rss") > 0) {
+                       $type = "rss";
+               }
+               if (strpos($a->query_string, ".atom") > 0) {
+                       $type = "atom";
+               }
+
                try {
-                       foreach ($API as $p=>$info){
-                               if (strpos($a->query_string, $p)===0){
-                                       if (!api_check_method($info['method'])){
+                       foreach ($API as $p => $info) {
+                               if (strpos($a->query_string, $p) === 0) {
+                                       if (!api_check_method($info['method'])) {
                                                throw new MethodNotAllowedException();
                                        }
 
-                                       $called_api= explode("/",$p);
+                                       $called_api = explode("/", $p);
                                        //unset($_SERVER['PHP_AUTH_USER']);
-                                       if ($info['auth']===true && api_user()===false) {
-                                                       api_login($a);
+
+                                       /// @TODO should be "true ==[=] $info['auth']", if you miss only one = character, you assign a variable (only with ==). Let's make all this even.
+                                       if ($info['auth'] === true && api_user() === false) {
+                                               api_login($a);
                                        }
 
                                        logger('API call for ' . $a->user['username'] . ': ' . $a->query_string);
-                                       logger('API parameters: ' . print_r($_REQUEST,true));
+                                       logger('API parameters: ' . print_r($_REQUEST, true));
 
                                        $stamp =  microtime(true);
                                        $r = call_user_func($info['func'], $type);
-                                       $duration = (float)(microtime(true)-$stamp);
-                                       logger("API call duration: ".round($duration, 2)."\t".$a->query_string, LOGGER_DEBUG);
+                                       $duration = (float) (microtime(true) - $stamp);
+                                       logger("API call duration: " . round($duration, 2) . "\t" . $a->query_string, LOGGER_DEBUG);
 
                                        if (get_config("system", "profiler")) {
                                                $duration = microtime(true)-$a->performance["start"];
 
-                                               logger(parse_url($a->query_string, PHP_URL_PATH).": ".sprintf("Database: %s/%s, Network: %s, I/O: %s, Other: %s, Total: %s",
+                                               /// @TODO round() really everywhere?
+                                               logger(parse_url($a->query_string, PHP_URL_PATH) . ": " . sprintf("Database: %s/%s, Network: %s, I/O: %s, Other: %s, Total: %s",
                                                        round($a->performance["database"] - $a->performance["database_write"], 3),
                                                        round($a->performance["database_write"], 3),
                                                        round($a->performance["network"], 2),
@@ -294,65 +306,71 @@ use \Friendica\Core\Config;
                                                        round($duration - ($a->performance["database"] + $a->performance["network"]
                                                                + $a->performance["file"]), 2),
                                                        round($duration, 2)),
-                                                       LOGGER_DEBUG);
+                                                       LOGGER_DEBUG
+                                               );
 
                                                if (get_config("rendertime", "callstack")) {
                                                        $o = "Database Read:\n";
                                                        foreach ($a->callstack["database"] AS $func => $time) {
                                                                $time = round($time, 3);
-                                                               if ($time > 0)
-                                                                       $o .= $func.": ".$time."\n";
+                                                               if ($time > 0) {
+                                                                       $o .= $func . ": " . $time . "\n";
+                                                               }
                                                        }
                                                        $o .= "\nDatabase Write:\n";
                                                        foreach ($a->callstack["database_write"] AS $func => $time) {
                                                                $time = round($time, 3);
-                                                               if ($time > 0)
-                                                                       $o .= $func.": ".$time."\n";
+                                                               if ($time > 0) {
+                                                                       $o .= $func . ": " . $time . "\n";
+                                                               }
                                                        }
 
                                                        $o .= "\nNetwork:\n";
                                                        foreach ($a->callstack["network"] AS $func => $time) {
                                                                $time = round($time, 3);
-                                                               if ($time > 0)
-                                                                       $o .= $func.": ".$time."\n";
+                                                               if ($time > 0) {
+                                                                       $o .= $func . ": " . $time . "\n";
+                                                               }
                                                        }
                                                        logger($o, LOGGER_DEBUG);
                                                }
                                        }
 
-
-                                       if ($r===false) {
-                                               // api function returned false withour throw an
-                                               // exception. This should not happend, throw a 500
+                                       if (false === $r) {
+                                               /*
+                                                * api function returned false withour throw an
+                                                * exception. This should not happend, throw a 500
+                                                */
                                                throw new InternalServerErrorException();
                                        }
 
-                                       switch($type){
+                                       switch ($type) {
                                                case "xml":
                                                        header ("Content-Type: text/xml");
                                                        return $r;
                                                        break;
                                                case "json":
                                                        header ("Content-Type: application/json");
-                                                       foreach($r as $rr)
+                                                       foreach ($r as $rr)
                                                                $json = json_encode($rr);
-                                                               if ($_GET['callback'])
-                                                                       $json = $_GET['callback']."(".$json.")";
+                                                               if (x($_GET, 'callback')) {
+                                                                       $json = $_GET['callback'] . "(" . $json . ")";
+                                                               }
                                                                return $json;
                                                        break;
                                                case "rss":
                                                        header ("Content-Type: application/rss+xml");
-                                                       return '<?xml version="1.0" encoding="UTF-8"?>'."\n".$r;
+                                                       return '<?xml version="1.0" encoding="UTF-8"?>' . "\n" . $r;
                                                        break;
                                                case "atom":
                                                        header ("Content-Type: application/atom+xml");
-                                                       return '<?xml version="1.0" encoding="UTF-8"?>'."\n".$r;
+                                                       return '<?xml version="1.0" encoding="UTF-8"?>' . "\n" . $r;
                                                        break;
-
                                        }
                                }
                        }
-                       logger('API call not implemented: '.$a->query_string);
+
+                       logger('API call not implemented: ' . $a->query_string);
                        throw new NotImplementedException();
                } catch (HTTPException $e) {
                        header("HTTP/1.1 {$e->httpcode} {$e->httpdesc}");
@@ -371,16 +389,16 @@ use \Friendica\Core\Config;
 
                $a = get_app();
 
-               $error = ($e->getMessage()!==""?$e->getMessage():$e->httpdesc);
-               TODO:  https://dev.twitter.com/overview/api/response-codes
+               $error = ($e->getMessage() !== "" ? $e->getMessage() : $e->httpdesc);
+               /// @TODO:  https://dev.twitter.com/overview/api/response-codes
 
                $error = array("error" => $error,
-                               "code" => $e->httpcode." ".$e->httpdesc,
+                               "code" => $e->httpcode . " " . $e->httpdesc,
                                "request" => $a->query_string);
 
                $ret = api_format_data('status', $type, array('status' => $error));
 
-               switch($type){
+               switch ($type) {
                        case "xml":
                                header ("Content-Type: text/xml");
                                return $ret;
@@ -407,18 +425,22 @@ use \Friendica\Core\Config;
         * @param array $arr Array to be passed to template
         * @param array $user_info
         * @return array
+        * @todo find proper type-hints
         */
-       function api_rss_extra(App $a, $arr, $user_info){
-               if (is_null($user_info)) $user_info = api_get_user($a);
+       function api_rss_extra(App $a, $arr, $user_info) {
+               if (is_null($user_info)) {
+                       $user_info = api_get_user($a);
+               }
+
                $arr['$user'] = $user_info;
                $arr['$rss'] = array(
                        'alternate'    => $user_info['url'],
-                       'self'         => App::get_baseurl(). "/". $a->query_string,
+                       'self'         => App::get_baseurl() . "/" . $a->query_string,
                        'base'         => App::get_baseurl(),
                        'updated'      => api_date(null),
-                       'atom_updated' => datetime_convert('UTC','UTC','now',ATOM_TIME),
+                       'atom_updated' => datetime_convert('UTC', 'UTC', 'now', ATOM_TIME),
                        'language'     => $user_info['language'],
-                       'logo'         => App::get_baseurl()."/images/friendica-32.png",
+                       'logo'         => App::get_baseurl() . "/images/friendica-32.png",
                );
 
                return $arr;
@@ -432,13 +454,11 @@ use \Friendica\Core\Config;
         * @return bool|string
         *              Contact url or False if contact id is unknown
         */
-       function api_unique_id_to_url($id){
+       function api_unique_id_to_url($id) {
                $r = q("SELECT `url` FROM `contact` WHERE `uid` = 0 AND `id` = %d LIMIT 1",
                        intval($id));
-               if ($r)
-                       return ($r[0]["url"]);
-               else
-                       return false;
+
+               return (dbm::is_result($r) && $r[0]["url"]);
        }
 
        /**
@@ -448,8 +468,9 @@ use \Friendica\Core\Config;
         * @param int|string $contact_id Contact ID or URL
         * @param string $type Return type (for errors)
         */
-       function api_get_user(App $a, $contact_id = Null, $type = "json"){
+       function api_get_user(App $a, $contact_id = null, $type = "json") {
                global $called_api;
+
                $user = null;
                $extra_query = "";
                $url = "";
@@ -458,68 +479,83 @@ use \Friendica\Core\Config;
                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) AND (intval($contact_id) == 0)) {
                        $user = dbesc(normalise_link($contact_id));
                        $url = $user;
                        $extra_query = "AND `contact`.`nurl` = '%s' ";
-                       if (api_user()!==false)  $extra_query .= "AND `contact`.`uid`=".intval(api_user());
+                       if (api_user() !== false) {
+                               $extra_query .= "AND `contact`.`uid`=" . intval(api_user());
+                       }
                }
 
                // Searching for contact id with uid = 0
-               if(!is_null($contact_id) AND (intval($contact_id) != 0)){
+               if (!is_null($contact_id) AND (intval($contact_id) != 0)) {
                        $user = dbesc(api_unique_id_to_url($contact_id));
 
-                       if ($user == "")
+                       if ($user == "") {
                                throw new BadRequestException("User not found.");
+                       }
 
                        $url = $user;
                        $extra_query = "AND `contact`.`nurl` = '%s' ";
-                       if (api_user()!==false)  $extra_query .= "AND `contact`.`uid`=".intval(api_user());
+                       if (api_user() !== false) {
+                               $extra_query .= "AND `contact`.`uid`=" . intval(api_user());
+                       }
                }
 
-               if(is_null($user) && x($_GET, 'user_id')) {
+               if (is_null($user) && x($_GET, 'user_id')) {
                        $user = dbesc(api_unique_id_to_url($_GET['user_id']));
 
-                       if ($user == "")
+                       if ($user == "") {
                                throw new BadRequestException("User not found.");
+                       }
 
                        $url = $user;
                        $extra_query = "AND `contact`.`nurl` = '%s' ";
-                       if (api_user()!==false)  $extra_query .= "AND `contact`.`uid`=".intval(api_user());
+                       if (api_user() !== false) {
+                               $extra_query .= "AND `contact`.`uid`=" . intval(api_user());
+                       }
                }
-               if(is_null($user) && x($_GET, 'screen_name')) {
+               if (is_null($user) && x($_GET, 'screen_name')) {
                        $user = dbesc($_GET['screen_name']);
                        $nick = $user;
                        $extra_query = "AND `contact`.`nick` = '%s' ";
-                       if (api_user()!==false)  $extra_query .= "AND `contact`.`uid`=".intval(api_user());
+                       if (api_user() !== false) {
+                               $extra_query .= "AND `contact`.`uid`=".intval(api_user());
+                       }
                }
 
-               if (is_null($user) AND ($a->argc > (count($called_api)-1)) AND (count($called_api) > 0)){
+               if (is_null($user) AND ($a->argc > (count($called_api) - 1)) AND (count($called_api) > 0)) {
                        $argid = count($called_api);
-                       list($user, $null) = explode(".",$a->argv[$argid]);
-                       if(is_numeric($user)){
+                       list($user, $null) = explode(".", $a->argv[$argid]);
+                       if (is_numeric($user)) {
                                $user = dbesc(api_unique_id_to_url($user));
 
-                               if ($user == "")
+                               if ($user == "") {
                                        return false;
+                               }
 
                                $url = $user;
                                $extra_query = "AND `contact`.`nurl` = '%s' ";
-                               if (api_user()!==false)  $extra_query .= "AND `contact`.`uid`=".intval(api_user());
+                               if (api_user() !== false) {
+                                       $extra_query .= "AND `contact`.`uid`=" . intval(api_user());
+                               }
                        } else {
                                $user = dbesc($user);
                                $nick = $user;
                                $extra_query = "AND `contact`.`nick` = '%s' ";
-                               if (api_user()!==false)  $extra_query .= "AND `contact`.`uid`=".intval(api_user());
+                               if (api_user() !== false) {
+                                       $extra_query .= "AND `contact`.`uid`=" . intval(api_user());
+                               }
                        }
                }
 
                logger("api_get_user: user ".$user, LOGGER_DEBUG);
 
                if (!$user) {
-                       if (api_user()===false) {
+                       if (api_user() === false) {
                                api_login($a);
-                               return False;
+                               return false;
                        } else {
                                $user = $_SESSION['uid'];
                                $extra_query = "AND `contact`.`uid` = %d AND `contact`.`self` ";
@@ -528,8 +564,9 @@ use \Friendica\Core\Config;
                }
 
                logger('api_user: ' . $extra_query . ', user: ' . $user);
+
                // user info
-               $uinfo = q("SELECT *, `contact`.`id` as `cid` FROM `contact`
+               $uinfo = q("SELECT *, `contact`.`id` AS `cid` FROM `contact`
                                WHERE 1
                                $extra_query",
                                $user
@@ -539,18 +576,20 @@ use \Friendica\Core\Config;
                api_best_nickname($uinfo);
 
                // if the contact wasn't found, fetch it from the contacts with uid = 0
-               if (count($uinfo)==0) {
+               if (!dbm::is_result($uinfo)) {
                        $r = array();
 
-                       if ($url != "")
+                       if ($url != "") {
                                $r = q("SELECT * FROM `contact` WHERE `uid` = 0 AND `nurl` = '%s' LIMIT 1", dbesc(normalise_link($url)));
+                       }
 
-                       if ($r) {
+                       if (dbm::is_result($r)) {
                                $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'] == "") OR ($r[0]['name'] == $r[0]['nick'])) {
                                        $r[0]['nick'] = api_get_nick($r[0]["url"]);
+                               }
 
                                $ret = array(
                                        'id' => $r[0]["id"],
@@ -594,18 +633,20 @@ use \Friendica\Core\Config;
                        }
                }
 
-               if($uinfo[0]['self']) {
+               if ($uinfo[0]['self']) {
 
-                       if ($uinfo[0]['network'] == "")
+                       if ($uinfo[0]['network'] == "") {
                                $uinfo[0]['network'] = NETWORK_DFRN;
+                       }
 
-                       $usr = q("select * from user where uid = %d limit 1",
+                       $usr = q("SELECT * FROM `user` WHERE `uid` = %d LIMIT 1",
                                intval(api_user())
                        );
-                       $profile = q("select * from profile where uid = %d and `is-default` = 1 limit 1",
+                       $profile = q("SELECT * FROM `profile` WHERE `uid` = %d AND `is-default` = 1 LIMIT 1",
                                intval(api_user())
                        );
 
+                       /// @TODO old-lost code? (twice)
                        // Counting is deactivated by now, due to performance issues
                        // count public wall messages
                        //$r = q("SELECT COUNT(*) as `count` FROM `item` WHERE `uid` = %d AND `wall`",
@@ -622,6 +663,8 @@ use \Friendica\Core\Config;
                        //$countitms = $r[0]['count'];
                        $countitms = 0;
                }
+
+               /// @TODO old-lost code? (twice)
 /*
                // Counting is deactivated by now, due to performance issues
                // count friends
@@ -649,7 +692,7 @@ use \Friendica\Core\Config;
                $starred = $r[0]['count'];
 
 
-               if(! $uinfo[0]['self']) {
+               if (! $uinfo[0]['self']) {
                        $countfriends = 0;
                        $countfollowers = 0;
                        $starred = 0;
@@ -668,7 +711,7 @@ use \Friendica\Core\Config;
 
                $pcontact_id  = get_contact($uinfo[0]['url'], 0, true);
 
-               $ret = Array(
+               $ret = array(
                        'id' => intval($pcontact_id),
                        'id_str' => (string) intval($pcontact_id),
                        'name' => (($uinfo[0]['name']) ? $uinfo[0]['name'] : $uinfo[0]['nick']),
@@ -697,6 +740,7 @@ use \Friendica\Core\Config;
                        'follow_request_sent' => false,
                        'statusnet_blocking' => false,
                        'notifications' => false,
+                       /// @TODO old way?
                        //'statusnet_profile_url' => App::get_baseurl()."/contacts/".$uinfo[0]['cid'],
                        'statusnet_profile_url' => $uinfo[0]['url'],
                        'uid' => intval($uinfo[0]['uid']),
@@ -726,7 +770,11 @@ use \Friendica\Core\Config;
                                                ($item["deny_gid"] != "") OR
                                                $item["private"]);
 
-               $owner_user = api_get_user($a, $item["owner-link"]);
+               if ($item['thr-parent'] == $item['uri']) {
+                       $owner_user = api_get_user($a, $item["owner-link"]);
+               } else {
+                       $owner_user = $status_user;
+               }
 
                return (array($status_user, $owner_user));
        }
@@ -745,11 +793,13 @@ use \Friendica\Core\Config;
 
                foreach ($array as $k => $v) {
                        if (is_array($v)) {
-                               if ($callback($v, $k))
+                               if ($callback($v, $k)) {
                                        $new_array[$k] = api_walk_recursive($v, $callback);
+                               }
                        } else {
-                               if ($callback($v, $k))
+                               if ($callback($v, $k)) {
                                        $new_array[$k] = $v;
+                               }
                        }
                }
                $array = $new_array;
@@ -766,13 +816,16 @@ use \Friendica\Core\Config;
         * @return boolean Should the array item be deleted?
         */
        function api_reformat_xml(&$item, &$key) {
-               if (is_bool($item))
+               if (is_bool($item)) {
                        $item = ($item ? "true" : "false");
+               }
 
-               if (substr($key, 0, 10) == "statusnet_")
+               if (substr($key, 0, 10) == "statusnet_") {
                        $key = "statusnet:".substr($key, 10);
-               elseif (substr($key, 0, 10) == "friendica_")
+               } elseif (substr($key, 0, 10) == "friendica_") {
                        $key = "friendica:".substr($key, 10);
+               }
+               /// @TODO old-lost code?
                //else
                //      $key = "default:".$key;
 
@@ -798,18 +851,21 @@ use \Friendica\Core\Config;
                                        "georss" => "http://www.georss.org/georss");
 
                /// @todo Auto detection of needed namespaces
-               if (in_array($root_element, array("ok", "hash", "config", "version", "ids", "notes", "photos")))
+               if (in_array($root_element, array("ok", "hash", "config", "version", "ids", "notes", "photos"))) {
                        $namespaces = array();
+               }
 
-               if (is_array($data2))
+               if (is_array($data2)) {
                        api_walk_recursive($data2, "api_reformat_xml");
+               }
 
                if ($key == "0") {
                        $data4 = array();
                        $i = 1;
 
-                       foreach ($data2 AS $item)
+                       foreach ($data2 AS $item) {
                                $data4[$i++.":".$childname] = $item;
+                       }
 
                        $data2 = $data4;
                }
@@ -829,11 +885,11 @@ use \Friendica\Core\Config;
         *
         * @return (string|object) XML data or JSON data
         */
-       function api_format_data($root_element, $type, $data){
+       function api_format_data($root_element, $type, $data) {
 
                $a = get_app();
 
-               switch($type){
+               switch ($type) {
                        case "atom":
                        case "rss":
                        case "xml":
@@ -856,11 +912,13 @@ use \Friendica\Core\Config;
         * returns a 401 status code and an error message if not.
         * http://developer.twitter.com/doc/get/account/verify_credentials
         */
-       function api_account_verify_credentials($type){
+       function api_account_verify_credentials($type) {
 
                $a = get_app();
 
-               if (api_user()===false) throw new ForbiddenException();
+               if (api_user() === false) {
+                       throw new ForbiddenException();
+               }
 
                unset($_REQUEST["user_id"]);
                unset($_GET["user_id"]);
@@ -868,7 +926,7 @@ use \Friendica\Core\Config;
                unset($_REQUEST["screen_name"]);
                unset($_GET["screen_name"]);
 
-               $skip_status = (x($_REQUEST,'skip_status')?$_REQUEST['skip_status']:false);
+               $skip_status = (x($_REQUEST, 'skip_status')?$_REQUEST['skip_status'] : false);
 
                $user_info = api_get_user($a);
 
@@ -878,10 +936,11 @@ use \Friendica\Core\Config;
                // - Adding last status
                if (!$skip_status) {
                        $user_info["status"] = api_status_show("raw");
-                       if (!count($user_info["status"]))
+                       if (!count($user_info["status"])) {
                                unset($user_info["status"]);
-                       else
+                       } else {
                                unset($user_info["status"]["user"]);
+                       }
                }
 
                // "uid" and "self" are only needed for some internal stuff, so remove it from here
@@ -891,17 +950,18 @@ use \Friendica\Core\Config;
                return api_format_data("user", $type, array('user' => $user_info));
 
        }
-       api_register_func('api/account/verify_credentials','api_account_verify_credentials', true);
 
+       /// @TODO move to top of file or somwhere better
+       api_register_func('api/account/verify_credentials','api_account_verify_credentials', true);
 
        /**
         * get data from $_POST or $_GET
         */
-       function requestdata($k){
-               if (isset($_POST[$k])){
+       function requestdata($k) {
+               if (x($_POST, $k)) {
                        return $_POST[$k];
                }
-               if (isset($_GET[$k])){
+               if (x($_GET, $k)) {
                        return $_GET[$k];
                }
                return null;
@@ -912,7 +972,7 @@ use \Friendica\Core\Config;
 
                $a = get_app();
 
-               if (api_user()===false) {
+               if (api_user() === false) {
                        logger('api_statuses_update: no user');
                        throw new ForbiddenException();
                }
@@ -922,9 +982,10 @@ use \Friendica\Core\Config;
                $_REQUEST['profile_uid'] = api_user();
                $_REQUEST['api_source'] = true;
                $txt = requestdata('status');
+               /// @TODO old-lost code?
                //$txt = urldecode(requestdata('status'));
 
-               if((strpos($txt,'<') !== false) || (strpos($txt,'>') !== false)) {
+               if ((strpos($txt,'<') !== false) || (strpos($txt,'>') !== false)) {
 
                        $txt = html2bb_video($txt);
                        $config = HTMLPurifier_Config::createDefault();
@@ -936,25 +997,26 @@ use \Friendica\Core\Config;
 
                $a->argv[1]=$user_info['screen_name']; //should be set to username?
 
-               $_REQUEST['hush']='yeah'; //tell wall_upload function to return img info instead of echo
+               // tell wall_upload function to return img info instead of echo
+               $_REQUEST['hush'] = 'yeah';
                $bebop = wall_upload_post($a);
 
-               //now that we have the img url in bbcode we can add it to the status and insert the wall item.
-               $_REQUEST['body']=$txt."\n\n".$bebop;
+               // now that we have the img url in bbcode we can add it to the status and insert the wall item.
+               $_REQUEST['body'] = $txt . "\n\n" . $bebop;
                item_post($a);
 
                // this should output the last post (the one we just posted).
                return api_status_show($type);
        }
-       api_register_func('api/statuses/mediap','api_statuses_mediap', true, API_METHOD_POST);
-/*Waitman Gobble Mod*/
 
+       /// @TODO move this to top of file or somewhere better!
+       api_register_func('api/statuses/mediap','api_statuses_mediap', true, API_METHOD_POST);
 
        function api_statuses_update($type) {
 
                $a = get_app();
 
-               if (api_user()===false) {
+               if (api_user() === false) {
                        logger('api_statuses_update: no user');
                        throw new ForbiddenException();
                }
@@ -965,9 +1027,9 @@ use \Friendica\Core\Config;
 
                // logger('api_post: ' . print_r($_POST,true));
 
-               if(requestdata('htmlstatus')) {
+               if (requestdata('htmlstatus')) {
                        $txt = requestdata('htmlstatus');
-                       if((strpos($txt,'<') !== false) || (strpos($txt,'>') !== false)) {
+                       if ((strpos($txt, '<') !== false) || (strpos($txt, '>') !== false)) {
                                $txt = html2bb_video($txt);
 
                                $config = HTMLPurifier_Config::createDefault();
@@ -979,29 +1041,33 @@ use \Friendica\Core\Config;
                                $_REQUEST['body'] = html2bbcode($txt);
                        }
 
-               } else
+               } else {
                        $_REQUEST['body'] = requestdata('status');
+               }
 
                $_REQUEST['title'] = requestdata('title');
 
                $parent = requestdata('in_reply_to_status_id');
 
                // Twidere sends "-1" if it is no reply ...
-               if ($parent == -1)
+               if ($parent == -1) {
                        $parent = "";
+               }
 
-               if(ctype_digit($parent))
+               if (ctype_digit($parent)) {
                        $_REQUEST['parent'] = $parent;
-               else
+               } else {
                        $_REQUEST['parent_uri'] = $parent;
+               }
 
-               if(requestdata('lat') && requestdata('long'))
-                       $_REQUEST['coord'] = sprintf("%s %s",requestdata('lat'),requestdata('long'));
+               if (requestdata('lat') && requestdata('long')) {
+                       $_REQUEST['coord'] = sprintf("%s %s", requestdata('lat'), requestdata('long'));
+               }
                $_REQUEST['profile_uid'] = api_user();
 
-               if($parent)
+               if ($parent) {
                        $_REQUEST['type'] = 'net-comment';
-               else {
+               else {
                        // Check for throttling (maximum posts per day, week and month)
                        $throttle_day = get_config('system','throttle_limit_day');
                        if ($throttle_day > 0) {
@@ -1011,14 +1077,15 @@ use \Friendica\Core\Config;
                                        AND `created` > '%s' AND `id` = `parent`",
                                        intval(api_user()), dbesc($datefrom));
 
-                               if ($r)
+                               if (dbm::is_result($r)) {
                                        $posts_day = $r[0]["posts_day"];
-                               else
+                               } else {
                                        $posts_day = 0;
+                               }
 
                                if ($posts_day > $throttle_day) {
                                        logger('Daily posting limit reached for user '.api_user(), LOGGER_DEBUG);
-                                       #die(api_error($type, sprintf(t("Daily posting limit of %d posts reached. The post was rejected."), $throttle_day)));
+                                       // die(api_error($type, sprintf(t("Daily posting limit of %d posts reached. The post was rejected."), $throttle_day)));
                                        throw new TooManyRequestsException(sprintf(t("Daily posting limit of %d posts reached. The post was rejected."), $throttle_day));
                                }
                        }
@@ -1031,16 +1098,16 @@ use \Friendica\Core\Config;
                                        AND `created` > '%s' AND `id` = `parent`",
                                        intval(api_user()), dbesc($datefrom));
 
-                               if ($r)
+                               if (dbm::is_result($r)) {
                                        $posts_week = $r[0]["posts_week"];
-                               else
+                               } else {
                                        $posts_week = 0;
+                               }
 
                                if ($posts_week > $throttle_week) {
                                        logger('Weekly posting limit reached for user '.api_user(), LOGGER_DEBUG);
-                                       #die(api_error($type, sprintf(t("Weekly posting limit of %d posts reached. The post was rejected."), $throttle_week)));
+                                       // die(api_error($type, sprintf(t("Weekly posting limit of %d posts reached. The post was rejected."), $throttle_week)));
                                        throw new TooManyRequestsException(sprintf(t("Weekly posting limit of %d posts reached. The post was rejected."), $throttle_week));
-
                                }
                        }
 
@@ -1052,14 +1119,15 @@ use \Friendica\Core\Config;
                                        AND `created` > '%s' AND `id` = `parent`",
                                        intval(api_user()), dbesc($datefrom));
 
-                               if ($r)
+                               if (dbm::is_result($r)) {
                                        $posts_month = $r[0]["posts_month"];
-                               else
+                               } else {
                                        $posts_month = 0;
+                               }
 
                                if ($posts_month > $throttle_month) {
                                        logger('Monthly posting limit reached for user '.api_user(), LOGGER_DEBUG);
-                                       #die(api_error($type, sprintf(t("Monthly posting limit of %d posts reached. The post was rejected."), $throttle_month)));
+                                       // die(api_error($type, sprintf(t("Monthly posting limit of %d posts reached. The post was rejected."), $throttle_month)));
                                        throw new TooManyRequestsException(sprintf(t("Monthly posting limit of %d posts reached. The post was rejected."), $throttle_month));
                                }
                        }
@@ -1067,23 +1135,24 @@ use \Friendica\Core\Config;
                        $_REQUEST['type'] = 'wall';
                }
 
-               if(x($_FILES,'media')) {
+               if (x($_FILES, 'media')) {
                        // upload the image if we have one
-                       $_REQUEST['hush']='yeah'; //tell wall_upload function to return img info instead of echo
+                       $_REQUEST['hush'] = 'yeah'; //tell wall_upload function to return img info instead of echo
                        $media = wall_upload_post($a);
-                       if(strlen($media)>0)
-                               $_REQUEST['body'] .= "\n\n".$media;
+                       if (strlen($media) > 0) {
+                               $_REQUEST['body'] .= "\n\n" . $media;
+                       }
                }
 
                // To-Do: Multiple IDs
                if (requestdata('media_ids')) {
                        $r = q("SELECT `resource-id`, `scale`, `nickname`, `type` FROM `photo` INNER JOIN `user` ON `user`.`uid` = `photo`.`uid` WHERE `resource-id` IN (SELECT `resource-id` FROM `photo` WHERE `id` = %d) AND `scale` > 0 AND `photo`.`uid` = %d ORDER BY `photo`.`width` DESC LIMIT 1",
                                intval(requestdata('media_ids')), api_user());
-                       if ($r) {
+                       if (dbm::is_result($r)) {
                                $phototypes = Photo::supportedTypes();
                                $ext = $phototypes[$r[0]['type']];
-                               $_REQUEST['body'] .= "\n\n".'[url='.App::get_baseurl().'/photos/'.$r[0]['nickname'].'/image/'.$r[0]['resource-id'].']';
-                               $_REQUEST['body'] .= '[img]'.App::get_baseurl()."/photo/".$r[0]['resource-id']."-".$r[0]['scale'].".".$ext."[/img][/url]";
+                               $_REQUEST['body'] .= "\n\n" . '[url=' . App::get_baseurl() . '/photos/' . $r[0]['nickname'] . '/image/' . $r[0]['resource-id'] . ']';
+                               $_REQUEST['body'] .= '[img]' . App::get_baseurl() . '/photo/' . $r[0]['resource-id'] . '-' . $r[0]['scale'] . '.' . $ext . '[/img][/url]';
                        }
                }
 
@@ -1091,38 +1160,39 @@ use \Friendica\Core\Config;
 
                $_REQUEST['api_source'] = true;
 
-               if (!x($_REQUEST, "source"))
+               if (!x($_REQUEST, "source")) {
                        $_REQUEST["source"] = api_source();
+               }
 
                // call out normal post function
-
                item_post($a);
 
                // this should output the last post (the one we just posted).
                return api_status_show($type);
        }
+
+       /// @TODO move to top of file or somwhere better
        api_register_func('api/statuses/update','api_statuses_update', true, API_METHOD_POST);
        api_register_func('api/statuses/update_with_media','api_statuses_update', true, API_METHOD_POST);
 
-
        function api_media_upload($type) {
 
                $a = get_app();
 
-               if (api_user()===false) {
+               if (api_user() === false) {
                        logger('no user');
                        throw new ForbiddenException();
                }
 
                $user_info = api_get_user($a);
 
-               if(!x($_FILES,'media')) {
+               if (!x($_FILES, 'media')) {
                        // Output error
                        throw new BadRequestException("No media.");
                }
 
                $media = wall_upload_post($a, false);
-               if(!$media) {
+               if (!$media) {
                        // Output error
                        throw new InternalServerErrorException();
                }
@@ -1135,13 +1205,15 @@ use \Friendica\Core\Config;
                                                "h" => $media["height"],
                                                "image_type" => $media["type"]);
 
-               logger("Media uploaded: ".print_r($returndata, true), LOGGER_DEBUG);
+               logger("Media uploaded: " . print_r($returndata, true), LOGGER_DEBUG);
 
                return array("media" => $returndata);
        }
+
+       /// @TODO move to top of file or somwhere better
        api_register_func('api/media/upload','api_media_upload', true, API_METHOD_POST);
 
-       function api_status_show($type){
+       function api_status_show($type) {
 
                $a = get_app();
 
@@ -1149,10 +1221,11 @@ use \Friendica\Core\Config;
 
                logger('api_status_show: user_info: '.print_r($user_info, true), LOGGER_DEBUG);
 
-               if ($type == "raw")
+               if ($type == "raw") {
                        $privacy_sql = "AND `item`.`allow_cid`='' AND `item`.`allow_gid`='' AND `item`.`deny_cid`='' AND `item`.`deny_gid`=''";
-               else
+               } else {
                        $privacy_sql = "";
+               }
 
                // get last public wall message
                $lastwall = q("SELECT `item`.*
@@ -1170,17 +1243,18 @@ use \Friendica\Core\Config;
                                dbesc(normalise_link($user_info['url']))
                );
 
-               if (count($lastwall)>0){
+               if (dbm::is_result($lastwall)) {
                        $lastwall = $lastwall[0];
 
                        $in_reply_to = api_in_reply_to($lastwall);
 
                        $converted = api_convert_item($lastwall);
 
-                       if ($type == "xml")
+                       if ($type == "xml") {
                                $geo = "georss:point";
-                       else
+                       } else {
                                $geo = "geo";
+                       }
 
                        $status_info = array(
                                'created_at' => api_date($lastwall['created']),
@@ -1210,16 +1284,19 @@ use \Friendica\Core\Config;
                                'statusnet_conversation_id'     => $lastwall['parent'],
                        );
 
-                       if (count($converted["attachments"]) > 0)
+                       if (count($converted["attachments"]) > 0) {
                                $status_info["attachments"] = $converted["attachments"];
+                       }
 
-                       if (count($converted["entities"]) > 0)
+                       if (count($converted["entities"]) > 0) {
                                $status_info["entities"] = $converted["entities"];
+                       }
 
-                       if (($lastwall['item_network'] != "") AND ($status["source"] == 'web'))
+                       if (($lastwall['item_network'] != "") AND ($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'] != "") AND (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']).')');
+                       }
 
                        // "uid" and "self" are only needed for some internal stuff, so remove it from here
                        unset($status_info["user"]["uid"]);
@@ -1228,23 +1305,20 @@ use \Friendica\Core\Config;
 
                logger('status_info: '.print_r($status_info, true), LOGGER_DEBUG);
 
-               if ($type == "raw")
-                       return($status_info);
+               if ($type == "raw") {
+                       return $status_info;
+               }
 
-               return  api_format_data("statuses", $type, array('status' => $status_info));
+               return api_format_data("statuses", $type, array('status' => $status_info));
 
        }
 
-
-
-
-
        /**
         * Returns extended information of a given user, specified by ID or screen name as per the required id parameter.
         * The author's most recent status will be returned inline.
         * http://developer.twitter.com/doc/get/users/show
         */
-       function api_users_show($type){
+       function api_users_show($type) {
 
                $a = get_app();
 
@@ -1267,17 +1341,18 @@ use \Friendica\Core\Config;
                                dbesc(normalise_link($user_info['url']))
                );
 
-               if (count($lastwall)>0){
+               if (dbm::is_result($lastwall)) {
                        $lastwall = $lastwall[0];
 
                        $in_reply_to = api_in_reply_to($lastwall);
 
                        $converted = api_convert_item($lastwall);
 
-                       if ($type == "xml")
+                       if ($type == "xml") {
                                $geo = "georss:point";
-                       else
+                       } else {
                                $geo = "geo";
+                       }
 
                        $user_info['status'] = array(
                                'text' => $converted["text"],
@@ -1293,20 +1368,25 @@ use \Friendica\Core\Config;
                                'in_reply_to_screen_name' => $in_reply_to['screen_name'],
                                $geo => NULL,
                                'favorited' => $lastwall['starred'] ? true : false,
-                               'statusnet_html'                => $converted["html"],
+                               'statusnet_html' => $converted["html"],
                                'statusnet_conversation_id'     => $lastwall['parent'],
                        );
 
-                       if (count($converted["attachments"]) > 0)
+                       if (count($converted["attachments"]) > 0) {
                                $user_info["status"]["attachments"] = $converted["attachments"];
+                       }
 
-                       if (count($converted["entities"]) > 0)
+                       if (count($converted["entities"]) > 0) {
                                $user_info["status"]["entities"] = $converted["entities"];
+                       }
 
-                       if (($lastwall['item_network'] != "") AND ($user_info["status"]["source"] == 'web'))
+                       if (($lastwall['item_network'] != "") AND ($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"]))
-                               $user_info["status"]["source"] = trim($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"])) {
+                               $user_info["status"]["source"] = trim($user_info["status"]["source"] . ' (' . network_to_name($lastwall['item_network'], $user_info['url']) . ')');
+                       }
 
                }
 
@@ -1314,34 +1394,38 @@ use \Friendica\Core\Config;
                unset($user_info["uid"]);
                unset($user_info["self"]);
 
-               return  api_format_data("user", $type, array('user' => $user_info));
+               return api_format_data("user", $type, array('user' => $user_info));
 
        }
-       api_register_func('api/users/show','api_users_show');
 
+       /// @TODO move to top of file or somewhere better
+       api_register_func('api/users/show','api_users_show');
 
        function api_users_search($type) {
 
                $a = get_app();
 
-               $page = (x($_REQUEST,'page')?$_REQUEST['page']-1:0);
+               $page = (x($_REQUEST, 'page') ? $_REQUEST['page'] - 1 : 0);
 
                $userlist = array();
 
-               if (isset($_GET["q"])) {
+               if (x($_GET, 'q')) {
                        $r = q("SELECT id FROM `contact` WHERE `uid` = 0 AND `name` = '%s'", dbesc($_GET["q"]));
-                       if (!dbm::is_result($r))
+
+                       if (!dbm::is_result($r)) {
                                $r = q("SELECT `id` FROM `contact` WHERE `uid` = 0 AND `nick` = '%s'", dbesc($_GET["q"]));
+                       }
 
                        if (dbm::is_result($r)) {
                                $k = 0;
                                foreach ($r AS $user) {
                                        $user_info = api_get_user($a, $user["id"], "json");
 
-                                       if ($type == "xml")
+                                       if ($type == "xml") {
                                                $userlist[$k++.":user"] = $user_info;
-                                       else
+                                       } else {
                                                $userlist[] = $user_info;
+                                       }
                                }
                                $userlist = array("users" => $userlist);
                        } else {
@@ -1353,6 +1437,7 @@ use \Friendica\Core\Config;
                return api_format_data("users", $type, $userlist);
        }
 
+       /// @TODO move to top of file or somewhere better
        api_register_func('api/users/search','api_users_search');
 
        /**
@@ -1362,11 +1447,13 @@ use \Friendica\Core\Config;
         * TODO: Optional parameters
         * TODO: Add reply info
         */
-       function api_statuses_home_timeline($type){
+       function api_statuses_home_timeline($type) {
 
                $a = get_app();
 
-               if (api_user()===false) throw new ForbiddenException();
+               if (api_user() === false) {
+                       throw new ForbiddenException();
+               }
 
                unset($_REQUEST["user_id"]);
                unset($_GET["user_id"]);
@@ -1378,24 +1465,29 @@ use \Friendica\Core\Config;
                // get last newtork messages
 
                // params
-               $count = (x($_REQUEST,'count')?$_REQUEST['count']:20);
-               $page = (x($_REQUEST,'page')?$_REQUEST['page']-1:0);
-               if ($page<0) $page=0;
-               $since_id = (x($_REQUEST,'since_id')?$_REQUEST['since_id']:0);
-               $max_id = (x($_REQUEST,'max_id')?$_REQUEST['max_id']:0);
-               //$since_id = 0;//$since_id = (x($_REQUEST,'since_id')?$_REQUEST['since_id']:0);
-               $exclude_replies = (x($_REQUEST,'exclude_replies')?1:0);
-               $conversation_id = (x($_REQUEST,'conversation_id')?$_REQUEST['conversation_id']:0);
+               $count = (x($_REQUEST, 'count') ? $_REQUEST['count'] : 20);
+               $page = (x($_REQUEST, 'page') ? $_REQUEST['page'] - 1 : 0);
+               if ($page < 0) {
+                       $page = 0;
+               }
+               $since_id = (x($_REQUEST, 'since_id') ? $_REQUEST['since_id'] : 0);
+               $max_id = (x($_REQUEST, 'max_id') ? $_REQUEST['max_id'] : 0);
+               //$since_id = 0;//$since_id = (x($_REQUEST, 'since_id')?$_REQUEST['since_id'] : 0);
+               $exclude_replies = (x($_REQUEST, 'exclude_replies') ? 1 : 0);
+               $conversation_id = (x($_REQUEST, 'conversation_id') ? $_REQUEST['conversation_id'] : 0);
 
-               $start = $page*$count;
+               $start = $page * $count;
 
                $sql_extra = '';
-               if ($max_id > 0)
-                       $sql_extra .= ' AND `item`.`id` <= '.intval($max_id);
-               if ($exclude_replies > 0)
+               if ($max_id > 0) {
+                       $sql_extra .= ' AND `item`.`id` <= ' . intval($max_id);
+               }
+               if ($exclude_replies > 0) {
                        $sql_extra .= ' AND `item`.`parent` = `item`.`id`';
-               if ($conversation_id > 0)
-                       $sql_extra .= ' AND `item`.`parent` = '.intval($conversation_id);
+               }
+               if ($conversation_id > 0) {
+                       $sql_extra .= ' AND `item`.`parent` = ' . intval($conversation_id);
+               }
 
                $r = q("SELECT `item`.*, `item`.`id` AS `item_id`, `item`.`network` AS `item_network`,
                        `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`,
@@ -1415,63 +1507,73 @@ use \Friendica\Core\Config;
                        intval($start), intval($count)
                );
 
-               $ret = api_format_items($r,$user_info, false, $type);
+               $ret = api_format_items($r, $user_info, false, $type);
 
                // Set all posts from the query above to seen
                $idarray = array();
-               foreach ($r AS $item)
+               foreach ($r AS $item) {
                        $idarray[] = intval($item["id"]);
+               }
 
                $idlist = implode(",", $idarray);
 
                if ($idlist != "") {
                        $unseen = q("SELECT `id` FROM `item` WHERE `unseen` AND `id` IN (%s)", $idlist);
 
-                       if ($unseen)
+                       if ($unseen) {
                                $r = q("UPDATE `item` SET `unseen` = 0 WHERE `unseen` AND `id` IN (%s)", $idlist);
+                       }
                }
 
                $data = array('status' => $ret);
-               switch($type){
+               switch ($type) {
                        case "atom":
                        case "rss":
                                $data = api_rss_extra($a, $data, $user_info);
                                break;
                }
 
-               return  api_format_data("statuses", $type, $data);
+               return api_format_data("statuses", $type, $data);
        }
+
+       /// @TODO move to top of file or somewhere better
        api_register_func('api/statuses/home_timeline','api_statuses_home_timeline', true);
        api_register_func('api/statuses/friends_timeline','api_statuses_home_timeline', true);
 
-       function api_statuses_public_timeline($type){
+       function api_statuses_public_timeline($type) {
 
                $a = get_app();
 
-               if (api_user()===false) throw new ForbiddenException();
+               if (api_user() === false) {
+                       throw new ForbiddenException();
+               }
 
                $user_info = api_get_user($a);
                // get last newtork messages
 
-
                // params
-               $count = (x($_REQUEST,'count')?$_REQUEST['count']:20);
-               $page = (x($_REQUEST,'page')?$_REQUEST['page']-1:0);
-               if ($page<0) $page=0;
-               $since_id = (x($_REQUEST,'since_id')?$_REQUEST['since_id']:0);
-               $max_id = (x($_REQUEST,'max_id')?$_REQUEST['max_id']:0);
-               //$since_id = 0;//$since_id = (x($_REQUEST,'since_id')?$_REQUEST['since_id']:0);
-               $exclude_replies = (x($_REQUEST,'exclude_replies')?1:0);
-               $conversation_id = (x($_REQUEST,'conversation_id')?$_REQUEST['conversation_id']:0);
+               $count = (x($_REQUEST, 'count') ? $_REQUEST['count'] : 20);
+               $page = (x($_REQUEST, 'page') ? $_REQUEST['page'] -1 : 0);
+               if ($page < 0) {
+                       $page = 0;
+               }
+               $since_id = (x($_REQUEST, 'since_id') ? $_REQUEST['since_id'] : 0);
+               $max_id = (x($_REQUEST, 'max_id') ? $_REQUEST['max_id'] : 0);
+               //$since_id = 0;//$since_id = (x($_REQUEST, 'since_id')?$_REQUEST['since_id'] : 0);
+               $exclude_replies = (x($_REQUEST, 'exclude_replies') ? 1 : 0);
+               $conversation_id = (x($_REQUEST, 'conversation_id') ? $_REQUEST['conversation_id'] : 0);
 
-               $start = $page*$count;
+               $start = $page * $count;
 
-               if ($max_id > 0)
-                       $sql_extra = 'AND `item`.`id` <= '.intval($max_id);
-               if ($exclude_replies > 0)
+               if ($max_id > 0) {
+                       $sql_extra = 'AND `item`.`id` <= ' . intval($max_id);
+               }
+               if ($exclude_replies > 0) {
                        $sql_extra .= ' AND `item`.`parent` = `item`.`id`';
-               if ($conversation_id > 0)
-                       $sql_extra .= ' AND `item`.`parent` = '.intval($conversation_id);
+               }
+               if ($conversation_id > 0) {
+                       $sql_extra .= ' AND `item`.`parent` = ' . intval($conversation_id);
+               }
 
                $r = q("SELECT `item`.*, `item`.`id` AS `item_id`, `item`.`network` AS `item_network`,
                        `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`,
@@ -1495,51 +1597,57 @@ use \Friendica\Core\Config;
                        intval($start),
                        intval($count));
 
-               $ret = api_format_items($r,$user_info, false, $type);
-
+               $ret = api_format_items($r, $user_info, false, $type);
 
                $data = array('status' => $ret);
-               switch($type){
+               switch ($type) {
                        case "atom":
                        case "rss":
                                $data = api_rss_extra($a, $data, $user_info);
                                break;
                }
 
-               return  api_format_data("statuses", $type, $data);
+               return api_format_data("statuses", $type, $data);
        }
+
+       /// @TODO move to top of file or somewhere better
        api_register_func('api/statuses/public_timeline','api_statuses_public_timeline', true);
 
        /**
-        *
+        * @TODO nothing to say?
         */
-       function api_statuses_show($type){
+       function api_statuses_show($type) {
 
                $a = get_app();
 
-               if (api_user()===false) throw new ForbiddenException();
+               if (api_user() === false) {
+                       throw new ForbiddenException();
+               }
 
                $user_info = api_get_user($a);
 
                // params
                $id = intval($a->argv[3]);
 
-               if ($id == 0)
+               if ($id == 0) {
                        $id = intval($_REQUEST["id"]);
+               }
 
                // Hotot workaround
-               if ($id == 0)
+               if ($id == 0) {
                        $id = intval($a->argv[4]);
+               }
 
-               logger('API: api_statuses_show: '.$id);
+               logger('API: api_statuses_show: ' . $id);
 
-               $conversation = (x($_REQUEST,'conversation')?1:0);
+               $conversation = (x($_REQUEST, 'conversation') ? 1 : 0);
 
                $sql_extra = '';
-               if ($conversation)
+               if ($conversation) {
                        $sql_extra .= " AND `item`.`parent` = %d ORDER BY `id` ASC ";
-               else
+               } else {
                        $sql_extra .= " AND `item`.`id` = %d";
+               }
 
                $r = q("SELECT `item`.*, `item`.`id` AS `item_id`, `item`.`network` AS `item_network`,
                        `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`,
@@ -1556,7 +1664,8 @@ use \Friendica\Core\Config;
                        intval($id)
                );
 
-               if (!$r) {
+               /// @TODO How about copying this to above methods which don't check $r ?
+               if (!dbm::is_result($r)) {
                        throw new BadRequestException("There is no status with this id.");
                }
 
@@ -1567,50 +1676,59 @@ use \Friendica\Core\Config;
                        return api_format_data("statuses", $type, $data);
                } else {
                        $data = array('status' => $ret[0]);
-                       return  api_format_data("status", $type, $data);
+                       return api_format_data("status", $type, $data);
                }
        }
-       api_register_func('api/statuses/show','api_statuses_show', true);
 
+       /// @TODO move to top of file or somewhere better
+       api_register_func('api/statuses/show','api_statuses_show', true);
 
        /**
-        *
+        * @TODO nothing to say?
         */
-       function api_conversation_show($type){
+       function api_conversation_show($type) {
 
                $a = get_app();
 
-               if (api_user()===false) throw new ForbiddenException();
+               if (api_user() === false) {
+                       throw new ForbiddenException();
+               }
 
                $user_info = api_get_user($a);
 
                // params
                $id = intval($a->argv[3]);
-               $count = (x($_REQUEST,'count')?$_REQUEST['count']:20);
-               $page = (x($_REQUEST,'page')?$_REQUEST['page']-1:0);
-               if ($page<0) $page=0;
-               $since_id = (x($_REQUEST,'since_id')?$_REQUEST['since_id']:0);
-               $max_id = (x($_REQUEST,'max_id')?$_REQUEST['max_id']:0);
+               $count = (x($_REQUEST, 'count') ? $_REQUEST['count'] : 20);
+               $page = (x($_REQUEST, 'page') ? $_REQUEST['page'] - 1 : 0);
+               if ($page < 0) {
+                       $page = 0;
+               }
+               $since_id = (x($_REQUEST, 'since_id') ? $_REQUEST['since_id'] : 0);
+               $max_id = (x($_REQUEST, 'max_id') ? $_REQUEST['max_id'] : 0);
 
                $start = $page*$count;
 
-               if ($id == 0)
+               if ($id == 0) {
                        $id = intval($_REQUEST["id"]);
+               }
 
                // Hotot workaround
-               if ($id == 0)
+               if ($id == 0) {
                        $id = intval($a->argv[4]);
+               }
 
                logger('API: api_conversation_show: '.$id);
 
                $r = q("SELECT `parent` FROM `item` WHERE `id` = %d", intval($id));
-               if ($r)
+               if (dbm::is_result($r)) {
                        $id = $r[0]["parent"];
+               }
 
                $sql_extra = '';
 
-               if ($max_id > 0)
-                       $sql_extra = ' AND `item`.`id` <= '.intval($max_id);
+               if ($max_id > 0) {
+                       $sql_extra = ' AND `item`.`id` <= ' . intval($max_id);
+               }
 
                // Not sure why this query was so complicated. We should keep it here for a while,
                // just to make sure that we really don't need it.
@@ -1635,39 +1753,45 @@ use \Friendica\Core\Config;
                        intval($start), intval($count)
                );
 
-               if (!$r)
-                       throw new BadRequestException("There is no conversation with this id.");
+               if (!dbm::is_result($r)) {
+                       throw new BadRequestException("There is no status with this id.");
+               }
 
-               $ret = api_format_items($r,$user_info, false, $type);
+               $ret = api_format_items($r, $user_info, false, $type);
 
                $data = array('status' => $ret);
                return api_format_data("statuses", $type, $data);
        }
+
+       /// @TODO move to top of file or somewhere better
        api_register_func('api/conversation/show','api_conversation_show', true);
        api_register_func('api/statusnet/conversation','api_conversation_show', true);
 
-
        /**
-        *
+        * @TODO nothing to say?
         */
-       function api_statuses_repeat($type){
+       function api_statuses_repeat($type) {
                global $called_api;
 
                $a = get_app();
 
-               if (api_user()===false) throw new ForbiddenException();
+               if (api_user() === false) {
+                       throw new ForbiddenException();
+               }
 
                $user_info = api_get_user($a);
 
                // params
                $id = intval($a->argv[3]);
 
-               if ($id == 0)
+               if ($id == 0) {
                        $id = intval($_REQUEST["id"]);
+               }
 
                // Hotot workaround
-               if ($id == 0)
+               if ($id == 0) {
                        $id = intval($a->argv[4]);
+               }
 
                logger('API: api_statuses_repeat: '.$id);
 
@@ -1686,7 +1810,8 @@ use \Friendica\Core\Config;
                        intval($id)
                );
 
-               if ($r[0]['body'] != "") {
+               /// @TODO other style than above functions!
+               if (dbm::is_result($r) && $r[0]['body'] != "") {
                        if (strpos($r[0]['body'], "[/share]") !== false) {
                                $pos = strpos($r[0]['body'], "[share");
                                $post = substr($r[0]['body'], $pos);
@@ -1701,39 +1826,47 @@ use \Friendica\Core\Config;
                        $_REQUEST['type'] = 'wall';
                        $_REQUEST['api_source'] = true;
 
-                       if (!x($_REQUEST, "source"))
+                       if (!x($_REQUEST, "source")) {
                                $_REQUEST["source"] = api_source();
+                       }
 
                        item_post($a);
-               } else
+               } else {
                        throw new ForbiddenException();
+               }
 
                // this should output the last post (the one we just posted).
                $called_api = null;
-               return(api_status_show($type));
+               return api_status_show($type);
        }
+
+       /// @TODO move to top of file or somewhere better
        api_register_func('api/statuses/retweet','api_statuses_repeat', true, API_METHOD_POST);
 
        /**
-        *
+        * @TODO nothing to say?
         */
-       function api_statuses_destroy($type){
+       function api_statuses_destroy($type) {
 
                $a = get_app();
 
-               if (api_user()===false) throw new ForbiddenException();
+               if (api_user() === false) {
+                       throw new ForbiddenException();
+               }
 
                $user_info = api_get_user($a);
 
                // params
                $id = intval($a->argv[3]);
 
-               if ($id == 0)
+               if ($id == 0) {
                        $id = intval($_REQUEST["id"]);
+               }
 
                // Hotot workaround
-               if ($id == 0)
+               if ($id == 0) {
                        $id = intval($a->argv[4]);
+               }
 
                logger('API: api_statuses_destroy: '.$id);
 
@@ -1741,20 +1874,23 @@ use \Friendica\Core\Config;
 
                drop_item($id, false);
 
-               return($ret);
+               return $ret;
        }
+
+       /// @TODO move to top of file or somewhere better
        api_register_func('api/statuses/destroy','api_statuses_destroy', true, API_METHOD_DELETE);
 
        /**
-        *
+        * @TODO Nothing more than an URL to say?
         * http://developer.twitter.com/doc/get/statuses/mentions
-        *
         */
-       function api_statuses_mentions($type){
+       function api_statuses_mentions($type) {
 
                $a = get_app();
 
-               if (api_user()===false) throw new ForbiddenException();
+               if (api_user() === false) {
+                       throw new ForbiddenException();
+               }
 
                unset($_REQUEST["user_id"]);
                unset($_GET["user_id"]);
@@ -1767,24 +1903,27 @@ use \Friendica\Core\Config;
 
 
                // params
-               $count = (x($_REQUEST,'count')?$_REQUEST['count']:20);
-               $page = (x($_REQUEST,'page')?$_REQUEST['page']-1:0);
-               if ($page<0) $page=0;
-               $since_id = (x($_REQUEST,'since_id')?$_REQUEST['since_id']:0);
-               $max_id = (x($_REQUEST,'max_id')?$_REQUEST['max_id']:0);
-               //$since_id = 0;//$since_id = (x($_REQUEST,'since_id')?$_REQUEST['since_id']:0);
+               $count = (x($_REQUEST, 'count') ? $_REQUEST['count'] : 20);
+               $page = (x($_REQUEST, 'page') ? $_REQUEST['page'] -1 : 0);
+               if ($page < 0) {
+                       $page = 0;
+               }
+               $since_id = (x($_REQUEST, 'since_id') ? $_REQUEST['since_id'] : 0);
+               $max_id = (x($_REQUEST, 'max_id') ? $_REQUEST['max_id'] : 0);
+               //$since_id = 0;//$since_id = (x($_REQUEST, 'since_id')?$_REQUEST['since_id'] : 0);
 
-               $start = $page*$count;
+               $start = $page * $count;
 
                // Ugly code - should be changed
                $myurl = App::get_baseurl() . '/profile/'. $a->user['nickname'];
-               $myurl = substr($myurl,strpos($myurl,'://')+3);
+               $myurl = substr($myurl,strpos($myurl, '://') + 3);
                //$myurl = str_replace(array('www.','.'),array('','\\.'),$myurl);
-               $myurl = str_replace('www.','',$myurl);
-               $diasp_url = str_replace('/profile/','/u/',$myurl);
+               $myurl = str_replace('www.', '', $myurl);
+               $diasp_url = str_replace('/profile/', '/u/', $myurl);
 
-               if ($max_id > 0)
-                       $sql_extra = ' AND `item`.`id` <= '.intval($max_id);
+               if ($max_id > 0) {
+                       $sql_extra = ' AND `item`.`id` <= ' . intval($max_id);
+               }
 
                $r = q("SELECT `item`.*, `item`.`id` AS `item_id`, `item`.`network` AS `item_network`,
                        `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`,
@@ -1809,28 +1948,30 @@ use \Friendica\Core\Config;
                        intval($start), intval($count)
                );
 
-               $ret = api_format_items($r,$user_info, false, $type);
-
+               $ret = api_format_items($r, $user_info, false, $type);
 
                $data = array('status' => $ret);
-               switch($type){
+               switch ($type) {
                        case "atom":
                        case "rss":
                                $data = api_rss_extra($a, $data, $user_info);
                                break;
                }
 
-               return  api_format_data("statuses", $type, $data);
+               return api_format_data("statuses", $type, $data);
        }
+
+       /// @TODO move to top of file or somewhere better
        api_register_func('api/statuses/mentions','api_statuses_mentions', true);
        api_register_func('api/statuses/replies','api_statuses_mentions', true);
 
-
-       function api_statuses_user_timeline($type){
+       function api_statuses_user_timeline($type) {
 
                $a = get_app();
 
-               if (api_user()===false) throw new ForbiddenException();
+               if (api_user() === false) {
+                       throw new ForbiddenException();
+               }
 
                $user_info = api_get_user($a);
                // get last network messages
@@ -1841,24 +1982,29 @@ use \Friendica\Core\Config;
                           LOGGER_DEBUG);
 
                // params
-               $count = (x($_REQUEST,'count')?$_REQUEST['count']:20);
-               $page = (x($_REQUEST,'page')?$_REQUEST['page']-1:0);
-               if ($page<0) $page=0;
-               $since_id = (x($_REQUEST,'since_id')?$_REQUEST['since_id']:0);
-               //$since_id = 0;//$since_id = (x($_REQUEST,'since_id')?$_REQUEST['since_id']:0);
-               $exclude_replies = (x($_REQUEST,'exclude_replies')?1:0);
-               $conversation_id = (x($_REQUEST,'conversation_id')?$_REQUEST['conversation_id']:0);
+               $count = (x($_REQUEST, 'count') ? $_REQUEST['count'] : 20);
+               $page = (x($_REQUEST, 'page') ? $_REQUEST['page'] -1 : 0);
+               if ($page < 0) {
+                       $page = 0;
+               }
+               $since_id = (x($_REQUEST, 'since_id') ? $_REQUEST['since_id'] : 0);
+               //$since_id = 0;//$since_id = (x($_REQUEST, 'since_id')?$_REQUEST['since_id'] : 0);
+               $exclude_replies = (x($_REQUEST, 'exclude_replies') ? 1 : 0);
+               $conversation_id = (x($_REQUEST, 'conversation_id') ? $_REQUEST['conversation_id'] : 0);
 
-               $start = $page*$count;
+               $start = $page * $count;
 
                $sql_extra = '';
-               if ($user_info['self']==1)
+               if ($user_info['self'] == 1) {
                        $sql_extra .= " AND `item`.`wall` = 1 ";
+               }
 
-               if ($exclude_replies > 0)
+               if ($exclude_replies > 0) {
                        $sql_extra .= ' AND `item`.`parent` = `item`.`id`';
-               if ($conversation_id > 0)
-                       $sql_extra .= ' AND `item`.`parent` = '.intval($conversation_id);
+               }
+               if ($conversation_id > 0) {
+                       $sql_extra .= ' AND `item`.`parent` = ' . intval($conversation_id);
+               }
 
                $r = q("SELECT `item`.*, `item`.`id` AS `item_id`, `item`.`network` AS `item_network`,
                        `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`,
@@ -1880,19 +2026,21 @@ use \Friendica\Core\Config;
                        intval($start), intval($count)
                );
 
-               $ret = api_format_items($r,$user_info, true, $type);
+               $ret = api_format_items($r, $user_info, true, $type);
 
                $data = array('status' => $ret);
-               switch($type){
+               switch ($type) {
                        case "atom":
                        case "rss":
                                $data = api_rss_extra($a, $data, $user_info);
+                               break;
                }
 
-               return  api_format_data("statuses", $type, $data);
+               return api_format_data("statuses", $type, $data);
        }
-       api_register_func('api/statuses/user_timeline','api_statuses_user_timeline', true);
 
+       /// @TODO move to top of file or somwhere better
+       api_register_func('api/statuses/user_timeline','api_statuses_user_timeline', true);
 
        /**
         * Star/unstar an item
@@ -1900,49 +2048,59 @@ use \Friendica\Core\Config;
         *
         * api v1 : https://web.archive.org/web/20131019055350/https://dev.twitter.com/docs/api/1/post/favorites/create/%3Aid
         */
-       function api_favorites_create_destroy($type){
+       function api_favorites_create_destroy($type) {
 
                $a = get_app();
 
-               if (api_user()===false) throw new ForbiddenException();
+               if (api_user() === false) {
+                       throw new ForbiddenException();
+               }
 
                // for versioned api.
                /// @TODO We need a better global soluton
-               $action_argv_id=2;
-               if ($a->argv[1]=="1.1") $action_argv_id=3;
+               $action_argv_id = 2;
+               if ($a->argv[1] == "1.1") {
+                       $action_argv_id = 3;
+               }
 
-               if ($a->argc<=$action_argv_id) throw new BadRequestException("Invalid request.");
-               $action = str_replace(".".$type,"",$a->argv[$action_argv_id]);
-               if ($a->argc==$action_argv_id+2) {
-                       $itemid = intval($a->argv[$action_argv_id+1]);
+               if ($a->argc <= $action_argv_id) {
+                       throw new BadRequestException("Invalid request.");
+               }
+               $action = str_replace("." . $type, "", $a->argv[$action_argv_id]);
+               if ($a->argc == $action_argv_id + 2) {
+                       $itemid = intval($a->argv[$action_argv_id + 1]);
                } else {
+                       ///  @TODO use x() to check if _REQUEST contains 'id'
                        $itemid = intval($_REQUEST['id']);
                }
 
-               $item = q("SELECT * FROM item WHERE id=%d AND uid=%d",
+               $item = q("SELECT * FROM `item` WHERE `id`=%d AND `uid`=%d LIMIT 1",
                                $itemid, api_user());
 
-               if ($item===false || count($item)==0)
+               if (!dbm::is_result($item) || count($item) == 0) {
                        throw new BadRequestException("Invalid item.");
+               }
 
-               switch($action){
+               switch ($action) {
                        case "create":
-                               $item[0]['starred']=1;
+                               $item[0]['starred'] = 1;
                                break;
                        case "destroy":
-                               $item[0]['starred']=0;
+                               $item[0]['starred'] = 0;
                                break;
                        default:
                                throw new BadRequestException("Invalid action ".$action);
                }
+
                $r = q("UPDATE item SET starred=%d WHERE id=%d AND uid=%d",
                                $item[0]['starred'], $itemid, api_user());
 
                q("UPDATE thread SET starred=%d WHERE iid=%d AND uid=%d",
                        $item[0]['starred'], $itemid, api_user());
 
-               if ($r===false)
-                       throw InternalServerErrorException("DB error");
+               if ($r === false) {
+                       throw new InternalServerErrorException("DB error");
+               }
 
 
                $user_info = api_get_user($a);
@@ -1950,7 +2108,7 @@ use \Friendica\Core\Config;
                $ret = $rets[0];
 
                $data = array('status' => $ret);
-               switch($type){
+               switch ($type) {
                        case "atom":
                        case "rss":
                                $data = api_rss_extra($a, $data, $user_info);
@@ -1958,17 +2116,21 @@ use \Friendica\Core\Config;
 
                return api_format_data("status", $type, $data);
        }
+
+       /// @TODO move to top of file or somwhere better
        api_register_func('api/favorites/create', 'api_favorites_create_destroy', true, API_METHOD_POST);
        api_register_func('api/favorites/destroy', 'api_favorites_create_destroy', true, API_METHOD_DELETE);
 
-       function api_favorites($type){
+       function api_favorites($type) {
                global $called_api;
 
                $a = get_app();
 
-               if (api_user()===false) throw new ForbiddenException();
+               if (api_user() === false) {
+                       throw new ForbiddenException();
+               }
 
-               $called_api= array();
+               $called_api = array();
 
                $user_info = api_get_user($a);
 
@@ -1976,22 +2138,25 @@ use \Friendica\Core\Config;
                // return favorites only for self
                logger('api_favorites: self:' . $user_info['self']);
 
-               if ($user_info['self']==0) {
+               if ($user_info['self'] == 0) {
                        $ret = array();
                } else {
                        $sql_extra = "";
 
                        // params
-                       $since_id = (x($_REQUEST,'since_id')?$_REQUEST['since_id']:0);
-                       $max_id = (x($_REQUEST,'max_id')?$_REQUEST['max_id']:0);
-                       $count = (x($_GET,'count')?$_GET['count']:20);
-                       $page = (x($_REQUEST,'page')?$_REQUEST['page']-1:0);
-                       if ($page<0) $page=0;
+                       $since_id = (x($_REQUEST, 'since_id') ? $_REQUEST['since_id'] : 0);
+                       $max_id = (x($_REQUEST, 'max_id') ? $_REQUEST['max_id'] : 0);
+                       $count = (x($_GET, 'count') ? $_GET['count'] : 20);
+                       $page = (x($_REQUEST, 'page') ? $_REQUEST['page'] -1 : 0);
+                       if ($page < 0) {
+                               $page = 0;
+                       }
 
                        $start = $page*$count;
 
-                       if ($max_id > 0)
-                               $sql_extra .= ' AND `item`.`id` <= '.intval($max_id);
+                       if ($max_id > 0) {
+                               $sql_extra .= ' AND `item`.`id` <= ' . intval($max_id);
+                       }
 
                        $r = q("SELECT `item`.*, `item`.`id` AS `item_id`, `item`.`network` AS `item_network`,
                                `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`,
@@ -2016,14 +2181,16 @@ use \Friendica\Core\Config;
                }
 
                $data = array('status' => $ret);
-               switch($type){
+               switch ($type) {
                        case "atom":
                        case "rss":
                                $data = api_rss_extra($a, $data, $user_info);
                }
 
-               return  api_format_data("statuses", $type, $data);
+               return api_format_data("statuses", $type, $data);
        }
+
+       /// @TODO move to top of file or somwhere better
        api_register_func('api/favorites','api_favorites', true);
 
        function api_format_messages($item, $recipient, $sender) {
@@ -2038,9 +2205,9 @@ use \Friendica\Core\Config;
                                'recipient_screen_name' => $recipient['screen_name'],
                                'sender'                => $sender,
                                'recipient'             => $recipient,
-                               'title'                 => "",
-                               'friendica_seen'        => $item['seen'],
-                               'friendica_parent_uri'  => $item['parent-uri'],
+                               'title'                 => "",
+                               'friendica_seen'        => $item['seen'],
+                               'friendica_parent_uri'  => $item['parent-uri'],
                );
 
                // "uid" and "self" are only needed for some internal stuff, so remove it from here
@@ -2052,18 +2219,16 @@ use \Friendica\Core\Config;
                //don't send title to regular StatusNET requests to avoid confusing these apps
                if (x($_GET, 'getText')) {
                        $ret['title'] = $item['title'] ;
-                       if ($_GET["getText"] == "html") {
+                       if ($_GET['getText'] == 'html') {
                                $ret['text'] = bbcode($item['body'], false, false);
-                       }
-                       elseif ($_GET["getText"] == "plain") {
+                       } elseif ($_GET['getText'] == 'plain') {
                                //$ret['text'] = html2plain(bbcode($item['body'], false, false, true), 0);
                                $ret['text'] = trim(html2plain(bbcode(api_clean_plain_items($item['body']), false, false, 2, true), 0));
                        }
+               } else {
+                       $ret['text'] = $item['title'] . "\n" . html2plain(bbcode(api_clean_plain_items($item['body']), false, false, 2, true), 0);
                }
-               else {
-                       $ret['text'] = $item['title']."\n".html2plain(bbcode(api_clean_plain_items($item['body']), false, false, 2, true), 0);
-               }
-               if (isset($_GET["getUserObjects"]) && $_GET["getUserObjects"] == "false") {
+               if (x($_GET, 'getUserObjects') && $_GET['getUserObjects'] == 'false') {
                        unset($ret['sender']);
                        unset($ret['recipient']);
                }
@@ -2084,13 +2249,15 @@ use \Friendica\Core\Config;
 
                $statustitle = trim($item['title']);
 
-               if (($statustitle != '') and (strpos($statusbody, $statustitle) !== false))
+               if (($statustitle != '') and (strpos($statusbody, $statustitle) !== false)) {
                        $statustext = trim($statusbody);
-               else
+               } else {
                        $statustext = trim($statustitle."\n\n".$statusbody);
+               }
 
-               if (($item["network"] == NETWORK_FEED) and (strlen($statustext)> 1000))
+               if (($item["network"] == NETWORK_FEED) and (strlen($statustext)> 1000)) {
                        $statustext = substr($statustext, 0, 1000)."... \n".$item["plink"];
+               }
 
                $statushtml = trim(bbcode($body, false, false));
 
@@ -2104,8 +2271,9 @@ use \Friendica\Core\Config;
                                "\n<h5>", "</h5>\n", "\n<h6>", "</h6>\n");
                $statushtml = str_replace($search, $replace, $statushtml);
 
-               if ($item['title'] != "")
-                       $statushtml = "<h4>".bbcode($item['title'])."</h4>\n".$statushtml;
+               if ($item['title'] != "") {
+                       $statushtml = "<h4>" . bbcode($item['title']) . "</h4>\n" . $statushtml;
+               }
 
                $entities = api_get_entitities($statustext, $body);
 
@@ -2125,21 +2293,25 @@ use \Friendica\Core\Config;
                $URLSearchString = "^\[\]";
                $ret = preg_match_all("/\[img\]([$URLSearchString]*)\[\/img\]/ism", $text, $images);
 
-               if (!$ret)
+               if (!$ret) {
                        return false;
+               }
 
                $attachments = array();
 
                foreach ($images[1] AS $image) {
                        $imagedata = get_photo_info($image);
 
-                       if ($imagedata)
+                       if ($imagedata) {
                                $attachments[] = array("url" => $image, "mimetype" => $imagedata["mime"], "size" => $imagedata["size"]);
+                       }
                }
 
-               if (strstr($_SERVER['HTTP_USER_AGENT'], "AndStatus"))
-                       foreach ($images[0] AS $orig)
+               if (strstr($_SERVER['HTTP_USER_AGENT'], "AndStatus")) {
+                       foreach ($images[0] AS $orig) {
                                $body = str_replace($orig, "", $body);
+                       }
+               }
 
                return $attachments;
        }
@@ -2152,7 +2324,7 @@ use \Friendica\Core\Config;
 
                $a = get_app();
 
-               $include_entities = strtolower(x($_REQUEST,'include_entities')?$_REQUEST['include_entities']:"false");
+               $include_entities = strtolower(x($_REQUEST, 'include_entities') ? $_REQUEST['include_entities'] : "false");
 
                if ($include_entities != "true") {
 
@@ -2198,11 +2370,12 @@ use \Friendica\Core\Config;
                preg_match_all("/\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", $bbcode, $urls);
 
                $ordered_urls = array();
-               foreach ($urls[1] AS $id=>$url) {
+               foreach ($urls[1] AS $id => $url) {
                        //$start = strpos($text, $url, $offset);
                        $start = iconv_strpos($text, $url, 0, "UTF-8");
-                       if (!($start === false))
+                       if (!($start === false)) {
                                $ordered_urls[$start] = array("url" => $url, "title" => $urls[2][$id]);
+                       }
                }
 
                ksort($ordered_urls);
@@ -2296,9 +2469,9 @@ use \Friendica\Core\Config;
                        }
                }
 
-               return($entities);
+               return $entities;
        }
-       function api_format_items_embeded_images(&$item, $text){
+       function api_format_items_embeded_images(&$item, $text) {
                $text = preg_replace_callback(
                                "|data:image/([^;]+)[^=]+=*|m",
                                function($match) use ($item) {
@@ -2352,7 +2525,7 @@ use \Friendica\Core\Config;
                        'dislike' => array(),
                        'attendyes' => array(),
                        'attendno' => array(),
-                       'attendmaybe' => array()
+                       'attendmaybe' => array(),
                );
 
                $items = q('SELECT * FROM item
@@ -2360,13 +2533,13 @@ use \Friendica\Core\Config;
                                        intval($item['uid']),
                                        dbesc($item['uri']));
 
-               foreach ($items as $i){
+               foreach ($items as $i) {
                        // not used as result should be structured like other user data
                        //builtin_activity_puller($i, $activities);
 
                        // get user data and add it to the array of the activity
                        $user = api_get_user($a, $i['author-link']);
-                       switch($i['verb']) {
+                       switch ($i['verb']) {
                                case ACTIVITY_LIKE:
                                        $activities['like'][] = $user;
                                        break;
@@ -2468,25 +2641,27 @@ use \Friendica\Core\Config;
 
                $a = get_app();
 
-               $ret = Array();
+               $ret = array();
 
-               foreach($r as $item) {
+               foreach ($r as $item) {
 
                        localize_item($item);
-                       list($status_user, $owner_user) = api_item_get_user($a,$item);
+                       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 AND ($status_user["id"] != $user_info["id"])) {
                                continue;
+                       }
 
                        $in_reply_to = api_in_reply_to($item);
 
                        $converted = api_convert_item($item);
 
-                       if ($type == "xml")
+                       if ($type == "xml") {
                                $geo = "georss:point";
-                       else
+                       } else {
                                $geo = "geo";
+                       }
 
                        $status = array(
                                'text'          => $converted["text"],
@@ -2510,16 +2685,19 @@ use \Friendica\Core\Config;
                                'friendica_activities' => api_format_items_activities($item, $type),
                        );
 
-                       if (count($converted["attachments"]) > 0)
+                       if (count($converted["attachments"]) > 0) {
                                $status["attachments"] = $converted["attachments"];
+                       }
 
-                       if (count($converted["entities"]) > 0)
+                       if (count($converted["entities"]) > 0) {
                                $status["entities"] = $converted["entities"];
+                       }
 
-                       if (($item['item_network'] != "") AND ($status["source"] == 'web'))
+                       if (($item['item_network'] != "") AND ($status["source"] == 'web')) {
                                $status["source"] = network_to_name($item['item_network'], $user_info['url']);
-                       else if (($item['item_network'] != "") AND (network_to_name($item['item_network'], $user_info['url']) != $status["source"]))
+                       } elseif (($item['item_network'] != "") AND (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']).')');
+                       }
 
 
                        // Retweets are only valid for top postings
@@ -2534,7 +2712,7 @@ use \Friendica\Core\Config;
                                if ($retweeted_item !== false) {
                                        $retweeted_status = $status;
                                        try {
-                                               $retweeted_status["user"] = api_get_user($a,$retweeted_item["author-link"]);
+                                               $retweeted_status["user"] = api_get_user($a, $retweeted_item["author-link"]);
                                        } catch( BadRequestException $e ) {
                                                // user not found. should be found?
                                                /// @todo check if the user should be always found
@@ -2571,67 +2749,81 @@ use \Friendica\Core\Config;
                return $ret;
        }
 
-
        function api_account_rate_limit_status($type) {
 
-               if ($type == "xml")
+               if ($type == "xml") {
                        $hash = array(
-                                       'remaining-hits' => (string) 150,
+                                       'remaining-hits' => '150',
                                        '@attributes' => array("type" => "integer"),
-                                       'hourly-limit' => (string) 150,
+                                       'hourly-limit' => '150',
                                        '@attributes2' => array("type" => "integer"),
-                                       'reset-time' => datetime_convert('UTC','UTC','now + 1 hour',ATOM_TIME),
+                                       'reset-time' => datetime_convert('UTC', 'UTC','now + 1 hour',ATOM_TIME),
                                        '@attributes3' => array("type" => "datetime"),
                                        'reset_time_in_seconds' => strtotime('now + 1 hour'),
                                        '@attributes4' => array("type" => "integer"),
                                );
-               else
+               } else {
                        $hash = array(
                                        'reset_time_in_seconds' => strtotime('now + 1 hour'),
-                                       'remaining_hits' => (string) 150,
-                                       'hourly_limit' => (string) 150,
-                                       'reset_time' => api_date(datetime_convert('UTC','UTC','now + 1 hour',ATOM_TIME)),
+                                       'remaining_hits' => '150',
+                                       'hourly_limit' => '150',
+                                       'reset_time' => api_date(datetime_convert('UTC', 'UTC','now + 1 hour',ATOM_TIME)),
                                );
+               }
 
                return api_format_data('hash', $type, array('hash' => $hash));
        }
+
+       /// @TODO move to top of file or somwhere better
        api_register_func('api/account/rate_limit_status','api_account_rate_limit_status',true);
 
        function api_help_test($type) {
-               if ($type == 'xml')
+               if ($type == 'xml') {
                        $ok = "true";
-               else
+               } else {
                        $ok = "ok";
+               }
 
                return api_format_data('ok', $type, array("ok" => $ok));
        }
-       api_register_func('api/help/test','api_help_test',false);
+
+       /// @TODO move to top of file or somwhere better
+       api_register_func('api/help/test','api_help_test', false);
 
        function api_lists($type) {
                $ret = array();
+               /// @TODO $ret is not filled here?
                return api_format_data('lists', $type, array("lists_list" => $ret));
        }
+
+       /// @TODO move to top of file or somwhere better
        api_register_func('api/lists','api_lists',true);
 
        function api_lists_list($type) {
                $ret = array();
+               /// @TODO $ret is not filled here?
                return api_format_data('lists', $type, array("lists_list" => $ret));
        }
+
+       /// @TODO move to top of file or somwhere better
        api_register_func('api/lists/list','api_lists_list',true);
 
        /**
-        *  https://dev.twitter.com/docs/api/1/get/statuses/friends
-        *  This function is deprecated by Twitter
-        *  returns: json, xml
-        **/
+        * https://dev.twitter.com/docs/api/1/get/statuses/friends
+        * This function is deprecated by Twitter
+        * returns: json, xml
+        */
        function api_statuses_f($type, $qtype) {
 
                $a = get_app();
 
-               if (api_user()===false) throw new ForbiddenException();
+               if (api_user() === false) {
+                       throw new ForbiddenException();
+               }
+
                $user_info = api_get_user($a);
 
-               if (x($_GET,'cursor') && $_GET['cursor']=='undefined'){
+               if (x($_GET, 'cursor') && $_GET['cursor']=='undefined') {
                        /* this is to stop Hotot to load friends multiple times
                        *  I'm not sure if I'm missing return something or
                        *  is a bug in hotot. Workaround, meantime
@@ -2642,51 +2834,58 @@ use \Friendica\Core\Config;
                        return false;
                }
 
-               if($qtype == 'friends')
+               if ($qtype == 'friends') {
                        $sql_extra = sprintf(" AND ( `rel` = %d OR `rel` = %d ) ", intval(CONTACT_IS_SHARING), intval(CONTACT_IS_FRIEND));
-               if($qtype == 'followers')
+               }
+               if ($qtype == 'followers') {
                        $sql_extra = sprintf(" AND ( `rel` = %d OR `rel` = %d ) ", intval(CONTACT_IS_FOLLOWER), intval(CONTACT_IS_FRIEND));
+               }
 
                // friends and followers only for self
-               if ($user_info['self'] == 0)
+               if ($user_info['self'] == 0) {
                        $sql_extra = " AND false ";
+               }
 
                $r = q("SELECT `nurl` FROM `contact` WHERE `uid` = %d AND NOT `self` AND (NOT `blocked` OR `pending`) $sql_extra",
                        intval(api_user())
                );
 
                $ret = array();
-               foreach($r as $cid){
+               foreach ($r as $cid) {
                        $user = api_get_user($a, $cid['nurl']);
                        // "uid" and "self" are only needed for some internal stuff, so remove it from here
                        unset($user["uid"]);
                        unset($user["self"]);
 
-                       if ($user)
+                       if ($user) {
                                $ret[] = $user;
+                       }
                }
 
                return array('user' => $ret);
 
        }
-       function api_statuses_friends($type){
+
+       function api_statuses_friends($type) {
                $data =  api_statuses_f($type, "friends");
-               if ($data===false) return false;
-               return  api_format_data("users", $type, $data);
+               if ($data === false) {
+                       return false;
+               }
+               return api_format_data("users", $type, $data);
        }
-       function api_statuses_followers($type){
+
+       function api_statuses_followers($type) {
                $data = api_statuses_f($type, "followers");
-               if ($data===false) return false;
-               return  api_format_data("users", $type, $data);
+               if ($data === false) {
+                       return false;
+               }
+               return api_format_data("users", $type, $data);
        }
+
+       /// @TODO move to top of file or somewhere better
        api_register_func('api/statuses/friends','api_statuses_friends',true);
        api_register_func('api/statuses/followers','api_statuses_followers',true);
 
-
-
-
-
-
        function api_statusnet_config($type) {
 
                $a = get_app();
@@ -2698,8 +2897,9 @@ use \Friendica\Core\Config;
                $closed = (($a->config['register_policy'] == REGISTER_CLOSED) ? 'true' : 'false');
                $private = ((Config::get('system', 'block_public')) ? 'true' : 'false');
                $textlimit = (string) (($a->config['max_import_size']) ? $a->config['max_import_size'] : 200000);
-               if($a->config['api_import_size'])
+               if ($a->config['api_import_size']) {
                        $texlimit = string($a->config['api_import_size']);
+               }
                $ssl = ((Config::get('system', 'have_ssl')) ? 'true' : 'false');
                $sslserver = (($ssl === 'true') ? str_replace('http:','https:',App::get_baseurl()) : '');
 
@@ -2721,8 +2921,10 @@ use \Friendica\Core\Config;
                return api_format_data('config', $type, array('config' => $config));
 
        }
-       api_register_func('api/gnusocial/config','api_statusnet_config',false);
-       api_register_func('api/statusnet/config','api_statusnet_config',false);
+
+       /// @TODO move to top of file or somewhere better
+       api_register_func('api/gnusocial/config','api_statusnet_config', false);
+       api_register_func('api/statusnet/config','api_statusnet_config', false);
 
        function api_statusnet_version($type) {
                // liar
@@ -2730,8 +2932,10 @@ use \Friendica\Core\Config;
 
                return api_format_data('version', $type, array('version' => $fake_statusnet_version));
        }
-       api_register_func('api/gnusocial/version','api_statusnet_version',false);
-       api_register_func('api/statusnet/version','api_statusnet_version',false);
+
+       /// @TODO move to top of file or somewhere better
+       api_register_func('api/gnusocial/version','api_statusnet_version', false);
+       api_register_func('api/statusnet/version','api_statusnet_version', false);
 
        /**
         * @todo use api_format_data() to return data
@@ -2740,19 +2944,24 @@ use \Friendica\Core\Config;
 
                $a = get_app();
 
-               if(! api_user()) throw new ForbiddenException();
+               if (! api_user()) {
+                       throw new ForbiddenException();
+               }
 
                $user_info = api_get_user($a);
 
-               if($qtype == 'friends')
+               if ($qtype == 'friends') {
                        $sql_extra = sprintf(" AND ( `rel` = %d OR `rel` = %d ) ", intval(CONTACT_IS_SHARING), intval(CONTACT_IS_FRIEND));
-               if($qtype == 'followers')
+               }
+               if ($qtype == 'followers') {
                        $sql_extra = sprintf(" AND ( `rel` = %d OR `rel` = %d ) ", intval(CONTACT_IS_FOLLOWER), intval(CONTACT_IS_FRIEND));
+               }
 
-               if (!$user_info["self"])
+               if (!$user_info["self"]) {
                        $sql_extra = " AND false ";
+               }
 
-               $stringify_ids = (x($_REQUEST,'stringify_ids')?$_REQUEST['stringify_ids']:false);
+               $stringify_ids = (x($_REQUEST, 'stringify_ids') ? $_REQUEST['stringify_ids'] : false);
 
                $r = q("SELECT `pcontact`.`id` FROM `contact`
                                INNER JOIN `contact` AS `pcontact` ON `contact`.`nurl` = `pcontact`.`nurl` AND `pcontact`.`uid` = 0
@@ -2760,15 +2969,18 @@ use \Friendica\Core\Config;
                        intval(api_user())
                );
 
-               if (!dbm::is_result($r))
+               if (!dbm::is_result($r)) {
                        return;
+               }
 
                $ids = array();
-               foreach($r as $rr)
-                       if ($stringify_ids)
+               foreach ($r as $rr) {
+                       if ($stringify_ids) {
                                $ids[] = $rr['id'];
-                       else
+                       } else {
                                $ids[] = intval($rr['id']);
+                       }
+               }
 
                return api_format_data("ids", $type, array('id' => $ids));
        }
@@ -2776,18 +2988,20 @@ use \Friendica\Core\Config;
        function api_friends_ids($type) {
                return api_ff_ids($type,'friends');
        }
+
        function api_followers_ids($type) {
                return api_ff_ids($type,'followers');
        }
+
+       /// @TODO move to top of file or somewhere better
        api_register_func('api/friends/ids','api_friends_ids',true);
        api_register_func('api/followers/ids','api_followers_ids',true);
 
-
        function api_direct_messages_new($type) {
 
                $a = get_app();
 
-               if (api_user()===false) throw new ForbiddenException();
+               if (api_user() === false) throw new ForbiddenException();
 
                if (!x($_POST, "text") OR (!x($_POST,"screen_name") AND !x($_POST,"user_id"))) return;
 
@@ -2807,45 +3021,43 @@ use \Friendica\Core\Config;
 
                $replyto = '';
                $sub     = '';
-               if (x($_REQUEST,'replyto')) {
+               if (x($_REQUEST, 'replyto')) {
                        $r = q('SELECT `parent-uri`, `title` FROM `mail` WHERE `uid`=%d AND `id`=%d',
                                        intval(api_user()),
                                        intval($_REQUEST['replyto']));
                        $replyto = $r[0]['parent-uri'];
                        $sub     = $r[0]['title'];
-               }
-               else {
-                       if (x($_REQUEST,'title')) {
+               } else {
+                       if (x($_REQUEST, 'title')) {
                                $sub = $_REQUEST['title'];
-                       }
-                       else {
-                               $sub = ((strlen($_POST['text'])>10)?substr($_POST['text'],0,10)."...":$_POST['text']);
+                       } else {
+                               $sub = ((strlen($_POST['text'])>10) ? substr($_POST['text'],0,10)."...":$_POST['text']);
                        }
                }
 
                $id = send_message($recipient['cid'], $_POST['text'], $sub, $replyto);
 
-               if ($id>-1) {
+               if ($id > -1) {
                        $r = q("SELECT * FROM `mail` WHERE id=%d", intval($id));
                        $ret = api_format_messages($r[0], $recipient, $sender);
-
                } else {
                        $ret = array("error"=>$id);
                }
 
-               $data = Array('direct_message'=>$ret);
+               $data = array('direct_message'=>$ret);
 
-               switch($type){
+               switch ($type) {
                        case "atom":
                        case "rss":
                                $data = api_rss_extra($a, $data, $user_info);
                }
 
-               return  api_format_data("direct-messages", $type, $data);
+               return api_format_data("direct-messages", $type, $data);
 
        }
-       api_register_func('api/direct_messages/new','api_direct_messages_new',true, API_METHOD_POST);
 
+       /// @TODO move to top of file or somewhere better
+       api_register_func('api/direct_messages/new','api_direct_messages_new',true, API_METHOD_POST);
 
        /**
         * @brief delete a direct_message from mail table through api
@@ -2853,31 +3065,33 @@ use \Friendica\Core\Config;
         * @param string $type Known types are 'atom', 'rss', 'xml' and 'json'
         * @return string
         */
-       function api_direct_messages_destroy($type){
+       function api_direct_messages_destroy($type) {
                $a = get_app();
 
-               if (api_user()===false) throw new ForbiddenException();
+               if (api_user() === false) {
+                       throw new ForbiddenException();
+               }
 
                // params
                $user_info = api_get_user($a);
                //required
-               $id = (x($_REQUEST,'id') ? $_REQUEST['id'] : 0);
+               $id = (x($_REQUEST, 'id') ? $_REQUEST['id'] : 0);
                // optional
                $parenturi = (x($_REQUEST, 'friendica_parenturi') ? $_REQUEST['friendica_parenturi'] : "");
-               $verbose = (x($_GET,'friendica_verbose')?strtolower($_GET['friendica_verbose']):"false");
+               $verbose = (x($_GET, 'friendica_verbose') ? strtolower($_GET['friendica_verbose']) : "false");
                /// @todo optional parameter 'include_entities' from Twitter API not yet implemented
 
                $uid = $user_info['uid'];
                // error if no id or parenturi specified (for clients posting parent-uri as well)
-               if ($verbose == "true") {
-                       if ($id == 0 || $parenturi == "") {
-                               $answer = array('result' => 'error', 'message' => 'message id or parenturi not specified');
-                               return api_format_data("direct_messages_delete", $type, array('$result' => $answer));
-                       }
+               if ($verbose == "true" && ($id == 0 || $parenturi == "")) {
+                       $answer = array('result' => 'error', 'message' => 'message id or parenturi not specified');
+                       return api_format_data("direct_messages_delete", $type, array('$result' => $answer));
                }
 
                // BadRequestException if no id specified (for clients using Twitter API)
-               if ($id == 0) throw new BadRequestException('Message id not specified');
+               if ($id == 0) {
+                       throw new BadRequestException('Message id not specified');
+               }
 
                // add parent-uri to sql command if specified by calling app
                $sql_extra = ($parenturi != "" ? " AND `parent-uri` = '" . dbesc($parenturi) . "'" : "");
@@ -2907,8 +3121,7 @@ use \Friendica\Core\Config;
                                // return success
                                $answer = array('result' => 'ok', 'message' => 'message deleted');
                                return api_format_data("direct_message_delete", $type, array('$result' => $answer));
-                       }
-                       else {
+                       } else {
                                $answer = array('result' => 'error', 'message' => 'unknown error');
                                return api_format_data("direct_messages_delete", $type, array('$result' => $answer));
                        }
@@ -2916,25 +3129,30 @@ use \Friendica\Core\Config;
                /// @todo return JSON data like Twitter API not yet implemented
 
        }
-       api_register_func('api/direct_messages/destroy', 'api_direct_messages_destroy', true, API_METHOD_DELETE);
 
+       /// @TODO move to top of file or somewhere better
+       api_register_func('api/direct_messages/destroy', 'api_direct_messages_destroy', true, API_METHOD_DELETE);
 
        function api_direct_messages_box($type, $box, $verbose) {
 
                $a = get_app();
 
-               if (api_user()===false) throw new ForbiddenException();
+               if (api_user() === false) {
+                       throw new ForbiddenException();
+               }
 
                // params
-               $count = (x($_GET,'count')?$_GET['count']:20);
-               $page = (x($_REQUEST,'page')?$_REQUEST['page']-1:0);
-               if ($page<0) $page=0;
+               $count = (x($_GET, 'count') ? $_GET['count'] : 20);
+               $page = (x($_REQUEST, 'page') ? $_REQUEST['page'] -1 : 0);
+               if ($page < 0) {
+                       $page = 0;
+               }
 
-               $since_id = (x($_REQUEST,'since_id')?$_REQUEST['since_id']:0);
-               $max_id = (x($_REQUEST,'max_id')?$_REQUEST['max_id']:0);
+               $since_id = (x($_REQUEST, 'since_id') ? $_REQUEST['since_id'] : 0);
+               $max_id = (x($_REQUEST, 'max_id') ? $_REQUEST['max_id'] : 0);
 
-               $user_id = (x($_REQUEST,'user_id')?$_REQUEST['user_id']:"");
-               $screen_name = (x($_REQUEST,'screen_name')?$_REQUEST['screen_name']:"");
+               $user_id = (x($_REQUEST, 'user_id') ? $_REQUEST['user_id'] : "");
+               $screen_name = (x($_REQUEST, 'screen_name') ? $_REQUEST['screen_name'] : "");
 
                //  caller user info
                unset($_REQUEST["user_id"]);
@@ -2946,31 +3164,27 @@ use \Friendica\Core\Config;
                $user_info = api_get_user($a);
                $profile_url = $user_info["url"];
 
-
                // pagination
-               $start = $page*$count;
+               $start = $page * $count;
 
                // filters
                if ($box=="sentbox") {
-                       $sql_extra = "`mail`.`from-url`='".dbesc( $profile_url )."'";
-               }
-               elseif ($box=="conversation") {
-                       $sql_extra = "`mail`.`parent-uri`='".dbesc( $_GET["uri"] )  ."'";
-               }
-               elseif ($box=="all") {
+                       $sql_extra = "`mail`.`from-url`='" . dbesc( $profile_url ) . "'";
+               } elseif ($box == "conversation") {
+                       $sql_extra = "`mail`.`parent-uri`='" . dbesc( $_GET["uri"] )  . "'";
+               } elseif ($box == "all") {
                        $sql_extra = "true";
-               }
-               elseif ($box=="inbox") {
-                       $sql_extra = "`mail`.`from-url`!='".dbesc( $profile_url )."'";
+               } elseif ($box == "inbox") {
+                       $sql_extra = "`mail`.`from-url`!='" . dbesc( $profile_url ) . "'";
                }
 
-               if ($max_id > 0)
-                       $sql_extra .= ' AND `mail`.`id` <= '.intval($max_id);
+               if ($max_id > 0) {
+                       $sql_extra .= ' AND `mail`.`id` <= ' . intval($max_id);
+               }
 
-               if ($user_id !="") {
+               if ($user_id != "") {
                        $sql_extra .= ' AND `mail`.`contact-id` = ' . intval($user_id);
-               }
-               elseif($screen_name !=""){
+               } elseif ($screen_name !="") {
                        $sql_extra .= " AND `contact`.`nick` = '" . dbesc($screen_name). "'";
                }
 
@@ -2979,131 +3193,142 @@ use \Friendica\Core\Config;
                                intval($since_id),
                                intval($start), intval($count)
                );
-               if ($verbose == "true") {
-                       // stop execution and return error message if no mails available
-                       if($r == null) {
-                               $answer = array('result' => 'error', 'message' => 'no mails available');
-                               return api_format_data("direct_messages_all", $type, array('$result' => $answer));
-                       }
+               if ($verbose == "true" && !dbm::is_result($r)) {
+                       $answer = array('result' => 'error', 'message' => 'no mails available');
+                       return api_format_data("direct_messages_all", $type, array('$result' => $answer));
                }
 
-               $ret = Array();
-               foreach($r as $item) {
-                       if ($box == "inbox" || $item['from-url'] != $profile_url){
+               $ret = array();
+               foreach ($r as $item) {
+                       if ($box == "inbox" || $item['from-url'] != $profile_url) {
                                $recipient = $user_info;
                                $sender = api_get_user($a,normalise_link($item['contact-url']));
-                       }
-                       elseif ($box == "sentbox" || $item['from-url'] == $profile_url){
+                       } elseif ($box == "sentbox" || $item['from-url'] == $profile_url) {
                                $recipient = api_get_user($a,normalise_link($item['contact-url']));
                                $sender = $user_info;
-
                        }
-                       $ret[]=api_format_messages($item, $recipient, $sender);
+
+                       $ret[] = api_format_messages($item, $recipient, $sender);
                }
 
 
                $data = array('direct_message' => $ret);
-               switch($type){
+               switch ($type) {
                        case "atom":
                        case "rss":
                                $data = api_rss_extra($a, $data, $user_info);
                }
 
-               return  api_format_data("direct-messages", $type, $data);
+               return api_format_data("direct-messages", $type, $data);
 
        }
 
-       function api_direct_messages_sentbox($type){
-               $verbose = (x($_GET,'friendica_verbose')?strtolower($_GET['friendica_verbose']):"false");
+       function api_direct_messages_sentbox($type) {
+               $verbose = (x($_GET, 'friendica_verbose') ? strtolower($_GET['friendica_verbose']) : "false");
                return api_direct_messages_box($type, "sentbox", $verbose);
        }
-       function api_direct_messages_inbox($type){
-               $verbose = (x($_GET,'friendica_verbose')?strtolower($_GET['friendica_verbose']):"false");
+
+       function api_direct_messages_inbox($type) {
+               $verbose = (x($_GET, 'friendica_verbose') ? strtolower($_GET['friendica_verbose']) : "false");
                return api_direct_messages_box($type, "inbox", $verbose);
        }
-       function api_direct_messages_all($type){
-               $verbose = (x($_GET,'friendica_verbose')?strtolower($_GET['friendica_verbose']):"false");
+
+       function api_direct_messages_all($type) {
+               $verbose = (x($_GET, 'friendica_verbose') ? strtolower($_GET['friendica_verbose']) : "false");
                return api_direct_messages_box($type, "all", $verbose);
        }
-       function api_direct_messages_conversation($type){
-               $verbose = (x($_GET,'friendica_verbose')?strtolower($_GET['friendica_verbose']):"false");
+
+       function api_direct_messages_conversation($type) {
+               $verbose = (x($_GET, 'friendica_verbose') ? strtolower($_GET['friendica_verbose']) : "false");
                return api_direct_messages_box($type, "conversation", $verbose);
        }
+
+       /// @TODO move to top of file or somewhere better
        api_register_func('api/direct_messages/conversation','api_direct_messages_conversation',true);
        api_register_func('api/direct_messages/all','api_direct_messages_all',true);
        api_register_func('api/direct_messages/sent','api_direct_messages_sentbox',true);
        api_register_func('api/direct_messages','api_direct_messages_inbox',true);
 
-
-
-       function api_oauth_request_token($type){
-               try{
+       function api_oauth_request_token($type) {
+               try {
                        $oauth = new FKOAuth1();
                        $r = $oauth->fetch_request_token(OAuthRequest::from_request());
-               }catch(Exception $e){
-                       echo "error=". OAuthUtil::urlencode_rfc3986($e->getMessage()); killme();
+               } catch (Exception $e) {
+                       echo "error=" . OAuthUtil::urlencode_rfc3986($e->getMessage());
+                       killme();
                }
                echo $r;
                killme();
        }
-       function api_oauth_access_token($type){
-               try{
+
+       function api_oauth_access_token($type) {
+               try {
                        $oauth = new FKOAuth1();
                        $r = $oauth->fetch_access_token(OAuthRequest::from_request());
-               }catch(Exception $e){
+               } catch (Exception $e) {
                        echo "error=". OAuthUtil::urlencode_rfc3986($e->getMessage()); killme();
                }
                echo $r;
                killme();
        }
 
+       /// @TODO move to top of file or somewhere better
        api_register_func('api/oauth/request_token', 'api_oauth_request_token', false);
        api_register_func('api/oauth/access_token', 'api_oauth_access_token', false);
 
-
        function api_fr_photos_list($type) {
-               if (api_user()===false) throw new ForbiddenException();
-               $r = q("select `resource-id`, max(scale) as scale, album, filename, type from photo
-                               where uid = %d and album != 'Contact Photos' group by `resource-id`",
+               if (api_user() === false) {
+                       throw new ForbiddenException();
+               }
+
+               $r = q("SELECT `resource-id`, MAX(`scale`) AS `scale`, `album`, `filename`, `type`
+                               FROM `photo`
+                               WHERE `uid` = %d AND `album` != 'Contact Photos' GROUP BY `resource-id`, `album`, `filename`, `type`",
                        intval(local_user())
                );
                $typetoext = array(
-               'image/jpeg' => 'jpg',
-               'image/png' => 'png',
-               'image/gif' => 'gif'
+                       'image/jpeg' => 'jpg',
+                       'image/png' => 'png',
+                       'image/gif' => 'gif'
                );
-               $data = array('photo'=>array());
-               if ($r) {
+               $data = array('photo' => array());
+               if (dbm::is_result($r)) {
                        foreach ($r as $rr) {
                                $photo = array();
                                $photo['id'] = $rr['resource-id'];
                                $photo['album'] = $rr['album'];
                                $photo['filename'] = $rr['filename'];
                                $photo['type'] = $rr['type'];
-                               $thumb = App::get_baseurl()."/photo/".$rr['resource-id']."-".$rr['scale'].".".$typetoext[$rr['type']];
+                               $thumb = App::get_baseurl() . "/photo/" . $rr['resource-id'] . "-" . $rr['scale'] . "." . $typetoext[$rr['type']];
 
-                               if ($type == "xml")
+                               if ($type == "xml") {
                                        $data['photo'][] = array("@attributes" => $photo, "1" => $thumb);
-                               else {
+                               else {
                                        $photo['thumb'] = $thumb;
                                        $data['photo'][] = $photo;
                                }
                        }
                }
-               return  api_format_data("photos", $type, $data);
+               return api_format_data("photos", $type, $data);
        }
 
        function api_fr_photo_detail($type) {
-               if (api_user()===false) throw new ForbiddenException();
-               if(!x($_REQUEST,'photo_id')) throw new BadRequestException("No photo id.");
+               if (api_user() === false) {
+                       throw new ForbiddenException();
+               } elseif (!x($_REQUEST, 'photo_id')) {
+                       throw new BadRequestException("No photo id.");
+               }
 
                $scale = (x($_REQUEST, 'scale') ? intval($_REQUEST['scale']) : false);
-               $scale_sql = ($scale === false ? "" : sprintf("and scale=%d",intval($scale)));
-               $data_sql = ($scale === false ? "" : "data, ");
-
-               $r = q("select %s `resource-id`, `created`, `edited`, `title`, `desc`, `album`, `filename`,
-                                               `type`, `height`, `width`, `datasize`, `profile`, min(`scale`) as minscale, max(`scale`) as maxscale
-                               from photo where `uid` = %d and `resource-id` = '%s' %s group by `resource-id`",
+               $scale_sql = ($scale === false ? "" : sprintf("AND `scale`=%d",intval($scale)));
+               $data_sql = ($scale === false ? "" : "ANY_VALUE(`data`) AS data`,");
+
+               $r = q("SELECT %s ANY_VALUE(`resource-id`) AS `resource-id`, ANY_VALUE(`created`) AS `created`,
+                               ANY_VALUE(`edited`) AS `edited`, ANY_VALUE(`title`) AS `title`, ANY_VALUE(`desc`) AS `desc`,
+                               ANY_VALUE(`album`) AS `album`, ANY_VALUE(`filename`) AS `filename`, ANY_VALUE(`type`) AS `type`,
+                               ANY_VALUE(`height`) AS `height`, ANY_VALUE(`width`) AS `width`, ANY_VALUE(`datasize`) AS `datasize`,
+                               ANY_VALUE(`profile`) AS `profile`, min(`scale`) as minscale, max(`scale`) as maxscale
+                               FROM `photo` WHERE `uid` = %d AND `resource-id` = '%s' %s",
                        $data_sql,
                        intval(local_user()),
                        dbesc($_REQUEST['photo_id']),
@@ -3111,12 +3336,12 @@ use \Friendica\Core\Config;
                );
 
                $typetoext = array(
-               'image/jpeg' => 'jpg',
-               'image/png' => 'png',
-               'image/gif' => 'gif'
+                       'image/jpeg' => 'jpg',
+                       'image/png' => 'png',
+                       'image/gif' => 'gif'
                );
 
-               if ($r) {
+               if (dbm::is_result($r)) {
                        $data = array('photo' => $r[0]);
                        $data['photo']['id'] = $data['photo']['resource-id'];
                        if ($scale !== false) {
@@ -3126,14 +3351,15 @@ use \Friendica\Core\Config;
                        }
                        if ($type == "xml") {
                                $data['photo']['links'] = array();
-                               for ($k=intval($data['photo']['minscale']); $k<=intval($data['photo']['maxscale']); $k++)
-                                       $data['photo']['links'][$k.":link"]["@attributes"] = array("type" => $data['photo']['type'],
-                                                                                       "scale" => $k,
-                                                                                       "href" => App::get_baseurl()."/photo/".$data['photo']['resource-id']."-".$k.".".$typetoext[$data['photo']['type']]);
+                               for ($k = intval($data['photo']['minscale']); $k <= intval($data['photo']['maxscale']); $k++) {
+                                       $data['photo']['links'][$k . ":link"]["@attributes"] = array("type" => $data['photo']['type'],
+                                               "scale" => $k,
+                                               "href" => App::get_baseurl() . "/photo/" . $data['photo']['resource-id'] . "-" . $k . "." . $typetoext[$data['photo']['type']]);
+                               }
                        } else {
                                $data['photo']['link'] = array();
-                               for ($k=intval($data['photo']['minscale']); $k<=intval($data['photo']['maxscale']); $k++) {
-                                       $data['photo']['link'][$k] = App::get_baseurl()."/photo/".$data['photo']['resource-id']."-".$k.".".$typetoext[$data['photo']['type']];
+                               for ($k = intval($data['photo']['minscale']); $k <= intval($data['photo']['maxscale']); $k++) {
+                                       $data['photo']['link'][$k] = App::get_baseurl() . "/photo/" . $data['photo']['resource-id'] . "-" . $k . "." . $typetoext[$data['photo']['type']];
                                }
                        }
                        unset($data['photo']['resource-id']);
@@ -3164,11 +3390,12 @@ use \Friendica\Core\Config;
         *              url: string, url to redirect after auth
         */
        function api_friendica_remoteauth() {
-               $url = ((x($_GET,'url')) ? $_GET['url'] : '');
-               $c_url = ((x($_GET,'c_url')) ? $_GET['c_url'] : '');
+               $url = ((x($_GET, 'url')) ? $_GET['url'] : '');
+               $c_url = ((x($_GET, 'c_url')) ? $_GET['c_url'] : '');
 
-               if ($url === '' || $c_url === '')
+               if ($url === '' || $c_url === '') {
                        throw new BadRequestException("Wrong parameters.");
+               }
 
                $c_url = normalise_link($c_url);
 
@@ -3179,18 +3406,19 @@ use \Friendica\Core\Config;
                        intval(api_user())
                );
 
-               if ((! dbm::is_result($r)) || ($r[0]['network'] !== NETWORK_DFRN))
+               if ((! dbm::is_result($r)) || ($r[0]['network'] !== NETWORK_DFRN)) {
                        throw new BadRequestException("Unknown contact");
+               }
 
                $cid = $r[0]['id'];
 
                $dfrn_id = $orig_id = (($r[0]['issued-id']) ? $r[0]['issued-id'] : $r[0]['dfrn-id']);
 
-               if($r[0]['duplex'] && $r[0]['issued-id']) {
+               if ($r[0]['duplex'] && $r[0]['issued-id']) {
                        $orig_id = $r[0]['issued-id'];
                        $dfrn_id = '1:' . $orig_id;
                }
-               if($r[0]['duplex'] && $r[0]['dfrn-id']) {
+               if ($r[0]['duplex'] && $r[0]['dfrn-id']) {
                        $orig_id = $r[0]['dfrn-id'];
                        $dfrn_id = '0:' . $orig_id;
                }
@@ -3227,12 +3455,16 @@ use \Friendica\Core\Config;
                        return false;
                }
 
-               $attributes = preg_replace("/\[share(.*?)\]\s?(.*?)\s?\[\/share\]\s?/ism","$1",$body);
-               // Skip if there is no shared message in there
-               // we already checked this in diaspora::is_reshare()
-               // but better one more than one less...
-               if ($body == $attributes)
+               /// @TODO "$1" should maybe mean '$1' ?
+               $attributes = preg_replace("/\[share(.*?)\]\s?(.*?)\s?\[\/share\]\s?/ism", "$1", $body);
+               /*
+                * Skip if there is no shared message in there
+                * we already checked this in diaspora::is_reshare()
+                * but better one more than one less...
+                */
+               if ($body == $attributes) {
                        return false;
+               }
 
 
                // build the fake reshared item
@@ -3240,55 +3472,63 @@ use \Friendica\Core\Config;
 
                $author = "";
                preg_match("/author='(.*?)'/ism", $attributes, $matches);
-               if ($matches[1] != "")
-                       $author = html_entity_decode($matches[1],ENT_QUOTES,'UTF-8');
+               if ($matches[1] != "") {
+                       $author = html_entity_decode($matches[1], ENT_QUOTES, 'UTF-8');
+               }
 
                preg_match('/author="(.*?)"/ism', $attributes, $matches);
-               if ($matches[1] != "")
+               if ($matches[1] != "") {
                        $author = $matches[1];
+               }
 
                $profile = "";
                preg_match("/profile='(.*?)'/ism", $attributes, $matches);
-               if ($matches[1] != "")
+               if ($matches[1] != "") {
                        $profile = $matches[1];
+               }
 
                preg_match('/profile="(.*?)"/ism', $attributes, $matches);
-               if ($matches[1] != "")
+               if ($matches[1] != "") {
                        $profile = $matches[1];
+               }
 
                $avatar = "";
                preg_match("/avatar='(.*?)'/ism", $attributes, $matches);
-               if ($matches[1] != "")
+               if ($matches[1] != "") {
                        $avatar = $matches[1];
+               }
 
                preg_match('/avatar="(.*?)"/ism', $attributes, $matches);
-               if ($matches[1] != "")
+               if ($matches[1] != "") {
                        $avatar = $matches[1];
+               }
 
                $link = "";
                preg_match("/link='(.*?)'/ism", $attributes, $matches);
-               if ($matches[1] != "")
+               if ($matches[1] != "") {
                        $link = $matches[1];
+               }
 
                preg_match('/link="(.*?)"/ism', $attributes, $matches);
-               if ($matches[1] != "")
+               if ($matches[1] != "") {
                        $link = $matches[1];
+               }
 
                $posted = "";
                preg_match("/posted='(.*?)'/ism", $attributes, $matches);
                if ($matches[1] != "")
-                       $posted= $matches[1];
+                       $posted = $matches[1];
 
                preg_match('/posted="(.*?)"/ism', $attributes, $matches);
-               if ($matches[1] != "")
+               if ($matches[1] != "") {
                        $posted = $matches[1];
+               }
 
                $shared_body = preg_replace("/\[share(.*?)\]\s?(.*?)\s?\[\/share\]\s?/ism","$2",$body);
 
-               if (($shared_body == "") || ($profile == "") || ($author == "") || ($avatar == "") || ($posted == ""))
+               if (($shared_body == "") || ($profile == "") || ($author == "") || ($avatar == "") || ($posted == "")) {
                        return false;
-
-
+               }
 
                $reshared_item["body"] = $shared_body;
                $reshared_item["author-name"] = $author;
@@ -3312,32 +3552,39 @@ use \Friendica\Core\Config;
 
                $r = q("SELECT `nick` FROM `contact` WHERE `uid` = 0 AND `nurl` = '%s'",
                        dbesc(normalise_link($profile)));
-               if ($r)
+
+               if (dbm::is_result($r)) {
                        $nick = $r[0]["nick"];
+               }
 
                if (!$nick == "") {
                        $r = q("SELECT `nick` FROM `contact` WHERE `uid` = 0 AND `nurl` = '%s'",
                                dbesc(normalise_link($profile)));
-                       if ($r)
+
+                       if (dbm::is_result($r)) {
                                $nick = $r[0]["nick"];
+                       }
                }
 
                if (!$nick == "") {
                        $friendica = preg_replace("=https?://(.*)/profile/(.*)=ism", "$2", $profile);
-                       if ($friendica != $profile)
+                       if ($friendica != $profile) {
                                $nick = $friendica;
+                       }
                }
 
                if (!$nick == "") {
                        $diaspora = preg_replace("=https?://(.*)/u/(.*)=ism", "$2", $profile);
-                       if ($diaspora != $profile)
+                       if ($diaspora != $profile) {
                                $nick = $diaspora;
+                       }
                }
 
                if (!$nick == "") {
                        $twitter = preg_replace("=https?://twitter.com/(.*)=ism", "$1", $profile);
-                       if ($twitter != $profile)
+                       if ($twitter != $profile) {
                                $nick = $twitter;
+                       }
                }
 
 
@@ -3348,8 +3595,9 @@ use \Friendica\Core\Config;
                                if ($StatusnetUser != $profile) {
                                        $UserData = fetch_url("http://".$StatusnetHost."/api/users/show.json?user_id=".$StatusnetUser);
                                        $user = json_decode($UserData);
-                                       if ($user)
+                                       if ($user) {
                                                $nick = $user->screen_name;
+                                       }
                                }
                        }
                }
@@ -3363,10 +3611,11 @@ use \Friendica\Core\Config;
 
                //}
 
-               if ($nick != "")
-                       return($nick);
+               if ($nick != "") {
+                       return $nick;
+               }
 
-               return(false);
+               return false;
        }
 
        function api_in_reply_to($item) {
@@ -3424,7 +3673,7 @@ use \Friendica\Core\Config;
        }
 
        function api_clean_plain_items($Text) {
-               $include_entities = strtolower(x($_REQUEST,'include_entities')?$_REQUEST['include_entities']:"false");
+               $include_entities = strtolower(x($_REQUEST, 'include_entities') ? $_REQUEST['include_entities'] : "false");
 
                $Text = bb_CleanPictureLinks($Text);
                $URLSearchString = "^\[\]";
@@ -3518,11 +3767,11 @@ use \Friendica\Core\Config;
 
                $a = get_app();
 
-               if (api_user()===false) throw new ForbiddenException();
+               if (api_user() === false) throw new ForbiddenException();
 
                // params
                $user_info = api_get_user($a);
-               $gid = (x($_REQUEST,'gid') ? $_REQUEST['gid'] : 0);
+               $gid = (x($_REQUEST, 'gid') ? $_REQUEST['gid'] : 0);
                $uid = $user_info['uid'];
 
                // get data of the specified group id or all groups if not specified
@@ -3569,11 +3818,11 @@ use \Friendica\Core\Config;
 
                $a = get_app();
 
-               if (api_user()===false) throw new ForbiddenException();
+               if (api_user() === false) throw new ForbiddenException();
 
                // params
                $user_info = api_get_user($a);
-               $gid = (x($_REQUEST,'gid') ? $_REQUEST['gid'] : 0);
+               $gid = (x($_REQUEST, 'gid') ? $_REQUEST['gid'] : 0);
                $name = (x($_REQUEST, 'name') ? $_REQUEST['name'] : "");
                $uid = $user_info['uid'];
 
@@ -3616,7 +3865,7 @@ use \Friendica\Core\Config;
 
                $a = get_app();
 
-               if (api_user()===false) throw new ForbiddenException();
+               if (api_user() === false) throw new ForbiddenException();
 
                // params
                $user_info = api_get_user($a);
@@ -3682,7 +3931,7 @@ use \Friendica\Core\Config;
 
                $a = get_app();
 
-               if (api_user()===false) throw new ForbiddenException();
+               if (api_user() === false) throw new ForbiddenException();
 
                // params
                $user_info = api_get_user($a);
@@ -3734,14 +3983,14 @@ use \Friendica\Core\Config;
                $success = array('success' => true, 'gid' => $gid, 'name' => $name, 'status' => $status, 'wrong users' => $errorusers);
                return api_format_data("group_update", $type, array('result' => $success));
        }
-       api_register_func('api/friendica/group_update', 'api_friendica_group_update', true, API_METHOD_POST);
 
+       api_register_func('api/friendica/group_update', 'api_friendica_group_update', true, API_METHOD_POST);
 
        function api_friendica_activity($type) {
 
                $a = get_app();
 
-               if (api_user()===false) throw new ForbiddenException();
+               if (api_user() === false) throw new ForbiddenException();
                $verb = strtolower($a->argv[3]);
                $verb = preg_replace("|\..*$|", "", $verb);
 
@@ -3760,6 +4009,8 @@ use \Friendica\Core\Config;
                }
 
        }
+
+       /// @TODO move to top of file or somwhere better
        api_register_func('api/friendica/activity/like', 'api_friendica_activity', true, API_METHOD_POST);
        api_register_func('api/friendica/activity/dislike', 'api_friendica_activity', true, API_METHOD_POST);
        api_register_func('api/friendica/activity/attendyes', 'api_friendica_activity', true, API_METHOD_POST);
@@ -3781,7 +4032,7 @@ use \Friendica\Core\Config;
 
                $a = get_app();
 
-               if (api_user()===false) throw new ForbiddenException();
+               if (api_user() === false) throw new ForbiddenException();
                if ($a->argc!==3) throw new BadRequestException("Invalid argument count");
                $nm = new NotificationsManager();
 
@@ -3806,11 +4057,11 @@ use \Friendica\Core\Config;
         * @param string $type Known types are 'atom', 'rss', 'xml' and 'json'
         * @return string
         */
-       function api_friendica_notification_seen($type){
+       function api_friendica_notification_seen($type) {
 
                $a = get_app();
 
-               if (api_user()===false) throw new ForbiddenException();
+               if (api_user() === false) throw new ForbiddenException();
                if ($a->argc!==4) throw new BadRequestException("Invalid argument count");
 
                $id = (x($_REQUEST, 'id') ? intval($_REQUEST['id']) : 0);
@@ -3838,19 +4089,21 @@ use \Friendica\Core\Config;
                return api_format_data('result', $type, array('result' => "success"));
        }
 
+       /// @TODO move to top of file or somwhere better
        api_register_func('api/friendica/notification/seen', 'api_friendica_notification_seen', true, API_METHOD_POST);
        api_register_func('api/friendica/notification', 'api_friendica_notification', true, API_METHOD_GET);
 
-
        /**
         * @brief update a direct_message to seen state
         *
         * @param string $type Known types are 'atom', 'rss', 'xml' and 'json'
         * @return string (success result=ok, error result=error with error message)
         */
-       function api_friendica_direct_messages_setseen($type){
+       function api_friendica_direct_messages_setseen($type) {
                $a = get_app();
-               if (api_user()===false) throw new ForbiddenException();
+               if (api_user() === false) {
+                       throw new ForbiddenException();
+               }
 
                // params
                $user_info = api_get_user($a);
@@ -3867,6 +4120,7 @@ use \Friendica\Core\Config;
                $r = q("SELECT `id` FROM `mail` WHERE `id` = %d AND `uid` = %d",
                        intval($id),
                        intval($uid));
+
                // error message if specified id is not in database
                if (!dbm::is_result($r)) {
                        $answer = array('result' => 'error', 'message' => 'message id not in database');
@@ -3887,10 +4141,9 @@ use \Friendica\Core\Config;
                        return api_format_data("direct_messages_setseen", $type, array('$result' => $answer));
                }
        }
-       api_register_func('api/friendica/direct_messages_setseen', 'api_friendica_direct_messages_setseen', true);
-
-
 
+       /// @TODO move to top of file or somwhere better
+       api_register_func('api/friendica/direct_messages_setseen', 'api_friendica_direct_messages_setseen', true);
 
        /**
         * @brief search for direct_messages containing a searchstring through api
@@ -3900,14 +4153,16 @@ use \Friendica\Core\Config;
         *                          success=false if nothing was found, search_result='nothing found',
         *                 error: result=error with error message)
         */
-       function api_friendica_direct_messages_search($type){
+       function api_friendica_direct_messages_search($type) {
                $a = get_app();
 
-               if (api_user()===false) throw new ForbiddenException();
+               if (api_user() === false) {
+                       throw new ForbiddenException();
+               }
 
                // params
                $user_info = api_get_user($a);
-               $searchstring = (x($_REQUEST,'searchstring') ? $_REQUEST['searchstring'] : "");
+               $searchstring = (x($_REQUEST, 'searchstring') ? $_REQUEST['searchstring'] : "");
                $uid = $user_info['uid'];
 
                // error if no searchstring specified
@@ -3923,29 +4178,32 @@ use \Friendica\Core\Config;
                );
 
                $profile_url = $user_info["url"];
+
                // message if nothing was found
-               if (!dbm::is_result($r))
+               if (!dbm::is_result($r)) {
                        $success = array('success' => false, 'search_results' => 'problem with query');
-               else if (count($r) == 0)
+               } elseif (count($r) == 0) {
                        $success = array('success' => false, 'search_results' => 'nothing found');
-               else {
-                       $ret = Array();
-                       foreach($r as $item) {
-                               if ($box == "inbox" || $item['from-url'] != $profile_url){
+               else {
+                       $ret = array();
+                       foreach ($r as $item) {
+                               if ($box == "inbox" || $item['from-url'] != $profile_url) {
                                        $recipient = $user_info;
                                        $sender = api_get_user($a,normalise_link($item['contact-url']));
-                               }
-                               elseif ($box == "sentbox" || $item['from-url'] == $profile_url){
+                               } elseif ($box == "sentbox" || $item['from-url'] == $profile_url) {
                                        $recipient = api_get_user($a,normalise_link($item['contact-url']));
                                        $sender = $user_info;
                                }
-                               $ret[]=api_format_messages($item, $recipient, $sender);
+
+                               $ret[] = api_format_messages($item, $recipient, $sender);
                        }
                        $success = array('success' => true, 'search_results' => $ret);
                }
 
                return api_format_data("direct_message_search", $type, array('$result' => $success));
        }
+
+       /// @TODO move to top of file or somwhere better
        api_register_func('api/friendica/direct_messages_search', 'api_friendica_direct_messages_search', true);
 
        /**
@@ -3954,13 +4212,15 @@ use \Friendica\Core\Config;
         * @param string $type Known types are 'atom', 'rss', 'xml' and 'json'
         * @return string
         */
-       function api_friendica_profile_show($type){
+       function api_friendica_profile_show($type) {
                $a = get_app();
 
-               if (api_user()===false) throw new ForbiddenException();
+               if (api_user() === false) {
+                       throw new ForbiddenException();
+               }
 
                // input params
-               $profileid = (x($_REQUEST,'profile_id') ? $_REQUEST['profile_id'] : 0);
+               $profileid = (x($_REQUEST, 'profile_id') ? $_REQUEST['profile_id'] : 0);
 
                // retrieve general information about profiles for user
                $multi_profiles = feature_enabled(api_user(),'multi_profiles');
@@ -3971,9 +4231,11 @@ use \Friendica\Core\Config;
                        $r = q("SELECT * FROM `profile` WHERE `uid` = %d AND `id` = %d",
                                intval(api_user()),
                                intval($profileid));
+
                        // error message if specified gid is not in database
-                       if (!dbm::is_result($r))
+                       if (!dbm::is_result($r)) {
                                throw new BadRequestException("profile_id not available");
+                       }
                } else {
                        $r = q("SELECT * FROM `profile` WHERE `uid` = %d",
                                intval(api_user()));
@@ -3991,13 +4253,13 @@ use \Friendica\Core\Config;
 
                        foreach ($r as $rr) {
                                $user = api_get_user($a, $rr['nurl']);
-                               ($type == "xml") ? $users[$k++.":user"] = $user : $users[] = $user;
+                               ($type == "xml") ? $users[$k++ . ":user"] = $user : $users[] = $user;
                        }
                        $profile['users'] = $users;
 
                        // add prepared profile data to array for final return
                        if ($type == "xml") {
-                               $profiles[$k++.":profile"] = $profile;
+                               $profiles[$k++ . ":profile"] = $profile;
                        } else {
                                $profiles[] = $profile;
                        }
@@ -4015,6 +4277,7 @@ use \Friendica\Core\Config;
        api_register_func('api/friendica/profile/show', 'api_friendica_profile_show', true, API_METHOD_GET);
 
 /*
+@TODO Maybe open to implement?
 To.Do:
     [pagename] => api/1.1/statuses/lookup.json
     [id] => 605138389168451584
index 6b26b1ed653010653e9243efeefb4deab654904b..ee6f49937af5ea2d56b1c98588f693a1b4e3079c 100644 (file)
@@ -1060,13 +1060,14 @@ function z_mime_content_type($filename) {
                'zsh' => 'text/x-script.zsh',
        );
 
-       $dot = strpos($filename,'.');
-       if($dot !== false) {
-               $ext = strtolower(substr($filename,$dot+1));
+       $dot = strpos($filename, '.');
+       if ($dot !== false) {
+               $ext = strtolower(substr($filename, $dot + 1));
                if (array_key_exists($ext, $mime_types)) {
                        return $mime_types[$ext];
                }
        }
+       /// @TODO Then let's get rid of it?
 // can't use this because we're just passing a name, e.g. not a file that can be opened
 //     elseif (function_exists('finfo_open')) {
 //             $finfo = @finfo_open(FILEINFO_MIME);
index cef293c7667a3904efd595c247458e19f3c5b488..a07a583538e4ac5e88b1613ff765c50837c83846 100644 (file)
@@ -27,14 +27,15 @@ function diaspora_mention2bb($match) {
                $name = $data['name'];
        }
 
-       return '@[url='.$data['url'].']'.$name.'[/url]';
+       return '@[url=' . $data['url'] . ']' . $name . '[/url]';
 }
 
-// we don't want to support a bbcode specific markdown interpreter
-// and the markdown library we have is pretty good, but provides HTML output.
-// So we'll use that to convert to HTML, then convert the HTML back to bbcode,
-// and then clean up a few Diaspora specific constructs.
-
+/*
+ * we don't want to support a bbcode specific markdown interpreter
+ * and the markdown library we have is pretty good, but provides HTML output.
+ * So we'll use that to convert to HTML, then convert the HTML back to bbcode,
+ * and then clean up a few Diaspora specific constructs.
+ */
 function diaspora2bb($s) {
 
        $s = html_entity_decode($s, ENT_COMPAT, 'UTF-8');
@@ -93,15 +94,15 @@ function diaspora_mentions($match) {
 
        $contact = get_contact_details_by_url($match[3]);
 
-       if (!isset($contact['addr'])) {
+       if (!x($contact, 'addr')) {
                $contact = Probe::uri($match[3]);
        }
 
-       if (!isset($contact['addr'])) {
+       if (!x($contact, 'addr')) {
                return $match[0];
        }
 
-       $mention = '@{'.$match[2].'; '.$contact['addr'].'}';
+       $mention = '@{' . $match[2] . '; ' . $contact['addr'] . '}';
        return $mention;
 }
 
@@ -222,9 +223,9 @@ function unescape_underscores_in_links($m) {
 }
 
 function format_event_diaspora($ev) {
-
-       if(! ((is_array($ev)) && count($ev)))
+       if (! ((is_array($ev)) && count($ev))) {
                return '';
+       }
 
        $bd_format = t('l F d, Y \@ g:i A') ; // Friday January 18, 2011 @ 8 AM
 
@@ -239,17 +240,19 @@ function format_event_diaspora($ev) {
                        $ev['start'] , $bd_format)))
                .  '](' . App::get_baseurl() . '/localtime/?f=&time=' . urlencode(datetime_convert('UTC','UTC',$ev['start'])) . ")\n";
 
-       if(! $ev['nofinish'])
+       if (! $ev['nofinish']) {
                $o .= t('Finishes:') . ' ' . '['
                        . (($ev['adjust']) ? day_translate(datetime_convert('UTC', 'UTC',
                                $ev['finish'] , $bd_format ))
                                :  day_translate(datetime_convert('UTC', 'UTC',
                                $ev['finish'] , $bd_format )))
                        . '](' . App::get_baseurl() . '/localtime/?f=&time=' . urlencode(datetime_convert('UTC','UTC',$ev['finish'])) . ")\n";
+       }
 
-       if(strlen($ev['location']))
+       if (strlen($ev['location'])) {
                $o .= t('Location:') . bb2diaspora($ev['location'])
                        . "\n";
+       }
 
        $o .= "\n";
        return $o;
index 5a066596e6d1f6e57f4cad5a807610e134cdef62..2715334e46b0712f39aa5e2f514eedc81599c81c 100644 (file)
@@ -9,35 +9,38 @@ require_once 'include/Contact.php';
 require_once 'include/plaintext.php';
 
 function bb_PictureCacheExt($matches) {
-       if (strpos($matches[3], "data:image/") === 0)
-               return ($matches[0]);
+       if (strpos($matches[3], "data:image/") === 0) {
+               return $matches[0];
+       }
 
        $matches[3] = proxy_url($matches[3]);
-       return "[img=".$matches[1]."x".$matches[2]."]".$matches[3]."[/img]";
+       return "[img=" . $matches[1] . "x" . $matches[2] . "]" . $matches[3] . "[/img]";
 }
 
 function bb_PictureCache($matches) {
-       if (strpos($matches[1], "data:image/") === 0)
-               return ($matches[0]);
+       if (strpos($matches[1], "data:image/") === 0) {
+               return $matches[0];
+       }
 
        $matches[1] = proxy_url($matches[1]);
-       return "[img]".$matches[1]."[/img]";
+       return "[img]" . $matches[1] . "[/img]";
 }
 
 function bb_map_coords($match) {
        // the extra space in the following line is intentional
-       return str_replace($match[0],'<div class="map"  >' . generate_map(str_replace('/',' ',$match[1])) . '</div>', $match[0]);
+       return str_replace($match[0], '<div class="map"  >' . generate_map(str_replace('/', ' ', $match[1])) . '</div>', $match[0]);
 }
 function bb_map_location($match) {
        // the extra space in the following line is intentional
-       return str_replace($match[0],'<div class="map"  >' . generate_named_map($match[1]) . '</div>', $match[0]);
+       return str_replace($match[0], '<div class="map"  >' . generate_named_map($match[1]) . '</div>', $match[0]);
 }
 
 function bb_attachment($Text, $simplehtml = false, $tryoembed = true) {
 
        $data = get_attachment_data($Text);
-       if (!$data)
+       if (!$data) {
                return $Text;
+       }
 
        if (isset($data["title"])) {
                $data["title"] = strip_tags($data["title"]);
@@ -57,8 +60,9 @@ function bb_attachment($Text, $simplehtml = false, $tryoembed = true) {
 
                // If the link description is similar to the text above then don't add the link description
                if (($data["title"] != "") AND ((strpos($test1,$test2) !== false) OR
-                       (similar_text($test1,$test2) / strlen($data["title"])) > 0.9))
+                       (similar_text($test1,$test2) / strlen($data["title"])) > 0.9)) {
                        $title2 = $data["url"];
+               }
                $text = sprintf('<a href="%s" title="%s" class="attachment" rel="nofollow external">%s</a><br />',
                                $data["url"], $data["title"], $title2);
        } elseif (($simplehtml != 4) AND ($simplehtml != 0)) {
@@ -67,26 +71,30 @@ function bb_attachment($Text, $simplehtml = false, $tryoembed = true) {
                $text = sprintf('<span class="type-%s">', $data["type"]);
 
                $bookmark = array(sprintf('[bookmark=%s]%s[/bookmark]', $data["url"], $data["title"]), $data["url"], $data["title"]);
-               if ($tryoembed)
+               if ($tryoembed) {
                        $oembed = tryoembed($bookmark);
-               else
+               } else {
                        $oembed = $bookmark[0];
+               }
 
-               if (strstr(strtolower($oembed), "<iframe "))
+               if (strstr(strtolower($oembed), "<iframe ")) {
                        $text = $oembed;
-               else {
-                       if (($data["image"] != "") AND !strstr(strtolower($oembed), "<img "))
+               else {
+                       if (($data["image"] != "") AND !strstr(strtolower($oembed), "<img ")) {
                                $text .= sprintf('<a href="%s" target="_blank"><img src="%s" alt="" title="%s" class="attachment-image" /></a><br />', $data["url"], proxy_url($data["image"]), $data["title"]);
-                       elseif (($data["preview"] != "") AND !strstr(strtolower($oembed), "<img "))
+                       } elseif (($data["preview"] != "") AND !strstr(strtolower($oembed), "<img ")) {
                                $text .= sprintf('<a href="%s" target="_blank"><img src="%s" alt="" title="%s" class="attachment-preview" /></a><br />', $data["url"], proxy_url($data["preview"]), $data["title"]);
+                       }
 
-                       if (($data["type"] == "photo") AND ($data["url"] != "") AND ($data["image"] != ""))
+                       if (($data["type"] == "photo") AND ($data["url"] != "") AND ($data["image"] != "")) {
                                $text .= sprintf('<a href="%s" target="_blank"><img src="%s" alt="" title="%s" class="attachment-image" /></a>', $data["url"], proxy_url($data["image"]), $data["title"]);
-                       else
+                       } else {
                                $text .= $oembed;
+                       }
 
-                       if (trim($data["description"]) != "")
+                       if (trim($data["description"]) != "") {
                                $text .= sprintf('<blockquote>%s</blockquote></span>', trim(bbcode($data["description"])));
+                       }
                }
        }
        return trim($data["text"].' '.$text.' '.$data["after"]);
@@ -96,44 +104,47 @@ function bb_remove_share_information($Text, $plaintext = false, $nolink = false)
 
        $data = get_attachment_data($Text);
 
-       if (!$data)
+       if (!$data) {
                return $Text;
-
-       if ($nolink)
-               return $data["text"].$data["after"];
+       } elseif ($nolink) {
+               return $data["text"] . $data["after"];
+       }
 
        $title = htmlentities($data["title"], ENT_QUOTES, 'UTF-8', false);
        $text = htmlentities($data["text"], ENT_QUOTES, 'UTF-8', false);
-       if ($plaintext OR (($title != "") AND strstr($text, $title)))
+       if ($plaintext OR (($title != "") AND strstr($text, $title))) {
                $data["title"] = $data["url"];
-       elseif (($text != "") AND strstr($title, $text)) {
+       elseif (($text != "") AND strstr($title, $text)) {
                $data["text"] = $data["title"];
                $data["title"] = $data["url"];
        }
 
-       if (($data["text"] == "") AND ($data["title"] != "") AND ($data["url"] == ""))
-               return $data["title"].$data["after"];
+       if (($data["text"] == "") AND ($data["title"] != "") AND ($data["url"] == "")) {
+               return $data["title"] . $data["after"];
+       }
 
        // If the link already is included in the post, don't add it again
-       if (($data["url"] != "") AND strpos($data["text"], $data["url"]))
-               return $data["text"].$data["after"];
+       if (($data["url"] != "") AND strpos($data["text"], $data["url"])) {
+               return $data["text"] . $data["after"];
+       }
 
        $text = $data["text"];
 
-       if (($data["url"] != "") AND ($data["title"] != ""))
-               $text .= "\n[url=".$data["url"]."]".$data["title"]."[/url]";
-       elseif (($data["url"] != ""))
-               $text .= "\n".$data["url"];
+       if (($data["url"] != "") AND ($data["title"] != "")) {
+               $text .= "\n[url=" . $data["url"] . "]" . $data["title"] . "[/url]";
+       } elseif (($data["url"] != "")) {
+               $text .= "\n" . $data["url"];
+       }
 
-       return $text."\n".$data["after"];
+       return $text . "\n" . $data["after"];
 }
 
 function bb_cleanstyle($st) {
-  return "<span style=\"".cleancss($st[1]).";\">".$st[2]."</span>";
+       return "<span style=\"" . cleancss($st[1]) . ";\">" . $st[2] . "</span>";
 }
 
 function bb_cleanclass($st) {
-  return "<span class=\"".cleancss($st[1])."\">".$st[2]."</span>";
+       return "<span class=\"" . cleancss($st[1]) . "\">" . $st[2] . "</span>";
 }
 
 function cleancss($input) {
@@ -145,14 +156,16 @@ function cleancss($input) {
        for ($i = 0; $i < strlen($input); $i++) {
                $char = substr($input, $i, 1);
 
-               if (($char >= "a") and ($char <= "z"))
+               if (($char >= "a") and ($char <= "z")) {
                        $cleaned .= $char;
+               }
 
-               if (!(strpos(" #;:0123456789-_.%", $char) === false))
+               if (!(strpos(" #;:0123456789-_.%", $char) === false)) {
                        $cleaned .= $char;
+               }
        }
 
-       return($cleaned);
+       return $cleaned;
 }
 
 function stripcode_br_cb($s) {
@@ -166,25 +179,30 @@ function tryoembed($match) {
        $url = str_replace(array("http://www.youtube.com/", "http://player.vimeo.com/"),
                                array("https://www.youtube.com/", "https://player.vimeo.com/"), $url);
 
-
        $o = oembed_fetch_url($url);
 
-       if (!is_object($o))
+       if (!is_object($o)) {
                return $match[0];
+       }
 
-       if (isset($match[2]))
+       if (isset($match[2])) {
                $o->title = $match[2];
+       }
 
-       if ($o->type=="error") return $match[0];
+       if ($o->type == "error") {
+               return $match[0];
+       }
 
        $html = oembed_format_object($o);
+
        return $html;
 }
 
-// [noparse][i]italic[/i][/noparse] turns into
-// [noparse][ i ]italic[ /i ][/noparse],
-// to hide them from parser.
-
+/*
+ * [noparse][i]italic[/i][/noparse] turns into
+ * [noparse][ i ]italic[ /i ][/noparse],
+ * to hide them from parser.
+ */
 function bb_spacefy($st) {
        $whole_match = $st[0];
        $captured = $st[1];
@@ -193,10 +211,11 @@ function bb_spacefy($st) {
        return $new_str;
 }
 
-// The previously spacefied [noparse][ i ]italic[ /i ][/noparse],
-// now turns back and the [noparse] tags are trimed
-// returning [i]italic[/i]
-
+/*
+ * The previously spacefied [noparse][ i ]italic[ /i ][/noparse],
+ * now turns back and the [noparse] tags are trimed
+ * returning [i]italic[/i]
+ */
 function bb_unspacefy_and_trim($st) {
        $whole_match = $st[0];
        $captured = $st[1];
@@ -205,23 +224,26 @@ function bb_unspacefy_and_trim($st) {
 }
 
 function bb_find_open_close($s, $open, $close, $occurence = 1) {
-
-       if($occurence < 1)
+       if ($occurence < 1) {
                $occurence = 1;
+       }
 
        $start_pos = -1;
-       for($i = 1; $i <= $occurence; $i++) {
-               if( $start_pos !== false)
+       for ($i = 1; $i <= $occurence; $i++) {
+               if ($start_pos !== false) {
                        $start_pos = strpos($s, $open, $start_pos + 1);
+               }
        }
 
-       if( $start_pos === false)
+       if ($start_pos === false) {
                return false;
+       }
 
        $end_pos = strpos($s, $close, $start_pos);
 
-       if( $end_pos === false)
+       if ($end_pos === false) {
                return false;
+       }
 
        $res = array( 'start' => $start_pos, 'end' => $end_pos );
 
@@ -229,36 +251,50 @@ function bb_find_open_close($s, $open, $close, $occurence = 1) {
 }
 
 function get_bb_tag_pos($s, $name, $occurence = 1) {
-
-       if($occurence < 1)
+       if ($occurence < 1) {
                $occurence = 1;
+       }
 
        $start_open = -1;
-       for($i = 1; $i <= $occurence; $i++) {
-               if( $start_open !== false)
+       for ($i = 1; $i <= $occurence; $i++) {
+               if ($start_open !== false) {
                        $start_open = strpos($s, '[' . $name, $start_open + 1); // allow [name= type tags
+               }
        }
 
-       if( $start_open === false)
+       if ($start_open === false) {
                return false;
+       }
 
        $start_equal = strpos($s, '=', $start_open);
        $start_close = strpos($s, ']', $start_open);
 
-       if( $start_close === false)
+       if ($start_close === false) {
                return false;
+       }
 
        $start_close++;
 
        $end_open = strpos($s, '[/' . $name . ']', $start_close);
 
-       if( $end_open === false)
+       if ($end_open === false) {
                return false;
+       }
 
-       $res = array( 'start' => array('open' => $start_open, 'close' => $start_close),
-                     'end' => array('open' => $end_open, 'close' => $end_open + strlen('[/' . $name . ']')) );
-       if( $start_equal !== false)
+       $res = array(
+               'start' => array(
+                       'open'  => $start_open,
+                       'close' => $start_close
+               ),
+               'end'   => array(
+                       'open'  => $end_open,
+                       'close' => $end_open + strlen('[/' . $name . ']')
+               ),
+       );
+
+       if ($start_equal !== false) {
                $res['start']['equal'] = $start_equal + 1;
+       }
 
        return $res;
 }
@@ -269,13 +305,13 @@ function bb_tag_preg_replace($pattern, $replace, $name, $s) {
 
        $occurence = 1;
        $pos = get_bb_tag_pos($string, $name, $occurence);
-       while($pos !== false && $occurence < 1000) {
-
+       while ($pos !== false && $occurence < 1000) {
                $start = substr($string, 0, $pos['start']['open']);
                $subject = substr($string, $pos['start']['open'], $pos['end']['close'] - $pos['start']['open']);
                $end = substr($string, $pos['end']['close']);
-               if($end === false)
+               if ($end === false) {
                        $end = '';
+               }
 
                $subject = preg_replace($pattern, $replace, $subject);
                $string = $start . $subject . $end;
@@ -287,7 +323,7 @@ function bb_tag_preg_replace($pattern, $replace, $name, $s) {
        return $string;
 }
 
-if(! function_exists('bb_extract_images')) {
+if (! function_exists('bb_extract_images')) {
 function bb_extract_images($body) {
 
        $saved_image = array();
@@ -298,26 +334,28 @@ function bb_extract_images($body) {
        $img_start = strpos($orig_body, '[img');
        $img_st_close = ($img_start !== false ? strpos(substr($orig_body, $img_start), ']') : false);
        $img_end = ($img_start !== false ? strpos(substr($orig_body, $img_start), '[/img]') : false);
-       while(($img_st_close !== false) && ($img_end !== false)) {
+       while (($img_st_close !== false) && ($img_end !== false)) {
 
                $img_st_close++; // make it point to AFTER the closing bracket
                $img_end += $img_start;
 
-               if(! strcmp(substr($orig_body, $img_start + $img_st_close, 5), 'data:')) {
+               if (! strcmp(substr($orig_body, $img_start + $img_st_close, 5), 'data:')) {
                        // This is an embedded image
 
                        $saved_image[$cnt] = substr($orig_body, $img_start + $img_st_close, $img_end - ($img_start + $img_st_close));
                        $new_body = $new_body . substr($orig_body, 0, $img_start) . '[$#saved_image' . $cnt . '#$]';
 
                        $cnt++;
-               }
-               else
+               } else {
                        $new_body = $new_body . substr($orig_body, 0, $img_end + strlen('[/img]'));
+               }
 
                $orig_body = substr($orig_body, $img_end + strlen('[/img]'));
 
-               if($orig_body === false) // in case the body ends on a closing image tag
+               if ($orig_body === false) {
+                       // in case the body ends on a closing image tag
                        $orig_body = '';
+               }
 
                $img_start = strpos($orig_body, '[img');
                $img_st_close = ($img_start !== false ? strpos(substr($orig_body, $img_start), ']') : false);
@@ -329,7 +367,7 @@ function bb_extract_images($body) {
        return array('body' => $new_body, 'images' => $saved_image);
 }}
 
-if(! function_exists('bb_replace_images')) {
+if (! function_exists('bb_replace_images')) {
 function bb_replace_images($body, $images) {
 
        $newbody = $body;
@@ -504,85 +542,94 @@ function bb_ShareAttributes($share, $simplehtml) {
                                );
                        break;
        }
-       return($text);
+
+       return $text;
 }
 
 function GetProfileUsername($profile, $username, $compact = false, $getnetwork = false) {
 
        $twitter = preg_replace("=https?://twitter.com/(.*)=ism", "$1@twitter.com", $profile);
        if ($twitter != $profile) {
-               if ($getnetwork)
-                       return(NETWORK_TWITTER);
-               elseif ($compact)
-                       return($twitter);
-               else
-                       return($username." (".$twitter.")");
+               if ($getnetwork) {
+                       return NETWORK_TWITTER;
+               } elseif ($compact) {
+                       return $twitter;
+               } else {
+                       return ($username . " (" . $twitter . ")");
+               }
        }
 
        $appnet = preg_replace("=https?://alpha.app.net/(.*)=ism", "$1@alpha.app.net", $profile);
        if ($appnet != $profile) {
-               if ($getnetwork)
-                       return(NETWORK_APPNET);
-               elseif ($compact)
-                       return($appnet);
-               else
-                       return($username." (".$appnet.")");
+               if ($getnetwork) {
+                       return NETWORK_APPNET;
+               } elseif ($compact) {
+                       return $appnet;
+               } else {
+                       return ($username . " (" . $appnet . ")");
+               }
        }
 
        $gplus = preg_replace("=https?://plus.google.com/(.*)=ism", "$1@plus.google.com", $profile);
        if ($gplus != $profile) {
-               if ($getnetwork)
-                       return(NETWORK_GPLUS);
-               elseif ($compact)
-                       return($gplususername." (".$username.")");
-               else
-                       return($username." (".$gplus.")");
+               if ($getnetwork) {
+                       return NETWORK_GPLUS;
+               } elseif ($compact) {
+                       return ($gplususername . " (" . $username . ")");
+               } else {
+                       return ($username . " (" . $gplus . ")");
+               }
        }
 
        $friendica = preg_replace("=https?://(.*)/profile/(.*)=ism", "$2@$1", $profile);
        if ($friendica != $profile) {
-               if ($getnetwork)
-                       return(NETWORK_DFRN);
-               elseif ($compact)
-                       return($friendica);
-               else
-                       return($username." (".$friendica.")");
+               if ($getnetwork) {
+                       return NETWORK_DFRN;
+               } elseif ($compact) {
+                       return $friendica;
+               } else {
+                       return ($username . " (" . $friendica . ")");
+               }
        }
 
        $diaspora = preg_replace("=https?://(.*)/u/(.*)=ism", "$2@$1", $profile);
        if ($diaspora != $profile) {
-               if ($getnetwork)
-                       return(NETWORK_DIASPORA);
-               elseif ($compact)
-                       return($diaspora);
-               else
-                       return($username." (".$diaspora.")");
+               if ($getnetwork) {
+                       return NETWORK_DIASPORA;
+               } elseif ($compact) {
+                       return $diaspora;
+               } else {
+                       return ($username . " (" . $diaspora . ")");
+               }
        }
 
        $red = preg_replace("=https?://(.*)/channel/(.*)=ism", "$2@$1", $profile);
        if ($red != $profile) {
-               if ($getnetwork)
+               if ($getnetwork) {
                        // red is identified as Diaspora - friendica can't connect directly to it
-                       return(NETWORK_DIASPORA);
-               elseif ($compact)
-                       return($red);
-               else
-                       return($username." (".$red.")");
+                       return NETWORK_DIASPORA;
+               } elseif ($compact) {
+                       return $red;
+               } else {
+                       return ($username . " (" . $red . ")");
+               }
        }
 
        $StatusnetHost = preg_replace("=https?://(.*)/user/(.*)=ism", "$1", $profile);
        if ($StatusnetHost != $profile) {
                $StatusnetUser = preg_replace("=https?://(.*)/user/(.*)=ism", "$2", $profile);
                if ($StatusnetUser != $profile) {
+                       /// @TODO Some hosts run on https, not just http and sometimes http is disabled, let's support both here
                        $UserData = fetch_url("http://".$StatusnetHost."/api/users/show.json?user_id=".$StatusnetUser);
                        $user = json_decode($UserData);
                        if ($user) {
-                               if ($getnetwork)
-                                       return(NETWORK_STATUSNET);
-                               elseif ($compact)
-                                       return($user->screen_name."@".$StatusnetHost);
-                               else
-                                       return($username." (".$user->screen_name."@".$StatusnetHost.")");
+                               if ($getnetwork) {
+                                       return NETWORK_STATUSNET;
+                               } elseif ($compact) {
+                                       return ($user->screen_name . "@" . $StatusnetHost);
+                               } else {
+                                       return ($username . " (" . $user->screen_name . "@" . $StatusnetHost . ")");
+                               }
                        }
                }
        }
@@ -592,16 +639,17 @@ function GetProfileUsername($profile, $username, $compact = false, $getnetwork =
        if ($rest == "") {
                $pumpio = preg_replace("=https?://([\.\w]+)/([\.\w]+)(.*)=ism", "$2@$1", $profile);
                if ($pumpio != $profile) {
-                       if ($getnetwork)
-                               return(NETWORK_PUMPIO);
-                       elseif ($compact)
-                               return($pumpio);
-                       else
-                               return($username." (".$pumpio.")");
+                       if ($getnetwork) {
+                               return NETWORK_PUMPIO;
+                       } elseif ($compact) {
+                               return $pumpio;
+                       } else {
+                               return ($username . " (" . $pumpio . ")");
+                       }
                }
        }
 
-       return($username);
+       return $username;
 }
 
 function bb_DiasporaLinks($match) {
@@ -611,7 +659,7 @@ function bb_DiasporaLinks($match) {
 function bb_RemovePictureLinks($match) {
        $text = Cache::get($match[1]);
 
-       if(is_null($text)){
+       if (is_null($text)) {
                $a = get_app();
 
                $stamp1 = microtime(true);
@@ -652,20 +700,22 @@ function bb_RemovePictureLinks($match) {
                }
                Cache::set($match[1],$text);
        }
-       return($text);
+
+       return $text;
 }
 
 function bb_expand_links($match) {
-       if (($match[3] == "") OR ($match[2] == $match[3]) OR stristr($match[2], $match[3]))
-               return ($match[1]."[url]".$match[2]."[/url]");
-       else
-               return ($match[1].$match[3]." [url]".$match[2]."[/url]");
+       if (($match[3] == "") OR ($match[2] == $match[3]) OR stristr($match[2], $match[3])) {
+               return ($match[1] . "[url]" . $match[2] . "[/url]");
+       } else {
+               return ($match[1] . $match[3] . " [url]" . $match[2] . "[/url]");
+       }
 }
 
 function bb_CleanPictureLinksSub($match) {
        $text = Cache::get($match[1]);
 
-       if(is_null($text)){
+       if (is_null($text)) {
                $a = get_app();
 
                $stamp1 = microtime(true);
@@ -707,18 +757,20 @@ function bb_CleanPictureLinksSub($match) {
                }
                Cache::set($match[1],$text);
        }
-       return($text);
+
+       return $text;
 }
 
 function bb_CleanPictureLinks($text) {
        $text = preg_replace_callback("&\[url=([^\[\]]*)\]\[img\](.*)\[\/img\]\[\/url\]&Usi", 'bb_CleanPictureLinksSub', $text);
-       return ($text);
+       return $text;
 }
 
 function bb_highlight($match) {
-       if(in_array(strtolower($match[1]),['php','css','mysql','sql','abap','diff','html','perl','ruby',
-               'vbscript','avrc','dtd','java','xml','cpp','python','javascript','js','sh']))
-               return text_highlight($match[2],strtolower($match[1]));
+       if (in_array(strtolower($match[1]), ['php', 'css', 'mysql', 'sql', 'abap', 'diff', 'html', 'perl', 'ruby',
+               'vbscript', 'avrc', 'dtd', 'java', 'xml', 'cpp', 'python', 'javascript', 'js', 'sh'])) {
+               return text_highlight($match[2], strtolower($match[1]));
+       }
        return $match[0];
 }
 
@@ -827,7 +879,7 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $simplehtml = fa
        // Handle attached links or videos
        $Text = bb_attachment($Text, $simplehtml, $tryoembed);
 
-       $Text = str_replace(array("\r","\n"), array('<br />','<br />'), $Text);
+       $Text = str_replace(array("\r","\n"), array('<br />', '<br />'), $Text);
 
        if ($preserve_nl) {
                $Text = str_replace(array("\n", "\r"), array('', ''), $Text);
@@ -1082,15 +1134,14 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $simplehtml = fa
 
        // Shared content
        $Text = preg_replace_callback("/(.*?)\[share(.*?)\](.*?)\[\/share\]/ism",
-               function ($match) use ($simplehtml){
-                       return(bb_ShareAttributes($match, $simplehtml));
+               function ($match) use ($simplehtml) {
+                       return bb_ShareAttributes($match, $simplehtml);
                }, $Text);
 
        $Text = preg_replace("/\[crypt\](.*?)\[\/crypt\]/ism", '<br/><img src="' .App::get_baseurl() . '/images/lock_icon.gif" alt="' . t('Encrypted content') . '" title="' . t('Encrypted content') . '" /><br />', $Text);
        $Text = preg_replace("/\[crypt(.*?)\](.*?)\[\/crypt\]/ism", '<br/><img src="' .App::get_baseurl() . '/images/lock_icon.gif" alt="' . t('Encrypted content') . '" title="' . '$1' . ' ' . t('Encrypted content') . '" /><br />', $Text);
        //$Text = preg_replace("/\[crypt=(.*?)\](.*?)\[\/crypt\]/ism", '<br/><img src="' .App::get_baseurl() . '/images/lock_icon.gif" alt="' . t('Encrypted content') . '" title="' . '$1' . ' ' . t('Encrypted content') . '" /><br />', $Text);
 
-
        // Try to Oembed
        if ($tryoembed) {
                $Text = preg_replace("/\[video\](.*?\.(ogg|ogv|oga|ogm|webm|mp4))\[\/video\]/ism", '<video src="$1" controls="controls" width="' . $a->videowidth . '" height="' . $a->videoheight . '"><a href="$1">$1</a></video>', $Text);
@@ -1160,7 +1211,7 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $simplehtml = fa
        // Summary (e.g. title) is required, earlier revisions only required description (in addition to
        // start which is always required). Allow desc with a missing summary for compatibility.
 
-       if((x($ev, 'desc') || x($ev, 'summary')) && x($ev, 'start')) {
+       if ((x($ev, 'desc') || x($ev, 'summary')) && x($ev, 'start')) {
                $sub = format_event_html($ev, $simplehtml);
 
                $Text = preg_replace("/\[event\-summary\](.*?)\[\/event\-summary\]/ism", '', $Text);
@@ -1215,7 +1266,7 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $simplehtml = fa
        $regex = '#<([^>]*?)(href)="(?!' . implode('|', $allowed_link_protocols) . ')(.*?)"(.*?)>#ism';
        $Text = preg_replace($regex, '<$1$2="javascript:void(0)"$4 class="invalid-href" title="' . t('Invalid link protocol') . '">', $Text);
 
-       if($saved_image) {
+       if ($saved_image) {
                $Text = bb_replace_images($Text, $saved_image);
        }
 
index 4b66b47a0046921d9e3413cd04fd83552edd940b..557d08c28874aaed1a0dff85d46883fb46a504f1 100644 (file)
@@ -19,7 +19,7 @@ function cli_startup() {
                require_once("dba.php");
                $db = new dba($db_host, $db_user, $db_pass, $db_data);
                unset($db_host, $db_user, $db_pass, $db_data);
-       };
+       };
 
        require_once('include/session.php');
 
index 56c032847c875087149a99dfea1109874a805e92..7069af066409164984c824313174e8ae2f16f292 100644 (file)
@@ -9,12 +9,12 @@ function contact_profile_assign($current,$foreign_net) {
 
        $o .= "<select id=\"contact-profile-selector\" class=\"form-control\" $disabled name=\"profile-assign\" />\r\n";
 
-       $r = q("SELECT `id`, `profile-name` FROM `profile` WHERE `uid` = %d",
+       $r = q("SELECT `id`, `profile-name`, `is-default` FROM `profile` WHERE `uid` = %d",
                        intval($_SESSION['uid']));
 
        if (dbm::is_result($r)) {
                foreach ($r as $rr) {
-                       $selected = (($rr['id'] == $current) ? " selected=\"selected\" " : "");
+                       $selected = (($rr['id'] == $current || ($current == 0 && $rr['is-default'] == 1)) ? " selected=\"selected\" " : "");
                        $o .= "<option value=\"{$rr['id']}\" $selected >{$rr['profile-name']}</option>\r\n";
                }
        }
@@ -37,7 +37,7 @@ function contact_reputation($current) {
                5 => t('Reputable, has my trust')
        );
 
-       foreach($rep as $k => $v) {
+       foreach ($rep as $k => $v) {
                $selected = (($k == $current) ? " selected=\"selected\" " : "");
                $o .= "<option value=\"$k\" $selected >$v</option>\r\n";
        }
@@ -61,7 +61,7 @@ function contact_poll_interval($current, $disabled = false) {
                5 => t('Monthly')
        );
 
-       foreach($rep as $k => $v) {
+       foreach ($rep as $k => $v) {
                $selected = (($k == $current) ? " selected=\"selected\" " : "");
                $o .= "<option value=\"$k\" $selected >$v</option>\r\n";
        }
index d077a065e16590def2a304749bcc57f5fd6a50ba..5dd3a8bb4b163996d597902adff6f99b741f07a3 100644 (file)
@@ -2,7 +2,7 @@
 
 function follow_widget($value = "") {
 
-       return replace_macros(get_markup_template('follow.tpl'),array(
+       return replace_macros(get_markup_template('follow.tpl'), array(
                '$connect' => t('Add New Contact'),
                '$desc' => t('Enter address or web location'),
                '$hint' => t('Example: bob@example.com, http://example.com/barbara'),
@@ -13,20 +13,20 @@ function follow_widget($value = "") {
 }
 
 function findpeople_widget() {
-       require_once('include/Contact.php');
+       require_once 'include/Contact.php';
 
        $a = get_app();
 
-       if(get_config('system','invitation_only')) {
-               $x = get_pconfig(local_user(),'system','invites_remaining');
-               if($x || is_site_admin()) {
+       if (get_config('system', 'invitation_only')) {
+               $x = get_pconfig(local_user(), 'system', 'invites_remaining');
+               if ($x || is_site_admin()) {
                        $a->page['aside'] .= '<div class="side-link" id="side-invite-remain">'
-                       . sprintf( tt('%d invitation available','%d invitations available',$x), $x)
+                       . sprintf( tt('%d invitation available', '%d invitations available', $x), $x)
                        . '</div>' . $inv;
                }
        }
 
-       return replace_macros(get_markup_template('peoplefind.tpl'),array(
+       return replace_macros(get_markup_template('peoplefind.tpl'), array(
                '$findpeople' => t('Find People'),
                '$desc' => t('Enter name or interest'),
                '$label' => t('Connect/Follow'),
@@ -45,32 +45,41 @@ function unavailable_networks() {
 
        $networks = array();
 
-       if (!plugin_enabled("appnet"))
+       if (!plugin_enabled("appnet")) {
                $networks[] = NETWORK_APPNET;
+       }
 
-       if (!plugin_enabled("fbpost") AND !plugin_enabled("facebook"))
+       if (!plugin_enabled("fbpost") AND !plugin_enabled("facebook")) {
                $networks[] = NETWORK_FACEBOOK;
+       }
 
-       if (!plugin_enabled("statusnet"))
+       if (!plugin_enabled("statusnet")) {
                $networks[] = NETWORK_STATUSNET;
+       }
 
-       if (!plugin_enabled("pumpio"))
+       if (!plugin_enabled("pumpio")) {
                $networks[] = NETWORK_PUMPIO;
+       }
 
-       if (!plugin_enabled("twitter"))
+       if (!plugin_enabled("twitter")) {
                $networks[] = NETWORK_TWITTER;
+       }
 
-       if (get_config("system","ostatus_disabled"))
+       if (get_config("system", "ostatus_disabled")) {
                $networks[] = NETWORK_OSTATUS;
+       }
 
-       if (!get_config("system","diaspora_enabled"))
+       if (!get_config("system", "diaspora_enabled")) {
                $networks[] = NETWORK_DIASPORA;
+       }
 
-       if (!plugin_enabled("pnut"))
+       if (!plugin_enabled("pnut")) {
                $networks[] = NETWORK_PNUT;
+       }
 
-       if (!sizeof($networks))
+       if (!sizeof($networks)) {
                return "";
+       }
 
        $network_filter = implode("','", $networks);
 
@@ -79,7 +88,7 @@ function unavailable_networks() {
        return $network_filter;
 }
 
-function networks_widget($baseurl,$selected = '') {
+function networks_widget($baseurl, $selected = '') {
 
        $a = get_app();
 
@@ -87,7 +96,7 @@ function networks_widget($baseurl,$selected = '') {
                return '';
        }
 
-       if (!feature_enabled(local_user(),'networks')) {
+       if (!feature_enabled(local_user(), 'networks')) {
                return '';
        }
 
@@ -99,7 +108,7 @@ function networks_widget($baseurl,$selected = '') {
 
        $nets = array();
        if (dbm::is_result($r)) {
-               require_once('include/contact_selectors.php');
+               require_once 'include/contact_selectors.php';
                foreach ($r as $rr) {
                        /// @TODO If 'network' is not there, this triggers an E_NOTICE
                        if ($rr['network']) {
@@ -108,10 +117,11 @@ function networks_widget($baseurl,$selected = '') {
                }
        }
 
-       if(count($nets) < 2)
+       if (count($nets) < 2) {
                return '';
+       }
 
-       return replace_macros(get_markup_template('nets.tpl'),array(
+       return replace_macros(get_markup_template('nets.tpl'), array(
                '$title' => t('Networks'),
                '$desc' => '',
                '$sel_all' => (($selected == '') ? 'selected' : ''),
@@ -122,31 +132,31 @@ function networks_widget($baseurl,$selected = '') {
        ));
 }
 
-function fileas_widget($baseurl,$selected = '') {
+function fileas_widget($baseurl, $selected = '') {
        if (! local_user()) {
                return '';
        }
 
-       if (! feature_enabled(local_user(),'filing')) {
+       if (! feature_enabled(local_user(), 'filing')) {
                return '';
        }
 
-       $saved = get_pconfig(local_user(),'system','filetags');
+       $saved = get_pconfig(local_user(), 'system', 'filetags');
        if (! strlen($saved)) {
                return;
        }
 
        $matches = false;
        $terms = array();
-       $cnt = preg_match_all('/\[(.*?)\]/',$saved,$matches,PREG_SET_ORDER);
+       $cnt = preg_match_all('/\[(.*?)\]/', $saved, $matches, PREG_SET_ORDER);
        if ($cnt) {
-               foreach($matches as $mtch) {
+               foreach ($matches as $mtch) {
                        $unescaped = xmlify(file_tag_decode($mtch[1]));
-                       $terms[] = array('name' => $unescaped,'selected' => (($selected == $unescaped) ? 'selected' : ''));
+                       $terms[] = array('name' => $unescaped, 'selected' => (($selected == $unescaped) ? 'selected' : ''));
                }
        }
 
-       return replace_macros(get_markup_template('fileas_widget.tpl'),array(
+       return replace_macros(get_markup_template('fileas_widget.tpl'), array(
                '$title' => t('Saved Folders'),
                '$desc' => '',
                '$sel_all' => (($selected == '') ? 'selected' : ''),
@@ -157,30 +167,31 @@ function fileas_widget($baseurl,$selected = '') {
        ));
 }
 
-function categories_widget($baseurl,$selected = '') {
+function categories_widget($baseurl, $selected = '') {
 
        $a = get_app();
 
-       if (! feature_enabled($a->profile['profile_uid'],'categories')) {
+       if (! feature_enabled($a->profile['profile_uid'], 'categories')) {
                return '';
        }
 
-       $saved = get_pconfig($a->profile['profile_uid'],'system','filetags');
+       $saved = get_pconfig($a->profile['profile_uid'], 'system', 'filetags');
        if (! strlen($saved)) {
                return;
        }
 
        $matches = false;
        $terms = array();
-        $cnt = preg_match_all('/<(.*?)>/',$saved,$matches,PREG_SET_ORDER);
-        if($cnt) {
-                foreach($matches as $mtch) {
-                       $unescaped = xmlify(file_tag_decode($mtch[1]));
-                       $terms[] = array('name' => $unescaped,'selected' => (($selected == $unescaped) ? 'selected' : ''));
+       $cnt = preg_match_all('/<(.*?)>/', $saved, $matches, PREG_SET_ORDER);
+
+       if ($cnt) {
+               foreach ($matches as $mtch) {
+                       $unescaped = xmlify(file_tag_decode($mtch[1]));
+                       $terms[] = array('name' => $unescaped, 'selected' => (($selected == $unescaped) ? 'selected' : ''));
                }
        }
 
-       return replace_macros(get_markup_template('categories_widget.tpl'),array(
+       return replace_macros(get_markup_template('categories_widget.tpl'), array(
                '$title' => t('Categories'),
                '$desc' => '',
                '$sel_all' => (($selected == '') ? 'selected' : ''),
@@ -195,29 +206,30 @@ function common_friends_visitor_widget($profile_uid) {
 
        $a = get_app();
 
-       if(local_user() == $profile_uid)
+       if (local_user() == $profile_uid) {
                return;
+       }
 
        $cid = $zcid = 0;
 
-       if(is_array($_SESSION['remote'])) {
-               foreach($_SESSION['remote'] as $visitor) {
-                       if($visitor['uid'] == $profile_uid) {
+       if (is_array($_SESSION['remote'])) {
+               foreach ($_SESSION['remote'] as $visitor) {
+                       if ($visitor['uid'] == $profile_uid) {
                                $cid = $visitor['cid'];
                                break;
                        }
                }
        }
 
-       if(! $cid) {
-               if(get_my_url()) {
+       if (! $cid) {
+               if (get_my_url()) {
                        $r = q("select id from contact where nurl = '%s' and uid = %d limit 1",
                                dbesc(normalise_link(get_my_url())),
                                intval($profile_uid)
                        );
-                       if (dbm::is_result($r))
+                       if (dbm::is_result($r)) {
                                $cid = $r[0]['id'];
-                       else {
+                       else {
                                $r = q("select id from gcontact where nurl = '%s' limit 1",
                                        dbesc(normalise_link(get_my_url()))
                                );
@@ -227,22 +239,26 @@ function common_friends_visitor_widget($profile_uid) {
                }
        }
 
-       if($cid == 0 && $zcid == 0)
+       if ($cid == 0 && $zcid == 0) {
                return;
+       }
 
-       require_once('include/socgraph.php');
+       require_once 'include/socgraph.php';
 
-       if($cid)
-               $t = count_common_friends($profile_uid,$cid);
-       else
-               $t = count_common_friends_zcid($profile_uid,$zcid);
-       if(! $t)
+       if ($cid) {
+               $t = count_common_friends($profile_uid, $cid);
+       } else {
+               $t = count_common_friends_zcid($profile_uid, $zcid);
+       }
+       if (! $t) {
                return;
+       }
 
-       if($cid)
-               $r = common_friends($profile_uid,$cid,0,5,true);
-       else
-               $r = common_friends_zcid($profile_uid,$zcid,0,5,true);
+       if ($cid) {
+               $r = common_friends($profile_uid, $cid, 0, 5, true);
+       } else {
+               $r = common_friends_zcid($profile_uid, $zcid, 0, 5, true);
+       }
 
        return replace_macros(get_markup_template('remote_friends_common.tpl'), array(
                '$desc' =>  sprintf( tt("%d contact in common", "%d contacts in common", $t), $t),
index 93c42cd7b183eed4d6003feaf53ae934f99b0229..64204c696fd7afbb99635001e03cace994a98a60 100644 (file)
@@ -1,13 +1,15 @@
 <?php
 
-require_once("include/bbcode.php");
-require_once("include/acl_selectors.php");
+require_once "include/bbcode.php";
+require_once "include/acl_selectors.php";
 
 
-// Note: the code in 'item_extract_images' and 'item_redir_and_replace_images'
-// is identical to the code in mod/message.php for 'item_extract_images' and
-// 'item_redir_and_replace_images'
-if(! function_exists('item_extract_images')) {
+/*
+ * Note: the code in 'item_extract_images' and 'item_redir_and_replace_images'
+ * is identical to the code in mod/message.php for 'item_extract_images' and
+ * 'item_redir_and_replace_images'
+ */
+if (! function_exists('item_extract_images')) {
 function item_extract_images($body) {
 
        $saved_image = array();
@@ -18,26 +20,28 @@ function item_extract_images($body) {
        $img_start = strpos($orig_body, '[img');
        $img_st_close = ($img_start !== false ? strpos(substr($orig_body, $img_start), ']') : false);
        $img_end = ($img_start !== false ? strpos(substr($orig_body, $img_start), '[/img]') : false);
-       while(($img_st_close !== false) && ($img_end !== false)) {
+       while (($img_st_close !== false) && ($img_end !== false)) {
 
                $img_st_close++; // make it point to AFTER the closing bracket
                $img_end += $img_start;
 
-               if(! strcmp(substr($orig_body, $img_start + $img_st_close, 5), 'data:')) {
+               if (! strcmp(substr($orig_body, $img_start + $img_st_close, 5), 'data:')) {
                        // This is an embedded image
 
                        $saved_image[$cnt] = substr($orig_body, $img_start + $img_st_close, $img_end - ($img_start + $img_st_close));
                        $new_body = $new_body . substr($orig_body, 0, $img_start) . '[!#saved_image' . $cnt . '#!]';
 
                        $cnt++;
-               }
-               else
+               } else {
                        $new_body = $new_body . substr($orig_body, 0, $img_end + strlen('[/img]'));
+               }
 
                $orig_body = substr($orig_body, $img_end + strlen('[/img]'));
 
-               if($orig_body === false) // in case the body ends on a closing image tag
+               if ($orig_body === false) {
+                       // in case the body ends on a closing image tag
                        $orig_body = '';
+               }
 
                $img_start = strpos($orig_body, '[img');
                $img_st_close = ($img_start !== false ? strpos(substr($orig_body, $img_start), ']') : false);
@@ -49,7 +53,7 @@ function item_extract_images($body) {
        return array('body' => $new_body, 'images' => $saved_image);
 }}
 
-if(! function_exists('item_redir_and_replace_images')) {
+if (! function_exists('item_redir_and_replace_images')) {
 function item_redir_and_replace_images($body, $images, $cid) {
 
        $origbody = $body;
@@ -57,7 +61,7 @@ function item_redir_and_replace_images($body, $images, $cid) {
 
        $cnt = 1;
        $pos = get_bb_tag_pos($origbody, 'url', 1);
-       while($pos !== false && $cnt < 1000) {
+       while ($pos !== false && $cnt < 1000) {
 
                $search = '/\[url\=(.*?)\]\[!#saved_image([0-9]*)#!\]\[\/url\]' . '/is';
                $replace = '[url=' . z_path() . '/redir/' . $cid
@@ -66,8 +70,9 @@ function item_redir_and_replace_images($body, $images, $cid) {
                $newbody .= substr($origbody, 0, $pos['start']['open']);
                $subject = substr($origbody, $pos['start']['open'], $pos['end']['close'] - $pos['start']['open']);
                $origbody = substr($origbody, $pos['end']['close']);
-               if($origbody === false)
+               if ($origbody === false) {
                        $origbody = '';
+               }
 
                $subject = preg_replace($search, $replace, $subject);
                $newbody .= $subject;
@@ -79,45 +84,51 @@ function item_redir_and_replace_images($body, $images, $cid) {
 
        $cnt = 0;
        foreach ($images as $image) {
-               // We're depending on the property of 'foreach' (specified on the PHP website) that
-               // it loops over the array starting from the first element and going sequentially
-               // to the last element
+               /*
+                * We're depending on the property of 'foreach' (specified on the PHP website) that
+                * it loops over the array starting from the first element and going sequentially
+                * to the last element.
+                */
                $newbody = str_replace('[!#saved_image' . $cnt . '#!]', '[img]' . $image . '[/img]', $newbody);
                $cnt++;
        }
        return $newbody;
 }}
 
-
-
 /**
  * Render actions localized
  */
-function localize_item(&$item){
+function localize_item(&$item) {
 
        $extracted = item_extract_images($item['body']);
-       if($extracted['images'])
+       if ($extracted['images']) {
                $item['body'] = item_redir_and_replace_images($extracted['body'], $extracted['images'], $item['contact-id']);
+       }
 
-       $xmlhead="<"."?xml version='1.0' encoding='UTF-8' ?".">";
-       if (activity_match($item['verb'],ACTIVITY_LIKE)
-               || activity_match($item['verb'],ACTIVITY_DISLIKE)
-               || activity_match($item['verb'],ACTIVITY_ATTEND)
-               || activity_match($item['verb'],ACTIVITY_ATTENDNO)
-               || activity_match($item['verb'],ACTIVITY_ATTENDMAYBE)){
-
-               $r = q("SELECT * from `item`,`contact` WHERE
-                               `item`.`contact-id`=`contact`.`id` AND `item`.`uri`='%s';",
-                                dbesc($item['parent-uri']));
-               if (!dbm::is_result($r)) return;
-               $obj=$r[0];
+       /// @Separted ???
+       $xmlhead = "<" . "?xml version='1.0' encoding='UTF-8' ?" . ">";
+       if (activity_match($item['verb'], ACTIVITY_LIKE)
+               || activity_match($item['verb'], ACTIVITY_DISLIKE)
+               || activity_match($item['verb'], ACTIVITY_ATTEND)
+               || activity_match($item['verb'], ACTIVITY_ATTENDNO)
+               || activity_match($item['verb'], ACTIVITY_ATTENDMAYBE)) {
+
+               /// @TODO may hurt performance
+               $r = q("SELECT * FROM `item`, `contact`
+                       WHERE `item`.`contact-id`=`contact`.`id`
+                       AND `item`.`uri`='%s'",
+                       dbesc($item['parent-uri']));
+               if (!dbm::is_result($r)) {
+                       return;
+               }
+               $obj = $r[0];
 
                $author  = '[url=' . $item['author-link'] . ']' . $item['author-name'] . '[/url]';
                $objauthor =  '[url=' . $obj['author-link'] . ']' . $obj['author-name'] . '[/url]';
 
-               switch($obj['verb']){
+               switch ($obj['verb']) {
                        case ACTIVITY_POST:
-                               switch ($obj['object-type']){
+                               switch ($obj['object-type']) {
                                        case ACTIVITY_OBJ_EVENT:
                                                $post_type = t('event');
                                                break;
@@ -126,9 +137,10 @@ function localize_item(&$item){
                                }
                                break;
                        default:
-                               if($obj['resource-id']){
+                               if ($obj['resource-id']) {
                                        $post_type = t('photo');
-                                       $m=array(); preg_match("/\[url=([^]]*)\]/", $obj['body'], $m);
+                                       $m = array();
+                                       preg_match("/\[url=([^]]*)\]/", $obj['body'], $m);
                                        $rr['plink'] = $m[1];
                                } else {
                                        $post_type = t('status');
@@ -137,25 +149,25 @@ function localize_item(&$item){
 
                $plink = '[url=' . $obj['plink'] . ']' . $post_type . '[/url]';
 
-               if(activity_match($item['verb'],ACTIVITY_LIKE)) {
+               if (activity_match($item['verb'], ACTIVITY_LIKE)) {
                        $bodyverb = t('%1$s likes %2$s\'s %3$s');
                }
-               elseif(activity_match($item['verb'],ACTIVITY_DISLIKE)) {
+               elseif (activity_match($item['verb'], ACTIVITY_DISLIKE)) {
                        $bodyverb = t('%1$s doesn\'t like %2$s\'s %3$s');
                }
-               elseif(activity_match($item['verb'],ACTIVITY_ATTEND)) {
+               elseif (activity_match($item['verb'], ACTIVITY_ATTEND)) {
                        $bodyverb = t('%1$s attends %2$s\'s %3$s');
                }
-               elseif(activity_match($item['verb'],ACTIVITY_ATTENDNO)) {
+               elseif (activity_match($item['verb'], ACTIVITY_ATTENDNO)) {
                        $bodyverb = t('%1$s doesn\'t attend %2$s\'s %3$s');
                }
-               elseif(activity_match($item['verb'],ACTIVITY_ATTENDMAYBE)) {
+               elseif (activity_match($item['verb'], ACTIVITY_ATTENDMAYBE)) {
                        $bodyverb = t('%1$s attends maybe %2$s\'s %3$s');
                }
                $item['body'] = sprintf($bodyverb, $author, $objauthor, $plink);
 
        }
-       if (activity_match($item['verb'],ACTIVITY_FRIEND)) {
+       if (activity_match($item['verb'], ACTIVITY_FRIEND)) {
 
                if ($item['object-type']=="" || $item['object-type']!== ACTIVITY_OBJ_PERSON) return;
 
@@ -169,57 +181,65 @@ function localize_item(&$item){
 
                $Bname = $obj->title;
                $Blink = ""; $Bphoto = "";
-               foreach ($links->link as $l){
+               foreach ($links->link as $l) {
                        $atts = $l->attributes();
-                       switch($atts['rel']){
+                       switch ($atts['rel']) {
                                case "alternate": $Blink = $atts['href'];
                                case "photo": $Bphoto = $atts['href'];
                        }
-
                }
 
                $A = '[url=' . zrl($Alink) . ']' . $Aname . '[/url]';
                $B = '[url=' . zrl($Blink) . ']' . $Bname . '[/url]';
-               if ($Bphoto!="") $Bphoto = '[url=' . zrl($Blink) . '][img]' . $Bphoto . '[/img][/url]';
+               if ($Bphoto != "") {
+                       $Bphoto = '[url=' . zrl($Blink) . '][img]' . $Bphoto . '[/img][/url]';
+               }
 
                $item['body'] = sprintf( t('%1$s is now friends with %2$s'), $A, $B)."\n\n\n".$Bphoto;
 
        }
-       if (stristr($item['verb'],ACTIVITY_POKE)) {
+       if (stristr($item['verb'], ACTIVITY_POKE)) {
                $verb = urldecode(substr($item['verb'],strpos($item['verb'],'#')+1));
-               if(! $verb)
+               if (! $verb) {
                        return;
-               if ($item['object-type']=="" || $item['object-type']!== ACTIVITY_OBJ_PERSON) return;
+               }
+               if ($item['object-type']=="" || $item['object-type']!== ACTIVITY_OBJ_PERSON) {
+                       return;
+               }
 
                $Aname = $item['author-name'];
                $Alink = $item['author-link'];
 
-               $xmlhead="<"."?xml version='1.0' encoding='UTF-8' ?".">";
+               $xmlhead = "<" . "?xml version='1.0' encoding='UTF-8' ?" . ">";
 
                $obj = parse_xml_string($xmlhead.$item['object']);
                $links = parse_xml_string($xmlhead."<links>".unxmlify($obj->link)."</links>");
 
                $Bname = $obj->title;
-               $Blink = ""; $Bphoto = "";
-               foreach ($links->link as $l){
+               $Blink = "";
+               $Bphoto = "";
+               foreach ($links->link as $l) {
                        $atts = $l->attributes();
-                       switch($atts['rel']){
+                       switch ($atts['rel']) {
                                case "alternate": $Blink = $atts['href'];
                                case "photo": $Bphoto = $atts['href'];
                        }
-
                }
 
                $A = '[url=' . zrl($Alink) . ']' . $Aname . '[/url]';
                $B = '[url=' . zrl($Blink) . ']' . $Bname . '[/url]';
-               if ($Bphoto!="") $Bphoto = '[url=' . zrl($Blink) . '][img=80x80]' . $Bphoto . '[/img][/url]';
+               if ($Bphoto != "") {
+                       $Bphoto = '[url=' . zrl($Blink) . '][img=80x80]' . $Bphoto . '[/img][/url]';
+               }
 
-               // we can't have a translation string with three positions but no distinguishable text
-               // So here is the translate string.
+               /*
+                * we can't have a translation string with three positions but no distinguishable text
+                * So here is the translate string.
+                */
                $txt = t('%1$s poked %2$s');
 
                // now translate the verb
-               $poked_t = trim(sprintf($txt, "",""));
+               $poked_t = trim(sprintf($txt, "", ""));
                $txt = str_replace( $poked_t, t($verb), $txt);
 
                // then do the sprintf on the translation string
@@ -227,10 +247,11 @@ function localize_item(&$item){
                $item['body'] = sprintf($txt, $A, $B). "\n\n\n" . $Bphoto;
 
        }
-       if (stristr($item['verb'],ACTIVITY_MOOD)) {
-               $verb = urldecode(substr($item['verb'],strpos($item['verb'],'#')+1));
-               if(! $verb)
+       if (stristr($item['verb'], ACTIVITY_MOOD)) {
+               $verb = urldecode(substr($item['verb'], strpos($item['verb'], '#') + 1));
+               if (! $verb) {
                        return;
+               }
 
                $Aname = $item['author-name'];
                $Alink = $item['author-link'];
@@ -241,19 +262,25 @@ function localize_item(&$item){
                $item['body'] = sprintf($txt, $A, t($verb));
        }
 
-       if (activity_match($item['verb'],ACTIVITY_TAG)) {
-               $r = q("SELECT * from `item`,`contact` WHERE
-               `item`.`contact-id`=`contact`.`id` AND `item`.`uri`='%s';",
-                dbesc($item['parent-uri']));
-               if (!dbm::is_result($r)) return;
-               $obj=$r[0];
+       if (activity_match($item['verb'], ACTIVITY_TAG)) {
+               /// @TODO may hurt performance "joining" two tables + asterisk
+               $r = q("SELECT * FROM `item`, `contact`
+                       WHERE `item`.`contact-id`=`contact`.`id`
+                       AND `item`.`uri`='%s'",
+                       dbesc($item['parent-uri']));
+
+               if (!dbm::is_result($r)) {
+                       return;
+               }
+
+               $obj = $r[0];
 
                $author  = '[url=' . zrl($item['author-link']) . ']' . $item['author-name'] . '[/url]';
                $objauthor =  '[url=' . zrl($obj['author-link']) . ']' . $obj['author-name'] . '[/url]';
 
-               switch($obj['verb']){
+               switch ($obj['verb']) {
                        case ACTIVITY_POST:
-                               switch ($obj['object-type']){
+                               switch ($obj['object-type']) {
                                        case ACTIVITY_OBJ_EVENT:
                                                $post_type = t('event');
                                                break;
@@ -262,13 +289,15 @@ function localize_item(&$item){
                                }
                                break;
                        default:
-                               if($obj['resource-id']){
+                               if ($obj['resource-id']) {
                                        $post_type = t('photo');
                                        $m=array(); preg_match("/\[url=([^]]*)\]/", $obj['body'], $m);
                                        $rr['plink'] = $m[1];
                                } else {
                                        $post_type = t('status');
                                }
+                               // Let's break everthing ... ;-)
+                               break;
                }
                $plink = '[url=' . $obj['plink'] . ']' . $post_type . '[/url]';
 
@@ -278,22 +307,24 @@ function localize_item(&$item){
                $item['body'] = sprintf( t('%1$s tagged %2$s\'s %3$s with %4$s'), $author, $objauthor, $plink, $tag );
 
        }
-       if (activity_match($item['verb'],ACTIVITY_FAVORITE)){
+       if (activity_match($item['verb'], ACTIVITY_FAVORITE)) {
 
-               if ($item['object-type']== "")
+               if ($item['object-type'] == "") {
                        return;
+               }
 
                $Aname = $item['author-name'];
                $Alink = $item['author-link'];
 
-               $xmlhead="<"."?xml version='1.0' encoding='UTF-8' ?".">";
+               $xmlhead = "<" . "?xml version='1.0' encoding='UTF-8' ?" . ">";
 
                $obj = parse_xml_string($xmlhead.$item['object']);
-               if(strlen($obj->id)) {
-                       $r = q("select * from item where uri = '%s' and uid = %d limit 1",
+               if (strlen($obj->id)) {
+                       $r = q("SELECT * FROM `item` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
                                        dbesc($obj->id),
                                        intval($item['uid'])
                        );
+
                        if (dbm::is_result($r) && $r[0]['plink']) {
                                $target = $r[0];
                                $Bname = $target['author-name'];
@@ -302,21 +333,21 @@ function localize_item(&$item){
                                $B = '[url=' . zrl($Blink) . ']' . $Bname . '[/url]';
                                $P = '[url=' . $target['plink'] . ']' . t('post/item') . '[/url]';
                                $item['body'] = sprintf( t('%1$s marked %2$s\'s %3$s as favorite'), $A, $B, $P)."\n";
-
                        }
                }
        }
        $matches = null;
-       if(preg_match_all('/@\[url=(.*?)\]/is',$item['body'],$matches,PREG_SET_ORDER)) {
-               foreach($matches as $mtch) {
-                       if(! strpos($mtch[1],'zrl='))
-                               $item['body'] = str_replace($mtch[0],'@[url=' . zrl($mtch[1]). ']',$item['body']);
+       if (preg_match_all('/@\[url=(.*?)\]/is', $item['body'], $matches, PREG_SET_ORDER)) {
+               foreach ($matches as $mtch) {
+                       if (! strpos($mtch[1], 'zrl=')) {
+                               $item['body'] = str_replace($mtch[0], '@[url=' . zrl($mtch[1]) . ']', $item['body']);
+                       }
                }
        }
 
        // add zrl's to public images
        $photo_pattern = "/\[url=(.*?)\/photos\/(.*?)\/image\/(.*?)\]\[img(.*?)\]h(.*?)\[\/img\]\[\/url\]/is";
-       if(preg_match($photo_pattern,$item['body'])) {
+       if (preg_match($photo_pattern, $item['body'])) {
                $photo_replace = '[url=' . zrl('$1' . '/photos/' . '$2' . '/image/' . '$3' ,true) . '][img' . '$4' . ']h' . '$5'  . '[/img][/url]';
                $item['body'] = bb_tag_preg_replace($photo_pattern, $photo_replace, 'url', $item['body']);
        }
@@ -326,27 +357,26 @@ function localize_item(&$item){
        $x = stristr($item['plink'],'/display/');
        if ($x) {
                $sparkle = false;
-               $y = best_link_url($item,$sparkle,true);
+               $y = best_link_url($item, $sparkle, true);
 
-               if (strstr($y,'/redir/')) {
+               if (strstr($y, '/redir/')) {
                        $item['plink'] = $y . '?f=&url=' . $item['plink'];
                }
        }
-
-
-
 }
 
 /**
  * Count the total of comments on this item and its desendants
+ * @TODO proper type-hint + doc-tag
  */
 function count_descendants($item) {
        $total = count($item['children']);
 
-       if($total > 0) {
-               foreach($item['children'] as $child) {
-                       if(! visible_activity($child))
+       if ($total > 0) {
+               foreach ($item['children'] as $child) {
+                       if (! visible_activity($child)) {
                                $total --;
+                       }
                        $total += count_descendants($child);
                }
        }
@@ -356,18 +386,19 @@ function count_descendants($item) {
 
 function visible_activity($item) {
 
-       // likes (etc.) can apply to other things besides posts. Check if they are post children,
-       // in which case we handle them specially
-
+       /*
+        * likes (etc.) can apply to other things besides posts. Check if they are post children,
+        * in which case we handle them specially
+        */
        $hidden_activities = array(ACTIVITY_LIKE, ACTIVITY_DISLIKE, ACTIVITY_ATTEND, ACTIVITY_ATTENDNO, ACTIVITY_ATTENDMAYBE);
-       foreach($hidden_activities as $act) {
-               if(activity_match($item['verb'],$act)) {
+       foreach ($hidden_activities as $act) {
+               if (activity_match($item['verb'], $act)) {
                        return false;
                }
        }
 
-       if(activity_match($item['verb'],ACTIVITY_FOLLOW) && $item['object-type'] === ACTIVITY_OBJ_NOTE) {
-               if(! (($item['self']) && ($item['uid'] == local_user()))) {
+       if (activity_match($item['verb'], ACTIVITY_FOLLOW) && $item['object-type'] === ACTIVITY_OBJ_NOTE) {
+               if (! (($item['self']) && ($item['uid'] == local_user()))) {
                        return false;
                }
        }
@@ -379,9 +410,8 @@ function visible_activity($item) {
  * @brief SQL query for items
  */
 function item_query() {
-
-       return "SELECT ".item_fieldlists()." FROM `item` ".
-               item_joins()." WHERE ".item_condition();
+       return "SELECT " . item_fieldlists() . " FROM `item` " .
+               item_joins() . " WHERE " . item_condition();
 }
 
 /**
@@ -439,7 +469,6 @@ These Fields are not added below (yet). They are here to for bug search.
  * @brief SQL join for contacts that are needed for displaying items
  */
 function item_joins() {
-
        return "STRAIGHT_JOIN `contact` ON `contact`.`id` = `item`.`contact-id` AND
                (NOT `contact`.`blocked` OR `contact`.`pending`)
                LEFT JOIN `contact` AS `author` ON `author`.`id`=`item`.`author-id`
@@ -450,10 +479,10 @@ function item_joins() {
  * @brief SQL condition for items that are needed for displaying items
  */
 function item_condition() {
-
        return "`item`.`visible` AND NOT `item`.`deleted` AND NOT `item`.`moderated`";
 }
 
+if (!function_exists('conversation')) {
 /**
  * "Render" a conversation or list of items for HTML display.
  * There are two major forms of display:
@@ -464,13 +493,11 @@ function item_condition() {
  * that are based on unique features of the calling module.
  *
  */
-
-if(!function_exists('conversation')) {
 function conversation(App $a, $items, $mode, $update, $preview = false) {
 
-       require_once('include/bbcode.php');
-       require_once('include/Contact.php');
-       require_once('mod/proxy.php');
+       require_once 'include/bbcode.php';
+       require_once 'include/Contact.php';
+       require_once 'mod/proxy.php';
 
        $ssl_state = ((local_user()) ? true : false);
 
@@ -480,100 +507,100 @@ function conversation(App $a, $items, $mode, $update, $preview = false) {
 
        $arr_blocked = null;
 
-       if(local_user()) {
-               $str_blocked = get_pconfig(local_user(),'system','blocked');
-               if($str_blocked) {
-                       $arr_blocked = explode(',',$str_blocked);
-                       for($x = 0; $x < count($arr_blocked); $x ++)
+       if (local_user()) {
+               $str_blocked = get_pconfig(local_user(), 'system', 'blocked');
+               if ($str_blocked) {
+                       $arr_blocked = explode(',', $str_blocked);
+                       for ($x = 0; $x < count($arr_blocked); $x ++) {
                                $arr_blocked[$x] = trim($arr_blocked[$x]);
+                       }
                }
 
        }
 
        $previewing = (($preview) ? ' preview ' : '');
 
-       if($mode === 'network') {
+       if ($mode === 'network') {
                $profile_owner = local_user();
                $page_writeable = true;
-               if(!$update) {
-                       // The special div is needed for liveUpdate to kick in for this page.
-                       // We only launch liveUpdate if you aren't filtering in some incompatible
-                       // way and also you aren't writing a comment (discovered in javascript).
-
+               if (!$update) {
+                       /*
+                        * The special div is needed for liveUpdate to kick in for this page.
+                        * We only launch liveUpdate if you aren't filtering in some incompatible
+                        * way and also you aren't writing a comment (discovered in javascript).
+                        */
                        $live_update_div = '<div id="live-network"></div>' . "\r\n"
                                . "<script> var profile_uid = " . $_SESSION['uid']
-                               . "; var netargs = '" . substr($a->cmd,8)
+                               . "; var netargs = '" . substr($a->cmd, 8)
                                . '?f='
-                               . ((x($_GET,'cid'))    ? '&cid='    . $_GET['cid']    : '')
-                               . ((x($_GET,'search')) ? '&search=' . $_GET['search'] : '')
-                               . ((x($_GET,'star'))   ? '&star='   . $_GET['star']   : '')
-                               . ((x($_GET,'order'))  ? '&order='  . $_GET['order']  : '')
-                               . ((x($_GET,'bmark'))  ? '&bmark='  . $_GET['bmark']  : '')
-                               . ((x($_GET,'liked'))  ? '&liked='  . $_GET['liked']  : '')
-                               . ((x($_GET,'conv'))   ? '&conv='   . $_GET['conv']   : '')
-                               . ((x($_GET,'spam'))   ? '&spam='   . $_GET['spam']   : '')
-                               . ((x($_GET,'nets'))   ? '&nets='   . $_GET['nets']   : '')
-                               . ((x($_GET,'cmin'))   ? '&cmin='   . $_GET['cmin']   : '')
-                               . ((x($_GET,'cmax'))   ? '&cmax='   . $_GET['cmax']   : '')
-                               . ((x($_GET,'file'))   ? '&file='   . $_GET['file']   : '')
+                               . ((x($_GET, 'cid'))    ? '&cid='    . $_GET['cid']    : '')
+                               . ((x($_GET, 'search')) ? '&search=' . $_GET['search'] : '')
+                               . ((x($_GET, 'star'))   ? '&star='   . $_GET['star']   : '')
+                               . ((x($_GET, 'order'))  ? '&order='  . $_GET['order']  : '')
+                               . ((x($_GET, 'bmark'))  ? '&bmark='  . $_GET['bmark']  : '')
+                               . ((x($_GET, 'liked'))  ? '&liked='  . $_GET['liked']  : '')
+                               . ((x($_GET, 'conv'))   ? '&conv='   . $_GET['conv']   : '')
+                               . ((x($_GET, 'spam'))   ? '&spam='   . $_GET['spam']   : '')
+                               . ((x($_GET, 'nets'))   ? '&nets='   . $_GET['nets']   : '')
+                               . ((x($_GET, 'cmin'))   ? '&cmin='   . $_GET['cmin']   : '')
+                               . ((x($_GET, 'cmax'))   ? '&cmax='   . $_GET['cmax']   : '')
+                               . ((x($_GET, 'file'))   ? '&file='   . $_GET['file']   : '')
 
                                . "'; var profile_page = " . $a->pager['page'] . "; </script>\r\n";
                }
-       }
-       else if($mode === 'profile') {
+       } elseif ($mode === 'profile') {
                $profile_owner = $a->profile['profile_uid'];
                $page_writeable = can_write_wall($a,$profile_owner);
 
-               if(!$update) {
+               if (!$update) {
                        $tab = notags(trim($_GET['tab']));
                        $tab = ( $tab ? $tab : 'posts' );
-                       if($tab === 'posts') {
-                               // This is ugly, but we can't pass the profile_uid through the session to the ajax updater,
-                               // because browser prefetching might change it on us. We have to deliver it with the page.
+                       if ($tab === 'posts') {
+                               /*
+                                * This is ugly, but we can't pass the profile_uid through the session to the ajax updater,
+                                * because browser prefetching might change it on us. We have to deliver it with the page.
+                                */
 
                                $live_update_div = '<div id="live-profile"></div>' . "\r\n"
                                        . "<script> var profile_uid = " . $a->profile['profile_uid']
                                        . "; var netargs = '?f='; var profile_page = " . $a->pager['page'] . "; </script>\r\n";
                        }
                }
-       }
-       else if($mode === 'notes') {
+       } elseif ($mode === 'notes') {
                $profile_owner = local_user();
                $page_writeable = true;
-               if(!$update) {
+               if (!$update) {
                        $live_update_div = '<div id="live-notes"></div>' . "\r\n"
                                . "<script> var profile_uid = " . local_user()
                                . "; var netargs = '/?f='; var profile_page = " . $a->pager['page'] . "; </script>\r\n";
                }
-       }
-       else if($mode === 'display') {
+       } elseif ($mode === 'display') {
                $profile_owner = $a->profile['uid'];
                $page_writeable = can_write_wall($a,$profile_owner);
-               if(!$update) {
+               if (!$update) {
                        $live_update_div = '<div id="live-display"></div>' . "\r\n"
                                . "<script> var profile_uid = " . $_SESSION['uid'] . ";"
                                . " var profile_page = 1; </script>";
                }
-       }
-       else if($mode === 'community') {
+       } elseif ($mode === 'community') {
                $profile_owner = 0;
                $page_writeable = false;
-               if(!$update) {
+               if (!$update) {
                        $live_update_div = '<div id="live-community"></div>' . "\r\n"
                                . "<script> var profile_uid = -1; var netargs = '/?f='; var profile_page = " . $a->pager['page'] . "; </script>\r\n";
                }
-       }
-       else if($mode === 'search') {
+       } elseif ($mode === 'search') {
                $live_update_div = '<div id="live-search"></div>' . "\r\n";
        }
 
        $page_dropping = ((local_user() && local_user() == $profile_owner) ? true : false);
 
 
-       if($update)
+       if ($update) {
                $return_url = $_SESSION['return_url'];
-       else
+       } else {
                $return_url = $_SESSION['return_url'] = $a->query_string;
+       }
 
        $cb = array('items' => $items, 'mode' => $mode, 'update' => $update, 'preview' => $preview);
        call_hooks('conversation_start',$cb);
@@ -594,28 +621,32 @@ function conversation(App $a, $items, $mode, $update, $preview = false) {
 
        $page_template = get_markup_template("conversation.tpl");
 
-       if($items && count($items)) {
+       if ($items && count($items)) {
 
-               if($mode === 'network-new' || $mode === 'search' || $mode === 'community') {
+               if ($mode === 'network-new' || $mode === 'search' || $mode === 'community') {
 
-                       // "New Item View" on network page or search page results
-                       // - just loop through the items and format them minimally for display
+                       /*
+                        * "New Item View" on network page or search page results
+                        * - just loop through the items and format them minimally for display
+                        */
 
-//                     $tpl = get_markup_template('search_item.tpl');
+                       /// @TODO old lost code?
+                       // $tpl = get_markup_template('search_item.tpl');
                        $tpl = 'search_item.tpl';
 
-                       foreach($items as $item) {
+                       foreach ($items as $item) {
 
-                               if($arr_blocked) {
+                               if ($arr_blocked) {
                                        $blocked = false;
-                                       foreach($arr_blocked as $b) {
-                                               if($b && link_compare($item['author-link'],$b)) {
+                                       foreach ($arr_blocked as $b) {
+                                               if ($b && link_compare($item['author-link'], $b)) {
                                                        $blocked = true;
                                                        break;
                                                }
                                        }
-                                       if($blocked)
+                                       if ($blocked) {
                                                continue;
+                                       }
                                }
 
 
@@ -626,70 +657,76 @@ function conversation(App $a, $items, $mode, $update, $preview = false) {
                                $owner_name  = '';
                                $sparkle     = '';
 
-                               if($mode === 'search' || $mode === 'community') {
-                                       if(((activity_match($item['verb'],ACTIVITY_LIKE)) || (activity_match($item['verb'],ACTIVITY_DISLIKE)))
+                               if ($mode === 'search' || $mode === 'community') {
+                                       if (((activity_match($item['verb'], ACTIVITY_LIKE)) || (activity_match($item['verb'], ACTIVITY_DISLIKE)))
                                                && ($item['id'] != $item['parent']))
                                                continue;
                                        $nickname = $item['nickname'];
-                               }
-                               else
+                               } else {
                                        $nickname = $a->user['nickname'];
+                               }
 
                                // prevent private email from leaking.
-                               if($item['network'] === NETWORK_MAIL && local_user() != $item['uid'])
-                                               continue;
+                               if ($item['network'] === NETWORK_MAIL && local_user() != $item['uid']) {
+                                       continue;
+                               }
 
-                               $profile_name   = ((strlen($item['author-name']))   ? $item['author-name']   : $item['name']);
-                               if($item['author-link'] && (! $item['author-name']))
+                               $profile_name = ((strlen($item['author-name'])) ? $item['author-name'] : $item['name']);
+                               if ($item['author-link'] && (! $item['author-name'])) {
                                        $profile_name = $item['author-link'];
+                               }
 
-
-
-                               $tags=array();
+                               $tags = array();
                                $hashtags = array();
                                $mentions = array();
 
                                $taglist = q("SELECT `type`, `term`, `url` FROM `term` WHERE `otype` = %d AND `oid` = %d AND `type` IN (%d, %d) ORDER BY `tid`",
                                                intval(TERM_OBJ_POST), intval($item['id']), intval(TERM_HASHTAG), intval(TERM_MENTION));
 
-                               foreach($taglist as $tag) {
+                               foreach ($taglist as $tag) {
 
-                                       if ($tag["url"] == "")
-                                               $tag["url"] = $searchpath.strtolower($tag["term"]);
+                                       if ($tag["url"] == "") {
+                                               $tag["url"] = $searchpath . strtolower($tag["term"]);
+                                       }
 
                                        if ($tag["type"] == TERM_HASHTAG) {
-                                               $hashtags[] = "#<a href=\"".$tag["url"]."\" target=\"_blank\">".$tag["term"]."</a>";
+                                               $hashtags[] = "#<a href=\"" . $tag["url"] . "\" target=\"_blank\">" . $tag["term"] . "</a>";
                                                $prefix = "#";
                                        } elseif ($tag["type"] == TERM_MENTION) {
-                                               $mentions[] = "@<a href=\"".$tag["url"]."\" target=\"_blank\">".$tag["term"]."</a>";
+                                               $mentions[] = "@<a href=\"" . $tag["url"] . "\" target=\"_blank\">" . $tag["term"] . "</a>";
                                                $prefix = "@";
                                        }
-                                       $tags[] = $prefix."<a href=\"".$tag["url"]."\" target=\"_blank\">".$tag["term"]."</a>";
+                                       $tags[] = $prefix."<a href=\"" . $tag["url"] . "\" target=\"_blank\">" . $tag["term"] . "</a>";
                                }
 
                                $sp = false;
                                $profile_link = best_link_url($item,$sp);
-                               if($profile_link === 'mailbox')
+                               if ($profile_link === 'mailbox') {
                                        $profile_link = '';
-                               if($sp)
+                               }
+
+                               if ($sp) {
                                        $sparkle = ' sparkle';
-                               else
+                               } else {
                                        $profile_link = zrl($profile_link);
+                               }
 
-                               if (!isset($item['author-thumb']) OR ($item['author-thumb'] == "")) {
+                               if (!x($item, 'author-thumb') OR ($item['author-thumb'] == "")) {
                                        $author_contact = get_contact_details_by_url($item['author-link'], $profile_owner);
-                                       if ($author_contact["thumb"])
+                                       if ($author_contact["thumb"]) {
                                                $item['author-thumb'] = $author_contact["thumb"];
-                                       else
+                                       } else {
                                                $item['author-thumb'] = $item['author-avatar'];
+                                       }
                                }
 
                                if (!isset($item['owner-thumb']) OR ($item['owner-thumb'] == "")) {
                                        $owner_contact = get_contact_details_by_url($item['owner-link'], $profile_owner);
-                                       if ($owner_contact["thumb"])
+                                       if ($owner_contact["thumb"]) {
                                                $item['owner-thumb'] = $owner_contact["thumb"];
-                                       else
+                                       } else {
                                                $item['owner-thumb'] = $item['owner-avatar'];
+                                       }
                                }
 
                                $locate = array('location' => $item['location'], 'coord' => $item['coord'], 'html' => '');
@@ -698,11 +735,11 @@ function conversation(App $a, $items, $mode, $update, $preview = false) {
                                $location = ((strlen($locate['html'])) ? $locate['html'] : render_location_dummy($locate));
 
                                localize_item($item);
-                               if($mode === 'network-new')
+                               if ($mode === 'network-new') {
                                        $dropping = true;
-                               else
+                               } else {
                                        $dropping = false;
-
+                               }
 
                                $drop = array(
                                        'dropping' => $dropping,
@@ -718,12 +755,11 @@ function conversation(App $a, $items, $mode, $update, $preview = false) {
                                $likebuttons = false;
                                $shareable = false;
 
-                               $body = prepare_body($item,true, $preview);
-
+                               $body = prepare_body($item, true, $preview);
 
                                list($categories, $folders) = get_cats_and_terms($item);
 
-                               if($a->theme['template_engine'] === 'internal') {
+                               if ($a->theme['template_engine'] === 'internal') {
                                        $profile_name_e = template_escape($profile_name);
                                        $item['title_e'] = template_escape($item['title']);
                                        $body_e = template_escape($body);
@@ -732,8 +768,7 @@ function conversation(App $a, $items, $mode, $update, $preview = false) {
                                        $mentions_e = template_escape($mentions);
                                        $location_e = template_escape($location);
                                        $owner_name_e = template_escape($owner_name);
-                               }
-                               else {
+                               } else {
                                        $profile_name_e = $profile_name;
                                        $item['title_e'] = $item['title'];
                                        $body_e = $body;
@@ -744,8 +779,9 @@ function conversation(App $a, $items, $mode, $update, $preview = false) {
                                        $owner_name_e = $owner_name;
                                }
 
-                               if ($item['item_network'] == "")
+                               if ($item['item_network'] == "") {
                                        $item['item_network'] = $item['network'];
+                               }
 
                                $tmp_item = array(
                                        'template' => $tpl,
@@ -802,47 +838,45 @@ function conversation(App $a, $items, $mode, $update, $preview = false) {
                                $threads[$threadsid]['items'] = array($arr['output']);
 
                        }
-               }
-               else
-               {
+               } else {
                        // Normal View
                        $page_template = get_markup_template("threaded_conversation.tpl");
 
-                       require_once('object/Conversation.php');
-                       require_once('object/Item.php');
+                       require_once 'object/Conversation.php';
+                       require_once 'object/Item.php';
 
                        $conv = new Conversation($mode, $preview);
 
-                       // get all the topmost parents
-                       // this shouldn't be needed, as we should have only them in our array
-                       // But for now, this array respects the old style, just in case
-
+                       /*
+                        * get all the topmost parents
+                        * this shouldn't be needed, as we should have only them in our array
+                        * But for now, this array respects the old style, just in case
+                        */
                        $threads = array();
-                       foreach($items as $item) {
+                       foreach ($items as $item) {
 
-                               if($arr_blocked) {
+                               if ($arr_blocked) {
                                        $blocked = false;
-                                       foreach($arr_blocked as $b) {
-
-                                               if($b && link_compare($item['author-link'],$b)) {
+                                       foreach ($arr_blocked as $b) {
+                                               if ($b && link_compare($item['author-link'], $b)) {
                                                        $blocked = true;
                                                        break;
                                                }
                                        }
-                                       if($blocked)
+                                       if ($blocked) {
                                                continue;
+                                       }
                                }
 
-
-
                                // Can we put this after the visibility check?
                                builtin_activity_puller($item, $conv_responses);
 
                                // Only add what is visible
-                               if($item['network'] === NETWORK_MAIL && local_user() != $item['uid']) {
+                               if ($item['network'] === NETWORK_MAIL && local_user() != $item['uid']) {
                                        continue;
                                }
-                               if(! visible_activity($item)) {
+
+                               if (! visible_activity($item)) {
                                        continue;
                                }
 
@@ -850,7 +884,7 @@ function conversation(App $a, $items, $mode, $update, $preview = false) {
 
                                $item['pagedrop'] = $page_dropping;
 
-                               if($item['id'] == $item['parent']) {
+                               if ($item['id'] == $item['parent']) {
                                        $item_object = new Item($item);
                                        $conv->add_thread($item_object);
                                }
@@ -858,7 +892,7 @@ function conversation(App $a, $items, $mode, $update, $preview = false) {
 
                        $threads = $conv->get_template_data($conv_responses);
 
-                       if(!$threads) {
+                       if (!$threads) {
                                logger('[ERROR] conversation : Failed to get template data.', LOGGER_DEBUG);
                                $threads = array();
                        }
@@ -873,13 +907,13 @@ function conversation(App $a, $items, $mode, $update, $preview = false) {
                '$mode' => $mode,
                '$user' => $a->user,
                '$threads' => $threads,
-               '$dropping' => ($page_dropping && feature_enabled(local_user(),'multi_delete') ? t('Delete Selected Items') : False),
+               '$dropping' => ($page_dropping && feature_enabled(local_user(), 'multi_delete') ? t('Delete Selected Items') : False),
        ));
 
        return $o;
 }}
 
-function best_link_url($item,&$sparkle,$ssl_state = false) {
+function best_link_url($item, &$sparkle, $ssl_state = false) {
 
        $best_url = '';
        $sparkle  = false;
@@ -889,16 +923,17 @@ function best_link_url($item,&$sparkle,$ssl_state = false) {
        if (local_user()) {
                $r = q("SELECT `id` FROM `contact` WHERE `network` = '%s' AND `uid` = %d AND `nurl` = '%s' AND NOT `pending` LIMIT 1",
                        dbesc(NETWORK_DFRN), intval(local_user()), dbesc(normalise_link($clean_url)));
-               if ($r) {
-                       $best_url = 'redir/'.$r[0]['id'];
+               if (dbm::is_result($r)) {
+                       $best_url = 'redir/' . $r[0]['id'];
                        $sparkle = true;
                }
        }
-       if(! $best_url) {
-               if(strlen($item['author-link']))
+       if (! $best_url) {
+               if (strlen($item['author-link'])) {
                        $best_url = $item['author-link'];
-               else
+               } else {
                        $best_url = $item['url'];
+               }
        }
 
        return $best_url;
@@ -906,11 +941,10 @@ function best_link_url($item,&$sparkle,$ssl_state = false) {
 
 
 if (! function_exists('item_photo_menu')) {
-function item_photo_menu($item)
-{
+function item_photo_menu($item) {
        $ssl_state = false;
 
-       if(local_user()) {
+       if (local_user()) {
                $ssl_state = true;
        }
 
@@ -938,13 +972,13 @@ function item_photo_menu($item)
        $rel = 0;
        $r = q("SELECT `id`, `network`, `rel` FROM `contact` WHERE `uid` = %d AND `nurl` = '%s' LIMIT 1",
                intval(local_user()), dbesc(normalise_link($item['author-link'])));
-       if ($r) {
+       if (dbm::is_result($r)) {
                $cid = $r[0]['id'];
                $network = $r[0]['network'];
                $rel = $r[0]['rel'];
        }
 
-       if($sparkle) {
+       if ($sparkle) {
                $status_link = $profile_link . '?url=status';
                $photos_link = $profile_link . '?url=photos';
                $profile_link = $profile_link . '?url=profile';
@@ -964,7 +998,7 @@ function item_photo_menu($item)
        }
 
        if (local_user()) {
-               $menu = Array(
+               $menu = array(
                        t('Follow Thread') => $sub_link,
                        t('View Status') => $status_link,
                        t('View Profile') => $profile_link,
@@ -1004,6 +1038,7 @@ function item_photo_menu($item)
        return $o;
 }}
 
+if (! function_exists('builtin_activity_puller')) {
 /**
  * @brief Checks item to see if it is one of the builtin activities (like/dislike, event attendance, consensus items, etc.)
  * Increments the count of each matching activity and adds a link to the author as needed.
@@ -1012,13 +1047,12 @@ function item_photo_menu($item)
  * @param array &$conv_responses (already created with builtin activity structure)
  * @return void
  */
-if(! function_exists('builtin_activity_puller')) {
 function builtin_activity_puller($item, &$conv_responses) {
-       foreach($conv_responses as $mode => $v) {
+       foreach ($conv_responses as $mode => $v) {
                $url = '';
                $sparkle = '';
 
-               switch($mode) {
+               switch ($mode) {
                        case 'like':
                                $verb = ACTIVITY_LIKE;
                                break;
@@ -1039,32 +1073,36 @@ function builtin_activity_puller($item, &$conv_responses) {
                                break;
                }
 
-               if((activity_match($item['verb'], $verb)) && ($item['id'] != $item['parent'])) {
+               if ((activity_match($item['verb'], $verb)) && ($item['id'] != $item['parent'])) {
                        $url = $item['author-link'];
-                       if((local_user()) && (local_user() == $item['uid']) && ($item['network'] === NETWORK_DFRN) && (! $item['self']) && (link_compare($item['author-link'],$item['url']))) {
+                       if ((local_user()) && (local_user() == $item['uid']) && ($item['network'] === NETWORK_DFRN) && (! $item['self']) && (link_compare($item['author-link'], $item['url']))) {
                                $url = 'redir/' . $item['contact-id'];
                                $sparkle = ' class="sparkle" ';
-                       }
-                       else
+                       } else {
                                $url = zrl($url);
+                       }
 
                        $url = '<a href="'. $url . '"'. $sparkle .'>' . htmlentities($item['author-name']) . '</a>';
 
-                       if(! $item['thr-parent'])
+                       if (! $item['thr-parent']) {
                                $item['thr-parent'] = $item['parent-uri'];
+                       }
 
-                       if(! ((isset($conv_responses[$mode][$item['thr-parent'] . '-l']))
-                               && (is_array($conv_responses[$mode][$item['thr-parent'] . '-l']))))
+                       if (! ((isset($conv_responses[$mode][$item['thr-parent'] . '-l']))
+                               && (is_array($conv_responses[$mode][$item['thr-parent'] . '-l'])))) {
                                $conv_responses[$mode][$item['thr-parent'] . '-l'] = array();
+                       }
 
                        // only list each unique author once
-                       if(in_array($url,$conv_responses[$mode][$item['thr-parent'] . '-l']))
+                       if (in_array($url,$conv_responses[$mode][$item['thr-parent'] . '-l'])) {
                                continue;
+                       }
 
-                       if(! isset($conv_responses[$mode][$item['thr-parent']]))
+                       if (! isset($conv_responses[$mode][$item['thr-parent']])) {
                                $conv_responses[$mode][$item['thr-parent']] = 1;
-                       else
+                       } else {
                                $conv_responses[$mode][$item['thr-parent']] ++;
+                       }
 
                        if (public_contact() == $item['author-id']) {
                                $conv_responses[$mode][$item['thr-parent'] . '-self'] = 1;
@@ -1078,24 +1116,25 @@ function builtin_activity_puller($item, &$conv_responses) {
        }
 }}
 
-// Format the vote text for a profile item
-// $cnt = number of people who vote the item
-// $arr = array of pre-linked names of likers/dislikers
-// $type = one of 'like, 'dislike', 'attendyes', 'attendno', 'attendmaybe'
-// $id  = item id
-// returns formatted text
-
-if(! function_exists('format_like')) {
-function format_like($cnt,$arr,$type,$id) {
+if (! function_exists('format_like')) {
+/**
+ * Format the vote text for a profile item
+ * @param int $cnt = number of people who vote the item
+ * @param array $arr = array of pre-linked names of likers/dislikers
+ * @param string $type = one of 'like, 'dislike', 'attendyes', 'attendno', 'attendmaybe'
+ * @param int $id  = item id
+ * @return formatted text
+ */
+function format_like($cnt, array $arr, $type, $id) {
        $o = '';
        $expanded = '';
 
-       if($cnt == 1) {
+       if ($cnt == 1) {
                $likers = $arr[0];
 
                // Phrase if there is only one liker. In other cases it will be uses for the expanded
                // list which show all likers
-               switch($type) {
+               switch ($type) {
                        case 'like' :
                                $phrase = sprintf( t('%s likes this.'), $likers);
                                break;
@@ -1114,16 +1153,17 @@ function format_like($cnt,$arr,$type,$id) {
                }
        }
 
-       if($cnt > 1) {
+       if ($cnt > 1) {
                $total = count($arr);
-               if($total >= MAX_LIKERS)
+               if ($total >= MAX_LIKERS) {
                        $arr = array_slice($arr, 0, MAX_LIKERS - 1);
-               if($total < MAX_LIKERS) {
+               }
+               if ($total < MAX_LIKERS) {
                        $last = t('and') . ' ' . $arr[count($arr)-1];
                        $arr2 = array_slice($arr, 0, -1);
                        $str = implode(', ', $arr2) . ' ' . $last;
                }
-               if($total >= MAX_LIKERS) {
+               if ($total >= MAX_LIKERS) {
                        $str = implode(', ', $arr);
                        $str .= sprintf( t(', and %d other people'), $total - MAX_LIKERS );
                }
@@ -1132,7 +1172,7 @@ function format_like($cnt,$arr,$type,$id) {
 
                $spanatts = "class=\"fakelink\" onclick=\"openClose('{$type}list-$id');\"";
 
-               switch($type) {
+               switch ($type) {
                        case 'like':
                                $phrase = sprintf( t('<span  %1$s>%2$d people</span> like this'), $spanatts, $cnt);
                                $explikers = sprintf( t('%s like this.'), $likers);
@@ -1169,11 +1209,10 @@ function format_like($cnt,$arr,$type,$id) {
        return $o;
 }}
 
-
-function status_editor($a,$x, $notes_cid = 0, $popup=false) {
+function status_editor(App $a, $x, $notes_cid = 0, $popup = false) {
        $o = '';
 
-       $geotag = (($x['allow_location']) ? replace_macros(get_markup_template('jot_geotag.tpl'), array()) : '');
+       $geotag = (x($x, 'allow_location') ? replace_macros(get_markup_template('jot_geotag.tpl'), array()) : '');
 
        $tpl = get_markup_template('jot-header.tpl');
        $a->page['htmlhead'] .= replace_macros($tpl, array(
@@ -1211,24 +1250,27 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) {
 
        // Private/public post links for the non-JS ACL form
        $private_post = 1;
-       if($_REQUEST['public'])
+       if (x($_REQUEST, 'public')) {
                $private_post = 0;
+       }
 
        $query_str = $a->query_string;
-       if(strpos($query_str, 'public=1') !== false)
+       if (strpos($query_str, 'public=1') !== false) {
                $query_str = str_replace(array('?public=1', '&public=1'), array('', ''), $query_str);
+       }
 
-       // I think $a->query_string may never have ? in it, but I could be wrong
-       // It looks like it's from the index.php?q=[etc] rewrite that the web
-       // server does, which converts any ? to &, e.g. suggest&ignore=61 for suggest?ignore=61
-       if(strpos($query_str, '?') === false)
+       /*
+        * I think $a->query_string may never have ? in it, but I could be wrong
+        * It looks like it's from the index.php?q=[etc] rewrite that the web
+        * server does, which converts any ? to &, e.g. suggest&ignore=61 for suggest?ignore=61
+        */
+       if (strpos($query_str, '?') === false) {
                $public_post_link = '?public=1';
-       else
+       } else {
                $public_post_link = '&public=1';
+       }
 
-
-
-//     $tpl = replace_macros($tpl,array('$jotplugins' => $jotplugins));
+       // $tpl = replace_macros($tpl,array('$jotplugins' => $jotplugins));
        $tpl = get_markup_template("jot.tpl");
 
        $o .= replace_macros($tpl,array(
@@ -1252,7 +1294,7 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) {
                '$title' => $x['title'],
                '$placeholdertitle' => t('Set title'),
                '$category' => $x['category'],
-               '$placeholdercategory' => (feature_enabled(local_user(),'categories') ? t('Categories (comma-separated list)') : ''),
+               '$placeholdercategory' => (feature_enabled(local_user(), 'categories') ? t('Categories (comma-separated list)') : ''),
                '$wait' => t('Please wait'),
                '$permset' => t('Permission settings'),
                '$shortpermset' => t('permissions'),
@@ -1290,9 +1332,8 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) {
        ));
 
 
-       if ($popup==true){
+       if ($popup == true) {
                $o = '<div id="jot-popup" style="display: none;">'.$o.'</div>';
-
        }
 
        return $o;
@@ -1302,20 +1343,20 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) {
 function get_item_children($arr, $parent) {
        $children = array();
        $a = get_app();
-       foreach($arr as $item) {
-               if($item['id'] != $item['parent']) {
-                       if(get_config('system','thread_allow') && $a->theme_thread_allow) {
+       foreach ($arr as $item) {
+               if ($item['id'] != $item['parent']) {
+                       if (get_config('system', 'thread_allow') && $a->theme_thread_allow) {
                                // Fallback to parent-uri if thr-parent is not set
                                $thr_parent = $item['thr-parent'];
-                               if($thr_parent == '')
+                               if ($thr_parent == '') {
                                        $thr_parent = $item['parent-uri'];
+                               }
 
-                               if($thr_parent == $parent['uri']) {
+                               if ($thr_parent == $parent['uri']) {
                                        $item['children'] = get_item_children($arr, $item);
                                        $children[] = $item;
                                }
-                       }
-                       else if($item['parent'] == $parent['id']) {
+                       } elseif ($item['parent'] == $parent['id']) {
                                $children[] = $item;
                        }
                }
@@ -1323,66 +1364,82 @@ function get_item_children($arr, $parent) {
        return $children;
 }
 
+/// @TODO Add type-hint
 function sort_item_children($items) {
        $result = $items;
-       usort($result,'sort_thr_created_rev');
-       foreach($result as $k => $i) {
-               if(count($result[$k]['children'])) {
+       usort($result, 'sort_thr_created_rev');
+       foreach ($result as $k => $i) {
+               if (count($result[$k]['children'])) {
                        $result[$k]['children'] = sort_item_children($result[$k]['children']);
                }
        }
        return $result;
 }
 
+/// @TODO Add type-hint
 function add_children_to_list($children, &$arr) {
-       foreach($children as $y) {
+       foreach ($children as $y) {
                $arr[] = $y;
-               if(count($y['children']))
+               if (count($y['children'])) {
                        add_children_to_list($y['children'], $arr);
+               }
        }
 }
 
-function conv_sort($arr,$order) {
+/// @TODO Add type-hint
+function conv_sort($arr, $order) {
 
-       if((!(is_array($arr) && count($arr))))
+       if ((!(is_array($arr) && count($arr)))) {
                return array();
+       }
 
        $parents = array();
        $children = array();
        $newarr = array();
 
-       // This is a preparation for having two different items with the same uri in one thread
-       // This will otherwise lead to an endless loop.
-       foreach($arr as $x)
-               if (!isset($newarr[$x['uri']]))
+       /*
+        * This is a preparation for having two different items with the same uri in one thread
+        * This will otherwise lead to an endless loop.
+        */
+       foreach ($arr as $x) {
+               if (!isset($newarr[$x['uri']])) {
                        $newarr[$x['uri']] = $x;
+               }
+       }
 
        $arr = $newarr;
 
-       foreach($arr as $x)
-               if($x['id'] == $x['parent'])
-                               $parents[] = $x;
+       foreach ($arr as $x) {
+               if ($x['id'] == $x['parent']) {
+                       $parents[] = $x;
+               }
+       }
 
-       if(stristr($order,'created'))
-               usort($parents,'sort_thr_created');
-       elseif(stristr($order,'commented'))
-               usort($parents,'sort_thr_commented');
+       if (stristr($order, 'created')) {
+               usort($parents, 'sort_thr_created');
+       } elseif (stristr($order, 'commented')) {
+               usort($parents, 'sort_thr_commented');
+       }
 
-       if(count($parents))
-               foreach($parents as $i=>$_x)
+       if (count($parents)) {
+               foreach ($parents as $i => $_x) {
                        $parents[$i]['children'] = get_item_children($arr, $_x);
+               }
+       }
 
-       /*foreach($arr as $x) {
-               if($x['id'] != $x['parent']) {
+       /// @TODO Old-lost code?
+       /*foreach ($arr as $x) {
+               if ($x['id'] != $x['parent']) {
                        $p = find_thread_parent_index($parents,$x);
-                       if($p !== false)
+                       if ($p !== false)
                                $parents[$p]['children'][] = $x;
                }
        }*/
-       if(count($parents)) {
-               foreach($parents as $k => $v) {
-                       if(count($parents[$k]['children'])) {
+       if (count($parents)) {
+               foreach ($parents as $k => $v) {
+                       if (count($parents[$k]['children'])) {
                                $parents[$k]['children'] = sort_item_children($parents[$k]['children']);
+                               /// @TODO Old-lost code?
                                /*$y = $parents[$k]['children'];
                                usort($y,'sort_thr_created_rev');
                                $parents[$k]['children'] = $y;*/
@@ -1391,92 +1448,103 @@ function conv_sort($arr,$order) {
        }
 
        $ret = array();
-       if(count($parents)) {
-               foreach($parents as $x) {
+       if (count($parents)) {
+               foreach ($parents as $x) {
                        $ret[] = $x;
-                       if(count($x['children']))
+                       if (count($x['children'])) {
                                add_children_to_list($x['children'], $ret);
-                               /*foreach($x['children'] as $y)
+                               /// @TODO Old-lost code?
+                               /*foreach ($x['children'] as $y)
                                        $ret[] = $y;*/
+                       }
                }
        }
 
        return $ret;
 }
 
-
-function sort_thr_created($a,$b) {
-       return strcmp($b['created'],$a['created']);
+/// @TODO Add type-hint
+function sort_thr_created($a, $b) {
+       return strcmp($b['created'], $a['created']);
 }
 
-function sort_thr_created_rev($a,$b) {
-       return strcmp($a['created'],$b['created']);
+/// @TODO Add type-hint
+function sort_thr_created_rev($a, $b) {
+       return strcmp($a['created'], $b['created']);
 }
 
-function sort_thr_commented($a,$b) {
-       return strcmp($b['commented'],$a['commented']);
+/// @TODO Add type-hint
+function sort_thr_commented($a, $b) {
+       return strcmp($b['commented'], $a['commented']);
 }
 
-function find_thread_parent_index($arr,$x) {
-       foreach($arr as $k => $v)
-               if($v['id'] == $x['parent'])
+/// @TODO Add type-hint
+function find_thread_parent_index($arr, $x) {
+       foreach ($arr as $k => $v) {
+               if ($v['id'] == $x['parent']) {
                        return $k;
+               }
+       }
        return false;
 }
 
+/// @TODO Add type-hint
 function render_location_dummy($item) {
-       if ($item['location'] != "")
+       if ($item['location'] != "") {
                return $item['location'];
+       }
 
-       if ($item['coord'] != "")
+       if ($item['coord'] != "") {
                return $item['coord'];
+       }
 }
 
-function get_responses($conv_responses,$response_verbs,$ob,$item) {
+/// @TODO Add type-hint
+function get_responses($conv_responses, $response_verbs, $ob, $item) {
        $ret = array();
-       foreach($response_verbs as $v) {
+       foreach ($response_verbs as $v) {
                $ret[$v] = array();
-               $ret[$v]['count'] = ((x($conv_responses[$v],$item['uri'])) ? $conv_responses[$v][$item['uri']] : '');
-               $ret[$v]['list']  = ((x($conv_responses[$v],$item['uri'])) ? $conv_responses[$v][$item['uri'] . '-l'] : '');
-               $ret[$v]['self']  = ((x($conv_responses[$v],$item['uri'])) ? $conv_responses[$v][$item['uri'] . '-self'] : '0');
-               if(count($ret[$v]['list']) > MAX_LIKERS) {
+               $ret[$v]['count'] = ((x($conv_responses[$v], $item['uri'])) ? $conv_responses[$v][$item['uri']] : '');
+               $ret[$v]['list']  = ((x($conv_responses[$v], $item['uri'])) ? $conv_responses[$v][$item['uri'] . '-l'] : '');
+               $ret[$v]['self']  = ((x($conv_responses[$v], $item['uri'])) ? $conv_responses[$v][$item['uri'] . '-self'] : '0');
+               if (count($ret[$v]['list']) > MAX_LIKERS) {
                        $ret[$v]['list_part'] = array_slice($ret[$v]['list'], 0, MAX_LIKERS);
                        array_push($ret[$v]['list_part'], '<a href="#" data-toggle="modal" data-target="#' . $v . 'Modal-'
                                . (($ob) ? $ob->get_id() : $item['id']) . '"><b>' . t('View all') . '</b></a>');
-               }
-               else {
+               } else {
                        $ret[$v]['list_part'] = '';
                }
-               $ret[$v]['button'] = get_response_button_text($v,$ret[$v]['count']);
+               $ret[$v]['button'] = get_response_button_text($v, $ret[$v]['count']);
                $ret[$v]['title'] = $conv_responses[$v]['title'];
        }
 
        $count = 0;
-       foreach($ret as $key) {
-               if ($key['count'] == true)
+       foreach ($ret as $key) {
+               if ($key['count'] == true) {
                        $count++;
+               }
        }
        $ret['count'] = $count;
 
        return $ret;
 }
 
-function get_response_button_text($v,$count) {
-       switch($v) {
+function get_response_button_text($v, $count) {
+       switch ($v) {
                case 'like':
-                       return tt('Like','Likes',$count,'noun');
+                       return tt('Like', 'Likes', $count, 'noun');
                        break;
                case 'dislike':
-                       return tt('Dislike','Dislikes',$count,'noun');
+                       return tt('Dislike', 'Dislikes', $count, 'noun');
                        break;
                case 'attendyes':
-                       return tt('Attending','Attending',$count,'noun');
+                       return tt('Attending', 'Attending', $count, 'noun');
                        break;
                case 'attendno':
-                       return tt('Not Attending','Not Attending',$count,'noun');
+                       return tt('Not Attending', 'Not Attending', $count, 'noun');
                        break;
                case 'attendmaybe':
-                       return tt('Undecided','Undecided',$count,'noun');
+                       return tt('Undecided', 'Undecided', $count, 'noun');
                        break;
        }
 }
index 58a3fcf9ce9e5f54ad8dabca0fde89821e44dce1..c4299dd4c2eea874671b6fc0df4baf69ad2daf01 100644 (file)
@@ -4,7 +4,7 @@ use \Friendica\Core\Config;
 function cron_run(&$argv, &$argc){
        global $a;
 
-       require_once('include/datetime.php');
+       require_once 'include/datetime.php';
 
        // Poll contacts with specific parameters
        if ($argc > 1) {
@@ -12,15 +12,16 @@ function cron_run(&$argv, &$argc){
                return;
        }
 
-       $last = get_config('system','last_cron');
+       $last = get_config('system', 'last_cron');
 
-       $poll_interval = intval(get_config('system','cron_interval'));
+       $poll_interval = intval(get_config('system', 'cron_interval'));
        if (! $poll_interval) {
                $poll_interval = 10;
        }
+
        if ($last) {
                $next = $last + ($poll_interval * 60);
-               if($next > time()) {
+               if ($next > time()) {
                        logger('cron intervall not reached');
                        return;
                }
@@ -62,10 +63,10 @@ function cron_run(&$argv, &$argc){
        proc_run(PRIORITY_LOW, "include/cronjobs.php", "repair_database");
 
        // once daily run birthday_updates and then expire in background
-       $d1 = get_config('system','last_expire_day');
-       $d2 = intval(datetime_convert('UTC','UTC','now','d'));
+       $d1 = get_config('system', 'last_expire_day');
+       $d2 = intval(datetime_convert('UTC', 'UTC', 'now', 'd'));
 
-       if($d2 != intval($d1)) {
+       if ($d2 != intval($d1)) {
 
                proc_run(PRIORITY_LOW, "include/cronjobs.php", "update_contact_birthdays");
 
@@ -73,7 +74,7 @@ function cron_run(&$argv, &$argc){
 
                proc_run(PRIORITY_LOW, "include/discover_poco.php", "suggestions");
 
-               set_config('system','last_expire_day',$d2);
+               set_config('system', 'last_expire_day', $d2);
 
                proc_run(PRIORITY_LOW, 'include/expire.php');
 
@@ -87,7 +88,7 @@ function cron_run(&$argv, &$argc){
 
        logger('cron: end');
 
-       set_config('system','last_cron', time());
+       set_config('system', 'last_cron', time());
 
        return;
 }
@@ -130,7 +131,7 @@ function cron_poll_contacts($argc, $argv) {
        // and which have a polling address and ignore Diaspora since
        // we are unable to match those posts with a Diaspora GUID and prevent duplicates.
 
-       $abandon_days = intval(get_config('system','account_abandon_days'));
+       $abandon_days = intval(get_config('system', 'account_abandon_days'));
        if ($abandon_days < 1) {
                $abandon_days = 0;
        }
@@ -156,7 +157,7 @@ function cron_poll_contacts($argc, $argv) {
                dbesc(NETWORK_MAIL2)
        );
 
-       if (!count($contacts)) {
+       if (!dbm::is_result($contacts)) {
                return;
        }
 
@@ -170,7 +171,7 @@ function cron_poll_contacts($argc, $argv) {
                        continue;
                }
 
-               foreach($res as $contact) {
+               foreach ($res as $contact) {
 
                        $xml = false;
 
@@ -183,49 +184,48 @@ function cron_poll_contacts($argc, $argv) {
                        }
 
                        if ($contact['subhub'] AND in_array($contact['network'], array(NETWORK_DFRN, NETWORK_ZOT, NETWORK_OSTATUS))) {
-                               // We should be getting everything via a hub. But just to be sure, let's check once a day.
-                               // (You can make this more or less frequent if desired by setting 'pushpoll_frequency' appropriately)
-                               // This also lets us update our subscription to the hub, and add or replace hubs in case it
-                               // changed. We will only update hubs once a day, regardless of 'pushpoll_frequency'.
-
-                               $poll_interval = get_config('system','pushpoll_frequency');
+                               /*
+                                * We should be getting everything via a hub. But just to be sure, let's check once a day.
+                                * (You can make this more or less frequent if desired by setting 'pushpoll_frequency' appropriately)
+                                * This also lets us update our subscription to the hub, and add or replace hubs in case it
+                                * changed. We will only update hubs once a day, regardless of 'pushpoll_frequency'.
+                                */
+                               $poll_interval = get_config('system', 'pushpoll_frequency');
                                $contact['priority'] = (($poll_interval !== false) ? intval($poll_interval) : 3);
                        }
 
-                       if($contact['priority'] AND !$force) {
-
-                               $update     = false;
+                       if ($contact['priority'] AND !$force) {
+                               $update = false;
 
                                $t = $contact['last-update'];
 
-                               /**
+                               /*
                                 * Based on $contact['priority'], should we poll this site now? Or later?
                                 */
-
                                switch ($contact['priority']) {
                                        case 5:
-                                               if (datetime_convert('UTC','UTC', 'now') > datetime_convert('UTC','UTC', $t . " + 1 month")) {
+                                               if (datetime_convert('UTC', 'UTC', 'now') > datetime_convert('UTC', 'UTC', $t . " + 1 month")) {
                                                        $update = true;
                                                }
                                                break;
                                        case 4:
-                                               if (datetime_convert('UTC','UTC', 'now') > datetime_convert('UTC','UTC', $t . " + 1 week")) {
+                                               if (datetime_convert('UTC', 'UTC', 'now') > datetime_convert('UTC', 'UTC', $t . " + 1 week")) {
                                                        $update = true;
                                                }
                                                break;
                                        case 3:
-                                               if (datetime_convert('UTC','UTC', 'now') > datetime_convert('UTC','UTC', $t . " + 1 day")) {
+                                               if (datetime_convert('UTC', 'UTC', 'now') > datetime_convert('UTC', 'UTC', $t . " + 1 day")) {
                                                        $update = true;
                                                }
                                                break;
                                        case 2:
-                                               if (datetime_convert('UTC','UTC', 'now') > datetime_convert('UTC','UTC', $t . " + 12 hour")) {
+                                               if (datetime_convert('UTC', 'UTC', 'now') > datetime_convert('UTC', 'UTC', $t . " + 12 hour")) {
                                                        $update = true;
                                                }
                                                break;
                                        case 1:
                                        default:
-                                               if (datetime_convert('UTC','UTC', 'now') > datetime_convert('UTC','UTC', $t . " + 1 hour")) {
+                                               if (datetime_convert('UTC', 'UTC', 'now') > datetime_convert('UTC', 'UTC', $t . " + 1 hour")) {
                                                        $update = true;
                                                }
                                                break;
@@ -235,7 +235,7 @@ function cron_poll_contacts($argc, $argv) {
                                }
                        }
 
-                       logger("Polling ".$contact["network"]." ".$contact["id"]." ".$contact["nick"]." ".$contact["name"]);
+                       logger("Polling " . $contact["network"] . " " . $contact["id"] . " " . $contact["nick"] . " " . $contact["name"]);
 
                        if (($contact['network'] == NETWORK_FEED) AND ($contact['priority'] <= 3)) {
                                proc_run(PRIORITY_MEDIUM, 'include/onepoll.php', intval($contact['id']));
index bea0f6a198a13121fc9df746b5e8db8cf8b3eddf..a519dee22433650e5839d6e4ed71e53f06dcd408 100644 (file)
@@ -2,43 +2,45 @@
 
 use \Friendica\Core\Config;
 
-function cronhooks_run(&$argv, &$argc){
+function cronhooks_run(&$argv, &$argc) {
        global $a;
 
-       require_once('include/datetime.php');
+       require_once 'include/datetime.php';
 
        if (($argc == 2) AND is_array($a->hooks) AND array_key_exists("cron", $a->hooks)) {
-                foreach ($a->hooks["cron"] as $hook)
+               foreach ($a->hooks["cron"] as $hook) {
                        if ($hook[1] == $argv[1]) {
-                               logger("Calling cron hook '".$hook[1]."'", LOGGER_DEBUG);
+                               logger("Calling cron hook '" . $hook[1] . "'", LOGGER_DEBUG);
                                call_single_hook($a, $name, $hook, $data);
                        }
+               }
                return;
        }
 
        $last = get_config('system', 'last_cronhook');
 
-       $poll_interval = intval(get_config('system','cronhook_interval'));
-       if(! $poll_interval)
+       $poll_interval = intval(get_config('system', 'cronhook_interval'));
+       if (! $poll_interval) {
                $poll_interval = 9;
+       }
 
-       if($last) {
+       if ($last) {
                $next = $last + ($poll_interval * 60);
-               if($next > time()) {
+               if ($next > time()) {
                        logger('cronhook intervall not reached');
                        return;
                }
        }
 
-       $a->set_baseurl(get_config('system','url'));
+       $a->set_baseurl(get_config('system', 'url'));
 
        logger('cronhooks: start');
 
        $d = datetime_convert();
 
        if (is_array($a->hooks) AND array_key_exists("cron", $a->hooks)) {
-                foreach ($a->hooks["cron"] as $hook) {
-                       logger("Calling cronhooks for '".$hook[1]."'", LOGGER_DEBUG);
+               foreach ($a->hooks["cron"] as $hook) {
+                       logger("Calling cronhooks for '" . $hook[1] . "'", LOGGER_DEBUG);
                        proc_run(PRIORITY_MEDIUM, "include/cronhooks.php", $hook[1]);
                }
        }
index 9e1d4b55c9ba622c4242ac5db3f31c3721e12639..287e9a2d84a232bf666b54d38f66ab55c3c5cb1b 100644 (file)
@@ -126,7 +126,7 @@ function datetime_convert($from = 'UTC', $to = 'UTC', $s = 'now', $fmt = "Y-m-d
        // add 32 days so that we at least get year 00, and then hack around the fact that
        // months and days always start with 1.
 
-       if(substr($s,0,10) == '0000-00-00') {
+       if(substr($s,0,10) <= '0001-01-01') {
                $d = new DateTime($s . ' + 32 days', new DateTimeZone('UTC'));
                return str_replace('1','0',$d->format($fmt));
        }
@@ -171,7 +171,7 @@ function dob($dob) {
        $f = get_config('system','birthday_input_format');
        if(! $f)
                $f = 'ymd';
-       if($dob === '0000-00-00')
+       if($dob <= '0001-01-01')
                $value = '';
        else
                $value = (($year) ? datetime_convert('UTC','UTC',$dob,'Y-m-d') : datetime_convert('UTC','UTC',$dob,'m-d'));
@@ -189,7 +189,7 @@ function dob($dob) {
                )
        ));
 
-//     if ($dob && $dob != '0000-00-00')
+//     if ($dob && $dob > '0001-01-01')
 //             $o = datesel($f,mktime(0,0,0,0,0,1900),mktime(),mktime(0,0,0,$month,$day,$year),'dob');
 //     else
 //             $o = datesel($f,mktime(0,0,0,0,0,1900),mktime(),false,'dob');
@@ -553,7 +553,7 @@ function update_contact_birthdays() {
        // This only handles foreign or alien networks where a birthday has been provided.
        // In-network birthdays are handled within local_delivery
 
-       $r = q("SELECT * FROM contact WHERE `bd` != '' AND `bd` != '0000-00-00' AND SUBSTRING(`bd`,1,4) != `bdyear` ");
+       $r = q("SELECT * FROM contact WHERE `bd` != '' AND `bd` > '0001-01-01' AND SUBSTRING(`bd`,1,4) != `bdyear` ");
        if (dbm::is_result($r)) {
                foreach ($r as $rr) {
 
index 62728acaed0294ba467cb126cd5ed022f1329e95..5066dcd56d8f53e7f0f3c0a02037d4fdb62983b9 100644 (file)
@@ -20,6 +20,7 @@ class dba {
        private $driver;
        public  $connected = false;
        public  $error = false;
+       private $_server_info = '';
 
        function __construct($server, $user, $pass, $db, $install = false) {
                $a = get_app();
@@ -103,18 +104,20 @@ class dba {
         * @return string
         */
        public function server_info() {
-               switch ($this->driver) {
-                       case 'pdo':
-                               $version = $this->db->getAttribute(PDO::ATTR_SERVER_VERSION);
-                               break;
-                       case 'mysqli':
-                               $version = $this->db->server_info;
-                               break;
-                       case 'mysql':
-                               $version = mysql_get_server_info($this->db);
-                               break;
+               if ($this->_server_info == '') {
+                       switch ($this->driver) {
+                               case 'pdo':
+                                       $this->_server_info = $this->db->getAttribute(PDO::ATTR_SERVER_VERSION);
+                                       break;
+                               case 'mysqli':
+                                       $this->_server_info = $this->db->server_info;
+                                       break;
+                               case 'mysql':
+                                       $this->_server_info = mysql_get_server_info($this->db);
+                                       break;
+                       }
                }
-               return $version;
+               return $this->_server_info;
        }
 
        /**
@@ -474,6 +477,26 @@ class dba {
                        }
                }
        }
+
+       /**
+        * @brief Replaces ANY_VALUE() function by MIN() function,
+        *  if the database server does not support ANY_VALUE().
+        *
+        * Considerations for Standard SQL, or MySQL with ONLY_FULL_GROUP_BY (default since 5.7.5).
+        * ANY_VALUE() is available from MySQL 5.7.5 https://dev.mysql.com/doc/refman/5.7/en/miscellaneous-functions.html
+        * A standard fall-back is to use MIN().
+        *
+        * @param string $sql An SQL string without the values
+        * @return string The input SQL string modified if necessary.
+        */
+       public function any_value_fallback($sql) {
+               $server_info = $this->server_info();
+               if (version_compare($server_info, '5.7.5', '<') ||
+                       (stripos($server_info, 'MariaDB') !== false)) {
+                       $sql = str_ireplace('ANY_VALUE(', 'MIN(', $sql);
+               }
+               return $sql;
+       }
 }
 
 function printable($s) {
@@ -514,6 +537,7 @@ function q($sql) {
        unset($args[0]);
 
        if ($db && $db->connected) {
+               $sql = $db->any_value_fallback($sql);
                $stmt = @vsprintf($sql,$args); // Disabled warnings
                //logger("dba: q: $stmt", LOGGER_ALL);
                if ($stmt === false)
@@ -550,6 +574,7 @@ function qu($sql) {
        unset($args[0]);
 
        if ($db && $db->connected) {
+               $sql = $db->any_value_fallback($sql);
                $stmt = @vsprintf($sql,$args); // Disabled warnings
                if ($stmt === false)
                        logger('dba: vsprintf error: ' . print_r(debug_backtrace(),true), LOGGER_DEBUG);
index 373d6ddb00ec1113ddf2def87cfd8191998cfc24..59f19e9bbc5be0e2c1c10764adb14938677c8651 100644 (file)
@@ -158,6 +158,21 @@ function print_structure($database) {
        }
 }
 
+/**
+ * @brief Print out database error messages
+ *
+ * @param object $db Database object
+ * @param string $message Message to be added to the error message
+ *
+ * @return string Error message
+ */
+function print_update_error($db, $message) {
+       echo sprintf(t("\nError %d occured during database update:\n%s\n"),
+               $db->errorno, $db->error);
+
+       return t('Errors encountered performing database changes: ').$message.EOL;
+}
+
 function update_structure($verbose, $action, $tables=null, $definition=null) {
        global $a, $db;
 
@@ -207,7 +222,7 @@ function update_structure($verbose, $action, $tables=null, $definition=null) {
                if (!isset($database[$name])) {
                        $r = db_create_table($name, $structure["fields"], $verbose, $action, $structure['indexes']);
                        if (!dbm::is_result($r)) {
-                               $errors .=  t('Errors encountered creating database tables.').$name.EOL;
+                               $errors .= print_update_error($db, $name);
                        }
                        $is_new_table = True;
                } else {
@@ -364,33 +379,33 @@ function update_structure($verbose, $action, $tables=null, $definition=null) {
                                        } else {
                                                $r = $db->q("CREATE TABLE `".$temp_name."` LIKE `".$name."`;");
                                                if (!dbm::is_result($r)) {
-                                                       $errors .= t('Errors encountered performing database changes.').$sql3.EOL;
+                                                       $errors .= print_update_error($db, $sql3);
                                                        return $errors;
                                                }
                                        }
                                }
 
                                $r = @$db->q($sql3);
-                               if (!dbm::is_result($r))
-                                       $errors .= t('Errors encountered performing database changes.').$sql3.EOL;
-
+                               if (!dbm::is_result($r)) {
+                                       $errors .= print_update_error($db, $sql3);
+                               }
                                if ($is_unique) {
                                        if ($ignore != "") {
                                                $db->q("SET session old_alter_table=0;");
                                        } else {
                                                $r = $db->q("INSERT INTO `".$temp_name."` SELECT * FROM `".$name."`".$group_by.";");
                                                if (!dbm::is_result($r)) {
-                                                       $errors .= t('Errors encountered performing database changes.').$sql3.EOL;
+                                                       $errors .= print_update_error($db, $sql3);
                                                        return $errors;
                                                }
                                                $r = $db->q("DROP TABLE `".$name."`;");
                                                if (!dbm::is_result($r)) {
-                                                       $errors .= t('Errors encountered performing database changes.').$sql3.EOL;
+                                                       $errors .= print_update_error($db, $sql3);
                                                        return $errors;
                                                }
                                                $r = $db->q("RENAME TABLE `".$temp_name."` TO `".$name."`;");
                                                if (!dbm::is_result($r)) {
-                                                       $errors .= t('Errors encountered performing database changes.').$sql3.EOL;
+                                                       $errors .= print_update_error($db, $sql3);
                                                        return $errors;
                                                }
                                        }
@@ -708,7 +723,7 @@ function db_definition() {
                                        "info" => array("type" => "mediumtext"),
                                        "profile-id" => array("type" => "int(11)", "not null" => "1", "default" => "0"),
                                        "bdyear" => array("type" => "varchar(4)", "not null" => "1", "default" => ""),
-                                       "bd" => array("type" => "date", "not null" => "1", "default" => "0000-00-00"),
+                                       "bd" => array("type" => "date", "not null" => "1", "default" => "0001-01-01"),
                                        "notify_new_posts" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"),
                                        "fetch_further_information" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"),
                                        "ffi_keyword_blacklist" => array("type" => "text"),
@@ -867,7 +882,7 @@ function db_definition() {
                                        "about" => array("type" => "text"),
                                        "keywords" => array("type" => "text"),
                                        "gender" => array("type" => "varchar(32)", "not null" => "1", "default" => ""),
-                                       "birthday" => array("type" => "varchar(32)", "not null" => "1", "default" => "0000-00-00"),
+                                       "birthday" => array("type" => "varchar(32)", "not null" => "1", "default" => "0001-01-01"),
                                        "community" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"),
                                        "contact-type" => array("type" => "tinyint(1)", "not null" => "1", "default" => "-1"),
                                        "hide" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"),
@@ -1331,7 +1346,7 @@ function db_definition() {
                                        "hide-friends" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"),
                                        "name" => array("type" => "varchar(255)", "not null" => "1", "default" => ""),
                                        "pdesc" => array("type" => "varchar(255)", "not null" => "1", "default" => ""),
-                                       "dob" => array("type" => "varchar(32)", "not null" => "1", "default" => "0000-00-00"),
+                                       "dob" => array("type" => "varchar(32)", "not null" => "1", "default" => "0001-01-01"),
                                        "address" => array("type" => "varchar(255)", "not null" => "1", "default" => ""),
                                        "locality" => array("type" => "varchar(255)", "not null" => "1", "default" => ""),
                                        "region" => array("type" => "varchar(255)", "not null" => "1", "default" => ""),
index aae935963d0427c7b6ab7afd3cefc62ecc73893a..7221d52a203d981c683dc0de3947510a7fdc75f3 100644 (file)
@@ -554,8 +554,9 @@ class dfrn {
                        xml::add_element($doc, $author, "poco:displayName", $profile["name"]);
                        xml::add_element($doc, $author, "poco:updated", $namdate);
 
-                       if (trim($profile["dob"]) != "0000-00-00")
+                       if (trim($profile["dob"]) > '0001-01-01') {
                                xml::add_element($doc, $author, "poco:birthday", "0000-".date("m-d", strtotime($profile["dob"])));
+                       }
 
                        xml::add_element($doc, $author, "poco:note", $profile["about"]);
                        xml::add_element($doc, $author, "poco:preferredUsername", $profile["nickname"]);
@@ -1402,7 +1403,7 @@ class dfrn {
                        // "poco:birthday" is the birthday in the format "yyyy-mm-dd"
                        $value = $xpath->evaluate($element . "/poco:birthday/text()", $context)->item(0)->nodeValue;
 
-                       if (!in_array($value, array("", "0000-00-00"))) {
+                       if (!in_array($value, array("", "0000-00-00", "0001-01-01"))) {
                                $bdyear = date("Y");
                                $value = str_replace("0000", $bdyear, $value);
 
index bdedb9e0b7336ede8ef8b4e455c67e116febeb6e..07acbe9ead9427e71e12d443549f1370966c6465 100644 (file)
@@ -3591,7 +3591,7 @@ class Diaspora {
                if ($searchable === 'true') {
                        $dob = '1000-00-00';
 
-                       if (($profile['dob']) && ($profile['dob'] != '0000-00-00'))
+                       if (($profile['dob']) && ($profile['dob'] > '0001-01-01'))
                                $dob = ((intval($profile['dob'])) ? intval($profile['dob']) : '1000') .'-'. datetime_convert('UTC','UTC',$profile['dob'],'m-d');
 
                        $about = $profile['about'];
index 088adbe789fd1fcfea3132cda0285fb8ccc88ab9..4a221fac0c3565ca2b598403e8131c0f084d7a6b 100644 (file)
@@ -2,16 +2,17 @@
 use \Friendica\Core\Config;
 
 function directory_run(&$argv, &$argc){
-       if ($argc != 2) {
-               return;
-       }
-
        $dir = get_config('system', 'directory');
 
        if (!strlen($dir)) {
                return;
        }
 
+       if ($argc < 2) {
+               directory_update_all();
+               return;
+       }
+
        $dir .= "/submit";
 
        $arr = array('url' => $argv[1]);
@@ -24,3 +25,17 @@ function directory_run(&$argv, &$argc){
        }
        return;
 }
+
+function directory_update_all() {
+       $r = q("SELECT `url` FROM `contact`
+               INNER JOIN `profile` ON `profile`.`uid` = `contact`.`uid`
+               INNER JOIN `user` ON `user`.`uid` = `contact`.`uid`
+                       WHERE `contact`.`self` AND `profile`.`net-publish` AND `profile`.`is-default` AND
+                               NOT `user`.`account_expired` AND `user`.`verified`");
+
+       if (dbm::is_result($r)) {
+               foreach ($r AS $user) {
+                       proc_run(PRIORITY_LOW, 'include/directory.php', $user['url']);
+               }
+       }
+}
index 8138e9b046871ac8f757082db961201f968c805a..a21624a212a35219672db2d8a274d60253f8136d 100644 (file)
@@ -202,6 +202,9 @@ function profile_sidebar($profile, $block = 0) {
        $address = false;
 //             $pdesc = true;
 
+       // This function can also use contact information in $profile
+       $is_contact = x($profile, 'cid');
+
        if((! is_array($profile)) && (! count($profile)))
                return $o;
 
@@ -281,7 +284,7 @@ function profile_sidebar($profile, $block = 0) {
        }
 
        // show edit profile to yourself
-       if ($profile['uid'] == local_user() && feature_enabled(local_user(),'multi_profiles')) {
+       if (!$is_contact && $profile['uid'] == local_user() && feature_enabled(local_user(),'multi_profiles')) {
                $profile['edit'] = array(App::get_baseurl(). '/profiles', t('Profiles'),"", t('Manage/edit profiles'));
                $r = q("SELECT * FROM `profile` WHERE `uid` = %d",
                                local_user());
@@ -310,7 +313,7 @@ function profile_sidebar($profile, $block = 0) {
 
                }
        }
-       if ($profile['uid'] == local_user() && !feature_enabled(local_user(),'multi_profiles')) {
+       if (!$is_contact && $profile['uid'] == local_user() && !feature_enabled(local_user(),'multi_profiles')) {
                $profile['edit'] = array(App::get_baseurl(). '/profiles/'.$profile['id'], t('Edit profile'),"", t('Edit profile'));
                $profile['menu'] = array(
                        'chg_photo' => t('Change profile photo'),
@@ -628,7 +631,7 @@ function advanced_profile(App $a) {
                if($a->profile['gender']) $profile['gender'] = array( t('Gender:'),  $a->profile['gender'] );
 
 
-               if(($a->profile['dob']) && ($a->profile['dob'] != '0000-00-00')) {
+               if(($a->profile['dob']) && ($a->profile['dob'] > '0001-01-01')) {
 
                        $year_bd_format = t('j F, Y');
                        $short_bd_format = t('j F');
index f3885d21f91584f3108aef6c1b81f3443a81e2b9..2500e08d54ad78c5407d3a9405b7bc6631ab324e 100644 (file)
@@ -6,31 +6,33 @@
 
 use \Friendica\ParseUrl;
 
-require_once('include/bbcode.php');
-require_once('include/oembed.php');
-require_once('include/salmon.php');
-require_once('include/crypto.php');
-require_once('include/Photo.php');
-require_once('include/tags.php');
-require_once('include/files.php');
-require_once('include/text.php');
-require_once('include/email.php');
-require_once('include/threads.php');
-require_once('include/socgraph.php');
-require_once('include/plaintext.php');
-require_once('include/ostatus.php');
-require_once('include/feed.php');
-require_once('include/Contact.php');
-require_once('mod/share.php');
-require_once('include/enotify.php');
-require_once('include/dfrn.php');
-require_once('include/group.php');
-
-require_once('library/defuse/php-encryption-1.2.1/Crypto.php');
+require_once 'include/bbcode.php';
+require_once 'include/oembed.php';
+require_once 'include/salmon.php';
+require_once 'include/crypto.php';
+require_once 'include/Photo.php';
+require_once 'include/tags.php';
+require_once 'include/files.php';
+require_once 'include/text.php';
+require_once 'include/email.php';
+require_once 'include/threads.php';
+require_once 'include/socgraph.php';
+require_once 'include/plaintext.php';
+require_once 'include/ostatus.php';
+require_once 'include/feed.php';
+require_once 'include/Contact.php';
+require_once 'mod/share.php';
+require_once 'include/enotify.php';
+require_once 'include/dfrn.php';
+require_once 'include/group.php';
+
+/// @TODO one day with composer autoloader no more needed
+require_once 'library/defuse/php-encryption-1.2.1/Crypto.php';
 
 function construct_verb($item) {
-       if ($item['verb'])
+       if ($item['verb']) {
                return $item['verb'];
+       }
        return ACTIVITY_POST;
 }
 
@@ -60,7 +62,7 @@ function limit_body_size($body) {
                $img_start = strpos($orig_body, '[img');
                $img_st_close = ($img_start !== false ? strpos(substr($orig_body, $img_start), ']') : false);
                $img_end = ($img_start !== false ? strpos(substr($orig_body, $img_start), '[/img]') : false);
-               while(($img_st_close !== false) && ($img_end !== false)) {
+               while (($img_st_close !== false) && ($img_end !== false)) {
 
                        $img_st_close++; // make it point to AFTER the closing bracket
                        $img_end += $img_start;
@@ -69,7 +71,7 @@ function limit_body_size($body) {
                        if (! strcmp(substr($orig_body, $img_start + $img_st_close, 5), 'data:')) {
                                // This is an embedded image
 
-                               if ( ($textlen + $img_start) > $maxlen ) {
+                               if (($textlen + $img_start) > $maxlen ) {
                                        if ($textlen < $maxlen) {
                                                logger('limit_body_size: the limit happens before an embedded image', LOGGER_DEBUG);
                                                $new_body = $new_body . substr($orig_body, 0, $maxlen - $textlen);
@@ -83,7 +85,7 @@ function limit_body_size($body) {
                                $new_body = $new_body . substr($orig_body, $img_start, $img_end - $img_start);
                        } else {
 
-                               if ( ($textlen + $img_end) > $maxlen ) {
+                               if (($textlen + $img_end) > $maxlen ) {
                                        if ($textlen < $maxlen) {
                                                logger('limit_body_size: the limit happens before the end of a non-embedded image', LOGGER_DEBUG);
                                                $new_body = $new_body . substr($orig_body, 0, $maxlen - $textlen);
@@ -96,15 +98,17 @@ function limit_body_size($body) {
                        }
                        $orig_body = substr($orig_body, $img_end);
 
-                       if ($orig_body === false) // in case the body ends on a closing image tag
+                       if ($orig_body === false) {
+                               // in case the body ends on a closing image tag
                                $orig_body = '';
+                       }
 
                        $img_start = strpos($orig_body, '[img');
                        $img_st_close = ($img_start !== false ? strpos(substr($orig_body, $img_start), ']') : false);
                        $img_end = ($img_start !== false ? strpos(substr($orig_body, $img_start), '[/img]') : false);
                }
 
-               if ( ($textlen + strlen($orig_body)) > $maxlen) {
+               if (($textlen + strlen($orig_body)) > $maxlen) {
                        if ($textlen < $maxlen) {
                                logger('limit_body_size: the limit happens after the end of the last image', LOGGER_DEBUG);
                                $new_body = $new_body . substr($orig_body, 0, $maxlen - $textlen);
@@ -117,8 +121,9 @@ function limit_body_size($body) {
                }
 
                return $new_body;
-       } else
+       } else {
                return $body;
+       }
 }}
 
 function title_is_body($title, $body) {
@@ -126,15 +131,16 @@ function title_is_body($title, $body) {
        $title = strip_tags($title);
        $title = trim($title);
        $title = html_entity_decode($title, ENT_QUOTES, 'UTF-8');
-       $title = str_replace(array("\n", "\r", "\t", " "), array("","","",""), $title);
+       $title = str_replace(array("\n", "\r", "\t", " "), array("", "", "", ""), $title);
 
        $body = strip_tags($body);
        $body = trim($body);
        $body = html_entity_decode($body, ENT_QUOTES, 'UTF-8');
-       $body = str_replace(array("\n", "\r", "\t", " "), array("","","",""), $body);
+       $body = str_replace(array("\n", "\r", "\t", " "), array("", "", "", ""), $body);
 
-       if (strlen($title) < strlen($body))
+       if (strlen($title) < strlen($body)) {
                $body = substr($body, 0, strlen($title));
+       }
 
        if (($title != $body) and (substr($title, -3) == "...")) {
                $pos = strrpos($title, "...");
@@ -144,7 +150,7 @@ function title_is_body($title, $body) {
                }
        }
 
-       return($title == $body);
+       return ($title == $body);
 }
 
 function add_page_info_data($data) {
@@ -212,8 +218,8 @@ function add_page_info_data($data) {
                foreach ($data["keywords"] AS $keyword) {
                        /// @todo make a positive list of allowed characters
                        $hashtag = str_replace(array(" ", "+", "/", ".", "#", "'", "’", "`", "(", ")", "„", "“"),
-                                               array("","", "", "", "", "", "", "", "", "", "", ""), $keyword);
-                       $hashtags .= "#[url=".App::get_baseurl()."/search?tag=".rawurlencode($hashtag)."]".$hashtag."[/url] ";
+                                               array("", "", "", "", "", "", "", "", "", "", "", ""), $keyword);
+                       $hashtags .= "#[url=" . App::get_baseurl() . "/search?tag=" . rawurlencode($hashtag) . "]" . $hashtag . "[/url] ";
                }
        }
 
@@ -224,25 +230,28 @@ function query_page_info($url, $no_photos = false, $photo = "", $keywords = fals
 
        $data = ParseUrl::getSiteinfoCached($url, true);
 
-       if ($photo != "")
+       if ($photo != "") {
                $data["images"][0]["src"] = $photo;
+       }
 
-       logger('fetch page info for '.$url.' '.print_r($data, true), LOGGER_DEBUG);
+       logger('fetch page info for ' . $url . ' ' . print_r($data, true), LOGGER_DEBUG);
 
-       if (!$keywords AND isset($data["keywords"]))
+       if (!$keywords AND isset($data["keywords"])) {
                unset($data["keywords"]);
+       }
 
        if (($keyword_blacklist != "") AND isset($data["keywords"])) {
-               $list = explode(",", $keyword_blacklist);
+               $list = explode(", ", $keyword_blacklist);
                foreach ($list AS $keyword) {
                        $keyword = trim($keyword);
                        $index = array_search($keyword, $data["keywords"]);
-                       if ($index !== false)
+                       if ($index !== false) {
                                unset($data["keywords"][$index]);
+                       }
                }
        }
 
-       return($data);
+       return $data;
 }
 
 function add_page_keywords($url, $no_photos = false, $photo = "", $keywords = false, $keyword_blacklist = "") {
@@ -252,16 +261,17 @@ function add_page_keywords($url, $no_photos = false, $photo = "", $keywords = fa
        if (isset($data["keywords"]) AND count($data["keywords"])) {
                foreach ($data["keywords"] AS $keyword) {
                        $hashtag = str_replace(array(" ", "+", "/", ".", "#", "'"),
-                                               array("","", "", "", "", ""), $keyword);
+                               array("", "", "", "", "", ""), $keyword);
 
-                       if ($tags != "")
-                               $tags .= ",";
+                       if ($tags != "") {
+                               $tags .= ", ";
+                       }
 
-                       $tags .= "#[url=".App::get_baseurl()."/search?tag=".rawurlencode($hashtag)."]".$hashtag."[/url]";
+                       $tags .= "#[url=" . App::get_baseurl() . "/search?tag=" . rawurlencode($hashtag) . "]" . $hashtag . "[/url]";
                }
        }
 
-       return($tags);
+       return $tags;
 }
 
 function add_page_info($url, $no_photos = false, $photo = "", $keywords = false, $keyword_blacklist = "") {
@@ -269,52 +279,58 @@ function add_page_info($url, $no_photos = false, $photo = "", $keywords = false,
 
        $text = add_page_info_data($data);
 
-       return($text);
+       return $text;
 }
 
 function add_page_info_to_body($body, $texturl = false, $no_photos = false) {
 
-       logger('add_page_info_to_body: fetch page info for body '.$body, LOGGER_DEBUG);
+       logger('add_page_info_to_body: fetch page info for body ' . $body, LOGGER_DEBUG);
 
        $URLSearchString = "^\[\]";
 
        // Fix for Mastodon where the mentions are in a different format
        $body = preg_replace("/\[url\=([$URLSearchString]*)\]([#!@])(.*?)\[\/url\]/ism",
-                               '$2[url=$1]$3[/url]', $body);
+               '$2[url=$1]$3[/url]', $body);
 
        // Adding these spaces is a quick hack due to my problems with regular expressions :)
-       preg_match("/[^!#@]\[url\]([$URLSearchString]*)\[\/url\]/ism", " ".$body, $matches);
+       preg_match("/[^!#@]\[url\]([$URLSearchString]*)\[\/url\]/ism", " " . $body, $matches);
 
-       if (!$matches)
-               preg_match("/[^!#@]\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", " ".$body, $matches);
+       if (!$matches) {
+               preg_match("/[^!#@]\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", " " . $body, $matches);
+       }
 
        // Convert urls without bbcode elements
        if (!$matches AND $texturl) {
                preg_match("/([^\]\='".'"'."]|^)(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,]+)/ism", " ".$body, $matches);
 
                // Yeah, a hack. I really hate regular expressions :)
-               if ($matches)
+               if ($matches) {
                        $matches[1] = $matches[2];
+               }
        }
 
-       if ($matches)
+       if ($matches) {
                $footer = add_page_info($matches[1], $no_photos);
+       }
 
        // Remove the link from the body if the link is attached at the end of the post
        if (isset($footer) AND (trim($footer) != "") AND (strpos($footer, $matches[1]))) {
                $removedlink = trim(str_replace($matches[1], "", $body));
-               if (($removedlink == "") OR strstr($body, $removedlink))
+               if (($removedlink == "") OR strstr($body, $removedlink)) {
                        $body = $removedlink;
+               }
 
                $url = str_replace(array('/', '.'), array('\/', '\.'), $matches[1]);
-               $removedlink = preg_replace("/\[url\=".$url."\](.*?)\[\/url\]/ism", '', $body);
-               if (($removedlink == "") OR strstr($body, $removedlink))
+               $removedlink = preg_replace("/\[url\=" . $url . "\](.*?)\[\/url\]/ism", '', $body);
+               if (($removedlink == "") OR strstr($body, $removedlink)) {
                        $body = $removedlink;
+               }
        }
 
        // Add the page information to the bottom
-       if (isset($footer) AND (trim($footer) != ""))
+       if (isset($footer) AND (trim($footer) != "")) {
                $body .= $footer;
+       }
 
        return $body;
 }
@@ -328,12 +344,13 @@ function add_page_info_to_body($body, $texturl = false, $no_photos = false) {
  */
 function item_add_language_opt(&$arr) {
 
-       if (version_compare(PHP_VERSION, '5.3.0', '<')) return; // LanguageDetect.php not available ?
+       if (version_compare(PHP_VERSION, '5.3.0', '<')) {
+                // LanguageDetect.php not available ?
+               return;
+       }
 
-       if ( x($arr, 'postopts') )
-       {
-               if ( strstr($arr['postopts'], 'lang=') )
-               {
+       if (x($arr, 'postopts') ) {
+               if (strstr($arr['postopts'], 'lang=') ) {
                        // do not override
                        /// @TODO Add parameter to request overriding
                        return;
@@ -344,8 +361,9 @@ function item_add_language_opt(&$arr) {
        }
 
        require_once('library/langdet/Text/LanguageDetect.php');
-       $naked_body = preg_replace('/\[(.+?)\]/','',$arr['body']);
-       $l = new Text_LanguageDetect;
+
+       $naked_body = preg_replace('/\[(.+?)\]/','', $arr['body']);
+       $l = new Text_LanguageDetect();
        //$lng = $l->detectConfidence($naked_body);
        //$arr['postopts'] = (($lng['language']) ? 'lang=' . $lng['language'] . ';' . $lng['confidence'] : '');
        $lng = $l->detect($naked_body, 3);
@@ -355,7 +373,7 @@ function item_add_language_opt(&$arr) {
                $postopts .= 'lang=';
                $sep = "";
                foreach ($lng as $language => $score) {
-                       $postopts .= $sep . $language.";".$score;
+                       $postopts .= $sep . $language . ";" . $score;
                        $sep = ':';
                }
                $arr['postopts'] = $postopts;
@@ -392,7 +410,9 @@ function uri_to_guid($uri, $host = "") {
        return $guid_prefix.$host_hash;
 }
 
-function item_store($arr,$force_parent = false, $notify = false, $dontcache = false) {
+/// @TODO Maybe $arr must be called-by-reference? This function modifies it
+/// @TODO add type-hint array
+function item_store($arr, $force_parent = false, $notify = false, $dontcache = false) {
 
        $a = get_app();
 
@@ -416,11 +436,13 @@ function item_store($arr,$force_parent = false, $notify = false, $dontcache = fa
                }
        }
 
-       // If a Diaspora signature structure was passed in, pull it out of the
-       // item array and set it aside for later storage.
+       /*
+        * If a Diaspora signature structure was passed in, pull it out of the
+        * item array and set it aside for later storage.
+        */
 
        $dsprsig = null;
-       if (x($arr,'dsprsig')) {
+       if (x($arr, 'dsprsig')) {
                $encoded_signature = $arr['dsprsig'];
                $dsprsig = json_decode(base64_decode($arr['dsprsig']));
                unset($arr['dsprsig']);
@@ -428,27 +450,28 @@ function item_store($arr,$force_parent = false, $notify = false, $dontcache = fa
 
        // Converting the plink
        if ($arr['network'] == NETWORK_OSTATUS) {
-               if (isset($arr['plink']))
+               if (isset($arr['plink'])) {
                        $arr['plink'] = ostatus::convert_href($arr['plink']);
-               elseif (isset($arr['uri']))
+               } elseif (isset($arr['uri'])) {
                        $arr['plink'] = ostatus::convert_href($arr['uri']);
+               }
        }
 
-       if (x($arr, 'gravity'))
+       if (x($arr, 'gravity')) {
                $arr['gravity'] = intval($arr['gravity']);
-       elseif ($arr['parent-uri'] === $arr['uri'])
+       } elseif ($arr['parent-uri'] === $arr['uri']) {
                $arr['gravity'] = 0;
-       elseif (activity_match($arr['verb'],ACTIVITY_POST))
+       } elseif (activity_match($arr['verb'],ACTIVITY_POST)) {
                $arr['gravity'] = 6;
-       else
+       } else {
                $arr['gravity'] = 6;   // extensible catchall
+       }
 
-       if (! x($arr,'type'))
+       if (! x($arr, 'type')) {
                $arr['type']      = 'remote';
+       }
 
-
-
-       /* check for create  date and expire time */
+       // check for create  date and expire time
        $uid = intval($arr['uid']);
        $r = q("SELECT expire FROM user WHERE uid = %d", intval($uid));
        if (dbm::is_result($r)) {
@@ -463,8 +486,11 @@ function item_store($arr,$force_parent = false, $notify = false, $dontcache = fa
                }
        }
 
-       // Do we already have this item?
-       // We have to check several networks since Friendica posts could be repeated via OStatus (maybe Diasporsa as well)
+       /*
+        * Do we already have this item?
+        * We have to check several networks since Friendica posts could be repeated
+        * via OStatus (maybe Diasporsa as well)
+        */
        if (in_array(trim($arr['network']), array(NETWORK_DIASPORA, NETWORK_DFRN, NETWORK_OSTATUS, ""))) {
                $r = q("SELECT `id`, `network` FROM `item` WHERE `uri` = '%s' AND `uid` = %d AND `network` IN ('%s', '%s', '%s')  LIMIT 1",
                                dbesc(trim($arr['uri'])),
@@ -473,14 +499,17 @@ function item_store($arr,$force_parent = false, $notify = false, $dontcache = fa
                                dbesc(NETWORK_DFRN),
                                dbesc(NETWORK_OSTATUS)
                        );
-               if ($r) {
+               if (dbm::is_result($r)) {
                        // We only log the entries with a different user id than 0. Otherwise we would have too many false positives
-                       if ($uid != 0)
+                       if ($uid != 0) {
                                logger("Item with uri ".$arr['uri']." already existed for user ".$uid." with id ".$r[0]["id"]." target network ".$r[0]["network"]." - new network: ".$arr['network']);
-                       return($r[0]["id"]);
+                       }
+
+                       return $r[0]["id"];
                }
        }
 
+       /// @TODO old-lost code?
        // Shouldn't happen but we want to make absolutely sure it doesn't leak from a plugin.
        // Deactivated, since the bbcode parser can handle with it - and it destroys posts with some smileys that contain "<"
        //if ((strpos($arr['body'],'<') !== false) || (strpos($arr['body'],'>') !== false))
@@ -488,76 +517,79 @@ function item_store($arr,$force_parent = false, $notify = false, $dontcache = fa
 
        item_add_language_opt($arr);
 
-       if ($notify)
+       if ($notify) {
                $guid_prefix = "";
-       elseif ((trim($arr['guid']) == "") AND (trim($arr['plink']) != ""))
+       } elseif ((trim($arr['guid']) == "") AND (trim($arr['plink']) != "")) {
                $arr['guid'] = uri_to_guid($arr['plink']);
-       elseif ((trim($arr['guid']) == "") AND (trim($arr['uri']) != ""))
+       } elseif ((trim($arr['guid']) == "") AND (trim($arr['uri']) != "")) {
                $arr['guid'] = uri_to_guid($arr['uri']);
-       else {
+       else {
                $parsed = parse_url($arr["author-link"]);
                $guid_prefix = hash("crc32", $parsed["host"]);
        }
 
-       $arr['wall']          = ((x($arr,'wall'))          ? intval($arr['wall'])                : 0);
-       $arr['guid']          = ((x($arr,'guid'))          ? notags(trim($arr['guid']))          : get_guid(32, $guid_prefix));
-       $arr['uri']           = ((x($arr,'uri'))           ? notags(trim($arr['uri']))           : item_new_uri($a->get_hostname(), $uid, $arr['guid']));
-       $arr['extid']         = ((x($arr,'extid'))         ? notags(trim($arr['extid']))         : '');
-       $arr['author-name']   = ((x($arr,'author-name'))   ? trim($arr['author-name'])   : '');
-       $arr['author-link']   = ((x($arr,'author-link'))   ? notags(trim($arr['author-link']))   : '');
-       $arr['author-avatar'] = ((x($arr,'author-avatar')) ? notags(trim($arr['author-avatar'])) : '');
-       $arr['owner-name']    = ((x($arr,'owner-name'))    ? trim($arr['owner-name'])    : '');
-       $arr['owner-link']    = ((x($arr,'owner-link'))    ? notags(trim($arr['owner-link']))    : '');
-       $arr['owner-avatar']  = ((x($arr,'owner-avatar'))  ? notags(trim($arr['owner-avatar']))  : '');
-       $arr['created']       = ((x($arr,'created') !== false) ? datetime_convert('UTC','UTC',$arr['created']) : datetime_convert());
-       $arr['edited']        = ((x($arr,'edited')  !== false) ? datetime_convert('UTC','UTC',$arr['edited'])  : datetime_convert());
-       $arr['commented']     = ((x($arr,'commented')  !== false) ? datetime_convert('UTC','UTC',$arr['commented'])  : datetime_convert());
-       $arr['received']      = ((x($arr,'received')  !== false) ? datetime_convert('UTC','UTC',$arr['received'])  : datetime_convert());
-       $arr['changed']       = ((x($arr,'changed')  !== false) ? datetime_convert('UTC','UTC',$arr['changed'])  : datetime_convert());
-       $arr['title']         = ((x($arr,'title'))         ? trim($arr['title'])         : '');
-       $arr['location']      = ((x($arr,'location'))      ? trim($arr['location'])      : '');
-       $arr['coord']         = ((x($arr,'coord'))         ? notags(trim($arr['coord']))         : '');
-       $arr['last-child']    = ((x($arr,'last-child'))    ? intval($arr['last-child'])          : 0 );
-       $arr['visible']       = ((x($arr,'visible') !== false) ? intval($arr['visible'])         : 1 );
+       $arr['wall']          = ((x($arr, 'wall'))          ? intval($arr['wall'])                : 0);
+       $arr['guid']          = ((x($arr, 'guid'))          ? notags(trim($arr['guid']))          : get_guid(32, $guid_prefix));
+       $arr['uri']           = ((x($arr, 'uri'))           ? notags(trim($arr['uri']))           : item_new_uri($a->get_hostname(), $uid, $arr['guid']));
+       $arr['extid']         = ((x($arr, 'extid'))         ? notags(trim($arr['extid']))         : '');
+       $arr['author-name']   = ((x($arr, 'author-name'))   ? trim($arr['author-name'])   : '');
+       $arr['author-link']   = ((x($arr, 'author-link'))   ? notags(trim($arr['author-link']))   : '');
+       $arr['author-avatar'] = ((x($arr, 'author-avatar')) ? notags(trim($arr['author-avatar'])) : '');
+       $arr['owner-name']    = ((x($arr, 'owner-name'))    ? trim($arr['owner-name'])    : '');
+       $arr['owner-link']    = ((x($arr, 'owner-link'))    ? notags(trim($arr['owner-link']))    : '');
+       $arr['owner-avatar']  = ((x($arr, 'owner-avatar'))  ? notags(trim($arr['owner-avatar']))  : '');
+       $arr['created']       = ((x($arr, 'created') !== false) ? datetime_convert('UTC','UTC', $arr['created']) : datetime_convert());
+       $arr['edited']        = ((x($arr, 'edited')  !== false) ? datetime_convert('UTC','UTC', $arr['edited'])  : datetime_convert());
+       $arr['commented']     = ((x($arr, 'commented')  !== false) ? datetime_convert('UTC','UTC', $arr['commented'])  : datetime_convert());
+       $arr['received']      = ((x($arr, 'received')  !== false) ? datetime_convert('UTC','UTC', $arr['received'])  : datetime_convert());
+       $arr['changed']       = ((x($arr, 'changed')  !== false) ? datetime_convert('UTC','UTC', $arr['changed'])  : datetime_convert());
+       $arr['title']         = ((x($arr, 'title'))         ? trim($arr['title'])         : '');
+       $arr['location']      = ((x($arr, 'location'))      ? trim($arr['location'])      : '');
+       $arr['coord']         = ((x($arr, 'coord'))         ? notags(trim($arr['coord']))         : '');
+       $arr['last-child']    = ((x($arr, 'last-child'))    ? intval($arr['last-child'])          : 0 );
+       $arr['visible']       = ((x($arr, 'visible') !== false) ? intval($arr['visible'])         : 1 );
        $arr['deleted']       = 0;
-       $arr['parent-uri']    = ((x($arr,'parent-uri'))    ? notags(trim($arr['parent-uri']))    : $arr['uri']);
-       $arr['verb']          = ((x($arr,'verb'))          ? notags(trim($arr['verb']))          : '');
-       $arr['object-type']   = ((x($arr,'object-type'))   ? notags(trim($arr['object-type']))   : '');
-       $arr['object']        = ((x($arr,'object'))        ? trim($arr['object'])                : '');
-       $arr['target-type']   = ((x($arr,'target-type'))   ? notags(trim($arr['target-type']))   : '');
-       $arr['target']        = ((x($arr,'target'))        ? trim($arr['target'])                : '');
-       $arr['plink']         = ((x($arr,'plink'))         ? notags(trim($arr['plink']))         : '');
-       $arr['allow_cid']     = ((x($arr,'allow_cid'))     ? trim($arr['allow_cid'])             : '');
-       $arr['allow_gid']     = ((x($arr,'allow_gid'))     ? trim($arr['allow_gid'])             : '');
-       $arr['deny_cid']      = ((x($arr,'deny_cid'))      ? trim($arr['deny_cid'])              : '');
-       $arr['deny_gid']      = ((x($arr,'deny_gid'))      ? trim($arr['deny_gid'])              : '');
-       $arr['private']       = ((x($arr,'private'))       ? intval($arr['private'])             : 0 );
-       $arr['bookmark']      = ((x($arr,'bookmark'))      ? intval($arr['bookmark'])            : 0 );
-       $arr['body']          = ((x($arr,'body'))          ? trim($arr['body'])                  : '');
-       $arr['tag']           = ((x($arr,'tag'))           ? notags(trim($arr['tag']))           : '');
-       $arr['attach']        = ((x($arr,'attach'))        ? notags(trim($arr['attach']))        : '');
-       $arr['app']           = ((x($arr,'app'))           ? notags(trim($arr['app']))           : '');
-       $arr['origin']        = ((x($arr,'origin'))        ? intval($arr['origin'])              : 0 );
-       $arr['network']       = ((x($arr,'network'))       ? trim($arr['network'])               : '');
-       $arr['postopts']      = ((x($arr,'postopts'))      ? trim($arr['postopts'])              : '');
-       $arr['resource-id']   = ((x($arr,'resource-id'))   ? trim($arr['resource-id'])           : '');
-       $arr['event-id']      = ((x($arr,'event-id'))      ? intval($arr['event-id'])            : 0 );
-       $arr['inform']        = ((x($arr,'inform'))        ? trim($arr['inform'])                : '');
-       $arr['file']          = ((x($arr,'file'))          ? trim($arr['file'])                  : '');
+       $arr['parent-uri']    = ((x($arr, 'parent-uri'))    ? notags(trim($arr['parent-uri']))    : $arr['uri']);
+       $arr['verb']          = ((x($arr, 'verb'))          ? notags(trim($arr['verb']))          : '');
+       $arr['object-type']   = ((x($arr, 'object-type'))   ? notags(trim($arr['object-type']))   : '');
+       $arr['object']        = ((x($arr, 'object'))        ? trim($arr['object'])                : '');
+       $arr['target-type']   = ((x($arr, 'target-type'))   ? notags(trim($arr['target-type']))   : '');
+       $arr['target']        = ((x($arr, 'target'))        ? trim($arr['target'])                : '');
+       $arr['plink']         = ((x($arr, 'plink'))         ? notags(trim($arr['plink']))         : '');
+       $arr['allow_cid']     = ((x($arr, 'allow_cid'))     ? trim($arr['allow_cid'])             : '');
+       $arr['allow_gid']     = ((x($arr, 'allow_gid'))     ? trim($arr['allow_gid'])             : '');
+       $arr['deny_cid']      = ((x($arr, 'deny_cid'))      ? trim($arr['deny_cid'])              : '');
+       $arr['deny_gid']      = ((x($arr, 'deny_gid'))      ? trim($arr['deny_gid'])              : '');
+       $arr['private']       = ((x($arr, 'private'))       ? intval($arr['private'])             : 0 );
+       $arr['bookmark']      = ((x($arr, 'bookmark'))      ? intval($arr['bookmark'])            : 0 );
+       $arr['body']          = ((x($arr, 'body'))          ? trim($arr['body'])                  : '');
+       $arr['tag']           = ((x($arr, 'tag'))           ? notags(trim($arr['tag']))           : '');
+       $arr['attach']        = ((x($arr, 'attach'))        ? notags(trim($arr['attach']))        : '');
+       $arr['app']           = ((x($arr, 'app'))           ? notags(trim($arr['app']))           : '');
+       $arr['origin']        = ((x($arr, 'origin'))        ? intval($arr['origin'])              : 0 );
+       $arr['network']       = ((x($arr, 'network'))       ? trim($arr['network'])               : '');
+       $arr['postopts']      = ((x($arr, 'postopts'))      ? trim($arr['postopts'])              : '');
+       $arr['resource-id']   = ((x($arr, 'resource-id'))   ? trim($arr['resource-id'])           : '');
+       $arr['event-id']      = ((x($arr, 'event-id'))      ? intval($arr['event-id'])            : 0 );
+       $arr['inform']        = ((x($arr, 'inform'))        ? trim($arr['inform'])                : '');
+       $arr['file']          = ((x($arr, 'file'))          ? trim($arr['file'])                  : '');
 
        // Items cannot be stored before they happen ...
-       if ($arr['created'] > datetime_convert())
+       if ($arr['created'] > datetime_convert()) {
                $arr['created'] = datetime_convert();
+       }
 
        // We haven't invented time travel by now.
-       if ($arr['edited'] > datetime_convert())
+       if ($arr['edited'] > datetime_convert()) {
                $arr['edited'] = datetime_convert();
+       }
 
-       if (($arr['author-link'] == "") AND ($arr['owner-link'] == ""))
-               logger("Both author-link and owner-link are empty. Called by: ".App::callstack(), LOGGER_DEBUG);
+       if (($arr['author-link'] == "") AND ($arr['owner-link'] == "")) {
+               logger("Both author-link and owner-link are empty. Called by: " . App::callstack(), LOGGER_DEBUG);
+       }
 
        if ($arr['plink'] == "") {
-               $arr['plink'] = App::get_baseurl().'/display/'.urlencode($arr['guid']);
+               $arr['plink'] = App::get_baseurl() . '/display/' . urlencode($arr['guid']);
        }
 
        if ($arr['network'] == "") {
@@ -573,59 +605,74 @@ function item_store($arr,$force_parent = false, $notify = false, $dontcache = fa
                                dbesc(normalise_link($arr['author-link']))
                        );
 
-               if (!dbm::is_result($r))
+               if (!dbm::is_result($r)) {
                        $r = q("SELECT `network` FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1",
                                intval($arr['contact-id']),
                                intval($arr['uid'])
                        );
+               }
 
-               if (dbm::is_result($r))
+               if (dbm::is_result($r)) {
                        $arr['network'] = $r[0]["network"];
+               }
 
                // Fallback to friendica (why is it empty in some cases?)
-               if ($arr['network'] == "")
+               if ($arr['network'] == "") {
                        $arr['network'] = NETWORK_DFRN;
+               }
 
-               logger("item_store: Set network to ".$arr["network"]." for ".$arr["uri"], LOGGER_DEBUG);
+               logger("item_store: Set network to " . $arr["network"] . " for " . $arr["uri"], LOGGER_DEBUG);
        }
 
        // The contact-id should be set before "item_store" was called - but there seems to be some issues
        if ($arr["contact-id"] == 0) {
-               // First we are looking for a suitable contact that matches with the author of the post
-               // This is done only for comments (See below explanation at "gcontact-id")
-               if ($arr['parent-uri'] != $arr['uri'])
+               /*
+                * First we are looking for a suitable contact that matches with the author of the post
+                * This is done only for comments (See below explanation at "gcontact-id")
+                */
+               if ($arr['parent-uri'] != $arr['uri']) {
                        $arr["contact-id"] = get_contact($arr['author-link'], $uid);
+               }
 
                // If not present then maybe the owner was found
-               if ($arr["contact-id"] == 0)
+               if ($arr["contact-id"] == 0) {
                        $arr["contact-id"] = get_contact($arr['owner-link'], $uid);
+               }
 
                // Still missing? Then use the "self" contact of the current user
                if ($arr["contact-id"] == 0) {
                        $r = q("SELECT `id` FROM `contact` WHERE `self` AND `uid` = %d", intval($uid));
-                       if ($r)
+
+                       if (dbm::is_result($r)) {
                                $arr["contact-id"] = $r[0]["id"];
+                       }
                }
+
                logger("Contact-id was missing for post ".$arr["guid"]." from user id ".$uid." - now set to ".$arr["contact-id"], LOGGER_DEBUG);
        }
 
        if ($arr["gcontact-id"] == 0) {
-               // The gcontact should mostly behave like the contact. But is is supposed to be global for the system.
-               // This means that wall posts, repeated posts, etc. should have the gcontact id of the owner.
-               // On comments the author is the better choice.
-               if ($arr['parent-uri'] === $arr['uri'])
+               /*
+                * The gcontact should mostly behave like the contact. But is is supposed to be global for the system.
+                * This means that wall posts, repeated posts, etc. should have the gcontact id of the owner.
+                * On comments the author is the better choice.
+                */
+               if ($arr['parent-uri'] === $arr['uri']) {
                        $arr["gcontact-id"] = get_gcontact_id(array("url" => $arr['owner-link'], "network" => $arr['network'],
                                                                 "photo" => $arr['owner-avatar'], "name" => $arr['owner-name']));
-               else
+               } else {
                        $arr["gcontact-id"] = get_gcontact_id(array("url" => $arr['author-link'], "network" => $arr['network'],
                                                                 "photo" => $arr['author-avatar'], "name" => $arr['author-name']));
+               }
        }
 
-       if ($arr["author-id"] == 0)
+       if ($arr["author-id"] == 0) {
                $arr["author-id"] = get_contact($arr["author-link"], 0);
+       }
 
-       if ($arr["owner-id"] == 0)
+       if ($arr["owner-id"] == 0) {
                $arr["owner-id"] = get_contact($arr["owner-link"], 0);
+       }
 
        if ($arr['guid'] != "") {
                // Checking if there is already an item with the same guid
@@ -675,8 +722,10 @@ function item_store($arr,$force_parent = false, $notify = false, $dontcache = fa
                                        dbesc($r[0]['parent-uri']),
                                        intval($arr['uid'])
                                );
-                               if ($z && count($z))
+
+                               if (dbm::is_result($z)) {
                                        $r = $z;
+                               }
                        }
 
                        $parent_id      = $r[0]['id'];
@@ -688,20 +737,23 @@ function item_store($arr,$force_parent = false, $notify = false, $dontcache = fa
                        $arr['wall']    = $r[0]['wall'];
                        $notify_type    = 'comment-new';
 
-                       // if the parent is private, force privacy for the entire conversation
-                       // This differs from the above settings as it subtly allows comments from
-                       // email correspondents to be private even if the overall thread is not.
-
-                       if ($r[0]['private'])
+                       /*
+                        * If the parent is private, force privacy for the entire conversation
+                        * This differs from the above settings as it subtly allows comments from
+                        * email correspondents to be private even if the overall thread is not.
+                        */
+                       if ($r[0]['private']) {
                                $arr['private'] = $r[0]['private'];
+                       }
 
-                       // Edge case. We host a public forum that was originally posted to privately.
-                       // The original author commented, but as this is a comment, the permissions
-                       // weren't fixed up so it will still show the comment as private unless we fix it here.
-
-                       if ((intval($r[0]['forum_mode']) == 1) && (! $r[0]['private']))
+                       /*
+                        * Edge case. We host a public forum that was originally posted to privately.
+                        * The original author commented, but as this is a comment, the permissions
+                        * weren't fixed up so it will still show the comment as private unless we fix it here.
+                        */
+                       if ((intval($r[0]['forum_mode']) == 1) && (! $r[0]['private'])) {
                                $arr['private'] = 0;
-
+                       }
 
                        // If its a post from myself then tag the thread as "mention"
                        logger("item_store: Checking if parent ".$parent_id." has to be tagged as mention for user ".$arr['uid'], LOGGER_DEBUG);
@@ -716,10 +768,10 @@ function item_store($arr,$force_parent = false, $notify = false, $dontcache = fa
                                }
                        }
                } else {
-
-                       // Allow one to see reply tweets from status.net even when
-                       // we don't have or can't see the original post.
-
+                       /*
+                        * Allow one to see reply tweets from status.net even when
+                        * we don't have or can't see the original post.
+                        */
                        if ($force_parent) {
                                logger('item_store: $force_parent=true, reply converted to top-level post.');
                                $parent_id = 0;
@@ -779,14 +831,15 @@ function item_store($arr,$force_parent = false, $notify = false, $dontcache = fa
        } else {
                $isglobal = q("SELECT `global` FROM `item` WHERE `uid` = 0 AND `uri` = '%s'", dbesc($arr["uri"]));
 
-               $arr["global"] = (count($isglobal) > 0);
+               $arr["global"] = (dbm::is_result($isglobal) && count($isglobal) > 0);
        }
 
        // ACL settings
-       if (strlen($allow_cid) || strlen($allow_gid) || strlen($deny_cid) || strlen($deny_gid))
+       if (strlen($allow_cid) || strlen($allow_gid) || strlen($deny_cid) || strlen($deny_gid)) {
                $private = 1;
-       else
+       } else {
                $private = $arr['private'];
+       }
 
        $arr["allow_cid"] = $allow_cid;
        $arr["allow_gid"] = $allow_gid;
@@ -798,19 +851,22 @@ function item_store($arr,$force_parent = false, $notify = false, $dontcache = fa
        // Fill the cache field
        put_item_in_cache($arr);
 
-       if ($notify)
-               call_hooks('post_local',$arr);
-       else
-               call_hooks('post_remote',$arr);
+       if ($notify) {
+               call_hooks('post_local', $arr);
+       } else {
+               call_hooks('post_remote', $arr);
+       }
 
-       if (x($arr,'cancel')) {
+       if (x($arr, 'cancel')) {
                logger('item_store: post cancelled by plugin.');
                return 0;
        }
 
-       // Check for already added items.
-       // There is a timing issue here that sometimes creates double postings.
-       // An unique index would help - but the limitations of MySQL (maximum size of index values) prevent this.
+       /*
+        * Check for already added items.
+        * There is a timing issue here that sometimes creates double postings.
+        * An unique index would help - but the limitations of MySQL (maximum size of index values) prevent this.
+        */
        if ($arr["uid"] == 0) {
                $r = qu("SELECT `id` FROM `item` WHERE `uri` = '%s' AND `uid` = 0 LIMIT 1", dbesc(trim($arr['uri'])));
                if (dbm::is_result($r)) {
@@ -895,7 +951,7 @@ function item_store($arr,$force_parent = false, $notify = false, $dontcache = fa
 
        if ($r[0]["entries"] > 1) {
                // There are duplicates. We delete our just created entry.
-               logger('Duplicated post occurred. uri = '.$arr['uri'].' uid = '.$arr['uid']);
+               logger('Duplicated post occurred. uri = ' . $arr['uri'] . ' uid = ' . $arr['uid']);
 
                // Yes, we could do a rollback here - but we are having many users with MyISAM.
                q("DELETE FROM `item` WHERE `id` = %d", intval($current_post));
@@ -911,8 +967,9 @@ function item_store($arr,$force_parent = false, $notify = false, $dontcache = fa
        logger('item_store: created item '.$current_post);
        item_set_last_item($arr);
 
-       if (!$parent_id || ($arr['parent-uri'] === $arr['uri']))
+       if (!$parent_id || ($arr['parent-uri'] === $arr['uri'])) {
                $parent_id = $current_post;
+       }
 
        // Set parent id
        $r = q("UPDATE `item` SET `parent` = %d WHERE `id` = %d",
@@ -925,28 +982,31 @@ function item_store($arr,$force_parent = false, $notify = false, $dontcache = fa
 
        // update the commented timestamp on the parent
        // Only update "commented" if it is really a comment
-       if (($arr['verb'] == ACTIVITY_POST) OR !get_config("system", "like_no_comment"))
+       if (($arr['verb'] == ACTIVITY_POST) OR !get_config("system", "like_no_comment")) {
                q("UPDATE `item` SET `commented` = '%s', `changed` = '%s' WHERE `id` = %d",
                        dbesc(datetime_convert()),
                        dbesc(datetime_convert()),
                        intval($parent_id)
                );
-       else
+       } else {
                q("UPDATE `item` SET `changed` = '%s' WHERE `id` = %d",
                        dbesc(datetime_convert()),
                        intval($parent_id)
                );
+       }
 
        if ($dsprsig) {
 
-               // Friendica servers lower than 3.4.3-2 had double encoded the signature ...
-               // We can check for this condition when we decode and encode the stuff again.
+               /*
+                * Friendica servers lower than 3.4.3-2 had double encoded the signature ...
+                * We can check for this condition when we decode and encode the stuff again.
+                */
                if (base64_encode(base64_decode(base64_decode($dsprsig->signature))) == base64_decode($dsprsig->signature)) {
                        $dsprsig->signature = base64_decode($dsprsig->signature);
                        logger("Repaired double encoded signature from handle ".$dsprsig->signer, LOGGER_DEBUG);
                }
 
-               q("insert into sign (`iid`,`signed_text`,`signature`,`signer`) values (%d,'%s','%s','%s') ",
+               q("INSERT INTO `sign` (`iid`,`signed_text`,`signature`,`signer`) values (%d,'%s','%s','%s') ",
                        intval($current_post),
                        dbesc($dsprsig->signed_text),
                        dbesc($dsprsig->signature),
@@ -954,10 +1014,12 @@ function item_store($arr,$force_parent = false, $notify = false, $dontcache = fa
                );
        }
 
-       $deleted = tag_deliver($arr['uid'],$current_post);
+       $deleted = tag_deliver($arr['uid'], $current_post);
 
-       // current post can be deleted if is for a community page and no mention are
-       // in it.
+       /*
+        * current post can be deleted if is for a community page and no mention are
+        * in it.
+        */
        if (!$deleted AND !$dontcache) {
 
                $r = q('SELECT * FROM `item` WHERE `id` = %d', intval($current_post));
@@ -980,13 +1042,17 @@ function item_store($arr,$force_parent = false, $notify = false, $dontcache = fa
 
        q("COMMIT");
 
-       // Due to deadlock issues with the "term" table we are doing these steps after the commit.
-       // This is not perfect - but a workable solution until we found the reason for the problem.
+       /*
+        * Due to deadlock issues with the "term" table we are doing these steps after the commit.
+        * This is not perfect - but a workable solution until we found the reason for the problem.
+        */
        create_tags_from_item($current_post);
        create_files_from_item($current_post);
 
-       // If this is now the last-child, force all _other_ children of this parent to *not* be last-child
-       // It is done after the transaction to avoid dead locks.
+       /*
+        * If this is now the last-child, force all _other_ children of this parent to *not* be last-child
+        * It is done after the transaction to avoid dead locks.
+        */
        if ($arr['last-child']) {
                $r = q("UPDATE `item` SET `last-child` = 0 WHERE `parent-uri` = '%s' AND `uid` = %d AND `id` != %d",
                        dbesc($arr['uri']),
@@ -1027,7 +1093,7 @@ function item_set_last_item($arr) {
        if (!$update AND ($arr["network"] == NETWORK_DFRN) AND ($arr["parent-uri"] === $arr["uri"])) {
                $isforum = q("SELECT `forum` FROM `contact` WHERE `id` = %d AND `forum`",
                                intval($arr['contact-id']));
-               if ($isforum) {
+               if (dbm::is_result($isforum)) {
                        $update = true;
                }
        }
@@ -1062,8 +1128,9 @@ function item_body_set_hashtags(&$item) {
        $tags = get_tags($item["body"]);
 
        // No hashtags?
-       if (!count($tags))
-               return(false);
+       if (!count($tags)) {
+               return false;
+       }
 
        // This sorting is important when there are hashtags that are part of other hashtags
        // Otherwise there could be problems with hashtags like #test and #test2
@@ -1073,6 +1140,7 @@ function item_body_set_hashtags(&$item) {
 
        $URLSearchString = "^\[\]";
 
+       /// @TODO old-lost code?
        // All hashtags should point to the home server
        //$item["body"] = preg_replace("/#\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism",
        //              "#[url=".App::get_baseurl()."/search?tag=$2]$2[/url]", $item["body"]);
@@ -1082,41 +1150,39 @@ function item_body_set_hashtags(&$item) {
 
        // mask hashtags inside of url, bookmarks and attachments to avoid urls in urls
        $item["body"] = preg_replace_callback("/\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism",
-               function ($match){
-                       return("[url=".str_replace("#", "&num;", $match[1])."]".str_replace("#", "&num;", $match[2])."[/url]");
-               },$item["body"]);
+               function ($match) {
+                       return ("[url=" . str_replace("#", "&num;", $match[1]) . "]" . str_replace("#", "&num;", $match[2]) . "[/url]");
+               }, $item["body"]);
 
        $item["body"] = preg_replace_callback("/\[bookmark\=([$URLSearchString]*)\](.*?)\[\/bookmark\]/ism",
-               function ($match){
-                       return("[bookmark=".str_replace("#", "&num;", $match[1])."]".str_replace("#", "&num;", $match[2])."[/bookmark]");
-               },$item["body"]);
+               function ($match) {
+                       return ("[bookmark=" . str_replace("#", "&num;", $match[1]) . "]" . str_replace("#", "&num;", $match[2]) . "[/bookmark]");
+               }, $item["body"]);
 
        $item["body"] = preg_replace_callback("/\[attachment (.*)\](.*?)\[\/attachment\]/ism",
-               function ($match){
-                       return("[attachment ".str_replace("#", "&num;", $match[1])."]".$match[2]."[/attachment]");
-               },$item["body"]);
+               function ($match) {
+                       return ("[attachment " . str_replace("#", "&num;", $match[1]) . "]" . $match[2] . "[/attachment]");
+               }, $item["body"]);
 
        // Repair recursive urls
        $item["body"] = preg_replace("/&num;\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism",
                        "&num;$2", $item["body"]);
 
-
-       foreach($tags as $tag) {
-               if (strpos($tag,'#') !== 0)
-                       continue;
-
-               if (strpos($tag,'[url='))
+       foreach ($tags as $tag) {
+               if ((strpos($tag, '#') !== 0) || (strpos($tag, '[url='))) {
                        continue;
+               }
 
                $basetag = str_replace('_',' ',substr($tag,1));
 
-               $newtag = '#[url='.App::get_baseurl().'/search?tag='.rawurlencode($basetag).']'.$basetag.'[/url]';
+               $newtag = '#[url=' . App::get_baseurl() . '/search?tag=' . rawurlencode($basetag) . ']' . $basetag . '[/url]';
 
                $item["body"] = str_replace($tag, $newtag, $item["body"]);
 
-               if (!stristr($item["tag"],"/search?tag=".$basetag."]".$basetag."[/url]")) {
-                       if (strlen($item["tag"]))
+               if (!stristr($item["tag"], "/search?tag=" . $basetag . "]" . $basetag . "[/url]")) {
+                       if (strlen($item["tag"])) {
                                $item["tag"] = ','.$item["tag"];
+                       }
                        $item["tag"] = $newtag.$item["tag"];
                }
        }
@@ -1127,10 +1193,12 @@ function item_body_set_hashtags(&$item) {
 
 function get_item_guid($id) {
        $r = q("SELECT `guid` FROM `item` WHERE `id` = %d LIMIT 1", intval($id));
-       if (dbm::is_result($r))
-               return($r[0]["guid"]);
-       else
-               return("");
+       if (dbm::is_result($r)) {
+               return $r[0]["guid"];
+       } else {
+               /// @TODO This else-block can be elimited again
+               return "";
+       }
 }
 
 function get_item_id($guid, $uid = 0) {
@@ -1138,8 +1206,9 @@ function get_item_id($guid, $uid = 0) {
        $nick = "";
        $id = 0;
 
-       if ($uid == 0)
+       if ($uid == 0) {
                $uid == local_user();
+       }
 
        // Does the given user have this item?
        if ($uid) {
@@ -1165,14 +1234,15 @@ function get_item_id($guid, $uid = 0) {
                        $nick = $r[0]["nickname"];
                }
        }
-       return(array("nick" => $nick, "id" => $id));
+       return array("nick" => $nick, "id" => $id);
 }
 
 // return - test
-function get_item_contact($item,$contacts) {
-       if (! count($contacts) || (! is_array($item)))
+function get_item_contact($item, $contacts) {
+       if (! count($contacts) || (! is_array($item))) {
                return false;
-       foreach($contacts as $contact) {
+       }
+       foreach ($contacts as $contact) {
                if ($contact['id'] == $item['contact-id']) {
                        return $contact;
                        break; // NOTREACHED
@@ -1187,15 +1257,13 @@ function get_item_contact($item,$contacts) {
  * @param int $item_id
  * @return bool true if item was deleted, else false
  */
-function tag_deliver($uid,$item_id) {
-
-       //
+function tag_deliver($uid, $item_id) {
 
        $a = get_app();
 
        $mention = false;
 
-       $u = q("select * from user where uid = %d limit 1",
+       $u = q("SELECT * FROM `user` WHERE `uid` = %d LIMIT 1",
                intval($uid)
        );
 
@@ -1219,24 +1287,25 @@ function tag_deliver($uid,$item_id) {
 
        $link = normalise_link(App::get_baseurl() . '/profile/' . $u[0]['nickname']);
 
-       // Diaspora uses their own hardwired link URL in @-tags
-       // instead of the one we supply with webfinger
-
+       /*
+        * Diaspora uses their own hardwired link URL in @-tags
+        * instead of the one we supply with webfinger
+        */
        $dlink = normalise_link(App::get_baseurl() . '/u/' . $u[0]['nickname']);
 
-       $cnt = preg_match_all('/[\@\!]\[url\=(.*?)\](.*?)\[\/url\]/ism',$item['body'],$matches,PREG_SET_ORDER);
+       $cnt = preg_match_all('/[\@\!]\[url\=(.*?)\](.*?)\[\/url\]/ism', $item['body'], $matches, PREG_SET_ORDER);
        if ($cnt) {
-               foreach($matches as $mtch) {
-                       if (link_compare($link,$mtch[1]) || link_compare($dlink,$mtch[1])) {
+               foreach ($matches as $mtch) {
+                       if (link_compare($link, $mtch[1]) || link_compare($dlink, $mtch[1])) {
                                $mention = true;
                                logger('tag_deliver: mention found: ' . $mtch[2]);
                        }
                }
        }
 
-       if (! $mention){
-               if ( ($community_page || $prvgroup) &&
-                         (!$item['wall']) && (!$item['origin']) && ($item['id'] == $item['parent'])){
+       if (! $mention) {
+               if (($community_page || $prvgroup) &&
+                         (!$item['wall']) && (!$item['origin']) && ($item['id'] == $item['parent'])) {
                        // mmh.. no mention.. community page or private group... no wall.. no origin.. top-post (not a comment)
                        // delete it!
                        logger("tag_deliver: no-mention top-level post to communuty or private group. delete.");
@@ -1253,21 +1322,21 @@ function tag_deliver($uid,$item_id) {
 
        call_hooks('tagged', $arr);
 
-       if ((! $community_page) && (! $prvgroup))
+       if ((! $community_page) && (! $prvgroup)) {
                return;
+       }
 
-
-       // tgroup delivery - setup a second delivery chain
-       // prevent delivery looping - only proceed
-       // if the message originated elsewhere and is a top-level post
-
-       if (($item['wall']) || ($item['origin']) || ($item['id'] != $item['parent']))
+       /*
+        * tgroup delivery - setup a second delivery chain
+        * prevent delivery looping - only proceed
+        * if the message originated elsewhere and is a top-level post
+        */
+       if (($item['wall']) || ($item['origin']) || ($item['id'] != $item['parent'])) {
                return;
+       }
 
        // now change this copy of the post to a forum head message and deliver to all the tgroup members
-
-
-       $c = q("select name, url, thumb from contact where self = 1 and uid = %d limit 1",
+       $c = q("SELECT `name`, `url`, `thumb` FROM `contact` WHERE `self` = 1 AND `uid` = %d LIMIT 1",
                intval($u[0]['uid'])
        );
        if (! dbm::is_result($c)) {
@@ -1301,14 +1370,15 @@ function tag_deliver($uid,$item_id) {
 
 
 
-function tgroup_check($uid,$item) {
+function tgroup_check($uid, $item) {
 
        $mention = false;
 
        // check that the message originated elsewhere and is a top-level post
 
-       if (($item['wall']) || ($item['origin']) || ($item['uri'] != $item['parent-uri']))
+       if (($item['wall']) || ($item['origin']) || ($item['uri'] != $item['parent-uri'])) {
                return false;
+       }
 
        /// @TODO Encapsulate this or find it encapsulated and replace all occurrances
        $u = q("SELECT * FROM `user` WHERE `uid` = %d LIMIT 1",
@@ -1321,18 +1391,18 @@ function tgroup_check($uid,$item) {
        $community_page = (($u[0]['page-flags'] == PAGE_COMMUNITY) ? true : false);
        $prvgroup = (($u[0]['page-flags'] == PAGE_PRVGROUP) ? true : false);
 
-
        $link = normalise_link(App::get_baseurl() . '/profile/' . $u[0]['nickname']);
 
-       // Diaspora uses their own hardwired link URL in @-tags
-       // instead of the one we supply with webfinger
-
+       /*
+        * Diaspora uses their own hardwired link URL in @-tags
+        * instead of the one we supply with webfinger
+        */
        $dlink = normalise_link(App::get_baseurl() . '/u/' . $u[0]['nickname']);
 
-       $cnt = preg_match_all('/[\@\!]\[url\=(.*?)\](.*?)\[\/url\]/ism',$item['body'],$matches,PREG_SET_ORDER);
+       $cnt = preg_match_all('/[\@\!]\[url\=(.*?)\](.*?)\[\/url\]/ism', $item['body'], $matches, PREG_SET_ORDER);
        if ($cnt) {
                foreach ($matches as $mtch) {
-                       if (link_compare($link,$mtch[1]) || link_compare($dlink,$mtch[1])) {
+                       if (link_compare($link, $mtch[1]) || link_compare($dlink, $mtch[1])) {
                                $mention = true;
                                logger('tgroup_check: mention found: ' . $mtch[2]);
                        }
@@ -1343,23 +1413,25 @@ function tgroup_check($uid,$item) {
                return false;
        }
 
-       /// @TODO Combines both return statements into one
+       /// @TODO Combine both return statements into one
        return (($community_page) || ($prvgroup));
 }
 
-/*
-  This function returns true if $update has an edited timestamp newer
-  than $existing, i.e. $update contains new data which should override
-  what's already there.  If there is no timestamp yet, the update is
-  assumed to be newer.  If the update has no timestamp, the existing
-  item is assumed to be up-to-date.  If the timestamps are equal it
-  assumes the update has been seen before and should be ignored.
-  */
-function edited_timestamp_is_newer($existing, $update) {
-       if (!x($existing,'edited') || !$existing['edited']) {
+/**
+ * This function returns true if $update has an edited timestamp newer
+ * than $existing, i.e. $update contains new data which should override
+ * what's already there.  If there is no timestamp yet, the update is
+ * assumed to be newer.  If the update has no timestamp, the existing
+ * item is assumed to be up-to-date.  If the timestamps are equal it
+ * assumes the update has been seen before and should be ignored.
+ *
+ * @todo fix type-hints (both array)
+ */
+function edited_timestamp_is_newer ($existing, $update) {
+       if (!x($existing, 'edited') || !$existing['edited']) {
                return true;
        }
-       if (!x($update,'edited') || !$update['edited']) {
+       if (!x($update, 'edited') || !$update['edited']) {
                return false;
        }
 
@@ -1393,16 +1465,17 @@ function edited_timestamp_is_newer($existing, $update) {
  * model where comments can have sub-threads. That would require some massive sorting
  * to get all the feed items into a mostly linear ordering, and might still require
  * recursion.
+ *
+ * @todo find proper type-hints
  */
-
-function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0) {
+function consume_feed($xml, $importer, &$contact, &$hub, $datedir = 0, $pass = 0) {
        if ($contact['network'] === NETWORK_OSTATUS) {
                if ($pass < 2) {
                        // Test - remove before flight
                        //$tempfile = tempnam(get_temppath(), "ostatus2");
                        //file_put_contents($tempfile, $xml);
                        logger("Consume OStatus messages ", LOGGER_DEBUG);
-                       ostatus::import($xml,$importer,$contact, $hub);
+                       ostatus::import($xml, $importer, $contact, $hub);
                }
                return;
        }
@@ -1410,7 +1483,7 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
        if ($contact['network'] === NETWORK_FEED) {
                if ($pass < 2) {
                        logger("Consume feeds", LOGGER_DEBUG);
-                       feed_import($xml,$importer,$contact, $hub);
+                       feed_import($xml, $importer, $contact, $hub);
                }
                return;
        }
@@ -1418,7 +1491,7 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
        if ($contact['network'] === NETWORK_DFRN) {
                logger("Consume DFRN messages", LOGGER_DEBUG);
 
-               $r = q("SELECT  `contact`.*, `contact`.`uid` AS `importer_uid`,
+               $r = q("SELECT `contact`.*, `contact`.`uid` AS `importer_uid`,
                                        `contact`.`pubkey` AS `cpubkey`,
                                        `contact`.`prvkey` AS `cprvkey`,
                                        `contact`.`thumb` AS `thumb`,
@@ -1430,34 +1503,40 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
                        WHERE `contact`.`id` = %d AND `user`.`uid` = %d",
                        dbesc($contact["id"]), dbesc($importer["uid"])
                );
-               if ($r) {
+               if (dbm::is_result($r)) {
                        logger("Now import the DFRN feed");
-                       dfrn::import($xml,$r[0], true);
+                       dfrn::import($xml, $r[0], true);
                        return;
                }
        }
 }
 
+/// @TODO type-hint is array
 function item_is_remote_self($contact, &$datarray) {
        $a = get_app();
 
-       if (!$contact['remote_self'])
+       if (!$contact['remote_self']) {
                return false;
+       }
 
        // Prevent the forwarding of posts that are forwarded
-       if ($datarray["extid"] == NETWORK_DFRN)
+       if ($datarray["extid"] == NETWORK_DFRN) {
                return false;
+       }
 
        // Prevent to forward already forwarded posts
-       if ($datarray["app"] == $a->get_hostname())
+       if ($datarray["app"] == $a->get_hostname()) {
                return false;
+       }
 
        // Only forward posts
-       if ($datarray["verb"] != ACTIVITY_POST)
+       if ($datarray["verb"] != ACTIVITY_POST) {
                return false;
+       }
 
-       if (($contact['network'] != NETWORK_FEED) AND $datarray['private'])
+       if (($contact['network'] != NETWORK_FEED) AND $datarray['private']) {
                return false;
+       }
 
        $datarray2 = $datarray;
        logger('remote-self start - Contact '.$contact['url'].' - '.$contact['remote_self'].' Item '.print_r($datarray, true), LOGGER_DEBUG);
@@ -1479,25 +1558,28 @@ function item_is_remote_self($contact, &$datarray) {
                if ($contact['network'] != NETWORK_FEED) {
                        $datarray["guid"] = get_guid(32);
                        unset($datarray["plink"]);
-                       $datarray["uri"] = item_new_uri($a->get_hostname(),$contact['uid'], $datarray["guid"]);
+                       $datarray["uri"] = item_new_uri($a->get_hostname(), $contact['uid'], $datarray["guid"]);
                        $datarray["parent-uri"] = $datarray["uri"];
                        $datarray["extid"] = $contact['network'];
                        $urlpart = parse_url($datarray2['author-link']);
                        $datarray["app"] = $urlpart["host"];
-               } else
+               } else {
                        $datarray['private'] = 0;
+               }
        }
 
        if ($contact['network'] != NETWORK_FEED) {
                // Store the original post
                $r = item_store($datarray2, false, false);
                logger('remote-self post original item - Contact '.$contact['url'].' return '.$r.' Item '.print_r($datarray2, true), LOGGER_DEBUG);
-       } else
+       } else {
                $datarray["app"] = "Feed";
+       }
 
        return true;
 }
 
+/// @TODO find proper type-hints
 function new_follower($importer, $contact, $datarray, $item, $sharing = false) {
        $url = notags(trim($datarray['author-link']));
        $name = notags(trim($datarray['author-name']));
@@ -1548,6 +1630,7 @@ function new_follower($importer, $contact, $datarray, $item, $sharing = false) {
                        update_contact_avatar($photo, $importer["uid"], $contact_record["id"], true);
                }
 
+               /// @TODO Encapsulate this into a function/method
                $r = q("SELECT * FROM `user` WHERE `uid` = %d LIMIT 1",
                        intval($importer['uid'])
                );
@@ -1636,17 +1719,18 @@ function subscribe_to_hub($url, $importer, $contact, $hubmode = 'subscribe') {
                );
        }
 
-       // Diaspora has different message-ids in feeds than they do
-       // through the direct Diaspora protocol. If we try and use
-       // the feed, we'll get duplicates. So don't.
-
-       if ((! dbm::is_result($r)) || $contact['network'] === NETWORK_DIASPORA)
+       /*
+        * Diaspora has different message-ids in feeds than they do
+        * through the direct Diaspora protocol. If we try and use
+        * the feed, we'll get duplicates. So don't.
+        */
+       if ((! dbm::is_result($r)) || $contact['network'] === NETWORK_DIASPORA) {
                return;
+       }
 
        $push_url = get_config('system','url') . '/pubsub/' . $r[0]['nickname'] . '/' . $contact['id'];
 
        // Use a single verify token, even if multiple hubs
-
        $verify_token = ((strlen($contact['hub-verify'])) ? $contact['hub-verify'] : random_string());
 
        $params= 'hub.mode=' . $hubmode . '&hub.callback=' . urlencode($push_url) . '&hub.topic=' . urlencode($contact['poll']) . '&hub.verify=async&hub.verify_token=' . $verify_token;
@@ -1660,7 +1744,7 @@ function subscribe_to_hub($url, $importer, $contact, $hubmode = 'subscribe') {
                );
        }
 
-       post_url($url,$params);
+       post_url($url, $params);
 
        logger('subscribe_to_hub: returns: ' . $a->get_curl_code(), LOGGER_DEBUG);
 
@@ -1670,8 +1754,9 @@ function subscribe_to_hub($url, $importer, $contact, $hubmode = 'subscribe') {
 
 function fix_private_photos($s, $uid, $item = null, $cid = 0) {
 
-       if (get_config('system','disable_embedded'))
+       if (get_config('system','disable_embedded')) {
                return $s;
+       }
 
        $a = get_app();
 
@@ -1684,7 +1769,7 @@ function fix_private_photos($s, $uid, $item = null, $cid = 0) {
        $img_start = strpos($orig_body, '[img');
        $img_st_close = ($img_start !== false ? strpos(substr($orig_body, $img_start), ']') : false);
        $img_len = ($img_start !== false ? strpos(substr($orig_body, $img_start + $img_st_close + 1), '[/img]') : false);
-       while( ($img_st_close !== false) && ($img_len !== false) ) {
+       while ( ($img_st_close !== false) && ($img_len !== false) ) {
 
                $img_st_close++; // make it point to AFTER the closing bracket
                $image = substr($orig_body, $img_start + $img_st_close, $img_len);
@@ -1696,27 +1781,28 @@ function fix_private_photos($s, $uid, $item = null, $cid = 0) {
                        // Only embed locally hosted photos
                        $replace = false;
                        $i = basename($image);
-                       $i = str_replace(array('.jpg','.png','.gif'),array('','',''),$i);
-                       $x = strpos($i,'-');
+                       $i = str_replace(array('.jpg', '.png', '.gif'),array('', '',''), $i);
+                       $x = strpos($i, '-');
 
                        if ($x) {
-                               $res = substr($i,$x+1);
-                               $i = substr($i,0,$x);
+                               $res = substr($i, $x + 1);
+                               $i = substr($i, 0, $x);
                                $r = q("SELECT * FROM `photo` WHERE `resource-id` = '%s' AND `scale` = %d AND `uid` = %d",
                                        dbesc($i),
                                        intval($res),
                                        intval($uid)
-                               );
-                               if ($r) {
-
-                                       // Check to see if we should replace this photo link with an embedded image
-                                       // 1. No need to do so if the photo is public
-                                       // 2. If there's a contact-id provided, see if they're in the access list
-                                       //    for the photo. If so, embed it.
-                                       // 3. Otherwise, if we have an item, see if the item permissions match the photo
-                                       //    permissions, regardless of order but first check to see if they're an exact
-                                       //    match to save some processing overhead.
 
+                               );
+                               if (dbm::is_result($r)) {
+                                       /*
+                                        * Check to see if we should replace this photo link with an embedded image
+                                        * 1. No need to do so if the photo is public
+                                        * 2. If there's a contact-id provided, see if they're in the access list
+                                        *    for the photo. If so, embed it.
+                                        * 3. Otherwise, if we have an item, see if the item permissions match the photo
+                                        *    permissions, regardless of order but first check to see if they're an exact
+                                        *    match to save some processing overhead.
+                                        */
                                        if (has_permissions($r[0])) {
                                                if ($cid) {
                                                        $recips = enumerate_permissions($r[0]);
@@ -1724,8 +1810,9 @@ function fix_private_photos($s, $uid, $item = null, $cid = 0) {
                                                                $replace = true;
                                                        }
                                                } elseif ($item) {
-                                                       if (compare_permissions($item,$r[0]))
+                                                       if (compare_permissions($item, $r[0])) {
                                                                $replace = true;
+                                                       }
                                                }
                                        }
                                        if ($replace) {
@@ -1757,8 +1844,9 @@ function fix_private_photos($s, $uid, $item = null, $cid = 0) {
 
                $new_body = $new_body . substr($orig_body, 0, $img_start + $img_st_close) . $image . '[/img]';
                $orig_body = substr($orig_body, $img_start + $img_st_close + $img_len + strlen('[/img]'));
-               if ($orig_body === false)
+               if ($orig_body === false) {
                        $orig_body = '';
+               }
 
                $img_start = strpos($orig_body, '[img');
                $img_st_close = ($img_start !== false ? strpos(substr($orig_body, $img_start), ']') : false);
@@ -1767,63 +1855,75 @@ function fix_private_photos($s, $uid, $item = null, $cid = 0) {
 
        $new_body = $new_body . $orig_body;
 
-       return($new_body);
+       return $new_body;
 }
 
+/// @TODO type-hint is array
 function has_permissions($obj) {
-       if (($obj['allow_cid'] != '') || ($obj['allow_gid'] != '') || ($obj['deny_cid'] != '') || ($obj['deny_gid'] != ''))
-               return true;
-       return false;
+       return (
+               (
+                       x($obj, 'allow_cid')
+               ) || (
+                       x($obj, 'allow_gid')
+               ) || (
+                       x($obj, 'deny_cid')
+               ) || (
+                       x($obj, 'deny_gid')
+               )
+       );
 }
 
-function compare_permissions($obj1,$obj2) {
+/// @TODO type-hint is array
+function compare_permissions($obj1, $obj2) {
        // first part is easy. Check that these are exactly the same.
        if (($obj1['allow_cid'] == $obj2['allow_cid'])
                && ($obj1['allow_gid'] == $obj2['allow_gid'])
                && ($obj1['deny_cid'] == $obj2['deny_cid'])
-               && ($obj1['deny_gid'] == $obj2['deny_gid']))
+               && ($obj1['deny_gid'] == $obj2['deny_gid'])) {
                return true;
+       }
 
        // This is harder. Parse all the permissions and compare the resulting set.
-
        $recipients1 = enumerate_permissions($obj1);
        $recipients2 = enumerate_permissions($obj2);
        sort($recipients1);
        sort($recipients2);
-       if ($recipients1 == $recipients2)
-               return true;
-       return false;
+
+       /// @TODO Comparison of arrays, maybe use array_diff_assoc() here?
+       return ($recipients1 == $recipients2);
 }
 
 // returns an array of contact-ids that are allowed to see this object
-
+/// @TODO type-hint is array
 function enumerate_permissions($obj) {
        $allow_people = expand_acl($obj['allow_cid']);
        $allow_groups = expand_groups(expand_acl($obj['allow_gid']));
        $deny_people  = expand_acl($obj['deny_cid']);
        $deny_groups  = expand_groups(expand_acl($obj['deny_gid']));
-       $recipients   = array_unique(array_merge($allow_people,$allow_groups));
-       $deny         = array_unique(array_merge($deny_people,$deny_groups));
-       $recipients   = array_diff($recipients,$deny);
+       $recipients   = array_unique(array_merge($allow_people, $allow_groups));
+       $deny         = array_unique(array_merge($deny_people, $deny_groups));
+       $recipients   = array_diff($recipients, $deny);
        return $recipients;
 }
 
 function item_getfeedtags($item) {
        $ret = array();
        $matches = false;
-       $cnt = preg_match_all('|\#\[url\=(.*?)\](.*?)\[\/url\]|',$item['tag'],$matches);
+       $cnt = preg_match_all('|\#\[url\=(.*?)\](.*?)\[\/url\]|', $item['tag'], $matches);
        if ($cnt) {
-               for($x = 0; $x < $cnt; $x ++) {
-                       if ($matches[1][$x])
-                               $ret[$matches[2][$x]] = array('#',$matches[1][$x], $matches[2][$x]);
+               for ($x = 0; $x < $cnt; $x ++) {
+                       if ($matches[1][$x]) {
+                               $ret[$matches[2][$x]] = array('#', $matches[1][$x], $matches[2][$x]);
+                       }
                }
        }
        $matches = false;
-       $cnt = preg_match_all('|\@\[url\=(.*?)\](.*?)\[\/url\]|',$item['tag'],$matches);
+       $cnt = preg_match_all('|\@\[url\=(.*?)\](.*?)\[\/url\]|', $item['tag'], $matches);
        if ($cnt) {
-               for($x = 0; $x < $cnt; $x ++) {
-                       if ($matches[1][$x])
-                               $ret[] = array('@',$matches[1][$x], $matches[2][$x]);
+               for ($x = 0; $x < $cnt; $x ++) {
+                       if ($matches[1][$x]) {
+                               $ret[] = array('@', $matches[1][$x], $matches[2][$x]);
+                       }
                }
        }
        return $ret;
@@ -1831,23 +1931,29 @@ function item_getfeedtags($item) {
 
 function item_expire($uid, $days, $network = "", $force = false) {
 
-       if ((! $uid) || ($days < 1))
+       if ((! $uid) || ($days < 1)) {
                return;
+       }
 
-       // $expire_network_only = save your own wall posts
-       // and just expire conversations started by others
-
-       $expire_network_only = get_pconfig($uid,'expire','network_only');
+       /*
+        * $expire_network_only = save your own wall posts
+        * and just expire conversations started by others
+        */
+       $expire_network_only = get_pconfig($uid,'expire', 'network_only');
        $sql_extra = ((intval($expire_network_only)) ? " AND wall = 0 " : "");
 
        if ($network != "") {
                $sql_extra .= sprintf(" AND network = '%s' ", dbesc($network));
-               // There is an index "uid_network_received" but not "uid_network_created"
-               // This avoids the creation of another index just for one purpose.
-               // And it doesn't really matter wether to look at "received" or "created"
+
+               /*
+                * There is an index "uid_network_received" but not "uid_network_created"
+                * This avoids the creation of another index just for one purpose.
+                * And it doesn't really matter wether to look at "received" or "created"
+                */
                $range = "AND `received` < UTC_TIMESTAMP() - INTERVAL %d DAY ";
-       } else
+       } else {
                $range = "AND `created` < UTC_TIMESTAMP() - INTERVAL %d DAY ";
+       }
 
        $r = q("SELECT `file`, `resource-id`, `starred`, `type`, `id` FROM `item`
                WHERE `uid` = %d $range
@@ -1858,61 +1964,66 @@ function item_expire($uid, $days, $network = "", $force = false) {
                intval($days)
        );
 
-       if (! dbm::is_result($r))
+       if (! dbm::is_result($r)) {
                return;
+       }
 
-       $expire_items = get_pconfig($uid, 'expire','items');
-       $expire_items = (($expire_items===false)?1:intval($expire_items)); // default if not set: 1
+       $expire_items = get_pconfig($uid, 'expire', 'items');
+       $expire_items = (($expire_items === false) ? 1 : intval($expire_items)); // default if not set: 1
 
        // Forcing expiring of items - but not notes and marked items
-       if ($force)
+       if ($force) {
                $expire_items = true;
+       }
 
-       $expire_notes = get_pconfig($uid, 'expire','notes');
-       $expire_notes = (($expire_notes===false)?1:intval($expire_notes)); // default if not set: 1
+       $expire_notes = get_pconfig($uid, 'expire', 'notes');
+       $expire_notes = (($expire_notes === false) ? 1 : intval($expire_notes)); // default if not set: 1
 
-       $expire_starred = get_pconfig($uid, 'expire','starred');
-       $expire_starred = (($expire_starred===false)?1:intval($expire_starred)); // default if not set: 1
+       $expire_starred = get_pconfig($uid, 'expire', 'starred');
+       $expire_starred = (($expire_starred === false) ? 1 : intval($expire_starred)); // default if not set: 1
 
-       $expire_photos = get_pconfig($uid, 'expire','photos');
-       $expire_photos = (($expire_photos===false)?0:intval($expire_photos)); // default if not set: 0
+       $expire_photos = get_pconfig($uid, 'expire', 'photos');
+       $expire_photos = (($expire_photos === false) ? 0 : intval($expire_photos)); // default if not set: 0
 
        logger('expire: # items=' . count($r). "; expire items: $expire_items, expire notes: $expire_notes, expire starred: $expire_starred, expire photos: $expire_photos");
 
-       foreach($r as $item) {
+       foreach ($r as $item) {
 
                // don't expire filed items
 
-               if (strpos($item['file'],'[') !== false)
+               if (strpos($item['file'],'[') !== false) {
                        continue;
+               }
 
                // Only expire posts, not photos and photo comments
 
-               if ($expire_photos==0 && strlen($item['resource-id']))
+               if ($expire_photos == 0 && strlen($item['resource-id'])) {
                        continue;
-               if ($expire_starred==0 && intval($item['starred']))
+               } elseif ($expire_starred == 0 && intval($item['starred'])) {
                        continue;
-               if ($expire_notes==0 && $item['type']=='note')
+               } elseif ($expire_notes == 0 && $item['type'] == 'note') {
                        continue;
-               if ($expire_items==0 && $item['type']!='note')
+               } elseif ($expire_items == 0 && $item['type'] != 'note') {
                        continue;
+               }
 
-               drop_item($item['id'],false);
+               drop_item($item['id'], false);
        }
 
-       proc_run(PRIORITY_HIGH,"include/notifier.php", "expire", $uid);
+       proc_run(PRIORITY_HIGH, "include/notifier.php", "expire", $uid);
 
 }
 
-
+/// @TODO type-hint is array
 function drop_items($items) {
        $uid = 0;
 
-       if (! local_user() && ! remote_user())
+       if (! local_user() && ! remote_user()) {
                return;
+       }
 
        if (count($items)) {
-               foreach($items as $item) {
+               foreach ($items as $item) {
                        $owner = drop_item($item,false);
                        if ($owner && ! $uid)
                                $uid = $owner;
@@ -1921,12 +2032,13 @@ function drop_items($items) {
 
        // multiple threads may have been deleted, send an expire notification
 
-       if ($uid)
-               proc_run(PRIORITY_HIGH,"include/notifier.php", "expire", $uid);
+       if ($uid) {
+               proc_run(PRIORITY_HIGH, "include/notifier.php", "expire", $uid);
+       }
 }
 
 
-function drop_item($id,$interactive = true) {
+function drop_item($id, $interactive = true) {
 
        $a = get_app();
 
@@ -1937,8 +2049,9 @@ function drop_item($id,$interactive = true) {
        );
 
        if (! dbm::is_result($r)) {
-               if (! $interactive)
+               if (! $interactive) {
                        return 0;
+               }
                notice( t('Item not found.') . EOL);
                goaway(App::get_baseurl() . '/' . $_SESSION['return_url']);
        }
@@ -1952,7 +2065,7 @@ function drop_item($id,$interactive = true) {
        // check if logged in user is either the author or owner of this item
 
        if (is_array($_SESSION['remote'])) {
-               foreach($_SESSION['remote'] as $visitor) {
+               foreach ($_SESSION['remote'] as $visitor) {
                        if ($visitor['uid'] == $item['uid'] && $visitor['cid'] == $item['contact-id']) {
                                $contact_id = $visitor['cid'];
                                break;
@@ -1969,7 +2082,7 @@ function drop_item($id,$interactive = true) {
                        // so add any arguments as hidden inputs
                        $query = explode_querystring($a->query_string);
                        $inputs = array();
-                       foreach($query['args'] as $arg) {
+                       foreach ($query['args'] as $arg) {
                                if (strpos($arg, 'confirm=') === false) {
                                        $arg_parts = explode('=', $arg);
                                        $inputs[] = array('name' => $arg_parts[0], 'value' => $arg_parts[1]);
@@ -2006,27 +2119,28 @@ function drop_item($id,$interactive = true) {
                // clean up categories and tags so they don't end up as orphans
 
                $matches = false;
-               $cnt = preg_match_all('/<(.*?)>/',$item['file'],$matches,PREG_SET_ORDER);
+               $cnt = preg_match_all('/<(.*?)>/', $item['file'], $matches, PREG_SET_ORDER);
                if ($cnt) {
-                       foreach($matches as $mtch) {
-                               file_tag_unsave_file($item['uid'],$item['id'],$mtch[1],true);
+                       foreach ($matches as $mtch) {
+                               file_tag_unsave_file($item['uid'], $item['id'], $mtch[1],true);
                        }
                }
 
                $matches = false;
 
-               $cnt = preg_match_all('/\[(.*?)\]/',$item['file'],$matches,PREG_SET_ORDER);
+               $cnt = preg_match_all('/\[(.*?)\]/', $item['file'], $matches, PREG_SET_ORDER);
                if ($cnt) {
-                       foreach($matches as $mtch) {
-                               file_tag_unsave_file($item['uid'],$item['id'],$mtch[1],false);
+                       foreach ($matches as $mtch) {
+                               file_tag_unsave_file($item['uid'], $item['id'], $mtch[1],false);
                        }
                }
 
-               // If item is a link to a photo resource, nuke all the associated photos
-               // (visitors will not have photo resources)
-               // This only applies to photos uploaded from the photos page. Photos inserted into a post do not
-               // generate a resource-id and therefore aren't intimately linked to the item.
-
+               /*
+                * If item is a link to a photo resource, nuke all the associated photos
+                * (visitors will not have photo resources)
+                * This only applies to photos uploaded from the photos page. Photos inserted into a post do not
+                * generate a resource-id and therefore aren't intimately linked to the item.
+                */
                if (strlen($item['resource-id'])) {
                        q("DELETE FROM `photo` WHERE `resource-id` = '%s' AND `uid` = %d ",
                                dbesc($item['resource-id']),
@@ -2036,7 +2150,6 @@ function drop_item($id,$interactive = true) {
                }
 
                // If item is a link to an event, nuke the event record.
-
                if (intval($item['event-id'])) {
                        q("DELETE FROM `event` WHERE `id` = %d AND `uid` = %d",
                                intval($item['event-id']),
@@ -2046,8 +2159,7 @@ function drop_item($id,$interactive = true) {
                }
 
                // If item has attachments, drop them
-
-               foreach(explode(",",$item['attach']) as $attach){
+               foreach (explode(", ", $item['attach']) as $attach) {
                        preg_match("|attach/(\d+)|", $attach, $matches);
                        q("DELETE FROM `attach` WHERE `id` = %d AND `uid` = %d",
                                intval($matches[1]),
@@ -2060,7 +2172,7 @@ function drop_item($id,$interactive = true) {
                // clean up item_id and sign meta-data tables
 
                /*
-               // Old code - caused very long queries and warning entries in the mysql logfiles:
+               /// @TODO Old code - caused very long queries and warning entries in the mysql logfiles:
 
                $r = q("DELETE FROM item_id where iid in (select id from item where parent = %d and uid = %d)",
                        intval($item['id']),
@@ -2076,29 +2188,28 @@ function drop_item($id,$interactive = true) {
                // The new code splits the queries since the mysql optimizer really has bad problems with subqueries
 
                // Creating list of parents
-               $r = q("select id from item where parent = %d and uid = %d",
+               $r = q("SELECT `id` FROM `item` WHERE `parent` = %d AND `uid` = %d",
                        intval($item['id']),
                        intval($item['uid'])
                );
 
                $parentid = "";
 
-               foreach ($r AS $row) {
-                       if ($parentid != "")
+               foreach ($r as $row) {
+                       if ($parentid != "") {
                                $parentid .= ", ";
+                       }
 
                        $parentid .= $row["id"];
                }
 
                // Now delete them
                if ($parentid != "") {
-                       $r = q("DELETE FROM item_id where iid in (%s)", dbesc($parentid));
-
-                       $r = q("DELETE FROM sign where iid in (%s)", dbesc($parentid));
+                       $r = q("DELETE FROM `item_id` WHERE `iid` IN (%s)", dbesc($parentid));
+                       $r = q("DELETE FROM `sign` WHERE `iid` IN (%s)", dbesc($parentid));
                }
 
                // If it's the parent of a comment thread, kill all the kids
-
                if ($item['uri'] == $item['parent-uri']) {
                        $r = q("UPDATE `item` SET `deleted` = 1, `edited` = '%s', `changed` = '%s', `body` = '' , `title` = ''
                                WHERE `parent-uri` = '%s' AND `uid` = %d ",
@@ -2134,15 +2245,17 @@ function drop_item($id,$interactive = true) {
 
                // send the notification upstream/downstream as the case may be
 
-               proc_run(PRIORITY_HIGH,"include/notifier.php", "drop", $drop_id);
+               proc_run(PRIORITY_HIGH, "include/notifier.php", "drop", $drop_id);
 
-               if (! $interactive)
+               if (! $interactive) {
                        return $owner;
+               }
                goaway(App::get_baseurl() . '/' . $_SESSION['return_url']);
                //NOTREACHED
        } else {
-               if (! $interactive)
+               if (! $interactive) {
                        return 0;
+               }
                notice( t('Permission denied.') . EOL);
                goaway(App::get_baseurl() . '/' . $_SESSION['return_url']);
                //NOTREACHED
@@ -2151,101 +2264,113 @@ function drop_item($id,$interactive = true) {
 }
 
 
-function first_post_date($uid,$wall = false) {
-       $r = q("select id, created from item
-               where uid = %d and wall = %d and deleted = 0 and visible = 1 AND moderated = 0
-               and id = parent
-               order by created asc limit 1",
+function first_post_date($uid, $wall = false) {
+       $r = q("SELECT `id`, `created` FROM `item`
+               WHERE `uid` = %d AND `wall` = %d AND `deleted` = 0 AND `visible` = 1 AND `moderated` = 0
+               AND `id` = `parent`
+               ORDER BY `created` ASC LIMIT 1",
                intval($uid),
                intval($wall ? 1 : 0)
        );
        if (dbm::is_result($r)) {
-//             logger('first_post_date: ' . $r[0]['id'] . ' ' . $r[0]['created'], LOGGER_DATA);
-               return substr(datetime_convert('',date_default_timezone_get(),$r[0]['created']),0,10);
+               // logger('first_post_date: ' . $r[0]['id'] . ' ' . $r[0]['created'], LOGGER_DATA);
+               return substr(datetime_convert('',date_default_timezone_get(), $r[0]['created']),0,10);
        }
        return false;
 }
 
 /* modified posted_dates() {below} to arrange the list in years */
 function list_post_dates($uid, $wall) {
-       $dnow = datetime_convert('',date_default_timezone_get(),'now','Y-m-d');
+       $dnow = datetime_convert('',date_default_timezone_get(), 'now','Y-m-d');
 
        $dthen = first_post_date($uid, $wall);
-       if (! $dthen)
+       if (! $dthen) {
                return array();
+       }
 
        // Set the start and end date to the beginning of the month
-       $dnow = substr($dnow,0,8).'01';
-       $dthen = substr($dthen,0,8).'01';
+       $dnow = substr($dnow, 0, 8) . '01';
+       $dthen = substr($dthen, 0, 8) . '01';
 
        $ret = array();
 
-       // Starting with the current month, get the first and last days of every
-       // month down to and including the month of the first post
-       while(substr($dnow, 0, 7) >= substr($dthen, 0, 7)) {
-               $dyear = intval(substr($dnow,0,4));
-               $dstart = substr($dnow,0,8) . '01';
-               $dend = substr($dnow,0,8) . get_dim(intval($dnow),intval(substr($dnow,5)));
-               $start_month = datetime_convert('','',$dstart,'Y-m-d');
-               $end_month = datetime_convert('','',$dend,'Y-m-d');
-               $str = day_translate(datetime_convert('','',$dnow,'F'));
-               if (! $ret[$dyear])
+       /*
+        * Starting with the current month, get the first and last days of every
+        * month down to and including the month of the first post
+        */
+       while (substr($dnow, 0, 7) >= substr($dthen, 0, 7)) {
+               $dyear = intval(substr($dnow, 0, 4));
+               $dstart = substr($dnow, 0, 8) . '01';
+               $dend = substr($dnow, 0, 8) . get_dim(intval($dnow), intval(substr($dnow, 5)));
+               $start_month = datetime_convert('', '', $dstart, 'Y-m-d');
+               $end_month = datetime_convert('', '', $dend, 'Y-m-d');
+               $str = day_translate(datetime_convert('', '', $dnow, 'F'));
+               if (!$ret[$dyear]) {
                        $ret[$dyear] = array();
-               $ret[$dyear][] = array($str,$end_month,$start_month);
-               $dnow = datetime_convert('','',$dnow . ' -1 month', 'Y-m-d');
+               }
+               $ret[$dyear][] = array($str, $end_month, $start_month);
+               $dnow = datetime_convert('', '', $dnow . ' -1 month', 'Y-m-d');
        }
        return $ret;
 }
 
-function posted_dates($uid,$wall) {
-       $dnow = datetime_convert('',date_default_timezone_get(),'now','Y-m-d');
+function posted_dates($uid, $wall) {
+       $dnow = datetime_convert('', date_default_timezone_get(), 'now', 'Y-m-d');
 
-       $dthen = first_post_date($uid,$wall);
-       if (! $dthen)
+       $dthen = first_post_date($uid, $wall);
+       if (! $dthen) {
                return array();
+       }
 
        // Set the start and end date to the beginning of the month
-       $dnow = substr($dnow,0,8).'01';
-       $dthen = substr($dthen,0,8).'01';
+       $dnow = substr($dnow, 0, 8) . '01';
+       $dthen = substr($dthen, 0, 8) . '01';
 
        $ret = array();
-       // Starting with the current month, get the first and last days of every
-       // month down to and including the month of the first post
-       while(substr($dnow, 0, 7) >= substr($dthen, 0, 7)) {
-               $dstart = substr($dnow,0,8) . '01';
-               $dend = substr($dnow,0,8) . get_dim(intval($dnow),intval(substr($dnow,5)));
-               $start_month = datetime_convert('','',$dstart,'Y-m-d');
-               $end_month = datetime_convert('','',$dend,'Y-m-d');
-               $str = day_translate(datetime_convert('','',$dnow,'F Y'));
-               $ret[] = array($str,$end_month,$start_month);
-               $dnow = datetime_convert('','',$dnow . ' -1 month', 'Y-m-d');
+       /*
+        * Starting with the current month, get the first and last days of every
+        * month down to and including the month of the first post
+        */
+       while (substr($dnow, 0, 7) >= substr($dthen, 0, 7)) {
+               $dstart = substr($dnow, 0, 8) . '01';
+               $dend = substr($dnow, 0, 8) . get_dim(intval($dnow), intval(substr($dnow, 5)));
+               $start_month = datetime_convert('', '', $dstart, 'Y-m-d');
+               $end_month = datetime_convert('', '', $dend, 'Y-m-d');
+               $str = day_translate(datetime_convert('', '', $dnow, 'F Y'));
+               $ret[] = array($str, $end_month, $start_month);
+               $dnow = datetime_convert('', '', $dnow . ' -1 month', 'Y-m-d');
        }
        return $ret;
 }
 
 
-function posted_date_widget($url,$uid,$wall) {
+function posted_date_widget($url, $uid, $wall) {
        $o = '';
 
-       if (! feature_enabled($uid,'archives'))
+       if (! feature_enabled($uid, 'archives')) {
                return $o;
+       }
 
        // For former Facebook folks that left because of "timeline"
-
-/*     if ($wall && intval(get_pconfig($uid,'system','no_wall_archive_widget')))
-               return $o;*/
+       /*
+        * @TODO old-lost code?
+       if ($wall && intval(get_pconfig($uid, 'system', 'no_wall_archive_widget')))
+               return $o;
+       */
 
        $visible_years = get_pconfig($uid,'system','archive_visible_years');
-       if (! $visible_years)
+       if (! $visible_years) {
                $visible_years = 5;
+       }
 
-       $ret = list_post_dates($uid,$wall);
+       $ret = list_post_dates($uid, $wall);
 
-       if (! dbm::is_result($ret))
+       if (! dbm::is_result($ret)) {
                return $o;
+       }
 
-       $cutoff_year = intval(datetime_convert('',date_default_timezone_get(),'now','Y')) - $visible_years;
-       $cutoff = ((array_key_exists($cutoff_year,$ret))? true : false);
+       $cutoff_year = intval(datetime_convert('',date_default_timezone_get(), 'now', 'Y')) - $visible_years;
+       $cutoff = ((array_key_exists($cutoff_year, $ret))? true : false);
 
        $o = replace_macros(get_markup_template('posted_date_widget.tpl'),array(
                '$title' => t('Archives'),
index e3d7d10d6b2a7595e76143eaf60ae4cf4b6e78d3..370611b4eb438aaf69509aee01622e80d15436a9 100644 (file)
@@ -516,7 +516,8 @@ function notifier_run(&$argv, &$argc){
                                $r0 = Diaspora::relay_list();
                        }
 
-                       $r1 = q("SELECT DISTINCT(`batch`), `id`, `name`,`network` FROM `contact` WHERE `network` = '%s'
+                       $r1 = q("SELECT `batch`, ANY_VALUE(`id`) AS `id`, ANY_VALUE(`name`) AS `name`, ANY_VALUE(`network`) AS `network`
+                               FROM `contact` WHERE `network` = '%s'
                                AND `uid` = %d AND `rel` != %d AND NOT `blocked` AND NOT `pending` AND NOT `archive` GROUP BY `batch` ORDER BY rand()",
                                dbesc(NETWORK_DIASPORA),
                                intval($owner['uid']),
index 3b5ca3f813fb47fc620aac9583778a11a01c203f..c1d730eb130c4980c263a302ddc231a020636679 100644 (file)
@@ -720,11 +720,11 @@ class ostatus {
                        $conversations = q("SELECT `term`.`oid`, `term`.`url`, `term`.`uid` FROM `term`
                                                STRAIGHT_JOIN `thread` ON `thread`.`iid` = `term`.`oid` AND `thread`.`uid` = `term`.`uid`
                                                WHERE `term`.`type` = 7 AND `term`.`term` > '%s' AND `thread`.`mention`
-                                               GROUP BY `term`.`url`, `term`.`uid` ORDER BY `term`.`term` DESC", dbesc($start));
+                                               GROUP BY `term`.`url`, `term`.`uid`, `term`.`oid`, `term`.`term` ORDER BY `term`.`term` DESC", dbesc($start));
                } else {
                        $conversations = q("SELECT `oid`, `url`, `uid` FROM `term`
                                                WHERE `type` = 7 AND `term` > '%s'
-                                               GROUP BY `url`, `uid` ORDER BY `term` DESC", dbesc($start));
+                                               GROUP BY `url`, `uid`, `oid`, `term` ORDER BY `term` DESC", dbesc($start));
                }
 
                foreach ($conversations AS $conversation) {
index 335869eda2104ff69a6cd6cbdebab9314ac8038e..b42dcec119c76ca02af9e738627df22e2db60fb4 100644 (file)
@@ -44,7 +44,7 @@ function get_browser_language() {
        // check if we have translations for the preferred languages and pick the 1st that has
        for ($i=0; $i<count($lang_list); $i++) {
                $lang = $lang_list[$i];
-               if(file_exists("view/lang/$lang") && is_dir("view/lang/$lang")) {
+               if ($lang === 'en' || (file_exists("view/lang/$lang") && is_dir("view/lang/$lang"))) {
                        $preferred = $lang;
                        break;
                }
index 376be05c8f3ebe5b5b6bf55a1e5be4c921db2c84..e872532a481ae78dd882f5532c6fb36a8fb77c6f 100644 (file)
@@ -48,7 +48,7 @@ function photo_albums($uid, $update = false) {
                if (!Config::get('system', 'no_count', false)) {
                        /// @todo This query needs to be renewed. It is really slow
                        // At this time we just store the data in the cache
-                       $albums = qu("SELECT COUNT(DISTINCT `resource-id`) AS `total`, `album`
+                       $albums = qu("SELECT COUNT(DISTINCT `resource-id`) AS `total`, `album`, ANY_VALUE(`created`) AS `created`
                                FROM `photo`
                                WHERE `uid` = %d  AND `album` != '%s' AND `album` != '%s' $sql_extra
                                GROUP BY `album` ORDER BY `created` DESC",
index 66533e1511c70cae485bdd75e94fdcb90f6a0c4d..a39eca5e86fe9ec39628a60b04cccb255ccec7b4 100644 (file)
@@ -7,6 +7,8 @@
  * @todo Detect if it is a forum
  */
 
+use \Friendica\Core\Config;
+
 require_once('include/datetime.php');
 require_once("include/Scrape.php");
 require_once("include/network.php");
@@ -1656,6 +1658,20 @@ function poco_discover_federation() {
                }
        }
 
+       // Disvover Mastodon servers
+       if (!Config::get('system','ostatus_disabled')) {
+               $serverdata = fetch_url("https://instances.mastodon.xyz/instances.json");
+
+               if ($serverdata) {
+                       $servers = json_decode($serverdata);
+
+                       foreach ($servers AS $server) {
+                               $url = (is_null($server->https_score) ? 'http' : 'https').'://'.$server->name;
+                               proc_run(PRIORITY_LOW, "include/discover_poco.php", "server", base64_encode($url));
+                       }
+               }
+       }
+
        // Currently disabled, since the service isn't available anymore.
        // It is not removed since I hope that there will be a successor.
        // Discover GNU Social Servers.
index 4924ac12895b9273b8a62123e4da71a5b56067f1..054f5096026f96b222bcd9134807b1e8d0d67650 100644 (file)
--- a/js/acl.js
+++ b/js/acl.js
@@ -65,7 +65,7 @@ ACL.prototype.add_mention = function(id) {
        if (this.element.val().indexOf( searchText) >= 0 ) {
                return;
        }
-       this.element.val(searchText + this.element.val());
+       this.element.val(searchText + this.element.val()).trigger('change');
 }
 
 ACL.prototype.on_submit = function(){
index 8702abbcf92e3b23b3522a2655a827eb6bd2d3bd..3ed9fa30f9f2b23ae3007dda2348b0c9bb963abd 100644 (file)
@@ -166,7 +166,7 @@ function listNewLineAutocomplete(id) {
        if (word != null) {
                var textBefore = text.value.substring(0, caretPos);
                var textAfter  = text.value.substring(caretPos, text.length);
-               $('#' + id).val(textBefore + '\r\n[*] ' + textAfter);
+               $('#' + id).val(textBefore + '\r\n[*] ' + textAfter).trigger('change');
                setCaretPosition(text, caretPos + 5);
                return true;
        }
index c85aab4a2786ec74446a00b3695c106f7f424d2f..5df33ed590c8f0000286cf86144c3c10697b89a7 100644 (file)
                        var start = textarea.selectionStart;
                        var end = textarea.selectionEnd;
                        textarea.value = textarea.value.substring(0, start) + bbcode + textarea.value.substring(end, textarea.value.length);
+                       $(textarea).trigger('change');
                });
 
 
index 2652b33c12bc90ec36d73add8aaa14d361e862f9..c57e7f3545d510bf0b6eccf73207491a7df51a1c 100644 (file)
@@ -290,7 +290,8 @@ function admin_page_federation(App $a) {
        foreach ($platforms as $p) {
                // get a total count for the platform, the name and version of the
                // highest version and the protocol tpe
-               $c = qu('SELECT COUNT(*) AS `total`, `platform`, `network`, `version` FROM `gserver`
+               $c = qu('SELECT COUNT(*) AS `total`, ANY_VALUE(`platform`) AS `platform`,
+                               ANY_VALUE(`network`) AS `network`, MAX(`version`) AS `version` FROM `gserver`
                                WHERE `platform` LIKE "%s" AND `last_contact` >= `last_failure`
                                ORDER BY `version` ASC;', $p);
                $total = $total + $c[0]['total'];
@@ -652,7 +653,6 @@ function admin_page_site_post(App $a) {
        $force_ssl              =       ((x($_POST,'force_ssl'))                ? True                                          : False);
        $hide_help              =       ((x($_POST,'hide_help'))                ? True                                          : False);
        $suppress_tags          =       ((x($_POST,'suppress_tags'))            ? True                                          : False);
-       $use_fulltext_engine    =       ((x($_POST,'use_fulltext_engine'))      ? True                                          : False);
        $itemcache              =       ((x($_POST,'itemcache'))                ? notags(trim($_POST['itemcache']))             : '');
        $itemcache_duration     =       ((x($_POST,'itemcache_duration'))       ? intval($_POST['itemcache_duration'])          : 0);
        $max_comments           =       ((x($_POST,'max_comments'))             ? intval($_POST['max_comments'])                : 0);
@@ -667,6 +667,12 @@ function admin_page_site_post(App $a) {
        $worker_fastlane        =       ((x($_POST,'worker_fastlane'))          ? True                                          : False);
        $worker_frontend        =       ((x($_POST,'worker_frontend'))          ? True                                          : False);
 
+       // Has the directory url changed? If yes, then resubmit the existing profiles there
+       if ($global_directory != Config::get('system', 'directory') AND ($global_directory != '')) {
+               Config::set('system', 'directory', $global_directory);
+               proc_run(PRIORITY_LOW, 'include/directory.php');
+       }
+
        if ($a->get_path() != "") {
                $diaspora_enabled = false;
        }
@@ -770,7 +776,6 @@ function admin_page_site_post(App $a) {
        set_config('system', 'allowed_email', $allowed_email);
        set_config('system', 'block_public', $block_public);
        set_config('system', 'publish_all', $force_publish);
-       set_config('system', 'directory', $global_directory);
        set_config('system', 'thread_allow', $thread_allow);
        set_config('system', 'newuser_private', $newuser_private);
        set_config('system', 'enotify_no_content', $enotify_no_content);
@@ -796,7 +801,6 @@ function admin_page_site_post(App $a) {
 
        set_config('system', 'force_ssl', $force_ssl);
        set_config('system', 'hide_help', $hide_help);
-       set_config('system', 'use_fulltext_engine', $use_fulltext_engine);
        set_config('system', 'itemcache', $itemcache);
        set_config('system', 'itemcache_duration', $itemcache_duration);
        set_config('system', 'max_comments', $max_comments);
@@ -1025,7 +1029,6 @@ function admin_page_site(App $a) {
 
                '$nodeinfo'             => array('nodeinfo', t("Publish server information"), get_config('system','nodeinfo'), t("If enabled, general server and usage data will be published. The data contains the name and version of the server, number of users with public profiles, number of posts and the activated protocols and connectors. See <a href='http://the-federation.info/'>the-federation.info</a> for details.")),
 
-               '$use_fulltext_engine'  => array('use_fulltext_engine', t("Use MySQL full text engine"), get_config('system','use_fulltext_engine'), t("Activates the full text engine. Speeds up search - but can only search for four and more characters.")),
                '$suppress_tags'        => array('suppress_tags', t("Suppress Tags"), get_config('system','suppress_tags'), t("Suppress showing a list of hashtags at the end of the posting.")),
                '$itemcache'            => array('itemcache', t("Path to item cache"), get_config('system','itemcache'), t("The item caches buffers generated bbcode and external images.")),
                '$itemcache_duration'   => array('itemcache_duration', t("Cache duration in seconds"), get_config('system','itemcache_duration'), t("How long should the cache files be hold? Default value is 86400 seconds (One day). To disable the item cache, set the value to -1.")),
index ec749db2088fbcfa1816185a0e198debd679e086..65b03f2b9470f96163c9f3b67cc819548df0a092 100644 (file)
@@ -75,7 +75,7 @@ function hovercard_content() {
                'tags' => $contact["keywords"],
 //             'nsfw' => intval($contact["nsfw"]),
 //             'server_url' => $contact["server_url"],
-               'bd' => (($contact["birthday"] == "0000-00-00") ? "" : $contact["birthday"]),
+               'bd' => (($contact["birthday"] <= '0001-01-01') ? "" : $contact["birthday"]),
 //             'generation' => $contact["generation"],
                'account_type' => account_type($contact),
                'actions' => $actions,
index fbd296a9da565b5b09f45a1349ae2ee12dfa2af6..8854723b767adb46985200c077fcf16f2d189e84 100755 (executable)
@@ -48,7 +48,7 @@ function install_post(App $a) {
                                $db = new dba($dbhost, $dbuser, $dbpass, '', true);
 
                                if(! get_db_errno()) {
-                                       $r = q("CREATE DATABASE '%s'",
+                                       $r = q("CREATE DATABASE '%s' DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci",
                                                        dbesc($dbdata)
                                        );
                                        if ($r) {
index 9e966914668e40d760be76c3ac0e2f9e950e8fdd..beaa7b1df666af66b426d01f821f0b790f7765d8 100644 (file)
@@ -349,7 +349,7 @@ function message_content(App $a) {
 
                $o .= $header;
 
-               $r = q("SELECT count(*) AS `total` FROM `mail`
+               $r = q("SELECT count(*) AS `total` FROM `mail`, ANY_VALUE(`created`) AS `created`
                        WHERE `mail`.`uid` = %d GROUP BY `parent-uri` ORDER BY `created` DESC",
                        intval(local_user())
                );
@@ -528,12 +528,20 @@ function message_content(App $a) {
 }
 
 function get_messages($user, $lstart, $lend) {
-
+       //TODO: rewritte with a sub-query to get the first message of each private thread with certainty
        return q("SELECT max(`mail`.`created`) AS `mailcreated`, min(`mail`.`seen`) AS `mailseen`,
-               `mail`.* , `contact`.`name`, `contact`.`url`, `contact`.`thumb` , `contact`.`network`,
-               count( * ) as count
+               ANY_VALUE(`mail`.`id`) AS `id`, ANY_VALUE(`mail`.`uid`) AS `uid`, ANY_VALUE(`mail`.`guid`) AS `guid`,
+               ANY_VALUE(`mail`.`from-name`) AS `from-name`, ANY_VALUE(`mail`.`from-photo`) AS `from-photo`,
+               ANY_VALUE(`mail`.`from-url`) AS `from-url`, ANY_VALUE(`mail`.`contact-id`) AS `contact-id`,
+               ANY_VALUE(`mail`.`convid`) AS `convid`, ANY_VALUE(`mail`.`title`) AS `title`, ANY_VALUE(`mail`.`body`) AS `body`,
+               ANY_VALUE(`mail`.`seen`) AS `seen`, ANY_VALUE(`mail`.`reply`) AS `reply`, ANY_VALUE(`mail`.`replied`) AS `replied`,
+               ANY_VALUE(`mail`.`unknown`) AS `unknown`, ANY_VALUE(`mail`.`uri`) AS `uri`,
+               `mail`.`parent-uri`,
+               ANY_VALUE(`mail`.`created`) AS `created`, ANY_VALUE(`contact`.`name`) AS `name`, ANY_VALUE(`contact`.`url`) AS `url`,
+               ANY_VALUE(`contact`.`thumb`) AS `thumb`, ANY_VALUE(`contact`.`network`) AS `network`,
+               count( * ) as `count`
                FROM `mail` LEFT JOIN `contact` ON `mail`.`contact-id` = `contact`.`id`
-               WHERE `mail`.`uid` = %d GROUP BY `parent-uri` ORDER BY `mailcreated` DESC  LIMIT %d , %d ",
+               WHERE `mail`.`uid` = %d GROUP BY `parent-uri` ORDER BY `mailcreated` DESC LIMIT %d , %d ",
                intval($user), intval($lstart), intval($lend)
        );
 }
index 5e94429b5c8a5b35d3997df62c9edaf99cefebc1..db4bb91309d84b874850432c7461104c74ba62b6 100644 (file)
@@ -581,11 +581,7 @@ function network_content(App $a, $update = 0) {
                        $sql_order = "`item`.`id`";
                        $order_mode = "id";
                } else {
-                       // Disabled until final decision what to do with this
-                       //if (get_config('system','use_fulltext_engine'))
-                       //      $sql_extra = sprintf(" AND MATCH (`item`.`body`, `item`.`title`) AGAINST ('%s' in boolean mode) ", dbesc(protect_sprintf($search)));
-                       //else
-                               $sql_extra = sprintf(" AND `item`.`body` REGEXP '%s' ", dbesc(protect_sprintf(preg_quote($search))));
+                       $sql_extra = sprintf(" AND `item`.`body` REGEXP '%s' ", dbesc(protect_sprintf(preg_quote($search))));
                        $sql_order = "`item`.`id`";
                        $order_mode = "id";
                }
index 0c08b66ce0459d9b83fbb8bea5a3b760221f79ad..bab5fd6274e4ed2c5e47cb849f1195747377beea 100644 (file)
@@ -292,7 +292,7 @@ function notifications_content(App $a) {
                                '$item_link' => $it['link'],
                                '$item_image' => $it['image'],
                                '$item_url' => $it['url'],
-                               '$item_text' => htmlentities($it['text']),
+                               '$item_text' => $it['text'],
                                '$item_when' => $it['when'],
                                '$item_ago' => $it['ago'],
                                '$item_seen' => $it['seen'],
index 3acd39b2af6311f144a1af9fc86a44b13cdaa556..8e4782977437448d6f25a1673e7f02a03b8811d2 100644 (file)
@@ -1240,7 +1240,9 @@ function photos_content(App $a) {
                        $order = 'DESC';
                }
 
-               $r = q("SELECT `resource-id`, `id`, `filename`, type, max(`scale`) AS `scale`, `desc` FROM `photo` WHERE `uid` = %d AND `album` = '%s'
+               $r = q("SELECT `resource-id`, ANY_VALUE(`id`) AS `id`, ANY_VALUE(`filename`) AS `filename`,
+                       ANY_VALUE(`type`) AS `type`, max(`scale`) AS `scale`, ANY_VALUE(`desc`) as `desc`
+                       FROM `photo` WHERE `uid` = %d AND `album` = '%s'
                        AND `scale` <= 4 $sql_extra GROUP BY `resource-id` ORDER BY `created` $order LIMIT %d , %d",
                        intval($owner_uid),
                        dbesc($album),
index b5330c7b330bcfebdf64c51446432ebfb1baf8b5..ba496a70bd87bdbbe7d00f6431077c8be192eabe 100644 (file)
@@ -199,7 +199,7 @@ function ping_init(App $a)
                $cachekey = "ping_init:".local_user();
                $ev = Cache::get($cachekey);
                if (is_null($ev)) {
-                       $ev = qu("SELECT count(`event`.`id`) AS total, type, start, adjust FROM `event`
+                       $ev = qu("SELECT type, start, adjust FROM `event`
                                WHERE `event`.`uid` = %d AND `start` < '%s' AND `finish` > '%s' and `ignore` = 0
                                ORDER BY `start` ASC ",
                                intval(local_user()),
@@ -212,7 +212,7 @@ function ping_init(App $a)
                }
 
                if (dbm::is_result($ev)) {
-                       $all_events = intval($ev[0]['total']);
+                       $all_events = count($ev);
 
                        if ($all_events) {
                                $str_now = datetime_convert('UTC', $a->timezone, 'now', 'Y-m-d');
index fbce509d29634e4f6a2402b1636c8360190366fc..a83cb076f26b883a04504be31e9a5974e95ed64d 100644 (file)
@@ -210,7 +210,7 @@ function profile_content(App $a, $update = 0) {
 
        if ($update) {
 
-               $r = q("SELECT distinct(parent) AS `item_id`, `item`.`network` AS `item_network`
+               $r = q("SELECT distinct(parent) AS `item_id`, `item`.`network` AS `item_network`, `item`.`created`
                        FROM `item` INNER JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
                        AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
                        WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND
index 2b8d812c18da19c30400f769540db3478a501064..bd57f106d72c451409324c920ba05c9df0e1a9d0 100644 (file)
@@ -193,7 +193,7 @@ function profiles_post(App $a) {
                        return;
                }
 
-               $dob = $_POST['dob'] ? escape_tags(trim($_POST['dob'])) : '0000-00-00'; // FIXME: Needs to be validated?
+               $dob = $_POST['dob'] ? escape_tags(trim($_POST['dob'])) : '0001-01-01'; // FIXME: Needs to be validated?
 
                $y = substr($dob, 0, 4);
                if ((! ctype_digit($y)) || ($y < 1900)) {
@@ -201,15 +201,15 @@ function profiles_post(App $a) {
                } else {
                        $ignore_year = false;
                }
-               if ($dob != '0000-00-00') {
-                       if (strpos($dob, '0000-') === 0) {
+               if (!in_array($dob, array('0000-00-00', '0001-01-01'))) {
+                       if (strpos($dob, '0000-') === 0 || strpos($dob, '0001-') === 0) {
                                $ignore_year = true;
                                $dob = substr($dob, 5);
                        }
                        $dob = datetime_convert('UTC', 'UTC', (($ignore_year) ? '1900-' . $dob : $dob), (($ignore_year) ? 'm-d' : 'Y-m-d'));
 
                        if ($ignore_year) {
-                               $dob = '0000-' . $dob;
+                               $dob = '0001-' . $dob;
                        }
                }
 
index 7d588aa4d15693c12b16dad0bf61006d697223fb..a804ca32e0b2e80603a1c5a01ab08c050ae9806a 100644 (file)
@@ -203,18 +203,13 @@ function search_content(App $a) {
        } else {
                logger("Start fulltext search for '".$search."'", LOGGER_DEBUG);
 
-               // Disabled until finally is decided how to proceed with this
-               //if (get_config('system','use_fulltext_engine')) {
-               //      $sql_extra = sprintf(" AND MATCH (`item`.`body`, `item`.`title`) AGAINST ('%s' in boolean mode) ", dbesc(protect_sprintf($search)));
-               //} else {
-                       $sql_extra = sprintf(" AND `item`.`body` REGEXP '%s' ", dbesc(protect_sprintf(preg_quote($search))));
-               //}
+               $sql_extra = sprintf(" AND `item`.`body` REGEXP '%s' ", dbesc(protect_sprintf(preg_quote($search))));
 
                $r = q("SELECT %s
                        FROM `item` %s
                        WHERE %s AND (`item`.`uid` = 0 OR (`item`.`uid` = %s AND NOT `item`.`global`))
                                $sql_extra
-                       GROUP BY `item`.`uri` ORDER BY `item`.`id` DESC LIMIT %d , %d",
+                       GROUP BY `item`.`uri`, `item`.`id` ORDER BY `item`.`id` DESC LIMIT %d , %d",
                                item_fieldlists(), item_joins(), item_condition(),
                                intval(local_user()),
                                intval($a->pager['start']), intval($a->pager['itemspage']));
index 3828b8f1fefb649df1a5973261639dac46636b10..269d537854c5467f4fbb9ceef166a15017735168 100644 (file)
@@ -356,7 +356,9 @@ function videos_content(App $a) {
                $a->set_pager_itemspage(20);
        }
 
-       $r = q("SELECT hash, `id`, `filename`, filetype FROM `attach`
+       $r = q("SELECT hash, ANY_VALUE(`id`) AS `id`, ANY_VALUE(`created`) AS `created`,
+               ANY_VALUE(`filename`) AS `filename`, ANY_VALUE(`filetype`) as `filetype`
+               FROM `attach`
                WHERE `uid` = %d AND filetype LIKE '%%video%%'
                $sql_extra GROUP BY hash ORDER BY `created` DESC LIMIT %d , %d",
                intval($a->data['user']['uid']),
index f1117e9b7733c6cd4a49f8b00646715cdf5533bc..ea0c57535349b902995ff7f186d93db9b8d6e9b6 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-define('UPDATE_VERSION' , 1218);
+define('UPDATE_VERSION' , 1219);
 
 /**
  *
index 6b7f0b862ef959ba8592e718d06dcb3f9c8ac0ba..39db0d73c42e0cfea95323a0049dfd723f8b38ad 100644 (file)
@@ -100,7 +100,7 @@ sudo ln -fs /vagrant /var/www
 cp /vagrant/util/htconfig.vagrant.php /vagrant/.htconfig.php
 
 # create the friendica database
-echo "create database friendica" | mysql -u root -proot
+echo "create database friendica DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci" | mysql -u root -proot
 # import test database
 $MYSQL -uroot -proot friendica < /vagrant/friendica_test_data.sql
 
index 86efb26a22da73f4cef1adb0ca6828b383f31996..196bc479b5c5e330c9c4527d07589f195875c88b 100644 (file)
        <div class="submit"><input type="submit" name="page_site" value="{{$submit|escape:'html'}}" /></div>
 
        <h3>{{$performance}}</h3>
-       <!-- {{include file="field_checkbox.tpl" field=$use_fulltext_engine}} -->
        {{include file="field_checkbox.tpl" field=$only_tag_search}}
        {{include file="field_input.tpl" field=$itemcache}}
        {{include file="field_input.tpl" field=$itemcache_duration}}
index f8a6bc1c90f4cdc500cbc8ddc856bb9c9e2904e1..03a70986becb7eb64a4121fd26e946edf85f5803 100644 (file)
@@ -15,7 +15,7 @@ $db_user = '{{$dbuser}}';
 $db_pass = '{{$dbpass}}';
 $db_data = '{{$dbdata}}';
 
-// Set the database connection charset to UTF8.
+// Set the database connection charset to full Unicode (utf8mb4).
 // Changing this value will likely corrupt the special characters.
 // You have been warned.
 $a->config['system']['db_charset'] = "utf8mb4";
diff --git a/view/theme/frio/img/dynamic.php b/view/theme/frio/img/dynamic.php
deleted file mode 100644 (file)
index 591ea9e..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-<?php return array (
-  'components' => 
-  array (
-    'db' => 
-    array (
-      'class' => 'yii\\db\\Connection',
-      'dsn' => 'mysql:host=127.0.0.1;dbname=installer',
-      'username' => 'root',
-      'password' => 'root',
-      'charset' => 'utf8',
-    ),
-    'user' => 
-    array (
-    ),
-    'mailer' => 
-    array (
-      'transport' => 
-      array (
-        'class' => 'Swift_MailTransport',
-      ),
-    ),
-    'view' => 
-    array (
-      'theme' => 
-      array (
-        'name' => 'HumHub',
-      ),
-    ),
-    'formatter' => 
-    array (
-      'defaultTimeZone' => 'Europe/Berlin',
-    ),
-    'formatterApp' => 
-    array (
-      'defaultTimeZone' => 'Europe/Berlin',
-      'timeZone' => 'Europe/Berlin',
-    ),
-  ),
-  'params' => 
-  array (
-    'installer' => 
-    array (
-      'db' => 
-      array (
-        'installer_hostname' => '127.0.0.1',
-        'installer_database' => 'installer',
-      ),
-    ),
-    'config_created_at' => 1440430541,
-    'installed' => true,
-  ),
-  'name' => 'Installer',
-  'language' => 'de',
-  'timeZone' => 'Europe/Berlin',
-); ?>
\ No newline at end of file
index d212ee0038ee7d2d35e065ba0c9a0be0a024e47b..8794658dd6911ff8ac74ecc755f4eab9c79a0183 100644 (file)
@@ -30,6 +30,8 @@ function insertFormatting(BBcode,id) {
                }
        }
 
+       $(textarea).trigger('change');
+
        return true;
 }
 
index 4e32f9128c496ff3dc94cb72036e2256bd6d0ca4..b46599eddf11b85464ffb7c3215b66aa406627ad 100644 (file)
@@ -275,7 +275,46 @@ $(document).ready(function(){
 
        });
 
+       /*
+        * This event handler hides all comment UI when the user clicks anywhere on the page
+        * It ensures that we aren't closing the current comment box
+        *
+        * We are making an exception for buttons because of a race condition with the
+        * comment opening button that results in an already closed comment UI.
+        */
+       $(document).on('click', function(event) {
+               if (event.target.type === 'button') {
+                       return true;
+               }
+
+               var $dontclosethis = $(event.target).closest('.wall-item-comment-wrapper').find('.comment-edit-form');
+               $('.wall-item-comment-wrapper .comment-edit-submit-wrapper:visible').each(function() {
+                       var $parent = $(this).parent('.comment-edit-form');
+                       var itemId = $parent.data('itemId');
+
+                       if ($dontclosethis[0] != $parent[0]) {
+                               var textarea = $parent.find('textarea').get(0)
 
+                               commentCloseUI(textarea, itemId);
+                       }
+               });
+       });
+
+       // Customize some elements when the app is used in standalone mode on Android
+       if (window.matchMedia('(display-mode: standalone)').matches) {
+               // Open links to source outside of the webview
+               $('body').on('click', '.plink', function (e) {
+                       $(e.target).attr('target', '_blank');
+               });
+       }
+
+       /*
+        * This event listeners ensures that the textarea size is updated event if the
+        * value is changed externally (textcomplete, insertFormatting, fbrowser...)
+        */
+       $(document).on('change', 'textarea', function(event) {
+               autosize.update(event.target);
+       });
 });
 
 function openClose(theID) {
index 87ccf3dc1a85114da47094bf9c7066cced5f36e7..c56f63d9e33fcba28ae2c4342d40616b9956472b 100644 (file)
                        if(x($page,'htmlhead')) echo $page['htmlhead'];
                }
        ?>
+       <?php
+               // Add the theme color meta
+               // It makes mobile Chrome UI match Frio's top bar color.
+               $uid = $a->profile_uid;
+               if (is_null($uid)) {
+                       $uid = get_theme_uid();
+               }
+               $schema = get_pconfig($uid, 'frio', 'schema');
+               if (($schema) && ($schema != '---')) {
+                       if (file_exists('view/theme/frio/schema/'.$schema.'.php')) {
+                               $schemefile = 'view/theme/frio/schema/'.$schema.'.php';
+                               require_once($schemefile);
+                       }
+               } else {
+                       $nav_bg = get_pconfig($uid, 'frio', 'nav_bg');
+               }
+               if (!$nav_bg) {
+                       $nav_bg = "#708fa0";
+               }
+               echo '<meta name="theme-color" content="'.$nav_bg.'" />';
+       ?>
+
 </head>
 <?php
 if(($_SERVER['REQUEST_URI'] != "/register") && ($_SERVER['REQUEST_URI'] != "/lostpass") && ($_SERVER['REQUEST_URI'] != "/login"))
index 8ce7805bbd4785ac0b19b6b4d7163c44a1f74945..168576b3d4ca4c4d8345fbd16b6a95810c183326 100644 (file)
@@ -4,7 +4,7 @@
 {{else}}
 <div class="comment-wwedit-wrapper" id="comment-edit-wrapper-{{$id}}" style="display: block;">
 {{/if}}
-       <form class="comment-edit-form" style="display: block;" id="comment-edit-form-{{$id}}" action="item" method="post" onsubmit="post_comment({{$id}}); return false;">
+       <form class="comment-edit-form" style="display: block;" data-item-id="{{$id}}" id="comment-edit-form-{{$id}}" action="item" method="post" onsubmit="post_comment({{$id}}); return false;">
                <input type="hidden" name="type" value="{{$type}}" />
                <input type="hidden" name="profile_uid" value="{{$profile_uid}}" />
                <input type="hidden" name="parent" value="{{$parent}}" />
@@ -14,7 +14,7 @@
                <input type="hidden" name="post_id_random" value="{{$rand_num}}" />
 
                <div class="bb form-group">
-                       <textarea id="comment-edit-text-{{$id}}" class="comment-edit-text-empty form-control text-autosize" name="body" placeholder="{{$comment}}" onFocus="commentOpenUI(this,{{$id}});" onBlur="commentCloseUI(this,{{$id}});"></textarea>
+                       <textarea id="comment-edit-text-{{$id}}" class="comment-edit-text-empty form-control text-autosize" name="body" placeholder="{{$comment}}" onFocus="commentOpenUI(this,{{$id}});"></textarea>
                </div>
                {{if $qcomment}}
                        <select id="qcomment-select-{{$id}}" name="qcomment-{{$id}}" class="qcomment" onchange="qCommentInsert(this,{{$id}});">
index 535242a3ecba1d35faee5b90dea9af71afcbf387..ab0b6af7375d4d3a3fd296b7ec9f1b413d13f231 100644 (file)
@@ -65,7 +65,6 @@
        {{include file="field_input.tpl" field=$basepath}}
 
        <h3>{{$performance}}</h3>
-       {{include file="field_checkbox.tpl" field=$use_fulltext_engine}}
        {{include file="field_input.tpl" field=$itemcache}}
        {{include file="field_input.tpl" field=$itemcache_duration}}