diff --git a/.codecov.yml b/.codecov.yml new file mode 100644 index 0000000000..0c54747c95 --- /dev/null +++ b/.codecov.yml @@ -0,0 +1,14 @@ +codecov: + branch: develop + ci: + - drone.friendi.ca + +coverage: + precision: 2 + round: down + range: "70...100" + status: + project: off + patch: off + +comment: off diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000000..65211da2cf --- /dev/null +++ b/.drone.yml @@ -0,0 +1,439 @@ +kind: pipeline +name: mysql8.0-php7.1 + +steps: +- name: mysql8.0-php7.1 + image: friendicaci/php7.1:php7.1.32 + commands: + - NOCOVERAGE=true ./autotest.sh mysql + environment: + MYSQL_USERNAME: friendica + MYSQL_PASSWORD: friendica + MYSQL_DATABASE: friendica + MYSQL_HOST: mysql + +services: +- name: mysql + image: mysql:8.0 + command: [ "--default-authentication-plugin=mysql_native_password" ] + environment: + MYSQL_ROOT_PASSWORD: friendica + MYSQL_USER: friendica + MYSQL_PASSWORD: friendica + MYSQL_DATABASE: friendica + volumes: + - name: cache + path: /var/lib/mysql + +volumes: +- name: cache + temp: {} + +trigger: + branch: + - master + - develop + - "*-rc" + event: + - pull_request + - push +--- +kind: pipeline +name: mysql8.0-php7.2 + +steps: +- name: mysql8.0-php7.2 + image: friendicaci/php7.2:php7.2.22 + commands: + - NOCOVERAGE=true ./autotest.sh mysql + environment: + MYSQL_USERNAME: friendica + MYSQL_PASSWORD: friendica + MYSQL_DATABASE: friendica + MYSQL_HOST: mysql + +services: +- name: mysql + image: mysql:8.0 + command: [ "--default-authentication-plugin=mysql_native_password" ] + environment: + MYSQL_ROOT_PASSWORD: friendica + MYSQL_USER: friendica + MYSQL_PASSWORD: friendica + MYSQL_DATABASE: friendica + volumes: + - name: cache + path: /var/lib/mysql + +volumes: + - name: cache + temp: {} + +trigger: + branch: + - master + - develop + - "*-rc" + event: + - pull_request + - push +--- +kind: pipeline +name: mysql8.0-php7.3 + +steps: +- name: mysql8.0-php7.3 + image: friendicaci/php7.3:php7.3.9 + commands: + - NOCOVERAGE=true ./autotest.sh mysql + environment: + MYSQL_USERNAME: friendica + MYSQL_PASSWORD: friendica + MYSQL_DATABASE: friendica + MYSQL_HOST: mysql + +services: +- name: mysql + image: mysql:8.0 + command: [ "--default-authentication-plugin=mysql_native_password" ] + environment: + MYSQL_ROOT_PASSWORD: friendica + MYSQL_USER: friendica + MYSQL_PASSWORD: friendica + MYSQL_DATABASE: friendica + volumes: + - name: cache + path: /var/lib/mysql + +volumes: + - name: cache + temp: {} + +trigger: + branch: + - master + - develop + - "*-rc" + event: + - pull_request + - push +--- +kind: pipeline +name: mariadb10.1-php7.1 + +steps: +- name: mariadb10.1-php7.1 + image: friendicaci/php7.1:php7.1.32 + commands: + - phpenmod xdebug + - sleep 20 + - ./autotest.sh mariadb + - wget https://codecov.io/bash -O codecov.sh + - sh -c "if [ '$DRONE_BUILD_EVENT' = 'pull_request' ]; then bash codecov.sh -B $DRONE_BRANCH -C $DRONE_COMMIT -P $DRONE_PULL_REQUEST -t 5ce7d64e-07b4-4adf-8700-e2eae27e14ec -f tests/autotest-clover.xml; fi" + - sh -c "if [ '$DRONE_BUILD_EVENT' != 'pull_request' ]; then bash codecov.sh -B $DRONE_BRANCH -C $DRONE_COMMIT -t 5ce7d64e-07b4-4adf-8700-e2eae27e14ec -f tests/autotest-clover.xml; fi" + environment: + MYSQL_USER: friendica + MYSQL_PASSWORD: friendica + MYSQL_DATABASE: friendica + MYSQL_HOST: mariadb + +services: +- name: mariadb + image: mariadb:10.1 + environment: + MYSQL_ROOT_PASSWORD: friendica + MYSQL_USER: friendica + MYSQL_PASSWORD: friendica + MYSQL_DATABASE: friendica + volumes: + - name: cache + path: /var/lib/mysql + +volumes: + - name: cache + temp: {} + +trigger: + branch: + - master + - develop + - "*-rc" + event: + - pull_request + - push +--- +kind: pipeline +name: mariadb10.1-php7.2 + +steps: +- name: mariadb10.1-php7.2 + image: friendicaci/php7.2:php7.2.22 + commands: + - NOCOVERAGE=true ./autotest.sh mariadb + environment: + MYSQL_USER: friendica + MYSQL_PASSWORD: friendica + MYSQL_DATABASE: friendica + MYSQL_HOST: mariadb + +services: +- name: mariadb + image: mariadb:10.1 + environment: + MYSQL_ROOT_PASSWORD: friendica + MYSQL_USER: friendica + MYSQL_PASSWORD: friendica + MYSQL_DATABASE: friendica + volumes: + - name: cache + path: /var/lib/mysql + +volumes: + - name: cache + temp: {} + +trigger: + branch: + - master + - develop + - "*-rc" + event: + - pull_request + - push +--- +kind: pipeline +name: mariadb10.1-php7.3 + +steps: +- name: mariadb10.1-php7.3 + image: friendicaci/php7.3:php7.3.9 + commands: + - NOCOVERAGE=true ./autotest.sh mariadb + environment: + MYSQL_USER: friendica + MYSQL_PASSWORD: friendica + MYSQL_DATABASE: friendica + MYSQL_HOST: mariadb + +services: +- name: mariadb + image: mariadb:10.1 + environment: + MYSQL_ROOT_PASSWORD: friendica + MYSQL_USER: friendica + MYSQL_PASSWORD: friendica + MYSQL_DATABASE: friendica + volumes: + - name: cache + path: /var/lib/mysql + +volumes: + - name: cache + temp: {} + +--- +kind: pipeline +name: redis-php7.1 + +steps: +- name: redis-php7.1 + image: friendicaci/php7.1:php7.1.32 + commands: + - phpenmod xdebug + - sleep 20 + - NOINSTALL=true TEST_SELECTION=REDIS ./autotest.sh mysql + - wget https://codecov.io/bash -O codecov.sh + - sh -c "if [ '$DRONE_BUILD_EVENT' = 'pull_request' ]; then bash codecov.sh -B $DRONE_BRANCH -C $DRONE_COMMIT -P $DRONE_PULL_REQUEST -t 5ce7d64e-07b4-4adf-8700-e2eae27e14ec -f tests/autotest-clover.xml; fi" + - sh -c "if [ '$DRONE_BUILD_EVENT' != 'pull_request' ]; then bash codecov.sh -B $DRONE_BRANCH -C $DRONE_COMMIT -t 5ce7d64e-07b4-4adf-8700-e2eae27e14ec -f tests/autotest-clover.xml; fi" + environment: + REDIS_HOST: redis + +services: +- name: redis + image: redis + +trigger: + branch: + - master + - develop + - "*-rc" + event: + - pull_request + - push +--- +kind: pipeline +name: redis-php7.2 + +steps: +- name: redis-php7.2 + image: friendicaci/php7.2:php7.2.22 + commands: + - NOCOVERAGE=true NOINSTALL=true TEST_SELECTION=REDIS ./autotest.sh mysql + environment: + REDIS_HOST: redis + +services: +- name: redis + image: redis + +trigger: + branch: + - master + - develop + - "*-rc" + event: + - pull_request + - push +--- +kind: pipeline +name: redis-php7.3 + +steps: +- name: redis-php7.3 + image: friendicaci/php7.3:php7.3.9 + commands: + - NOCOVERAGE=true NOINSTALL=true TEST_SELECTION=REDIS ./autotest.sh mysql + environment: + REDIS_HOST: redis + +services: +- name: redis + image: redis + +--- +kind: pipeline +name: memcache-php7.1 + +steps: +- name: memcache-php7.1 + image: friendicaci/php7.1:php7.1.32 + commands: + - phpenmod xdebug + - sleep 20 + - NOINSTALL=true TEST_SELECTION=MEMCACHE ./autotest.sh mysql + - wget https://codecov.io/bash -O codecov.sh + - sh -c "if [ '$DRONE_BUILD_EVENT' = 'pull_request' ]; then bash codecov.sh -B $DRONE_BRANCH -C $DRONE_COMMIT -P $DRONE_PULL_REQUEST -t 5ce7d64e-07b4-4adf-8700-e2eae27e14ec -f tests/autotest-clover.xml; fi" + - sh -c "if [ '$DRONE_BUILD_EVENT' != 'pull_request' ]; then bash codecov.sh -B $DRONE_BRANCH -C $DRONE_COMMIT -t 5ce7d64e-07b4-4adf-8700-e2eae27e14ec -f tests/autotest-clover.xml; fi" + environment: + MEMCACHE_HOST: memcached + +services: +- name: memcached + image: memcached + +trigger: + branch: + - master + - develop + - "*-rc" + event: + - pull_request + - push +--- +kind: pipeline +name: memcache-php7.2 + +steps: +- name: memcache-php7.2 + image: friendicaci/php7.2:php7.2.22 + commands: + - NOCOVERAGE=true NOINSTALL=true TEST_SELECTION=MEMCACHE ./autotest.sh mysql + environment: + MEMCACHE_HOST: memcached + +services: +- name: memcached + image: memcached + +trigger: + branch: + - master + - develop + - "*-rc" + event: + - pull_request + - push +--- +kind: pipeline +name: memcache-php7.3 + +steps: +- name: memcache-php7.3 + image: friendicaci/php7.3:php7.3.9 + commands: + - NOCOVERAGE=true NOINSTALL=true TEST_SELECTION=MEMCACHE ./autotest.sh mysql + environment: + MEMCACHE_HOST: memcached + +services: +- name: memcached + image: memcached + +--- +kind: pipeline +name: memcached-php7.1 + +steps: +- name: memcached-php7.1 + image: friendicaci/php7.1:php7.1.32 + commands: + - phpenmod xdebug + - sleep 20 + - NOINSTALL=true TEST_SELECTION=MEMCACHED ./autotest.sh mysql + - wget https://codecov.io/bash -O codecov.sh + - sh -c "if [ '$DRONE_BUILD_EVENT' = 'pull_request' ]; then bash codecov.sh -B $DRONE_BRANCH -C $DRONE_COMMIT -P $DRONE_PULL_REQUEST -t 5ce7d64e-07b4-4adf-8700-e2eae27e14ec -f tests/autotest-clover.xml; fi" + - sh -c "if [ '$DRONE_BUILD_EVENT' != 'pull_request' ]; then bash codecov.sh -B $DRONE_BRANCH -C $DRONE_COMMIT -t 5ce7d64e-07b4-4adf-8700-e2eae27e14ec -f tests/autotest-clover.xml; fi" + environment: + MEMCACHED_HOST: memcached + +services: +- name: memcached + image: memcached + +trigger: + branch: + - master + - develop + - "*-rc" + event: + - pull_request + - push +--- +kind: pipeline +name: memcached-php7.2 + +steps: +- name: memcached-php7.2 + image: friendicaci/php7.2:php7.2.22 + commands: + - NOCOVERAGE=true NOINSTALL=true TEST_SELECTION=MEMCACHED ./autotest.sh mysql + environment: + MEMCACHED_HOST: memcached + +services: +- name: memcached + image: memcached + +trigger: + branch: + - master + - develop + - "*-rc" + event: + - pull_request + - push +--- +kind: pipeline +name: memcached-php7.3 + +steps: +- name: memcached-php7.3 + image: friendicaci/php7.3:php7.3.9 + commands: + - NOCOVERAGE=true NOINSTALL=true TEST_SELECTION=MEMCACHED ./autotest.sh mysql + environment: + MEMCACHED_HOST: memcached + +services: +- name: memcached + image: memcached diff --git a/.gitattributes b/.gitattributes index 4be1c91852..18ba9e0758 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 8d86b95875..e70f651f53 100644 --- a/.gitignore +++ b/.gitignore @@ -1,60 +1,78 @@ -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 - -/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 \ No newline at end of file +favicon.* +/.htconfig.php +/.htpreconfig.php +\#* +*.log +*.out +*.version* +home.html +*~ +robots.txt + +#ignore local config +/config/local.config.php +/config/addon.config.php +/config/local.ini.php +/config/addon.ini.php + +#ignore documentation, it should be newly built +/doc/html + +#ignore reports, should be generated 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 +/addon + +#ignore .htaccess +.htaccess + +#ignore filesystem storage default path +/storage + +#Ignore log folder +/log diff --git a/.htaccess b/.htaccess-dist similarity index 96% rename from .htaccess rename to .htaccess-dist index 2348cdc38b..a671cc680a 100644 --- a/.htaccess +++ b/.htaccess-dist @@ -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 d68b7727e8..376748bcb9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,29 @@ --- language: php -## Friendica supports PHP version >= 5.6 +## Friendica officially supports PHP version >= 7.1 php: - - 5.6 - - 7.0 - 7.1 - 7.2 + - 7.3 -install: composer install +services: + - mysql + - redis-server + - memcached +env: + - MYSQL_HOST=localhost MYSQL_PORT=3306 MYSQL_USERNAME=travis MYSQL_PASSWORD= MYSQL_DATABASE=test + +install: + - composer install +before_script: + - cp config/local-sample.config.php config/local.config.php + - mysql -e 'CREATE DATABASE IF NOT EXISTS test;' + - mysql -utravis test < database.sql + - pecl channel-update pecl.php.net + - pecl config-set preferred_state beta + - if [[ $TRAVIS_PHP_VERSION != "7.1" ]]; then echo yes | pecl upgrade apcu; fi + - if [[ $TRAVIS_PHP_VERSION != "7.1" ]]; then phpenv config-add .travis/apcu.ini; fi + - phpenv config-add .travis/redis.ini + - phpenv config-add .travis/memcached.ini + +script: vendor/bin/phpunit --configuration tests/phpunit.xml diff --git a/.travis/apcu.ini b/.travis/apcu.ini new file mode 100644 index 0000000000..92598662cf --- /dev/null +++ b/.travis/apcu.ini @@ -0,0 +1,4 @@ +extension="apcu.so" + +apc.enabled = 1 +apc.enable_cli = 1 \ No newline at end of file diff --git a/.travis/memcached.ini b/.travis/memcached.ini new file mode 100644 index 0000000000..c9a2ff0c9a --- /dev/null +++ b/.travis/memcached.ini @@ -0,0 +1 @@ +extension="memcached.so" \ No newline at end of file diff --git a/.travis/redis.ini b/.travis/redis.ini new file mode 100644 index 0000000000..ab995b8374 --- /dev/null +++ b/.travis/redis.ini @@ -0,0 +1 @@ +extension="redis.so" \ No newline at end of file diff --git a/.tx/config b/.tx/config index b42998b861..d639642dec 100644 --- a/.tx/config +++ b/.tx/config @@ -3,7 +3,7 @@ host = https://www.transifex.com [friendica.messagespo] file_filter = view/lang//messages.po -source_file = util/messages.po +source_file = view/lang/C/messages.po source_lang = en type = PO diff --git a/CHANGELOG b/CHANGELOG index cc7eedfff5..9f253c8108 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,585 @@ +Version 2019.12-dev (unreleased) + Friendica Core: + Enhanced the manage functionality [annando] + Fixed some problems with the remote auth functionality [annando] + Added router configuration file [nupplaphil] + Added drone.io as CI service [nupplaphil] + + Friendica Addons: + mailstream: + Support for new img format was added [mexon] + BB Code is now included as plaintext [mexon] + Logging format is enhanced [mexon] + ActivityPub "announce" notifications are not included [mexon] + + Closed Issues: + 1071, 7548, 7657, 7681 + +Version 2019.09 (2019-09-29) + Friendica Core: + Update to the translations (CS, DE, EN GB, EN US, FR, JA, NL, PL) [translation teams] + Update to the themes (frio, vier) [JeroenED, MrPetovan, tobiasd, vinzv] + Update to the documentation [annando, tobiasd, guzzisti, vinzv] + Enhanced the log output of the background process [annando] + Enhanced the vcard translation in the profile [JeroenED] + Enhanced the delivery count [annando] + Enhanced ActivityPub envelopes [MrPetovan] + Enhanced communication about deleted accounts via AP [annando] + Enhanced the following process [annando] + Enhanced the tests [nupplaphil] + Enhanced the front-end worker [annando] + Enhanced the img format to allow alternative texts [annando] + Enhanced the detection of supported protocols for contacts [annando] + Enhanced the re-share of items [annando] + Enhanced 2FA process [MrPetovan] + Enhanced server wide theme settings [MrPetovan] + Enhanced config loading process [MrPetovan, nupplaphil] + Enhanced handling of emoticons [MrPetovan] + Enhanced performance [annando] + Fixed a bug in the admin panel leading to orphaned options [tobiasd] + Fixed a problem that could lead to duplicated Pleroma contacts [annando] + Fixed a problem with the hide profile setting [annando] + Fixed the problem sending out the post when hitting the enter key in the ACL dialog [MrPetovan] + Fixed a bug in HTML special character escaping of event titles [MrPetovan] + Fixed a bug in HTML special character conversion in item titles [MrPetovan] + Fixed a bug in the auto linker for URLs [MrPetovan] + Fixed a bug that prevented the display of images in some postings from diaspora* [MrPetovan] + Fixed a bug in setting the permissions on uploaded images [annando] + Fixed a bug that lead to potentially unwanted importing threads started by contacts of contacts [annando] + Fixed implicit self mentions [MrPetovan] + Fixed display of register links on closed nodes landing pages [MrPetovan] + Fixed the display of [spoiler] tags [MrPetovan] + Fixed an issue with photo permissions in private mails [annando] + Fixed a bug in the process of following Pleroma accounts [annando] + Fixed a bug that caused notifications about locally deleted items [annando] + Fixed the link to the source of an event [MrPetovan] + Fixed a problem that caused authors from twitter postings having no profile pic [annando] + Fixed a bug in BBCode -> Markdown conversation for font size [annando] + Fixed a BBCode parser problem with the audio tag [MrPetovan] + Fixed a session problem [annando] + Fixed a problem with the auto-installer [nupplaphil] + Fixed a bug with magic links redirection for non profiles [annando] + General code cleaning [annando, MrPetovan, nupplaphil] + Removed contacts auto completion (in /contacts [MrPetovan] + Replaced FontAwesome by ForkAwesome in frio theme [vinzv] + Added new compose page for the frio theme [MrPetovan] + Added new console command: lock [nupplaphil] + Added new additional feature to show trending tags on community page [MrPetovan] + Added support of image descriptions [annando] + Added support of wildcards to server block lists [MrPetovan] + Added app specific passwords when using 2FA [MrPetovan] + Added fetching of postings via URL to interact with public postings [annando] + Added opt-out flag for federated search engines and associated header information for profiles [annando] + + Friendica Addons: + Update to the translation (CS, DE, EN GB, EN US, ES, FR, JA, NL SV) [translation teams] + General code cleanup [nupplaphil, Quix0r] + blockbot: + Added translations + Added more bots [annando] + Added admin panel settings [annando] + tumblr: + Changed used URLs to https adopting tumblrs change [annando] + twitter: + Enhanced handling of multi image postings [annando] + Enhanced display of quoted tweets [MrPetovan] + Added alternative text support for images [annando] + + Closed Issues: + 870, 1605, 2199, 3239, 3816, 4117, 4815, 5721, 6384, 6521, 6553, + 6675, 7212, 7235, 7285, 7293, 7314, 7317, 7337, 7338, 7346, 7350, + 7367, 7383, 7396, 7397, 7401, 7406, 7408, 7426, 7428, 7456, 7442, + 7457, 7468, 7471, 7473, 7488, 7497, 7498, 7501, 7507, 7521, 7526, + 7527, 7536, 7542, 7545, 7576, 7586, 7594, 7597, 7603, 7610, 7618, + 7629, 7635, 7638, 7663, 7665, 7672 + +Version 2019.06 (2019-06-23) + Friendica Core: + Update to the tranlation (CS, DE, EN-GB, EN-US, ET, FR, IT, PL, PT-BR, SV) [translation teams] + Update to the documentation [nupplaphil, realkinetix, MrPetovan] + Update to the themes (frio, vier) [BinkaDroid, MrPetovan, tobiasd] + Enhancements to the API [annando, MrPetovan] + Enhancements to the way reshares are handled [annando] + Enhancements to the redis configuration [nupplaphil] + Enhancements to the federation stats display in the admin panel [tobiasd] + Enhancements to the processing of changed storage engine [MrPetovan] + Enhancements to ActivityPub support [annando, MrPetovan] + Enhancements to code security [MrPetovan] + Enhancements to delivery counter [annando] + Fixed the notification order [JeroenED] + Fixed the timezone of Friendica logs [nupplaphil] + Fixed tag completion painfully slow [AlfredSK] + Fixed a regression in notifications [MrPetovan, annando] + Fixed an issue with smilies and code blocks [MrPetovan] + Fixed an AP issue with unavailable local profiles [MrPetovan] + Fixed an issue with the File to Folder feature [MrPetovan] + Fixed an issue with the legacy storage engine [fabrixxm] + Fixed an issue with the theme and addon path items [MrPetovan] + Fixed an issue occuring when the BasePath was not set [tobiasd] + Fixed an issue with additionally opened Sessions [MrPetovan] + Fixed an issue with legacy loglevel mapping [nupplaphil] + Fixed contact suggestions [annando] + Fixed an issue with frio hovercard [nupplaphil] + Fixed event interaction federation [annando] + Fixed remote image permission [deantownsley] + General Code cleaning and restructuring [annando, nupplaphil, tobiasd] + Added frio color scheme sharing [JeroenED] + Added syslog and stream Logger [nupplaphil] + Added storage move cronjob [MrPetovan] + Added collapsible panel for connector permission fields [MrPetovan] + Added rule-based router [MrPetovan] + Added Estonian translation [Rain Hawk] + Added APCu caching [nupplaphil] + Added BlockServer command to the Friendica console [nupplaphil] + Added reshare count [annando] + Added rule-based router [MrPetovan, nupplaphil] + Added themed error pages with mascot [MrPetovan, lostinlight] + Added contact relationship filter [MrPetovan] + Added native reshares and reshare count [annando] + Removed the old queue mechanism (deferred workers are now used) [annando] + Removed BasePath and Hostname settings from the admin panel [nupplaphil] + Remove support for defunct F-Droid Friendica app [MrPetovan] + + Friendica Addons: + Update to the tranlation (ET, SV, ZH_CN) [translation teams] + botdetection: + Added a new addon for preventing access by bots [nupplaphil, annando] + buffer: + Traces of Google+ were removed [annando] + curweather: + Fixed a problem with the display of the correct temperature unit [tobiasd] + fromgplus: + Deprecated the addon as Google+ was closed [tobiasd] + fortunate: + Deprecated addon for incompatibility with latest Friendica version [MrPetovan] + phpmailer: + Added a new addon to use external SMTP for email [M-arcus, kecalcze, MrPetovan] + pledgie: + Deprecated addon as service was discontinued [M-arcus] + xmpp: + Marked addon as unsupported because of various incompatibilities with themes [MrPetovan] + + Closed Issues: + 838, 1012, 2209, 2528, 3309, 3717, 3816, 3869, 4453, 4999, 5011, + 5047, 5276, 5850, 5983, 6245, 6303, 6319, 6379, 6410, 6477, 6478, + 6720, 6799, 6813, 6819, 6861, 6864, 6879, 6903, 6916, 6917, 6918, + 6921, 6927, 6929, 6936, 6938, 6941, 6943, 6947, 6948, 6950, 6952, + 6983, 6999, 7012, 7020, 7023, 7031, 7036, 7047, 7106, 7110, 7112, + 7119, 7128, 7130, 7131, 7141, 7142, 7150, 7171, 7183, 7196, 7209, + 7223, 7226, 7240, 7241, 7249, 7264, 7269, 7271, 7275, 7300, 7303 + +Version 2019.04 (2019-04-28) + Friendica Core: + Fixed a privacy problem with postings accessed by feed [MrPetovan] + +Version 2019.03 (2019-03-22) + Friendica Core: + Update to the translation (CS, DE, EN-GB, EN-US, ES, FR, IT, PL, SV, ZH-CN) [translation teams] + Update to the documentation [Aditoo17, JeroenED, m4sk1n, softmetz, tobiasd] + Update to the themes (duepuntozero, frio, smoothy, quattro, vier) [lxiter, MrPetovan, nupplaphil, rabuzarus, tobiasd] + Enhancements to the API [jasonscheng] + Enhancements to the Vagrant development VM [JeroenED] + Enhancements to the storage of gender, sexual preferences and maritial status [JeroenED] + Enhancements to the wording of notifications [MrPetovan] + Enhancements to the display of contacts in the profile [MrPetovan] + Enhancements to the handling of local links [lxiter] + Enhancements to the explicit and implicit mentioning in conversations [annando, MrPetovan] + Enhancements to the warnings in the admin panel [tobiasd] + Enhancements to the AP implementation [annando] + Enhancements to the worker process [annando] + Enhancements to the testing process [MrPetovan, nupplaphil] + Enhancements to the LibreJS compatibility [tobiasd] + Enhancements to the federated display of postings [MrPetovan] + Enhancements to the photo menu [annando] + Enhancements to the probing of contacts [annando] + Fixed several bugs with weird tagging in code blocks [lxiter] + Fixed a bug during contact entries update [rabuzarus] + Fixed several PHP warnings and errors [annando, MrPetovan, tobiasd] + Fixed an issue when Friendica is installed in a subdirectory [rabuzarus] + Fixed several issues in the handling of the Markdown parsing from and to d* [lxiter, MrPetovan] + Fixed a bug that prevented blocked contacts from being removed from groups [MrPetovan] + Fixed a bug in the ACL with preselected items [lxiter] + Fixed an issue with polling Events via AP [annando] + Fixed a memory issue with the JSON-LD parser [annando] + Fixed an issue with the forced DB structure update [nupplaphil] + Fixed an issue with wrongly encoded HTML entities in URLs [annando] + Fixed an issue with the rotation of images in the gallery [nupplaphil] + Fixed issues with redirs in the photo menu of Friendica contacts [tobiasd] + Fixed an issue with sending out notification mails to the admin [nupplaphil] + Fixed an the issue, that the API was ignoring the globalsilence setting [nupplaphil] + Fixed issues with the autolinker of URLs in postings [MrPetovan] + Fixed an issue resulting in multible emails after successful updates of the database [nupplaphil] + Fixed a timeout issue during detection process of the remote profile [annando] + Fixed an issue with postings from blocked servers [annando, MrPetovan] + Fixed an issue with the paging of stored folders [MrPetovan] + Fixed an issue with notifications about interactions with Friendica contacts [annando] + Fixed an issue that caused double postings of images uploaded to the gallery [annando] + Fixed an issue handling legacy config files [nupplaphil] + Fixed an issue that caused notifications about interaction with a locally deleted posting [annando] + If the node does not want to publish information, nodeinfo now returns 404 instead of non-existing entries [nupplaphil] + General Code cleaning and restructuring [annando, JeroenED, MrPetovan, nupplaphil] + Switched logging engine to monolog [nupplaphil] + Added plugable storage backend [fabrixxm, nupplaphil] + Added item delivery indicator to posting header [MrPetovan] + Added URL parameter to force a specific language [JeroenED] + Added live preview of attachments to frio [rabuzarus] + Added a "friendica_author" field to the API results which holds the real author [annando] + Added support for AP with forum postings [annando] + Added a summary of articles send over AP [annando] + + Friendica Addons: + Updates to the translations (CS, DE, EN-GB, ES, FR, NL, PL, SV) [translation teams] + Updated documentation [softmetz, tobiasd] + blackout: + Fix applying the translations [JeroenED, tobiasd] + Fixed some templating of the settings [tobiasd] + blogger: + The addon was marked as unsupported as it does currently not work (needs OAuth support) [annando] + cookienotice: + Added new addon to display a cookie usage notice in the browser [lxiter] + forumdirectory: + Fixed a theming issue with frio [rabuzarus] + js_upload: + Fixed a missing extionsion index [nupplaphil] + mailstream: + Fixed a curl issue [MrPetovan] + piwik: + Make it clear that Piwik is now Matomo but the addon supports both [tobiasd] + securemail: + updated the addon dependencies [MrPetovan] + twitter: + @ mentions are now stripped from the posts send to Twitter [MrPetovan] + + Closed Issues: + 1777, 2487, 3218, 3506, 3837, 4496, 5884, 6087, 6161, 6167, 6205, + 6232, 6263, 6274, 6292, 6337, 6338, 6375, 6378, 6382, 6384, 6386, + 6403, 6405, 6449, 6468, 6472, 6489, 6491, 6492, 6495, 6498, 6501, + 6503, 6505, 6511, 6514, 6521, 6522, 6529, 6532, 6533, 6544, 6545, + 6551, 6553, 6537, 6558, 6552, 6561, 6570, 6575, 6585, 6603, 6610, + 6629, 6630, 6633, 6635, 6652, 6656, 6658, 6667, 6668, 6669, 6672, + 6674, 6676, 6677, 6679, 6691, 6710, 6711, 6714, 6716, 6733, 6758, + 6772, 6778, 6785, 6788, 6800, 6805, 6812, 6819, 6822, 6823, 6840, + 6855, 6866, 6874, 6891, 6901, 6913 + +Version 2019.01 (2019-01-21) + Friendica Core: + Update to the translation (CS, DE, EN-UK, EN-US, FR, NB-NO, NL, PL) [translation teams] + Update to the documentation [AndyHee, FiXato, hoergen, JeroenED, MrPetovan, rebeka-catalina, tobiasd, wouter705] + Enhancements to the themes (frio, vier) [annando, JonnyTischbein, MrPetovan, rabuzarus] + Enhancements to the usage of MagicLinks [annando, rabuzarus] + Enhancements to the escaping of user submitted content [annando, MrPetovan, tobiasd] + Enhancements to the installation wizard [annando, JonnyTischbein, vinzv] + Enhancements to the OWA compatibility with Hubzilla [annando] + Enhancements to Friendica on the iOS Home Screen [MrPetovan] + Enhancements to the Welcome email after registration [MrPetovan] + Enhancements to the API [annando] + Enhancements to the methods to find potentially interesting contacts [MrPetovan] + Enhancements to the remote detection of already existing relationships [MrPetovan] + Enhancements to the handling of large posts [annando] + Enhancements to the user removal process [annando, MrPetovan] + Enhancements to the generation of HTTP error messages [annando] + Enhancements to the admin panel [AndyHee, annando] + Enhancements to the display of birthday reminders [MrPetovan] + Enhancements to the display of the group filter [annando] + Enhancements to the Worker [annando] + Enhancements to the exported Atom feeds [Alkarex] + Enhancements to the Vagrant VM [fabrixxm, tobiasd] + Enhancements to the tests [nupplaphil] + Enhancements to the node info [annando] + Enhancements to the DBclean process [annando] + Enhancements to the PasswordExposedChecker [MrPetovan] + Enhancements to the BBCode handling [MrPetovan] + Enhancements to the diaspora* protocol implementation [annando] + Enhancements to the automatic installation [nupplaphil] + Fixed various PHP notice occurrences [annando, MrPetovan] + Fixed the display of private postings in contact overview [annando] + Fixed a problem with the display of forums in the widget [annando] + Fixed a bug in the email support [MrPetovan] + Fixed a bug in the endless scroll of the network stream [MrPetovan] + Fixed a style problem with iOS mobile browser [MrPetovan] + Fixed a bug handling links to Hubzilla forums [MrPetovan] + Fixed a bug in the character set detection [MrPetovan] + Fixed a bug with the display of private notes [annando] + Fixed a bug in setting the photo permissions [JonnyTischbein] + Fixed a bug that caused some photo albums having no permissions [JonnyTischbein] + Fixed a problem adding multiple hashtags [JonnyTischbein] + Fixed a bug when subscribing to OStatus accounts [MrPetovan] + Fixed a bug in SQL grammar [Alkarex] + Fixed a bug with WebSub [Alkarex] + Fixed a bug in the generated node info JSON [fabrixxm] + Fixed a bug displaying videos when using the frio theme [JeroenED] + Moved config format to PHP arrays [MrPetovan] + Moved several additional features back to the default features [annando] + Started to deprecate the Google+ support [annando] + Added support of ActivityPub (tested with Hubzilla, Mastodon, Nextcloud Social, Osada, PeerTube, Pixelfed, Pleroma) [annando] + Added support for custom emojis [annando, MrPetovan] + The util folder was removed and the content restructured elsewhere [MrPetovan] + Removed the old /p endpoint from diaspora* compatibility [annando] + + Friendica Addons: + Updating the translations (DE, FR) [translation teams] + twitter: + use original URL for link display [MrPetovan] + enhancements to shares [MrPetovan] + leistungsschutzrecht: + show preview pictures of videos [annando] + optionally suppress pictures [annando] + wordpress: + posting should work again [annando] + forumdirectory: + paging enhancements [MrPetovan] + mathjax: + addon rewritten [MrPetovan] + highlightjs: + added addon to highlight source code [MrPetovan] + + Closed Issues: + 1430, 1495, 1572, 1575, 1580, 1581, 2123, 2893, 3016, 3466, 3777, + 3870, 3897, 4242, 4584, 4592, 4609, 4688, 4708, 4715, 4738, 4804, + 5264, 5368, 5547, 5596, 5627, 5716, 5723, 5737, 5757, 5771, 5779, + 5797, 5798, 5811, 5809, 5814, 5820, 5834, 5847, 5801, 5805, 5857, + 5858, 5859, 5863, 5875, 5879, 5886, 5890, 5893, 5896, 5908, 5911, + 5915, 5913, 5924, 5932, 5934, 5943, 5955, 5956, 5960, 5966, 5968, + 5971, 5975, 5992, 5994, 5996, 6006, 6010, 6015, 6027, 6032, 6036, + 6038, 6047, 6081, 6100, 6109, 6119, 6124, 6125, 6128, 6140, 6149, + 6157, 6173, 6202, 6211, 6212, 6213, 6236, 6243, 6255, 6257, 6259, + 6268, 6282, 6283, 6208, 6289, 6294, 6308, 6309, 6313, 6316, 6323, + 6329, 6334, 6344, 6347, 6343, 6349, 6350, 6355, 6358, 6360, 6361, + 6363, 6368, 6370, 6391, 6394, 6424, 6425, 6439, 6459 + +Version 2018.09 (2018-09-23) + Friendica Core: + Update to the translation (CS, DE, EN-US, FI, IT, NL, PL, ZH-CN) [translation teams] + Update to the documentation [Aditoo17, annando, astifter, rebeka-catalina, fabrixxm, M-arcus, microgroove, nupplaphil, tobiasd] + Enhancements to the database structure, handling and documentation [abanink, Angristan, annando, miqrogroove, tobiasd] + Enhancements of unit testing [abanink, nupplaphil, rudloff] + Enhancements to labelling of UI elements [andyhee, tobiasd] + Enhancements to the background workers [annando, miqrogroove, rabuzarus] + Enhancements to the PHP7.2 compatibility [annando, miqrogroove, MrPetovan] + Enhancements to the content filter [MrPetovan] + Enhancements to the hooks provided for addons [abanink] + Enhancements to the interaction with public postings [annando] + Enhancements to the config storage [frabrixxm] + Enhancements to the themes (frio, quattro, smoothly, vier) [annando, astifter, hoergen, MrPetovan, rabuzarus, tobiasd] + Enhancements to the handling of locks [nupplaphil] + Enhancements to the redis integration [nupplaphil] + Enhancements to the admin panel [JeroenED, tobiasd] + Enhancements to the user import process [annando] + Enhancements to the display of invitation information [JeroenED] + Enhancements to the automatic installation process [nupplaphil] + Enhancements to the contact group UI [annando, astifter] + Enhancements to the call of JS [hypolite] + Enhancements to the storage of items in the database [annando] + Enhancements to the process of changing relationships [annando] + Enhancements to the OEmbed of data [MrPetovan] + Fixed various PHP notice occurrences [annando, MrPetovan] + Fixed a bug that could lead to the display of posts from deleted accounts on the community page for a short period [annando] + Fixed a bug that prevented email notification to be send out [annando] + Fixed a bug in database optimisation [annando] + Fixed a bug during removing contacts [annando] + Fixed a bug in the tag-cloud widget [annando] + Fixed a bug in the daemon mode of the background worker [annando] + Fixed a bug in the frio theme that contact filtering [rabuzarus] + Fixed a bug that mangled the display of some additional smileys [abanink] + Fixed a bug in generating registration mails [MrPetovan] + Fixed a bug that caused blank re-share bodies [MrPetovon] + Fixed a bug in the API handling of private mails [fabrixxm] + Fixed a bug when calling the mail() function [miqrogroove] + Fixed a bug that caused deleted accounts being displayed in the local directory [miqrogroove] + Fixed a bug when checking the domain of an email address [VVelox] + Fixed a bug that prevented re-shares from Twitter to be shown as this [annando] + Fixed a bug that caused broken profile links [miqrogroove] + Fixed a bug that caused content from unknown accounts appearing in the timeline [annando] + Fixed a bug with the ignoring and blocking of contacts [annando] + Fixed a bug with showing hidden contacts in some places [annando] + Fixed a bug that prevented the deletion of events by contacts [annando] + Fixed a bug that prevented email contacts from being added [annando] + Fixed a bug in the notification/seen API call [fabrixxm] + Fixed a bug that prevented a refresh after un-/ignoring a conversation [annando] + Fixed a bug in the handling of some language translations [anndno] + Fixed a bug in the hook handling [annando] + Fixed the handling of too long tags [annando] + Fixed a bug that prevented the unliking of dis-/likes [annando] + Fixed bugs with the handling of private nodes [annando] + Fixed a bug in the session initialisation [annando] + Fixed bugs in the execution of the background processes [annando, Quix0r] + Fixed a problem with the notification page [MrPetovan] + Fixed a bug with wrong dates in importing some Atom feeds [annando] + Fixed forum exclusive distribution of postings using the !notation [annando] + Fixed a bug that lead to empty notifications [MrPetovan] + Fixed a problem that could sometimes prevent the execution of the relocation [annando] + Fixed a bug with the handling of images in postings over the connectors [annando] + Added conversation cleanup configuration [miqrogroove] + Added support of the usage of internal diaspora links to accounts [annando] + Added the possibility for admins to block certain nicknames (e.g. role names) [tobiasd] + Added the generation of system guid [nupplaphil] + Added the possibility for admins to mark a node for explicit content [tobiasd] + Added filter by account type to the community page [annando] + Added private flag to API results [fabrixxm] + Added post update checks to the console utility [annando] + Added codecov analysis [nupplaphil] + Added access-keys to the frio theme [tobiasd] + Added the profile settings to the user settings [tobiasd] + General code refactoring and beautification work [annando, MrPetovan, Quix0r, tobiasd] + Fixation of the position on the network page when new posts arrive [rabuzarus] + Ported OpenWebAuth from Hubzilla [annando, rabuzarus] + Removed hard coded syntax highlighting from code blocks [MrPetovan] + Removed (temporarily) the possibility to add pictures to private messages [annando] + New INI style config file format in /config [MrPetovan, tobiasd] + The .htaccess file is not part of the git repository anymore [annando, Quix0r] + + Friendica Addons: + Update to the translations (CS, DE, EN-US, NL, PL, ZH-CN) [translation teams] + General update to adopt changes in core [annando, MrPetovan, Quix0r, tobiasd] + advancedcontentfilter: + Enhancement to the error handling [MrPetovan] + Honour the CSP settings [MrPetovan] + Fixed translation problems [annando] + blockem: + Enhancement of the settings [AlfredSK] + buffer: + support for app.net removed [annando] + js_upload: + Enhancement of the album name handling [rabuzarus] + Enhancement to the wording of the labels [astifter] + langfilter: + Fixed a problem with default values of the filtered languages [tobiasd] + libravatar: + The service wont shutdown, so we can keep the addon [tobiasd] + pumpio: + Fixed a problem that prevented new connections [annando] + superblock: + Fixed a bug that prevented the addon to block accounts [annando] + Enhancements of the settings [AlfredSK] + twitter: + Use rich text for quote tweets [MrPetovan] + Prevent empty quotes from being created [annando] + Fixed a problem with re-shares from remote_self contacts [annando] + Changed URL display after link expansion [MrPetovan] + Fixed a problem with EXIF handling [MrPetovan] + added addons: + mastodoncustomemojis [MrPetovan] + deprecated addons: + notimeline, retriver, remote_permissions, widgets + + Directory: + Enhancements of the health summary [andyhee] + Enhancements of the PHP7 compatibility [MrPetovan] + + Closed Issues: + 901, 1034, 1074, 1303, 1308, 1391, 1490, 1470, 1559, 2093, 2337, + 2340, 2381, 2396, 2675, 3291, 3299, 3493, 3501, 3535, 3643, 3840, + 4148, 4419, 4475, 4507, 4655, 4659, 4710, 4726, 4739, 4753, 4814, + 4830, 4868, 4889, 4923, 4971, 4950, 4985, 5066, 5099, 5137, 5148, + 5158, 5168, 5188, 5202, 5211, 5222, 5233, 5243, 5247, 5252, 5257, + 5260, 5262, 5268, 5274, 5275, 5276, 5278, 5298, 5318, 5319, 5320, + 5321, 5322, 5330, 5333, 5341, 5365, 5405, 5407, 5411, 5423, 5432, + 5434, 5436, 5443, 5455, 5464, 5467, 5469, 5486, 5496, 5497, 5514, + 5539, 5524, 5541, 5544, 5550, 5564, 5566, 5605, 5630, 5638, 5651, + 5653, 5660, 5670, 5691, 5733, 5745, 5768 + +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 +675,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 +686,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/util/credits.txt b/CREDITS.txt similarity index 76% rename from util/credits.txt rename to CREDITS.txt index e24f45f8a5..460ba4a958 100644 --- a/util/credits.txt +++ b/CREDITS.txt @@ -1,8 +1,14 @@ + + 23n Abinoam P. Marques Jr. +Abraham Pérez Hernández Abrax +Adam Clark Adam Jurkiewicz Adam Magness +Aditoo +AgnesElisa Albert Alberto Díaz Tormo Alex @@ -10,17 +16,20 @@ Alexander Fortin Alexander Kampmann Alexandre Alapetite AlfredSK +Andi Andi Stadler Andreas H. Andreas Neustifter Andrej Stieben André Alves André Lohan -Andy H3 +Andy Andy Hee -AndyHee +Angristan Anthronaut +Antron Samurai Arian - Cazare Muncitori +Asher Pen Athalbert aweiher axelt @@ -28,8 +37,12 @@ balderino Beanow beardyunixer Beatriz Vital +Beluga +Ben Ben Roberts ben-utzer +BinkaDroid +Bjoessi bufalo1973 Calango Jr Carlos Solís @@ -40,6 +53,8 @@ Christian González Christian M. Grube Christian Vogeley Cohan Robinson +Copiis Praeesse +CrystalStiletto Cyboulette Cyryl Sochacki czarnystokrotek @@ -69,6 +84,7 @@ Fabian Dost Fabio Comuni felixgilles Filip Bugaj +Filip H.F. "FiXato" Slagter FlxAlbroscheit foss Francesco Apruzzese @@ -80,41 +96,53 @@ Gert Cauwenberg GLComo greeneyedred Gregory Smith +guzzisti Haakon Meland Eriksen Hans Meine -hauke +Hauke Hauke Altmann -Hauke Zühl Herbert Thielen +hlad hoergen Hubert Kościański Hypolite Petovan +Ilmari +ImgBotApp irhen Jak Jakob Jens Tautenhahn jensp +Jeroen De Meerleer jeroenpraat +JOduMonT Johannes Schwab John Brazil Jonatan Nyberg +Jonny Tischbein Josef Moravek juanman julia.domagalska -Karel Vandecandelaere +Karel Karolina Keith Fernie Klaus Weidenbach +Koyu Berteon +Kris Lea1995polish Leberwurscht Leonard Lausen Lionel Triay +Lorem Ipsum Ludovic Grossard maase2 Magdalena Gazda Mai Anh Nguyen Manuel Pérez Monís Marcin Klessa +Marcin Mikołajczak +Marcus Müller +Marie Olive Mariusz Pisz marmor Marquis_de_Carabas @@ -132,6 +160,7 @@ Michael Vogel Michal Šupler Michalina Mike Macgirvin +miqrogroove mytbk Nicola Spanti Olaf Conradi @@ -139,29 +168,43 @@ Oliver Olivier Olivier Mehani Olivier Migeot +Ozero Dien Paolo Wave +Pascal +Pascal Deklerck Pavel Morozov -Perig Gouanvic +PerigGouanvic +Peter Liebetrau peturisfeld +Phigger Phigger +Philipp +Philipp Holzer Pierre Rudloff Piotr Blonkowski pokerazor +R C Rabuzarus Radek Rafael Garau +Rain Hawk Rainulf Pineda +Ralf Thees Ralph Ratten rcmaniac rebeka-catalina repat Ricardo Pereira +Rik 4 RJ Madsen Roland Häder Rui Andrada +rwa +RyDroid S.Krumbholz Sakałoŭ Alaksiej Sam +Samuli Valavuo Sandro Santilli Sebastian Egbers sella @@ -170,27 +213,35 @@ Seth Silke Meyer Simon L'nu Simó Albert i Beltran +softmetz soko1 St John Karp Stanislav N. +Steffen K9 StefOfficiel Sveinn í Felli Sven Anders +Sylke Vicious Sylvain Lagacé szymon.filip Sérgio Lima Taekus Tazman DeVille +teho Thecross Thomas Thomas Willingham thorsten23 +Tim Stahel +TiMESPLiNTER Tino Tobias Diekershoff Tobias Hößl +tomacat tomamplius tomtom84 Tony Baldwin +Torbjörn Andersson TORminator trebor tschlotfeldt @@ -198,16 +249,28 @@ Tubuntu Tupambae.org U-SOUND\mike ufic +Ulf Rompe +Unknown +Valvin +Valvin A Vasudev Kamath Vasya Novikov +Vinzenz Vietzke vislav +vladimir N +Vladimir Núñez +VVelox Vít Šesták 'v6ak' +Waldemar Stoczkowski +Wouter Broers Yasen Pramatarov ylms Zach Prezkuta +Zane C. Bowers-Hadley Zered zotlabs zottel Zvi ben Yaakov (a.k.a rdc) Михаил +Олексій Замковий 朱陈锬 diff --git a/util/Doxyfile b/Doxyfile similarity index 62% rename from util/Doxyfile rename to Doxyfile index 373d172558..a1676eba7a 100644 --- a/util/Doxyfile +++ b/Doxyfile @@ -1,9 +1,9 @@ -INPUT = README.md index.php boot.php testargs.php update.php mod/ object/ include/ js/ util/ view/ src/ version.inc +INPUT = README.md index.php boot.php update.php bin/ mod/ include/ view/ src/ VERSION RECURSIVE = YES PROJECT_NAME = "Friendica" PROJECT_LOGO = images/friendica-64.jpg -EXCLUDE = .htconfig.php library/ doc/ .git/ log/ util/zotsh/easywebdav/ addon/ report/ privacy_image_cache/ photo/ proxy/ local/ -EXCLUDE_PATTERNS = *smarty3* *strings.php*.log *.out *test* +EXCLUDE = .htconfig.php config/ library/ doc/ .git/ log/ addon/ report/ privacy_image_cache/ photo/ proxy/ local/ +EXCLUDE_PATTERNS = *smarty3* strings.php *.log *.out *test* OUTPUT_DIRECTORY = doc GENERATE_HTML = YES HTML_OUTPUT = html/ @@ -15,7 +15,6 @@ GENERATE_TODOLIST = YES USE_MDFILE_AS_MAINPAGE = README.md REFERENCED_BY_RELATION = YES GENERATE_TREEVIEW = YES -HTML_FOOTER = util/Doxygen.footer ALIASES += "license=@par License:\n" ALIASES += "fixme=\xrefitem fixme \"Fixme\" \"Fixme List\"" ALIASES += "FIXME=\fixme" diff --git a/INSTALL.txt b/INSTALL.txt deleted file mode 100644 index 9340927f40..0000000000 --- a/INSTALL.txt +++ /dev/null @@ -1,328 +0,0 @@ - -Friendica Installation - -We've tried very hard to ensure that Friendica will run on commodity hosting -platforms - such as those used to host Wordpress blogs and Drupal websites. -But be aware that Friendica is more than a simple web application. It is a -complex communications system which more closely resembles an email server -than a web server. For reliability and performance, messages are delivered in -the background and are queued for later delivery when sites are down. This -kind of functionality requires a bit more of the host system than the typical -blog. Not every PHP/MySQL hosting provider will be able to support Friendica. -Many will. But please review the requirements and confirm these with your -hosting provider prior to installation. - -Before you begin: Choose a domain name or subdomain name for your server. -Put some thought into this - because changing it is currently not-supported. -Things will break, and some of your friends may have difficulty communicating -with you. We plan to address this limitation in a future release. Also decide -if you wish to connect with members of the Diaspora network, as this will -impact the installation requirements. - -Decide if you will use SSL and obtain an SSL cert. Communications with the -Diaspora network MAY require both SSL AND an SSL cert signed by a CA which is -recognised by the major browsers. Friendica will work with self-signed certs -but Diaspora communication may not. For best results, install your cert PRIOR -to installing Friendica and when visiting your site for the initial -installation in step 5, please use the https: link. (Use the http: or non-SSL -link if your cert is self-signed). - - -1. Requirements - - Apache with mod-rewrite enabled and "Options All" so you can use a -local .htaccess file - - - PHP 5.6+ (PHP 7 recommended for performance). - - - PHP *command line* access with register_argc_argv set to true in the -php.ini file [or see 'poormancron' in section 8] - - - curl, gd (with at least jpeg support), mysql, mbstring, xml, zip and openssl extensions - - - some form of email server or email gateway such that PHP mail() works - - - The POSIX module of PHP needs to be activated (e.g. RHEL, CentOS have disabled it) - - - Mysql 5.5.3+ or an equivalant alternative for MySQL (MariaDB, Percona Server etc.) - - - ability to schedule jobs with cron (Linux/Mac) or Scheduled Tasks -(Windows) [Note: other options are presented in Section 8 of this document] - - - Installation into a top-level domain or sub-domain (without a -directory/path component in the URL) is preferred. This is REQUIRED if -you wish to communicate with the Diaspora network. - - - - For alternative server configurations (such as Nginx server and MariaDB - database engine), refer to the wiki at https://github.com/friendica/friendica/wiki - -2. Unpack the Friendica files into the root of your web server document area. - - - If you copy the directory tree to your webserver, make sure - that you also copy .htaccess - as "dot" files are often hidden - and aren't normally copied. - -OR - -2b. Clone the friendica/friendica GitHub repository and import dependencies - - git clone https://github.com/friendica/friendica [web server folder] - cd [web server folder] - php bin/composer.phar install - -3. Create an empty database and note the access details (hostname, username, -password, database name). - - - Friendica needs the permission to create and delete fields and tables in its own database. - - Please check the additional notes if running on MySQ 5.7.17 or newer - -4. If you know in advance that it will be impossible for the web server to -write or create files in your web directory, create an empty file called -.htconfig.php and make it writable by the web server. - -5. Visit your website with a web browser and follow the instructions. Please -note any error messages and correct these before continuing. - -If you are using SSL with a known signature authority (recommended), use the -https: link to your website. If you are using a self-signed cert or no cert, -use the http: link. - -If you need to specify a port for the connection to the database, you can do -so in the host name setting for the database. - -6. *If* the automated installation fails for any reason, check the following: - - - ".htconfig.php" exists - If not, edit htconfig.php and change system settings. Rename -to .htconfig.php - - Database is populated. - If not, import the contents of "database.sql" with phpmyadmin -or mysql command line - -7. At this point visit your website again, and register your personal account. -Registration errors should all be recoverable automatically. -If you get any *critical* failure at this point, it generally indicates the -database was not installed correctly. You might wish to move/rename -.htconfig.php to another name and empty (called 'dropping') the database -tables, so that you can start fresh. - -**************************************************************************** -**************************************************************************** -******** THIS NEXT STEP IS IMPORTANT!!!! *********** -**************************************************************************** -**************************************************************************** - -8. Set up a cron job or scheduled task to run the worker once every 5-10 -minutes to pick up the recent "public" postings of your friends. Example: - - cd /base/directory; /path/to/php bin/worker.php - -Change "/base/directory", and "/path/to/php" as appropriate for your situation. - -If you are using a Linux server, run "crontab -e" and add a line like the -one shown, substituting for your unique paths and settings: - -*/10 * * * * cd /home/myname/mywebsite; /usr/bin/php bin/worker.php - -You can generally find the location of PHP by executing "which php". If you -have troubles with this section please contact your hosting provider for -assistance. Friendica will not work correctly if you cannot perform this step. - -You should also be sure that $a->config['php_path'] is set correctly, it should -look like (changing it to the correct PHP location) - -$a->config['php_path'] = '/usr/local/php56/bin/php' - -Alternative: If you cannot use a cron job as described above, you can use -the frontend worker and an external cron service to trigger the execution -of the worker script. You can enable the frontend worker after the installation -from the admin panel of your node and call - - https://example.com/worker - -with the service of your choice. - -9. (Recommended) Set up a backup plan - -Bad things will happen. Let there be a hardware failure, a corrupted -database or whatever you can think of. So once the installation of your -Friendica node is done, you should make yoursef a backup plan. - -The most important file is the `.htconfig.php` file in the base directory. -As it stores all your data, you should also have a recent dump of your -Friendica database at hand, should you have to recover your node. - -10. (Optional) Reverse-proxying and HTTPS - -Friendica looks for some well-known HTTP headers indicating a reverse-proxy -terminating an HTTPS connection. While the standard from RFC 7239 specifies -the use of the `Forwaded` header. - - Forwarded: for=192.0.2.1; proto=https; by=192.0.2.2 - -Friendica also supports a number on non-standard headers in common use. - - - X-Forwarded-Proto: https - - Front-End-Https: on - - X-Forwarded-Ssl: on - -It is however preferable to use the standard approach if configuring a new server. - -##################################################################### - - If things don't work... - -##################################################################### - - -##################################################################### -- If you get the message - "System is currently unavailable. Please try again later" -##################################################################### - - Check your database settings. It usually means your database could not -be opened or accessed. If the database resides on the same machine, check that -the database server name is "localhost". - -##################################################################### -- 500 Internal Error -##################################################################### - - This could be the result of one of our Apache directives not being -supported by your version of Apache. Examine your apache server logs. - You might remove the line "Options -Indexes" from the .htaccess file if -you are using a Windows server as this has been known to cause problems. -Also check your file permissions. Your website and all contents must generally -be world-readable. - - It is likely that your web server reported the source of the problem in -its error log files. Please review these system error logs to determine what -caused the problem. Often this will need to be resolved with your hosting -provider or (if self-hosted) your web server configuration. - -##################################################################### -- 400 and 4xx "File not found" errors -##################################################################### - - First check your file permissions. Your website and all contents must -generally be world-readable. - - Ensure that mod-rewite is installed and working, and that your -.htaccess file is being used. To verify the latter, create a file test.out -containing the word "test" in the top directory of Friendica, make it world -readable and point your web browser to - -http://yoursitenamehere.com/test.out - - This file should be blocked. You should get a permission denied message. - - If you see the word "test" your Apache configuration is not allowing -your .htaccess file to be used (there are rules in this file to block access -to any file with .out at the end, as these are typically used for system logs). - - Make certain the .htaccess file exists and is readable by everybody, then -look for the existence of "AllowOverride None" in the Apache server -configuration for your site. This will need to be changed to -"AllowOverride All". - - If you do not see the word "test", your .htaccess is working, but it is -likely that mod-rewrite is not installed in your web server or is not working. - - On most flavour of Linux, - -% a2enmod rewrite -% /etc/init.d/apache2 restart - - Consult your hosting provider, experts on your particular Linux -distribution or (if Windows) the provider of your Apache server software if -you need to change either of these and can not figure out how. There is -a lot of help available on the web. Google "mod-rewrite" along with the -name of your operating system distribution or Apache package (if using -Windows). - - -##################################################################### -- If you are unable to write the file .htconfig.php during installation -due to permissions issues: -##################################################################### - - create an empty file with that name and give it world-write permission. -For Linux: - -% touch .htconfig.php -% chmod 777 .htconfig.php - -Retry the installation. As soon as the database has been created, - -******* this is important ********* - -% chmod 755 .htconfig.php - -##################################################################### -- Some configurations with "suhosin" security are configured without -an ability to run external processes. Friendica requires this ability. -Following are some notes provided by one of our members. -##################################################################### - -On my server I use the php protection system Suhosin -[http://www.hardened-php.net/suhosin/]. One of the things it does is to block -certain functions like proc_open, as configured in /etc/php5/conf.d/suhosin.ini: - - suhosin.executor.func.blacklist = proc_open, ... - -For those sites like Friendica that really need these functions they can be -enabled, e.g. in /etc/apache2/sites-available/friendica: - - - php_admin_value suhosin.executor.func.blacklist none - php_admin_value suhosin.executor.eval.blacklist none - - -This enables every function for Friendica if accessed via browser, but not for -the cronjob that is called via php command line. I attempted to enable it for -cron by using something like - - */10 * * * * cd /var/www/friendica/friendica/ && sudo -u www-data /usr/bin/php --d suhosin.executor.func.blacklist=none -d suhosin.executor.eval.blacklist=none --f bin/worker.php - -This worked well for simple test cases, but the friendica-cron still failed with -a fatal error: -suhosin[22962]: ALERT - function within blacklist called: proc_open() (attacker -'REMOTE_ADDR not set', file '/var/www/friendica/friendica/boot.php', line 1341) - -After a while I noticed, that bin/worker.php calls further php script via -proc_open. These scripts themselves also use proc_open and fail, because they -are NOT called with -d suhosin.executor.func.blacklist=none. - -So the simple solution is to put the correct parameters into .htconfig.php: - // Location of PHP command line processor - $a->config['php_path'] = '/usr/bin/php -d suhosin.executor.func.blacklist=none --d suhosin.executor.eval.blacklist=none'; - - -This is obvious as soon as you notice that the friendica-cron uses proc_open to -execute php-scripts that also use proc_open, but it took me quite some time to -find that out. I hope this saves some time for other people using suhosin with -function blacklists. - -######################################################################## -Unable to create all mysql tables on MySQL 5.7.17 or newer -####################################################################### - -If the setup fails to create all the database tables and/or manual -creation from the command line fails, with this error: - -ERROR 1067 (42000) at line XX: Invalid default value for 'created' - -You need to adjust your my.cnf and add the following setting under -the [mysqld] section : - -sql_mode = ''; - -After that, restart mysql and try again. - - diff --git a/LICENSE b/LICENSE index 6b8f18d0cb..e720a404d8 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ Friendica Communications Server -Copyright (c) 2010-2018 the Friendica Project +Copyright (c) 2010-2019 the Friendica Project This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/README.md b/README.md index 20d6b0ef50..1406678be8 100644 --- a/README.md +++ b/README.md @@ -13,29 +13,30 @@ With Friendica, you can also fully interact with anyone on Twitter, post on Face Join today and [get your Friendica profile!](https://dir.friendica.social/servers 'Join Friendica today!') +Have a look at the [installation documentation](doc/Install.md) for further information about installing and using Friendica. ### Friendica Screenshots -| ![Frio theme in mobile browser](/images/screenshots/friendica-frio-mobile-profle-1.png?raw=true "Frio theme in mobile browser") ![Frio theme in mobile browser](/images/screenshots/friendica-frio-mobile-profle-2.png?raw=true "Frio theme in mobile browser") +| ![Frio theme in mobile browser](images/screenshots/friendica-frio-mobile-profle-1.png?raw=true "Frio theme in mobile browser") ![Frio theme in mobile browser](images/screenshots/friendica-frio-mobile-profle-2.png?raw=true "Frio theme in mobile browser") |:--:| |*Frio theme, mobile browser. Timeline and composer view.*| -|![Frio theme in desktop browser](/images/screenshots/friendica-frio-green-profle-1.png?raw=true "Frio theme in desktop browser") +|![Frio theme in desktop browser](images/screenshots/friendica-frio-green-profle-1.png?raw=true "Frio theme in desktop browser") |*Frio theme, desktop browser. Timeline view, contact info popped up, control menu open.*| -|![Frio theme in desktop browser](/images/screenshots/friendica-frio-green-profle-2.png?raw=true "Frio theme in desktop browser") +|![Frio theme in desktop browser](images/screenshots/friendica-frio-green-profle-2.png?raw=true "Frio theme in desktop browser") |*Frio theme, desktop browser. Menu open for controlling individual posts.*| -|![Frio theme in desktop browser](/images/screenshots/friendica-frio-red-profle-3.png?raw=true "Frio theme in desktop browser") +|![Frio theme in desktop browser](images/screenshots/friendica-frio-red-profle-3.png?raw=true "Frio theme in desktop browser") |*Frio theme, desktop browser. Profile view, notification menu open.*| -|![Frio theme in desktop browser](/images/screenshots/friendica-frio-red-profle-2.png?raw=true "Frio theme in desktop browser") +|![Frio theme in desktop browser](images/screenshots/friendica-frio-red-profle-2.png?raw=true "Frio theme in desktop browser") |*Number of new posts, in total and by group.*| -|![Frio theme in desktop browser](/images/screenshots/friendica-frio-red-profle-1.png?raw=true "Frio theme in desktop browser") +|![Frio theme in desktop browser](images/screenshots/friendica-frio-red-profle-1.png?raw=true "Frio theme in desktop browser") |*Calender with popup of event.*| -|![Frio theme default colour in standard browser on tablet](/images/screenshots/friendica-frio-default-profile-1.png?raw=true "Frio theme default colour in standard browser on tablet") +|![Frio theme default colour in standard browser on tablet](images/screenshots/friendica-frio-default-profile-1.png?raw=true "Frio theme default colour in standard browser on tablet") |*Notifications menu and private messages counter, standard browser on tablet.*| -|![Frio theme in desktop browser](/images/screenshots/friendica-frio-brown-profile-2.png?raw=true "Frio theme in desktop browser") +|![Frio theme in desktop browser](images/screenshots/friendica-frio-brown-profile-2.png?raw=true "Frio theme in desktop browser") |*Number of visible contacts, standard browser.*| -|![Frio theme in desktop browser](/images/screenshots/friendica-frio-brown-profile-1.png?raw=true "Frio theme in desktop browser") +|![Frio theme in desktop browser](images/screenshots/friendica-frio-brown-profile-1.png?raw=true "Frio theme in desktop browser") |*Network posts chronologically ordered, standard browser.*| -|![Vier theme in desktop browser](/images/screenshots/friendica-vier-profile.png?raw=true "Vier theme in desktop browser") +|![Vier theme in desktop browser](images/screenshots/friendica-vier-profile.png?raw=true "Vier theme in desktop browser") |*Vier theme, desktop browser. Public timeline view.*| -|![Vier theme in desktop browser](/images/screenshots/friendica-vier-community.png?raw=true "Vier theme in desktop browser") +|![Vier theme in desktop browser](images/screenshots/friendica-vier-community.png?raw=true "Vier theme in desktop browser") |*Vier theme, desktop browser. Community post displayed.*| diff --git a/README.translate.md b/README.translate.md deleted file mode 100644 index a4f61a1b96..0000000000 --- a/README.translate.md +++ /dev/null @@ -1,101 +0,0 @@ -Friendica translations -====================== - -Translation Process -------------------- - -The strings used in the UI of Friendica is translated at [Transifex] [1] and then included in the git repository at github. -If you want to help with translation for any language, be it correcting terms or translating friendica to a currently not supported language, please register an account at transifex.com and contact the friendica translation team there. - -Translating friendica is simple. -Just use the online tool at transifex. -If you don't want to deal with git & co. that is fine, we check the status of the translations regularly and import them into the source tree at github so that others can use them. - -We do not include every translation from transifex in the source tree to avoid a scattered and disturbed overall experience. -As an uneducated guess we have a lower limit of 50% translated strings before we include the language (for the core messages.po file, addont translation will be included once all strings of an addon are translated. -This limit is judging only by the amount of translated strings under the assumption that the most prominent strings for the UI will be translated first by a translation team. -If you feel your translation useable before this limit, please contact us and we will probably include your teams work in the source tree. - -If you want to help translating, please concentrate on the core messages.po file first. -We will only include translations with a sufficient translated messages.po file. -Translations of addons will only be included, when the core file is included as well. - -If you want to get your work into the source tree yourself, feel free to do so and contact us with and question that arises. -The process is simple and friendica ships with all the tools necessary. - -The location of the translated files in the source tree is - /view/lang/LNG-CODE/ -where LNG-CODE is the language code used, e.g. de for German or fr for French. -The translated strings come as a "message.po" file from transifex which needs to be translated into the PHP file friendica uses. -To do so, place the file in the directory mentioned above and use the "po2php" command from the console. -*Please note that the console tool has to be called from the base directory of your Friendica installation.* - -Assuming you want to convert the German localization which is placed in view/lang/de/message.po you would do the following. - - 1. Navigate at the command prompt to the base directory of your - friendica installation - - 2. Execute the po2php command, which will place the translation - in the strings.php file that is used by friendica. - - $> php bin/console.php po2php view/lang/de/messages.po - - The output of the script will be placed at view/lang/de/strings.php where - friendica is expecting it, so you can test your translation immediately. - - 3. Visit your friendica page to check if it still works in the language you - just translated. If not try to find the error, most likely PHP will give - you a hint in the log/warnings.about the error. - - For debugging you can also try to "run" the file with PHP. This should - not give any output if the file is ok but might give a hint for - searching the bug in the file. - - $> php view/lang/de/strings.php - - 4. commit the two files with a meaningful commit message to your git - repository, push it to your fork of the friendica repository at github and - issue a pull request for that commit. - -You should translate the PO files at Transifex. -Otherwise your work might get lost, when the translation from Transifex is included to the Friendica repository after it was updated there. - -Utilities ---------- - -Additional to the po2php command there are some more utilities for translation in the console. -If you only want to translate friendica into another language you wont need any of these tools most likely but it gives you an idea how the translation process of friendica works. - -For further information see the utils/README file. - -Transifex-Client ----------------- - -Transifex has a client program which let you interact with the translation files in a similar way to git. -Help for the client can be found at the [Transifex Help Center] [2]. -Here we will only cover basic usage. - -After installation of the client, you should have a `tx` command available on your system. -To use it, first create a configuration file with your credentials. -On Linux this file should be placed into your home directory `~/.transifexrc`. -The content of the file should be something like the following: - - [https://www.transifex.com] - username = user - token = - password = p@ssw0rd - hostname = https://www.transifex.com - -Since Friendica version 3.5.1 we ship configuration files for the Transifex client in the core repository and the addon repository. -To update the translation files after you have translated strings of e.g. Esperanto in the web-UI of transifex you can use `tx` to download the file. - - $> tx pull -l eo - -And then use the `po2php` command described above to convert the `messages.po` file to the `strings.php` file Friendica is loading. - - $> php bin/console.php po2php view/lang/eo/messages.po - -Afterwards, just commit the two changed files to a feature branch of your Friendica repository, push the changes to github and open a pull request for your changes. - -[1]: https://www.transifex.com/projects/p/friendica/ -[2]: https://docs.transifex.com/client/introduction diff --git a/VERSION b/VERSION index 52b0d2a456..41367d09e2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2018-05-dev +2019.12-dev diff --git a/Vagrantfile b/Vagrantfile index e5f30b307f..f9ffe0c75e 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -6,8 +6,8 @@ server_timezone = "UTC" public_folder = "/vagrant" Vagrant.configure(2) do |config| - # Set server to Ubuntu 16.04 - config.vm.box = "ubuntu/xenial64" + # Set server to Debian 10 / Buster 64bit + config.vm.box = "debian/buster64" # Disable automatic box update checking. If you disable this, then # boxes will only be checked for updates when the user runs diff --git a/autotest.sh b/autotest.sh new file mode 100755 index 0000000000..15067bf9d5 --- /dev/null +++ b/autotest.sh @@ -0,0 +1,279 @@ +#!/usr/bin/env bash +# +# This script is used for autotesting the Friendica codebase with different +# types of tests and environments. +# +# Currently, there are three types of autotesting possibilities: +# - "USEDOCKER=true ./autotest.sh" will start a database docker container for testing +# - "./autotest.sh" on the Drone CI environment will use the database container of the drone CI pipeline +# - "./autotest.sh" on a local environment will try to use the local database instance for testing +# +# You can specify a database (mysql, mariadb currently) for the db backend of Friendica ("./autotest.sh mysql") +# And you can specify some parameters for the test, like: +# - NOCOVERAGE=true ... Don't create a coverage XML (this is only useful if you will send coverage to codecov.io) +# - NOINSTALL=true ... Skip the whole Friendica installation process (e.g. you just test Caching drivers) +# - TEST_SELECTION= ... Specify which tests are used to run (based on the test-labeling) +# - XDEBUG_CONFIG= ... Set some XDEBUG specific environment settings for development + +DATABASENAME=${MYSQL_DATABASE:-test} +DATABASEUSER=${MYSQL_USERNAME:-friendica} +DATABASEHOST=${MYSQL_HOST:-localhost} +BASEDIR=$PWD + +DBCONFIGS="mysql mariadb" +TESTS="REDIS MEMCACHE MEMCACHED APCU NODB" + +export MYSQL_DATABASE="$DATABASENAME" +export MYSQL_USERNAME="$DATABASEUSER" +export MYSQL_PASSWORD="friendica" + +if [ -z "$PHP_EXE" ]; then + PHP_EXE=php +fi +PHP=$(which "$PHP_EXE") +# Use the Friendica internal composer +COMPOSER="$BASEDIR/bin/composer.phar" + +set -e + +_XDEBUG_CONFIG=$XDEBUG_CONFIG +unset XDEBUG_CONFIG + +function show_syntax() { + echo -e "Syntax: ./autotest.sh [dbconfigname] [testfile]\n" >&2 + echo -e "\t\"dbconfigname\" can be one of: $DBCONFIGS" >&2 + echo -e "\t\"testfile\" is the name of a test file, for example lib/template.php" >&2 + echo -e "\nDatabase environment variables:\n" >&2 + echo -e "\t\"MYSQL_HOST\" Mysql Hostname (Default: localhost)" >&2 + echo -e "\t\"MYSQL_USDRNAME\" Mysql Username (Default: friendica)" >&2 + echo -e "\t\"MYSQL_DATABASE\" Mysql Database (Default: test)" >&2 + echo -e "\nOther environment variables:\n" >&2 + echo -e "\t\"TEST_SELECTION\" test a specific group of tests, can be one of: $TESTS" >&2 + echo -e "\t\"NOINSTALL\" If set to true, skip the db and install process" >&2 + echo -e "\t\"NOCOVERAGE\" If set to true, don't create a coverage output" >&2 + echo -e "\t\"USEDOCKER\" If set to true, the DB server will be executed inside a docker container" >&2 + echo -e "\nExample: NOCOVERAGE=true ./autotest.sh mysql src/Core/Cache/MemcacheTest.php" >&2 + echo "will run the test suite from \"tests/src/Core/Cache/MemcacheTest.php\" without a Coverage" >&2 + echo -e "\nIf no arguments are specified, all tests will be run with all database configs" >&2 +} + +if [ -x "$PHP" ]; then + echo "Using PHP executable $PHP" +else + echo "Could not find PHP executable $PHP_EXE" >&2 + exit 3 +fi + +echo "Installing depdendencies" +$PHP "$COMPOSER" install + +PHPUNIT="$BASEDIR/vendor/bin/phpunit" + +if [ -x "$PHPUNIT" ]; then + echo "Using PHPUnit executable $PHPUNIT" +else + echo "Could not find PHPUnit executable after composer $PHPUNIT" >&2 + exit 3 +fi + +if ! [ \( -w config -a ! -f config/local.config.php \) -o \( -f config/local.config.php -a -w config/local.config.php \) ]; then + echo "Please enable write permissions on config and config/config.php" >&2 + exit 1 +fi + +if [ "$1" ]; then + FOUND=0 + for DBCONFIG in $DBCONFIGS; do + if [ "$1" = "$DBCONFIG" ]; then + FOUND=1 + break + fi + done + if [ $FOUND = 0 ]; then + echo -e "Unknown database config name \"$1\"\n" >&2 + show_syntax + exit 2 + fi +fi + +# Back up existing (dev) config if one exists and backup not already there +if [ -f config/local.config.php ] && [ ! -f config/local.config-autotest-backup.php ]; then + mv config/local.config.php config/local.config-autotest-backup.php +fi + +function cleanup_config() { + + if [ -n "$DOCKER_CONTAINER_ID" ]; then + echo "Kill the docker $DOCKER_CONTAINER_ID" + docker stop "$DOCKER_CONTAINER_ID" + docker rm -f "$DOCKER_CONTAINER_ID" + fi + + cd "$BASEDIR" + + # Restore existing config + if [ -f config/local.config-autotest-backup.php ]; then + mv config/local.config-autotest-backup.php config/local.config.php + fi +} + +# restore config on exit +trap cleanup_config EXIT + +function execute_tests() { + DB=$1 + echo "Setup environment for $DB testing ..." + # back to root folder + cd "$BASEDIR" + + # backup current config + if [ -f config/local.config.php ]; then + mv config/local.config.php config/local.config-autotest-backup.php + fi + + if [ -z "$NOINSTALL" ]; then + #drop database + if [ "$DB" == "mysql" ]; then + if [ -n "$USEDOCKER" ]; then + echo "Fire up the mysql docker" + DOCKER_CONTAINER_ID=$(docker run \ + -e MYSQL_ROOT_PASSWORD=friendica \ + -e MYSQL_USER="$DATABASEUSER" \ + -e MYSQL_PASSWORD=friendica \ + -e MYSQL_DATABASE="$DATABASENAME" \ + -d mysql) + DATABASEHOST=$(docker inspect --format="{{.NetworkSettings.IPAddress}}" "$DOCKER_CONTAINER_ID") + + else + if [ -z "$DRONE" ]; then # no need to drop the DB when we are on CI + if [ "mysql" != "$(mysql --version | grep -o mysql)" ]; then + echo "Your mysql binary is not provided by mysql" + echo "To use the docker container set the USEDOCKER environment variable" + exit 3 + fi + mysql -u "$DATABASEUSER" -pfriendica -e "DROP DATABASE IF EXISTS $DATABASENAME" -h $DATABASEHOST || true + mysql -u "$DATABASEUSER" -pfriendica -e "CREATE DATABASE $DATABASENAME DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci" -h $DATABASEHOST + else + DATABASEHOST=mysql + fi + fi + + echo "Waiting for MySQL $DATABASEHOST initialization..." + if ! bin/wait-for-connection $DATABASEHOST 3306 300; then + echo "[ERROR] Waited 300 seconds, no response" >&2 + exit 1 + fi + + echo "MySQL is up." + fi + if [ "$DB" == "mariadb" ]; then + if [ -n "$USEDOCKER" ]; then + echo "Fire up the mariadb docker" + DOCKER_CONTAINER_ID=$(docker run \ + -e MYSQL_ROOT_PASSWORD=friendica \ + -e MYSQL_USER="$DATABASEUSER" \ + -e MYSQL_PASSWORD=friendica \ + -e MYSQL_DATABASE="$DATABASENAME" \ + -d mariadb) + DATABASEHOST=$(docker inspect --format="{{.NetworkSettings.IPAddress}}" "$DOCKER_CONTAINER_ID") + + else + if [ -z "$DRONE" ]; then # no need to drop the DB when we are on CI + if [ "MariaDB" != "$(mysql --version | grep -o MariaDB)" ]; then + echo "Your mysql binary is not provided by mysql" + echo "To use the docker container set the USEDOCKER environment variable" + exit 3 + fi + mysql -u "$DATABASEUSER" -pfriendica -e "DROP DATABASE IF EXISTS $DATABASENAME" -h $DATABASEHOST || true + mysql -u "$DATABASEUSER" -pfriendica -e "CREATE DATABASE $DATABASENAME DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci" -h $DATABASEHOST + else + DATABASEHOST=mariadb + fi + fi + + echo "Waiting for MariaDB $DATABASEHOST initialization..." + if ! bin/wait-for-connection $DATABASEHOST 3306 300; then + echo "[ERROR] Waited 300 seconds, no response" >&2 + exit 1 + fi + + echo "MariaDB is up." + fi + + if [ -n "$USEDOCKER" ]; then + echo "Initialize database..." + docker exec $DOCKER_CONTAINER_ID mysql -u root -pfriendica -e 'CREATE DATABASE IF NOT EXISTS $DATABASENAME;' + fi + + export MYSQL_HOST="$DATABASEHOST" + + #call installer + echo "Installing Friendica..." + "$PHP" ./bin/console.php autoinstall --dbuser="$DATABASEUSER" --dbpass=friendica --dbdata="$DATABASENAME" --dbhost="$DATABASEHOST" --url=https://friendica.local --admin=admin@friendica.local + fi + + #test execution + echo "Testing..." + rm -fr "coverage-html" + mkdir "coverage-html" + if [[ "$_XDEBUG_CONFIG" ]]; then + export XDEBUG_CONFIG=$_XDEBUG_CONFIG + fi + + COVER='' + if [ -z "$NOCOVERAGE" ]; then + COVER="--coverage-clover tests/autotest-clover.xml" + else + echo "No coverage" + fi + + # per default, there is no cache installed + GROUP='--exclude-group REDIS,MEMCACHE,MEMCACHED,APCU' + if [ "$TEST_SELECTION" == "REDIS" ]; then + GROUP="--group REDIS" + fi + if [ "$TEST_SELECTION" == "MEMCACHE" ]; then + GROUP="--group MEMCACHE" + fi + if [ "$TEST_SELECTION" == "MEMCACHED" ]; then + GROUP="--group MEMCACHED" + fi + if [ "$TEST_SELECTION" == "APCU" ]; then + GROUP="--group APCU" + fi + if [ "$TEST_SELECTION" == "NODB" ]; then + GROUP="--exclude-group DB,SLOWDB" + fi + + INPUT="$BASEDIR/tests" + if [ -n "$2" ]; then + INPUT="$INPUT/$2" + fi + + echo "${PHPUNIT[@]}" --configuration tests/phpunit.xml $GROUP $COVER --log-junit "autotest-results.xml" "$INPUT" "$3" + "${PHPUNIT[@]}" --configuration tests/phpunit.xml $GROUP $COVER --log-junit "autotest-results.xml" "$INPUT" "$3" + RESULT=$? + + if [ -n "$DOCKER_CONTAINER_ID" ]; then + echo "Kill the docker $DOCKER_CONTAINER_ID" + docker stop $DOCKER_CONTAINER_ID + docker rm -f $DOCKER_CONTAINER_ID + unset $DOCKER_CONTAINER_ID + fi +} + +# +# Start the test execution +# +if [ -z "$1" ] && [ -n "$TEST_SELECTION" ]; then + # run all known database configs + for DBCONFIG in $DBCONFIGS; do + execute_tests "$DBCONFIG" + done +else + FILENAME="$2" + if [ -n "$2" ] && [ ! -f "tests/$FILENAME" ] && [ "${FILENAME:0:2}" != "--" ]; then + FILENAME="../$FILENAME" + fi + execute_tests "$1" "$FILENAME" "$3" +fi diff --git a/bin/auth_ejabberd.php b/bin/auth_ejabberd.php index 06d8488df8..5ccdd0174b 100755 --- a/bin/auth_ejabberd.php +++ b/bin/auth_ejabberd.php @@ -32,10 +32,11 @@ * */ -use Friendica\App; +use Dice\Dice; +use Friendica\App\Mode; use Friendica\BaseObject; -use Friendica\Core\Config; use Friendica\Util\ExAuth; +use Psr\Log\LoggerInterface; if (sizeof($_SERVER["argv"]) == 0) { die(); @@ -51,16 +52,16 @@ $directory = realpath($directory . DIRECTORY_SEPARATOR . ".."); chdir($directory); -require_once "boot.php"; -require_once "include/dba.php"; +require dirname(__DIR__) . '/vendor/autoload.php'; -$a = new App(dirname(__DIR__)); -BaseObject::setApp($a); +$dice = (new Dice())->addRules(include __DIR__ . '/../static/dependencies.config.php'); +$dice = $dice->addRule(LoggerInterface::class,['constructParams' => ['auth_ejabberd']]); -@include ".htconfig.php"; -dba::connect($db_host, $db_user, $db_pass, $db_data); -unset($db_host, $db_user, $db_pass, $db_data); +BaseObject::setDependencyInjection($dice); -$oAuth = new ExAuth(); +$appMode = $dice->create(Mode::class); -$oAuth->readStdin(); +if ($appMode->isNormal()) { + $oAuth = new ExAuth(); + $oAuth->readStdin(); +} diff --git a/bin/composer.phar b/bin/composer.phar index c8152aded2..96fa2df7bd 100755 Binary files a/bin/composer.phar and b/bin/composer.phar differ diff --git a/bin/console.php b/bin/console.php index 9c25279d37..a6513a2e8f 100755 --- a/bin/console.php +++ b/bin/console.php @@ -1,9 +1,12 @@ #!/usr/bin/env php execute(); +$dice = (new Dice())->addRules(include __DIR__ . '/../static/dependencies.config.php'); +$dice = $dice->addRule(LoggerInterface::class,['constructParams' => ['console']]); + +(new Friendica\Core\Console($dice, $argv))->execute(); diff --git a/bin/daemon.php b/bin/daemon.php index 6b0e377a3a..948829c1bf 100755 --- a/bin/daemon.php +++ b/bin/daemon.php @@ -6,10 +6,58 @@ * * This script was taken from http://php.net/manual/en/function.pcntl-fork.php */ -function shutdown() { - posix_kill(posix_getpid(), SIGHUP); + +use Dice\Dice; +use Friendica\Core\Config; +use Friendica\Core\Logger; +use Friendica\Core\Worker; +use Friendica\Database\DBA; +use Psr\Log\LoggerInterface; + +// Get options +$shortopts = 'f'; +$longopts = ['foreground']; +$options = getopt($shortopts, $longopts); + +// Ensure that daemon.php is executed from the base path of the installation +if (!file_exists("boot.php") && (sizeof($_SERVER["argv"]) != 0)) { + $directory = dirname($_SERVER["argv"][0]); + + if (substr($directory, 0, 1) != "/") { + $directory = $_SERVER["PWD"] . "/" . $directory; + } + $directory = realpath($directory . "/.."); + + chdir($directory); } +require dirname(__DIR__) . '/vendor/autoload.php'; + +$dice = (new Dice())->addRules(include __DIR__ . '/../static/dependencies.config.php'); +$dice = $dice->addRule(LoggerInterface::class,['constructParams' => ['daemon']]); + +\Friendica\BaseObject::setDependencyInjection($dice); +$a = \Friendica\BaseObject::getApp(); + +if ($a->getMode()->isInstall()) { + die("Friendica isn't properly installed yet.\n"); +} + +Config::load(); + +if (empty(Config::get('system', 'pidfile'))) { + die(<< [ + 'pidfile' => '/path/to/daemon.pid', + ], +TXT + ); +} + +$pidfile = Config::get('system', 'pidfile'); + if (in_array("start", $_SERVER["argv"])) { $mode = "start"; } @@ -22,6 +70,8 @@ if (in_array("status", $_SERVER["argv"])) { $mode = "status"; } +$foreground = array_key_exists('f', $options) || array_key_exists('foreground', $options); + if (!isset($mode)) { die("Please use either 'start', 'stop' or 'status'.\n"); } @@ -30,27 +80,15 @@ if (empty($_SERVER["argv"][0])) { die("Unexpected script behaviour. This message should never occur.\n"); } -// Fetch the base directory -$directory = dirname($_SERVER["argv"][0]); +$pid = null; -if (substr($directory, 0, 1) != "/") { - $directory = $_SERVER["PWD"]."/".$directory; -} -$directory = realpath($directory."/.."); - -@include($directory."/.htconfig.php"); - -if (!isset($pidfile)) { - die('Please specify a pid file in the variable $pidfile in the .htconfig.php. For example:'."\n". - '$pidfile = "/path/to/daemon.pid";'."\n"); +if (is_readable($pidfile)) { + $pid = intval(file_get_contents($pidfile)); } -if (in_array($mode, array("stop", "status"))) { - $pid = @file_get_contents($pidfile); - - if (!$pid) { - die("Pidfile wasn't found. Is the daemon running?\n"); - } +if (empty($pid) && in_array($mode, ["stop", "status"])) { + Config::set('system', 'worker_daemon_mode', false); + die("Pidfile wasn't found. Is the daemon running?\n"); } if ($mode == "status") { @@ -60,6 +98,7 @@ if ($mode == "status") { unlink($pidfile); + Config::set('system', 'worker_daemon_mode', false); die("Daemon process $pid isn't running.\n"); } @@ -68,59 +107,102 @@ if ($mode == "stop") { unlink($pidfile); + Logger::notice("Worker daemon process was killed", ["pid" => $pid]); + + Config::set('system', 'worker_daemon_mode', false); die("Worker daemon process $pid was killed.\n"); } -echo "Starting worker daemon.\n"; - -if (isset($a->config['php_path'])) { - $php = $a->config['php_path']; -} else { - $php = "php"; +if (!empty($pid) && posix_kill($pid, 0)) { + die("Daemon process $pid is already running.\n"); } -// Switch over to daemon mode. -if ($pid = pcntl_fork()) - return; // Parent +Logger::notice('Starting worker daemon.', ["pid" => $pid]); -fclose(STDIN); // Close all of the standard -fclose(STDOUT); // file descriptors as we -fclose(STDERR); // are running as a daemon. +if (!$foreground) { + echo "Starting worker daemon.\n"; -register_shutdown_function('shutdown'); + // Switch over to daemon mode. + if ($pid = pcntl_fork()) { + return; // Parent + } -if (posix_setsid() < 0) - return; + fclose(STDIN); // Close all of the standard -if ($pid = pcntl_fork()) - return; // Parent + // Enabling this seem to block a running php process with 100% CPU usage when there is an outpout + // fclose(STDOUT); // file descriptors as we + // fclose(STDERR); // are running as a daemon. -$pid = getmypid(); -file_put_contents($pidfile, $pid); + DBA::disconnect(); + + register_shutdown_function('shutdown'); + + if (posix_setsid() < 0) { + return; + } + + if ($pid = pcntl_fork()) { + return; // Parent + } + + $pid = getmypid(); + file_put_contents($pidfile, $pid); + + // We lose the database connection upon forking + DBA::reconnect(); +} + +Config::set('system', 'worker_daemon_mode', true); + +// Just to be sure that this script really runs endlessly +set_time_limit(0); + +$wait_interval = intval(Config::get('system', 'cron_interval', 5)) * 60; + +$do_cron = true; +$last_cron = 0; // Now running as a daemon. while (true) { - // Just to be sure that this script really runs endlessly - set_time_limit(0); - - // Call the worker - $cmdline = $php.' bin/worker.php'; - - $executed = false; - - if (function_exists('proc_open')) { - $resource = proc_open($cmdline . ' &', array(), $foo, $directory); - - if (is_resource($resource)) { - $executed = true; - proc_close($resource); - } + if (!$do_cron && ($last_cron + $wait_interval) < time()) { + Logger::info('Forcing cron worker call.', ["pid" => $pid]); + $do_cron = true; } - if (!$executed) { - exec($cmdline.' spawn'); + Worker::spawnWorker($do_cron); + + if ($do_cron) { + // We force a reconnect of the database connection. + // This is done to ensure that the connection don't get lost over time. + DBA::reconnect(); + + $last_cron = time(); } - // Now sleep for 5 minutes - sleep(300); + Logger::info("Sleeping", ["pid" => $pid]); + $start = time(); + do { + $seconds = (time() - $start); + + // logarithmic wait time calculation. + // Background: After jobs had been started, they often fork many workers. + // To not waste too much time, the sleep period increases. + $arg = (($seconds + 1) / ($wait_interval / 9)) + 1; + $sleep = round(log10($arg) * 1000000, 0); + usleep($sleep); + + $timeout = ($seconds >= $wait_interval); + } while (!$timeout && !Worker::IPCJobsExists()); + + if ($timeout) { + $do_cron = true; + Logger::info("Woke up after $wait_interval seconds.", ["pid" => $pid, 'sleep' => $wait_interval]); + } else { + $do_cron = false; + Logger::info("Worker jobs are calling to be forked.", ["pid" => $pid]); + } +} + +function shutdown() { + posix_kill(posix_getpid(), SIGHUP); } diff --git a/bin/dev/friendica-to-smarty-tpl.py b/bin/dev/friendica-to-smarty-tpl.py deleted file mode 100755 index 8149051cae..0000000000 --- a/bin/dev/friendica-to-smarty-tpl.py +++ /dev/null @@ -1,241 +0,0 @@ -#!/usr/bin/python -# -# Script to convert Friendica internal template files into Smarty template files -# Copyright 2013 Zach Prezkuta -# Licensed under GPL v3 - -import os, re, string -import sys, getopt - -ldelim = '{{' -rdelim = '}}' - -addheader = True - -def fToSmarty(matches): - match = matches.group(0) - if match == '$j': - return match - match = string.replace(match, '[', '') - match = string.replace(match, ']', '') - - ldel = ldelim - rdel = rdelim - if match.find("'") > -1: - match = string.replace(match, "'", '') - ldel = "'" + ldel - rdel = rdel + "'" - elif match.find('"') > -1: - match = string.replace(match, '"', '') - ldel = '"' + ldel - rdel = rdel + '"' - - return ldel + match + rdel - - -def fix_element(element): - # Much of the positioning here is important, e.g. if you do element.find('if ') before you do - # element.find('endif'), then you may get some multiply-replaced delimiters - - if element.find('endif') > -1: - element = ldelim + '/if' + rdelim - return element - - if element.find('if ') > -1: - element = string.replace(element, '{{ if', ldelim + 'if') - element = string.replace(element, '{{if', ldelim + 'if') - element = string.replace(element, ' }}', rdelim) - element = string.replace(element, '}}', rdelim) - return element - - if element.find('else') > -1: - element = ldelim + 'else' + rdelim - return element - - if element.find('endfor') > -1: - element = ldelim + '/foreach' + rdelim - return element - - if element.find('for ') > -1: - element = string.replace(element, '{{ for ', ldelim + 'foreach ') - element = string.replace(element, '{{for ', ldelim + 'foreach ') - element = string.replace(element, ' }}', rdelim) - element = string.replace(element, '}}', rdelim) - return element - - if element.find('endinc') > -1: - element = '' - return element - - if element.find('inc ') > -1: - parts = element.split(' ') - element = ldelim + 'include file="' - - # We need to find the file name. It'll either be in parts[1] if the element was written as {{ inc file.tpl }} - # or it'll be in parts[2] if the element was written as {{inc file.tpl}} - if parts[0].find('inc') > -1: - first = 0 - else: - first = 1 - - if parts[first+1][0] == '$': - # This takes care of elements where the filename is a variable, e.g. {{ inc $file }} - element += ldelim + parts[first+1].rstrip('}') + rdelim - else: - # This takes care of elements where the filename is a path, e.g. {{ inc file.tpl }} - element += parts[first+1].rstrip('}') - - element += '"' - - if len(parts) > first + 1 and parts[first+2] == 'with': - # Take care of variable substitutions, e.g. {{ inc file.tpl with $var=this_var }} - element += ' ' + parts[first+3].rstrip('}')[1:] - - element += rdelim - return element - - -def convert(filename, tofilename, php_tpl): - if addheader: - header = ldelim + "*\n *\tAUTOMATICALLY GENERATED TEMPLATE\n *\tDO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN\n *\n *" + rdelim + "\n" - tofilename.write(header) - - for line in filename: - newline = '' - st_pos = 0 - brack_pos = line.find('{{') - - if php_tpl: - # If php_tpl is True, this script will only convert variables in quotes, like '$variable' - # or "$variable". This is for .tpl files that produce PHP scripts, where you don't want - # all the PHP variables converted into Smarty variables - pattern1 = re.compile(r""" -([\'\"]\$\[[a-zA-Z]\w* -(\. -(\d+|[a-zA-Z][\w-]*) -)* -(\|[\w\$:\.]*)* -\][\'\"]) -""", re.VERBOSE) - pattern2 = re.compile(r""" -([\'\"]\$[a-zA-Z]\w* -(\. -(\d+|[a-zA-Z][\w-]*) -)* -(\|[\w\$:\.]*)* -[\'\"]) -""", re.VERBOSE) - else: - # Compile the pattern for bracket-style variables, e.g. $[variable.key|filter:arg1:arg2|filter2:arg1:arg2] - # Note that dashes are only allowed in array keys if the key doesn't start - # with a number, e.g. $[variable.key-id] is ok but $[variable.12-id] isn't - # - # Doesn't currently process the argument position key 'x', i.e. filter:arg1:x:arg2 doesn't get - # changed to arg1|filter:variable:arg2 like Smarty requires - # - # Filter arguments can be variables, e.g. $variable, but currently can't have array keys with dashes - # like filter:$variable.key-name - pattern1 = re.compile(r""" -(\$\[[a-zA-Z]\w* -(\. -(\d+|[a-zA-Z][\w-]*) -)* -(\|[\w\$:\.]*)* -\]) -""", re.VERBOSE) - - # Compile the pattern for normal style variables, e.g. $variable.key - pattern2 = re.compile(r""" -(\$[a-zA-Z]\w* -(\. -(\d+|[a-zA-Z][\w-]*) -)* -(\|[\w\$:\.]*)* -) -""", re.VERBOSE) - - while brack_pos > -1: - if brack_pos > st_pos: - line_segment = line[st_pos:brack_pos] - line_segment = pattern2.sub(fToSmarty, line_segment) - newline += pattern1.sub(fToSmarty, line_segment) - - end_brack_pos = line.find('}}', brack_pos) - if end_brack_pos < 0: - print "Error: no matching bracket found" - - newline += fix_element(line[brack_pos:end_brack_pos + 2]) - st_pos = end_brack_pos + 2 - - brack_pos = line.find('{{', st_pos) - - line_segment = line[st_pos:] - line_segment = pattern2.sub(fToSmarty, line_segment) - newline += pattern1.sub(fToSmarty, line_segment) - newline = newline.replace("{#", ldelim + "*") - newline = newline.replace("#}", "*" + rdelim) - tofilename.write(newline) - - -def help(pname): - print "\nUsage:" - print "\t" + pname + " -h\n\n\t\t\tShow this help screen\n" - print "\t" + pname + " -p directory\n\n\t\t\tConvert all .tpl files in directory to\n\t\t\tSmarty templates in directory/smarty3/\n" - print "\t" + pname + "\n\n\t\t\tInteractive mode\n" - - - - -# -# Main script -# - -path = '' - -try: - opts, args = getopt.getopt(sys.argv[1:], "hp:", ['no-header']) - for opt, arg in opts: - if opt == '-h': - help(sys.argv[0]) - sys.exit() - elif opt == '-p': - path = arg - elif opt == '--no-header': - addheader = False -except getopt.GetoptError: - help(sys.argv[0]) - sys.exit(2) - - -if path == '': - path = raw_input('Path to template folder to convert: ') - -if path[-1:] != '/': - path = path + '/' - -outpath = path + 'smarty3/' - -if not os.path.exists(outpath): - os.makedirs(outpath) - -files = os.listdir(path) -for a_file in files: - if a_file == 'htconfig.tpl': - php_tpl = True - else: - php_tpl = False - - filename = os.path.join(path,a_file) - ext = a_file.split('.')[-1] - if os.path.isfile(filename) and ext == 'tpl': - f = open(filename, 'r') - - newfilename = os.path.join(outpath,a_file) - outf = open(newfilename, 'w') - - print "Converting " + filename + " to " + newfilename - convert(f, outf, php_tpl) - - outf.close() - f.close() - diff --git a/bin/dev/make_credits.py b/bin/dev/make_credits.py index fb13322b13..d895213909 100755 --- a/bin/dev/make_credits.py +++ b/bin/dev/make_credits.py @@ -5,7 +5,7 @@ This script will collect the contributors to friendica and its translations from * the git log of the friendica core and addons repositories * the translated messages.po from core and the addons. -The collected names will be saved in /util/credits.txt which is also parsed from +The collected names will be saved in CREDITS.txt which is also parsed from yourfriendica.tld/credits. The output is not perfect, so remember to open a fresh (re)created credits.txt file @@ -23,13 +23,15 @@ import os, glob, subprocess # not work in some cases. dontinclude = ['root', 'friendica', 'bavatar', 'tony baldwin', 'Taek', 'silke m', 'leberwurscht', 'abinoam', 'fabrixxm', 'FULL NAME', 'Hauke Zuehl', - 'Michal Supler', 'michal_s', 'Manuel Pérez', 'rabuzarus', 'Alberto Díaz'] + 'Michal Supler', 'michal_s', 'Manuel Pérez', 'rabuzarus', + 'Alberto Díaz', 'hoergen oostende', 'Friendica', 'vinzv', + 'Vincent Vindarel'] -# this script is in the /util sub-directory of the friendica installation +# this script is in the /bin/dev directory of the friendica installation # so the friendica path is the 0th argument of calling this script but we # need to remove the name of the file and the name of the directory -path = os.path.abspath(argv[0].split('util/make_credits.py')[0]) +path = os.path.abspath(argv[0].split('bin/dev/make_credits.py')[0]) print('> base directory is assumed to be: '+path) # a place to store contributors contributors = ["Andi Stadler", "Ratten", "Vít Šesták 'v6ak'"] @@ -88,10 +90,14 @@ for f in glob.glob(path+'/addon/*/lang/*/messages.po'): for ll in l: if intrans and ll.strip()=='': intrans = False; - if intrans and ll[0]=='#': - name = ll.split('# ')[1].split(',')[0].split(' <')[0] - if not name in contributors and name not in dontinclude: - contributors.append(name) + # at this point Transifex sometimes includes a "#, fuzzy" we eill + # ignore all lines starting with "#," as they do not contains any + # "Name email, year" information. + if not "#," in ll: + if intrans and ll[0]=='#': + name = ll.split('# ')[1].split(',')[0].split(' <')[0] + if not name in contributors and name not in dontinclude: + contributors.append(name) if "# Translators:" in ll: intrans = True # done with the translators @@ -101,7 +107,7 @@ print(' > found %d translators' % (n3-n2)) print('> found a total of %d contributors and translators' % n3) contributors.sort(key=str.lower) -f = open(path+'/util/credits.txt', 'w') +f = open(path+'/CREDITS.txt', 'w') f.write("\n".join(contributors)) f.close() -print('> list saved to util/credits.txt') +print('> list saved to CREDITS.txt') diff --git a/bin/dev/updatetpl.py b/bin/dev/updatetpl.py deleted file mode 100755 index 7b552fadd4..0000000000 --- a/bin/dev/updatetpl.py +++ /dev/null @@ -1,64 +0,0 @@ -#!/usr/bin/python -# -# Script to update Smarty template files from all internal templates -# Copyright 2013 Zach Prezkuta -# Licensed under GPL v3 - - -import os -import sys, getopt -import subprocess - - -def help(pname): - print "\nUsage:" - print "\t" + pname + " -h\n\n\t\t\tShow this help screen\n" - print "\t" + pname + " -p directory\n\n\t\t\tConvert all .tpl files in top-level\n\t\t\tFriendica directory to Smarty templates\n" - print "\t" + pname + "\n\n\t\t\tInteractive mode\n" - - - -# -# Main script -# - -path = '' - -try: - opts, args = getopt.getopt(sys.argv[1:], "hp:") - for opt, arg in opts: - if opt == '-h': - help(sys.argv[0]) - sys.exit() - elif opt == '-p': - path = arg -except getopt.GetoptError: - help(sys.argv[0]) - sys.exit(2) - -if path == '': - path = raw_input('Path to top-level Friendica directory: ') - -if path[-1:] != '/': - path = path + '/' - -tplpaths = ['view/'] -names = os.listdir(path + 'view/') -for name in names: - if os.path.isdir(path + 'view/' + name): - if name != 'smarty3' and name != 'theme': - tplpaths.append('view/' + name + '/') - -names = os.listdir(path + 'view/theme/') -for name in names: - if os.path.isdir(path + 'view/theme/' + name): - tplpaths.append('view/theme/' + name + '/') - -fnull = open(os.devnull, "w") - -for tplpath in tplpaths: - print "Converting " + path + tplpath - subprocess.call(['python', path + 'util/friendica-to-smarty-tpl.py', '-p', path + tplpath], stdout = fnull) - -fnull.close() - diff --git a/bin/dev/vagrant_provision.sh b/bin/dev/vagrant_provision.sh index fc3e266f2e..dc24f87994 100755 --- a/bin/dev/vagrant_provision.sh +++ b/bin/dev/vagrant_provision.sh @@ -37,9 +37,9 @@ sudo apt-get install -y apache2 sudo a2enmod rewrite actions ssl sudo cp /vagrant/bin/dev/vagrant_vhost.sh /usr/local/bin/vhost sudo chmod guo+x /usr/local/bin/vhost - sudo vhost -s 192.168.22.10.xip.io -d /var/www -p /etc/ssl/xip.io -c xip.io -a friendica.local - sudo a2dissite 000-default - sudo service apache2 restart +sudo vhost -s 192.168.22.10.xip.io -d /var/www -p /etc/ssl/xip.io -c xip.io -a friendica.local +sudo a2dissite 000-default +sudo service apache2 restart #Install php echo ">>> Installing PHP7" @@ -48,9 +48,9 @@ sudo systemctl restart apache2 #Install mysql echo ">>> Installing Mysql" -sudo debconf-set-selections <<< "mysql-server mysql-server/root_password password root" -sudo debconf-set-selections <<< "mysql-server mysql-server/root_password_again password root" -sudo apt-get install -qq mysql-server +sudo debconf-set-selections <<< "mariadb-server mariadb-server/root_password password root" +sudo debconf-set-selections <<< "mariadb-server mariadb-server/root_password_again password root" +sudo apt-get install -qq mariadb-server # enable remote access # setting the mysql bind-address to allow connections from everywhere sed -i "s/bind-address.*/bind-address = 0.0.0.0/" /etc/mysql/my.cnf @@ -76,6 +76,9 @@ debconf-set-selections <<< "postfix postfix/main_mailer_type string 'Local Only' sudo apt-get install -y postfix mailutils libmailutils-dev sudo echo -e "friendica1: vagrant\nfriendica2: vagrant\nfriendica3: vagrant\nfriendica4: vagrant\nfriendica5: vagrant" >> /etc/aliases && sudo newaliases +# Friendica needs git for fetching some dependencies +sudo apt-get install -y git + #make the vagrant directory the docroot sudo rm -rf /var/www/ sudo ln -fs /vagrant /var/www @@ -83,10 +86,13 @@ sudo ln -fs /vagrant /var/www # install deps with composer sudo apt install unzip cd /var/www -php bin/composer.phar install +sudo -u www-data php bin/composer.phar install # initial config file for friendica in vagrant -cp /vagrant/util/htconfig.vagrant.php /vagrant/.htconfig.php +cp /vagrant/mods/local.config.vagrant.php /vagrant/config/local.config.php + +# copy the .htaccess-dist file to .htaccess so that rewrite rules work +cp /vagrant/.htaccess-dist /vagrant/.htaccess # create the friendica database echo "create database friendica DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci" | $MYSQL -u root -proot diff --git a/bin/run_xgettext.sh b/bin/run_xgettext.sh index 818aabe2ff..5c40df8b5f 100755 --- a/bin/run_xgettext.sh +++ b/bin/run_xgettext.sh @@ -45,10 +45,10 @@ case "$MODE" in ;; 'default') cd "$FULLPATH/.." - OUTFILE="$FULLPATH/../util/messages.po" + OUTFILE="$FULLPATH/../view/lang/C/messages.po" FINDSTARTDIR="." # skip addon folder - FINDOPTS="( -wholename */addon -or -wholename */addons-extra -or -wholename */smarty3 ) -prune -o" + FINDOPTS="( -wholename */addon -or -wholename */addons -or -wholename */addons-extra -or -wholename */smarty3 ) -prune -o" F9KVERSION=$(sed -n "s/.*'FRIENDICA_VERSION'.*'\([0-9.]*\)'.*/\1/p" ./boot.php); echo "Friendica version $F9KVERSION" diff --git a/testargs.php b/bin/testargs.php similarity index 100% rename from testargs.php rename to bin/testargs.php diff --git a/bin/wait-for-connection b/bin/wait-for-connection new file mode 100755 index 0000000000..eeb9ba980d --- /dev/null +++ b/bin/wait-for-connection @@ -0,0 +1,45 @@ +#!/usr/bin/php +# +# This script tries to connect to a database for a given interval +# Useful in case of installation e.g. to wait for the database to not generate unnecessary errors +# +# Usage: php bin/wait-for-connection {HOST} {PORT} [{TIMEOUT}] + + $timeout) { + $socketTimeout = $timeout; +} +$stopTime = time() + $timeout; +do { + $sock = @fsockopen($host, $port, $errno, $errstr, $socketTimeout); + if ($sock !== false) { + fclose($sock); + fwrite(STDOUT, "\n"); + exit(0); + } + sleep(1); + fwrite(STDOUT, '.'); +} while (time() < $stopTime); +fwrite(STDOUT, "\n"); +exit(1); diff --git a/bin/worker.php b/bin/worker.php index b4b265283c..469dcb001e 100755 --- a/bin/worker.php +++ b/bin/worker.php @@ -5,62 +5,60 @@ * @brief Starts the background processing */ +use Dice\Dice; use Friendica\App; use Friendica\BaseObject; -use Friendica\Core\Addon; use Friendica\Core\Config; +use Friendica\Core\Update; use Friendica\Core\Worker; +use Psr\Log\LoggerInterface; + +// Get options +$shortopts = 'sn'; +$longopts = ['spawn', 'no_cron']; +$options = getopt($shortopts, $longopts); // Ensure that worker.php is executed from the base path of the installation if (!file_exists("boot.php") && (sizeof($_SERVER["argv"]) != 0)) { $directory = dirname($_SERVER["argv"][0]); - if (substr($directory, 0, 1) != "/") { - $directory = $_SERVER["PWD"]."/".$directory; + if (substr($directory, 0, 1) != '/') { + $directory = $_SERVER["PWD"] . '/' . $directory; } - $directory = realpath($directory."/.."); + $directory = realpath($directory . '/..'); chdir($directory); } -require_once "boot.php"; -require_once "include/dba.php"; +require dirname(__DIR__) . '/vendor/autoload.php'; -$a = new App(dirname(__DIR__)); -BaseObject::setApp($a); +$dice = (new Dice())->addRules(include __DIR__ . '/../static/dependencies.config.php'); +$dice = $dice->addRule(LoggerInterface::class,['constructParams' => ['worker']]); -require_once ".htconfig.php"; -dba::connect($db_host, $db_user, $db_pass, $db_data); -unset($db_host, $db_user, $db_pass, $db_data); - -Config::load(); +BaseObject::setDependencyInjection($dice); +$a = BaseObject::getApp(); // Check the database structure and possibly fixes it -check_db(true); +Update::check($a->getBasePath(), true, $a->getMode()); // Quit when in maintenance -if (Config::get('system', 'maintenance', false, true)) { +if (!$a->getMode()->has(App\Mode::MAINTENANCEDISABLED)) { return; } -$a->set_baseurl(Config::get('system', 'url')); +$a->setBaseURL(Config::get('system', 'url')); -Addon::loadHooks(); - -$spawn = (($_SERVER["argc"] == 2) && ($_SERVER["argv"][1] == "spawn")); +$spawn = array_key_exists('s', $options) || array_key_exists('spawn', $options); if ($spawn) { Worker::spawnWorker(); - killme(); + exit(); } -$run_cron = (($_SERVER["argc"] <= 1) || ($_SERVER["argv"][1] != "no_cron")); +$run_cron = !array_key_exists('n', $options) && !array_key_exists('no_cron', $options); Worker::processQueue($run_cron); Worker::unclaimProcess(); Worker::endProcess(); - -killme(); - diff --git a/boot.php b/boot.php index 1ca8b8d8d8..3571a77c16 100644 --- a/boot.php +++ b/boot.php @@ -17,40 +17,25 @@ * easily as email does today. */ -require_once __DIR__ . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php'; - use Friendica\App; use Friendica\BaseObject; -use Friendica\Core\Addon; -use Friendica\Core\Cache; use Friendica\Core\Config; -use Friendica\Core\L10n; use Friendica\Core\PConfig; use Friendica\Core\Protocol; use Friendica\Core\System; -use Friendica\Core\Worker; -use Friendica\Database\DBM; -use Friendica\Database\DBStructure; +use Friendica\Core\Session; +use Friendica\Database\DBA; use Friendica\Model\Contact; -use Friendica\Model\Conversation; +use Friendica\Model\Term; +use Friendica\Util\BasePath; use Friendica\Util\DateTimeFormat; -require_once 'include/text.php'; - define('FRIENDICA_PLATFORM', 'Friendica'); -define('FRIENDICA_CODENAME', 'The Tazmans Flax-lily'); -define('FRIENDICA_VERSION', '2018-05-dev'); +define('FRIENDICA_CODENAME', 'Dalmatian Bellflower'); +define('FRIENDICA_VERSION', '2019.12-dev'); define('DFRN_PROTOCOL_VERSION', '2.23'); -define('DB_UPDATE_VERSION', 1259); define('NEW_UPDATE_ROUTINE_VERSION', 1170); -/** - * @brief Constants for the database update check - */ -const DB_UPDATE_NOT_CHECKED = 0; // Database check wasn't executed before -const DB_UPDATE_SUCCESSFUL = 1; // Database check was successful -const DB_UPDATE_FAILED = 2; // Database check failed - /** * @brief Constant with a HTML line break. * @@ -64,15 +49,13 @@ define('EOL', "
\r\n"); * @brief Image storage quality. * * Lower numbers save space at cost of image detail. - * For ease of upgrade, please do not change here. Change jpeg quality with - * $a->config['system']['jpeg_quality'] = n; - * in .htconfig.php, where n is netween 1 and 100, and with very poor results - * below about 50 + * For ease of upgrade, please do not change here. Set system.jpegquality = n in config/local.config.php, + * where n is between 1 and 100, and with very poor results below about 50 */ define('JPEG_QUALITY', 100); /** - * $a->config['system']['png_quality'] from 0 (uncompressed) to 9 + * system.png_quality = n where is between 0 (uncompressed) to 9 */ define('PNG_QUALITY', 8); @@ -83,9 +66,12 @@ define('PNG_QUALITY', 8); * this length (on the longest side, the other side will be scaled appropriately). * Modify this value using * - * $a->config['system']['max_image_length'] = n; + * 'system' => [ + * 'max_image_length' => 'n', + * ... + * ], * - * in .htconfig.php + * in config/local.config.php * * If you don't want to set a maximum length, set to -1. The default value is * defined by 'MAX_IMAGE_LENGTH' below. @@ -97,134 +83,12 @@ define('MAX_IMAGE_LENGTH', -1); */ define('DEFAULT_DB_ENGINE', 'InnoDB'); -/** - * @name SSL Policy - * - * SSL redirection policies - * @{ - */ -define('SSL_POLICY_NONE', 0); -define('SSL_POLICY_FULL', 1); -define('SSL_POLICY_SELFSIGN', 2); -/* @}*/ - -/** - * @name Logger - * - * log levels - * @{ - */ -define('LOGGER_NORMAL', 0); -define('LOGGER_TRACE', 1); -define('LOGGER_DEBUG', 2); -define('LOGGER_DATA', 3); -define('LOGGER_ALL', 4); -/* @}*/ - -/** - * @name Cache - * @deprecated since version 3.6 - * @see Cache - * - * Cache levels - * @{ - */ -define('CACHE_MONTH', Cache::MONTH); -define('CACHE_WEEK', Cache::WEEK); -define('CACHE_DAY', Cache::DAY); -define('CACHE_HOUR', Cache::HOUR); -define('CACHE_HALF_HOUR', Cache::HALF_HOUR); -define('CACHE_QUARTER_HOUR', Cache::QUARTER_HOUR); -define('CACHE_FIVE_MINUTES', Cache::FIVE_MINUTES); -define('CACHE_MINUTE', Cache::MINUTE); -/* @}*/ - -/** - * @name Register - * - * Registration policies - * @{ - */ -define('REGISTER_CLOSED', 0); -define('REGISTER_APPROVE', 1); -define('REGISTER_OPEN', 2); -/** - * @} -*/ - -/** - * @name Contact_is - * - * Relationship types - * @{ - */ -define('CONTACT_IS_FOLLOWER', 1); -define('CONTACT_IS_SHARING', 2); -define('CONTACT_IS_FRIEND', 3); -/** - * @} - */ - -/** - * @name Update - * - * DB update return values - * @{ - */ -define('UPDATE_SUCCESS', 0); -define('UPDATE_FAILED', 1); -/** - * @} - */ - -/** - * @name page/profile types - * - * PAGE_NORMAL is a typical personal profile account - * PAGE_SOAPBOX automatically approves all friend requests as CONTACT_IS_SHARING, (readonly) - * PAGE_COMMUNITY automatically approves all friend requests as CONTACT_IS_SHARING, but with - * write access to wall and comments (no email and not included in page owner's ACL lists) - * PAGE_FREELOVE automatically approves all friend requests as full friends (CONTACT_IS_FRIEND). - * - * @{ - */ -define('PAGE_NORMAL', 0); -define('PAGE_SOAPBOX', 1); -define('PAGE_COMMUNITY', 2); -define('PAGE_FREELOVE', 3); -define('PAGE_BLOG', 4); -define('PAGE_PRVGROUP', 5); -/** - * @} - */ - -/** - * @name account types - * - * ACCOUNT_TYPE_PERSON - the account belongs to a person - * Associated page types: PAGE_NORMAL, PAGE_SOAPBOX, PAGE_FREELOVE - * - * ACCOUNT_TYPE_ORGANISATION - the account belongs to an organisation - * Associated page type: PAGE_SOAPBOX - * - * ACCOUNT_TYPE_NEWS - the account is a news reflector - * Associated page type: PAGE_SOAPBOX - * - * ACCOUNT_TYPE_COMMUNITY - the account is community forum - * Associated page types: PAGE_COMMUNITY, PAGE_PRVGROUP - * - * ACCOUNT_TYPE_RELAY - the account is a relay - * This will only be assigned to contacts, not to user accounts - * @{ - */ -define('ACCOUNT_TYPE_PERSON', 0); -define('ACCOUNT_TYPE_ORGANISATION', 1); -define('ACCOUNT_TYPE_NEWS', 2); -define('ACCOUNT_TYPE_COMMUNITY', 3); -define('ACCOUNT_TYPE_RELAY', 4); -/** - * @} - */ +/** @deprecated since version 2019.03, please use \Friendica\Module\Register::CLOSED instead */ +define('REGISTER_CLOSED', \Friendica\Module\Register::CLOSED); +/** @deprecated since version 2019.03, please use \Friendica\Module\Register::APPROVE instead */ +define('REGISTER_APPROVE', \Friendica\Module\Register::APPROVE); +/** @deprecated since version 2019.03, please use \Friendica\Module\Register::OPEN instead */ +define('REGISTER_OPEN', \Friendica\Module\Register::OPEN); /** * @name CP @@ -241,84 +105,32 @@ define('CP_USERS_AND_GLOBAL', 2); * @} */ -/** - * @name Protocols - * @deprecated since version 3.6 - * @see Conversation - * - * Different protocols that we are storing - * @{ - */ -define('PROTOCOL_UNKNOWN' , Conversation::PROTOCOL_UNKNOWN); -define('PROTOCOL_DFRN' , Conversation::PROTOCOL_DFRN); -define('PROTOCOL_DIASPORA' , Conversation::PROTOCOL_DIASPORA); -define('PROTOCOL_OSTATUS_SALMON' , Conversation::PROTOCOL_OSTATUS_SALMON); -define('PROTOCOL_OSTATUS_FEED' , Conversation::PROTOCOL_OSTATUS_FEED); // Deprecated -define('PROTOCOL_GS_CONVERSATION', Conversation::PROTOCOL_GS_CONVERSATION); // Deprecated -define('PROTOCOL_SPLITTED_CONV' , Conversation::PROTOCOL_SPLITTED_CONV); -/** - * @} - */ - -/** - * @name Network constants - * @deprecated since version 3.6 - * @see Protocol - * - * Network and protocol family types - * @{ - */ -define('NETWORK_DFRN' , Protocol::DFRN); // Friendica, Mistpark, other DFRN implementations -define('NETWORK_ZOT' , Protocol::ZOT); // Zot! - Currently unsupported -define('NETWORK_OSTATUS' , Protocol::OSTATUS); // GNU-social, Pleroma, Mastodon, other OStatus implementations -define('NETWORK_FEED' , Protocol::FEED); // RSS/Atom feeds with no known "post/notify" protocol -define('NETWORK_DIASPORA' , Protocol::DIASPORA); // Diaspora -define('NETWORK_MAIL' , Protocol::MAIL); // IMAP/POP -define('NETWORK_FACEBOOK' , Protocol::FACEBOOK); // Facebook API -define('NETWORK_LINKEDIN' , Protocol::LINKEDIN); // LinkedIn -define('NETWORK_XMPP' , Protocol::XMPP); // XMPP - Currently unsupported -define('NETWORK_MYSPACE' , Protocol::MYSPACE); // MySpace - Currently unsupported -define('NETWORK_GPLUS' , Protocol::GPLUS); // Google+ -define('NETWORK_PUMPIO' , Protocol::PUMPIO); // pump.io -define('NETWORK_TWITTER' , Protocol::TWITTER); // Twitter -define('NETWORK_DIASPORA2', Protocol::DIASPORA2); // Diaspora connector -define('NETWORK_STATUSNET', Protocol::STATUSNET); // Statusnet connector -define('NETWORK_APPNET' , Protocol::APPNET); // app.net - Dead protocol -define('NETWORK_NEWS' , Protocol::NEWS); // Network News Transfer Protocol - Currently unsupported -define('NETWORK_ICALENDAR', Protocol::ICALENDAR); // iCalendar - Currently unsupported -define('NETWORK_PNUT' , Protocol::PNUT); // pnut.io - Currently unsupported -define('NETWORK_PHANTOM' , Protocol::PHANTOM); // Place holder -/** - * @} - */ - /** * These numbers are used in stored permissions * and existing allocations MUST NEVER BE CHANGED * OR RE-ASSIGNED! You may only add to them. */ $netgroup_ids = [ - NETWORK_DFRN => (-1), - NETWORK_ZOT => (-2), - NETWORK_OSTATUS => (-3), - NETWORK_FEED => (-4), - NETWORK_DIASPORA => (-5), - NETWORK_MAIL => (-6), - NETWORK_FACEBOOK => (-8), - NETWORK_LINKEDIN => (-9), - NETWORK_XMPP => (-10), - NETWORK_MYSPACE => (-11), - NETWORK_GPLUS => (-12), - NETWORK_PUMPIO => (-13), - NETWORK_TWITTER => (-14), - NETWORK_DIASPORA2 => (-15), - NETWORK_STATUSNET => (-16), - NETWORK_APPNET => (-17), - NETWORK_NEWS => (-18), - NETWORK_ICALENDAR => (-19), - NETWORK_PNUT => (-20), + Protocol::DFRN => (-1), + Protocol::ZOT => (-2), + Protocol::OSTATUS => (-3), + Protocol::FEED => (-4), + Protocol::DIASPORA => (-5), + Protocol::MAIL => (-6), + Protocol::FACEBOOK => (-8), + Protocol::LINKEDIN => (-9), + Protocol::XMPP => (-10), + Protocol::MYSPACE => (-11), + Protocol::GPLUS => (-12), + Protocol::PUMPIO => (-13), + Protocol::TWITTER => (-14), + Protocol::DIASPORA2 => (-15), + Protocol::STATUSNET => (-16), + Protocol::NEWS => (-18), + Protocol::ICALENDAR => (-19), + Protocol::PNUT => (-20), - NETWORK_PHANTOM => (-127), + Protocol::PHANTOM => (-127), ]; /** @@ -326,52 +138,51 @@ $netgroup_ids = [ */ define('MAX_LIKERS', 75); -/** - * Communication timeout - */ -define('ZCURL_TIMEOUT', (-1)); - /** * @name Notify * * Email notification options * @{ */ -define('NOTIFY_INTRO', 0x0001); -define('NOTIFY_CONFIRM', 0x0002); -define('NOTIFY_WALL', 0x0004); -define('NOTIFY_COMMENT', 0x0008); -define('NOTIFY_MAIL', 0x0010); -define('NOTIFY_SUGGEST', 0x0020); -define('NOTIFY_PROFILE', 0x0040); -define('NOTIFY_TAGSELF', 0x0080); -define('NOTIFY_TAGSHARE', 0x0100); -define('NOTIFY_POKE', 0x0200); -define('NOTIFY_SHARE', 0x0400); +define('NOTIFY_INTRO', 1); +define('NOTIFY_CONFIRM', 2); +define('NOTIFY_WALL', 4); +define('NOTIFY_COMMENT', 8); +define('NOTIFY_MAIL', 16); +define('NOTIFY_SUGGEST', 32); +define('NOTIFY_PROFILE', 64); +define('NOTIFY_TAGSELF', 128); +define('NOTIFY_TAGSHARE', 256); +define('NOTIFY_POKE', 512); +define('NOTIFY_SHARE', 1024); -define('SYSTEM_EMAIL', 0x4000); +define('SYSTEM_EMAIL', 16384); -define('NOTIFY_SYSTEM', 0x8000); +define('NOTIFY_SYSTEM', 32768); /* @}*/ -/** - * @name Term - * - * Tag/term types - * @{ - */ -define('TERM_UNKNOWN', 0); -define('TERM_HASHTAG', 1); -define('TERM_MENTION', 2); -define('TERM_CATEGORY', 3); -define('TERM_PCATEGORY', 4); -define('TERM_FILE', 5); -define('TERM_SAVEDSEARCH', 6); -define('TERM_CONVERSATION', 7); +/** @deprecated since 2019.03, use Term::UNKNOWN instead */ +define('TERM_UNKNOWN', Term::UNKNOWN); +/** @deprecated since 2019.03, use Term::HASHTAG instead */ +define('TERM_HASHTAG', Term::HASHTAG); +/** @deprecated since 2019.03, use Term::MENTION instead */ +define('TERM_MENTION', Term::MENTION); +/** @deprecated since 2019.03, use Term::CATEGORY instead */ +define('TERM_CATEGORY', Term::CATEGORY); +/** @deprecated since 2019.03, use Term::PCATEGORY instead */ +define('TERM_PCATEGORY', Term::PCATEGORY); +/** @deprecated since 2019.03, use Term::FILE instead */ +define('TERM_FILE', Term::FILE); +/** @deprecated since 2019.03, use Term::SAVEDSEARCH instead */ +define('TERM_SAVEDSEARCH', Term::SAVEDSEARCH); +/** @deprecated since 2019.03, use Term::CONVERSATION instead */ +define('TERM_CONVERSATION', Term::CONVERSATION); -define('TERM_OBJ_POST', 1); -define('TERM_OBJ_PHOTO', 2); +/** @deprecated since 2019.03, use Term::OBJECT_TYPE_POST instead */ +define('TERM_OBJ_POST', Term::OBJECT_TYPE_POST); +/** @deprecated since 2019.03, use Term::OBJECT_TYPE_PHOTO instead */ +define('TERM_OBJ_PHOTO', Term::OBJECT_TYPE_PHOTO); /** * @name Namespaces @@ -383,6 +194,7 @@ define('NAMESPACE_ZOT', 'http://purl.org/zot'); define('NAMESPACE_DFRN', 'http://purl.org/macgirvin/dfrn/1.0'); define('NAMESPACE_THREAD', 'http://purl.org/syndication/thread/1.0'); define('NAMESPACE_TOMB', 'http://purl.org/atompub/tombstones/1.0'); +define('NAMESPACE_ACTIVITY2', 'https://www.w3.org/ns/activitystreams#'); define('NAMESPACE_ACTIVITY', 'http://activitystrea.ms/spec/1.0/'); define('NAMESPACE_ACTIVITY_SCHEMA', 'http://activitystrea.ms/schema/1.0/'); define('NAMESPACE_MEDIA', 'http://purl.org/syndication/atommedia'); @@ -425,6 +237,7 @@ define('ACTIVITY_FAVORITE', NAMESPACE_ACTIVITY_SCHEMA . 'favorite'); define('ACTIVITY_UNFAVORITE', NAMESPACE_ACTIVITY_SCHEMA . 'unfavorite'); define('ACTIVITY_SHARE', NAMESPACE_ACTIVITY_SCHEMA . 'share'); define('ACTIVITY_DELETE', NAMESPACE_ACTIVITY_SCHEMA . 'delete'); +define('ACTIVITY2_ANNOUNCE', NAMESPACE_ACTIVITY2 . 'Announce'); define('ACTIVITY_POKE', NAMESPACE_ZOT . '/activity/poke'); @@ -451,8 +264,9 @@ define('ACTIVITY_OBJ_QUESTION', 'http://activityschema.org/object/question'); * @{ */ define('GRAVITY_PARENT', 0); -define('GRAVITY_LIKE', 3); +define('GRAVITY_ACTIVITY', 3); define('GRAVITY_COMMENT', 6); +define('GRAVITY_UNKNOWN', 9); /* @}*/ /** @@ -481,11 +295,6 @@ define('SR_SCOPE_ALL', 'all'); define('SR_SCOPE_TAGS', 'tags'); /* @}*/ -/** - * Lowest possible date time value - */ -define('NULL_DATE', '0001-01-01 00:00:00'); - // Normally this constant is defined - but not if "pcntl" isn't installed if (!defined("SIGTERM")) { define("SIGTERM", 15); @@ -498,392 +307,19 @@ if (!defined("SIGTERM")) { if (!defined('CURLE_OPERATION_TIMEDOUT')) { define('CURLE_OPERATION_TIMEDOUT', CURLE_OPERATION_TIMEOUTED); } -/** - * Reverse the effect of magic_quotes_gpc if it is enabled. - * Please disable magic_quotes_gpc so we don't have to do this. - * See http://php.net/manual/en/security.magicquotes.disabling.php - */ -function startup() -{ - error_reporting(E_ERROR | E_WARNING | E_PARSE); - - set_time_limit(0); - - // This has to be quite large to deal with embedded private photos - ini_set('pcre.backtrack_limit', 500000); - - if (get_magic_quotes_gpc()) { - $process = [&$_GET, &$_POST, &$_COOKIE, &$_REQUEST]; - while (list($key, $val) = each($process)) { - foreach ($val as $k => $v) { - unset($process[$key][$k]); - if (is_array($v)) { - $process[$key][stripslashes($k)] = $v; - $process[] = &$process[$key][stripslashes($k)]; - } else { - $process[$key][stripslashes($k)] = stripslashes($v); - } - } - } - unset($process); - } -} /** * @brief Retrieve the App structure * * Useful in functions which require it but don't get it passed to them * + * @deprecated since version 2018.09 + * @see BaseObject::getApp() * @return App */ function get_app() { - global $a; - - if (empty($a)) { - $a = new App(dirname(__DIR__)); - BaseObject::setApp($a); - } - - return $a; -} - -/** - * @brief Multi-purpose function to check variable state. - * - * Usage: x($var) or $x($array, 'key') - * - * returns false if variable/key is not set - * if variable is set, returns 1 if has 'non-zero' value, otherwise returns 0. - * e.g. x('') or x(0) returns 0; - * - * @param string|array $s variable to check - * @param string $k key inside the array to check - * - * @return bool|int - */ -function x($s, $k = null) -{ - if ($k != null) { - if ((is_array($s)) && (array_key_exists($k, $s))) { - if ($s[$k]) { - return (int) 1; - } - return (int) 0; - } - return false; - } else { - if (isset($s)) { - if ($s) { - return (int) 1; - } - return (int) 0; - } - return false; - } -} - -/** - * Return the provided variable value if it exists and is truthy or the provided - * default value instead. - * - * Works with initialized variables and potentially uninitialized array keys - * - * Usages: - * - defaults($var, $default) - * - defaults($array, 'key', $default) - * - * @brief Returns a defaut value if the provided variable or array key is falsy - * @see x() - * @return mixed - */ -function defaults() { - $args = func_get_args(); - - if (count($args) < 2) { - throw new BadFunctionCallException('defaults() requires at least 2 parameters'); - } - if (count($args) > 3) { - throw new BadFunctionCallException('defaults() cannot use more than 3 parameters'); - } - if (count($args) === 3 && is_null($args[1])) { - throw new BadFunctionCallException('defaults($arr, $key, $def) $key is null'); - } - - $default = array_pop($args); - - if (call_user_func_array('x', $args)) { - if (count($args) === 1) { - $return = $args[0]; - } else { - $return = $args[0][$args[1]]; - } - } else { - $return = $default; - } - - return $return; -} - -/** - * @brief Returns the baseurl. - * - * @see System::baseUrl() - * - * @return string - * @TODO Function is deprecated and only used in some addons - */ -function z_root() -{ - return System::baseUrl(); -} - -/** - * @brief Return absolut URL for given $path. - * - * @param string $path given path - * - * @return string - */ -function absurl($path) -{ - if (strpos($path, '/') === 0) { - return z_path() . $path; - } - return $path; -} - -/** - * @brief Function to check if request was an AJAX (xmlhttprequest) request. - * - * @return boolean - */ -function is_ajax() -{ - return (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest'); -} - -/** - * @brief Function to check if request was an AJAX (xmlhttprequest) request. - * - * @param boolean $via_worker boolean Is the check run via the worker? - */ -function check_db($via_worker) -{ - $build = Config::get('system', 'build'); - - if (empty($build)) { - Config::set('system', 'build', DB_UPDATE_VERSION - 1); - $build = DB_UPDATE_VERSION - 1; - } - - // We don't support upgrading from very old versions anymore - if ($build < NEW_UPDATE_ROUTINE_VERSION) { - die('You try to update from a version prior to database version 1170. The direct upgrade path is not supported. Please update to version 3.5.4 before updating to this version.'); - } - - if ($build < DB_UPDATE_VERSION) { - // When we cannot execute the database update via the worker, we will do it directly - if (!Worker::add(PRIORITY_CRITICAL, 'DBUpdate') && $via_worker) { - update_db(); - } - } -} - -/** - * Sets the base url for use in cmdline programs which don't have - * $_SERVER variables - * - * @param object $a App - */ -function check_url(App $a) -{ - $url = Config::get('system', 'url'); - - // if the url isn't set or the stored url is radically different - // than the currently visited url, store the current value accordingly. - // "Radically different" ignores common variations such as http vs https - // and www.example.com vs example.com. - // We will only change the url to an ip address if there is no existing setting - - if (empty($url) || (!link_compare($url, System::baseUrl())) && (!preg_match("/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/", $a->get_hostname))) { - Config::set('system', 'url', System::baseUrl()); - } - - return; -} - -/** - * @brief Automatic database updates - * @param object $a App - */ -function update_db() -{ - $build = Config::get('system', 'build'); - - if (empty($build) || ($build > DB_UPDATE_VERSION)) { - $build = DB_UPDATE_VERSION - 1; - Config::set('system', 'build', $build); - } - - if ($build != DB_UPDATE_VERSION) { - require_once 'update.php'; - - $stored = intval($build); - $current = intval(DB_UPDATE_VERSION); - if ($stored < $current) { - Config::load('database'); - - // Compare the current structure with the defined structure - $t = Config::get('database', 'dbupdate_' . DB_UPDATE_VERSION); - if (!is_null($t)) { - return; - } - - Config::set('database', 'dbupdate_' . DB_UPDATE_VERSION, time()); - - // run update routine - // it update the structure in one call - $retval = DBStructure::update(false, true); - if ($retval) { - DBStructure::updateFail( - DB_UPDATE_VERSION, - $retval - ); - return; - } else { - Config::set('database', 'dbupdate_' . DB_UPDATE_VERSION, 'success'); - } - - // run any left update_nnnn functions in update.php - for ($x = $stored + 1; $x <= $current; $x++) { - $r = run_update_function($x); - if (!$r) { - break; - } - } - } - } - - return; -} - -function run_update_function($x) -{ - if (function_exists('update_' . $x)) { - // There could be a lot of processes running or about to run. - // We want exactly one process to run the update command. - // So store the fact that we're taking responsibility - // after first checking to see if somebody else already has. - // If the update fails or times-out completely you may need to - // delete the config entry to try again. - - $t = Config::get('database', 'update_' . $x); - if (!is_null($t)) { - return false; - } - Config::set('database', 'update_' . $x, time()); - - // call the specific update - - $func = 'update_' . $x; - $retval = $func(); - - if ($retval) { - //send the administrator an e-mail - DBStructure::updateFail( - $x, - L10n::t('Update %s failed. See error logs.', $x) - ); - return false; - } else { - Config::set('database', 'update_' . $x, 'success'); - Config::set('system', 'build', $x); - return true; - } - } else { - Config::set('database', 'update_' . $x, 'success'); - Config::set('system', 'build', $x); - return true; - } -} - -/** - * @brief Synchronise addons: - * - * $a->config['system']['addon'] contains a comma-separated list of names - * of addons which are used on this system. - * Go through the database list of already installed addons, and if we have - * an entry, but it isn't in the config list, call the uninstall procedure - * and mark it uninstalled in the database (for now we'll remove it). - * Then go through the config list and if we have a addon that isn't installed, - * call the install procedure and add it to the database. - * - * @param object $a App - */ -function check_addons(App $a) -{ - $r = q("SELECT * FROM `addon` WHERE `installed` = 1"); - if (DBM::is_result($r)) { - $installed = $r; - } else { - $installed = []; - } - - $addons = Config::get('system', 'addon'); - $addons_arr = []; - - if ($addons) { - $addons_arr = explode(',', str_replace(' ', '', $addons)); - } - - $a->addons = $addons_arr; - - $installed_arr = []; - - if (count($installed)) { - foreach ($installed as $i) { - if (!in_array($i['name'], $addons_arr)) { - Addon::uninstall($i['name']); - } else { - $installed_arr[] = $i['name']; - } - } - } - - if (count($addons_arr)) { - foreach ($addons_arr as $p) { - if (!in_array($p, $installed_arr)) { - Addon::install($p); - } - } - } - - Addon::loadHooks(); - - return; -} - -function get_guid($size = 16, $prefix = '') -{ - if (is_bool($prefix) && !$prefix) { - $prefix = ''; - } elseif ($prefix == '') { - $a = get_app(); - $prefix = hash('crc32', $a->get_hostname()); - } - - while (strlen($prefix) < ($size - 13)) { - $prefix .= mt_rand(); - } - - if ($size >= 24) { - $prefix = substr($prefix, 0, $size - 22); - return str_replace('.', '', uniqid($prefix, true)); - } else { - $prefix = substr($prefix, 0, max($size - 13, 0)); - return uniqid($prefix); - } + return BaseObject::getApp(); } /** @@ -895,21 +331,6 @@ function killme() exit(); } -/** - * @brief Redirect to another URL and terminate this process. - */ -function goaway($path) -{ - if (strstr(normalise_link($path), 'http://')) { - $url = $path; - } else { - $url = System::baseUrl() . '/' . ltrim($path, '/'); - } - - header("Location: $url"); - killme(); -} - /** * @brief Returns the user id of locally logged in user or false. * @@ -917,7 +338,7 @@ function goaway($path) */ function local_user() { - if (x($_SESSION, 'authenticated') && x($_SESSION, 'uid')) { + if (!empty($_SESSION['authenticated']) && !empty($_SESSION['uid'])) { return intval($_SESSION['uid']); } return false; @@ -932,15 +353,15 @@ function public_contact() { static $public_contact_id = false; - if (!$public_contact_id && x($_SESSION, 'authenticated')) { - if (x($_SESSION, 'my_address')) { + if (!$public_contact_id && !empty($_SESSION['authenticated'])) { + if (!empty($_SESSION['my_address'])) { // Local user $public_contact_id = intval(Contact::getIdForURL($_SESSION['my_address'], 0, true)); - } elseif (x($_SESSION, 'visitor_home')) { + } elseif (!empty($_SESSION['visitor_home'])) { // Remote user $public_contact_id = intval(Contact::getIdForURL($_SESSION['visitor_home'], 0, true)); } - } elseif (!x($_SESSION, 'authenticated')) { + } elseif (empty($_SESSION['authenticated'])) { $public_contact_id = false; } @@ -954,15 +375,14 @@ function public_contact() */ function remote_user() { - // You cannot be both local and remote. - // Unncommented by rabuzarus because remote authentication to local - // profiles wasn't possible anymore (2018-04-12). -// if (local_user()) { -// return false; -// } - if (x($_SESSION, 'authenticated') && x($_SESSION, 'visitor_id')) { + if (empty($_SESSION['authenticated'])) { + return false; + } + + if (!empty($_SESSION['visitor_id'])) { return intval($_SESSION['visitor_id']); } + return false; } @@ -975,8 +395,12 @@ function remote_user() */ function notice($s) { - $a = get_app(); - if (!x($_SESSION, 'sysmsg')) { + if (empty($_SESSION)) { + return; + } + + $a = \get_app(); + if (empty($_SESSION['sysmsg'])) { $_SESSION['sysmsg'] = []; } if ($a->interactive) { @@ -993,13 +417,13 @@ function notice($s) */ function info($s) { - $a = get_app(); + $a = \get_app(); if (local_user() && PConfig::get(local_user(), 'system', 'ignore_info')) { return; } - if (!x($_SESSION, 'sysmsg_info')) { + if (empty($_SESSION['sysmsg_info'])) { $_SESSION['sysmsg_info'] = []; } if ($a->interactive) { @@ -1007,125 +431,6 @@ function info($s) } } -/** - * @brief Wrapper around config to limit the text length of an incoming message - * - * @return int - */ -function get_max_import_size() -{ - $a = get_app(); - return (x($a->config, 'max_import_size') ? $a->config['max_import_size'] : 0); -} - - -function current_theme() -{ - $app_base_themes = ['duepuntozero', 'dispy', 'quattro']; - - $a = get_app(); - - $page_theme = null; - - // Find the theme that belongs to the user whose stuff we are looking at - - if ($a->profile_uid && ($a->profile_uid != local_user())) { - $r = q( - "select theme from user where uid = %d limit 1", - intval($a->profile_uid) - ); - if (DBM::is_result($r)) { - $page_theme = $r[0]['theme']; - } - } - - // Allow folks to over-rule user themes and always use their own on their own site. - // This works only if the user is on the same server - - if ($page_theme && local_user() && (local_user() != $a->profile_uid)) { - if (PConfig::get(local_user(), 'system', 'always_my_theme')) { - $page_theme = null; - } - } - -// $mobile_detect = new Mobile_Detect(); -// $is_mobile = $mobile_detect->isMobile() || $mobile_detect->isTablet(); - $is_mobile = $a->is_mobile || $a->is_tablet; - - $standard_system_theme = Config::get('system', 'theme', ''); - $standard_theme_name = ((isset($_SESSION) && x($_SESSION, 'theme')) ? $_SESSION['theme'] : $standard_system_theme); - - if ($is_mobile) { - if (isset($_SESSION['show-mobile']) && !$_SESSION['show-mobile']) { - $theme_name = $standard_theme_name; - } else { - $system_theme = Config::get('system', 'mobile-theme', ''); - if ($system_theme == '') { - $system_theme = $standard_system_theme; - } - $theme_name = ((isset($_SESSION) && x($_SESSION, 'mobile-theme')) ? $_SESSION['mobile-theme'] : $system_theme); - - if ($theme_name === '---') { - // user has selected to have the mobile theme be the same as the normal one - $theme_name = $standard_theme_name; - - if ($page_theme) { - $theme_name = $page_theme; - } - } - } - } else { - $theme_name = $standard_theme_name; - - if ($page_theme) { - $theme_name = $page_theme; - } - } - - if ($theme_name - && (file_exists('view/theme/' . $theme_name . '/style.css') - || file_exists('view/theme/' . $theme_name . '/style.php')) - ) { - return($theme_name); - } - - foreach ($app_base_themes as $t) { - if (file_exists('view/theme/' . $t . '/style.css') - || file_exists('view/theme/' . $t . '/style.php') - ) { - return($t); - } - } - - $fallback = array_merge(glob('view/theme/*/style.css'), glob('view/theme/*/style.php')); - if (count($fallback)) { - return (str_replace('view/theme/', '', substr($fallback[0], 0, -10))); - } - - /// @TODO No final return statement? -} - -/** - * @brief Return full URL to theme which is currently in effect. - * - * Provide a sane default if nothing is chosen or the specified theme does not exist. - * - * @return string - */ -function current_theme_url() -{ - $a = get_app(); - - $t = current_theme(); - - $opts = (($a->profile_uid) ? '?f=&puid=' . $a->profile_uid : ''); - if (file_exists('view/theme/' . $t . '/style.php')) { - return('view/theme/' . $t . '/style.pcss' . $opts); - } - - return('view/theme/' . $t . '/style.css'); -} - function feed_birthday($uid, $tz) { /** @@ -1150,13 +455,9 @@ function feed_birthday($uid, $tz) $tz = 'UTC'; } - $p = q( - "SELECT `dob` FROM `profile` WHERE `is-default` = 1 AND `uid` = %d LIMIT 1", - intval($uid) - ); - - if (DBM::is_result($p)) { - $tmp_dob = substr($p[0]['dob'], 5); + $profile = DBA::selectFirst('profile', ['dob'], ['is-default' => true, 'uid' => $uid]); + if (DBA::isResult($profile)) { + $tmp_dob = substr($profile['dob'], 5); if (intval($tmp_dob)) { $y = DateTimeFormat::timezoneNow($tz, 'Y'); $bd = $y . '-' . $tmp_dob . ' 00:00'; @@ -1179,48 +480,13 @@ function feed_birthday($uid, $tz) */ function is_site_admin() { - $a = get_app(); + $a = \get_app(); - $adminlist = explode(",", str_replace(" ", "", $a->config['admin_email'])); + $admin_email = Config::get('config', 'admin_email'); - //if(local_user() && x($a->user,'email') && x($a->config,'admin_email') && ($a->user['email'] === $a->config['admin_email'])) - if (local_user() && x($a->user, 'email') && x($a->config, 'admin_email') && in_array($a->user['email'], $adminlist)) { - return true; - } - return false; -} + $adminlist = explode(',', str_replace(' ', '', $admin_email)); -/** - * @brief Returns querystring as string from a mapped array. - * - * @param array $params mapped array with query parameters - * @param string $name of parameter, default null - * - * @return string - */ -function build_querystring($params, $name = null) -{ - $ret = ""; - foreach ($params as $key => $val) { - if (is_array($val)) { - /// @TODO maybe not compare against null, use is_null() - if ($name == null) { - $ret .= build_querystring($val, $key); - } else { - $ret .= build_querystring($val, $name . "[$key]"); - } - } else { - $val = urlencode($val); - /// @TODO maybe not compare against null, use is_null() - if ($name != null) { - /// @TODO two string concated, can be merged to one - $ret .= $name . "[$key]" . "=$val&"; - } else { - $ret .= "$key=$val&"; - } - } - } - return $ret; + return local_user() && $admin_email && in_array($a->user['email'] ?? '', $adminlist); } function explode_querystring($query) @@ -1263,7 +529,7 @@ function explode_querystring($query) function curPageURL() { $pageURL = 'http'; - if ($_SERVER["HTTPS"] == "on") { + if (!empty($_SERVER["HTTPS"]) && ($_SERVER["HTTPS"] == "on")) { $pageURL .= "s"; } @@ -1277,54 +543,44 @@ function curPageURL() return $pageURL; } -function random_digits($digits) -{ - $rn = ''; - for ($i = 0; $i < $digits; $i++) { - /// @TODO rand() is different to mt_rand() and maybe lesser "random" - $rn .= rand(0, 9); - } - return $rn; -} - function get_server() { $server = Config::get("system", "directory"); if ($server == "") { - $server = "http://dir.friendica.social"; + $server = "https://dir.friendica.social"; } - return($server); + return $server; } function get_temppath() { - $a = get_app(); + $a = \get_app(); $temppath = Config::get("system", "temppath"); - if (($temppath != "") && App::directory_usable($temppath)) { + if (($temppath != "") && System::isDirectoryUsable($temppath)) { // We have a temp path and it is usable - return App::realpath($temppath); + return BasePath::getRealPath($temppath); } // We don't have a working preconfigured temp path, so we take the system path. $temppath = sys_get_temp_dir(); // Check if it is usable - if (($temppath != "") && App::directory_usable($temppath)) { + if (($temppath != "") && System::isDirectoryUsable($temppath)) { // Always store the real path, not the path through symlinks - $temppath = App::realpath($temppath); + $temppath = BasePath::getRealPath($temppath); // To avoid any interferences with other systems we create our own directory - $new_temppath = $temppath . "/" . $a->get_hostname(); + $new_temppath = $temppath . "/" . $a->getHostName(); if (!is_dir($new_temppath)) { /// @TODO There is a mkdir()+chmod() upwards, maybe generalize this (+ configurable) into a function/method? mkdir($new_temppath); } - if (App::directory_usable($new_temppath)) { + if (System::isDirectoryUsable($new_temppath)) { // The new path is usable, we are happy Config::set("system", "temppath", $new_temppath); return $new_temppath; @@ -1344,7 +600,7 @@ function get_cachefile($file, $writemode = true) $cache = get_itemcachepath(); if ((!$cache) || (!is_dir($cache))) { - return(""); + return ""; } $subfolder = $cache . "/" . substr($file, 0, 2); @@ -1358,7 +614,6 @@ function get_cachefile($file, $writemode = true) } } - /// @TODO no need to put braces here return $cachepath; } @@ -1407,8 +662,8 @@ function get_itemcachepath() } $itemcache = Config::get('system', 'itemcache'); - if (($itemcache != "") && App::directory_usable($itemcache)) { - return App::realpath($itemcache); + if (($itemcache != "") && System::isDirectoryUsable($itemcache)) { + return BasePath::getRealPath($itemcache); } $temppath = get_temppath(); @@ -1419,7 +674,7 @@ function get_itemcachepath() mkdir($itemcache); } - if (App::directory_usable($itemcache)) { + if (System::isDirectoryUsable($itemcache)) { Config::set("system", "itemcache", $itemcache); return $itemcache; } @@ -1435,7 +690,7 @@ function get_itemcachepath() function get_spoolpath() { $spoolpath = Config::get('system', 'spoolpath'); - if (($spoolpath != "") && App::directory_usable($spoolpath)) { + if (($spoolpath != "") && System::isDirectoryUsable($spoolpath)) { // We have a spool path and it is usable return $spoolpath; } @@ -1450,7 +705,7 @@ function get_spoolpath() mkdir($spoolpath); } - if (App::directory_usable($spoolpath)) { + if (System::isDirectoryUsable($spoolpath)) { // The new path is usable, we are happy Config::set("system", "spoolpath", $spoolpath); return $spoolpath; @@ -1465,7 +720,6 @@ function get_spoolpath() return ""; } - if (!function_exists('exif_imagetype')) { function exif_imagetype($file) { @@ -1503,87 +757,24 @@ function validate_include(&$file) } // Simply return flag - return ($valid); -} - -function current_load() -{ - if (!function_exists('sys_getloadavg')) { - return false; - } - - $load_arr = sys_getloadavg(); - - if (!is_array($load_arr)) { - return false; - } - - return max($load_arr[0], $load_arr[1]); + return $valid; } /** - * @brief get c-style args + * PHP 5 compatible dirname() with count parameter * - * @return int + * @see http://php.net/manual/en/function.dirname.php#113193 + * + * @deprecated with PHP 7 + * @param string $path + * @param int $levels + * @return string */ -function argc() +function rdirname($path, $levels = 1) { - return get_app()->argc; -} - -/** - * @brief Returns the value of a argv key - * - * @param int $x argv key - * @return string Value of the argv key - */ -function argv($x) -{ - if (array_key_exists($x, get_app()->argv)) { - return get_app()->argv[$x]; - } - - return ''; -} - -/** - * @brief Get the data which is needed for infinite scroll - * - * For invinite scroll we need the page number of the actual page - * and the the URI where the content of the next page comes from. - * This data is needed for the js part in main.js. - * Note: infinite scroll does only work for the network page (module) - * - * @param string $module The name of the module (e.g. "network") - * @return array Of infinite scroll data - * 'pageno' => $pageno The number of the actual page - * 'reload_uri' => $reload_uri The URI of the content we have to load - */ -function infinite_scroll_data($module) -{ - if (PConfig::get(local_user(), 'system', 'infinite_scroll') - && $module == 'network' - && defaults($_GET, 'mode', '') != 'minimal' - ) { - // get the page number - $pageno = defaults($_GET, 'page', 1); - - $reload_uri = ""; - - // try to get the uri from which we load the content - foreach ($_GET as $param => $value) { - if (($param != "page") && ($param != "q")) { - $reload_uri .= "&" . $param . "=" . urlencode($value); - } - } - - $a = get_app(); - if ($a->page_offset != "" && !strstr($reload_uri, "&offset=")) { - $reload_uri .= "&offset=" . urlencode($a->page_offset); - } - - $arr = ["pageno" => $pageno, "reload_uri" => $reload_uri]; - - return $arr; + if ($levels > 1) { + return dirname(rdirname($path, --$levels)); + } else { + return dirname($path); } } diff --git a/composer.json b/composer.json index b7cd645bdb..9ed9017d85 100644 --- a/composer.json +++ b/composer.json @@ -13,45 +13,79 @@ "issues": "https://github.com/friendica/friendica/issues" }, "require": { - "php": ">5.6", + "php": ">=7.0", + "ext-ctype": "*", + "ext-curl": "*", + "ext-dom": "*", + "ext-fileinfo": "*", + "ext-gd": "*", + "ext-iconv": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-openssl": "*", + "ext-simplexml": "*", "ext-xml": "*", "asika/simple-console": "^1.0", + "bacon/bacon-qr-code": "^1.0", "divineomega/password_exposed": "^2.4", "ezyang/htmlpurifier": "~4.7.0", - "league/html-to-markdown": "~4.4.1", + "friendica/json-ld": "^1.0", + "league/html-to-markdown": "~4.8.0", + "level-2/dice": ">1.0", "lightopenid/lightopenid": "dev-master", "michelf/php-markdown": "^1.7", "mobiledetect/mobiledetectlib": "2.8.*", - "paragonie/random_compat": "^2.0", - "pear/Text_LanguageDetect": "1.*", - "pear/Text_Highlighter": "dev-master", + "monolog/monolog": "^1.24", + "nikic/fast-route": "^1.3", + "paragonie/hidden-string": "^1.0", + "pear/console_table": "^1.3", + "pear/text_languagedetect": "1.*", + "pragmarx/google2fa": "^5.0", + "pragmarx/recovery": "^0.1.0", + "psr/container": "^1.0", "seld/cli-prompt": "^1.0", "smarty/smarty": "^3.1", "fxp/composer-asset-plugin": "~1.3", "bower-asset/base64": "^1.0", - "bower-asset/Chart-js": "^2.7", + "bower-asset/chart-js": "^2.7", + "bower-asset/dompurify": "^1.0", "bower-asset/perfect-scrollbar": "^0.6", "bower-asset/vue": "^2.5", "npm-asset/jquery": "^2.0", "npm-asset/jquery-colorbox": "^1.6", "npm-asset/jquery-datetimepicker": "^2.4.0", "npm-asset/jgrowl": "^1.4", + "npm-asset/moment": "^2.20.1", "npm-asset/fullcalendar": "^3.0.1", - "npm-asset/cropperjs": "1.2.2" + "npm-asset/cropperjs": "1.2.2", + "npm-asset/imagesloaded": "4.1.4", + "npm-asset/typeahead.js": "^0.11.1", + "bower-asset/fork-awesome": "^1.1" }, "repositories": [ { "type": "vcs", - "url": "https://github.com/pear/Text_Highlighter" + "url": "https://git.friendi.ca/friendica/php-json-ld" } ], "autoload": { "psr-4": { - "Friendica\\": "src/" + "Friendica\\": "src/", + "Friendica\\Test\\": "tests/", + "Friendica\\Addon\\": "addon/" }, "psr-0": { "": "library/" - } + }, + "files": [ + "include/conversation.php", + "include/dba.php", + "include/enotify.php", + "include/items.php", + "include/text.php", + "boot.php" + ] }, "config": { "autoloader-suffix": "Friendica", @@ -66,7 +100,29 @@ }, "archive": { "exclude": [ - "log", "cache", "/photo", "/proxy" + "/.*", + "/*file", + "!/.htaccess-dist", + "/tests", + "/*.xml", + "/composer.*", + "/log", + "/cache", + "/photo", + "/proxy", + "/addon", + "!/vendor", + "!/view/asset" ] + }, + "require-dev": { + "phpdocumentor/reflection-docblock": "^3.0.2", + "phpunit/php-token-stream": "^1.4.2", + "mikey179/vfsstream": "^1.6", + "mockery/mockery": "^1.2", + "johnkary/phpunit-speedtrap": "1.1" + }, + "scripts": { + "test": "phpunit" } } diff --git a/composer.lock b/composer.lock index f294c16ef5..3aad3a1544 100644 --- a/composer.lock +++ b/composer.lock @@ -1,10 +1,10 @@ { "_readme": [ "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "f97245142e60a521f048a667bec4e436", + "content-hash": "eda94f02683bea49b3d506d770749277", "packages": [ { "name": "asika/simple-console", @@ -40,17 +40,63 @@ "time": "2018-03-08T12:05:40+00:00" }, { - "name": "bower-asset/Chart-js", - "version": "v2.7.1", + "name": "bacon/bacon-qr-code", + "version": "1.0.3", "source": { "type": "git", - "url": "https://github.com/chartjs/Chart.js.git", - "reference": "0fead21939b92c15093c1b7d5ee2627fb5900fff" + "url": "https://github.com/Bacon/BaconQrCode.git", + "reference": "5a91b62b9d37cee635bbf8d553f4546057250bee" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/chartjs/Chart.js/zipball/0fead21939b92c15093c1b7d5ee2627fb5900fff", - "reference": "0fead21939b92c15093c1b7d5ee2627fb5900fff", + "url": "https://api.github.com/repos/Bacon/BaconQrCode/zipball/5a91b62b9d37cee635bbf8d553f4546057250bee", + "reference": "5a91b62b9d37cee635bbf8d553f4546057250bee", + "shasum": "" + }, + "require": { + "ext-iconv": "*", + "php": "^5.4|^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8" + }, + "suggest": { + "ext-gd": "to generate QR code images" + }, + "type": "library", + "autoload": { + "psr-0": { + "BaconQrCode": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "authors": [ + { + "name": "Ben Scholzen 'DASPRiD'", + "email": "mail@dasprids.de", + "homepage": "http://www.dasprids.de", + "role": "Developer" + } + ], + "description": "BaconQrCode is a QR code generator for PHP.", + "homepage": "https://github.com/Bacon/BaconQrCode", + "time": "2017-10-17T09:59:25+00:00" + }, + { + "name": "bower-asset/Chart-js", + "version": "v2.8.0", + "source": { + "type": "git", + "url": "https://github.com/chartjs/Chart.js.git", + "reference": "947d8a7ccfbfc76dd9d384ea75436fa4a7aeefb1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/chartjs/Chart.js/zipball/947d8a7ccfbfc76dd9d384ea75436fa4a7aeefb1", + "reference": "947d8a7ccfbfc76dd9d384ea75436fa4a7aeefb1", "shasum": "" }, "type": "bower-asset-library", @@ -69,20 +115,20 @@ "MIT" ], "description": "Simple HTML5 charts using the canvas element.", - "time": "2017-10-28T15:01:52+00:00" + "time": "2019-03-14T13:03:00+00:00" }, { "name": "bower-asset/base64", - "version": "1.0.1", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/davidchambers/Base64.js.git", - "reference": "b2d49f347ed1bce61000a82769bffc837b7c79dc" + "reference": "10f0e9990dab0a73009fc106ff2b88102a0a13cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/davidchambers/Base64.js/zipball/b2d49f347ed1bce61000a82769bffc837b7c79dc", - "reference": "b2d49f347ed1bce61000a82769bffc837b7c79dc", + "url": "https://api.github.com/repos/davidchambers/Base64.js/zipball/10f0e9990dab0a73009fc106ff2b88102a0a13cf", + "reference": "10f0e9990dab0a73009fc106ff2b88102a0a13cf", "shasum": "" }, "type": "bower-asset-library", @@ -100,7 +146,96 @@ "WTFPL" ], "description": "Base64 encoding and decoding", - "time": "2017-03-25T21:16:21+00:00" + "time": "2019-02-12T17:19:36+00:00" + }, + { + "name": "bower-asset/dompurify", + "version": "1.0.11", + "source": { + "type": "git", + "url": "https://github.com/cure53/DOMPurify.git", + "reference": "3c1c0d7e11cda896b0c69cf82e0ca6e0c0e7dd38" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/cure53/DOMPurify/zipball/3c1c0d7e11cda896b0c69cf82e0ca6e0c0e7dd38", + "reference": "3c1c0d7e11cda896b0c69cf82e0ca6e0c0e7dd38", + "shasum": "" + }, + "type": "bower-asset-library", + "extra": { + "bower-asset-main": "src/purify.js", + "bower-asset-ignore": [ + "**/.*", + "demos", + "scripts", + "test", + "website" + ] + }, + "license": [ + "MPL-2.0", + "Apache-2.0" + ], + "description": "A DOM-only, super-fast, uber-tolerant XSS sanitizer for HTML, MathML and SVG", + "keywords": [ + "cross site scripting", + "dom", + "filter", + "html", + "mathml", + "sanitize", + "sanitizer", + "secure", + "security", + "svg", + "xss" + ], + "time": "2019-06-18T13:33:05+00:00" + }, + { + "name": "bower-asset/fork-awesome", + "version": "1.1.7", + "source": { + "type": "git", + "url": "https://github.com/ForkAwesome/Fork-Awesome.git", + "reference": "326af9c8bee0c80ff4c00cb2fadd4f1edd2a08c3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ForkAwesome/Fork-Awesome/zipball/326af9c8bee0c80ff4c00cb2fadd4f1edd2a08c3", + "reference": "326af9c8bee0c80ff4c00cb2fadd4f1edd2a08c3", + "shasum": "" + }, + "type": "bower-asset-library", + "extra": { + "bower-asset-main": [ + "less/fork-awesome.less", + "scss/fork-awesome.scss" + ], + "bower-asset-ignore": [ + "*/.*", + "*.json", + "src", + "*.yml", + "Gemfile", + "Gemfile.lock", + "*.md" + ] + }, + "license": [ + "OFL-1.1", + "MIT", + "CC-BY-3.0" + ], + "description": "Fork Awesome", + "keywords": [ + "awesome", + "font", + "fork", + "icon" + ], + "time": "2019-02-28T15:21:34+00:00" }, { "name": "bower-asset/perfect-scrollbar", @@ -135,44 +270,135 @@ }, { "name": "bower-asset/vue", - "version": "v2.5.16", + "version": "v2.6.10", "source": { "type": "git", "url": "https://github.com/vuejs/vue.git", - "reference": "25342194016dc3bcc81cb3e8e229b0fb7ba1d1d6" + "reference": "e90cc60c4718a69e2c919275a999b7370141f3bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vuejs/vue/zipball/25342194016dc3bcc81cb3e8e229b0fb7ba1d1d6", - "reference": "25342194016dc3bcc81cb3e8e229b0fb7ba1d1d6", + "url": "https://api.github.com/repos/vuejs/vue/zipball/e90cc60c4718a69e2c919275a999b7370141f3bf", + "reference": "e90cc60c4718a69e2c919275a999b7370141f3bf", "shasum": "" }, "type": "bower-asset-library" }, { - "name": "divineomega/password_exposed", - "version": "v2.5.1", + "name": "divineomega/do-file-cache", + "version": "v2.0.6", "source": { "type": "git", - "url": "https://github.com/DivineOmega/password_exposed.git", - "reference": "c928bf722eb02398df11076add60df070cb55581" + "url": "https://github.com/DivineOmega/DO-File-Cache.git", + "reference": "23696a8a4c3ebe2ab3d68a35b2698fa103f69334" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/DivineOmega/password_exposed/zipball/c928bf722eb02398df11076add60df070cb55581", - "reference": "c928bf722eb02398df11076add60df070cb55581", + "url": "https://api.github.com/repos/DivineOmega/DO-File-Cache/zipball/23696a8a4c3ebe2ab3d68a35b2698fa103f69334", + "reference": "23696a8a4c3ebe2ab3d68a35b2698fa103f69334", "shasum": "" }, "require": { + "ext-json": "*", + "ext-zlib": "*", + "php": ">=5.6" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^6.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "DivineOmega\\DOFileCache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0-only" + ], + "description": "DO File Cache is a PHP File-based Caching Library. Its syntax is designed to closely resemble the PHP memcache extension.", + "keywords": [ + "cache", + "caching", + "caching library", + "file cache", + "library", + "php" + ], + "time": "2018-12-31T09:36:51+00:00" + }, + { + "name": "divineomega/do-file-cache-psr-6", + "version": "v2.0.1", + "source": { + "type": "git", + "url": "https://github.com/DivineOmega/DO-File-Cache-PSR-6.git", + "reference": "18f9807d0491d093e9a12741afb40257d92f017e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/DivineOmega/DO-File-Cache-PSR-6/zipball/18f9807d0491d093e9a12741afb40257d92f017e", + "reference": "18f9807d0491d093e9a12741afb40257d92f017e", + "shasum": "" + }, + "require": { + "divineomega/do-file-cache": "^2.0.0", + "psr/cache": "^1.0" + }, + "require-dev": { + "cache/integration-tests": "^0.16.0", + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5.7" + }, + "type": "library", + "autoload": { + "psr-4": { + "DivineOmega\\DOFileCachePSR6\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0-only" + ], + "authors": [ + { + "name": "Jordan Hall", + "email": "jordan@hall05.co.uk" + } + ], + "description": "PSR-6 adapter for DO File Cache", + "time": "2018-07-13T08:32:36+00:00" + }, + { + "name": "divineomega/password_exposed", + "version": "v2.8.0", + "source": { + "type": "git", + "url": "https://github.com/DivineOmega/password_exposed.git", + "reference": "908ed8e62ef95411bd0f866e29c69cef2bbca880" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/DivineOmega/password_exposed/zipball/908ed8e62ef95411bd0f866e29c69cef2bbca880", + "reference": "908ed8e62ef95411bd0f866e29c69cef2bbca880", + "shasum": "" + }, + "require": { + "divineomega/do-file-cache-psr-6": "^2.0", "guzzlehttp/guzzle": "^6.3", - "paragonie/certainty": "^1", - "php": ">=5.6", - "rapidwebltd/rw-file-cache-psr-6": "^1.0" + "paragonie/certainty": "^1|^2", + "php": ">=5.6" }, "require-dev": { "fzaninotto/faker": "^1.7", - "phpunit/phpunit": "^5.7", - "satooshi/php-coveralls": "^2.0", + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^6.5", "vimeo/psalm": "^1" }, "type": "library", @@ -195,7 +421,7 @@ } ], "description": "This PHP package provides a `password_exposed` helper function, that uses the haveibeenpwned.com API to check if a password has been exposed in a data breach.", - "time": "2018-04-02T18:16:36+00:00" + "time": "2019-01-25T12:00:28+00:00" }, { "name": "ezyang/htmlpurifier", @@ -241,18 +467,62 @@ ], "time": "2015-08-05T01:03:42+00:00" }, + { + "name": "friendica/json-ld", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://git.friendi.ca/friendica/php-json-ld", + "reference": "ca3916d10d2ad9073b3b1eae383978dbe828e1e1" + }, + "require": { + "ext-json": "*", + "php": ">=5.4.0" + }, + "type": "library", + "autoload": { + "files": [ + "jsonld.php" + ] + }, + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Digital Bazaar, Inc.", + "email": "support@digitalbazaar.com", + "homepage": "http://digitalbazaar.com/" + }, + { + "name": "Friendica Team", + "homepage": "https://friendi.ca/" + } + ], + "description": "A JSON-LD Processor and API implementation in PHP.", + "homepage": "https://git.friendi.ca/friendica/php-json-ld", + "keywords": [ + "JSON", + "JSON-LD", + "Linked Data", + "RDF", + "Semantic Web", + "jsonld" + ], + "time": "2018-10-08T20:41:00+00:00" + }, { "name": "fxp/composer-asset-plugin", - "version": "v1.4.2", + "version": "v1.4.6", "source": { "type": "git", "url": "https://github.com/fxpio/composer-asset-plugin.git", - "reference": "61352d99940d2b2392a5d2db83b8c0ef5faf222a" + "reference": "886ece037849d3935c5a34cdcd984e46f2de5fae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fxpio/composer-asset-plugin/zipball/61352d99940d2b2392a5d2db83b8c0ef5faf222a", - "reference": "61352d99940d2b2392a5d2db83b8c0ef5faf222a", + "url": "https://api.github.com/repos/fxpio/composer-asset-plugin/zipball/886ece037849d3935c5a34cdcd984e46f2de5fae", + "reference": "886ece037849d3935c5a34cdcd984e46f2de5fae", "shasum": "" }, "require": { @@ -260,7 +530,7 @@ "php": ">=5.3.3" }, "require-dev": { - "composer/composer": "^1.4.0" + "composer/composer": "^1.6.0" }, "type": "composer-plugin", "extra": { @@ -298,20 +568,20 @@ "npm", "package" ], - "time": "2017-10-20T06:53:56+00:00" + "time": "2019-08-08T18:36:07+00:00" }, { "name": "guzzlehttp/guzzle", - "version": "6.3.0", + "version": "6.3.3", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "f4db5a78a5ea468d4831de7f0bf9d9415e348699" + "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/f4db5a78a5ea468d4831de7f0bf9d9415e348699", - "reference": "f4db5a78a5ea468d4831de7f0bf9d9415e348699", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba", + "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba", "shasum": "" }, "require": { @@ -321,7 +591,7 @@ }, "require-dev": { "ext-curl": "*", - "phpunit/phpunit": "^4.0 || ^5.0", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", "psr/log": "^1.0" }, "suggest": { @@ -330,7 +600,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "6.2-dev" + "dev-master": "6.3-dev" } }, "autoload": { @@ -363,7 +633,7 @@ "rest", "web service" ], - "time": "2017-06-22T18:50:49+00:00" + "time": "2018-04-22T15:46:56+00:00" }, { "name": "guzzlehttp/promises", @@ -418,32 +688,37 @@ }, { "name": "guzzlehttp/psr7", - "version": "1.4.2", + "version": "1.6.1", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c" + "reference": "239400de7a173fe9901b9ac7c06497751f00727a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/f5b8a8512e2b58b0071a7280e39f14f72e05d87c", - "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a", + "reference": "239400de7a173fe9901b9ac7c06497751f00727a", "shasum": "" }, "require": { "php": ">=5.4.0", - "psr/http-message": "~1.0" + "psr/http-message": "~1.0", + "ralouphie/getallheaders": "^2.0.5 || ^3.0.0" }, "provide": { "psr/http-message-implementation": "1.0" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "ext-zlib": "*", + "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8" + }, + "suggest": { + "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "1.6-dev" } }, "autoload": { @@ -473,26 +748,27 @@ "keywords": [ "http", "message", + "psr-7", "request", "response", "stream", "uri", "url" ], - "time": "2017-03-20T17:10:46+00:00" + "time": "2019-07-01T23:21:34+00:00" }, { "name": "league/html-to-markdown", - "version": "4.4.1", + "version": "4.8.2", "source": { "type": "git", "url": "https://github.com/thephpleague/html-to-markdown.git", - "reference": "82ea375b5b2b1da1da222644c0565c695bf88186" + "reference": "e747489191f8e9144a7270eb61f8b9516e99e413" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/html-to-markdown/zipball/82ea375b5b2b1da1da222644c0565c695bf88186", - "reference": "82ea375b5b2b1da1da222644c0565c695bf88186", + "url": "https://api.github.com/repos/thephpleague/html-to-markdown/zipball/e747489191f8e9144a7270eb61f8b9516e99e413", + "reference": "e747489191f8e9144a7270eb61f8b9516e99e413", "shasum": "" }, "require": { @@ -511,7 +787,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.5-dev" + "dev-master": "4.9-dev" } }, "autoload": { @@ -527,7 +803,7 @@ { "name": "Colin O'Dell", "email": "colinodell@gmail.com", - "homepage": "http://www.colinodell.com", + "homepage": "https://www.colinodell.com", "role": "Lead Developer" }, { @@ -543,7 +819,53 @@ "html", "markdown" ], - "time": "2017-03-16T00:45:59+00:00" + "time": "2019-08-02T11:57:39+00:00" + }, + { + "name": "level-2/dice", + "version": "4.0.1", + "source": { + "type": "git", + "url": "https://github.com/Level-2/Dice.git", + "reference": "e631f110f0520294fec902814c61cac26566023c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Level-2/Dice/zipball/e631f110f0520294fec902814c61cac26566023c", + "reference": "e631f110f0520294fec902814c61cac26566023c", + "shasum": "" + }, + "require": { + "php": ">=7.0.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Dice\\": "./" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "authors": [ + { + "name": "Tom Butler", + "email": "tom@r.je" + } + ], + "description": "A minimalist Dependency injection container (DIC) for PHP. Please note: 3.0+ is only compatible with PHP 7.0. The 2.0 branch is compatbile with PHP 5.6.", + "homepage": "http://r.je/dice.html", + "keywords": [ + "dependency injection", + "dependency injection container", + "di", + "ioc" + ], + "time": "2019-05-01T12:55:36+00:00" }, { "name": "lightopenid/lightopenid", @@ -626,16 +948,16 @@ }, { "name": "mobiledetect/mobiledetectlib", - "version": "2.8.30", + "version": "2.8.34", "source": { "type": "git", "url": "https://github.com/serbanghita/Mobile-Detect.git", - "reference": "5500bbbf312fe77ef0c7223858dad84fe49ee0c3" + "reference": "6f8113f57a508494ca36acbcfa2dc2d923c7ed5b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/serbanghita/Mobile-Detect/zipball/5500bbbf312fe77ef0c7223858dad84fe49ee0c3", - "reference": "5500bbbf312fe77ef0c7223858dad84fe49ee0c3", + "url": "https://api.github.com/repos/serbanghita/Mobile-Detect/zipball/6f8113f57a508494ca36acbcfa2dc2d923c7ed5b", + "reference": "6f8113f57a508494ca36acbcfa2dc2d923c7ed5b", "shasum": "" }, "require": { @@ -674,7 +996,131 @@ "mobile detector", "php mobile detect" ], - "time": "2017-12-18T10:38:51+00:00" + "time": "2019-09-18T18:44:20+00:00" + }, + { + "name": "monolog/monolog", + "version": "1.25.1", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/monolog.git", + "reference": "70e65a5470a42cfec1a7da00d30edb6e617e8dcf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/70e65a5470a42cfec1a7da00d30edb6e617e8dcf", + "reference": "70e65a5470a42cfec1a7da00d30edb6e617e8dcf", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "psr/log": "~1.0" + }, + "provide": { + "psr/log-implementation": "1.0.0" + }, + "require-dev": { + "aws/aws-sdk-php": "^2.4.9 || ^3.0", + "doctrine/couchdb": "~1.0@dev", + "graylog2/gelf-php": "~1.0", + "jakub-onderka/php-parallel-lint": "0.9", + "php-amqplib/php-amqplib": "~2.4", + "php-console/php-console": "^3.1.3", + "phpunit/phpunit": "~4.5", + "phpunit/phpunit-mock-objects": "2.3.0", + "ruflin/elastica": ">=0.90 <3.0", + "sentry/sentry": "^0.13", + "swiftmailer/swiftmailer": "^5.3|^6.0" + }, + "suggest": { + "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", + "doctrine/couchdb": "Allow sending log messages to a CouchDB server", + "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", + "ext-mongo": "Allow sending log messages to a MongoDB server", + "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", + "mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver", + "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", + "php-console/php-console": "Allow sending log messages to Google Chrome", + "rollbar/rollbar": "Allow sending log messages to Rollbar", + "ruflin/elastica": "Allow sending log messages to an Elastic Search server", + "sentry/sentry": "Allow sending log messages to a Sentry server" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Monolog\\": "src/Monolog" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Sends your logs to files, sockets, inboxes, databases and various web services", + "homepage": "http://github.com/Seldaek/monolog", + "keywords": [ + "log", + "logging", + "psr-3" + ], + "time": "2019-09-06T13:49:17+00:00" + }, + { + "name": "nikic/fast-route", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/nikic/FastRoute.git", + "reference": "181d480e08d9476e61381e04a71b34dc0432e812" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/FastRoute/zipball/181d480e08d9476e61381e04a71b34dc0432e812", + "reference": "181d480e08d9476e61381e04a71b34dc0432e812", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35|~5.7" + }, + "type": "library", + "autoload": { + "psr-4": { + "FastRoute\\": "src/" + }, + "files": [ + "src/functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov", + "email": "nikic@php.net" + } + ], + "description": "Fast request router for PHP", + "keywords": [ + "router", + "routing" + ], + "time": "2018-02-13T20:26:39+00:00" }, { "name": "npm-asset/cropperjs", @@ -682,7 +1128,6 @@ "dist": { "type": "tar", "url": "https://registry.npmjs.org/cropperjs/-/cropperjs-1.2.2.tgz", - "reference": null, "shasum": "30dc7a7ce872155b23a33bd10ad4c76c0d613f55" }, "require-dev": { @@ -771,84 +1216,60 @@ "time": "2018-01-03T13:39:39+00:00" }, { - "name": "npm-asset/fullcalendar", - "version": "3.8.2", + "name": "npm-asset/ev-emitter", + "version": "1.1.1", "dist": { "type": "tar", - "url": "https://registry.npmjs.org/fullcalendar/-/fullcalendar-3.8.2.tgz", - "reference": null, - "shasum": "ef7dc77b89134bbe6163e51136f7a1f8bfc1d807" + "url": "https://registry.npmjs.org/ev-emitter/-/ev-emitter-1.1.1.tgz", + "shasum": "8f18b0ce5c76a5d18017f71c0a795c65b9138f2a" }, - "require": { - "npm-asset/jquery": ">=2,<4.0", - "npm-asset/moment": ">=2.9.0,<3.0.0" + "type": "npm-asset-library", + "extra": { + "npm-asset-bugs": { + "url": "https://github.com/metafizzy/ev-emitter/issues" + }, + "npm-asset-main": "ev-emitter.js", + "npm-asset-directories": { + "test": "test" + }, + "npm-asset-repository": { + "type": "git", + "url": "git+https://github.com/metafizzy/ev-emitter.git" + }, + "npm-asset-scripts": { + "test": "mocha test/test" + } }, - "require-dev": { - "npm-asset/awesome-typescript-loader": ">=3.3.0,<4.0.0", - "npm-asset/bootstrap": ">=3.3.7,<4.0.0", - "npm-asset/components-jqueryui": "dev-github:components/jqueryui", - "npm-asset/css-loader": ">=0.28.7,<0.29.0", - "npm-asset/del": ">=2.2.1,<3.0.0", - "npm-asset/dts-generator": ">=2.1.0,<3.0.0", - "npm-asset/eslint": ">=4.13.1,<5.0.0", - "npm-asset/eslint-config-standard": ">=11.0.0-beta.0,<12.0.0", - "npm-asset/eslint-plugin-import": ">=2.8.0,<3.0.0", - "npm-asset/eslint-plugin-node": ">=5.2.1,<6.0.0", - "npm-asset/eslint-plugin-promise": ">=3.6.0,<4.0.0", - "npm-asset/eslint-plugin-standard": ">=3.0.1,<4.0.0", - "npm-asset/extract-text-webpack-plugin": ">=3.0.2,<4.0.0", - "npm-asset/glob": ">=7.1.2,<8.0.0", - "npm-asset/gulp": ">=3.9.1,<4.0.0", - "npm-asset/gulp-cssmin": ">=0.1.7,<0.2.0", - "npm-asset/gulp-eslint": ">=4.0.0,<5.0.0", - "npm-asset/gulp-filter": ">=4.0.0,<5.0.0", - "npm-asset/gulp-modify-file": ">=1.0.0,<2.0.0", - "npm-asset/gulp-rename": ">=1.2.2,<2.0.0", - "npm-asset/gulp-shell": ">=0.6.5,<0.7.0", - "npm-asset/gulp-tslint": ">=8.1.2,<9.0.0", - "npm-asset/gulp-uglify": ">=2.0.0,<3.0.0", - "npm-asset/gulp-util": ">=3.0.7,<4.0.0", - "npm-asset/gulp-watch": ">=4.3.11,<5.0.0", - "npm-asset/gulp-zip": ">=3.2.0,<4.0.0", - "npm-asset/jasmine-core": "2.5.2", - "npm-asset/jasmine-fixture": ">=2.0.0,<3.0.0", - "npm-asset/jasmine-jquery": ">=2.1.1,<3.0.0", - "npm-asset/jquery-mockjax": ">=2.2.0,<3.0.0", - "npm-asset/jquery-simulate": "dev-github:jquery/jquery-simulate", - "npm-asset/karma": ">=0.13.22,<0.14.0", - "npm-asset/karma-jasmine": ">=1.0.2,<2.0.0", - "npm-asset/karma-phantomjs-launcher": ">=1.0.0,<2.0.0", - "npm-asset/karma-sourcemap-loader": ">=0.3.7,<0.4.0", - "npm-asset/karma-verbose-reporter": "0.0.6", - "npm-asset/moment-timezone": ">=0.5.5,<0.6.0", - "npm-asset/native-promise-only": ">=0.8.1,<0.9.0", - "npm-asset/node-sass": ">=4.7.2,<5.0.0", - "npm-asset/phantomjs-prebuilt": ">=2.1.7,<3.0.0", - "npm-asset/sass-loader": ">=6.0.6,<7.0.0", - "npm-asset/tslib": ">=1.8.0,<2.0.0", - "npm-asset/tslint": ">=5.8.0,<6.0.0", - "npm-asset/tslint-config-standard": ">=7.0.0,<8.0.0", - "npm-asset/types--jquery": "2.0.47", - "npm-asset/typescript": ">=2.6.2,<3.0.0", - "npm-asset/webpack": ">=3.8.1,<4.0.0", - "npm-asset/webpack-stream": ">=4.0.0,<5.0.0", - "npm-asset/yargs": ">=4.8.1,<5.0.0" + "license": [ + "MIT" + ], + "authors": [ + { + "name": "David DeSandro" + } + ], + "description": "lil' event emitter", + "homepage": "https://github.com/metafizzy/ev-emitter#readme", + "keywords": [ + "emitter", + "event", + "pubsub" + ], + "time": "2017-07-06T13:46:38+00:00" + }, + { + "name": "npm-asset/fullcalendar", + "version": "3.10.1", + "dist": { + "type": "tar", + "url": "https://registry.npmjs.org/fullcalendar/-/fullcalendar-3.10.1.tgz", + "shasum": "cca3f9a2656a7e978a3f3facb7f35934a91185db" }, "type": "npm-asset-library", "extra": { "npm-asset-bugs": { "url": "https://fullcalendar.io/wiki/Reporting-Bugs/" }, - "npm-asset-files": [ - "dist/*.js", - "dist/*.css", - "dist/*.d.ts", - "dist/locale/*.js", - "README.*", - "LICENSE.*", - "CHANGELOG.*", - "CONTRIBUTING.*" - ], "npm-asset-main": "dist/fullcalendar.js", "npm-asset-directories": [], "npm-asset-repository": { @@ -858,7 +1279,7 @@ "npm-asset-scripts": { "clean": "gulp clean", "dist": "gulp dist", - "lint": "gulp lint", + "lint": "gulp lint-and-example-repos", "test": "gulp test:single" } }, @@ -880,7 +1301,70 @@ "full-sized", "jquery-plugin" ], - "time": "2018-01-30T23:49:01+00:00" + "time": "2019-08-10T16:05:46+00:00" + }, + { + "name": "npm-asset/imagesloaded", + "version": "4.1.4", + "dist": { + "type": "tar", + "url": "https://registry.npmjs.org/imagesloaded/-/imagesloaded-4.1.4.tgz", + "shasum": "1376efcd162bb768c34c3727ac89cc04051f3cc7" + }, + "require": { + "npm-asset/ev-emitter": ">=1.0.0,<2.0.0" + }, + "require-dev": { + "npm-asset/chalk": ">=1.1.1,<2.0.0", + "npm-asset/cheerio": ">=0.19.0,<0.20.0", + "npm-asset/gulp": ">=3.9.0,<4.0.0", + "npm-asset/gulp-jshint": ">=1.11.2,<2.0.0", + "npm-asset/gulp-json-lint": ">=0.1.0,<0.2.0", + "npm-asset/gulp-rename": ">=1.2.2,<2.0.0", + "npm-asset/gulp-replace": ">=0.5.4,<0.6.0", + "npm-asset/gulp-requirejs-optimize": "dev-github:metafizzy/gulp-requirejs-optimize", + "npm-asset/gulp-uglify": ">=1.4.2,<2.0.0", + "npm-asset/gulp-util": ">=3.0.7,<4.0.0", + "npm-asset/highlight.js": ">=8.9.1,<9.0.0", + "npm-asset/marked": ">=0.3.5,<0.4.0", + "npm-asset/minimist": ">=1.2.0,<2.0.0", + "npm-asset/transfob": ">=1.0.0,<2.0.0" + }, + "type": "npm-asset-library", + "extra": { + "npm-asset-bugs": { + "url": "https://github.com/desandro/imagesloaded/issues" + }, + "npm-asset-main": "imagesloaded.js", + "npm-asset-directories": { + "test": "test" + }, + "npm-asset-repository": { + "type": "git", + "url": "git://github.com/desandro/imagesloaded.git" + }, + "npm-asset-scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + } + }, + "license": [ + "MIT" + ], + "authors": [ + { + "name": "David DeSandro" + } + ], + "description": "JavaScript is all like _You images done yet or what?_", + "homepage": "https://github.com/desandro/imagesloaded", + "keywords": [ + "dom", + "images", + "jquery-plugin", + "loaded", + "ui" + ], + "time": "2018-01-02T16:56:03+00:00" }, { "name": "npm-asset/jgrowl", @@ -888,7 +1372,6 @@ "dist": { "type": "tar", "url": "https://registry.npmjs.org/jgrowl/-/jgrowl-1.4.6.tgz", - "reference": null, "shasum": "2736e332aaee73ccf0a14a5f0066391a0a13f4a3" }, "require-dev": { @@ -929,7 +1412,6 @@ "dist": { "type": "tar", "url": "https://registry.npmjs.org/jquery/-/jquery-2.2.4.tgz", - "reference": null, "shasum": "2c89d6889b5eac522a7eea32c14521559c6cbf02" }, "require-dev": { @@ -1000,7 +1482,6 @@ "dist": { "type": "tar", "url": "https://registry.npmjs.org/jquery-colorbox/-/jquery-colorbox-1.6.4.tgz", - "reference": null, "shasum": "799452523a6c494839224ef702e807deb9c06cc5" }, "require": { @@ -1043,24 +1524,17 @@ }, { "name": "npm-asset/jquery-datetimepicker", - "version": "2.5.17", + "version": "2.5.21", "dist": { "type": "tar", - "url": "https://registry.npmjs.org/jquery-datetimepicker/-/jquery-datetimepicker-2.5.17.tgz", - "reference": null, - "shasum": "8857a631f248081d4072563bde40fa8c17e407b1" + "url": "https://registry.npmjs.org/jquery-datetimepicker/-/jquery-datetimepicker-2.5.21.tgz", + "shasum": "00c388a78df2732fedfdb5c6529b6e84d53e0235" }, "require": { "npm-asset/jquery": ">=1.7.2", "npm-asset/jquery-mousewheel": ">=3.1.13", "npm-asset/php-date-formatter": ">=1.3.4,<2.0.0" }, - "require-dev": { - "npm-asset/concat": "dev-github:azer/concat", - "npm-asset/concat-cli": ">=4.0.0,<5.0.0", - "npm-asset/uglifycss": ">=0.0.27,<0.0.28", - "npm-asset/uglifyjs": ">=2.4.10,<3.0.0" - }, "type": "npm-asset-library", "extra": { "npm-asset-bugs": { @@ -1073,13 +1547,13 @@ "url": "git+https://github.com/xdan/datetimepicker.git" }, "npm-asset-scripts": { - "test": "echo \"Error: no test specified\" && exit 1", + "test": "karma start --browsers Firefox karma.conf.js --single-run", "concat": "concat-cli -f node_modules/php-date-formatter/js/php-date-formatter.min.js jquery.datetimepicker.js node_modules/jquery-mousewheel/jquery.mousewheel.js -o build/jquery.datetimepicker.full.js", "minify": "uglifyjs jquery.datetimepicker.js -c -m -o build/jquery.datetimepicker.min.js && uglifycss jquery.datetimepicker.css > build/jquery.datetimepicker.min.css", "minifyconcat": "uglifyjs build/jquery.datetimepicker.full.js -c -m -o build/jquery.datetimepicker.full.min.js", "github": "git add --all && git commit -m \"New version %npm_package_version% \" && git tag %npm_package_version% && git push --tags origin HEAD:master && npm publish", "build": "npm run minify && npm run concat && npm run minifyconcat", - "public": "npm version patch --no-git-tag-version && npm run build && npm run github" + "public": "npm run test && npm version patch --no-git-tag-version && npm run build && npm run github" } }, "license": [ @@ -1089,7 +1563,7 @@ { "name": "Chupurnov", "email": "chupurnov@gmail.com", - "url": "http://xdsoft.net/" + "url": "https://xdsoft.net/" } ], "description": "jQuery Plugin DateTimePicker it is DatePicker and TimePicker in one", @@ -1103,7 +1577,7 @@ "time", "timepicker" ], - "time": "2018-01-23T05:56:50+00:00" + "time": "2019-02-23T11:25:30+00:00" }, { "name": "npm-asset/jquery-mousewheel", @@ -1111,7 +1585,6 @@ "dist": { "type": "tar", "url": "https://registry.npmjs.org/jquery-mousewheel/-/jquery-mousewheel-3.1.13.tgz", - "reference": null, "shasum": "06f0335f16e353a695e7206bf50503cb523a6ee5" }, "require-dev": { @@ -1162,45 +1635,11 @@ }, { "name": "npm-asset/moment", - "version": "2.20.1", + "version": "2.24.0", "dist": { "type": "tar", - "url": "https://registry.npmjs.org/moment/-/moment-2.20.1.tgz", - "reference": null, - "shasum": "d6eb1a46cbcc14a2b2f9434112c1ff8907f313fd" - }, - "require-dev": { - "npm-asset/benchmark": "dev-default|*", - "npm-asset/coveralls": ">=2.11.2,<3.0.0", - "npm-asset/es6-promise": "dev-default|*", - "npm-asset/grunt": "~0.4", - "npm-asset/grunt-benchmark": "dev-default|*", - "npm-asset/grunt-cli": "dev-default|*", - "npm-asset/grunt-contrib-clean": "dev-default|*", - "npm-asset/grunt-contrib-concat": "dev-default|*", - "npm-asset/grunt-contrib-copy": "dev-default|*", - "npm-asset/grunt-contrib-jshint": "dev-default|*", - "npm-asset/grunt-contrib-uglify": "dev-default|*", - "npm-asset/grunt-contrib-watch": "dev-default|*", - "npm-asset/grunt-env": "dev-default|*", - "npm-asset/grunt-exec": "dev-default|*", - "npm-asset/grunt-jscs": "dev-default|*", - "npm-asset/grunt-karma": "dev-default|*", - "npm-asset/grunt-nuget": "dev-default|*", - "npm-asset/grunt-string-replace": "dev-default|*", - "npm-asset/karma": "dev-default|*", - "npm-asset/karma-chrome-launcher": "dev-default|*", - "npm-asset/karma-firefox-launcher": "dev-default|*", - "npm-asset/karma-qunit": "dev-default|*", - "npm-asset/karma-sauce-launcher": "dev-default|*", - "npm-asset/load-grunt-tasks": "dev-default|*", - "npm-asset/nyc": ">=2.1.4,<3.0.0", - "npm-asset/qunit": ">=0.7.5,<0.8.0", - "npm-asset/qunit-cli": ">=0.1.4,<0.2.0", - "npm-asset/rollup": "dev-default|*", - "npm-asset/spacejam": "dev-default|*", - "npm-asset/typescript": ">=1.8.10,<2.0.0", - "npm-asset/uglify-js": "dev-default|*" + "url": "https://registry.npmjs.org/moment/-/moment-2.24.0.tgz", + "shasum": "0d055d53f5052aa653c9f6eb68bb5d12bf5c2b5b" }, "type": "npm-asset-library", "extra": { @@ -1270,16 +1709,21 @@ "time", "validate" ], - "time": "2017-12-19T04:44:18+00:00" + "time": "2019-01-21T21:10:34+00:00" }, { "name": "npm-asset/php-date-formatter", - "version": "1.3.4", + "version": "v1.3.5", + "source": { + "type": "git", + "url": "https://github.com/kartik-v/php-date-formatter.git", + "reference": "d842e1c4e6a8d6108017b726321c305bb5ae4fb5" + }, "dist": { - "type": "tar", - "url": "https://registry.npmjs.org/php-date-formatter/-/php-date-formatter-1.3.4.tgz", - "reference": null, - "shasum": "09a15ae0766ba0beb1900c27c1ec319ef2e4563e" + "type": "zip", + "url": "https://api.github.com/repos/kartik-v/php-date-formatter/zipball/d842e1c4e6a8d6108017b726321c305bb5ae4fb5", + "reference": "d842e1c4e6a8d6108017b726321c305bb5ae4fb5", + "shasum": "" }, "type": "npm-asset-library", "extra": { @@ -1292,46 +1736,96 @@ }, "npm-asset-repository": { "type": "git", - "url": "git+https://github.com/kartik-v/php-date-formatter.git" - }, - "npm-asset-scripts": [] + "url": "https://github.com/kartik-v/php-date-formatter.git" + } }, "license": [ "BSD-3-Clause" ], "authors": [ - { - "name": "Kartik Visweswaran", - "email": "kartikv2@gmail.com" - } + "Kartik Visweswaran " ], "description": "A Javascript datetime formatting and manipulation library using PHP date-time formats.", "homepage": "https://github.com/kartik-v/php-date-formatter", - "time": "2016-02-18T15:15:55+00:00" + "time": "2018-07-13T06:56:46+00:00" + }, + { + "name": "npm-asset/typeahead.js", + "version": "0.11.1", + "dist": { + "type": "tar", + "url": "https://registry.npmjs.org/typeahead.js/-/typeahead.js-0.11.1.tgz", + "shasum": "4e64e671b22310a8606f4aec805924ba84b015b8" + }, + "require": { + "npm-asset/jquery": ">=1.7" + }, + "type": "npm-asset-library", + "extra": { + "npm-asset-bugs": { + "url": "https://github.com/twitter/typeahead.js/issues" + }, + "npm-asset-main": "dist/typeahead.bundle.js", + "npm-asset-directories": [], + "npm-asset-repository": { + "type": "git", + "url": "https://github.com/twitter/typeahead.js.git" + }, + "npm-asset-scripts": { + "test": "./node_modules/karma/bin/karma start --single-run --browsers PhantomJS" + } + }, + "authors": [ + { + "name": "Twitter, Inc.", + "url": "https://twitter.com/twitteross" + }, + { + "name": "Jake Harding", + "url": "https://twitter.com/JakeHarding" + }, + { + "name": "Tim Trueman", + "url": "https://twitter.com/timtrueman" + }, + { + "name": "Veljko Skarich", + "url": "https://twitter.com/vskarich" + } + ], + "description": "fast and fully-featured autocomplete library", + "homepage": "http://twitter.github.com/typeahead.js", + "keywords": [ + "autocomplete", + "typeahead" + ], + "time": "2015-04-27T04:03:42+00:00" }, { "name": "paragonie/certainty", - "version": "v1.0.2", + "version": "v2.5.0", "source": { "type": "git", "url": "https://github.com/paragonie/certainty.git", - "reference": "a2d14f5b0b85c58329dee248d77d34e7e1202a32" + "reference": "cc39b91595e577fdff6128d7ce787892bd117274" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/certainty/zipball/a2d14f5b0b85c58329dee248d77d34e7e1202a32", - "reference": "a2d14f5b0b85c58329dee248d77d34e7e1202a32", + "url": "https://api.github.com/repos/paragonie/certainty/zipball/cc39b91595e577fdff6128d7ce787892bd117274", + "reference": "cc39b91595e577fdff6128d7ce787892bd117274", "shasum": "" }, "require": { + "ext-curl": "*", + "ext-json": "*", "guzzlehttp/guzzle": "^6", "paragonie/constant_time_encoding": "^1|^2", - "paragonie/sodium_compat": "^1.6", - "php": "^5.6|^7" + "paragonie/sodium_compat": "^1.11", + "php": "^5.5|^7" }, "require-dev": { - "phpunit/phpunit": "^5|^6", - "vimeo/psalm": "^1" + "composer/composer": "^1", + "phpunit/phpunit": "^4|^5|^6" }, "bin": [ "bin/certainty-cert-symlink" @@ -1367,29 +1861,28 @@ "ssl", "tls" ], - "time": "2018-03-12T18:34:23+00:00" + "time": "2019-09-27T22:26:33+00:00" }, { "name": "paragonie/constant_time_encoding", - "version": "v1.0.2", + "version": "v2.2.3", "source": { "type": "git", "url": "https://github.com/paragonie/constant_time_encoding.git", - "reference": "6111a38faf6fdebc14e36652d22036f379ba58d3" + "reference": "55af0dc01992b4d0da7f6372e2eac097bbbaffdb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/6111a38faf6fdebc14e36652d22036f379ba58d3", - "reference": "6111a38faf6fdebc14e36652d22036f379ba58d3", + "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/55af0dc01992b4d0da7f6372e2eac097bbbaffdb", + "reference": "55af0dc01992b4d0da7f6372e2eac097bbbaffdb", "shasum": "" }, "require": { - "php": "^5.3|^7" + "php": "^7" }, "require-dev": { - "paragonie/random_compat": "^1|^2", - "phpunit/phpunit": "4.*|5.*", - "vimeo/psalm": "^1" + "phpunit/phpunit": "^6|^7", + "vimeo/psalm": "^1|^2" }, "type": "library", "autoload": { @@ -1430,37 +1923,82 @@ "hex2bin", "rfc4648" ], - "time": "2018-03-10T19:46:06+00:00" + "time": "2019-01-03T20:26:31+00:00" }, { - "name": "paragonie/random_compat", - "version": "v2.0.11", + "name": "paragonie/hidden-string", + "version": "v1.0.0", "source": { "type": "git", - "url": "https://github.com/paragonie/random_compat.git", - "reference": "5da4d3c796c275c55f057af5a643ae297d96b4d8" + "url": "https://github.com/paragonie/hidden-string.git", + "reference": "0bbb00be0e33b8e1d48fa79ea35cd42d3091a936" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/5da4d3c796c275c55f057af5a643ae297d96b4d8", - "reference": "5da4d3c796c275c55f057af5a643ae297d96b4d8", + "url": "https://api.github.com/repos/paragonie/hidden-string/zipball/0bbb00be0e33b8e1d48fa79ea35cd42d3091a936", + "reference": "0bbb00be0e33b8e1d48fa79ea35cd42d3091a936", "shasum": "" }, "require": { - "php": ">=5.2.0" + "paragonie/constant_time_encoding": "^2", + "paragonie/sodium_compat": "^1.6", + "php": "^7" }, "require-dev": { - "phpunit/phpunit": "4.*|5.*" + "phpunit/phpunit": "^6|^7", + "vimeo/psalm": "^1" + }, + "type": "library", + "autoload": { + "psr-4": { + "ParagonIE\\HiddenString\\": "./src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MPL-2.0" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "info@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "Encapsulate strings in an object to hide them from stack traces", + "homepage": "https://github.com/paragonie/hidden-string", + "keywords": [ + "hidden", + "stack trace", + "string" + ], + "time": "2018-05-07T20:28:06+00:00" + }, + { + "name": "paragonie/random_compat", + "version": "v9.99.99", + "source": { + "type": "git", + "url": "https://github.com/paragonie/random_compat.git", + "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", + "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", + "shasum": "" + }, + "require": { + "php": "^7" + }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*", + "vimeo/psalm": "^1" }, "suggest": { "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." }, "type": "library", - "autoload": { - "files": [ - "lib/random.php" - ] - }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" @@ -1475,28 +2013,29 @@ "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", "keywords": [ "csprng", + "polyfill", "pseudorandom", "random" ], - "time": "2017-09-27T21:40:39+00:00" + "time": "2018-07-02T15:55:56+00:00" }, { "name": "paragonie/sodium_compat", - "version": "v1.6.0", + "version": "v1.11.1", "source": { "type": "git", "url": "https://github.com/paragonie/sodium_compat.git", - "reference": "1f6e5682eff4a5a6a394b14331a1904f1740e432" + "reference": "a9f968bc99485f85f9303a8524c3485a7e87bc15" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/sodium_compat/zipball/1f6e5682eff4a5a6a394b14331a1904f1740e432", - "reference": "1f6e5682eff4a5a6a394b14331a1904f1740e432", + "url": "https://api.github.com/repos/paragonie/sodium_compat/zipball/a9f968bc99485f85f9303a8524c3485a7e87bc15", + "reference": "a9f968bc99485f85f9303a8524c3485a7e87bc15", "shasum": "" }, "require": { - "paragonie/random_compat": "^1|^2", - "php": "^5.2.4|^5.3|^5.4|^5.5|^5.6|^7" + "paragonie/random_compat": ">=1", + "php": "^5.2.4|^5.3|^5.4|^5.5|^5.6|^7|^8" }, "require-dev": { "phpunit/phpunit": "^3|^4|^5" @@ -1560,205 +2099,62 @@ "secret-key cryptography", "side-channel resistant" ], - "time": "2018-02-15T05:50:20+00:00" + "time": "2019-09-12T12:05:58+00:00" }, { - "name": "pear/console_getopt", - "version": "v1.4.1", + "name": "pear/console_table", + "version": "v1.3.1", "source": { "type": "git", - "url": "https://github.com/pear/Console_Getopt.git", - "reference": "82f05cd1aa3edf34e19aa7c8ca312ce13a6a577f" + "url": "https://github.com/pear/Console_Table.git", + "reference": "1930c11897ca61fd24b95f2f785e99e0f36dcdea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pear/Console_Getopt/zipball/82f05cd1aa3edf34e19aa7c8ca312ce13a6a577f", - "reference": "82f05cd1aa3edf34e19aa7c8ca312ce13a6a577f", + "url": "https://api.github.com/repos/pear/Console_Table/zipball/1930c11897ca61fd24b95f2f785e99e0f36dcdea", + "reference": "1930c11897ca61fd24b95f2f785e99e0f36dcdea", "shasum": "" }, + "require": { + "php": ">=5.2.0" + }, + "suggest": { + "pear/Console_Color2": ">=0.1.2" + }, "type": "library", "autoload": { - "psr-0": { - "Console": "./" - } + "classmap": [ + "Table.php" + ] }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "./" - ], "license": [ "BSD-2-Clause" ], "authors": [ { - "name": "Greg Beaver", - "email": "cellog@php.net", - "role": "Helper" + "name": "Jan Schneider", + "homepage": "http://pear.php.net/user/yunosh" }, { - "name": "Andrei Zmievski", - "email": "andrei@php.net", - "role": "Lead" + "name": "Tal Peer", + "homepage": "http://pear.php.net/user/tal" }, { - "name": "Stig Bakken", - "email": "stig@php.net", - "role": "Developer" - } - ], - "description": "More info available on: http://pear.php.net/package/Console_Getopt", - "time": "2015-07-20T20:28:12+00:00" - }, - { - "name": "pear/pear-core-minimal", - "version": "v1.10.3", - "source": { - "type": "git", - "url": "https://github.com/pear/pear-core-minimal.git", - "reference": "070f0b600b2caca2501e2c9b7e553016e4b0d115" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/pear/pear-core-minimal/zipball/070f0b600b2caca2501e2c9b7e553016e4b0d115", - "reference": "070f0b600b2caca2501e2c9b7e553016e4b0d115", - "shasum": "" - }, - "require": { - "pear/console_getopt": "~1.4", - "pear/pear_exception": "~1.0" - }, - "replace": { - "rsky/pear-core-min": "self.version" - }, - "type": "library", - "autoload": { - "psr-0": { - "": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "src/" - ], - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Christian Weiske", - "email": "cweiske@php.net", - "role": "Lead" - } - ], - "description": "Minimal set of PEAR core files to be used as composer dependency", - "time": "2017-02-28T16:46:11+00:00" - }, - { - "name": "pear/pear_exception", - "version": "v1.0.0", - "source": { - "type": "git", - "url": "https://github.com/pear/PEAR_Exception.git", - "reference": "8c18719fdae000b690e3912be401c76e406dd13b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/pear/PEAR_Exception/zipball/8c18719fdae000b690e3912be401c76e406dd13b", - "reference": "8c18719fdae000b690e3912be401c76e406dd13b", - "shasum": "" - }, - "require": { - "php": ">=4.4.0" - }, - "require-dev": { - "phpunit/phpunit": "*" - }, - "type": "class", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "PEAR": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "." - ], - "license": [ - "BSD-2-Clause" - ], - "authors": [ - { - "name": "Helgi Thormar", - "email": "dufuz@php.net" + "name": "Xavier Noguer", + "homepage": "http://pear.php.net/user/xnoguer" }, { - "name": "Greg Beaver", - "email": "cellog@php.net" + "name": "Richard Heyes", + "homepage": "http://pear.php.net/user/richard" } ], - "description": "The PEAR Exception base class.", - "homepage": "https://github.com/pear/PEAR_Exception", + "description": "Library that makes it easy to build console style tables.", + "homepage": "http://pear.php.net/package/Console_Table/", "keywords": [ - "exception" + "console" ], - "time": "2015-02-10T20:07:52+00:00" - }, - { - "name": "pear/text_highlighter", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/pear/Text_Highlighter.git", - "reference": "2ccac2d9eaf55dc08bbbdb7136c93fb399d0f855" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/pear/Text_Highlighter/zipball/2ccac2d9eaf55dc08bbbdb7136c93fb399d0f855", - "reference": "2ccac2d9eaf55dc08bbbdb7136c93fb399d0f855", - "shasum": "" - }, - "require": { - "pear/pear-core-minimal": "~1.10.0", - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "@stable" - }, - "type": "library", - "autoload": { - "psr-0": { - "Text": "./" - } - }, - "include-path": [ - "./" - ], - "license": [ - "PHP-3.01" - ], - "authors": [ - { - "email": "ssttoo@gmail.com", - "name": "Stoyan Stefanov", - "role": "Lead" - }, - { - "email": "demenev@gmail.com", - "name": "Andrey Demenev", - "role": "Lead" - } - ], - "description": "More info available on: http://pear.php.net/package/Text_Highlighter", - "support": { - "issues": "http://pear.php.net/bugs/search.php?cmd=display&package_name[]=Text_Highlighter", - "source": "https://github.com/pear/Text_Highlighter" - }, - "time": "2018-01-27T08:24:15+00:00" + "time": "2018-01-25T20:47:17+00:00" }, { "name": "pear/text_languagedetect", @@ -1804,6 +2200,189 @@ "homepage": "http://pear.php.net/package/Text_LanguageDetect", "time": "2017-03-02T16:14:08+00:00" }, + { + "name": "pragmarx/google2fa", + "version": "v5.0.0", + "source": { + "type": "git", + "url": "https://github.com/antonioribeiro/google2fa.git", + "reference": "17c969c82f427dd916afe4be50bafc6299aef1b4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/antonioribeiro/google2fa/zipball/17c969c82f427dd916afe4be50bafc6299aef1b4", + "reference": "17c969c82f427dd916afe4be50bafc6299aef1b4", + "shasum": "" + }, + "require": { + "paragonie/constant_time_encoding": "~1.0|~2.0", + "paragonie/random_compat": ">=1", + "php": ">=5.4", + "symfony/polyfill-php56": "~1.2" + }, + "require-dev": { + "phpunit/phpunit": "~4|~5|~6" + }, + "type": "library", + "extra": { + "component": "package", + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "psr-4": { + "PragmaRX\\Google2FA\\": "src/", + "PragmaRX\\Google2FA\\Tests\\": "tests/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Antonio Carlos Ribeiro", + "email": "acr@antoniocarlosribeiro.com", + "role": "Creator & Designer" + } + ], + "description": "A One Time Password Authentication package, compatible with Google Authenticator.", + "keywords": [ + "2fa", + "Authentication", + "Two Factor Authentication", + "google2fa" + ], + "time": "2019-03-19T22:44:16+00:00" + }, + { + "name": "pragmarx/random", + "version": "v0.2.2", + "source": { + "type": "git", + "url": "https://github.com/antonioribeiro/random.git", + "reference": "daf08a189c5d2d40d1a827db46364d3a741a51b7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/antonioribeiro/random/zipball/daf08a189c5d2d40d1a827db46364d3a741a51b7", + "reference": "daf08a189c5d2d40d1a827db46364d3a741a51b7", + "shasum": "" + }, + "require": { + "php": ">=7.0" + }, + "require-dev": { + "fzaninotto/faker": "~1.7", + "phpunit/phpunit": "~6.4", + "pragmarx/trivia": "~0.1", + "squizlabs/php_codesniffer": "^2.3" + }, + "suggest": { + "fzaninotto/faker": "Allows you to get dozens of randomized types", + "pragmarx/trivia": "For the trivia database" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "PragmaRX\\Random\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Antonio Carlos Ribeiro", + "email": "acr@antoniocarlosribeiro.com", + "homepage": "https://antoniocarlosribeiro.com", + "role": "Developer" + } + ], + "description": "Create random chars, numbers, strings", + "homepage": "https://github.com/antonioribeiro/random", + "keywords": [ + "Randomize", + "faker", + "pragmarx", + "random", + "random number", + "random pattern", + "random string" + ], + "time": "2017-11-21T05:26:22+00:00" + }, + { + "name": "pragmarx/recovery", + "version": "v0.1.0", + "source": { + "type": "git", + "url": "https://github.com/antonioribeiro/recovery.git", + "reference": "e16573a1ae5345cc3b100eec6d0296a1a15a90fe" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/antonioribeiro/recovery/zipball/e16573a1ae5345cc3b100eec6d0296a1a15a90fe", + "reference": "e16573a1ae5345cc3b100eec6d0296a1a15a90fe", + "shasum": "" + }, + "require": { + "php": "~7.0", + "pragmarx/random": "~0.1" + }, + "require-dev": { + "phpunit/phpunit": ">=5.4.3", + "squizlabs/php_codesniffer": "^2.3", + "tightenco/collect": "^5" + }, + "suggest": { + "tightenco/collect": "Allows to generate recovery codes as collections" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "PragmaRX\\Recovery\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Antonio Carlos Ribeiro", + "email": "acr@antoniocarlosribeiro.com", + "homepage": "https://antoniocarlosribeiro.com", + "role": "Developer" + } + ], + "description": "Create recovery codes for two factor auth", + "homepage": "https://github.com/antonioribeiro/recovery", + "keywords": [ + "2fa", + "account recovery", + "auth", + "backup codes", + "google2fa", + "pragmarx", + "recovery", + "recovery codes", + "two factor auth" + ], + "time": "2017-09-19T16:58:00+00:00" + }, { "name": "psr/cache", "version": "1.0.1", @@ -1850,6 +2429,55 @@ ], "time": "2016-08-06T20:24:11+00:00" }, + { + "name": "psr/container", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "time": "2017-02-14T16:28:37+00:00" + }, { "name": "psr/http-message", "version": "1.0.1", @@ -1901,92 +2529,91 @@ "time": "2016-08-06T14:39:51+00:00" }, { - "name": "rapidwebltd/rw-file-cache", - "version": "v1.2.5", + "name": "psr/log", + "version": "1.1.0", "source": { "type": "git", - "url": "https://github.com/rapidwebltd/RW-File-Cache.git", - "reference": "4a1d5aaefa6ffafec8e2d60787f12bcd9890977e" + "url": "https://github.com/php-fig/log.git", + "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/rapidwebltd/RW-File-Cache/zipball/4a1d5aaefa6ffafec8e2d60787f12bcd9890977e", - "reference": "4a1d5aaefa6ffafec8e2d60787f12bcd9890977e", + "url": "https://api.github.com/repos/php-fig/log/zipball/6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", + "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", "shasum": "" }, "require": { - "php": ">=5.2.1" - }, - "require-dev": { - "phpunit/phpunit": "^5.7" + "php": ">=5.3.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { "psr-4": { - "rapidweb\\RWFileCache\\": "src/" + "Psr\\Log\\": "Psr/Log/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "LGPL-3.0-only" - ], - "description": "RW File Cache is a PHP File-based Caching Library. Its syntax is designed to closely resemble the PHP memcache extension.", - "homepage": "https://github.com/rapidwebltd/RW-File-Cache", - "keywords": [ - "cache", - "caching", - "caching library", - "file cache", - "library", - "php" - ], - "time": "2018-01-23T17:20:58+00:00" - }, - { - "name": "rapidwebltd/rw-file-cache-psr-6", - "version": "v1.0.0", - "source": { - "type": "git", - "url": "https://github.com/rapidwebltd/RW-File-Cache-PSR-6.git", - "reference": "b74ea201d4c964f0e6db0fb036d1ab28a570df66" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/rapidwebltd/RW-File-Cache-PSR-6/zipball/b74ea201d4c964f0e6db0fb036d1ab28a570df66", - "reference": "b74ea201d4c964f0e6db0fb036d1ab28a570df66", - "shasum": "" - }, - "require": { - "psr/cache": "^1.0", - "rapidwebltd/rw-file-cache": "^1.2.3" - }, - "require-dev": { - "cache/integration-tests": "^0.16.0", - "phpunit/phpunit": "^5.7" - }, - "type": "library", - "autoload": { - "psr-4": { - "rapidweb\\RWFileCachePSR6\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-3.0-only" + "MIT" ], "authors": [ { - "name": "Jordan Hall", - "email": "jordan.hall@rapidweb.biz" + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" } ], - "description": "PSR-6 adapter for RW File Cache", - "time": "2018-01-30T19:13:45+00:00" + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2018-11-20T15:27:04+00:00" + }, + { + "name": "ralouphie/getallheaders", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "120b605dfeb996808c31b6477290a714d356e822" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", + "reference": "120b605dfeb996808c31b6477290a714d356e822", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5 || ^6.5" + }, + "type": "library", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "time": "2019-03-08T08:55:37+00:00" }, { "name": "seld/cli-prompt", @@ -2038,16 +2665,16 @@ }, { "name": "smarty/smarty", - "version": "v3.1.31", + "version": "v3.1.33", "source": { "type": "git", "url": "https://github.com/smarty-php/smarty.git", - "reference": "c7d42e4a327c402897dd587871434888fde1e7a9" + "reference": "dd55b23121e55a3b4f1af90a707a6c4e5969530f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/smarty-php/smarty/zipball/c7d42e4a327c402897dd587871434888fde1e7a9", - "reference": "c7d42e4a327c402897dd587871434888fde1e7a9", + "url": "https://api.github.com/repos/smarty-php/smarty/zipball/dd55b23121e55a3b4f1af90a707a6c4e5969530f", + "reference": "dd55b23121e55a3b4f1af90a707a6c4e5969530f", "shasum": "" }, "require": { @@ -2087,20 +2714,1730 @@ "keywords": [ "templating" ], - "time": "2016-12-14T21:57:25+00:00" + "time": "2018-09-12T20:54:16+00:00" + }, + { + "name": "symfony/polyfill-php56", + "version": "v1.12.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php56.git", + "reference": "0e3b212e96a51338639d8ce175c046d7729c3403" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php56/zipball/0e3b212e96a51338639d8ce175c046d7729c3403", + "reference": "0e3b212e96a51338639d8ce175c046d7729c3403", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "symfony/polyfill-util": "~1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.12-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php56\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 5.6+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2019-08-06T08:03:45+00:00" + }, + { + "name": "symfony/polyfill-util", + "version": "v1.12.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-util.git", + "reference": "4317de1386717b4c22caed7725350a8887ab205c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-util/zipball/4317de1386717b4c22caed7725350a8887ab205c", + "reference": "4317de1386717b4c22caed7725350a8887ab205c", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.12-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Util\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony utilities for portability of PHP codes", + "homepage": "https://symfony.com", + "keywords": [ + "compat", + "compatibility", + "polyfill", + "shim" + ], + "time": "2019-08-06T08:03:45+00:00" + } + ], + "packages-dev": [ + { + "name": "doctrine/instantiator", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "a2c590166b2133a4633738648b6b064edae0814a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/a2c590166b2133a4633738648b6b064edae0814a", + "reference": "a2c590166b2133a4633738648b6b064edae0814a", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "require-dev": { + "doctrine/coding-standard": "^6.0", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^0.13", + "phpstan/phpstan-phpunit": "^0.11", + "phpstan/phpstan-shim": "^0.11", + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.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://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "constructor", + "instantiate" + ], + "time": "2019-03-17T17:37:11+00:00" + }, + { + "name": "hamcrest/hamcrest-php", + "version": "v2.0.0", + "source": { + "type": "git", + "url": "https://github.com/hamcrest/hamcrest-php.git", + "reference": "776503d3a8e85d4f9a1148614f95b7a608b046ad" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/776503d3a8e85d4f9a1148614f95b7a608b046ad", + "reference": "776503d3a8e85d4f9a1148614f95b7a608b046ad", + "shasum": "" + }, + "require": { + "php": "^5.3|^7.0" + }, + "replace": { + "cordoval/hamcrest-php": "*", + "davedevelopment/hamcrest-php": "*", + "kodova/hamcrest-php": "*" + }, + "require-dev": { + "phpunit/php-file-iterator": "1.3.3", + "phpunit/phpunit": "~4.0", + "satooshi/php-coveralls": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "hamcrest" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD" + ], + "description": "This is the PHP port of Hamcrest Matchers", + "keywords": [ + "test" + ], + "time": "2016-01-20T08:20:44+00:00" + }, + { + "name": "johnkary/phpunit-speedtrap", + "version": "v1.1.0", + "source": { + "type": "git", + "url": "https://github.com/johnkary/phpunit-speedtrap.git", + "reference": "f7cfe17c5a7076ed0ccca5450fe3bb981ec56361" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/johnkary/phpunit-speedtrap/zipball/f7cfe17c5a7076ed0ccca5450fe3bb981ec56361", + "reference": "f7cfe17c5a7076ed0ccca5450fe3bb981ec56361", + "shasum": "" + }, + "require": { + "php": ">=5.6", + "phpunit/phpunit": ">=4.7,<6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-0": { + "JohnKary": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "John Kary", + "email": "john@johnkary.net" + } + ], + "description": "Find slow tests in your PHPUnit test suite", + "homepage": "https://github.com/johnkary/phpunit-speedtrap", + "keywords": [ + "phpunit", + "profile", + "slow" + ], + "time": "2017-03-25T17:14:26+00:00" + }, + { + "name": "mikey179/vfsstream", + "version": "v1.6.7", + "source": { + "type": "git", + "url": "https://github.com/bovigo/vfsStream.git", + "reference": "2b544ac3a21bcc4dde5d90c4ae8d06f4319055fb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/bovigo/vfsStream/zipball/2b544ac3a21bcc4dde5d90c4ae8d06f4319055fb", + "reference": "2b544ac3a21bcc4dde5d90c4ae8d06f4319055fb", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.5|^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6.x-dev" + } + }, + "autoload": { + "psr-0": { + "org\\bovigo\\vfs\\": "src/main/php" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Frank Kleine", + "homepage": "http://frankkleine.de/", + "role": "Developer" + } + ], + "description": "Virtual file system to mock the real file system in unit tests.", + "homepage": "http://vfs.bovigo.org/", + "time": "2019-08-01T01:38:37+00:00" + }, + { + "name": "mockery/mockery", + "version": "1.2.3", + "source": { + "type": "git", + "url": "https://github.com/mockery/mockery.git", + "reference": "4eff936d83eb809bde2c57a3cea0ee9643769031" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mockery/mockery/zipball/4eff936d83eb809bde2c57a3cea0ee9643769031", + "reference": "4eff936d83eb809bde2c57a3cea0ee9643769031", + "shasum": "" + }, + "require": { + "hamcrest/hamcrest-php": "~2.0", + "lib-pcre": ">=7.0", + "php": ">=5.6.0" + }, + "require-dev": { + "phpunit/phpunit": "~5.7.10|~6.5|~7.0|~8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "Mockery": "library/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Pádraic Brady", + "email": "padraic.brady@gmail.com", + "homepage": "http://blog.astrumfutura.com" + }, + { + "name": "Dave Marshall", + "email": "dave.marshall@atstsolutions.co.uk", + "homepage": "http://davedevelopment.co.uk" + } + ], + "description": "Mockery is a simple yet flexible PHP mock object framework", + "homepage": "https://github.com/mockery/mockery", + "keywords": [ + "BDD", + "TDD", + "library", + "mock", + "mock objects", + "mockery", + "stub", + "test", + "test double", + "testing" + ], + "time": "2019-08-07T15:01:07+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.9.3", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/007c053ae6f31bba39dfa19a7726f56e9763bbea", + "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "replace": { + "myclabs/deep-copy": "self.version" + }, + "require-dev": { + "doctrine/collections": "^1.0", + "doctrine/common": "^2.6", + "phpunit/phpunit": "^7.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": "2019-08-09T12:45:53+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.8.1", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "1927e75f4ed19131ec9bcc3b002e07fb1173ee76" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/1927e75f4ed19131ec9bcc3b002e07fb1173ee76", + "reference": "1927e75f4ed19131ec9bcc3b002e07fb1173ee76", + "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 || ^7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.8.x-dev" + } + }, + "autoload": { + "psr-4": { + "Prophecy\\": "src/Prophecy" + } + }, + "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": "2019-06-13T12:50:23+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" + ], + "abandoned": true, + "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/polyfill-ctype", + "version": "v1.12.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "550ebaac289296ce228a706d0867afc34687e3f4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/550ebaac289296ce228a706d0867afc34687e3f4", + "reference": "550ebaac289296ce228a706d0867afc34687e3f4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.12-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "time": "2019-08-06T08:03:45+00:00" + }, + { + "name": "symfony/yaml", + "version": "v4.3.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "5a0b7c32dc3ec56fd4abae8a4a71b0cf05013686" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/5a0b7c32dc3ec56fd4abae8a4a71b0cf05013686", + "reference": "5a0b7c32dc3ec56fd4abae8a4a71b0cf05013686", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/polyfill-ctype": "~1.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": "4.3-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": "2019-08-20T14:27:59+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.5.0", + "source": { + "type": "git", + "url": "https://github.com/webmozart/assert.git", + "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/assert/zipball/88e6d84706d09a236046d686bbea96f07b3a34f4", + "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0", + "symfony/polyfill-ctype": "^1.8" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.36 || ^7.5.13" + }, + "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": "2019-08-24T08:43:50+00:00" } ], - "packages-dev": [], "aliases": [], "minimum-stability": "stable", "stability-flags": { - "lightopenid/lightopenid": 20, - "pear/text_highlighter": 20 + "lightopenid/lightopenid": 20 }, "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">5.6", + "php": ">=7.0", + "ext-ctype": "*", + "ext-curl": "*", + "ext-dom": "*", + "ext-fileinfo": "*", + "ext-gd": "*", + "ext-iconv": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-openssl": "*", + "ext-simplexml": "*", "ext-xml": "*" }, "platform-dev": [] diff --git a/config/addon-sample.config.php b/config/addon-sample.config.php new file mode 100644 index 0000000000..5159370c3a --- /dev/null +++ b/config/addon-sample.config.php @@ -0,0 +1,12 @@ + [ + 'consumerkey' => '1234567890', + 'consumersecret' => 'ABCDEFGHIJKLMONPQRSTUVWXYZ', + ], +]; diff --git a/config/local-sample.config.php b/config/local-sample.config.php new file mode 100644 index 0000000000..9bf073df1d --- /dev/null +++ b/config/local-sample.config.php @@ -0,0 +1,44 @@ + [ + 'hostname' => 'localhost', + 'username' => 'mysqlusername', + 'password' => 'mysqlpassword', + 'database' => 'mysqldatabasename', + 'charset' => 'utf8mb4', + ], + + // **************************************************************** + // The configuration below will be overruled by the admin panel. + // Changes made below will only have an effect if the database does + // not contain any configuration for the friendica system. + // **************************************************************** + + 'config' => [ + 'admin_email' => '', + 'sitename' => 'Friendica Social Network', + 'register_policy' => \Friendica\Module\Register::OPEN, + 'register_text' => '', + ], + 'system' => [ + 'default_timezone' => 'UTC', + 'language' => 'en', + ], +]; diff --git a/database.sql b/database.sql index aa87247db3..d42f61f902 100644 --- a/database.sql +++ b/database.sql @@ -1,43 +1,99 @@ -- ------------------------------------------ --- Friendica 2018-05-dev (The Tazmans Flax-lily) --- DB_UPDATE_VERSION 1259 +-- Friendica 2019.09-rc (Dalmatian Bellflower) +-- DB_UPDATE_VERSION 1322 -- ------------------------------------------ +-- +-- TABLE 2fa_app_specific_password +-- +CREATE TABLE IF NOT EXISTS `2fa_app_specific_password` ( + `id` mediumint unsigned NOT NULL auto_increment COMMENT 'Password ID for revocation', + `uid` mediumint unsigned NOT NULL COMMENT 'User ID', + `description` varchar(255) COMMENT 'Description of the usage of the password', + `hashed_password` varchar(255) NOT NULL COMMENT 'Hashed password', + `generated` datetime NOT NULL COMMENT 'Datetime the password was generated', + `last_used` datetime COMMENT 'Datetime the password was last used', + PRIMARY KEY(`id`), + INDEX `uid_description` (`uid`,`description`(190)) +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Two-factor app-specific _password'; + +-- +-- TABLE 2fa_recovery_codes +-- +CREATE TABLE IF NOT EXISTS `2fa_recovery_codes` ( + `uid` mediumint unsigned NOT NULL COMMENT 'User ID', + `code` varchar(50) NOT NULL COMMENT 'Recovery code string', + `generated` datetime NOT NULL COMMENT 'Datetime the code was generated', + `used` datetime COMMENT 'Datetime the code was used', + PRIMARY KEY(`uid`,`code`) +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Two-factor authentication recovery codes'; + -- -- TABLE addon -- 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; +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='registered addons'; + +-- +-- TABLE apcontact +-- +CREATE TABLE IF NOT EXISTS `apcontact` ( + `url` varbinary(255) NOT NULL COMMENT 'URL of the contact', + `uuid` varchar(255) COMMENT '', + `type` varchar(20) NOT NULL COMMENT '', + `following` varchar(255) COMMENT '', + `followers` varchar(255) COMMENT '', + `inbox` varchar(255) NOT NULL COMMENT '', + `outbox` varchar(255) COMMENT '', + `sharedinbox` varchar(255) COMMENT '', + `manually-approve` boolean COMMENT '', + `nick` varchar(255) NOT NULL DEFAULT '' COMMENT '', + `name` varchar(255) COMMENT '', + `about` text COMMENT '', + `photo` varchar(255) COMMENT '', + `addr` varchar(255) COMMENT '', + `alias` varchar(255) COMMENT '', + `pubkey` text COMMENT '', + `baseurl` varchar(255) COMMENT 'baseurl of the ap contact', + `generator` varchar(255) COMMENT 'Name of the contact\'s system', + `updated` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', + PRIMARY KEY(`url`), + INDEX `addr` (`addr`(32)), + INDEX `alias` (`alias`(190)), + INDEX `url` (`followers`(190)) +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='ActivityPub compatible contacts - used in the ActivityPub implementation'; -- -- 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', + `backend-class` tinytext COMMENT 'Storage backend class', + `backend-ref` text COMMENT 'Storage backend data reference', PRIMARY KEY(`id`) -) DEFAULT COLLATE utf8mb4_general_ci; +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='file attachments'; -- -- TABLE auth_codes @@ -49,7 +105,7 @@ CREATE TABLE IF NOT EXISTS `auth_codes` ( `expires` int NOT NULL DEFAULT 0 COMMENT '', `scope` varchar(250) NOT NULL DEFAULT '' COMMENT '', PRIMARY KEY(`id`) -) DEFAULT COLLATE utf8mb4_general_ci; +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='OAuth usage'; -- -- TABLE cache @@ -61,20 +117,20 @@ CREATE TABLE IF NOT EXISTS `cache` ( `updated` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'datetime of cache insertion', PRIMARY KEY(`k`), INDEX `k_expires` (`k`,`expires`) -) DEFAULT COLLATE utf8mb4_general_ci; +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Stores temporary data'; -- -- 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 '', `type` varchar(255) NOT NULL DEFAULT '' COMMENT '', `last_update` varchar(255) NOT NULL DEFAULT '' COMMENT '', PRIMARY KEY(`id`) -) DEFAULT COLLATE utf8mb4_general_ci; +) DEFAULT COLLATE utf8mb4_general_ci COMMENT=''; -- -- TABLE clients @@ -87,7 +143,7 @@ CREATE TABLE IF NOT EXISTS `clients` ( `icon` text COMMENT '', `uid` mediumint unsigned NOT NULL DEFAULT 0 COMMENT 'User id', PRIMARY KEY(`client_id`) -) DEFAULT COLLATE utf8mb4_general_ci; +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='OAuth usage'; -- -- TABLE config @@ -99,32 +155,34 @@ CREATE TABLE IF NOT EXISTS `config` ( `v` mediumtext COMMENT '', PRIMARY KEY(`id`), UNIQUE INDEX `cat_k` (`cat`,`k`) -) DEFAULT COLLATE utf8mb4_general_ci; +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='main configuration storage'; -- -- 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 '', + `updated` datetime DEFAULT '0001-01-01 00:00:00' COMMENT 'Date of last contact update', + `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 '', - `location` varchar(255) NOT NULL DEFAULT '' COMMENT '', + `network` char(4) NOT NULL DEFAULT '' COMMENT 'Network of the contact', + `protocol` char(4) NOT NULL DEFAULT '' COMMENT '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) 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 +190,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,25 +203,30 @@ 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 '', + `blocked` boolean NOT NULL DEFAULT '1' COMMENT 'Node-wide block status', + `block_reason` text COMMENT 'Node-wide block reason', + `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 '', `pending` boolean NOT NULL DEFAULT '1' COMMENT '', + `deleted` boolean NOT NULL DEFAULT '0' COMMENT 'Contact has been deleted', `rating` tinyint NOT NULL DEFAULT 0 COMMENT '', + `unsearchable` boolean NOT NULL DEFAULT '0' COMMENT 'Contact prefers to not be searchable', + `sensitive` boolean NOT NULL DEFAULT '0' COMMENT 'Contact posts sensitive content', + `baseurl` varchar(255) DEFAULT '' COMMENT 'baseurl of the contact', `reason` text COMMENT '', `closeness` tinyint unsigned NOT NULL DEFAULT 99 COMMENT '', `info` mediumtext COMMENT '', @@ -186,74 +249,83 @@ CREATE TABLE IF NOT EXISTS `contact` ( INDEX `nick_uid` (`nick`(32),`uid`), INDEX `dfrn-id` (`dfrn-id`(64)), INDEX `issued-id` (`issued-id`(64)) -) DEFAULT COLLATE utf8mb4_general_ci; +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='contact table'; -- -- 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; +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='private messages'; -- -- 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 'Original URI of the item - unrelated to the table with the same name', + `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 255 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`) -) DEFAULT COLLATE utf8mb4_general_ci; +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Raw data and structure information for messages'; + +-- +-- TABLE diaspora-interaction +-- +CREATE TABLE IF NOT EXISTS `diaspora-interaction` ( + `uri-id` int unsigned NOT NULL COMMENT 'Id of the item-uri table entry that contains the item uri', + `interaction` mediumtext COMMENT 'The Diaspora interaction', + PRIMARY KEY(`uri-id`) +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Signed Diaspora Interaction'; -- -- 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; +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Events'; -- -- 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 '', @@ -272,7 +344,7 @@ CREATE TABLE IF NOT EXISTS `fcontact` ( PRIMARY KEY(`id`), INDEX `addr` (`addr`(32)), UNIQUE INDEX `url` (`url`(190)) -) DEFAULT COLLATE utf8mb4_general_ci; +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Diaspora compatible contacts - used in the Diaspora implementation'; -- -- TABLE fsuggest @@ -288,50 +360,52 @@ CREATE TABLE IF NOT EXISTS `fsuggest` ( `note` text COMMENT '', `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', PRIMARY KEY(`id`) -) DEFAULT COLLATE utf8mb4_general_ci; +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='friend suggestion stuff'; -- -- 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`) -) DEFAULT COLLATE utf8mb4_general_ci; +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='contacts ignored by friend suggestions'; -- -- 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 '', `last_contact` datetime DEFAULT '0001-01-01 00:00:00' COMMENT '', `last_failure` datetime DEFAULT '0001-01-01 00:00:00' COMMENT '', + `archive_date` datetime DEFAULT '0001-01-01 00:00:00' COMMENT '', + `archived` boolean NOT NULL DEFAULT '0' 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)), @@ -339,13 +413,13 @@ CREATE TABLE IF NOT EXISTS `gcontact` ( INDEX `addr` (`addr`(64)), INDEX `hide_network_updated` (`hide`,`network`,`updated`), INDEX `updated` (`updated`) -) DEFAULT COLLATE utf8mb4_general_ci; +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='global contacts'; -- -- 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 '', @@ -354,45 +428,45 @@ CREATE TABLE IF NOT EXISTS `glink` ( PRIMARY KEY(`id`), UNIQUE INDEX `cid_uid_gcid_zcid` (`cid`,`uid`,`gcid`,`zcid`), INDEX `gcid` (`gcid`) -) DEFAULT COLLATE utf8mb4_general_ci; +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='\'friends of friends\' linkages derived from poco'; -- -- 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; +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='privacy groups, group info'; -- -- 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`) -) DEFAULT COLLATE utf8mb4_general_ci; +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='privacy groups, member info'; -- -- 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 '', @@ -405,7 +479,7 @@ CREATE TABLE IF NOT EXISTS `gserver` ( `last_failure` datetime DEFAULT '0001-01-01 00:00:00' COMMENT '', PRIMARY KEY(`id`), UNIQUE INDEX `nurl` (`nurl`(190)) -) DEFAULT COLLATE utf8mb4_general_ci; +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Global servers'; -- -- TABLE gserver-tag @@ -415,26 +489,40 @@ CREATE TABLE IF NOT EXISTS `gserver-tag` ( `tag` varchar(100) NOT NULL DEFAULT '' COMMENT 'Tag that the server has subscribed', PRIMARY KEY(`gserver-id`,`tag`), INDEX `tag` (`tag`) -) DEFAULT COLLATE utf8mb4_general_ci; +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Tags that the server has subscribed'; -- -- 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; +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='addon hook registry'; + +-- +-- TABLE inbox-status +-- +CREATE TABLE IF NOT EXISTS `inbox-status` ( + `url` varbinary(255) NOT NULL COMMENT 'URL of the inbox', + `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'Creation date of this entry', + `success` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'Date of the last successful delivery', + `failure` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'Date of the last failed delivery', + `previous` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'Previous delivery date', + `archive` boolean NOT NULL DEFAULT '0' COMMENT 'Is the inbox archived?', + `shared` boolean NOT NULL DEFAULT '0' COMMENT 'Is it a shared inbox?', + PRIMARY KEY(`url`) +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Status of ActivityPub inboxes'; -- -- 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 '', @@ -446,76 +534,83 @@ CREATE TABLE IF NOT EXISTS `intro` ( `blocked` boolean NOT NULL DEFAULT '1' COMMENT '', `ignore` boolean NOT NULL DEFAULT '0' COMMENT '', PRIMARY KEY(`id`) -) DEFAULT COLLATE utf8mb4_general_ci; +) DEFAULT COLLATE utf8mb4_general_ci COMMENT=''; -- -- TABLE item -- 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 '', - `type` varchar(20) NOT NULL DEFAULT '' COMMENT '', - `wall` boolean NOT NULL DEFAULT '0' COMMENT '', + `uri-id` int unsigned COMMENT 'Id of the item-uri table entry that contains the item uri', + `uri-hash` varchar(80) NOT NULL DEFAULT '' COMMENT 'RIPEMD-128 hash from uri', + `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', + `parent-uri-id` int unsigned COMMENT 'Id of the item-uri table that contains the parent uri', + `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', + `thr-parent-id` int unsigned COMMENT 'Id of the item-uri table that contains the thread 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', `gravity` tinyint unsigned NOT NULL DEFAULT 0 COMMENT '', - `parent` int unsigned NOT NULL DEFAULT 0 COMMENT '', - `parent-uri` varchar(255) NOT NULL DEFAULT '' COMMENT '', + `network` char(4) NOT NULL DEFAULT '' COMMENT 'Network from where the item comes from', + `owner-id` int unsigned NOT NULL DEFAULT 0 COMMENT 'Link to the contact table with uid=0 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', + `icid` int unsigned COMMENT 'Id of the item-content table entry that contains the whole item content', + `iaid` int unsigned COMMENT 'Id of the item-activity table entry that contains the activity data', `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 '', - `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 '', - `tag` mediumtext COMMENT '', - `attach` mediumtext COMMENT '', - `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 '', - `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 '', - `forum_mode` tinyint unsigned NOT NULL DEFAULT 0 COMMENT '', - `mention` boolean NOT NULL DEFAULT '0' COMMENT '', - `network` char(4) NOT NULL DEFAULT '' COMMENT '', - `rendered-hash` varchar(32) NOT NULL DEFAULT '' COMMENT '', - `rendered-html` mediumtext COMMENT '', + `post-type` tinyint unsigned NOT NULL DEFAULT 0 COMMENT 'Post type (personal note, bookmark, ...)', `global` boolean NOT NULL DEFAULT '0' COMMENT '', + `private` boolean NOT NULL DEFAULT '0' COMMENT 'distribution is restricted', + `visible` boolean NOT NULL DEFAULT '0' COMMENT '', + `moderated` boolean NOT NULL DEFAULT '0' COMMENT '', + `deleted` boolean NOT NULL DEFAULT '0' COMMENT 'item has been deleted', + `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', + `wall` boolean NOT NULL DEFAULT '0' COMMENT 'This item was posted to the wall of uid', + `origin` boolean NOT NULL DEFAULT '0' COMMENT 'item originated at this site', + `pubmail` boolean NOT NULL DEFAULT '0' COMMENT '', + `starred` boolean NOT NULL DEFAULT '0' COMMENT 'item has been favourited', + `unseen` boolean NOT NULL DEFAULT '1' COMMENT 'item has not been seen', + `mention` boolean NOT NULL DEFAULT '0' COMMENT 'The owner of this item was mentioned in it', + `forum_mode` tinyint unsigned NOT NULL DEFAULT 0 COMMENT '', + `psid` int unsigned COMMENT 'ID of the permission set of this post', + `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', + `attach` mediumtext COMMENT 'JSON structure representing attachments to this item', + `allow_cid` mediumtext COMMENT 'Deprecated', + `allow_gid` mediumtext COMMENT 'Deprecated', + `deny_cid` mediumtext COMMENT 'Deprecated', + `deny_gid` mediumtext COMMENT 'Deprecated', + `postopts` text COMMENT 'Deprecated', + `inform` mediumtext COMMENT 'Deprecated', + `type` varchar(20) COMMENT 'Deprecated', + `bookmark` boolean COMMENT 'Deprecated', + `file` mediumtext COMMENT 'Deprecated', + `location` varchar(255) COMMENT 'Deprecated', + `coord` varchar(255) COMMENT 'Deprecated', + `tag` mediumtext COMMENT 'Deprecated', + `plink` varchar(255) COMMENT 'Deprecated', + `title` varchar(255) COMMENT 'Deprecated', + `content-warning` varchar(255) COMMENT 'Deprecated', + `body` mediumtext COMMENT 'Deprecated', + `app` varchar(255) COMMENT 'Deprecated', + `verb` varchar(100) COMMENT 'Deprecated', + `object-type` varchar(100) COMMENT 'Deprecated', + `object` text COMMENT 'Deprecated', + `target-type` varchar(100) COMMENT 'Deprecated', + `target` text COMMENT 'Deprecated', + `author-name` varchar(255) COMMENT 'Deprecated', + `author-link` varchar(255) COMMENT 'Deprecated', + `author-avatar` varchar(255) COMMENT 'Deprecated', + `owner-name` varchar(255) COMMENT 'Deprecated', + `owner-link` varchar(255) COMMENT 'Deprecated', + `owner-avatar` varchar(255) COMMENT 'Deprecated', + `rendered-hash` varchar(32) COMMENT 'Deprecated', + `rendered-html` mediumtext COMMENT 'Deprecated', PRIMARY KEY(`id`), INDEX `guid` (`guid`(191)), INDEX `uri` (`uri`(191)), @@ -524,73 +619,149 @@ CREATE TABLE IF NOT EXISTS `item` ( INDEX `extid` (`extid`(191)), INDEX `uid_id` (`uid`,`id`), INDEX `uid_contactid_id` (`uid`,`contact-id`,`id`), - INDEX `uid_created` (`uid`,`created`), + INDEX `uid_received` (`uid`,`received`), INDEX `uid_commented` (`uid`,`commented`), INDEX `uid_unseen_contactid` (`uid`,`unseen`,`contact-id`), INDEX `uid_network_received` (`uid`,`network`,`received`), INDEX `uid_network_commented` (`uid`,`network`,`commented`), INDEX `uid_thrparent` (`uid`,`thr-parent`(190)), INDEX `uid_parenturi` (`uid`,`parent-uri`(190)), - INDEX `uid_contactid_created` (`uid`,`contact-id`,`created`), - INDEX `authorid_created` (`author-id`,`created`), + INDEX `uid_contactid_received` (`uid`,`contact-id`,`received`), + INDEX `authorid_received` (`author-id`,`received`), INDEX `ownerid` (`owner-id`), + INDEX `contact-id` (`contact-id`), INDEX `uid_uri` (`uid`,`uri`(190)), INDEX `resource-id` (`resource-id`), - INDEX `contactid_allowcid_allowpid_denycid_denygid` (`contact-id`,`allow_cid`(10),`allow_gid`(10),`deny_cid`(10),`deny_gid`(10)), - INDEX `uid_type_changed` (`uid`,`type`,`changed`), - INDEX `contactid_verb` (`contact-id`,`verb`), INDEX `deleted_changed` (`deleted`,`changed`), INDEX `uid_wall_changed` (`uid`,`wall`,`changed`), INDEX `uid_eventid` (`uid`,`event-id`), - INDEX `uid_authorlink` (`uid`,`author-link`(190)), - INDEX `uid_ownerlink` (`uid`,`owner-link`(190)) -) DEFAULT COLLATE utf8mb4_general_ci; + INDEX `icid` (`icid`), + INDEX `iaid` (`iaid`), + INDEX `psid_wall` (`psid`,`wall`) +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Structure for all posts'; + +-- +-- TABLE item-activity +-- +CREATE TABLE IF NOT EXISTS `item-activity` ( + `id` int unsigned NOT NULL auto_increment, + `uri` varchar(255) COMMENT '', + `uri-id` int unsigned COMMENT 'Id of the item-uri table entry that contains the item uri', + `uri-hash` varchar(80) NOT NULL DEFAULT '' COMMENT 'RIPEMD-128 hash from uri', + `activity` smallint unsigned NOT NULL DEFAULT 0 COMMENT '', + PRIMARY KEY(`id`), + UNIQUE INDEX `uri-hash` (`uri-hash`), + INDEX `uri` (`uri`(191)), + INDEX `uri-id` (`uri-id`) +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Activities for items'; + +-- +-- TABLE item-content +-- +CREATE TABLE IF NOT EXISTS `item-content` ( + `id` int unsigned NOT NULL auto_increment, + `uri` varchar(255) COMMENT '', + `uri-id` int unsigned COMMENT 'Id of the item-uri table entry that contains the item uri', + `uri-plink-hash` varchar(80) NOT NULL DEFAULT '' COMMENT 'RIPEMD-128 hash from uri', + `title` varchar(255) NOT NULL DEFAULT '' COMMENT 'item title', + `content-warning` varchar(255) NOT NULL DEFAULT '' COMMENT '', + `body` mediumtext COMMENT 'item body content', + `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', + `language` text COMMENT 'Language information about this post', + `app` varchar(255) NOT NULL DEFAULT '' COMMENT 'application which generated this item', + `rendered-hash` varchar(32) NOT NULL DEFAULT '' COMMENT '', + `rendered-html` mediumtext COMMENT 'item.body converted to html', + `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', + `plink` varchar(255) NOT NULL DEFAULT '' COMMENT 'permalink or URL to a displayable copy of the message at its source', + `verb` varchar(100) NOT NULL DEFAULT '' COMMENT 'ActivityStreams verb', + PRIMARY KEY(`id`), + UNIQUE INDEX `uri-plink-hash` (`uri-plink-hash`), + INDEX `uri` (`uri`(191)), + INDEX `plink` (`plink`(191)), + INDEX `uri-id` (`uri-id`) +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Content for all posts'; + +-- +-- TABLE item-delivery-data +-- +CREATE TABLE IF NOT EXISTS `item-delivery-data` ( + `iid` int unsigned NOT NULL COMMENT 'Item id', + `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', + `inform` mediumtext COMMENT 'Additional receivers of the linked item', + `queue_count` mediumint NOT NULL DEFAULT 0 COMMENT 'Initial number of delivery recipients, used as item.delivery_queue_count', + `queue_done` mediumint NOT NULL DEFAULT 0 COMMENT 'Number of successful deliveries, used as item.delivery_queue_done', + `queue_failed` mediumint NOT NULL DEFAULT 0 COMMENT 'Number of unsuccessful deliveries, used as item.delivery_queue_failed', + `activitypub` mediumint NOT NULL DEFAULT 0 COMMENT 'Number of successful deliveries via ActivityPub', + `dfrn` mediumint NOT NULL DEFAULT 0 COMMENT 'Number of successful deliveries via DFRN', + `legacy_dfrn` mediumint NOT NULL DEFAULT 0 COMMENT 'Number of successful deliveries via legacy DFRN', + `diaspora` mediumint NOT NULL DEFAULT 0 COMMENT 'Number of successful deliveries via Diaspora', + `ostatus` mediumint NOT NULL DEFAULT 0 COMMENT 'Number of successful deliveries via OStatus', + PRIMARY KEY(`iid`) +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Delivery data for items'; + +-- +-- TABLE item-uri +-- +CREATE TABLE IF NOT EXISTS `item-uri` ( + `id` int unsigned NOT NULL auto_increment, + `uri` varbinary(255) NOT NULL COMMENT 'URI of an item', + `guid` varbinary(255) COMMENT 'A unique identifier for an item', + PRIMARY KEY(`id`), + UNIQUE INDEX `uri` (`uri`), + INDEX `guid` (`guid`) +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='URI and GUID for items'; -- -- 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 '', - PRIMARY KEY(`id`) -) DEFAULT COLLATE utf8mb4_general_ci; + `pid` int unsigned NOT NULL DEFAULT 0 COMMENT 'Process ID', + `expires` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'datetime of cache expiration', + PRIMARY KEY(`id`), + INDEX `name_expires` (`name`,`expires`) +) DEFAULT COLLATE utf8mb4_general_ci COMMENT=''; -- -- 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`), INDEX `uri` (`uri`(64)), INDEX `parent-uri` (`parent-uri`(64)), INDEX `contactid` (`contact-id`(32)) -) DEFAULT COLLATE utf8mb4_general_ci; +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='private messages'; -- -- 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 '', @@ -604,24 +775,24 @@ CREATE TABLE IF NOT EXISTS `mailacct` ( `pubmail` boolean NOT NULL DEFAULT '0' COMMENT '', `last_check` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', PRIMARY KEY(`id`) -) DEFAULT COLLATE utf8mb4_general_ci; +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Mail account data for fetching mails'; -- -- 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`), UNIQUE INDEX `uid_mid` (`uid`,`mid`) -) DEFAULT COLLATE utf8mb4_general_ci; +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='table of accounts that can manage each other'; -- -- 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,58 +800,71 @@ 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`), INDEX `uid_date` (`uid`,`date`), INDEX `uid_type_link` (`uid`,`type`,`link`(190)) -) DEFAULT COLLATE utf8mb4_general_ci; +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='notifications'; -- -- 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 '', `receiver-uid` mediumint unsigned NOT NULL DEFAULT 0 COMMENT 'User id', PRIMARY KEY(`id`) -) DEFAULT COLLATE utf8mb4_general_ci; +) DEFAULT COLLATE utf8mb4_general_ci COMMENT=''; -- -- 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; +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='cache for OEmbed queries'; + +-- +-- TABLE openwebauth-token +-- +CREATE TABLE IF NOT EXISTS `openwebauth-token` ( + `id` int unsigned NOT NULL auto_increment COMMENT 'sequential ID', + `uid` mediumint unsigned NOT NULL DEFAULT 0 COMMENT 'User id', + `type` varchar(32) NOT NULL DEFAULT '' COMMENT 'Verify type', + `token` varchar(255) NOT NULL DEFAULT '' COMMENT 'A generated token', + `meta` varchar(255) NOT NULL DEFAULT '' COMMENT '', + `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'datetime of creation', + PRIMARY KEY(`id`) +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Store OpenWebAuth token to verify contacts'; -- -- 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; +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='cache for \'parse_url\' queries'; -- -- TABLE participation @@ -690,8 +874,10 @@ CREATE TABLE IF NOT EXISTS `participation` ( `server` varchar(60) NOT NULL COMMENT '', `cid` int unsigned NOT NULL COMMENT '', `fid` int unsigned NOT NULL COMMENT '', - PRIMARY KEY(`iid`,`server`) -) DEFAULT COLLATE utf8mb4_general_ci; + PRIMARY KEY(`iid`,`server`), + INDEX `cid` (`cid`), + INDEX `fid` (`fid`) +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Storage for participation messages from Diaspora'; -- -- TABLE pconfig @@ -704,22 +890,36 @@ CREATE TABLE IF NOT EXISTS `pconfig` ( `v` mediumtext COMMENT '', PRIMARY KEY(`id`), UNIQUE INDEX `uid_cat_k` (`uid`,`cat`,`k`) -) DEFAULT COLLATE utf8mb4_general_ci; +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='personal (per user) configuration storage'; + +-- +-- TABLE permissionset +-- +CREATE TABLE IF NOT EXISTS `permissionset` ( + `id` int unsigned NOT NULL auto_increment COMMENT 'sequential ID', + `uid` mediumint unsigned NOT NULL DEFAULT 0 COMMENT 'Owner id of this permission set', + `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_allow_cid_allow_gid_deny_cid_deny_gid` (`allow_cid`(50),`allow_gid`(30),`deny_cid`(50),`deny_gid`(30)) +) DEFAULT COLLATE utf8mb4_general_ci COMMENT=''; -- -- 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 +928,13 @@ 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', + `backend-class` tinytext COMMENT 'Storage backend class', + `backend-ref` text COMMENT 'Storage backend data reference', + `updated` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', PRIMARY KEY(`id`), INDEX `contactid` (`contact-id`), INDEX `uid_contactid` (`uid`,`contact-id`), @@ -739,7 +942,7 @@ CREATE TABLE IF NOT EXISTS `photo` ( INDEX `uid_album_scale_created` (`uid`,`album`(32),`scale`,`created`), INDEX `uid_album_resource-id_created` (`uid`,`album`(32),`resource-id`,`created`), INDEX `resource-id` (`resource-id`) -) DEFAULT COLLATE utf8mb4_general_ci; +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='photo storage'; -- -- TABLE poll @@ -759,18 +962,18 @@ CREATE TABLE IF NOT EXISTS `poll` ( `q9` text COMMENT '', PRIMARY KEY(`id`), INDEX `uid` (`uid`) -) DEFAULT COLLATE utf8mb4_general_ci; +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Currently unused table for storing poll results'; -- -- 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`), INDEX `poll_id` (`poll_id`) -) DEFAULT COLLATE utf8mb4_general_ci; +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='data for polls - currently unused'; -- -- TABLE process @@ -781,20 +984,20 @@ CREATE TABLE IF NOT EXISTS `process` ( `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', PRIMARY KEY(`pid`), INDEX `command` (`command`) -) DEFAULT COLLATE utf8mb4_general_ci; +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Currently running system processes'; -- -- 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,64 +1030,49 @@ 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; + INDEX `uid_is-default` (`uid`,`is-default`), + FULLTEXT INDEX `pub_keywords` (`pub_keywords`) +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='user profiles data'; -- -- 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 '', PRIMARY KEY(`id`) -) DEFAULT COLLATE utf8mb4_general_ci; +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='DFRN remote auth use'; -- -- 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 '', `nickname` varchar(255) NOT NULL DEFAULT '' COMMENT '', - `push` tinyint unsigned NOT NULL DEFAULT 0 COMMENT '', - `last_update` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', + `push` tinyint NOT NULL DEFAULT 0 COMMENT 'Retrial counter', + `last_update` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'Date of last successful trial', + `next_try` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'Next retrial date', + `renewed` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'Date of last subscription renewal', `secret` varchar(255) NOT NULL DEFAULT '' COMMENT '', - PRIMARY KEY(`id`) -) DEFAULT COLLATE utf8mb4_general_ci; - --- --- TABLE queue --- -CREATE TABLE IF NOT EXISTS `queue` ( - `id` int unsigned NOT NULL auto_increment COMMENT '', - `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', - `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'Date, when the message was created', - `last` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'Date of last trial', - `next` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'Next retrial date', - `retrial` tinyint NOT NULL DEFAULT 0 COMMENT 'Retrial counter', - `content` mediumtext COMMENT '', - `batch` boolean NOT NULL DEFAULT '0' COMMENT '', PRIMARY KEY(`id`), - INDEX `last` (`last`), - INDEX `next` (`next`) -) DEFAULT COLLATE utf8mb4_general_ci; + INDEX `next_try` (`next_try`) +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Used for OStatus: Contains feed subscribers'; -- -- 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', @@ -892,44 +1080,44 @@ CREATE TABLE IF NOT EXISTS `register` ( `language` varchar(16) NOT NULL DEFAULT '' COMMENT '', `note` text COMMENT '', PRIMARY KEY(`id`) -) DEFAULT COLLATE utf8mb4_general_ci; +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='registrations requiring admin approval'; -- -- 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`), INDEX `uid` (`uid`) -) DEFAULT COLLATE utf8mb4_general_ci; +) DEFAULT COLLATE utf8mb4_general_ci COMMENT=''; -- -- 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 '', PRIMARY KEY(`id`), INDEX `sid` (`sid`(64)), INDEX `expire` (`expire`) -) DEFAULT COLLATE utf8mb4_general_ci; +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='web session storage'; -- -- 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 '', PRIMARY KEY(`id`), UNIQUE INDEX `iid` (`iid`) -) DEFAULT COLLATE utf8mb4_general_ci; +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Diaspora signatures'; -- -- TABLE term @@ -945,24 +1133,24 @@ CREATE TABLE IF NOT EXISTS `term` ( `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', `received` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', `global` boolean NOT NULL DEFAULT '0' COMMENT '', - `aid` int unsigned NOT NULL DEFAULT 0 COMMENT '', `uid` mediumint unsigned NOT NULL DEFAULT 0 COMMENT 'User id', PRIMARY KEY(`tid`), + INDEX `term_type` (`term`(64),`type`), INDEX `oid_otype_type_term` (`oid`,`otype`,`type`,`term`(32)), INDEX `uid_otype_type_term_global_created` (`uid`,`otype`,`type`,`term`(32),`global`,`created`), INDEX `uid_otype_type_url` (`uid`,`otype`,`type`,`url`(64)), INDEX `guid` (`guid`(64)) -) DEFAULT COLLATE utf8mb4_general_ci; +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='item taxonomy (categories, tags, etc.) table'; -- -- 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 '', @@ -973,29 +1161,29 @@ CREATE TABLE IF NOT EXISTS `thread` ( `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 '', `ignored` boolean NOT NULL DEFAULT '0' COMMENT '', - `bookmark` boolean NOT NULL DEFAULT '0' COMMENT '', + `post-type` tinyint unsigned NOT NULL DEFAULT 0 COMMENT 'Post type (personal note, bookmark, ...)', `unseen` boolean NOT NULL DEFAULT '1' COMMENT '', `deleted` boolean NOT NULL DEFAULT '0' COMMENT '', `origin` boolean NOT NULL DEFAULT '0' COMMENT '', `forum_mode` tinyint unsigned NOT NULL DEFAULT 0 COMMENT '', `mention` boolean NOT NULL DEFAULT '0' COMMENT '', `network` char(4) NOT NULL DEFAULT '' COMMENT '', + `bookmark` boolean COMMENT '', PRIMARY KEY(`iid`), INDEX `uid_network_commented` (`uid`,`network`,`commented`), - INDEX `uid_network_created` (`uid`,`network`,`created`), + INDEX `uid_network_received` (`uid`,`network`,`received`), INDEX `uid_contactid_commented` (`uid`,`contact-id`,`commented`), - INDEX `uid_contactid_created` (`uid`,`contact-id`,`created`), + INDEX `uid_contactid_received` (`uid`,`contact-id`,`received`), INDEX `contactid` (`contact-id`), INDEX `ownerid` (`owner-id`), INDEX `authorid` (`author-id`), - INDEX `uid_created` (`uid`,`created`), + INDEX `uid_received` (`uid`,`received`), INDEX `uid_commented` (`uid`,`commented`), - INDEX `uid_wall_created` (`uid`,`wall`,`created`), + INDEX `uid_wall_received` (`uid`,`wall`,`received`), INDEX `private_wall_origin_commented` (`private`,`wall`,`origin`,`commented`) -) DEFAULT COLLATE utf8mb4_general_ci; +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Thread related data'; -- -- TABLE tokens @@ -1008,87 +1196,132 @@ CREATE TABLE IF NOT EXISTS `tokens` ( `scope` varchar(200) NOT NULL DEFAULT '' COMMENT '', `uid` mediumint unsigned NOT NULL DEFAULT 0 COMMENT 'User id', PRIMARY KEY(`id`) -) DEFAULT COLLATE utf8mb4_general_ci; +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='OAuth usage'; -- -- 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)) -) DEFAULT COLLATE utf8mb4_general_ci; +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='The local users'; -- -- 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)) -) DEFAULT COLLATE utf8mb4_general_ci; +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Deleted usernames'; + +-- +-- TABLE user-contact +-- +CREATE TABLE IF NOT EXISTS `user-contact` ( + `cid` int unsigned NOT NULL DEFAULT 0 COMMENT 'Contact id of the linked public contact', + `uid` mediumint unsigned NOT NULL DEFAULT 0 COMMENT 'User id', + `blocked` boolean COMMENT 'Contact is completely blocked for this user', + `ignored` boolean COMMENT 'Posts from this contact are ignored', + `collapsed` boolean COMMENT 'Posts from this contact are collapsed', + PRIMARY KEY(`uid`,`cid`) +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='User specific public contact data'; + +-- +-- TABLE user-item +-- +CREATE TABLE IF NOT EXISTS `user-item` ( + `iid` int unsigned NOT NULL DEFAULT 0 COMMENT 'Item id', + `uid` mediumint unsigned NOT NULL DEFAULT 0 COMMENT 'User id', + `hidden` boolean NOT NULL DEFAULT '0' COMMENT 'Marker to hide an item from the user', + `ignored` boolean COMMENT 'Ignore this thread if set', + PRIMARY KEY(`uid`,`iid`) +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='User specific item data'; + +-- +-- TABLE worker-ipc +-- +CREATE TABLE IF NOT EXISTS `worker-ipc` ( + `key` int NOT NULL COMMENT '', + `jobs` boolean COMMENT 'Flag for outstanding jobs', + PRIMARY KEY(`key`) +) ENGINE=MEMORY DEFAULT COLLATE utf8mb4_general_ci COMMENT='Inter process communication between the frontend and the worker'; -- -- TABLE workerqueue -- CREATE TABLE IF NOT EXISTS `workerqueue` ( `id` int unsigned NOT NULL auto_increment COMMENT 'Auto incremented worker task id', - `parameter` mediumblob COMMENT 'Task command', + `parameter` mediumtext COMMENT 'Task command', `priority` tinyint unsigned NOT NULL DEFAULT 0 COMMENT 'Task priority', `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', + `next_try` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'Next retrial date', + `retrial` tinyint NOT NULL DEFAULT 0 COMMENT 'Retrial counter', + `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)), - INDEX `priority_created` (`priority`,`created`), - INDEX `executed` (`executed`) -) DEFAULT COLLATE utf8mb4_general_ci; + INDEX `done_parameter` (`done`,`parameter`(64)), + INDEX `done_executed` (`done`,`executed`), + INDEX `done_priority_created` (`done`,`priority`,`created`), + INDEX `done_priority_next_try` (`done`,`priority`,`next_try`), + INDEX `done_pid_next_try` (`done`,`pid`,`next_try`), + INDEX `done_pid_priority_created` (`done`,`pid`,`priority`,`created`) +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Background tasks queue entries'; + +-- +-- TABLE storage +-- +CREATE TABLE IF NOT EXISTS `storage` ( + `id` int unsigned NOT NULL auto_increment COMMENT 'Auto incremented image data id', + `data` longblob NOT NULL COMMENT 'file data', + PRIMARY KEY(`id`) +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Data stored by Database storage backend'; diff --git a/doc/Accesskeys.md b/doc/Accesskeys.md index 7434fc0498..9158efd582 100644 --- a/doc/Accesskeys.md +++ b/doc/Accesskeys.md @@ -46,6 +46,7 @@ General * i - Only show ignored contacts * y - Only show archived contacts * h - Only show hidden contacts +* e - Edit contact groups ../contacts (single contact view) ------------------------------- @@ -79,6 +80,7 @@ General ../settings --------- * o - Account +* p - Profiles * t - Additional features * w - Social Networks * l - Addons diff --git a/doc/AddonStorageBackend.md b/doc/AddonStorageBackend.md new file mode 100644 index 0000000000..d42c8bbbd7 --- /dev/null +++ b/doc/AddonStorageBackend.md @@ -0,0 +1,204 @@ +Friendica Storage Backend Addon development +=========================================== + +* [Home](help) + +Storage backends can be added via addons. +A storage backend is implemented as a class, and the plugin register the class to make it avaiable to the system. + +## The Storage Backend Class + +The class must live in `Friendica\Addon\youraddonname` namespace, where `youraddonname` the folder name of your addon. + +The class must implement `Friendica\Model\Storage\IStorage` interface. All method in the interface must be implemented: + +namespace Friendica\Model\Storage; + +```php +interface IStorage +{ + public static function get($ref); + public static function put($data, $ref = ""); + public static function delete($ref); + public static function getOptions(); + public static function saveOptions($data); +} +``` + +- `get($ref)` returns data pointed by `$ref` +- `put($data, $ref)` saves data in `$data` to position `$ref`, or a new position if `$ref` is empty. +- `delete($ref)` delete data pointed by `$ref` + +Each storage backend can have options the admin can set in admin page. + +- `getOptions()` returns an array with details about each option to build the interface. +- `saveOptions($data)` get `$data` from admin page, validate it and save it. + +The array returned by `getOptions()` is defined as: + + [ + 'option1name' => [ ..info.. ], + 'option2name' => [ ..info.. ], + ... + ] + +An empty array can be returned if backend doesn't have any options. + +The info array for each option is defined as: + + [ + 'type', + +define the field used in form, and the type of data. +one of 'checkbox', 'combobox', 'custom', 'datetime', 'input', 'intcheckbox', 'password', 'radio', 'richtext', 'select', 'select_raw', 'textarea', 'yesno' + + 'label', + +Translatable label of the field. This label will be shown in admin page + + value, + +Current value of the option + + 'help text', + +Translatable description for the field. Will be shown in admin page + + extra data + +Optional. Depends on which 'type' this option is: + +- 'select': array `[ value => label ]` of choices +- 'intcheckbox': value of input element +- 'select_raw': prebuild html string of `