diff --git a/.gitattributes b/.gitattributes index 4be1c9185..18ba9e075 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,2 @@ -# Disable LF normalization for all files -* -text \ No newline at end of file +# Disable LF normalization for all files +* -text diff --git a/.gitignore b/.gitignore index 9e6504184..de0fbc3d7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,61 +1,65 @@ -favicon.* -.htconfig.php -.htpreconfig.php -\#* -include/jquery-1.4.2.min.js -*.log -*.out -*.version* -favicon.* -home.html -addon -*.orig -*~ -robots.txt - -#ignore documentation, it should be newly built -doc/html - -#ignore reports, should be generted with every build -report/ - -#ignore config files from eclipse, we don't want IDE files in our repository -.project -.buildpath -.externalToolBuilders -.settings -#ignore OSX .DS_Store files -.DS_Store - -/nbproject/private/ - -#ignore smarty cache -/view/smarty3/compiled/ - -#ignore cache folders -/privacy_image_cache/ -/photo/ -/proxy/ -nbproject - -#ignore vagrant dir -.vagrant/ - -#ignore local folder -/local/ - -#ignore config files from Visual Studio -/.vs/ -/php_friendica.phpproj -/php_friendica.sln -/php_friendica.phpproj.user - -#ignore things from transifex-client -venv/ - -#ignore Composer dependencies -/vendor -/view/asset - -#ignore config files from JetBrains -/.idea +favicon.* +.htconfig.php +.htpreconfig.php +\#* +include/jquery-1.4.2.min.js +*.log +*.out +*.version* +favicon.* +home.html +addon +*~ +robots.txt + +#ignore documentation, it should be newly built +doc/html + +#ignore reports, should be generted with every build +report/ + +#ignore config files from eclipse, we don't want IDE files in our repository +.project +.buildpath +.externalToolBuilders +.settings + +#ignore OSX .DS_Store files +.DS_Store + +#ignore NetBeans IDE's private files (at least) +/nbproject/private/ + +#ignore smarty cache +/view/smarty3/compiled/ + +#ignore cache folders +/privacy_image_cache/ +/photo/ +/proxy/ +nbproject + +#ignore vagrant dir +.vagrant/ + +#ignore local folder +/local/ + +#ignore config files from Visual Studio +/.vs/ +/php_friendica.phpproj +/php_friendica.sln +/php_friendica.phpproj.user + +#ignore things from transifex-client +venv/ + +#ignore Composer dependencies +/vendor +/view/asset + +#ignore config files from JetBrains +/.idea + +#ignore addons/ directory +addons/ diff --git a/.htaccess b/.htaccess index 2348cdc38..a671cc680 100644 --- a/.htaccess +++ b/.htaccess @@ -4,7 +4,7 @@ AddType audio/ogg .oga #AddHandler php53-cgi .php - + #Apache 2.4 Require all denied @@ -38,4 +38,3 @@ AddType audio/ogg .oga RewriteRule ^(.*)$ index.php?pagename=$1 [E=REMOTE_USER:%{HTTP:Authorization},L,QSA] - diff --git a/.travis.yml b/.travis.yml index d68b7727e..82b5a5d21 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,4 +7,14 @@ php: - 7.1 - 7.2 -install: composer install +services: + - mysql +env: + - USER=travis DB=test + +install: + - composer install +before_script: + - mysql -e 'CREATE DATABASE IF NOT EXISTS test;' + # In order to avoid bin/worker.php warnings + - touch .htconfig.php diff --git a/CHANGELOG b/CHANGELOG index cc7eedfff..6385d22bb 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,105 @@ +Version 2018.05 (2018-06-01) + Friendica Core: + Update to the translations (DE, EN-GB, EN-US, FI, IS, IT, NL, PL, RU, ZN CH) [translation teams] + Update to the documentation [andyhee, annando, fabrixxm, M-arcus, MrPedovan, rudloff, tobiasd] + Enhancements to the DB handling [annando] + Enhancements to the relay system [annando] + Enhancements to the handling of URL that contain unicode characters [annando] + Enhancements to the Vagrant VM configuration [fabrixxm, tobiasd] + Enhancementa to the Babel module [MrPetovan] + Enhancements to the display of the [code] elements [MrPetovan] + Enhancements to the federation (OStatus, diaspora) [annando] + Enhancements to the PHP7.2 compatibility [Alkarex, MrPetovan, Quix0r] + Enhancements to the themes (frio, vier) [astifter, fabrixxm, koyuawsmbrtn, M-arcus, MrPetovan, Quix0r, rabuzarus] + Enhancements to the accessibility using the frio theme [annando] + Enhancements to the display of the registration note and the privacy statements on the registration page [tobiasd] + Enhancements to the UI by clarification of the wording (deletion of items, network widget, invitations) [annando, tobiasd] + Enhancements to the background worker [annando] + Enhancements to the forum display in the sidebar [annando] + Enhancements to the testing system [rudloff, tobiasd] + Enhancements to the display of events [MrPetovan] + Enhancements to the language detection of postings [MrPetovan] + Enhancements to the memcached handling [MrPetovan] + Enhancements to the Dandelion app support [annando] + Enhancements to the API [rudloff] + Enhancements to the systemd timer example [ben-utzer] + Enhancements to the notification emails to better integrate the securemail addon [tobiasd] + Enhancements to the caching/loading mechanisms [MrPetovan] + Enhancements to the sample-nginx configfile to not use $uri in the rewrite rules [anmol26s] + Fixed a bug in the relocation process of a Friendica instance [annando] + Fixed a bug in the shell wrapper for the console [MrPetovan] + Fixed a bug with the console tool po2php [MrPetovan] + Fixed a bug with the console tool blockaccounts [MrPetovan] + Fixed a bug in the ACL [annando, MrPetovan] + Fixed a bug that prevented the deletion of contact groups [annando] + Fixed a bug that made edited mentions and hashtags plaintext [annando] + Fixed a bug that caused the /display page to receive constandly new updates [annando] + Fixed wrong version of a dependency preventing the usage of PHP 5.6 [MrPetovan] + Fixed a bug in OpenID authentification [Quix0r] + Fixed a bug in the item deletion [annando] + Fixed a bug that prevented public comments from being distributed [annando] + Fixed a bug that caused empty profile pictures for public contacts [annando] + Fixed a bug that prevented the display of some postings in the network stream [annando] + Fixed a bug in the display of videos with parameters [annando] + Fixed a bug that caused the display of blocked contacts under some conditions [annando] + Fixed bugs in the installer [annando, M-arcus] + Fixed a bug in the installer running on nginx [astifter] + Fixed a bug with reshares from diaspora* [annando] + Fixed a bug that accounts from diaspora* could join private forums automatically [annando] + Fixed a bug that prevented the selection of displayed profiles for other Friendica contacts [MrPetovan] + Fixed the version sorting in the federation statistics page [annando] + Fixed a bug in the nodeinfo calculation of total comments [annando] + Fixed a bug during registration that prevented the detected language to be saved [tobiasd] + Added an optional module to display the Terms of Service [rabuzarus, tobiasd] + Added testfeed module [MrPetovan] + Added hashtag autocomplete (ported from Hubzilla) [rabuzarus] + Added password exposed check [MrPetovan] + Added preloading config adapter [MrPetovan] + Added a console to unify the PHP utility scripts [MrPetovan] + Added a tool to set user passwords to the console [annando] + Added memcached support [MrPetovan] + Added password exposure check [MrPetovan] + Added hashtag autocompletion [rabuzarus] + Added feedtest module [MrPetovan] + Added dbclean options to the admin panel [annando] + Added the possibility to add the remote_self flag to contacts from diaspora* and Twitter [annando] + Added the possibility of automatic installations [M-arcus] + Added the sending of a notification mail to the admin when a user deletes their account [tobiasd] + Added examples for home.html and home.css files [tobiasd] + Added an option to define after how many days a contact should be archived [annando] + Added parts of the list API [rudloff] + Added support of ALT texts for images [annando] + Removed the connection postings [annando] + Corrected a long standing typo in config variable names; should your bandwidth saver mode stop working please turn it off and on again [abanink] + The execute-ables were moved from /util to /bin [MrPetovan] + The execute-ables for the developers were moved from /util to /bin/dev [MrPetovan] + The last year deprecated themes frost and frost mobile got removed from the Friendica repository. They can be found in the dedicated repository for deprecated themes [tobiasd] + General code refactoring and beautification work [annando, MrPetovan, rudloff] + Switched to cropperjs to better support touch screen devices [rabuzarus] + Use the diaspora transport layer for the DFRN protocol as well [annando] + + Friendica Addons: + Updates to the translations (DE, EN_GB, EN_US, ES, FI, FR, IS, IT, NL, PL, RU, ZH_CN) [translation teams] + advancedcontentfilter: new addon with advanced filter capabilities [MrPetova] + catavatar: new addon for profile pictures based on David Revoy's cat-avatar generator [annando, fabrixxm, tobiasd] + languagefilter: better help text [andyhee] + mathjax: fixed the config form and adopted new CDN URL [tobiasd] + NSFW: add hashtag only hiding [MrPetovan] + notifyall: fixed a bug in handling the sender name [tobiasd] + Twitter: fixed a bug during the creation of public contacts [annando] + Twitter: remote self now also works for Twitter contacts [annando] + Twitter: optimizations for sending media [annando] + + Closed Issues: + 839, 1186, 1729, 2115, 2247, 2781, 2880, 3174, 3395, 3409, 3412, + 3611, 3834, 3837, 3979, 4146, 4572, 4601, 4616, 4629, 4647, 4660, + 4661, 4663, 4664, 4665, 4666, 4669, 4670, 4681, 4695, 4670, 4689, + 4730, 4749, 4760, 4772, 4786, 4790, 4791, 4816, 4867, 4878, 4819, + 4860, 4876, 4879, 4886, 4898, 4899, 4902, 4921, 4926, 4927, 4928, + 4938, 4943, 4946, 4947, 4965, 4976, 4966, 4994, 4997, 5002, 5014, + 5033, 5043, 5050, 5051, 5056, 5063, 5067, 5010, 5111, 5116, 5128, + 5137, 5147 + Version 3.6 (2018-03-23) Friendica Core: Updates to the translations (DE, EN_GB, EN_US, ES, FR, IT, ZH_CN) [translation teams] @@ -93,6 +195,8 @@ Version 3.6 (2018-03-23) Updates to the translations (DE, EN_GB, ES, FR, IT, NL, ZH_CN) [translation teams] all bridges don't relay postings anymore that are posted to a public forum [annando] DAV addon marked unsupported [tobiasd] + communityhome addon marked unsupported [MrPetovan] + yourls addon makrked unsupported [MrPetovan] Current Weather: fixing a problem with the weathermap link [zeroadam] NSFW added config examples, reworked the description, now ignores the CW from Mastodon [andyhee, annando, rebeka-catalina] Twitter support 280 chars limit [annando] @@ -102,7 +206,7 @@ Version 3.6 (2018-03-23) Public Server reworked [annando] pageheader settings beautifications [tobiasd] mailstream settings beautifications [tobiasd] - Membersince is now part of the core [rabuzarus] + Membersince is now part of the core, addon marked unsupported [rabuzarus] Forum posts are not transmitted over the connectors anymore [annando] Friendica Dir: diff --git a/VERSION b/VERSION index a8428e9db..607ef5eb6 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2018.05-rc +2018.08-dev diff --git a/bin/daemon.php b/bin/daemon.php index 6b0e377a3..b51dd392e 100755 --- a/bin/daemon.php +++ b/bin/daemon.php @@ -38,7 +38,7 @@ if (substr($directory, 0, 1) != "/") { } $directory = realpath($directory."/.."); -@include($directory."/.htconfig.php"); +include $directory."/.htconfig.php"; if (!isset($pidfile)) { die('Please specify a pid file in the variable $pidfile in the .htconfig.php. For example:'."\n". diff --git a/boot.php b/boot.php index 66e44677b..57176296e 100644 --- a/boot.php +++ b/boot.php @@ -39,9 +39,9 @@ require_once 'include/text.php'; define('FRIENDICA_PLATFORM', 'Friendica'); define('FRIENDICA_CODENAME', 'The Tazmans Flax-lily'); -define('FRIENDICA_VERSION', '2018.05-rc'); +define('FRIENDICA_VERSION', '2018.08-dev'); define('DFRN_PROTOCOL_VERSION', '2.23'); -define('DB_UPDATE_VERSION', 1266); +define('DB_UPDATE_VERSION', 1267); define('NEW_UPDATE_ROUTINE_VERSION', 1170); /** @@ -1076,6 +1076,7 @@ function is_site_admin() $adminlist = explode(",", str_replace(" ", "", $a->config['admin_email'])); //if(local_user() && x($a->user,'email') && x($a->config,'admin_email') && ($a->user['email'] === $a->config['admin_email'])) + /// @TODO This if() + 2 returns can be shrinked into one return if (local_user() && x($a->user, 'email') && x($a->config, 'admin_email') && in_array($a->user['email'], $adminlist)) { return true; } @@ -1173,7 +1174,7 @@ function random_digits($digits) { $rn = ''; for ($i = 0; $i < $digits; $i++) { - /// @TODO rand() is different to mt_rand() and maybe lesser "random" + /// @TODO Avoid rand/mt_rand, when it comes to cryptography, they are generating predictable (seedable) numbers. $rn .= rand(0, 9); } return $rn; @@ -1187,7 +1188,7 @@ function get_server() $server = "https://dir.friendica.social"; } - return($server); + return $server; } function get_temppath() @@ -1236,7 +1237,7 @@ function get_cachefile($file, $writemode = true) $cache = get_itemcachepath(); if ((!$cache) || (!is_dir($cache))) { - return(""); + return ""; } $subfolder = $cache . "/" . substr($file, 0, 2); @@ -1250,7 +1251,6 @@ function get_cachefile($file, $writemode = true) } } - /// @TODO no need to put braces here return $cachepath; } @@ -1357,7 +1357,6 @@ function get_spoolpath() return ""; } - if (!function_exists('exif_imagetype')) { function exif_imagetype($file) { @@ -1395,7 +1394,7 @@ function validate_include(&$file) } // Simply return flag - return ($valid); + return $valid; } function current_load() diff --git a/composer.json b/composer.json index b7cd645bd..9668b9341 100644 --- a/composer.json +++ b/composer.json @@ -47,7 +47,8 @@ ], "autoload": { "psr-4": { - "Friendica\\": "src/" + "Friendica\\": "src/", + "Friendica\\Test\\": "tests/" }, "psr-0": { "": "library/" @@ -68,5 +69,13 @@ "exclude": [ "log", "cache", "/photo", "/proxy" ] + }, + "require-dev": { + "phpunit/dbunit": "^2.0", + "phpdocumentor/reflection-docblock": "^3.0.2", + "phpunit/php-token-stream": "^1.4.2" + }, + "scripts": { + "test": "phpunit" } } diff --git a/composer.lock b/composer.lock index f294c16ef..dd2665ebb 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "f97245142e60a521f048a667bec4e436", + "content-hash": "ab5a551aff0505691c4836d063fc5171", "packages": [ { "name": "asika/simple-console", @@ -2090,7 +2090,1382 @@ "time": "2016-12-14T21:57:25+00:00" } ], - "packages-dev": [], + "packages-dev": [ + { + "name": "doctrine/instantiator", + "version": "1.0.5", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", + "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", + "shasum": "" + }, + "require": { + "php": ">=5.3,<8.0-DEV" + }, + "require-dev": { + "athletic/athletic": "~0.1.8", + "ext-pdo": "*", + "ext-phar": "*", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://github.com/doctrine/instantiator", + "keywords": [ + "constructor", + "instantiate" + ], + "time": "2015-06-14T21:17:01+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.7.0", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", + "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "doctrine/collections": "^1.0", + "doctrine/common": "^2.6", + "phpunit/phpunit": "^4.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + }, + "files": [ + "src/DeepCopy/deep_copy.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "time": "2017-10-19T19:58:43+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "^4.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "time": "2017-09-11T18:02:19+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "3.3.2", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "bf329f6c1aadea3299f08ee804682b7c45b326a2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/bf329f6c1aadea3299f08ee804682b7c45b326a2", + "reference": "bf329f6c1aadea3299f08ee804682b7c45b326a2", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0", + "phpdocumentor/reflection-common": "^1.0.0", + "phpdocumentor/type-resolver": "^0.4.0", + "webmozart/assert": "^1.0" + }, + "require-dev": { + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^4.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "time": "2017-11-10T14:09:06+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "0.4.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", + "shasum": "" + }, + "require": { + "php": "^5.5 || ^7.0", + "phpdocumentor/reflection-common": "^1.0" + }, + "require-dev": { + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^5.2||^4.8.24" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "time": "2017-07-14T14:27:02+00:00" + }, + { + "name": "phpspec/prophecy", + "version": "1.7.6", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/33a7e3c4fda54e912ff6338c48823bd5c0f0b712", + "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": "^5.3|^7.0", + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", + "sebastian/comparator": "^1.1|^2.0|^3.0", + "sebastian/recursion-context": "^1.0|^2.0|^3.0" + }, + "require-dev": { + "phpspec/phpspec": "^2.5|^3.2", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.7.x-dev" + } + }, + "autoload": { + "psr-0": { + "Prophecy\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "time": "2018-04-18T13:57:24+00:00" + }, + { + "name": "phpunit/dbunit", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/dbunit.git", + "reference": "5c35d74549c21ba55d0ea74ba89d191a51f8cf25" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/dbunit/zipball/5c35d74549c21ba55d0ea74ba89d191a51f8cf25", + "reference": "5c35d74549c21ba55d0ea74ba89d191a51f8cf25", + "shasum": "" + }, + "require": { + "ext-pdo": "*", + "ext-simplexml": "*", + "php": "^5.4 || ^7.0", + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0", + "symfony/yaml": "^2.1 || ^3.0" + }, + "bin": [ + "dbunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "DbUnit port for PHP/PHPUnit to support database interaction testing.", + "homepage": "https://github.com/sebastianbergmann/dbunit/", + "keywords": [ + "database", + "testing", + "xunit" + ], + "time": "2016-12-02T14:39:14+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "4.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "ef7b2f56815df854e66ceaee8ebe9393ae36a40d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ef7b2f56815df854e66ceaee8ebe9393ae36a40d", + "reference": "ef7b2f56815df854e66ceaee8ebe9393ae36a40d", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-xmlwriter": "*", + "php": "^5.6 || ^7.0", + "phpunit/php-file-iterator": "^1.3", + "phpunit/php-text-template": "^1.2", + "phpunit/php-token-stream": "^1.4.2 || ^2.0", + "sebastian/code-unit-reverse-lookup": "^1.0", + "sebastian/environment": "^1.3.2 || ^2.0", + "sebastian/version": "^1.0 || ^2.0" + }, + "require-dev": { + "ext-xdebug": "^2.1.4", + "phpunit/phpunit": "^5.7" + }, + "suggest": { + "ext-xdebug": "^2.5.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "time": "2017-04-02T07:44:40+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "1.4.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "time": "2017-11-27T13:52:08+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "time": "2015-06-21T13:50:34+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "1.0.9", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "time": "2017-02-26T11:10:40+00:00" + }, + { + "name": "phpunit/php-token-stream", + "version": "1.4.12", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/1ce90ba27c42e4e44e6d8458241466380b51fa16", + "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Wrapper around PHP's tokenizer extension.", + "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "keywords": [ + "tokenizer" + ], + "time": "2017-12-04T08:55:13+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "5.7.27", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c", + "reference": "b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "myclabs/deep-copy": "~1.3", + "php": "^5.6 || ^7.0", + "phpspec/prophecy": "^1.6.2", + "phpunit/php-code-coverage": "^4.0.4", + "phpunit/php-file-iterator": "~1.4", + "phpunit/php-text-template": "~1.2", + "phpunit/php-timer": "^1.0.6", + "phpunit/phpunit-mock-objects": "^3.2", + "sebastian/comparator": "^1.2.4", + "sebastian/diff": "^1.4.3", + "sebastian/environment": "^1.3.4 || ^2.0", + "sebastian/exporter": "~2.0", + "sebastian/global-state": "^1.1", + "sebastian/object-enumerator": "~2.0", + "sebastian/resource-operations": "~1.0", + "sebastian/version": "^1.0.6|^2.0.1", + "symfony/yaml": "~2.1|~3.0|~4.0" + }, + "conflict": { + "phpdocumentor/reflection-docblock": "3.0.2" + }, + "require-dev": { + "ext-pdo": "*" + }, + "suggest": { + "ext-xdebug": "*", + "phpunit/php-invoker": "~1.1" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.7.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "time": "2018-02-01T05:50:59+00:00" + }, + { + "name": "phpunit/phpunit-mock-objects", + "version": "3.4.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", + "reference": "a23b761686d50a560cc56233b9ecf49597cc9118" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/a23b761686d50a560cc56233b9ecf49597cc9118", + "reference": "a23b761686d50a560cc56233b9ecf49597cc9118", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": "^5.6 || ^7.0", + "phpunit/php-text-template": "^1.2", + "sebastian/exporter": "^1.2 || ^2.0" + }, + "conflict": { + "phpunit/phpunit": "<5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.4" + }, + "suggest": { + "ext-soap": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Mock Object library for PHPUnit", + "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", + "keywords": [ + "mock", + "xunit" + ], + "time": "2017-06-30T09:13:00+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "time": "2017-03-04T06:30:41+00:00" + }, + { + "name": "sebastian/comparator", + "version": "1.2.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/diff": "~1.2", + "sebastian/exporter": "~1.2 || ~2.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "http://www.github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "time": "2017-01-29T09:50:25+00:00" + }, + { + "name": "sebastian/diff", + "version": "1.4.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4", + "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff" + ], + "time": "2017-05-22T07:24:03+00:00" + }, + { + "name": "sebastian/environment", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5795ffe5dc5b02460c3e34222fee8cbe245d8fac", + "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "time": "2016-11-26T07:53:53+00:00" + }, + { + "name": "sebastian/exporter", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4", + "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/recursion-context": "~2.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "time": "2016-11-19T08:54:04+00:00" + }, + { + "name": "sebastian/global-state", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "time": "2015-10-12T03:26:01+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/1311872ac850040a79c3c058bea3e22d0f09cbb7", + "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7", + "shasum": "" + }, + "require": { + "php": ">=5.6", + "sebastian/recursion-context": "~2.0" + }, + "require-dev": { + "phpunit/phpunit": "~5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "time": "2017-02-18T15:18:39+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/2c3ba150cbec723aa057506e73a8d33bdb286c9a", + "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "time": "2016-11-19T07:33:16+00:00" + }, + { + "name": "sebastian/resource-operations", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "shasum": "" + }, + "require": { + "php": ">=5.6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "time": "2015-07-28T20:34:47+00:00" + }, + { + "name": "sebastian/version", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "time": "2016-10-03T07:35:21+00:00" + }, + { + "name": "symfony/yaml", + "version": "v3.4.8", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "a42f9da85c7c38d59f5e53f076fe81a091f894d0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/a42f9da85c7c38d59f5e53f076fe81a091f894d0", + "reference": "a42f9da85c7c38d59f5e53f076fe81a091f894d0", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8" + }, + "conflict": { + "symfony/console": "<3.4" + }, + "require-dev": { + "symfony/console": "~3.4|~4.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Yaml Component", + "homepage": "https://symfony.com", + "time": "2018-04-03T05:14:20+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.3.0", + "source": { + "type": "git", + "url": "https://github.com/webmozart/assert.git", + "reference": "0df1908962e7a3071564e857d86874dad1ef204a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/assert/zipball/0df1908962e7a3071564e857d86874dad1ef204a", + "reference": "0df1908962e7a3071564e857d86874dad1ef204a", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "time": "2018-01-29T19:49:41+00:00" + } + ], "aliases": [], "minimum-stability": "stable", "stability-flags": { diff --git a/database.sql b/database.sql index 7c0a59379..cc6ab16e1 100644 --- a/database.sql +++ b/database.sql @@ -1,6 +1,6 @@ -- ------------------------------------------ --- Friendica 2018.05-rc (The Tazmans Flax-lily) --- DB_UPDATE_VERSION 1266 +-- Friendica 2018.08-dev (The Tazmans Flax-lily) +-- DB_UPDATE_VERSION 1267 -- ------------------------------------------ @@ -9,12 +9,12 @@ -- CREATE TABLE IF NOT EXISTS `addon` ( `id` int unsigned NOT NULL auto_increment COMMENT '', - `name` varchar(50) NOT NULL DEFAULT '' COMMENT '', - `version` varchar(50) NOT NULL DEFAULT '' COMMENT '', - `installed` boolean NOT NULL DEFAULT '0' COMMENT '', - `hidden` boolean NOT NULL DEFAULT '0' COMMENT '', - `timestamp` int unsigned NOT NULL DEFAULT 0 COMMENT '', - `plugin_admin` boolean NOT NULL DEFAULT '0' COMMENT '', + `name` varchar(50) NOT NULL DEFAULT '' COMMENT 'addon base (file)name', + `version` varchar(50) NOT NULL DEFAULT '' COMMENT 'currently unused', + `installed` boolean NOT NULL DEFAULT '0' COMMENT 'currently always 1', + `hidden` boolean NOT NULL DEFAULT '0' COMMENT 'currently unused', + `timestamp` int unsigned NOT NULL DEFAULT 0 COMMENT 'file timestamp to check for reloads', + `plugin_admin` boolean NOT NULL DEFAULT '0' COMMENT '1 = has admin config, 0 = has no admin config', PRIMARY KEY(`id`), UNIQUE INDEX `name` (`name`) ) DEFAULT COLLATE utf8mb4_general_ci; @@ -23,19 +23,19 @@ CREATE TABLE IF NOT EXISTS `addon` ( -- TABLE attach -- CREATE TABLE IF NOT EXISTS `attach` ( - `id` int unsigned NOT NULL auto_increment COMMENT '', - `uid` mediumint unsigned NOT NULL DEFAULT 0 COMMENT 'User id', - `hash` varchar(64) NOT NULL DEFAULT '' COMMENT '', - `filename` varchar(255) NOT NULL DEFAULT '' COMMENT '', - `filetype` varchar(64) NOT NULL DEFAULT '' COMMENT '', - `filesize` int unsigned NOT NULL DEFAULT 0 COMMENT '', - `data` longblob NOT NULL COMMENT '', - `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', - `edited` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', - `allow_cid` mediumtext COMMENT '', - `allow_gid` mediumtext COMMENT '', - `deny_cid` mediumtext COMMENT '', - `deny_gid` mediumtext COMMENT '', + `id` int unsigned NOT NULL auto_increment COMMENT 'generated index', + `uid` mediumint unsigned NOT NULL DEFAULT 0 COMMENT 'Owner User id', + `hash` varchar(64) NOT NULL DEFAULT '' COMMENT 'hash', + `filename` varchar(255) NOT NULL DEFAULT '' COMMENT 'filename of original', + `filetype` varchar(64) NOT NULL DEFAULT '' COMMENT 'mimetype', + `filesize` int unsigned NOT NULL DEFAULT 0 COMMENT 'size in bytes', + `data` longblob NOT NULL COMMENT 'file data', + `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'creation time', + `edited` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'last edit time', + `allow_cid` mediumtext COMMENT 'Access Control - list of allowed contact.id \'<19><78>', + `allow_gid` mediumtext COMMENT 'Access Control - list of allowed groups', + `deny_cid` mediumtext COMMENT 'Access Control - list of denied contact.id', + `deny_gid` mediumtext COMMENT 'Access Control - list of denied groups', PRIMARY KEY(`id`) ) DEFAULT COLLATE utf8mb4_general_ci; @@ -67,7 +67,7 @@ CREATE TABLE IF NOT EXISTS `cache` ( -- TABLE challenge -- CREATE TABLE IF NOT EXISTS `challenge` ( - `id` int unsigned NOT NULL auto_increment COMMENT '', + `id` int unsigned NOT NULL auto_increment COMMENT 'sequential ID', `challenge` varchar(255) NOT NULL DEFAULT '' COMMENT '', `dfrn-id` varchar(255) NOT NULL DEFAULT '' COMMENT '', `expire` int unsigned NOT NULL DEFAULT 0 COMMENT '', @@ -105,26 +105,26 @@ CREATE TABLE IF NOT EXISTS `config` ( -- TABLE contact -- CREATE TABLE IF NOT EXISTS `contact` ( - `id` int unsigned NOT NULL auto_increment COMMENT '', - `uid` mediumint unsigned NOT NULL DEFAULT 0 COMMENT 'User id', + `id` int unsigned NOT NULL auto_increment COMMENT 'sequential ID', + `uid` mediumint unsigned NOT NULL DEFAULT 0 COMMENT 'Owner User id', `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', - `self` boolean NOT NULL DEFAULT '0' COMMENT '', + `self` boolean NOT NULL DEFAULT '0' COMMENT '1 if the contact is the user him/her self', `remote_self` boolean NOT NULL DEFAULT '0' COMMENT '', - `rel` tinyint unsigned NOT NULL DEFAULT 0 COMMENT '', + `rel` tinyint unsigned NOT NULL DEFAULT 0 COMMENT 'The kind of the relation between the user and the contact', `duplex` boolean NOT NULL DEFAULT '0' COMMENT '', - `network` char(4) NOT NULL DEFAULT '' COMMENT '', - `name` varchar(255) NOT NULL DEFAULT '' COMMENT '', - `nick` varchar(255) NOT NULL DEFAULT '' COMMENT '', + `network` char(4) NOT NULL DEFAULT '' COMMENT 'Network protocol of the contact', + `name` varchar(255) NOT NULL DEFAULT '' COMMENT 'Name that this contact is known by', + `nick` varchar(255) NOT NULL DEFAULT '' COMMENT 'Nick- and user name of the contact', `location` varchar(255) NOT NULL DEFAULT '' COMMENT '', `about` text COMMENT '', - `keywords` text COMMENT '', + `keywords` text COMMENT 'public keywords (interests) of the contact', `gender` varchar(32) NOT NULL DEFAULT '' COMMENT '', `xmpp` varchar(255) NOT NULL DEFAULT '' COMMENT '', `attag` varchar(255) NOT NULL DEFAULT '' COMMENT '', `avatar` varchar(255) NOT NULL DEFAULT '' COMMENT '', - `photo` varchar(255) DEFAULT '' COMMENT '', - `thumb` varchar(255) DEFAULT '' COMMENT '', - `micro` varchar(255) DEFAULT '' COMMENT '', + `photo` varchar(255) DEFAULT '' COMMENT 'Link to the profile photo of the contact', + `thumb` varchar(255) DEFAULT '' COMMENT 'Link to the profile photo (thumb size)', + `micro` varchar(255) DEFAULT '' COMMENT 'Link to the profile photo (micro size)', `site-pubkey` text COMMENT '', `issued-id` varchar(255) NOT NULL DEFAULT '' COMMENT '', `dfrn-id` varchar(255) NOT NULL DEFAULT '' COMMENT '', @@ -132,8 +132,8 @@ CREATE TABLE IF NOT EXISTS `contact` ( `nurl` varchar(255) NOT NULL DEFAULT '' COMMENT '', `addr` varchar(255) NOT NULL DEFAULT '' COMMENT '', `alias` varchar(255) NOT NULL DEFAULT '' COMMENT '', - `pubkey` text COMMENT '', - `prvkey` text COMMENT '', + `pubkey` text COMMENT 'RSA public key 4096 bit', + `prvkey` text COMMENT 'RSA private key 4096 bit', `batch` varchar(255) NOT NULL DEFAULT '' COMMENT '', `request` varchar(255) COMMENT '', `notify` varchar(255) COMMENT '', @@ -145,20 +145,20 @@ CREATE TABLE IF NOT EXISTS `contact` ( `usehub` boolean NOT NULL DEFAULT '0' COMMENT '', `subhub` boolean NOT NULL DEFAULT '0' COMMENT '', `hub-verify` varchar(255) NOT NULL DEFAULT '' COMMENT '', - `last-update` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', - `success_update` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', - `failure_update` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', + `last-update` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'Date of the last try to update the contact info', + `success_update` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'Date of the last successful contact update', + `failure_update` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'Date of the last failed update', `name-date` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', `uri-date` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', `avatar-date` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', `term-date` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', - `last-item` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', + `last-item` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'date of the last post', `priority` tinyint unsigned NOT NULL DEFAULT 0 COMMENT '', `blocked` boolean NOT NULL DEFAULT '1' COMMENT '', - `readonly` boolean NOT NULL DEFAULT '0' COMMENT '', + `readonly` boolean NOT NULL DEFAULT '0' COMMENT 'posts of the contact are readonly', `writable` boolean NOT NULL DEFAULT '0' COMMENT '', - `forum` boolean NOT NULL DEFAULT '0' COMMENT '', - `prv` boolean NOT NULL DEFAULT '0' COMMENT '', + `forum` boolean NOT NULL DEFAULT '0' COMMENT 'contact is a forum', + `prv` boolean NOT NULL DEFAULT '0' COMMENT 'contact is a private group', `contact-type` tinyint NOT NULL DEFAULT 0 COMMENT '', `hidden` boolean NOT NULL DEFAULT '0' COMMENT '', `archive` boolean NOT NULL DEFAULT '0' COMMENT '', @@ -192,14 +192,14 @@ CREATE TABLE IF NOT EXISTS `contact` ( -- TABLE conv -- CREATE TABLE IF NOT EXISTS `conv` ( - `id` int unsigned NOT NULL auto_increment COMMENT '', - `guid` varchar(255) NOT NULL DEFAULT '' COMMENT '', - `recips` text COMMENT '', - `uid` mediumint unsigned NOT NULL DEFAULT 0 COMMENT 'User id', - `creator` varchar(255) NOT NULL DEFAULT '' COMMENT '', - `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', - `updated` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', - `subject` text COMMENT '', + `id` int unsigned NOT NULL auto_increment COMMENT 'sequential ID', + `guid` varchar(255) NOT NULL DEFAULT '' COMMENT 'A unique identifier for this conversation', + `recips` text COMMENT 'sender_handle;recipient_handle', + `uid` mediumint unsigned NOT NULL DEFAULT 0 COMMENT 'Owner User id', + `creator` varchar(255) NOT NULL DEFAULT '' COMMENT 'handle of creator', + `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'creation timestamp', + `updated` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'edited timestamp', + `subject` text COMMENT 'subject of initial message', PRIMARY KEY(`id`), INDEX `uid` (`uid`) ) DEFAULT COLLATE utf8mb4_general_ci; @@ -208,13 +208,13 @@ CREATE TABLE IF NOT EXISTS `conv` ( -- TABLE conversation -- CREATE TABLE IF NOT EXISTS `conversation` ( - `item-uri` varbinary(255) NOT NULL COMMENT '', - `reply-to-uri` varbinary(255) NOT NULL DEFAULT '' COMMENT '', - `conversation-uri` varbinary(255) NOT NULL DEFAULT '' COMMENT '', - `conversation-href` varbinary(255) NOT NULL DEFAULT '' COMMENT '', - `protocol` tinyint unsigned NOT NULL DEFAULT 0 COMMENT '', - `source` mediumtext COMMENT '', - `received` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', + `item-uri` varbinary(255) NOT NULL COMMENT 'URI of the item', + `reply-to-uri` varbinary(255) NOT NULL DEFAULT '' COMMENT 'URI to which this item is a reply', + `conversation-uri` varbinary(255) NOT NULL DEFAULT '' COMMENT 'GNU Social conversation URI', + `conversation-href` varbinary(255) NOT NULL DEFAULT '' COMMENT 'GNU Social conversation link', + `protocol` tinyint unsigned NOT NULL DEFAULT 0 COMMENT 'The protocol of the item', + `source` mediumtext COMMENT 'Original source', + `received` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'Receiving date', PRIMARY KEY(`item-uri`), INDEX `conversation-uri` (`conversation-uri`), INDEX `received` (`received`) @@ -224,26 +224,26 @@ CREATE TABLE IF NOT EXISTS `conversation` ( -- TABLE event -- CREATE TABLE IF NOT EXISTS `event` ( - `id` int unsigned NOT NULL auto_increment COMMENT '', + `id` int unsigned NOT NULL auto_increment COMMENT 'sequential ID', `guid` varchar(255) NOT NULL DEFAULT '' COMMENT '', - `uid` mediumint unsigned NOT NULL DEFAULT 0 COMMENT 'User id', - `cid` int unsigned NOT NULL DEFAULT 0 COMMENT '', + `uid` mediumint unsigned NOT NULL DEFAULT 0 COMMENT 'Owner User id', + `cid` int unsigned NOT NULL DEFAULT 0 COMMENT 'contact_id (ID of the contact in contact table)', `uri` varchar(255) NOT NULL DEFAULT '' COMMENT '', - `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', - `edited` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', - `start` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', - `finish` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', - `summary` text COMMENT '', - `desc` text COMMENT '', - `location` text COMMENT '', - `type` varchar(20) NOT NULL DEFAULT '' COMMENT '', - `nofinish` boolean NOT NULL DEFAULT '0' COMMENT '', - `adjust` boolean NOT NULL DEFAULT '1' COMMENT '', - `ignore` boolean NOT NULL DEFAULT '0' COMMENT '', - `allow_cid` mediumtext COMMENT '', - `allow_gid` mediumtext COMMENT '', - `deny_cid` mediumtext COMMENT '', - `deny_gid` mediumtext COMMENT '', + `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'creation time', + `edited` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'last edit time', + `start` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'event start time', + `finish` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'event end time', + `summary` text COMMENT 'short description or title of the event', + `desc` text COMMENT 'event description', + `location` text COMMENT 'event location', + `type` varchar(20) NOT NULL DEFAULT '' COMMENT 'event or birthday', + `nofinish` boolean NOT NULL DEFAULT '0' COMMENT 'if event does have no end this is 1', + `adjust` boolean NOT NULL DEFAULT '1' COMMENT 'adjust to timezone of the recipient (0 or 1)', + `ignore` boolean NOT NULL DEFAULT '0' COMMENT '0 or 1', + `allow_cid` mediumtext COMMENT 'Access Control - list of allowed contact.id \'<19><78>\'', + `allow_gid` mediumtext COMMENT 'Access Control - list of allowed groups', + `deny_cid` mediumtext COMMENT 'Access Control - list of denied contact.id', + `deny_gid` mediumtext COMMENT 'Access Control - list of denied groups', PRIMARY KEY(`id`), INDEX `uid_start` (`uid`,`start`) ) DEFAULT COLLATE utf8mb4_general_ci; @@ -252,8 +252,8 @@ CREATE TABLE IF NOT EXISTS `event` ( -- TABLE fcontact -- CREATE TABLE IF NOT EXISTS `fcontact` ( - `id` int unsigned NOT NULL auto_increment COMMENT '', - `guid` varchar(255) NOT NULL DEFAULT '' COMMENT '', + `id` int unsigned NOT NULL auto_increment COMMENT 'sequential ID', + `guid` varchar(255) NOT NULL DEFAULT '' COMMENT 'unique id', `url` varchar(255) NOT NULL DEFAULT '' COMMENT '', `name` varchar(255) NOT NULL DEFAULT '' COMMENT '', `photo` varchar(255) NOT NULL DEFAULT '' COMMENT '', @@ -294,9 +294,9 @@ CREATE TABLE IF NOT EXISTS `fsuggest` ( -- TABLE gcign -- CREATE TABLE IF NOT EXISTS `gcign` ( - `id` int unsigned NOT NULL auto_increment COMMENT '', - `uid` mediumint unsigned NOT NULL DEFAULT 0 COMMENT 'User id', - `gcid` int unsigned NOT NULL DEFAULT 0 COMMENT '', + `id` int unsigned NOT NULL auto_increment COMMENT 'sequential ID', + `uid` mediumint unsigned NOT NULL DEFAULT 0 COMMENT 'Local User id', + `gcid` int unsigned NOT NULL DEFAULT 0 COMMENT 'gcontact.id of ignored contact', PRIMARY KEY(`id`), INDEX `uid` (`uid`), INDEX `gcid` (`gcid`) @@ -306,12 +306,12 @@ CREATE TABLE IF NOT EXISTS `gcign` ( -- TABLE gcontact -- CREATE TABLE IF NOT EXISTS `gcontact` ( - `id` int unsigned NOT NULL auto_increment COMMENT '', - `name` varchar(255) NOT NULL DEFAULT '' COMMENT '', - `nick` varchar(255) NOT NULL DEFAULT '' COMMENT '', - `url` varchar(255) NOT NULL DEFAULT '' COMMENT '', + `id` int unsigned NOT NULL auto_increment COMMENT 'sequential ID', + `name` varchar(255) NOT NULL DEFAULT '' COMMENT 'Name that this contact is known by', + `nick` varchar(255) NOT NULL DEFAULT '' COMMENT 'Nick- and user name of the contact', + `url` varchar(255) NOT NULL DEFAULT '' COMMENT 'Link to the contacts profile page', `nurl` varchar(255) NOT NULL DEFAULT '' COMMENT '', - `photo` varchar(255) NOT NULL DEFAULT '' COMMENT '', + `photo` varchar(255) NOT NULL DEFAULT '' COMMENT 'Link to the profile photo', `connect` varchar(255) NOT NULL DEFAULT '' COMMENT '', `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', `updated` datetime DEFAULT '0001-01-01 00:00:00' COMMENT '', @@ -319,19 +319,19 @@ CREATE TABLE IF NOT EXISTS `gcontact` ( `last_failure` datetime DEFAULT '0001-01-01 00:00:00' COMMENT '', `location` varchar(255) NOT NULL DEFAULT '' COMMENT '', `about` text COMMENT '', - `keywords` text COMMENT '', + `keywords` text COMMENT 'puplic keywords (interests)', `gender` varchar(32) NOT NULL DEFAULT '' COMMENT '', `birthday` varchar(32) NOT NULL DEFAULT '0001-01-01' COMMENT '', - `community` boolean NOT NULL DEFAULT '0' COMMENT '', + `community` boolean NOT NULL DEFAULT '0' COMMENT '1 if contact is forum account', `contact-type` tinyint NOT NULL DEFAULT -1 COMMENT '', - `hide` boolean NOT NULL DEFAULT '0' COMMENT '', - `nsfw` boolean NOT NULL DEFAULT '0' COMMENT '', - `network` char(4) NOT NULL DEFAULT '' COMMENT '', + `hide` boolean NOT NULL DEFAULT '0' COMMENT '1 = should be hidden from search', + `nsfw` boolean NOT NULL DEFAULT '0' COMMENT '1 = contact posts nsfw content', + `network` char(4) NOT NULL DEFAULT '' COMMENT 'social network protocol', `addr` varchar(255) NOT NULL DEFAULT '' COMMENT '', `notify` varchar(255) COMMENT '', `alias` varchar(255) NOT NULL DEFAULT '' COMMENT '', `generation` tinyint unsigned NOT NULL DEFAULT 0 COMMENT '', - `server_url` varchar(255) NOT NULL DEFAULT '' COMMENT '', + `server_url` varchar(255) NOT NULL DEFAULT '' COMMENT 'baseurl of the contacts server', PRIMARY KEY(`id`), UNIQUE INDEX `nurl` (`nurl`(190)), INDEX `name` (`name`(64)), @@ -345,7 +345,7 @@ CREATE TABLE IF NOT EXISTS `gcontact` ( -- TABLE glink -- CREATE TABLE IF NOT EXISTS `glink` ( - `id` int unsigned NOT NULL auto_increment COMMENT '', + `id` int unsigned NOT NULL auto_increment COMMENT 'sequential ID', `cid` int unsigned NOT NULL DEFAULT 0 COMMENT '', `uid` mediumint unsigned NOT NULL DEFAULT 0 COMMENT 'User id', `gcid` int unsigned NOT NULL DEFAULT 0 COMMENT '', @@ -360,11 +360,11 @@ CREATE TABLE IF NOT EXISTS `glink` ( -- TABLE group -- CREATE TABLE IF NOT EXISTS `group` ( - `id` int unsigned NOT NULL auto_increment COMMENT '', - `uid` mediumint unsigned NOT NULL DEFAULT 0 COMMENT 'User id', - `visible` boolean NOT NULL DEFAULT '0' COMMENT '', - `deleted` boolean NOT NULL DEFAULT '0' COMMENT '', - `name` varchar(255) NOT NULL DEFAULT '' COMMENT '', + `id` int unsigned NOT NULL auto_increment COMMENT 'sequential ID', + `uid` mediumint unsigned NOT NULL DEFAULT 0 COMMENT 'Owner User id', + `visible` boolean NOT NULL DEFAULT '0' COMMENT '1 indicates the member list is not private', + `deleted` boolean NOT NULL DEFAULT '0' COMMENT '1 indicates the group has been deleted', + `name` varchar(255) NOT NULL DEFAULT '' COMMENT 'human readable name of group', PRIMARY KEY(`id`), INDEX `uid` (`uid`) ) DEFAULT COLLATE utf8mb4_general_ci; @@ -373,9 +373,9 @@ CREATE TABLE IF NOT EXISTS `group` ( -- TABLE group_member -- CREATE TABLE IF NOT EXISTS `group_member` ( - `id` int unsigned NOT NULL auto_increment COMMENT '', - `gid` int unsigned NOT NULL DEFAULT 0 COMMENT '', - `contact-id` int unsigned NOT NULL DEFAULT 0 COMMENT '', + `id` int unsigned NOT NULL auto_increment COMMENT 'sequential ID', + `gid` int unsigned NOT NULL DEFAULT 0 COMMENT 'groups.id of the associated group', + `contact-id` int unsigned NOT NULL DEFAULT 0 COMMENT 'contact.id of the member assigned to the associated group', PRIMARY KEY(`id`), INDEX `contactid` (`contact-id`), UNIQUE INDEX `gid_contactid` (`gid`,`contact-id`) @@ -385,14 +385,14 @@ CREATE TABLE IF NOT EXISTS `group_member` ( -- TABLE gserver -- CREATE TABLE IF NOT EXISTS `gserver` ( - `id` int unsigned NOT NULL auto_increment COMMENT '', + `id` int unsigned NOT NULL auto_increment COMMENT 'sequential ID', `url` varchar(255) NOT NULL DEFAULT '' COMMENT '', `nurl` varchar(255) NOT NULL DEFAULT '' COMMENT '', `version` varchar(255) NOT NULL DEFAULT '' COMMENT '', `site_name` varchar(255) NOT NULL DEFAULT '' COMMENT '', `info` text COMMENT '', `register_policy` tinyint NOT NULL DEFAULT 0 COMMENT '', - `registered-users` int unsigned NOT NULL DEFAULT 0 COMMENT '', + `registered-users` int unsigned NOT NULL DEFAULT 0 COMMENT 'Number of registered users', `poco` varchar(255) NOT NULL DEFAULT '' COMMENT '', `noscrape` varchar(255) NOT NULL DEFAULT '' COMMENT '', `network` char(4) NOT NULL DEFAULT '' COMMENT '', @@ -421,11 +421,11 @@ CREATE TABLE IF NOT EXISTS `gserver-tag` ( -- TABLE hook -- CREATE TABLE IF NOT EXISTS `hook` ( - `id` int unsigned NOT NULL auto_increment COMMENT '', - `hook` varbinary(100) NOT NULL DEFAULT '' COMMENT '', - `file` varbinary(200) NOT NULL DEFAULT '' COMMENT '', - `function` varbinary(200) NOT NULL DEFAULT '' COMMENT '', - `priority` smallint unsigned NOT NULL DEFAULT 0 COMMENT '', + `id` int unsigned NOT NULL auto_increment COMMENT 'sequential ID', + `hook` varbinary(100) NOT NULL DEFAULT '' COMMENT 'name of hook', + `file` varbinary(200) NOT NULL DEFAULT '' COMMENT 'relative filename of hook handler', + `function` varbinary(200) NOT NULL DEFAULT '' COMMENT 'function name of hook handler', + `priority` smallint unsigned NOT NULL DEFAULT 0 COMMENT 'not yet implemented - can be used to sort conflicts in hook handling by calling handlers in priority order', PRIMARY KEY(`id`), UNIQUE INDEX `hook_file_function` (`hook`,`file`,`function`) ) DEFAULT COLLATE utf8mb4_general_ci; @@ -434,7 +434,7 @@ CREATE TABLE IF NOT EXISTS `hook` ( -- TABLE intro -- CREATE TABLE IF NOT EXISTS `intro` ( - `id` int unsigned NOT NULL auto_increment COMMENT '', + `id` int unsigned NOT NULL auto_increment COMMENT 'sequential ID', `uid` mediumint unsigned NOT NULL DEFAULT 0 COMMENT 'User id', `fid` int unsigned NOT NULL DEFAULT 0 COMMENT '', `contact-id` int unsigned NOT NULL DEFAULT 0 COMMENT '', @@ -453,68 +453,68 @@ CREATE TABLE IF NOT EXISTS `intro` ( -- CREATE TABLE IF NOT EXISTS `item` ( `id` int unsigned NOT NULL auto_increment, - `guid` varchar(255) NOT NULL DEFAULT '' COMMENT '', + `guid` varchar(255) NOT NULL DEFAULT '' COMMENT 'A unique identifier for this item', `uri` varchar(255) NOT NULL DEFAULT '' COMMENT '', - `uid` mediumint unsigned NOT NULL DEFAULT 0 COMMENT 'User id', - `contact-id` int unsigned NOT NULL DEFAULT 0 COMMENT '', + `uid` mediumint unsigned NOT NULL DEFAULT 0 COMMENT 'Owner id which owns this copy of the item', + `contact-id` int unsigned NOT NULL DEFAULT 0 COMMENT 'contact.id', `type` varchar(20) NOT NULL DEFAULT '' COMMENT '', - `wall` boolean NOT NULL DEFAULT '0' COMMENT '', + `wall` boolean NOT NULL DEFAULT '0' COMMENT 'This item was posted to the wall of uid', `gravity` tinyint unsigned NOT NULL DEFAULT 0 COMMENT '', - `parent` int unsigned NOT NULL DEFAULT 0 COMMENT '', - `parent-uri` varchar(255) NOT NULL DEFAULT '' COMMENT '', + `parent` int unsigned NOT NULL DEFAULT 0 COMMENT 'item.id of the parent to this item if it is a reply of some form; otherwise this must be set to the id of this item', + `parent-uri` varchar(255) NOT NULL DEFAULT '' COMMENT 'uri of the parent to this item', `extid` varchar(255) NOT NULL DEFAULT '' COMMENT '', - `thr-parent` varchar(255) NOT NULL DEFAULT '' COMMENT '', - `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', - `edited` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', - `commented` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', - `received` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', - `changed` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', - `owner-id` int unsigned NOT NULL DEFAULT 0 COMMENT '', - `owner-name` varchar(255) NOT NULL DEFAULT '' COMMENT '', - `owner-link` varchar(255) NOT NULL DEFAULT '' COMMENT '', - `owner-avatar` varchar(255) NOT NULL DEFAULT '' COMMENT '', - `author-id` int unsigned NOT NULL DEFAULT 0 COMMENT '', - `author-name` varchar(255) NOT NULL DEFAULT '' COMMENT '', - `author-link` varchar(255) NOT NULL DEFAULT '' COMMENT '', - `author-avatar` varchar(255) NOT NULL DEFAULT '' COMMENT '', - `title` varchar(255) NOT NULL DEFAULT '' COMMENT '', + `thr-parent` varchar(255) NOT NULL DEFAULT '' COMMENT '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', + `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'Creation timestamp.', + `edited` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'Date of last edit (default is created)', + `commented` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'Date of last comment/reply to this item', + `received` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'datetime', + `changed` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'Date that something in the conversation changed, indicating clients should fetch the conversation again', + `owner-id` int unsigned NOT NULL DEFAULT 0 COMMENT 'Link to the contact table with uid=0 of the owner of this item', + `owner-name` varchar(255) NOT NULL DEFAULT '' COMMENT 'Name of the owner of this item', + `owner-link` varchar(255) NOT NULL DEFAULT '' COMMENT 'Link to the profile page of the owner of this item', + `owner-avatar` varchar(255) NOT NULL DEFAULT '' COMMENT 'Link to the avatar picture of the owner of this item', + `author-id` int unsigned NOT NULL DEFAULT 0 COMMENT 'Link to the contact table with uid=0 of the author of this item', + `author-name` varchar(255) NOT NULL DEFAULT '' COMMENT 'Name of the author of this item', + `author-link` varchar(255) NOT NULL DEFAULT '' COMMENT 'Link to the profile page of the author of this item', + `author-avatar` varchar(255) NOT NULL DEFAULT '' COMMENT 'Link to the avatar picture of the author of this item', + `title` varchar(255) NOT NULL DEFAULT '' COMMENT 'item title', `content-warning` varchar(255) NOT NULL DEFAULT '' COMMENT '', - `body` mediumtext COMMENT '', - `app` varchar(255) NOT NULL DEFAULT '' COMMENT '', - `verb` varchar(100) NOT NULL DEFAULT '' COMMENT '', - `object-type` varchar(100) NOT NULL DEFAULT '' COMMENT '', - `object` text COMMENT '', - `target-type` varchar(100) NOT NULL DEFAULT '' COMMENT '', - `target` text COMMENT '', - `postopts` text COMMENT '', - `plink` varchar(255) NOT NULL DEFAULT '' COMMENT '', - `resource-id` varchar(32) NOT NULL DEFAULT '' COMMENT '', - `event-id` int unsigned NOT NULL DEFAULT 0 COMMENT '', + `body` mediumtext COMMENT 'item body content', + `app` varchar(255) NOT NULL DEFAULT '' COMMENT 'application which generated this item', + `verb` varchar(100) NOT NULL DEFAULT '' COMMENT 'ActivityStreams verb', + `object-type` varchar(100) NOT NULL DEFAULT '' COMMENT 'ActivityStreams object type', + `object` text COMMENT 'JSON encoded object structure unless it is an implied object (normal post)', + `target-type` varchar(100) NOT NULL DEFAULT '' COMMENT 'ActivityStreams target type if applicable (URI)', + `target` text COMMENT 'JSON encoded target structure if used', + `postopts` text COMMENT 'External post connectors add their network name to this comma-separated string to identify that they should be delivered to these networks during delivery', + `plink` varchar(255) NOT NULL DEFAULT '' COMMENT 'permalink or URL toa displayable copy of the message at its source', + `resource-id` varchar(32) NOT NULL DEFAULT '' COMMENT 'Used to link other tables to items, it identifies the linked resource (e.g. photo) and if set must also set resource_type', + `event-id` int unsigned NOT NULL DEFAULT 0 COMMENT 'Used to link to the event.id', `tag` mediumtext COMMENT '', - `attach` mediumtext COMMENT '', + `attach` mediumtext COMMENT 'JSON structure representing attachments to this item', `inform` mediumtext COMMENT '', `file` mediumtext COMMENT '', - `location` varchar(255) NOT NULL DEFAULT '' COMMENT '', - `coord` varchar(255) NOT NULL DEFAULT '' COMMENT '', - `allow_cid` mediumtext COMMENT '', - `allow_gid` mediumtext COMMENT '', - `deny_cid` mediumtext COMMENT '', - `deny_gid` mediumtext COMMENT '', - `private` boolean NOT NULL DEFAULT '0' COMMENT '', + `location` varchar(255) NOT NULL DEFAULT '' COMMENT 'text location where this item originated', + `coord` varchar(255) NOT NULL DEFAULT '' COMMENT 'longitude/latitude pair representing location where this item originated', + `allow_cid` mediumtext COMMENT 'Access Control - list of allowed contact.id \'<19><78>\'', + `allow_gid` mediumtext COMMENT 'Access Control - list of allowed groups', + `deny_cid` mediumtext COMMENT 'Access Control - list of denied contact.id', + `deny_gid` mediumtext COMMENT 'Access Control - list of denied groups', + `private` boolean NOT NULL DEFAULT '0' COMMENT 'distribution is restricted', `pubmail` boolean NOT NULL DEFAULT '0' COMMENT '', `moderated` boolean NOT NULL DEFAULT '0' COMMENT '', `visible` boolean NOT NULL DEFAULT '0' COMMENT '', `spam` boolean NOT NULL DEFAULT '0' COMMENT '', - `starred` boolean NOT NULL DEFAULT '0' COMMENT '', - `bookmark` boolean NOT NULL DEFAULT '0' COMMENT '', - `unseen` boolean NOT NULL DEFAULT '1' COMMENT '', - `deleted` boolean NOT NULL DEFAULT '0' COMMENT '', - `origin` boolean NOT NULL DEFAULT '0' COMMENT '', + `starred` boolean NOT NULL DEFAULT '0' COMMENT 'item has been favourited', + `bookmark` boolean NOT NULL DEFAULT '0' COMMENT 'item has been bookmarked', + `unseen` boolean NOT NULL DEFAULT '1' COMMENT 'item has not been seen', + `deleted` boolean NOT NULL DEFAULT '0' COMMENT 'item has been deleted', + `origin` boolean NOT NULL DEFAULT '0' COMMENT 'item originated at this site', `forum_mode` tinyint unsigned NOT NULL DEFAULT 0 COMMENT '', - `mention` boolean NOT NULL DEFAULT '0' COMMENT '', - `network` char(4) NOT NULL DEFAULT '' COMMENT '', + `mention` boolean NOT NULL DEFAULT '0' COMMENT 'The owner of this item was mentioned in it', + `network` char(4) NOT NULL DEFAULT '' COMMENT 'Network from where the item comes from', `rendered-hash` varchar(32) NOT NULL DEFAULT '' COMMENT '', - `rendered-html` mediumtext COMMENT '', + `rendered-html` mediumtext COMMENT 'item.body converted to html', `global` boolean NOT NULL DEFAULT '0' COMMENT '', PRIMARY KEY(`id`), INDEX `guid` (`guid`(191)), @@ -550,10 +550,10 @@ CREATE TABLE IF NOT EXISTS `item` ( -- TABLE locks -- CREATE TABLE IF NOT EXISTS `locks` ( - `id` int unsigned NOT NULL auto_increment COMMENT '', + `id` int unsigned NOT NULL auto_increment COMMENT 'sequential ID', `name` varchar(128) NOT NULL DEFAULT '' COMMENT '', `locked` boolean NOT NULL DEFAULT '0' COMMENT '', - `pid` int unsigned NOT NULL DEFAULT 0 COMMENT '', + `pid` int unsigned NOT NULL DEFAULT 0 COMMENT 'Process ID', PRIMARY KEY(`id`) ) DEFAULT COLLATE utf8mb4_general_ci; @@ -561,23 +561,23 @@ CREATE TABLE IF NOT EXISTS `locks` ( -- TABLE mail -- CREATE TABLE IF NOT EXISTS `mail` ( - `id` int unsigned NOT NULL auto_increment COMMENT '', - `uid` mediumint unsigned NOT NULL DEFAULT 0 COMMENT 'User id', - `guid` varchar(255) NOT NULL DEFAULT '' COMMENT '', - `from-name` varchar(255) NOT NULL DEFAULT '' COMMENT '', - `from-photo` varchar(255) NOT NULL DEFAULT '' COMMENT '', - `from-url` varchar(255) NOT NULL DEFAULT '' COMMENT '', - `contact-id` varchar(255) NOT NULL DEFAULT '' COMMENT '', - `convid` int unsigned NOT NULL DEFAULT 0 COMMENT '', + `id` int unsigned NOT NULL auto_increment COMMENT 'sequential ID', + `uid` mediumint unsigned NOT NULL DEFAULT 0 COMMENT 'Owner User id', + `guid` varchar(255) NOT NULL DEFAULT '' COMMENT 'A unique identifier for this private message', + `from-name` varchar(255) NOT NULL DEFAULT '' COMMENT 'name of the sender', + `from-photo` varchar(255) NOT NULL DEFAULT '' COMMENT 'contact photo link of the sender', + `from-url` varchar(255) NOT NULL DEFAULT '' COMMENT 'profile linke of the sender', + `contact-id` varchar(255) NOT NULL DEFAULT '' COMMENT 'contact.id', + `convid` int unsigned NOT NULL DEFAULT 0 COMMENT 'conv.id', `title` varchar(255) NOT NULL DEFAULT '' COMMENT '', `body` mediumtext COMMENT '', - `seen` boolean NOT NULL DEFAULT '0' COMMENT '', + `seen` boolean NOT NULL DEFAULT '0' COMMENT 'if message visited it is 1', `reply` boolean NOT NULL DEFAULT '0' COMMENT '', `replied` boolean NOT NULL DEFAULT '0' COMMENT '', - `unknown` boolean NOT NULL DEFAULT '0' COMMENT '', + `unknown` boolean NOT NULL DEFAULT '0' COMMENT 'if sender not in the contact table this is 1', `uri` varchar(255) NOT NULL DEFAULT '' COMMENT '', `parent-uri` varchar(255) NOT NULL DEFAULT '' COMMENT '', - `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', + `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'creation time of the private message', PRIMARY KEY(`id`), INDEX `uid_seen` (`uid`,`seen`), INDEX `convid` (`convid`), @@ -590,7 +590,7 @@ CREATE TABLE IF NOT EXISTS `mail` ( -- TABLE mailacct -- CREATE TABLE IF NOT EXISTS `mailacct` ( - `id` int unsigned NOT NULL auto_increment COMMENT '', + `id` int unsigned NOT NULL auto_increment COMMENT 'sequential ID', `uid` mediumint unsigned NOT NULL DEFAULT 0 COMMENT 'User id', `server` varchar(255) NOT NULL DEFAULT '' COMMENT '', `port` smallint unsigned NOT NULL DEFAULT 0 COMMENT '', @@ -610,7 +610,7 @@ CREATE TABLE IF NOT EXISTS `mailacct` ( -- TABLE manage -- CREATE TABLE IF NOT EXISTS `manage` ( - `id` int unsigned NOT NULL auto_increment COMMENT '', + `id` int unsigned NOT NULL auto_increment COMMENT 'sequential ID', `uid` mediumint unsigned NOT NULL DEFAULT 0 COMMENT 'User id', `mid` mediumint unsigned NOT NULL DEFAULT 0 COMMENT 'User id', PRIMARY KEY(`id`), @@ -621,7 +621,7 @@ CREATE TABLE IF NOT EXISTS `manage` ( -- TABLE notify -- CREATE TABLE IF NOT EXISTS `notify` ( - `id` int unsigned NOT NULL auto_increment COMMENT '', + `id` int unsigned NOT NULL auto_increment COMMENT 'sequential ID', `hash` varchar(64) NOT NULL DEFAULT '' COMMENT '', `type` smallint unsigned NOT NULL DEFAULT 0 COMMENT '', `name` varchar(255) NOT NULL DEFAULT '' COMMENT '', @@ -629,15 +629,15 @@ CREATE TABLE IF NOT EXISTS `notify` ( `photo` varchar(255) NOT NULL DEFAULT '' COMMENT '', `date` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', `msg` mediumtext COMMENT '', - `uid` mediumint unsigned NOT NULL DEFAULT 0 COMMENT 'User id', + `uid` mediumint unsigned NOT NULL DEFAULT 0 COMMENT 'Owner User id', `link` varchar(255) NOT NULL DEFAULT '' COMMENT '', - `iid` int unsigned NOT NULL DEFAULT 0 COMMENT '', + `iid` int unsigned NOT NULL DEFAULT 0 COMMENT 'item.id', `parent` int unsigned NOT NULL DEFAULT 0 COMMENT '', `seen` boolean NOT NULL DEFAULT '0' COMMENT '', `verb` varchar(100) NOT NULL DEFAULT '' COMMENT '', `otype` varchar(10) NOT NULL DEFAULT '' COMMENT '', - `name_cache` tinytext COMMENT '', - `msg_cache` mediumtext COMMENT '', + `name_cache` tinytext COMMENT 'Cached bbcode parsing of name', + `msg_cache` mediumtext COMMENT 'Cached bbcode parsing of msg', PRIMARY KEY(`id`), INDEX `hash_uid` (`hash`,`uid`), INDEX `seen_uid_date` (`seen`,`uid`,`date`), @@ -649,7 +649,7 @@ CREATE TABLE IF NOT EXISTS `notify` ( -- TABLE notify-threads -- CREATE TABLE IF NOT EXISTS `notify-threads` ( - `id` int unsigned NOT NULL auto_increment COMMENT '', + `id` int unsigned NOT NULL auto_increment COMMENT 'sequential ID', `notify-id` int unsigned NOT NULL DEFAULT 0 COMMENT '', `master-parent-item` int unsigned NOT NULL DEFAULT 0 COMMENT '', `parent-item` int unsigned NOT NULL DEFAULT 0 COMMENT '', @@ -661,10 +661,10 @@ CREATE TABLE IF NOT EXISTS `notify-threads` ( -- TABLE oembed -- CREATE TABLE IF NOT EXISTS `oembed` ( - `url` varbinary(255) NOT NULL COMMENT '', - `maxwidth` mediumint unsigned NOT NULL COMMENT '', - `content` mediumtext COMMENT '', - `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', + `url` varbinary(255) NOT NULL COMMENT 'page url', + `maxwidth` mediumint unsigned NOT NULL COMMENT 'Maximum width passed to Oembed', + `content` mediumtext COMMENT 'OEmbed data of the page', + `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'datetime of creation', PRIMARY KEY(`url`,`maxwidth`), INDEX `created` (`created`) ) DEFAULT COLLATE utf8mb4_general_ci; @@ -673,11 +673,11 @@ CREATE TABLE IF NOT EXISTS `oembed` ( -- TABLE parsed_url -- CREATE TABLE IF NOT EXISTS `parsed_url` ( - `url` varbinary(255) NOT NULL COMMENT '', - `guessing` boolean NOT NULL DEFAULT '0' COMMENT '', - `oembed` boolean NOT NULL DEFAULT '0' COMMENT '', - `content` mediumtext COMMENT '', - `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', + `url` varbinary(255) NOT NULL COMMENT 'page url', + `guessing` boolean NOT NULL DEFAULT '0' COMMENT 'is the \'guessing\' mode active?', + `oembed` boolean NOT NULL DEFAULT '0' COMMENT 'is the data the result of oembed?', + `content` mediumtext COMMENT 'page data', + `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'datetime of creation', PRIMARY KEY(`url`,`guessing`,`oembed`), INDEX `created` (`created`) ) DEFAULT COLLATE utf8mb4_general_ci; @@ -710,16 +710,16 @@ CREATE TABLE IF NOT EXISTS `pconfig` ( -- TABLE photo -- CREATE TABLE IF NOT EXISTS `photo` ( - `id` int unsigned NOT NULL auto_increment COMMENT '', - `uid` mediumint unsigned NOT NULL DEFAULT 0 COMMENT 'User id', - `contact-id` int unsigned NOT NULL DEFAULT 0 COMMENT '', - `guid` char(16) NOT NULL DEFAULT '' COMMENT '', + `id` int unsigned NOT NULL auto_increment COMMENT 'sequential ID', + `uid` mediumint unsigned NOT NULL DEFAULT 0 COMMENT 'Owner User id', + `contact-id` int unsigned NOT NULL DEFAULT 0 COMMENT 'contact.id', + `guid` char(16) NOT NULL DEFAULT '' COMMENT 'A unique identifier for this photo', `resource-id` char(32) NOT NULL DEFAULT '' COMMENT '', - `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', - `edited` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', + `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'creation date', + `edited` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'last edited date', `title` varchar(255) NOT NULL DEFAULT '' COMMENT '', `desc` text COMMENT '', - `album` varchar(255) NOT NULL DEFAULT '' COMMENT '', + `album` varchar(255) NOT NULL DEFAULT '' COMMENT 'The name of the album to which the photo belongs', `filename` varchar(255) NOT NULL DEFAULT '' COMMENT '', `type` varchar(30) NOT NULL DEFAULT 'image/jpeg', `height` smallint unsigned NOT NULL DEFAULT 0 COMMENT '', @@ -728,10 +728,10 @@ CREATE TABLE IF NOT EXISTS `photo` ( `data` mediumblob NOT NULL COMMENT '', `scale` tinyint unsigned NOT NULL DEFAULT 0 COMMENT '', `profile` boolean NOT NULL DEFAULT '0' COMMENT '', - `allow_cid` mediumtext COMMENT '', - `allow_gid` mediumtext COMMENT '', - `deny_cid` mediumtext COMMENT '', - `deny_gid` mediumtext COMMENT '', + `allow_cid` mediumtext COMMENT 'Access Control - list of allowed contact.id \'<19><78>\'', + `allow_gid` mediumtext COMMENT 'Access Control - list of allowed groups', + `deny_cid` mediumtext COMMENT 'Access Control - list of denied contact.id', + `deny_gid` mediumtext COMMENT 'Access Control - list of denied groups', PRIMARY KEY(`id`), INDEX `contactid` (`contact-id`), INDEX `uid_contactid` (`uid`,`contact-id`), @@ -765,7 +765,7 @@ CREATE TABLE IF NOT EXISTS `poll` ( -- TABLE poll_result -- CREATE TABLE IF NOT EXISTS `poll_result` ( - `id` int unsigned NOT NULL auto_increment COMMENT '', + `id` int unsigned NOT NULL auto_increment COMMENT 'sequential ID', `poll_id` int unsigned NOT NULL DEFAULT 0, `choice` tinyint unsigned NOT NULL DEFAULT 0 COMMENT '', PRIMARY KEY(`id`), @@ -787,14 +787,14 @@ CREATE TABLE IF NOT EXISTS `process` ( -- TABLE profile -- CREATE TABLE IF NOT EXISTS `profile` ( - `id` int unsigned NOT NULL auto_increment COMMENT '', - `uid` mediumint unsigned NOT NULL DEFAULT 0 COMMENT 'User id', - `profile-name` varchar(255) NOT NULL DEFAULT '' COMMENT '', - `is-default` boolean NOT NULL DEFAULT '0' COMMENT '', - `hide-friends` boolean NOT NULL DEFAULT '0' COMMENT '', + `id` int unsigned NOT NULL auto_increment COMMENT 'sequential ID', + `uid` mediumint unsigned NOT NULL DEFAULT 0 COMMENT 'Owner User id', + `profile-name` varchar(255) NOT NULL DEFAULT '' COMMENT 'Name of the profile', + `is-default` boolean NOT NULL DEFAULT '0' COMMENT 'Mark this profile as default profile', + `hide-friends` boolean NOT NULL DEFAULT '0' COMMENT 'Hide friend list from viewers of this profile', `name` varchar(255) NOT NULL DEFAULT '' COMMENT '', - `pdesc` varchar(255) NOT NULL DEFAULT '' COMMENT '', - `dob` varchar(32) NOT NULL DEFAULT '0000-00-00' COMMENT '', + `pdesc` varchar(255) NOT NULL DEFAULT '' COMMENT 'Title or description', + `dob` varchar(32) NOT NULL DEFAULT '0000-00-00' COMMENT 'Day of birth', `address` varchar(255) NOT NULL DEFAULT '' COMMENT '', `locality` varchar(255) NOT NULL DEFAULT '' COMMENT '', `region` varchar(255) NOT NULL DEFAULT '' COMMENT '', @@ -827,8 +827,8 @@ CREATE TABLE IF NOT EXISTS `profile` ( `xmpp` varchar(255) NOT NULL DEFAULT '' COMMENT '', `photo` varchar(255) NOT NULL DEFAULT '' COMMENT '', `thumb` varchar(255) NOT NULL DEFAULT '' COMMENT '', - `publish` boolean NOT NULL DEFAULT '0' COMMENT '', - `net-publish` boolean NOT NULL DEFAULT '0' COMMENT '', + `publish` boolean NOT NULL DEFAULT '0' COMMENT 'publish default profile in local directory', + `net-publish` boolean NOT NULL DEFAULT '0' COMMENT 'publish profile in global directory', PRIMARY KEY(`id`), INDEX `uid_is-default` (`uid`,`is-default`) ) DEFAULT COLLATE utf8mb4_general_ci; @@ -837,9 +837,9 @@ CREATE TABLE IF NOT EXISTS `profile` ( -- TABLE profile_check -- CREATE TABLE IF NOT EXISTS `profile_check` ( - `id` int unsigned NOT NULL auto_increment COMMENT '', + `id` int unsigned NOT NULL auto_increment COMMENT 'sequential ID', `uid` mediumint unsigned NOT NULL DEFAULT 0 COMMENT 'User id', - `cid` int unsigned NOT NULL DEFAULT 0 COMMENT '', + `cid` int unsigned NOT NULL DEFAULT 0 COMMENT 'contact.id', `dfrn_id` varchar(255) NOT NULL DEFAULT '' COMMENT '', `sec` varchar(255) NOT NULL DEFAULT '' COMMENT '', `expire` int unsigned NOT NULL DEFAULT 0 COMMENT '', @@ -850,7 +850,7 @@ CREATE TABLE IF NOT EXISTS `profile_check` ( -- TABLE push_subscriber -- CREATE TABLE IF NOT EXISTS `push_subscriber` ( - `id` int unsigned NOT NULL auto_increment COMMENT '', + `id` int unsigned NOT NULL auto_increment COMMENT 'sequential ID', `uid` mediumint unsigned NOT NULL DEFAULT 0 COMMENT 'User id', `callback_url` varchar(255) NOT NULL DEFAULT '' COMMENT '', `topic` varchar(255) NOT NULL DEFAULT '' COMMENT '', @@ -868,7 +868,7 @@ CREATE TABLE IF NOT EXISTS `push_subscriber` ( -- TABLE queue -- CREATE TABLE IF NOT EXISTS `queue` ( - `id` int unsigned NOT NULL auto_increment COMMENT '', + `id` int unsigned NOT NULL auto_increment COMMENT 'sequential ID', `cid` int unsigned NOT NULL DEFAULT 0 COMMENT 'Message receiver', `network` char(4) NOT NULL DEFAULT '' COMMENT 'Receiver\'s network', `guid` varchar(255) NOT NULL DEFAULT '' COMMENT 'Unique GUID of the message', @@ -887,7 +887,7 @@ CREATE TABLE IF NOT EXISTS `queue` ( -- TABLE register -- CREATE TABLE IF NOT EXISTS `register` ( - `id` int unsigned NOT NULL auto_increment COMMENT '', + `id` int unsigned NOT NULL auto_increment COMMENT 'sequential ID', `hash` varchar(255) NOT NULL DEFAULT '' COMMENT '', `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', `uid` mediumint unsigned NOT NULL DEFAULT 0 COMMENT 'User id', @@ -901,7 +901,7 @@ CREATE TABLE IF NOT EXISTS `register` ( -- TABLE search -- CREATE TABLE IF NOT EXISTS `search` ( - `id` int unsigned NOT NULL auto_increment COMMENT '', + `id` int unsigned NOT NULL auto_increment COMMENT 'sequential ID', `uid` mediumint unsigned NOT NULL DEFAULT 0 COMMENT 'User id', `term` varchar(255) NOT NULL DEFAULT '' COMMENT '', PRIMARY KEY(`id`), @@ -912,7 +912,7 @@ CREATE TABLE IF NOT EXISTS `search` ( -- TABLE session -- CREATE TABLE IF NOT EXISTS `session` ( - `id` bigint unsigned NOT NULL auto_increment COMMENT '', + `id` bigint unsigned NOT NULL auto_increment COMMENT 'sequential ID', `sid` varbinary(255) NOT NULL DEFAULT '' COMMENT '', `data` text COMMENT '', `expire` int unsigned NOT NULL DEFAULT 0 COMMENT '', @@ -925,8 +925,8 @@ CREATE TABLE IF NOT EXISTS `session` ( -- TABLE sign -- CREATE TABLE IF NOT EXISTS `sign` ( - `id` int unsigned NOT NULL auto_increment COMMENT '', - `iid` int unsigned NOT NULL DEFAULT 0 COMMENT '', + `id` int unsigned NOT NULL auto_increment COMMENT 'sequential ID', + `iid` int unsigned NOT NULL DEFAULT 0 COMMENT 'item.id', `signed_text` mediumtext COMMENT '', `signature` text COMMENT '', `signer` varchar(255) NOT NULL DEFAULT '' COMMENT '', @@ -961,11 +961,11 @@ CREATE TABLE IF NOT EXISTS `term` ( -- TABLE thread -- CREATE TABLE IF NOT EXISTS `thread` ( - `iid` int unsigned NOT NULL DEFAULT 0 COMMENT '', + `iid` int unsigned NOT NULL DEFAULT 0 COMMENT 'sequential ID', `uid` mediumint unsigned NOT NULL DEFAULT 0 COMMENT 'User id', `contact-id` int unsigned NOT NULL DEFAULT 0 COMMENT '', - `owner-id` int unsigned NOT NULL DEFAULT 0 COMMENT '', - `author-id` int unsigned NOT NULL DEFAULT 0 COMMENT '', + `owner-id` int unsigned NOT NULL DEFAULT 0 COMMENT 'Item owner', + `author-id` int unsigned NOT NULL DEFAULT 0 COMMENT 'Item author', `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', `edited` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', `commented` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', @@ -1017,50 +1017,50 @@ CREATE TABLE IF NOT EXISTS `tokens` ( -- TABLE user -- CREATE TABLE IF NOT EXISTS `user` ( - `uid` mediumint unsigned NOT NULL auto_increment COMMENT '', + `uid` mediumint unsigned NOT NULL auto_increment COMMENT 'sequential ID', `parent-uid` mediumint unsigned NOT NULL DEFAULT 0 COMMENT 'The parent user that has full control about this user', - `guid` varchar(64) NOT NULL DEFAULT '' COMMENT '', - `username` varchar(255) NOT NULL DEFAULT '' COMMENT '', - `password` varchar(255) NOT NULL DEFAULT '' COMMENT '', + `guid` varchar(64) NOT NULL DEFAULT '' COMMENT 'A unique identifier for this user', + `username` varchar(255) NOT NULL DEFAULT '' COMMENT 'Name that this user is known by', + `password` varchar(255) NOT NULL DEFAULT '' COMMENT 'encrypted password', `legacy_password` boolean NOT NULL DEFAULT '0' COMMENT 'Is the password hash double-hashed?', - `nickname` varchar(255) NOT NULL DEFAULT '' COMMENT '', - `email` varchar(255) NOT NULL DEFAULT '' COMMENT '', + `nickname` varchar(255) NOT NULL DEFAULT '' COMMENT 'nick- and user name', + `email` varchar(255) NOT NULL DEFAULT '' COMMENT 'the users email address', `openid` varchar(255) NOT NULL DEFAULT '' COMMENT '', - `timezone` varchar(128) NOT NULL DEFAULT '' COMMENT '', - `language` varchar(32) NOT NULL DEFAULT 'en' COMMENT '', - `register_date` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', - `login_date` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', - `default-location` varchar(255) NOT NULL DEFAULT '' COMMENT '', - `allow_location` boolean NOT NULL DEFAULT '0' COMMENT '', - `theme` varchar(255) NOT NULL DEFAULT '' COMMENT '', - `pubkey` text COMMENT '', - `prvkey` text COMMENT '', + `timezone` varchar(128) NOT NULL DEFAULT '' COMMENT 'PHP-legal timezone', + `language` varchar(32) NOT NULL DEFAULT 'en' COMMENT 'default language', + `register_date` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'timestamp of registration', + `login_date` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'timestamp of last login', + `default-location` varchar(255) NOT NULL DEFAULT '' COMMENT 'Default for item.location', + `allow_location` boolean NOT NULL DEFAULT '0' COMMENT '1 allows to display the location', + `theme` varchar(255) NOT NULL DEFAULT '' COMMENT 'user theme preference', + `pubkey` text COMMENT 'RSA public key 4096 bit', + `prvkey` text COMMENT 'RSA private key 4096 bit', `spubkey` text COMMENT '', `sprvkey` text COMMENT '', - `verified` boolean NOT NULL DEFAULT '0' COMMENT '', - `blocked` boolean NOT NULL DEFAULT '0' COMMENT '', - `blockwall` boolean NOT NULL DEFAULT '0' COMMENT '', - `hidewall` boolean NOT NULL DEFAULT '0' COMMENT '', - `blocktags` boolean NOT NULL DEFAULT '0' COMMENT '', - `unkmail` boolean NOT NULL DEFAULT '0' COMMENT '', + `verified` boolean NOT NULL DEFAULT '0' COMMENT 'user is verified through email', + `blocked` boolean NOT NULL DEFAULT '0' COMMENT '1 for user is blocked', + `blockwall` boolean NOT NULL DEFAULT '0' COMMENT 'Prohibit contacts to post to the profile page of the user', + `hidewall` boolean NOT NULL DEFAULT '0' COMMENT 'Hide profile details from unkown viewers', + `blocktags` boolean NOT NULL DEFAULT '0' COMMENT 'Prohibit contacts to tag the post of this user', + `unkmail` boolean NOT NULL DEFAULT '0' COMMENT 'Permit unknown people to send private mails to this user', `cntunkmail` int unsigned NOT NULL DEFAULT 10 COMMENT '', - `notify-flags` smallint unsigned NOT NULL DEFAULT 65535 COMMENT '', - `page-flags` tinyint unsigned NOT NULL DEFAULT 0 COMMENT '', + `notify-flags` smallint unsigned NOT NULL DEFAULT 65535 COMMENT 'email notification options', + `page-flags` tinyint unsigned NOT NULL DEFAULT 0 COMMENT 'page/profile type', `account-type` tinyint unsigned NOT NULL DEFAULT 0 COMMENT '', `prvnets` boolean NOT NULL DEFAULT '0' COMMENT '', `pwdreset` varchar(255) COMMENT 'Password reset request token', `pwdreset_time` datetime COMMENT 'Timestamp of the last password reset request', `maxreq` int unsigned NOT NULL DEFAULT 10 COMMENT '', `expire` int unsigned NOT NULL DEFAULT 0 COMMENT '', - `account_removed` boolean NOT NULL DEFAULT '0' COMMENT '', + `account_removed` boolean NOT NULL DEFAULT '0' COMMENT 'if 1 the account is removed', `account_expired` boolean NOT NULL DEFAULT '0' COMMENT '', - `account_expires_on` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', - `expire_notification_sent` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', + `account_expires_on` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'timestamp when account expires and will be deleted', + `expire_notification_sent` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'timestamp of last warning of account expiration', `def_gid` int unsigned NOT NULL DEFAULT 0 COMMENT '', - `allow_cid` mediumtext COMMENT '', - `allow_gid` mediumtext COMMENT '', - `deny_cid` mediumtext COMMENT '', - `deny_gid` mediumtext COMMENT '', + `allow_cid` mediumtext COMMENT 'default permission for this user', + `allow_gid` mediumtext COMMENT 'default permission for this user', + `deny_cid` mediumtext COMMENT 'default permission for this user', + `deny_gid` mediumtext COMMENT 'default permission for this user', `openidserver` text COMMENT '', PRIMARY KEY(`uid`), INDEX `nickname` (`nickname`(32)) @@ -1070,7 +1070,7 @@ CREATE TABLE IF NOT EXISTS `user` ( -- TABLE userd -- CREATE TABLE IF NOT EXISTS `userd` ( - `id` int unsigned NOT NULL auto_increment COMMENT '', + `id` int unsigned NOT NULL auto_increment COMMENT 'sequential ID', `username` varchar(255) NOT NULL COMMENT '', PRIMARY KEY(`id`), INDEX `username` (`username`(32)) @@ -1096,7 +1096,7 @@ CREATE TABLE IF NOT EXISTS `workerqueue` ( `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'Creation date', `pid` int unsigned NOT NULL DEFAULT 0 COMMENT 'Process id of the worker', `executed` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'Execution date', - `done` boolean NOT NULL DEFAULT '0' COMMENT 'Marked when the task was done, will be deleted later', + `done` boolean NOT NULL DEFAULT '0' COMMENT 'Marked 1 when the task was done - will be deleted later', PRIMARY KEY(`id`), INDEX `pid` (`pid`), INDEX `parameter` (`parameter`(64)), diff --git a/doc/Home.md b/doc/Home.md index 1d72a2600..0a41a4614 100644 --- a/doc/Home.md +++ b/doc/Home.md @@ -51,6 +51,7 @@ Friendica Documentation and Resources * [Translate Friendica](help/translations) * [Use Composer](help/Composer) * [Move classes to `src`](help/Developer-How-To-Move-Classes-to-src) + * [Run tests](help/Tests) * Reference * [Twitter/GNU Social API Functions](help/api) * [Code (Doxygen generated - sets cookies)](doc/html/) @@ -72,4 +73,3 @@ Friendica Documentation and Resources * [Site/Version Info](friendica) * [Friendica Credits](credits) - diff --git a/doc/Tests.md b/doc/Tests.md new file mode 100644 index 000000000..6acb4e783 --- /dev/null +++ b/doc/Tests.md @@ -0,0 +1,18 @@ +# Themes + +* [Home](help) + +You can run unit tests with [PHPUnit](https://phpunit.de/): + +```bash +phpunit +``` + +Some tests require access to a MySQL database. +You can specify the database credentials in environment variables: + +```bash +USER=database_user PASS=database_password DB=database_name phpunit +``` + +**Warning**: This will empty all the tables! Never use this on a production database. diff --git a/doc/de/Home.md b/doc/de/Home.md index 8e4be6bfc..31cce7aea 100644 --- a/doc/de/Home.md +++ b/doc/de/Home.md @@ -56,6 +56,7 @@ Friendica - Dokumentation und Ressourcen * [Code-Referenz (mit doxygen generiert - setzt Cookies)](doc/html/) * [Twitter/GNU Social API Functions](help/api) (EN) * [Translation of Friendica](help/translations) (EN) +* [Run tests](help/Tests) (EN) **Externe Ressourcen** @@ -72,4 +73,3 @@ Friendica - Dokumentation und Ressourcen * [Seite/Friendica-Version](friendica) * [Mitwirkenden bei Friendica](credits) - diff --git a/doc/de/Settings.md b/doc/de/Settings.md index 8a654e32c..b7b696ea6 100644 --- a/doc/de/Settings.md +++ b/doc/de/Settings.md @@ -344,6 +344,14 @@ Mit den folgenden Einstellungen kannst du die Zugriffsdaten für den Datenbank S $db_pass = 'db_password'; $db_data = 'database_name'; +Sollten alle der folgenden Environment-Variablen gesetzt sein, wird Friendica diese anstatt der vorher konfigurierten Werte nutzen. + + MYSQL_HOST + MYSQL_PORT + MYSQL_USERNAME + MYSQL_PASSWORD + MYSQL_DATABASE + ## Administratoren Du kannst einen, oder mehrere Accounts, zu Administratoren machen. diff --git a/doc/htconfig.md b/doc/htconfig.md index 6598fa142..4743da444 100644 --- a/doc/htconfig.md +++ b/doc/htconfig.md @@ -124,3 +124,11 @@ The configuration variables db_host, db_user, db_pass and db_data are holding yo If you need to specify a port to access the database, you can do so by appending ":portnumber" to the db_host variable. $db_host = 'your.mysqlhost.com:123456'; + +If all of the following environment variables are set, Friendica will use them instead of the previously configured variables for the db: + + MYSQL_HOST + MYSQL_PORT + MYSQL_USERNAME + MYSQL_PASSWORD + MYSQL_DATABASE diff --git a/include/api.php b/include/api.php index a70c18f3c..8ffe27e74 100644 --- a/include/api.php +++ b/include/api.php @@ -54,7 +54,7 @@ define('API_METHOD_POST', 'POST,PUT'); define('API_METHOD_DELETE', 'POST,DELETE'); $API = []; -$called_api = null; +$called_api = []; /** * It is not sufficient to use local_user() to check whether someone is allowed to use the API, @@ -935,7 +935,7 @@ function api_reformat_xml(&$item, &$key) * * @return string The XML data */ -function api_create_xml($data, $root_element) +function api_create_xml(array $data, $root_element) { $childname = key($data); $data2 = array_pop($data); @@ -960,7 +960,7 @@ function api_create_xml($data, $root_element) $i = 1; foreach ($data2 as $item) { - $data4[$i++.":".$childname] = $item; + $data4[$i++ . ":" . $childname] = $item; } $data2 = $data4; @@ -2216,7 +2216,7 @@ function api_statuses_repeat($type) } // this should output the last post (the one we just posted). - $called_api = null; + $called_api = []; return api_status_show($type); } @@ -2732,7 +2732,7 @@ function api_convert_item($item) * * @param string $body * - * @return array|false + * @return array */ function api_get_attachments(&$body) { @@ -2743,7 +2743,7 @@ function api_get_attachments(&$body) $ret = preg_match_all("/\[img\]([$URLSearchString]*)\[\/img\]/ism", $text, $images); if (!$ret) { - return false; + return []; } $attachments = []; @@ -4395,7 +4395,6 @@ function api_fr_photo_create_update($type) throw new InternalServerErrorException("unknown error - this error on uploading or updating a photo should never happen"); } - /** * @brief delete a single photo from the database through api * @@ -4534,6 +4533,7 @@ function api_account_update_profile_image($type) } else { throw new InternalServerErrorException('Unsupported filetype'); } + // change specified profile or all profiles to the new resource-id if ($is_default_profile) { $condition = ["`profile` AND `resource-id` != ? AND `uid` = ?", $data['photo']['id'], api_user()]; @@ -4547,7 +4547,6 @@ function api_account_update_profile_image($type) Contact::updateSelfFromUserID(api_user(), true); // Update global directory in background - //$user = api_get_user(get_app()); $url = System::baseUrl() . '/profile/' . get_app()->user['nickname']; if ($url && strlen(Config::get('system', 'directory'))) { Worker::add(PRIORITY_LOW, "Directory", $url); @@ -5289,27 +5288,27 @@ function api_in_reply_to($item) /** * - * @param string $Text + * @param string $text * * @return string */ -function api_clean_plain_items($Text) +function api_clean_plain_items($text) { $include_entities = strtolower(x($_REQUEST, 'include_entities') ? $_REQUEST['include_entities'] : "false"); - $Text = BBCode::cleanPictureLinks($Text); + $text = BBCode::cleanPictureLinks($text); $URLSearchString = "^\[\]"; - $Text = preg_replace("/([!#@])\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '$1$3', $Text); + $text = preg_replace("/([!#@])\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '$1$3', $text); if ($include_entities == "true") { - $Text = preg_replace("/\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '[url=$1]$1[/url]', $Text); + $text = preg_replace("/\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '[url=$1]$1[/url]', $text); } // Simplify "attachment" element - $Text = api_clean_attachments($Text); + $text = api_clean_attachments($text); - return($Text); + return $text; } /** diff --git a/include/conversation.php b/include/conversation.php index 7d9baa59d..5f56723e2 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -116,7 +116,7 @@ function localize_item(&$item) { $item['body'] = item_redir_and_replace_images($extracted['body'], $extracted['images'], $item['contact-id']); } - /// @Separted ??? + /// @TODO Separted ??? $xmlhead = "<" . "?xml version='1.0' encoding='UTF-8' ?" . ">"; if (activity_match($item['verb'], ACTIVITY_LIKE) || activity_match($item['verb'], ACTIVITY_DISLIKE) @@ -162,22 +162,19 @@ function localize_item(&$item) { if (activity_match($item['verb'], ACTIVITY_LIKE)) { $bodyverb = L10n::t('%1$s likes %2$s\'s %3$s'); - } - elseif (activity_match($item['verb'], ACTIVITY_DISLIKE)) { + } elseif (activity_match($item['verb'], ACTIVITY_DISLIKE)) { $bodyverb = L10n::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 = L10n::t('%1$s attends %2$s\'s %3$s'); - } - elseif (activity_match($item['verb'], ACTIVITY_ATTENDNO)) { + } elseif (activity_match($item['verb'], ACTIVITY_ATTENDNO)) { $bodyverb = L10n::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 = L10n::t('%1$s attends maybe %2$s\'s %3$s'); } - $item['body'] = sprintf($bodyverb, $author, $objauthor, $plink); + $item['body'] = sprintf($bodyverb, $author, $objauthor, $plink); } + if (activity_match($item['verb'], ACTIVITY_FRIEND)) { if ($item['object-type']=="" || $item['object-type']!== ACTIVITY_OBJ_PERSON) return; @@ -304,8 +301,8 @@ function localize_item(&$item) { $item['body'] = L10n::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'] == "") { return; } @@ -385,10 +382,9 @@ function visible_activity($item) { } } - if (activity_match($item['verb'], ACTIVITY_FOLLOW) && $item['object-type'] === ACTIVITY_OBJ_NOTE) { - if (!($item['self'] && ($item['uid'] == local_user()))) { - return false; - } + // @TODO below if() block can be rewritten to a single line: $isVisible = allConditionsHere; + if (activity_match($item['verb'], ACTIVITY_FOLLOW) && $item['object-type'] === ACTIVITY_OBJ_NOTE && empty($item['self']) && $item['uid'] == local_user()) { + return false; } return true; @@ -1081,7 +1077,7 @@ function builtin_activity_puller($item, &$conv_responses) { $url = '' . htmlentities($item['author-name']) . ''; - if (!$item['thr-parent']) { + if (!x($item, 'thr-parent')) { $item['thr-parent'] = $item['parent-uri']; } @@ -1569,19 +1565,17 @@ function sort_thr_commented(array $a, array $b) return strcmp($b['commented'], $a['commented']); } -/// @TODO Add type-hint -function render_location_dummy($item) { - if ($item['location'] != "") { +function render_location_dummy(array $item) { + if (x($item, 'location') && !empty($item['location'])) { return $item['location']; } - if ($item['coord'] != "") { + if (x($item, 'coord') && !empty($item['coord'])) { return $item['coord']; } } -/// @TODO Add type-hint -function get_responses($conv_responses, $response_verbs, $ob, $item) { +function get_responses(array $conv_responses, array $response_verbs, $ob, array $item) { $ret = []; foreach ($response_verbs as $v) { $ret[$v] = []; diff --git a/include/dba.php b/include/dba.php index e64575538..aa63a5b36 100644 --- a/include/dba.php +++ b/include/dba.php @@ -92,6 +92,15 @@ class dba { return self::$connected; } + /** + * Return the database object. + * @return PDO|mysqli + */ + public static function get_db() + { + return self::$db; + } + /** * @brief Returns the MySQL server version string * diff --git a/include/items.php b/include/items.php index 4533b6077..c54869c3e 100644 --- a/include/items.php +++ b/include/items.php @@ -274,6 +274,7 @@ function consume_feed($xml, $importer, $contact, &$hub, $datedir = 0, $pass = 0) function subscribe_to_hub($url, $importer, $contact, $hubmode = 'subscribe') { $a = get_app(); + $r = null; if (is_array($importer)) { $r = q("SELECT `nickname` FROM `user` WHERE `uid` = %d LIMIT 1", diff --git a/include/security.php b/include/security.php index b13a507cf..bcfddf887 100644 --- a/include/security.php +++ b/include/security.php @@ -254,6 +254,7 @@ function can_write_wall($owner) return false; } +/// @TODO $groups should be array function permissions_sql($owner_id, $remote_verified = false, $groups = null) { $local_user = local_user(); @@ -275,6 +276,13 @@ function permissions_sql($owner_id, $remote_verified = false, $groups = null) */ if ($local_user && $local_user == $owner_id) { $sql = ''; + /** + * Authenticated visitor. Unless pre-verified, + * check that the contact belongs to this $owner_id + * and load the groups the visitor belongs to. + * If pre-verified, the caller is expected to have already + * done this and passed the groups into this function. + */ } elseif ($remote_user) { /* * Authenticated visitor. Unless pre-verified, @@ -298,9 +306,10 @@ function permissions_sql($owner_id, $remote_verified = false, $groups = null) if ($remote_verified) { $gs = '<<>>'; // should be impossible to match - if (is_array($groups) && count($groups)) { - foreach ($groups as $g) + if (is_array($groups)) { + foreach ($groups as $g) { $gs .= '|<' . intval($g) . '>'; + } } $sql = sprintf( diff --git a/include/text.php b/include/text.php index 6830f91e0..53eae1ff3 100644 --- a/include/text.php +++ b/include/text.php @@ -152,7 +152,7 @@ function autoname($len) { 'nd','ng','nk','nt','rn','rp','rt']; $noend = ['bl', 'br', 'cl','cr','dr','fl','fr','gl','gr', - 'kh', 'kl','kr','mn','pl','pr','rh','tr','qu','wh']; + 'kh', 'kl','kr','mn','pl','pr','rh','tr','qu','wh','q']; $start = mt_rand(0,2); if ($start == 0) { @@ -178,14 +178,13 @@ function autoname($len) { $word = substr($word,0,$len); foreach ($noend as $noe) { - if ((strlen($word) > 2) && (substr($word, -2) == $noe)) { - $word = substr($word, 0, -1); + $noelen = strlen($noe); + if ((strlen($word) > $noelen) && (substr($word, -$noelen) == $noe)) { + $word = autoname($len); break; } } - if (substr($word, -1) == 'q') { - $word = substr($word, 0, -1); - } + return $word; } @@ -453,7 +452,7 @@ function perms2str($p) { if (is_array($p)) { $tmp = $p; } else { - $tmp = explode(',',$p); + $tmp = explode(',', $p); } if (is_array($tmp)) { @@ -1661,10 +1660,11 @@ function bb_translate_video($s) { $r = preg_match_all("/\[video\](.*?)\[\/video\]/ism",$s,$matches,PREG_SET_ORDER); if ($r) { foreach ($matches as $mtch) { - if ((stristr($mtch[1],'youtube')) || (stristr($mtch[1],'youtu.be'))) - $s = str_replace($mtch[0],'[youtube]' . $mtch[1] . '[/youtube]',$s); - elseif (stristr($mtch[1],'vimeo')) - $s = str_replace($mtch[0],'[vimeo]' . $mtch[1] . '[/vimeo]',$s); + if ((stristr($mtch[1], 'youtube')) || (stristr($mtch[1], 'youtu.be'))) { + $s = str_replace($mtch[0], '[youtube]' . $mtch[1] . '[/youtube]', $s); + } elseif (stristr($mtch[1], 'vimeo')) { + $s = str_replace($mtch[0], '[vimeo]' . $mtch[1] . '[/vimeo]', $s); + } } } return $s; @@ -1782,7 +1782,7 @@ function file_tag_file_query($table,$s,$type = 'file') { } // ex. given music,video return