diff --git a/.travis.yml b/.travis.yml index 9edb54f0..4e3727a1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,8 @@ language: php php: - - 5.4 - - 5.5 - 5.6 - 7.0 + - 7.1 sudo: false diff --git a/README.markdown b/README.markdown index 0b08f7b9..c1482904 100644 --- a/README.markdown +++ b/README.markdown @@ -29,7 +29,7 @@ check out one of the versioned branches. # Requirements - MySQL/MariaDB 5.1+ (with experimental support for PostgreSQL 9+ and SQLite 3) -- [Stable PHP](https://en.wikipedia.org/wiki/PHP#Release_history) (5.5 as of writing) +- [Stable PHP](https://en.wikipedia.org/wiki/PHP#Release_history) (5.6+ as of writing) - GD or ImageMagick # Installation diff --git a/composer.json b/composer.json index 3bcd4218..be55a2ce 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ ], "require" : { - "php" : ">=5.4.8", + "php" : ">=5.6", "flexihash/flexihash" : "^2.0.0", "ifixit/php-akismet" : "1.*", @@ -29,11 +29,15 @@ "bower-asset/jquery" : "1.12.3", "bower-asset/jquery-timeago" : "1.5.2", - "bower-asset/tablesorter" : "2.0.5", + "bower-asset/tablesorter" : "2.*", "bower-asset/mediaelement" : "2.21.1", "bower-asset/js-cookie" : "2.1.1" }, + "require-dev" : { + "phpunit/phpunit" : "5.*" + }, + "vendor-copy": { "vendor/bower-asset/jquery/dist/jquery.min.js" : "lib/vendor/js/jquery-1.12.3.min.js", "vendor/bower-asset/jquery/dist/jquery.min.map" : "lib/vendor/js/jquery-1.12.3.min.map", diff --git a/composer.lock b/composer.lock index 88b579e2..ba693df2 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "7f3cebcb4b5b802a6e34719d10bbafc7", - "content-hash": "1b9fd588bc2d86a26b1760a6b2041d21", + "content-hash": "d05a90197ed0f471b2a5494e3d612785", "packages": [ { "name": "bower-asset/jquery", @@ -185,16 +184,16 @@ }, { "name": "dapphp/securimage", - "version": "3.6.4", + "version": "3.6.5", "source": { "type": "git", "url": "https://github.com/dapphp/securimage.git", - "reference": "2ed50264ae5541fec8d8c79e4c9b6235a7cfd506" + "reference": "3f5a84fd80b1a35d58332896c944142713a7e802" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dapphp/securimage/zipball/2ed50264ae5541fec8d8c79e4c9b6235a7cfd506", - "reference": "2ed50264ae5541fec8d8c79e4c9b6235a7cfd506", + "url": "https://api.github.com/repos/dapphp/securimage/zipball/3f5a84fd80b1a35d58332896c944142713a7e802", + "reference": "3f5a84fd80b1a35d58332896c944142713a7e802", "shasum": "" }, "require": { @@ -228,7 +227,7 @@ "captcha", "security" ], - "time": "2016-03-04 21:08:00" + "time": "2016-12-04T17:45:57+00:00" }, { "name": "flexihash/flexihash", @@ -281,7 +280,7 @@ ], "description": "Flexihash is a small PHP library which implements consistent hashing", "homepage": "https://github.com/pda/flexihash", - "time": "2016-04-22 21:03:23" + "time": "2016-04-22T21:03:23+00:00" }, { "name": "google/recaptcha", @@ -289,19 +288,19 @@ "source": { "type": "git", "url": "https://github.com/google/recaptcha.git", - "reference": "f3390c376129f84d22734df1f94cc7db25006bbc" + "reference": "6990961e664372ddbed7ebc1cd673da7077552e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/google/recaptcha/zipball/f3390c376129f84d22734df1f94cc7db25006bbc", - "reference": "f3390c376129f84d22734df1f94cc7db25006bbc", + "url": "https://api.github.com/repos/google/recaptcha/zipball/6990961e664372ddbed7ebc1cd673da7077552e5", + "reference": "6990961e664372ddbed7ebc1cd673da7077552e5", "shasum": "" }, "require": { - "php": ">=5.3.2" + "php": ">=5.5" }, "require-dev": { - "phpunit/phpunit": "4.5.*" + "phpunit/phpunit": "^4.8" }, "type": "library", "extra": { @@ -326,7 +325,7 @@ "recaptcha", "spam" ], - "time": "2015-12-28 18:03:30" + "time": "2017-03-09 18:57:45" }, { "name": "ifixit/php-akismet", @@ -378,17 +377,1327 @@ "hashing", "password" ], - "time": "2014-11-20 16:49:30" + "time": "2014-11-20T16:49:30+00:00" + } + ], + "packages-dev": [ + { + "name": "doctrine/instantiator", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "5acd2bd8c2b600ad5cc4c9180ebf0a930604d6a5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/5acd2bd8c2b600ad5cc4c9180ebf0a930604d6a5", + "reference": "5acd2bd8c2b600ad5cc4c9180ebf0a930604d6a5", + "shasum": "" + }, + "require": { + "php": ">=5.3,<8.0-DEV" + }, + "require-dev": { + "athletic/athletic": "~0.1.8", + "ext-pdo": "*", + "ext-phar": "*", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://github.com/doctrine/instantiator", + "keywords": [ + "constructor", + "instantiate" + ], + "time": "2017-02-16 16:15:51" + }, + { + "name": "myclabs/deep-copy", + "version": "1.6.0", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "5a5a9fc8025a08d8919be87d6884d5a92520cefe" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/5a5a9fc8025a08d8919be87d6884d5a92520cefe", + "reference": "5a5a9fc8025a08d8919be87d6884d5a92520cefe", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "doctrine/collections": "1.*", + "phpunit/phpunit": "~4.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "homepage": "https://github.com/myclabs/DeepCopy", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "time": "2017-01-26T22:05:40+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c", + "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c", + "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": "2015-12-27 11:43:31" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "3.1.1", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/8331b5efe816ae05461b7ca1e721c01b46bafb3e", + "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e", + "shasum": "" + }, + "require": { + "php": ">=5.5", + "phpdocumentor/reflection-common": "^1.0@dev", + "phpdocumentor/type-resolver": "^0.2.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": "2016-09-30T07:12:33+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "0.2.1", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb", + "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb", + "shasum": "" + }, + "require": { + "php": ">=5.5", + "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": "2016-11-25T06:54:22+00:00" + }, + { + "name": "phpspec/prophecy", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "abe41cb27f4e4207c6f54a09272969fe55e0bbff" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/abe41cb27f4e4207c6f54a09272969fe55e0bbff", + "reference": "abe41cb27f4e4207c6f54a09272969fe55e0bbff", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": "^5.3|^7.0", + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2", + "sebastian/comparator": "^1.1|^2.0", + "sebastian/recursion-context": "^1.0|^2.0|^3.0" + }, + "require-dev": { + "phpspec/phpspec": "^2.5|^3.2", + "phpunit/phpunit": "^4.8 || ^5.6.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.7.x-dev" + } + }, + "autoload": { + "psr-0": { + "Prophecy\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "time": "2017-03-03 17:09:02" + }, + { + "name": "phpunit/php-code-coverage", + "version": "4.0.x-dev", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "cb9dd0ea37df29fa3c6ae5ac26c3408a7609cb4f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/cb9dd0ea37df29fa3c6ae5ac26c3408a7609cb4f", + "reference": "cb9dd0ea37df29fa3c6ae5ac26c3408a7609cb4f", + "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-03-07 10:28:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/3cc8f69b3028d0f96a9078e6295d86e9bf019be5", + "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5", + "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": "2016-10-03 07:40:28" + }, + { + "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": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "d107f347d368dd8a384601398280c7c608390ab7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/d107f347d368dd8a384601398280c7c608390ab7", + "reference": "d107f347d368dd8a384601398280c7c608390ab7", + "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-03-07 15:42:04" + }, + { + "name": "phpunit/php-token-stream", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "9ddb181faa4a3841fe131c357fd01de75cbb4da9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/9ddb181faa4a3841fe131c357fd01de75cbb4da9", + "reference": "9ddb181faa4a3841fe131c357fd01de75cbb4da9", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-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-03-07 07:36:57" + }, + { + "name": "phpunit/phpunit", + "version": "5.5.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "3e6e88e56c912133de6e99b87728cca7ed70c5f5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3e6e88e56c912133de6e99b87728cca7ed70c5f5", + "reference": "3e6e88e56c912133de6e99b87728cca7ed70c5f5", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-json": "*", + "ext-pcre": "*", + "ext-reflection": "*", + "ext-spl": "*", + "myclabs/deep-copy": "~1.3", + "php": "^5.6 || ^7.0", + "phpspec/prophecy": "^1.3.1", + "phpunit/php-code-coverage": "^4.0.1", + "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.1", + "sebastian/diff": "~1.2", + "sebastian/environment": "^1.3 || ^2.0", + "sebastian/exporter": "~1.2", + "sebastian/global-state": "~1.0", + "sebastian/object-enumerator": "~1.0", + "sebastian/resource-operations": "~1.0", + "sebastian/version": "~1.0|~2.0", + "symfony/yaml": "~2.1|~3.0" + }, + "conflict": { + "phpdocumentor/reflection-docblock": "3.0.2" + }, + "suggest": { + "phpunit/php-invoker": "~1.1" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.5.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": "2016-08-26T07:11:44+00:00" + }, + { + "name": "phpunit/phpunit-mock-objects", + "version": "3.4.x-dev", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", + "reference": "4001a301f86fc006c32f532a741ab613f2bd8990" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/4001a301f86fc006c32f532a741ab613f2bd8990", + "reference": "4001a301f86fc006c32f532a741ab613f2bd8990", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": "^5.6 || ^7.0", + "phpunit/php-text-template": "^1.2", + "sebastian/exporter": "^1.2 || ^2.0" + }, + "conflict": { + "phpunit/phpunit": "<5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.4" + }, + "suggest": { + "ext-soap": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Mock Object library for PHPUnit", + "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", + "keywords": [ + "mock", + "xunit" + ], + "time": "2017-03-07 08:47:31" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "3488be0a7b346cd6e5361510ed07e88f9bea2e88" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/3488be0a7b346cd6e5361510ed07e88f9bea2e88", + "reference": "3488be0a7b346cd6e5361510ed07e88f9bea2e88", + "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-04 10:23:55" + }, + { + "name": "sebastian/comparator", + "version": "1.2.x-dev", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "18a5d97c25f408f48acaf6d1b9f4079314c5996a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/18a5d97c25f408f48acaf6d1b9f4079314c5996a", + "reference": "18a5d97c25f408f48acaf6d1b9f4079314c5996a", + "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-03-07 10:34:43" + }, + { + "name": "sebastian/diff", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "763d7adeb8c35d2af2b04c0f6cafeee059074dfb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/763d7adeb8c35d2af2b04c0f6cafeee059074dfb", + "reference": "763d7adeb8c35d2af2b04c0f6cafeee059074dfb", + "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-03-07 07:26:53" + }, + { + "name": "sebastian/environment", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "144fedf9aa8e3f1c52199f3634eb699cb59741d9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/144fedf9aa8e3f1c52199f3634eb699cb59741d9", + "reference": "144fedf9aa8e3f1c52199f3634eb699cb59741d9", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7 || ^6.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": "2017-03-07 12:59:58" + }, + { + "name": "sebastian/exporter", + "version": "1.2.x-dev", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "dcd43bcc0fd3551bd2ede0081882d549bb78225d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/dcd43bcc0fd3551bd2ede0081882d549bb78225d", + "reference": "dcd43bcc0fd3551bd2ede0081882d549bb78225d", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0", + "sebastian/recursion-context": "^1.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + }, + "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" + }, + { + "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": "2017-02-26 13:09:30" + }, + { + "name": "sebastian/global-state", + "version": "1.1.x-dev", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "cea85a84b00f2795341ebbbca4fa396347f2494e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/cea85a84b00f2795341ebbbca4fa396347f2494e", + "reference": "cea85a84b00f2795341ebbbca4fa396347f2494e", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2|~5.0" + }, + "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": "2017-02-23 14:11:06" + }, + { + "name": "sebastian/object-enumerator", + "version": "1.0.x-dev", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "1a7e888dce73bd3c1deedb345fce00329c75b065" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/1a7e888dce73bd3c1deedb345fce00329c75b065", + "reference": "1a7e888dce73bd3c1deedb345fce00329c75b065", + "shasum": "" + }, + "require": { + "php": ">=5.6", + "sebastian/recursion-context": "~1.0" + }, + "require-dev": { + "phpunit/phpunit": "~5" + }, + "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": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "time": "2016-10-03 07:42:27" + }, + { + "name": "sebastian/recursion-context", + "version": "1.0.x-dev", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/b19cc3298482a335a95f3016d2f8a6950f0fbcd7", + "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "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": "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-10-03 07:41:43" + }, + { + "name": "sebastian/resource-operations", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "fadc83f7c41fb2924e542635fea47ae546816ece" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/fadc83f7c41fb2924e542635fea47ae546816ece", + "reference": "fadc83f7c41fb2924e542635fea47ae546816ece", + "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": "2016-10-03 07:43:09" + }, + { + "name": "sebastian/version", + "version": "dev-master", + "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-03 07:35:21" + }, + { + "name": "symfony/yaml", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "d1abb473764f82339862b114b45b3cd424b2d1a3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/d1abb473764f82339862b114b45b3cd424b2d1a3", + "reference": "d1abb473764f82339862b114b45b3cd424b2d1a3", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "require-dev": { + "symfony/console": "~2.8|~3.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.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": "2017-03-07 16:54:31" + }, + { + "name": "webmozart/assert", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/webmozart/assert.git", + "reference": "4a8bf11547e139e77b651365113fc12850c43d9a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/assert/zipball/4a8bf11547e139e77b651365113fc12850c43d9a", + "reference": "4a8bf11547e139e77b651365113fc12850c43d9a", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "time": "2016-11-23 20:04:41" } ], - "packages-dev": [], "aliases": [], "minimum-stability": "dev", "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=5.4.8" + "php": ">=5.6" }, "platform-dev": [] } diff --git a/core/database.class.php b/core/database.class.php index 27037ab1..40575f33 100644 --- a/core/database.class.php +++ b/core/database.class.php @@ -263,11 +263,34 @@ class SQLite extends DBEngine { // }}} // {{{ cache engines interface CacheEngine { + + /** + * @param string $key + * @return mixed + */ public function get($key); + + /** + * @param string $key + * @param mixed $val + * @param integer $time + * @return void + */ public function set($key, $val, $time=0); + + /** + * @return void + */ public function delete($key); + /** + * @return integer + */ public function get_hits(); + + /** + * @return integer + */ public function get_misses(); } class NoCache implements CacheEngine { @@ -324,7 +347,7 @@ class MemcacheCache implements CacheEngine { /** * @param string $key * @param mixed $val - * @param int $time + * @param integer $time */ public function set($key, $val, $time=0) { assert('!is_null($key)'); @@ -401,6 +424,10 @@ class Database { * @var null|PDO */ private $db = null; + + /** + * @var float + */ public $dbtime = 0.0; /** @@ -509,7 +536,7 @@ class Database { } /** - * @return bool + * @return boolean|null * @throws SCoreException */ public function commit() { @@ -525,7 +552,7 @@ class Database { } /** - * @return bool + * @return boolean|null * @throws SCoreException */ public function rollback() { @@ -566,6 +593,10 @@ class Database { return $this->engine->name; } + /** + * @param null|PDO $db + * @param string $sql + */ private function count_execs($db, $sql, $inputarray) { if ((defined('DEBUG_SQL') && DEBUG_SQL === true) || (!defined('DEBUG_SQL') && @$_GET['DEBUG_SQL'])) { $fp = @fopen("data/sql.log", "a"); @@ -786,35 +817,35 @@ class MockDatabase extends Database { /** * @param string $query * @param array $args - * @return array|PDOStatement + * @return PDOStatement */ public function get_all($query, $args=array()) {return $this->execute($query, $args);} /** * @param string $query * @param array $args - * @return mixed|null|PDOStatement + * @return PDOStatement */ public function get_row($query, $args=array()) {return $this->execute($query, $args);} /** * @param string $query * @param array $args - * @return array|PDOStatement + * @return PDOStatement */ public function get_col($query, $args=array()) {return $this->execute($query, $args);} /** * @param string $query * @param array $args - * @return array|PDOStatement + * @return PDOStatement */ public function get_pairs($query, $args=array()) {return $this->execute($query, $args);} /** * @param string $query * @param array $args - * @return mixed|PDOStatement + * @return PDOStatement */ public function get_one($query, $args=array()) {return $this->execute($query, $args);} diff --git a/core/extension.class.php b/core/extension.class.php index e3931935..dc8a1ccd 100644 --- a/core/extension.class.php +++ b/core/extension.class.php @@ -92,6 +92,9 @@ abstract class Extension { $this->theme = $this->get_theme_object(get_called_class()); } + /** + * @return boolean + */ public function is_live() { global $database; return ( diff --git a/core/imageboard.pack.php b/core/imageboard.pack.php index 0827b411..b21cbf6a 100644 --- a/core/imageboard.pack.php +++ b/core/imageboard.pack.php @@ -175,6 +175,10 @@ class Image { return $images; } + /** + * @param string[] $tags + * @return boolean + */ public function validate_accel($tags) { $yays = 0; $nays = 0; diff --git a/core/util.inc.php b/core/util.inc.php index 1d5460f9..29e525b3 100644 --- a/core/util.inc.php +++ b/core/util.inc.php @@ -8,7 +8,7 @@ require_once "lib/context.php"; /** * Make some data safe for printing into HTML * - * @param $input + * @param string $input * @return string */ function html_escape($input) { @@ -18,7 +18,7 @@ function html_escape($input) { /** * Unescape data that was made safe for printing into HTML * - * @param $input + * @param string $input * @return string */ function html_unescape($input) { @@ -28,7 +28,7 @@ function html_unescape($input) { /** * Make sure some data is safe to be used in integer context * - * @param $input + * @param string $input * @return int */ function int_escape($input) { @@ -42,7 +42,7 @@ function int_escape($input) { /** * Make sure some data is safe to be used in URL context * - * @param $input + * @param string $input * @return string */ function url_escape($input) { @@ -77,7 +77,7 @@ function url_escape($input) { /** * Make sure some data is safe to be used in SQL context * - * @param $input + * @param string $input * @return string */ function sql_escape($input) { @@ -90,7 +90,7 @@ function sql_escape($input) { * Turn all manner of HTML / INI / JS / DB booleans into a PHP one * * @param mixed $input - * @return bool + * @return boolean */ function bool_escape($input) { /* @@ -125,7 +125,7 @@ function bool_escape($input) { * Some functions require a callback function for escaping, * but we might not want to alter the data * - * @param $input + * @param string $input * @return string */ function no_escape($input) { @@ -202,7 +202,7 @@ function truncate($string, $limit, $break=" ", $pad="...") { /** * Turn a human readable filesize into an integer, eg 1KB -> 1024 * - * @param $limit + * @param string|integer $limit * @return int */ function parse_shorthand_int($limit) { @@ -232,7 +232,7 @@ function parse_shorthand_int($limit) { /** * Turn an integer into a human readable filesize, eg 1024 -> 1KB * - * @param $int + * @param integer $int * @return string */ function to_shorthand_int($int) { @@ -254,7 +254,7 @@ function to_shorthand_int($int) { /** * Turn a date into a time, a date, an "X minutes ago...", etc * - * @param $date + * @param string $date * @param bool $html * @return string */ @@ -267,7 +267,7 @@ function autodate($date, $html=true) { /** * Check if a given string is a valid date-time. ( Format: yyyy-mm-dd hh:mm:ss ) * - * @param $dateTime + * @param string $dateTime * @return bool */ function isValidDateTime($dateTime) { @@ -283,7 +283,7 @@ function isValidDateTime($dateTime) { /** * Check if a given string is a valid date. ( Format: yyyy-mm-dd ) * - * @param $date + * @param string $date * @return bool */ function isValidDate($date) { @@ -297,6 +297,9 @@ function isValidDate($date) { return false; } +/** + * @param string[] $inputs + */ function validate_input($inputs) { $outputs = array(); @@ -391,8 +394,8 @@ function validate_input($inputs) { * * FIXME: also check that IP ban ext is installed * - * @param $ip - * @param $ban_reason + * @param string $ip + * @param string $ban_reason * @return string */ function show_ip($ip, $ban_reason) { @@ -616,6 +619,7 @@ function zglob($pattern) { /** * Gets contact link as mailto: or http: + * @return string */ function contact_link() { global $config; @@ -1734,6 +1738,9 @@ function _get_user() { return $user; } +/** + * @return string + */ function _get_query() { return @$_POST["q"]?:@$_GET["q"]; } diff --git a/ext/ban_words/main.php b/ext/ban_words/main.php index 86463306..9d9493d4 100644 --- a/ext/ban_words/main.php +++ b/ext/ban_words/main.php @@ -86,6 +86,12 @@ xanax $event->panel->add_block($sb); } + /** + * Throws if the comment contains banned words. + * @param string $comment + * @param CommentPostingException|SCoreException $ex + * @throws CommentPostingException|SCoreException if the comment contains banned words. + */ private function test_text($comment, $ex) { $comment = strtolower($comment); @@ -105,6 +111,9 @@ xanax } } + /** + * @return string[] + */ private function get_words() { global $config; $words = array(); diff --git a/ext/ouroboros_api/main.php b/ext/ouroboros_api/main.php index 20d27294..8c8a5138 100644 --- a/ext/ouroboros_api/main.php +++ b/ext/ouroboros_api/main.php @@ -59,6 +59,11 @@ class _SafeOuroborosImage * @var integer */ public $width = null; + /** + * File extension + * @var string + */ + public $file_ext = ''; /** * File Size in bytes * @var integer @@ -189,7 +194,7 @@ class _SafeOuroborosImage * Constructor * @param Image $img */ - function __construct(Image $img) + public function __construct(Image $img) { global $config; // author @@ -343,7 +348,7 @@ class _SafeOuroborosTag public $name = ''; public $type = 0; - function __construct(array $tag) + public function __construct(array $tag) { $this->count = $tag['count']; $this->id = $tag['id']; diff --git a/ext/setup/main.php b/ext/setup/main.php index 6bef9dcf..96eaff9f 100644 --- a/ext/setup/main.php +++ b/ext/setup/main.php @@ -157,6 +157,11 @@ class SetupBlock extends Block { $this->body .= "\n"; } + /** + * @param string $name + * @param string[] $options + * @param null|string $label + */ public function add_choice_option($name, $options, $label=null) { global $config; $current = $config->get_string($name); @@ -176,6 +181,11 @@ class SetupBlock extends Block { $this->body .= $html; } + /** + * @param string $name + * @param string[] $options + * @param null|string $label + */ public function add_multichoice_option($name, $options, $label=null) { global $config; $current = $config->get_array($name); diff --git a/ext/tag_editcloud/main.php b/ext/tag_editcloud/main.php index f9325aae..854893bc 100644 --- a/ext/tag_editcloud/main.php +++ b/ext/tag_editcloud/main.php @@ -83,18 +83,6 @@ class TagEditCloud extends Extension { } switch($sort_method) { - case 'a': - case 'p': - default: - $order_by = $sort_method == 'a' ? "tag" : "count DESC"; - $tag_data = $database->get_all(" - SELECT tag, FLOOR(LN(LN(count - :tag_min1 + 1)+1)*150)/200 AS scaled, count - FROM tags - WHERE count >= :tag_min2 - ORDER BY $order_by - LIMIT :limit", - array("tag_min1" => $tags_min, "tag_min2" => $tags_min, "limit" => $max_count)); - break; case 'r': $relevant_tags = array_diff($image->get_tag_array(),$ignore_tags); if(count($relevant_tags) == 0) { @@ -113,6 +101,18 @@ class TagEditCloud extends Extension { LIMIT :limit", array("tag_min1" => $tags_min, "tag_min2" => $tags_min, "limit" => $max_count)); break; + case 'a': + case 'p': + default: + $order_by = $sort_method == 'a' ? "tag" : "count DESC"; + $tag_data = $database->get_all(" + SELECT tag, FLOOR(LN(LN(count - :tag_min1 + 1)+1)*150)/200 AS scaled, count + FROM tags + WHERE count >= :tag_min2 + ORDER BY $order_by + LIMIT :limit", + array("tag_min1" => $tags_min, "tag_min2" => $tags_min, "limit" => $max_count)); + break; } $counter = 1; diff --git a/ext/wiki/main.php b/ext/wiki/main.php index 80837510..cd61a1e4 100644 --- a/ext/wiki/main.php +++ b/ext/wiki/main.php @@ -220,7 +220,7 @@ class Wiki extends Extension { /** * @param string $title - * @param int|null $revision + * @param integer $revision * @return WikiPage */ private function get_page($title, $revision=-1) { diff --git a/install.php b/install.php index 2db9cb12..1efe82ac 100644 --- a/install.php +++ b/install.php @@ -114,6 +114,9 @@ do_install(); // utilities {{{ // TODO: Can some of these be pushed into "core/util.inc.php" ? +/** + * @return int + */ function check_gd_version() { $gdversion = 0; @@ -129,6 +132,9 @@ function check_gd_version() { return $gdversion; } +/** + * @return int + */ function check_im_version() { $convert_check = exec("convert"); @@ -469,6 +475,12 @@ EOD; echo "\n"; } // }}} +/** + * @param boolean $isPDO + * @param string $errorMessage1 + * @param string $errorMessage2 + * @param integer $exitCode + */ function handle_db_errors(/*bool*/ $isPDO, /*str*/ $errorMessage1, /*str*/ $errorMessage2, /*int*/ $exitCode) { $errorMessage1Extra = ($isPDO ? "Please check and ensure that the database configuration options are all correct." : "Please check the server log files for more information."); print <<onUserCreation(new UserCreationEvent("test", "test", "")); } -abstract class ShimmiePHPUnitTestCase extends PHPUnit_Framework_TestCase { +abstract class ShimmiePHPUnitTestCase extends \PHPUnit_Framework_TestCase { protected $backupGlobalsBlacklist = array('database', 'config'); private $images = array(); diff --git a/themes/lite/layout.class.php b/themes/lite/layout.class.php index 9606456a..1728044f 100644 --- a/themes/lite/layout.class.php +++ b/themes/lite/layout.class.php @@ -164,7 +164,7 @@ class Layout { $flash = $page->get_cookie("flash_message"); $flash_html = ""; - if($flash) { + if(!empty($flash)) { $flash_html = "".nl2br(html_escape($flash))." [X]"; } @@ -242,7 +242,7 @@ EOD; /** * @param string $link * @param null|string $desc - * @param array $pages_matched + * @param string[] $pages_matched * @return null|string */ public function navlinks($link, $desc, $pages_matched) {