Compare commits

...

95 Commits

Author SHA1 Message Date
Andy Miller
7843b30796 Merge branch 'release/1.1.3' 2016-08-14 10:50:36 -06:00
Andy Miller
7c42541a0b version update 2016-08-14 10:50:26 -06:00
Andy Miller
ae8ca63fa7 Fix for lightbox exception - #981 2016-08-14 10:42:34 -06:00
Andy Miller
1232ecacf7 Merge branch 'release/1.1.2' 2016-08-11 12:42:55 -06:00
Andy Miller
95f362c9ce Merge branch 'release/1.1.2' into develop 2016-08-11 12:42:55 -06:00
Andy Miller
060b55bc6e version update 2016-08-11 12:42:46 -06:00
Andy Miller
deda94a779 Fix for image not rendering 'id' attribute - #956 2016-08-11 09:56:27 -06:00
Matias Griese
f99f42a979 Debugger: Add support for dumping exceptions 2016-08-11 16:47:47 +03:00
Andy Miller
b3f35fb16e Add ability to look up page mime types from media.yaml - #966 2016-08-10 16:53:58 -06:00
Andy Miller
1c462e8784 quoted redirect rules 2016-08-09 13:33:51 -06:00
Andy Miller
07d95d189c Added logic to not add timestamp on remote references. 2016-08-01 16:20:02 -06:00
Andrew Murray
d8688975a2 Fixed typo (#964)
cheers
2016-07-31 00:06:50 -06:00
Flavio Copes
74f6890ce8 Prevent exception being thrown when calling the Collator constructor failed in a Windows environment with the Intl PHP Extension enabled [#961] 2016-07-27 17:23:01 +02:00
Andy Miller
ab17fb2fdd use Inflector class to hyphenize for consistency and safety 2016-07-22 09:46:52 -06:00
Flavio Copes
2bb6d1d4db Changelog 2016-07-22 17:22:17 +02:00
Flavio Copes
07beafc679 If no parent is set and I call a siblings collection, return a new collection
Fix for a plugins combination issue detailed in
https://github.com/getgrav/grav-plugin-sitemap/issues/22
2016-07-22 17:21:02 +02:00
Flavio Copes
a40c61a8fa Fix #952 hypenize the session name 2016-07-22 15:20:04 +02:00
Flavio Copes
e13ded1a5d Changelog 2016-07-20 17:45:30 +02:00
Flavio Copes
98534bc836 Force SSL on a page if system.force_ssl is enabled (#899)
* Force SSL on a page if system.force_ssl is enabled

* Blueprint for force_ssl option

* Add default false for force_ssl
2016-07-20 17:33:29 +02:00
Flavio Copes
9b673591db Changelog 2016-07-20 15:07:02 +02:00
Benny
496be79aa1 Improved authorize Twig extension (#948) 2016-07-20 15:00:15 +02:00
Djamil Legato
c0fcac3393 Fixed Folder::delete method to recursively remove files and folders and causing Upgrade to fail. 2016-07-19 11:16:13 -07:00
Flavio Copes
4d43812c77 Updated dependencies 2016-07-19 14:43:44 +02:00
Andy Miller
5a65269ef3 Merge branch 'release/1.1.1' into develop 2016-07-16 11:07:57 -06:00
Andy Miller
1a1b29116d Merge branch 'release/1.1.1' 2016-07-16 11:07:56 -06:00
Andy Miller
6e6ff7c0b4 version update 2016-07-16 11:07:45 -06:00
Andy Miller
5871d1a823 Fix for invalid HTML chars and very long site titles #701 2016-07-15 11:44:16 -06:00
Andy Miller
cdb575c1bc updated changelog 2016-07-15 10:02:24 -06:00
Andy Miller
8b6c77b8dd bad nginx.conf 2016-07-15 08:43:00 -06:00
Flavio Copes
704521960e Make paramsRegex static to prevent issue with calling it statically 2016-07-15 11:32:57 +02:00
Andy Miller
231bc816f0 Merge branch 'release/1.1.0' 2016-07-14 14:35:39 -06:00
Andy Miller
95537f3a32 Merge branch 'release/1.1.0' into develop 2016-07-14 14:35:39 -06:00
Andy Miller
82f453ea2f set releases to stable 2016-07-14 14:35:23 -06:00
Andy Miller
b0db8c89dd changed to stable releases 2016-07-14 14:33:17 -06:00
Andy Miller
3594e000b2 Merge branch 'release/1.1.0' into develop 2016-07-14 12:03:32 -06:00
Andy Miller
f8adf87544 Merge branch 'release/1.1.0' 2016-07-14 12:03:31 -06:00
Andy Miller
b193fcd2ed version update 2016-07-14 12:03:21 -06:00
Andy Miller
6dfa1542fb updated versions 2016-07-13 17:13:03 -06:00
Andy Miller
2282d2c69c Fixed up the languages 2016-07-13 17:07:08 -06:00
Andy Miller
5a1d1a7622 Added Luxembourgish back to language codes 2016-07-13 16:22:41 -06:00
Andy Miller
6c042b4804 Unified PHP code header styling 2016-07-11 16:07:14 -06:00
Andy Miller
9b7b953684 Merge branch 'develop' of https://github.com/getgrav/grav into develop 2016-07-11 13:20:01 -06:00
Andy Miller
0d8c69b615 updated changelog 2016-07-11 13:19:43 -06:00
Flavio Copes
29f6da675d Cache images loaded from the route (when cache is enabled) (#905)
* Cache images loaded from the route (when cache is enabled)

* Use GMT instead of +0000 as used in DATE_RFC1123 format
2016-07-11 13:13:25 -06:00
Tyler Cosgrove
8e7cc01e75 Add user to config (#913) 2016-07-11 13:08:42 -06:00
Benny
1fb2d7333c Feature: Better assets pipelining (#917)
* Add smart assets pipeline generation

* Drop cache key

* Fix absolute path generation in `buildLocalLink`

* Add unit test case
2016-07-11 13:06:05 -06:00
Djamil Legato
3529d19c8f Added support for validation of multiple email in the type: email field (grav-plugin-email#31) 2016-07-05 16:32:05 -07:00
Flavio Copes
a6eef19297 Default getUpdatable to both plugins and themes
Was modified in https://github.com/getgrav/grav/pull/921 and caused an
error in Admin as the signature changed, restore original functionality
by default
2016-07-04 14:30:50 +02:00
Flavio Copes
6a169bf5f4 Fix https://github.com/getgrav/grav-plugin-admin/issues/682 saving a user when it's not yet created 2016-07-04 14:16:48 +02:00
Jean-Philippe Dépigny
05da8e90bf Feature/more options gpm #892 (#921)
* add options to updateCommand in order to update only themes or plugins

* Fix typo in options comments

* refactor updateCommande and getUpdatable method in order to handle no options (plugins or themes)

* fix PSR-2 typo
2016-07-01 15:28:44 +02:00
Jean-Philippe Dépigny
c5b5423d5c add ext-zip requirement (#922) 2016-07-01 13:51:35 +02:00
Flavio Copes
10212a310f Update CONTRIBUTING.md 2016-06-29 08:39:46 +02:00
Flavio Copes
943d2c9892 Fix backend validation for file fields marked as required
Fixes https://github.com/getgrav/grav-plugin-form/issues/78
2016-06-28 13:32:39 +02:00
Andy Miller
ce499c795b version update 2016-06-21 17:51:07 +01:00
Flavio Copes
3d53166651 Changelog 2016-06-20 18:54:36 +02:00
Flavio Copes
1bf4428752 Fix params regex not taking into consideration param separators other than : 2016-06-20 18:51:57 +02:00
Flavio Copes
d1cb75b6a2 Add a onPageFallBackUrl event when starting the fallbackUrl() method
Use case: allow to password-protect page media too via the Login plugin
2016-06-17 19:31:12 +02:00
Andy Miller
ac67fb7337 Switching back to more stable cache key #906 2016-06-17 16:30:42 +01:00
Benny
59bbaa5f33 Respect enable_asset_timestamp settings for pipelined Assets (#906)
* Respect `enable_assets_timestamp` settings for pipelined Assets

* Add a timestamp to the name generation process in `pipelineCss` and `pipelineJs`

* Compute uid for `pipelineCss` and `pipelineJs` on assets and on timestamp
2016-06-16 22:02:58 +01:00
Benny
f845943c47 Optimize PR #902 (#908) 2016-06-16 16:24:56 +02:00
Artyom Mezin
f8964ab908 Remove end date check if not specified (better 32-bit support) (#902)
* Remove end date check if not specified (better 32-bit support)

Related to https://github.com/getgrav/grav/issues/898

I can't find better way to remove it with DRY principle 😑
With smaller code we need to check a value for each `$this->items` iteration.

Also it can be used with `PHP_INT_MAX` with previous version of this code.

* Include endpoints
2016-06-15 09:19:17 +02:00
Andy Miller
fedf7f0903 version updates 2016-06-14 18:13:10 +01:00
Andy Miller
6e516e8971 updated changelog 2016-06-11 22:32:10 +01:00
Andy Miller
d42786484f Pass the exception to the onFatalException() event 2016-06-11 22:27:34 +01:00
Flavio Copes
dbb9725567 restore require-rev 2016-06-10 14:38:53 +02:00
Flavio Copes
b5cfca1ba1 composer update 2016-06-10 13:03:32 +02:00
Flavio Copes
5931857416 Feature/cache fixes (#887)
* Add redis to the list. Add back memcached

* Add configuration options for memcache, memcached, redis

* Add Memcached implementation
2016-06-10 11:35:12 +02:00
Joel Handwell
18d320f72e Update broken link for Doctrine Cache (#886) 2016-06-09 08:49:04 +02:00
Benny
0e0ed38168 Fix Utils::normalizePath() truncating zeros out of path (#882)
good fix! cheers.
2016-06-06 13:01:28 -06:00
Flavio Copes
2ba1875cc1 Update to jQuery 2.2.4 2016-06-06 11:26:22 +02:00
Andy Miller
baacfa794a Updated nginx configuration 2016-06-03 11:21:35 -06:00
Andy Miller
ef456888f8 Added various ways to get and set the css/js/collections . This should allow full control of manipulating assets via plugins. #876 2016-06-02 18:05:24 -06:00
Andy Miller
858fbbe41c Fixed a couple of missed references to new media.types 2016-06-02 14:55:37 -06:00
Andy Miller
ee567fc1dc Moved media list items into an types: key. 2016-06-02 14:50:22 -06:00
Andy Miller
7b6cadbeeb Merge branch 'release/1.0.10' 2016-02-11 15:37:25 -07:00
Andy Miller
652c5cd4bd Merge branch 'release/1.0.9' 2016-02-05 16:00:22 -07:00
Andy Miller
b48449d782 Merge branch 'release/1.0.8' 2016-01-08 15:31:33 -07:00
Andy Miller
8ca14c7c65 Merge branch 'release/1.0.7' 2016-01-07 14:21:56 -07:00
Andy Miller
4549574908 Merge branch 'release/1.0.7' 2016-01-07 13:27:01 -07:00
Andy Miller
f0145aa659 Merge branch 'release/1.0.6' 2015-12-22 17:15:44 -07:00
Andy Miller
08cbd9553f Merge branch 'release/1.0.5' 2015-12-18 16:50:33 -07:00
Andy Miller
747daa46f1 Merge branch 'release/1.0.4' 2015-12-12 13:03:34 -07:00
Andy Miller
4a5a400b89 Merge branch 'release/1.0.3' 2015-12-11 21:52:41 -07:00
Djamil Legato
fcdd0bc0e9 Reverted CleanCommand to pure Command 2015-12-11 20:19:57 -07:00
Andy Miller
f7696b61d3 Merge branch 'release/1.0.2' 2015-12-11 18:51:36 -07:00
Andy Miller
2bb23efa7c Merge branch 'release/1.0.1' 2015-12-11 15:38:45 -07:00
Andy Miller
e4e0c06ea8 Merge branch 'release/1.0.0' 2015-12-11 14:00:21 -07:00
Andy Miller
dba7347c1e Merge branch 'release/1.0.0-rc.6' 2015-12-01 13:13:16 -07:00
Andy Miller
50c6e81c09 Merge branch 'release/1.0.0-rc.5' 2015-11-20 17:54:39 -07:00
Andy Miller
e62ff07726 Merge branch 'release/1.0.0-rc.4' 2015-10-29 22:11:19 -06:00
Andy Miller
695793b752 Merge branch 'release/1.0.0-rc.4' 2015-10-29 21:53:48 -06:00
Andy Miller
8de55a745d Merge branch 'release/1.0.0-rc.3' 2015-10-29 14:08:38 -06:00
Andy Miller
8bba0fd332 Merge branch 'release/1.0.0-rc.2' 2015-10-27 14:47:43 -06:00
Andy Miller
a7a5625a8b Revert "Added CSS Group asset support #374"
This reverts commit f65633043a.
2015-10-24 12:19:47 -06:00
Andy Miller
f65633043a Added CSS Group asset support #374 2015-10-24 12:18:54 -06:00
170 changed files with 3171 additions and 1045 deletions

View File

@@ -1,3 +1,75 @@
# v1.1.3
## 08/14/2016
1. [](#bugfix)
* Fix for lightbox media function throwing error [#981](https://github.com/getgrav/grav/issues/981)
# v1.1.2
## 08/10/2016
1. [](#new)
* Allow forcing SSL by setting `system.force_ssl` (Force SSL in the Admin System Config) [#899](https://github.com/getgrav/grav/pull/899)
1. [](#improved)
* Improved `authorize` Twig extension to accept a nested array of authorizations [#948](https://github.com/getgrav/grav/issues/948)
* Don't add timestamps on remote assets as it can cause conflicts
* Grav now looks at types from `media.yaml` when retrieving page mime types [#966](https://github.com/getgrav/grav/issues/966)
* Added support for dumping exceptions in the Debugger
1. [](#bugfix)
* Fixed `Folder::delete` method to recursively remove files and folders and causing Upgrade to fail.
* Fix [#952](https://github.com/getgrav/grav/issues/952) hyphenize the session name.
* If no parent is set and siblings collection is called, return a new and empty collection [grav-plugin-sitemap/issues/22](https://github.com/getgrav/grav-plugin-sitemap/issues/22)
* Prevent exception being thrown when calling the Collator constructor failed in a Windows environment with the Intl PHP Extension enabled [#961](https://github.com/getgrav/grav/issues/961)
* Fix for markdown images not properly rendering `id` attribute [#956](https://github.com/getgrav/grav/issues/956)
# v1.1.1
## 07/16/2016
1. [](#improved)
* Made `paramsRegex()` static to allow it to be called statically
1. [](#bugfix)
* Fixed backup when using very long site titles with invalid characters [grav-plugin-admin#701](https://github.com/getgrav/grav-plugin-admin/issues/701)
* Fixed a typo in the `webserver-configs/nginx.conf` example
# v1.1.0
## 07/14/2016
1. [](#improved)
* Added support for validation of multiple email in the `type: email` field [grav-plugin-email#31](https://github.com/getgrav/grav-plugin-email/issues/31)
* Unified PHP code header styling
* Added 6 more languages and updated language codes
* set default "releases" option to `stable`
1. [](#bugfix)
* Fix backend validation for file fields marked as required [grav-plugin-form#78](https://github.com/getgrav/grav-plugin-form/issues/78)
# v1.1.0-rc.3
## 06/21/2016
1. [](#new)
* Add a onPageFallBackUrl event when starting the fallbackUrl() method to allow the Login plugin to protect the page media
* Conveniently allow ability to retrieve user information via config object [#913](https://github.com/getgrav/grav/pull/913) - @Vivalldi
* Grav served images can now use header caching [#905](https://github.com/getgrav/grav/pull/905)
1. [](#improved)
* Take asset modification timestamp into consideration in pipelining [#917](https://github.com/getgrav/grav/pull/917) - @Sommerregen
1. [](#bugfix)
* Respect `enable_asset_timestamp` settings for pipelined Assets [#906](https://github.com/getgrav/grav/issues/906)
* Fixed collections end dates for 32-bit systems [#902](https://github.com/getgrav/grav/issues/902)
* Fixed a recent regression (1.1.0-rc1) with parameter separator different than `:`
# v1.1.0-rc.2
## 06/14/2016
1. [](#new)
* Added getters and setters for Assets to allow manipulation of CSS/JS/Collection based assets via plugins [#876](https://github.com/getgrav/grav/issues/876)
1. [](#improved)
* Pass the exception to the `onFatalException()` event
* Updated to latest jQuery 2.2.4 release
* Moved list items in `system/config/media.yaml` config into a `types:` key which allows you delete default items.
* Updated `webserver-configs/nginx.conf` with `try_files` fix from @mrhein and @rondlite [#743](https://github.com/getgrav/grav/pull/743)
* Updated cache references to include `memecache` and `redis` [#887](https://github.com/getgrav/grav/issues/887)
* Updated composer libraries
1. [](#bugfix)
* Fixed `Utils::normalizePath()` that was truncating 0's [#882](https://github.com/getgrav/grav/issues/882)
# v1.1.0-rc.1 # v1.1.0-rc.1
## 06/01/2016 ## 06/01/2016
@@ -768,7 +840,7 @@
* Improved query string handling * Improved query string handling
* Optimization to image handling supporting URL encoded filenames * Optimization to image handling supporting URL encoded filenames
* Use global `composer` when available rather than Grv provided one * Use global `composer` when available rather than Grv provided one
* Use `PHP_BINARY` contant rather than `php` executable * Use `PHP_BINARY` constant rather than `php` executable
* Updated Doctrine Cache library * Updated Doctrine Cache library
* Updated Symfony libraries * Updated Symfony libraries
* Moved `convertUrl()` method to Uri object * Moved `convertUrl()` method to Uri object

View File

@@ -55,6 +55,8 @@ Guidelines for bug reports:
6. **Isolate the problem** — create a [reduced test 6. **Isolate the problem** — create a [reduced test
case](http://css-tricks.com/reduced-test-cases/) and provide a step-by-step instruction set on how to recreate the problem. Include code samples, page snippets or yaml configurations if needed. case](http://css-tricks.com/reduced-test-cases/) and provide a step-by-step instruction set on how to recreate the problem. Include code samples, page snippets or yaml configurations if needed.
7. **Check the problem on Grav 1.1** — if you're using Grav 1.0, latest stable release, please also check if you can replicate the issue on Grav 1.1 RC as many bugs are already solved in the next Grav release.
A good bug report shouldn't leave others needing to chase you up for more A good bug report shouldn't leave others needing to chase you up for more
information. Please try to be as detailed as possible in your report. information. Please try to be as detailed as possible in your report.
@@ -119,4 +121,4 @@ accurate comments, etc.) and any other requirements.
See [Using Pull Request](https://help.github.com/articles/using-pull-requests/) and [Fork a Repo](https://help.github.com/articles/fork-a-repo/) if you're not familiar with Pull Requests. See [Using Pull Request](https://help.github.com/articles/using-pull-requests/) and [Fork a Repo](https://help.github.com/articles/fork-a-repo/) if you're not familiar with Pull Requests.
**IMPORTANT**: By submitting a patch, you agree to allow the project owner to **IMPORTANT**: By submitting a patch, you agree to allow the project owner to
license your work under the same license as that used by the project. license your work under the same license as that used by the project.

View File

@@ -10,7 +10,7 @@ The underlying architecture of Grav is designed to use well-established and _bes
* [Markdown](http://en.wikipedia.org/wiki/Markdown): for easy content creation * [Markdown](http://en.wikipedia.org/wiki/Markdown): for easy content creation
* [YAML](http://yaml.org): for simple configuration * [YAML](http://yaml.org): for simple configuration
* [Parsedown](http://parsedown.org/): for fast Markdown and Markdown Extra support * [Parsedown](http://parsedown.org/): for fast Markdown and Markdown Extra support
* [Doctrine Cache](http://docs.doctrine-project.org/en/2.0.x/reference/caching.html): layer for performance * [Doctrine Cache](http://doctrine-orm.readthedocs.io/projects/doctrine-orm/en/latest/reference/caching.html): layer for performance
* [Pimple Dependency Injection Container](http://pimple.sensiolabs.org/): for extensibility and maintainability * [Pimple Dependency Injection Container](http://pimple.sensiolabs.org/): for extensibility and maintainability
* [Symfony Event Dispatcher](http://symfony.com/doc/current/components/event_dispatcher/introduction.html): for plugin event handling * [Symfony Event Dispatcher](http://symfony.com/doc/current/components/event_dispatcher/introduction.html): for plugin event handling
* [Symfony Console](http://symfony.com/doc/current/components/console/introduction.html): for CLI interface * [Symfony Console](http://symfony.com/doc/current/components/console/introduction.html): for CLI interface

View File

@@ -26,7 +26,8 @@
"maximebf/debugbar": "~1.10", "maximebf/debugbar": "~1.10",
"ext-mbstring": "*", "ext-mbstring": "*",
"ext-openssl": "*", "ext-openssl": "*",
"ext-curl": "*" "ext-curl": "*",
"ext-zip": "*"
}, },
"require-dev": { "require-dev": {
"codeception/codeception": "^2.1", "codeception/codeception": "^2.1",

477
composer.lock generated
View File

@@ -4,8 +4,8 @@
"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#composer-lock-the-lock-file",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"hash": "9c19c674a6ce22978364e1327bab1bbd", "hash": "65cd6cc2a20addb345acc1f84d5ae3ab",
"content-hash": "4b371a1eaef8d32d9ce9536c7c317625", "content-hash": "0ddb599b8e9fb7f0fb76619343180ef9",
"packages": [ "packages": [
{ {
"name": "doctrine/cache", "name": "doctrine/cache",
@@ -367,16 +367,16 @@
}, },
{ {
"name": "matthiasmullie/minify", "name": "matthiasmullie/minify",
"version": "1.3.34", "version": "1.3.35",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/matthiasmullie/minify.git", "url": "https://github.com/matthiasmullie/minify.git",
"reference": "272e46113404f66ced256659552a0cc074a7810f" "reference": "3253a81d07cd01afcb651e309900d8ad58a052da"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/matthiasmullie/minify/zipball/272e46113404f66ced256659552a0cc074a7810f", "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/3253a81d07cd01afcb651e309900d8ad58a052da",
"reference": "272e46113404f66ced256659552a0cc074a7810f", "reference": "3253a81d07cd01afcb651e309900d8ad58a052da",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -419,7 +419,7 @@
"minifier", "minifier",
"minify" "minify"
], ],
"time": "2016-03-01 08:00:27" "time": "2016-06-09 19:35:54"
}, },
{ {
"name": "matthiasmullie/path-converter", "name": "matthiasmullie/path-converter",
@@ -533,16 +533,16 @@
}, },
{ {
"name": "monolog/monolog", "name": "monolog/monolog",
"version": "1.19.0", "version": "1.20.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/Seldaek/monolog.git", "url": "https://github.com/Seldaek/monolog.git",
"reference": "5f56ed5212dc509c8dc8caeba2715732abb32dbf" "reference": "55841909e2bcde01b5318c35f2b74f8ecc86e037"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/5f56ed5212dc509c8dc8caeba2715732abb32dbf", "url": "https://api.github.com/repos/Seldaek/monolog/zipball/55841909e2bcde01b5318c35f2b74f8ecc86e037",
"reference": "5f56ed5212dc509c8dc8caeba2715732abb32dbf", "reference": "55841909e2bcde01b5318c35f2b74f8ecc86e037",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -561,8 +561,8 @@
"php-console/php-console": "^3.1.3", "php-console/php-console": "^3.1.3",
"phpunit/phpunit": "~4.5", "phpunit/phpunit": "~4.5",
"phpunit/phpunit-mock-objects": "2.3.0", "phpunit/phpunit-mock-objects": "2.3.0",
"raven/raven": "^0.13",
"ruflin/elastica": ">=0.90 <3.0", "ruflin/elastica": ">=0.90 <3.0",
"sentry/sentry": "^0.13",
"swiftmailer/swiftmailer": "~5.3" "swiftmailer/swiftmailer": "~5.3"
}, },
"suggest": { "suggest": {
@@ -574,9 +574,9 @@
"mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver", "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-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", "php-console/php-console": "Allow sending log messages to Google Chrome",
"raven/raven": "Allow sending log messages to a Sentry server",
"rollbar/rollbar": "Allow sending log messages to Rollbar", "rollbar/rollbar": "Allow sending log messages to Rollbar",
"ruflin/elastica": "Allow sending log messages to an Elastic Search server" "ruflin/elastica": "Allow sending log messages to an Elastic Search server",
"sentry/sentry": "Allow sending log messages to a Sentry server"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
@@ -607,7 +607,7 @@
"logging", "logging",
"psr-3" "psr-3"
], ],
"time": "2016-04-12 18:29:35" "time": "2016-07-02 14:02:10"
}, },
{ {
"name": "pimple/pimple", "name": "pimple/pimple",
@@ -743,16 +743,16 @@
}, },
{ {
"name": "symfony/console", "name": "symfony/console",
"version": "v2.8.6", "version": "v2.8.8",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/console.git", "url": "https://github.com/symfony/console.git",
"reference": "48221d3de4dc22d2cd57c97e8b9361821da86609" "reference": "c392a6ec72f2122748032c2ad6870420561ffcfa"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/48221d3de4dc22d2cd57c97e8b9361821da86609", "url": "https://api.github.com/repos/symfony/console/zipball/c392a6ec72f2122748032c2ad6870420561ffcfa",
"reference": "48221d3de4dc22d2cd57c97e8b9361821da86609", "reference": "c392a6ec72f2122748032c2ad6870420561ffcfa",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -799,20 +799,20 @@
], ],
"description": "Symfony Console Component", "description": "Symfony Console Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2016-04-26 12:00:47" "time": "2016-06-29 07:02:14"
}, },
{ {
"name": "symfony/event-dispatcher", "name": "symfony/event-dispatcher",
"version": "v2.8.6", "version": "v2.8.8",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/event-dispatcher.git", "url": "https://github.com/symfony/event-dispatcher.git",
"reference": "a158f13992a3147d466af7a23b564ac719a4ddd8" "reference": "b180b70439dca70049b6b9b7e21d75e6e5d7aca9"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/a158f13992a3147d466af7a23b564ac719a4ddd8", "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/b180b70439dca70049b6b9b7e21d75e6e5d7aca9",
"reference": "a158f13992a3147d466af7a23b564ac719a4ddd8", "reference": "b180b70439dca70049b6b9b7e21d75e6e5d7aca9",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -859,7 +859,7 @@
], ],
"description": "Symfony EventDispatcher Component", "description": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2016-05-03 18:59:18" "time": "2016-06-29 05:29:29"
}, },
{ {
"name": "symfony/polyfill-iconv", "name": "symfony/polyfill-iconv",
@@ -981,16 +981,16 @@
}, },
{ {
"name": "symfony/var-dumper", "name": "symfony/var-dumper",
"version": "v2.8.6", "version": "v2.8.8",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/var-dumper.git", "url": "https://github.com/symfony/var-dumper.git",
"reference": "7528e78e0d7c78650a41fc011ac9f152bdf4c2b3" "reference": "eb21798f1cd2d3a1c1e1e4d0632b6d04a798f210"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/7528e78e0d7c78650a41fc011ac9f152bdf4c2b3", "url": "https://api.github.com/repos/symfony/var-dumper/zipball/eb21798f1cd2d3a1c1e1e4d0632b6d04a798f210",
"reference": "7528e78e0d7c78650a41fc011ac9f152bdf4c2b3", "reference": "eb21798f1cd2d3a1c1e1e4d0632b6d04a798f210",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -1040,20 +1040,20 @@
"debug", "debug",
"dump" "dump"
], ],
"time": "2016-04-25 11:17:03" "time": "2016-06-29 05:29:29"
}, },
{ {
"name": "symfony/yaml", "name": "symfony/yaml",
"version": "v2.8.6", "version": "v2.8.8",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/yaml.git", "url": "https://github.com/symfony/yaml.git",
"reference": "e4fbcc65f90909c999ac3b4dfa699ee6563a9940" "reference": "dba4bb5846798cd12f32e2d8f3f35d77045773c8"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/e4fbcc65f90909c999ac3b4dfa699ee6563a9940", "url": "https://api.github.com/repos/symfony/yaml/zipball/dba4bb5846798cd12f32e2d8f3f35d77045773c8",
"reference": "e4fbcc65f90909c999ac3b4dfa699ee6563a9940", "reference": "dba4bb5846798cd12f32e2d8f3f35d77045773c8",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -1089,7 +1089,7 @@
], ],
"description": "Symfony Yaml Component", "description": "Symfony Yaml Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2016-03-29 19:00:15" "time": "2016-06-29 05:29:29"
}, },
{ {
"name": "twig/twig", "name": "twig/twig",
@@ -1155,20 +1155,79 @@
], ],
"packages-dev": [ "packages-dev": [
{ {
"name": "codeception/codeception", "name": "behat/gherkin",
"version": "2.1.9", "version": "v4.4.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/Codeception/Codeception.git", "url": "https://github.com/Behat/Gherkin.git",
"reference": "8a24ed556b8d6a9d795d052e9074e8483cb7c15f" "reference": "1576b485c0f92ef6d27da9c4bbfc57ee30cf6911"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/Codeception/Codeception/zipball/8a24ed556b8d6a9d795d052e9074e8483cb7c15f", "url": "https://api.github.com/repos/Behat/Gherkin/zipball/1576b485c0f92ef6d27da9c4bbfc57ee30cf6911",
"reference": "8a24ed556b8d6a9d795d052e9074e8483cb7c15f", "reference": "1576b485c0f92ef6d27da9c4bbfc57ee30cf6911",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.1"
},
"require-dev": {
"phpunit/phpunit": "~4.0",
"symfony/yaml": "~2.1"
},
"suggest": {
"symfony/yaml": "If you want to parse features, represented in YAML files"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.4-dev"
}
},
"autoload": {
"psr-0": {
"Behat\\Gherkin": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Konstantin Kudryashov",
"email": "ever.zet@gmail.com",
"homepage": "http://everzet.com"
}
],
"description": "Gherkin DSL parser for PHP 5.3",
"homepage": "http://behat.org/",
"keywords": [
"BDD",
"Behat",
"Cucumber",
"DSL",
"gherkin",
"parser"
],
"time": "2015-12-30 14:47:00"
},
{
"name": "codeception/codeception",
"version": "2.2.2",
"source": {
"type": "git",
"url": "https://github.com/Codeception/Codeception.git",
"reference": "8d80bb4ec7470e8df5de0e4c401785bc3fa1f4f6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Codeception/Codeception/zipball/8d80bb4ec7470e8df5de0e4c401785bc3fa1f4f6",
"reference": "8d80bb4ec7470e8df5de0e4c401785bc3fa1f4f6",
"shasum": ""
},
"require": {
"behat/gherkin": "~4.4.0",
"ext-json": "*", "ext-json": "*",
"ext-mbstring": "*", "ext-mbstring": "*",
"facebook/webdriver": ">=1.0.1 <2.0", "facebook/webdriver": ">=1.0.1 <2.0",
@@ -1176,30 +1235,37 @@
"guzzlehttp/psr7": "~1.0", "guzzlehttp/psr7": "~1.0",
"php": ">=5.4.0 <8.0", "php": ">=5.4.0 <8.0",
"phpunit/php-code-coverage": ">=2.1.3", "phpunit/php-code-coverage": ">=2.1.3",
"phpunit/phpunit": ">4.8.20 <6.0", "phpunit/phpunit": ">4.8.20 <5.5",
"symfony/browser-kit": ">=2.5 <3.2", "sebastian/comparator": "~1.1",
"symfony/console": ">=2.5 <3.2", "sebastian/diff": "^1.4",
"symfony/css-selector": ">=2.5 <3.2", "symfony/browser-kit": ">=2.7 <4.0",
"symfony/dom-crawler": ">=2.5 <3.2", "symfony/console": ">=2.7 <4.0",
"symfony/event-dispatcher": ">=2.5 <3.2", "symfony/css-selector": ">=2.7 <4.0",
"symfony/finder": ">=2.5 <3.2", "symfony/dom-crawler": ">=2.7 <4.0",
"symfony/yaml": ">=2.5 <3.2" "symfony/event-dispatcher": ">=2.7 <4.0",
"symfony/finder": ">=2.7 <4.0",
"symfony/yaml": ">=2.7 <4.0"
}, },
"require-dev": { "require-dev": {
"codeception/specify": "~0.3", "codeception/specify": "~0.3",
"facebook/php-sdk-v4": "~5.0", "facebook/php-sdk-v4": "~5.0",
"flow/jsonpath": "~0.2", "flow/jsonpath": "~0.2",
"league/factory-muffin": "^3.0",
"league/factory-muffin-faker": "^1.0",
"mongodb/mongodb": "^1.0",
"monolog/monolog": "~1.8", "monolog/monolog": "~1.8",
"pda/pheanstalk": "~2.0", "pda/pheanstalk": "~3.0",
"php-amqplib/php-amqplib": "~2.4", "php-amqplib/php-amqplib": "~2.4",
"predis/predis": "^1.0",
"squizlabs/php_codesniffer": "~2.0" "squizlabs/php_codesniffer": "~2.0"
}, },
"suggest": { "suggest": {
"codeception/phpbuiltinserver": "Extension to start and stop PHP built-in web server for your tests",
"codeception/specify": "BDD-style code blocks", "codeception/specify": "BDD-style code blocks",
"codeception/verify": "BDD-style assertions", "codeception/verify": "BDD-style assertions",
"monolog/monolog": "Log test steps", "flow/jsonpath": "For using JSONPath in REST module",
"phpseclib/phpseclib": "Extension required to use the SFTP option in the FTP Module.", "league/factory-muffin": "For DataFactory module",
"league/factory-muffin-faker": "For Faker support in DataFactory module",
"phpseclib/phpseclib": "for SFTP option in FTP Module",
"symfony/phpunit-bridge": "For phpunit-bridge support" "symfony/phpunit-bridge": "For phpunit-bridge support"
}, },
"bin": [ "bin": [
@@ -1235,7 +1301,7 @@
"functional testing", "functional testing",
"unit testing" "unit testing"
], ],
"time": "2016-05-30 23:06:07" "time": "2016-06-29 00:59:28"
}, },
{ {
"name": "doctrine/instantiator", "name": "doctrine/instantiator",
@@ -1293,19 +1359,20 @@
}, },
{ {
"name": "facebook/webdriver", "name": "facebook/webdriver",
"version": "1.1.1", "version": "1.1.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/facebook/php-webdriver.git", "url": "https://github.com/facebook/php-webdriver.git",
"reference": "1c98108ba3eb435b681655764de11502a0653705" "reference": "0b889d7de7461439f8a3bbcca46e0f696cb27986"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/facebook/php-webdriver/zipball/1c98108ba3eb435b681655764de11502a0653705", "url": "https://api.github.com/repos/facebook/php-webdriver/zipball/0b889d7de7461439f8a3bbcca46e0f696cb27986",
"reference": "1c98108ba3eb435b681655764de11502a0653705", "reference": "0b889d7de7461439f8a3bbcca46e0f696cb27986",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"ext-curl": "*",
"php": ">=5.3.19" "php": ">=5.3.19"
}, },
"require-dev": { "require-dev": {
@@ -1332,7 +1399,7 @@
"selenium", "selenium",
"webdriver" "webdriver"
], ],
"time": "2015-12-31 15:58:49" "time": "2016-06-04 00:02:34"
}, },
{ {
"name": "fzaninotto/faker", "name": "fzaninotto/faker",
@@ -1384,27 +1451,27 @@
}, },
{ {
"name": "guzzlehttp/guzzle", "name": "guzzlehttp/guzzle",
"version": "6.2.0", "version": "6.2.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/guzzle/guzzle.git", "url": "https://github.com/guzzle/guzzle.git",
"reference": "d094e337976dff9d8e2424e8485872194e768662" "reference": "3f808fba627f2c5b69e2501217bf31af349c1427"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/d094e337976dff9d8e2424e8485872194e768662", "url": "https://api.github.com/repos/guzzle/guzzle/zipball/3f808fba627f2c5b69e2501217bf31af349c1427",
"reference": "d094e337976dff9d8e2424e8485872194e768662", "reference": "3f808fba627f2c5b69e2501217bf31af349c1427",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"guzzlehttp/promises": "~1.0", "guzzlehttp/promises": "^1.0",
"guzzlehttp/psr7": "~1.1", "guzzlehttp/psr7": "^1.3.1",
"php": ">=5.5.0" "php": ">=5.5"
}, },
"require-dev": { "require-dev": {
"ext-curl": "*", "ext-curl": "*",
"phpunit/phpunit": "~4.0", "phpunit/phpunit": "^4.0",
"psr/log": "~1.0" "psr/log": "^1.0"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
@@ -1442,7 +1509,7 @@
"rest", "rest",
"web service" "web service"
], ],
"time": "2016-03-21 20:02:09" "time": "2016-07-15 17:22:37"
}, },
{ {
"name": "guzzlehttp/promises", "name": "guzzlehttp/promises",
@@ -1497,16 +1564,16 @@
}, },
{ {
"name": "guzzlehttp/psr7", "name": "guzzlehttp/psr7",
"version": "1.3.0", "version": "1.3.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/guzzle/psr7.git", "url": "https://github.com/guzzle/psr7.git",
"reference": "31382fef2889136415751badebbd1cb022a4ed72" "reference": "5c6447c9df362e8f8093bda8f5d8873fe5c7f65b"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/31382fef2889136415751badebbd1cb022a4ed72", "url": "https://api.github.com/repos/guzzle/psr7/zipball/5c6447c9df362e8f8093bda8f5d8873fe5c7f65b",
"reference": "31382fef2889136415751badebbd1cb022a4ed72", "reference": "5c6447c9df362e8f8093bda8f5d8873fe5c7f65b",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -1522,7 +1589,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.0-dev" "dev-master": "1.4-dev"
} }
}, },
"autoload": { "autoload": {
@@ -1551,41 +1618,90 @@
"stream", "stream",
"uri" "uri"
], ],
"time": "2016-04-13 19:56:01" "time": "2016-06-24 23:00:38"
}, },
{ {
"name": "phpdocumentor/reflection-docblock", "name": "phpdocumentor/reflection-common",
"version": "2.0.4", "version": "1.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", "url": "https://github.com/phpDocumentor/ReflectionCommon.git",
"reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8" "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d68dbdc53dc358a816f00b300704702b2eaff7b8", "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c",
"reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8", "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.3" "php": ">=5.5"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "~4.0" "phpunit/phpunit": "^4.6"
},
"suggest": {
"dflydev/markdown": "~1.0",
"erusev/parsedown": "~1.0"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "2.0.x-dev" "dev-master": "1.0.x-dev"
} }
}, },
"autoload": { "autoload": {
"psr-0": { "psr-4": {
"phpDocumentor": [ "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.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
"reference": "9270140b940ff02e58ec577c237274e92cd40cdd"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/9270140b940ff02e58ec577c237274e92cd40cdd",
"reference": "9270140b940ff02e58ec577c237274e92cd40cdd",
"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/" "src/"
] ]
} }
@@ -1597,39 +1713,87 @@
"authors": [ "authors": [
{ {
"name": "Mike van Riel", "name": "Mike van Riel",
"email": "mike.vanriel@naenius.com" "email": "me@mikevanriel.com"
} }
], ],
"time": "2015-02-03 12:10:50" "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-06-10 09:48:41"
}, },
{ {
"name": "phpspec/prophecy", "name": "phpdocumentor/type-resolver",
"version": "v1.6.0", "version": "0.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpspec/prophecy.git", "url": "https://github.com/phpDocumentor/TypeResolver.git",
"reference": "3c91bdf81797d725b14cb62906f9a4ce44235972" "reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/3c91bdf81797d725b14cb62906f9a4ce44235972", "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/b39c7a5b194f9ed7bd0dd345c751007a41862443",
"reference": "3c91bdf81797d725b14cb62906f9a4ce44235972", "reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443",
"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-06-10 07:14:17"
},
{
"name": "phpspec/prophecy",
"version": "v1.6.1",
"source": {
"type": "git",
"url": "https://github.com/phpspec/prophecy.git",
"reference": "58a8137754bc24b25740d4281399a4a3596058e0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/58a8137754bc24b25740d4281399a4a3596058e0",
"reference": "58a8137754bc24b25740d4281399a4a3596058e0",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"doctrine/instantiator": "^1.0.2", "doctrine/instantiator": "^1.0.2",
"php": "^5.3|^7.0", "php": "^5.3|^7.0",
"phpdocumentor/reflection-docblock": "~2.0", "phpdocumentor/reflection-docblock": "^2.0|^3.0.2",
"sebastian/comparator": "~1.1", "sebastian/comparator": "^1.1",
"sebastian/recursion-context": "~1.0" "sebastian/recursion-context": "^1.0"
}, },
"require-dev": { "require-dev": {
"phpspec/phpspec": "~2.0" "phpspec/phpspec": "^2.0"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.5.x-dev" "dev-master": "1.6.x-dev"
} }
}, },
"autoload": { "autoload": {
@@ -1662,7 +1826,7 @@
"spy", "spy",
"stub" "stub"
], ],
"time": "2016-02-15 07:46:21" "time": "2016-06-07 08:13:47"
}, },
{ {
"name": "phpunit/php-code-coverage", "name": "phpunit/php-code-coverage",
@@ -2252,16 +2416,16 @@
}, },
{ {
"name": "sebastian/exporter", "name": "sebastian/exporter",
"version": "1.2.1", "version": "1.2.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git", "url": "https://github.com/sebastianbergmann/exporter.git",
"reference": "7ae5513327cb536431847bcc0c10edba2701064e" "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/7ae5513327cb536431847bcc0c10edba2701064e", "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4",
"reference": "7ae5513327cb536431847bcc0c10edba2701064e", "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -2269,12 +2433,13 @@
"sebastian/recursion-context": "~1.0" "sebastian/recursion-context": "~1.0"
}, },
"require-dev": { "require-dev": {
"ext-mbstring": "*",
"phpunit/phpunit": "~4.4" "phpunit/phpunit": "~4.4"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.2.x-dev" "dev-master": "1.3.x-dev"
} }
}, },
"autoload": { "autoload": {
@@ -2314,7 +2479,7 @@
"export", "export",
"exporter" "exporter"
], ],
"time": "2015-06-21 07:55:53" "time": "2016-06-17 09:04:28"
}, },
{ {
"name": "sebastian/global-state", "name": "sebastian/global-state",
@@ -2457,16 +2622,16 @@
}, },
{ {
"name": "symfony/browser-kit", "name": "symfony/browser-kit",
"version": "v3.1.0", "version": "v3.1.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/browser-kit.git", "url": "https://github.com/symfony/browser-kit.git",
"reference": "b645a9b23d6c0eeba5ac823fa87bf010db9aff22" "reference": "dcf41ed026b0499254385b5c88f03247b2ba010b"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/browser-kit/zipball/b645a9b23d6c0eeba5ac823fa87bf010db9aff22", "url": "https://api.github.com/repos/symfony/browser-kit/zipball/dcf41ed026b0499254385b5c88f03247b2ba010b",
"reference": "b645a9b23d6c0eeba5ac823fa87bf010db9aff22", "reference": "dcf41ed026b0499254385b5c88f03247b2ba010b",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -2510,20 +2675,20 @@
], ],
"description": "Symfony BrowserKit Component", "description": "Symfony BrowserKit Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2016-03-04 07:56:56" "time": "2016-06-29 05:41:56"
}, },
{ {
"name": "symfony/css-selector", "name": "symfony/css-selector",
"version": "v3.1.0", "version": "v3.1.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/css-selector.git", "url": "https://github.com/symfony/css-selector.git",
"reference": "e17f386efef7258ac671c24e727673abd086b0cf" "reference": "2851e1932d77ce727776154d659b232d061e816a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/css-selector/zipball/e17f386efef7258ac671c24e727673abd086b0cf", "url": "https://api.github.com/repos/symfony/css-selector/zipball/2851e1932d77ce727776154d659b232d061e816a",
"reference": "e17f386efef7258ac671c24e727673abd086b0cf", "reference": "2851e1932d77ce727776154d659b232d061e816a",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -2563,20 +2728,20 @@
], ],
"description": "Symfony CssSelector Component", "description": "Symfony CssSelector Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2016-03-04 07:56:56" "time": "2016-06-29 05:41:56"
}, },
{ {
"name": "symfony/dom-crawler", "name": "symfony/dom-crawler",
"version": "v3.1.0", "version": "v3.1.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/dom-crawler.git", "url": "https://github.com/symfony/dom-crawler.git",
"reference": "12aa63fd41b060d2bee9a34623d29eda70bc8fe3" "reference": "99ec4a23330fcd0c8667095f3ef7aa204ffd9dc0"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/dom-crawler/zipball/12aa63fd41b060d2bee9a34623d29eda70bc8fe3", "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/99ec4a23330fcd0c8667095f3ef7aa204ffd9dc0",
"reference": "12aa63fd41b060d2bee9a34623d29eda70bc8fe3", "reference": "99ec4a23330fcd0c8667095f3ef7aa204ffd9dc0",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -2619,20 +2784,20 @@
], ],
"description": "Symfony DomCrawler Component", "description": "Symfony DomCrawler Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2016-05-13 15:49:09" "time": "2016-06-29 05:41:56"
}, },
{ {
"name": "symfony/finder", "name": "symfony/finder",
"version": "v3.1.0", "version": "v3.1.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/finder.git", "url": "https://github.com/symfony/finder.git",
"reference": "40d17ed287bf51a2f884c4619ce8ff2a1c5cd219" "reference": "8201978de88a9fa0923e18601bb17f1df9c721e7"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/finder/zipball/40d17ed287bf51a2f884c4619ce8ff2a1c5cd219", "url": "https://api.github.com/repos/symfony/finder/zipball/8201978de88a9fa0923e18601bb17f1df9c721e7",
"reference": "40d17ed287bf51a2f884c4619ce8ff2a1c5cd219", "reference": "8201978de88a9fa0923e18601bb17f1df9c721e7",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -2668,7 +2833,56 @@
], ],
"description": "Symfony Finder Component", "description": "Symfony Finder Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2016-05-13 18:06:41" "time": "2016-06-29 05:41:56"
},
{
"name": "webmozart/assert",
"version": "1.0.2",
"source": {
"type": "git",
"url": "https://github.com/webmozart/assert.git",
"reference": "30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/webmozart/assert/zipball/30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde",
"reference": "30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"require-dev": {
"phpunit/phpunit": "^4.6"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0-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": "2015-08-24 13:29:44"
} }
], ],
"aliases": [ "aliases": [
@@ -2690,7 +2904,8 @@
"php": ">=5.5.9", "php": ">=5.5.9",
"ext-mbstring": "*", "ext-mbstring": "*",
"ext-openssl": "*", "ext-openssl": "*",
"ext-curl": "*" "ext-curl": "*",
"ext-zip": "*"
}, },
"platform-dev": [] "platform-dev": []
} }

View File

@@ -1,4 +1,11 @@
<?php <?php
/**
* @package Grav.Core
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav; namespace Grav;
// Ensure vendor libraries exist // Ensure vendor libraries exist
@@ -8,6 +15,7 @@ if (!is_file($autoload)) {
} }
use Grav\Common\Grav; use Grav\Common\Grav;
use RocketTheme\Toolbox\Event\Event;
// Register the auto-loader. // Register the auto-loader.
$loader = require_once $autoload; $loader = require_once $autoload;
@@ -36,6 +44,6 @@ $grav = Grav::instance(
try { try {
$grav->process(); $grav->process();
} catch (\Exception $e) { } catch (\Exception $e) {
$grav->fireEvent('onFatalException'); $grav->fireEvent('onFatalException', new Event(['exception' => $e]));
throw $e; throw $e;
} }

File diff suppressed because one or more lines are too long

View File

@@ -479,9 +479,54 @@ form:
auto: Auto detect auto: Auto detect
file: File file: File
apc: APC apc: APC
xcache: XCache apcu: APCu
memcache: MemCache xcache: Xcache
memcache: Memcache
memcached: Memcached
wincache: WinCache wincache: WinCache
redis: Redis
cache.memcache.server:
type: text
size: medium
label: PLUGIN_ADMIN.MEMCACHE_SERVER
help: PLUGIN_ADMIN.MEMCACHE_SERVER_HELP
placeholder: "localhost"
cache.memcache.port:
type: text
size: small
label: PLUGIN_ADMIN.MEMCACHE_PORT
help: PLUGIN_ADMIN.MEMCACHE_PORT_HELP
placeholder: "11211"
cache.memcached.server:
type: text
size: medium
label: PLUGIN_ADMIN.MEMCACHED_SERVER
help: PLUGIN_ADMIN.MEMCACHED_SERVER_HELP
placeholder: "localhost"
cache.memcached.port:
type: text
size: small
label: PLUGIN_ADMIN.MEMCACHED_PORT
help: PLUGIN_ADMIN.MEMCACHED_PORT_HELP
placeholder: "11211"
cache.redis.server:
type: text
size: medium
label: PLUGIN_ADMIN.REDIS_SERVER
help: PLUGIN_ADMIN.REDIS_SERVER_HELP
placeholder: "localhost"
cache.redis.port:
type: text
size: small
label: PLUGIN_ADMIN.REDIS_PORT
help: PLUGIN_ADMIN.REDIS_PORT_HELP
placeholder: "6379"
cache.prefix: cache.prefix:
type: text type: text
@@ -510,7 +555,6 @@ form:
validate: validate:
type: bool type: bool
twig: twig:
type: section type: section
title: PLUGIN_ADMIN.TWIG_TEMPLATING title: PLUGIN_ADMIN.TWIG_TEMPLATING
@@ -974,3 +1018,14 @@ form:
options: options:
':': ': (default)' ':': ': (default)'
';': '; (for Apache running on Windows)' ';': '; (for Apache running on Windows)'
force_ssl:
type: toggle
label: PLUGIN_ADMIN.FORCE_SSL
highlight: 0
help: PLUGIN_ADMIN.FORCE_SSL_HELP
options:
1: PLUGIN_ADMIN.YES
0: PLUGIN_ADMIN.NO
validate:
type: bool

View File

@@ -1,202 +1,203 @@
defaults: types:
type: file defaults:
thumb: media/thumb.png type: file
mime: application/octet-stream thumb: media/thumb.png
image: mime: application/octet-stream
filters: image:
default: filters:
- enableProgressive default:
- enableProgressive
jpg: jpg:
type: image type: image
thumb: media/thumb-jpg.png thumb: media/thumb-jpg.png
mime: image/jpeg mime: image/jpeg
jpe: jpe:
type: image type: image
thumb: media/thumb-jpg.png thumb: media/thumb-jpg.png
mime: image/jpeg mime: image/jpeg
jpeg: jpeg:
type: image type: image
thumb: media/thumb-jpeg.png thumb: media/thumb-jpeg.png
mime: image/jpeg mime: image/jpeg
png: png:
type: image type: image
thumb: media/thumb-png.png thumb: media/thumb-png.png
mime: image/png mime: image/png
gif: gif:
type: animated type: animated
thumb: media/thumb-gif.png thumb: media/thumb-gif.png
mime: image/gif mime: image/gif
svg: svg:
type: vector type: vector
thumb: media/thumb.png thumb: media/thumb.png
mime: image/svg+xml mime: image/svg+xml
mp4: mp4:
type: video type: video
thumb: media/thumb-mp4.png thumb: media/thumb-mp4.png
mime: video/mp4 mime: video/mp4
mov: mov:
type: video type: video
thumb: media/thumb-mov.png thumb: media/thumb-mov.png
mime: video/quicktime mime: video/quicktime
m4v: m4v:
type: video type: video
thumb: media/thumb-m4v.png thumb: media/thumb-m4v.png
mime: video/x-m4v mime: video/x-m4v
swf: swf:
type: video type: video
thumb: media/thumb-swf.png thumb: media/thumb-swf.png
mime: video/x-flv mime: video/x-flv
flv: flv:
type: video type: video
thumb: media/thumb-flv.png thumb: media/thumb-flv.png
mime: video/x-flv mime: video/x-flv
webm: webm:
type: video type: video
thumb: media/thumb.png thumb: media/thumb.png
mime: video/webm mime: video/webm
ogv: ogv:
type: video type: video
thumb: media/thumb-ogg.png thumb: media/thumb-ogg.png
mime: video/ogg mime: video/ogg
mp3: mp3:
type: audio type: audio
thumb: media/thumb-mp3.png thumb: media/thumb-mp3.png
mime: audio/mp3 mime: audio/mp3
ogg: ogg:
type: audio type: audio
thumb: media/thumb-ogg.png thumb: media/thumb-ogg.png
mime: audio/ogg mime: audio/ogg
wma: wma:
type: audio type: audio
thumb: media/thumb-wma.png thumb: media/thumb-wma.png
mime: audio/wma mime: audio/wma
m4a: m4a:
type: audio type: audio
thumb: media/thumb-m4a.png thumb: media/thumb-m4a.png
mime: audio/m4a mime: audio/m4a
wav: wav:
type: audio type: audio
thumb: media/thumb-wav.png thumb: media/thumb-wav.png
mime: audio/wav mime: audio/wav
aiff: aiff:
type: audio type: audio
mime: audio/aiff mime: audio/aiff
aif: aif:
type: audio type: audio
mime: audio/aif mime: audio/aif
txt: txt:
type: file type: file
thumb: media/thumb-txt.png thumb: media/thumb-txt.png
mime: text/plain mime: text/plain
xml: xml:
type: file type: file
thumb: media/thumb-xml.png thumb: media/thumb-xml.png
mime: application/xml mime: application/xml
doc: doc:
type: file type: file
thumb: media/thumb-doc.png thumb: media/thumb-doc.png
mime: application/msword mime: application/msword
docx: docx:
type: file type: file
mime: application/msword mime: application/msword
xls: xls:
type: file type: file
mime: application/vnd.ms-excel mime: application/vnd.ms-excel
xlt: xlt:
type: file type: file
mime: application/vnd.ms-excel mime: application/vnd.ms-excel
xlm: xlm:
type: file type: file
mime: application/vnd.ms-excel mime: application/vnd.ms-excel
xld: xld:
type: file type: file
mime: application/vnd.ms-excel mime: application/vnd.ms-excel
xla: xla:
type: file type: file
mime: application/vnd.ms-excel mime: application/vnd.ms-excel
xlc: xlc:
type: file type: file
mime: application/vnd.ms-excel mime: application/vnd.ms-excel
xlw: xlw:
type: file type: file
mime: application/vnd.ms-excel mime: application/vnd.ms-excel
xll: xll:
type: file type: file
mime: application/vnd.ms-excel mime: application/vnd.ms-excel
ppt: ppt:
type: file type: file
mime: application/vnd.ms-powerpoint mime: application/vnd.ms-powerpoint
pps: pps:
type: file type: file
mime: application/vnd.ms-powerpoint mime: application/vnd.ms-powerpoint
rtf: rtf:
type: file type: file
mime: application/rtf mime: application/rtf
bmp: bmp:
type: file type: file
mime: image/bmp mime: image/bmp
tiff: tiff:
type: file type: file
mime: image/tiff mime: image/tiff
mpeg: mpeg:
type: file type: file
mime: video/mpeg mime: video/mpeg
mpg: mpg:
type: file type: file
mime: video/mpeg mime: video/mpeg
mpe: mpe:
type: file type: file
mime: video/mpeg mime: video/mpeg
avi: avi:
type: file type: file
mime: video/msvideo mime: video/msvideo
wmv: wmv:
type: file type: file
mime: video/x-ms-wmv mime: video/x-ms-wmv
html: html:
type: file type: file
thumb: media/thumb-html.png thumb: media/thumb-html.png
mime: text/html mime: text/html
htm: htm:
type: file type: file
thumb: media/thumb-html.png thumb: media/thumb-html.png
mime: text/html mime: text/html
pdf: pdf:
type: file type: file
thumb: media/thumb-pdf.png thumb: media/thumb-pdf.png
mime: application/pdf mime: application/pdf
zip: zip:
type: file type: file
thumb: media/thumb-zip.png thumb: media/thumb-zip.png
mime: application/zip mime: application/zip
7z: 7z:
type: file type: file
thumb: media/thumb-7zip.png thumb: media/thumb-7zip.png
mime: application/x-7z-compressed mime: application/x-7z-compressed
gz: gz:
type: file type: file
thumb: media/thumb-gz.png thumb: media/thumb-gz.png
mime: application/gzip mime: application/gzip
tar: tar:
type: file type: file
mime: application/x-tar mime: application/x-tar
css: css:
type: file type: file
thumb: media/thumb-css.png thumb: media/thumb-css.png
mime: text/css mime: text/css
js: js:
type: file type: file
thumb: media/thumb-js.png thumb: media/thumb-js.png
mime: application/javascript mime: application/javascript
json: json:
type: file type: file
thumb: media/thumb-json.png thumb: media/thumb-json.png
mime: application/json mime: application/json

View File

@@ -16,12 +16,12 @@ summary:
delimiter: === # The summary delimiter delimiter: === # The summary delimiter
redirects: redirects:
# /redirect-test: / # Redirect test goes to home page # '/redirect-test': '/' # Redirect test goes to home page
# /old/(.*): /new/$1 # Would redirect /old/my-page to /new/my-page # '/old/(.*)': '/new/$1' # Would redirect /old/my-page to /new/my-page
routes: routes:
# /something/else: '/blog/sample-3' # Alias for /blog/sample-3 # '/something/else': '/blog/sample-3' # Alias for /blog/sample-3
# /new/(.*): '/blog/$1' # Regex any /new/my-page URL to /blog/my-page Route # '/new/(.*)': '/blog/$1' # Regex any /new/my-page URL to /blog/my-page Route
blog: blog:
route: '/blog' # Custom value added (accessible via system.blog.route) route: '/blog' # Custom value added (accessible via system.blog.route)

View File

@@ -4,7 +4,7 @@ default_locale: # Default locale (defaults to system
param_sep: ':' # Parameter separator, use ';' for Apache on windows param_sep: ':' # Parameter separator, use ';' for Apache on windows
wrapped_site: false # For themes/plugins to know if Grav is wrapped by another platform wrapped_site: false # For themes/plugins to know if Grav is wrapped by another platform
reverse_proxy_setup: false # Running in a reverse proxy scenario with different webserver ports than proxy reverse_proxy_setup: false # Running in a reverse proxy scenario with different webserver ports than proxy
force_ssl: false # If enabled, Grav forces to be accessed via HTTPS
languages: languages:
supported: [] # List of languages supported. eg: [en, fr, de] supported: [] # List of languages supported. eg: [en, fr, de]
@@ -125,5 +125,5 @@ session:
httponly: true # Set session HTTP only. If true, indicates that cookies should be used only over HTTP, and JavaScript modification is not allowed. httponly: true # Set session HTTP only. If true, indicates that cookies should be used only over HTTP, and JavaScript modification is not allowed.
gpm: gpm:
releases: testing # Set to either 'stable' or 'testing' releases: stable # Set to either 'stable' or 'testing'
proxy_url: # Configure a manual proxy URL for GPM (eg 127.0.0.1:3128) proxy_url: # Configure a manual proxy URL for GPM (eg 127.0.0.1:3128)

View File

@@ -1,9 +1,15 @@
<?php <?php
/**
* @package Grav.Core
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
// Some standard defines // Some standard defines
define('GRAV', true); define('GRAV', true);
define('GRAV_VERSION', '1.1.0-rc.1'); define('GRAV_VERSION', '1.1.3');
define('GRAV_TESTING', true); define('GRAV_TESTING', false);
define('DS', '/'); define('DS', '/');
define('GRAV_PHP_MIN', '5.5.9'); define('GRAV_PHP_MIN', '5.5.9');

75
system/languages/ar.yaml Normal file
View File

@@ -0,0 +1,75 @@
---
FRONTMATTER_ERROR_PAGE: |
---
العنوان: %1$s
---
# خطأ: مادة أمامية غير صحيحة
مسار: '%2$s'
**%3$s**
, , ,
%4$s
, , ,
NICETIME:
NO_DATE_PROVIDED: لم يتم تقديم التاريخ
BAD_DATE: تاريخ خاطئ
AGO: من قبل
FROM_NOW: من الآن
SECOND: ثانية
MINUTE: دقيقة
HOUR: ساعة
DAY: يوم
WEEK: أسبوع
MONTH: شهر
YEAR: سنة
DECADE: عقد
SEC: ثانية
MIN: دقيقة
HR: ساعة
WK: أسبوع
MO: شهر
YR: سنة
DEC: عقد
SECOND_PLURAL: ثواني
MINUTE_PLURAL: ‮دقائق
HOUR_PLURAL: ساعات
DAY_PLURAL: أيام
WEEK_PLURAL: أسابيع
MONTH_PLURAL: أشهر
YEAR_PLURAL: سنوات
DECADE_PLURAL: عقود
SEC_PLURAL: ثواني
MIN_PLURAL: دقائق
HR_PLURAL: ساعات
WK_PLURAL: أسابيع
MO_PLURAL: أشهر
YR_PLURAL: سنوات
DEC_PLURAL: عقود
FORM:
VALIDATION_FAIL: '<b>فشل التحقق من صحة:</b>'
INVALID_INPUT: إدخال غير صحيح في
MISSING_REQUIRED_FIELD: 'حقل مطلوب مفقود:'
MONTHS_OF_THE_YEAR:
- كانون الثاني
- شباط
- آذار/ مارس
- نيسان
- أيار
- حزيران
- تموز
- آب
- أيلول
- تشرين الأول
- تشرين الثاني
- كانون الأول
DAYS_OF_THE_WEEK:
- الاثنين
- الثلاثاء
- الأربعاء
- الخميس
- الجمعة
- السبت
- الأحد

75
system/languages/ca.yaml Normal file
View File

@@ -0,0 +1,75 @@
---
FRONTMATTER_ERROR_PAGE: |
---
title: %1$s
---
# S'ha produït un error: Frontmatter invàlid
Ruta: `%2$s`
**%3$s**
```
%4$s
```
NICETIME:
NO_DATE_PROVIDED: "No s'ha proporcionat data"
BAD_DATE: Data invàlida
AGO: abans
FROM_NOW: "des d'ara"
SECOND: segon
MINUTE: minut
HOUR: hora
DAY: dia
WEEK: setmana
MONTH: mes
YEAR: any
DECADE: dècada
SEC: s
MIN: min
HR: h
WK: setm.
MO: m.
YR: a.
DEC: dèc.
SECOND_PLURAL: segons
MINUTE_PLURAL: minuts
HOUR_PLURAL: hores
DAY_PLURAL: dies
WEEK_PLURAL: setmanes
MONTH_PLURAL: mesos
YEAR_PLURAL: anys
DECADE_PLURAL: dècades
SEC_PLURAL: s
MIN_PLURAL: min
HR_PLURAL: h
WK_PLURAL: setm.
MO_PLURAL: mesos
YR_PLURAL: anys
DEC_PLURAL: dèc.
FORM:
VALIDATION_FAIL: '<b>Ha fallat la validació:</b>'
INVALID_INPUT: Entrada no vàlida a
MISSING_REQUIRED_FIELD: 'Falta camp obligatori:'
MONTHS_OF_THE_YEAR:
- Gener
- Febrer
- Març
- Abril
- Maig
- Juny
- Juliol
- Agost
- Setembre
- Octubre
- Novembre
- Desembre
DAYS_OF_THE_WEEK:
- Dilluns
- Dimarts
- Dimecres
- Dijous
- Divendres
- Dissabte
- Diumenge

View File

@@ -1,3 +1,4 @@
---
INFLECTOR_UNCOUNTABLE: INFLECTOR_UNCOUNTABLE:
- vybavení - vybavení
- informace - informace
@@ -55,6 +56,7 @@ NICETIME:
DEC_PLURAL: dek DEC_PLURAL: dek
FORM: FORM:
VALIDATION_FAIL: '<b>Ověření se nezdařilo:</b>' VALIDATION_FAIL: '<b>Ověření se nezdařilo:</b>'
INVALID_INPUT: Neplatný vstup v
MISSING_REQUIRED_FIELD: 'Chybí požadované pole:' MISSING_REQUIRED_FIELD: 'Chybí požadované pole:'
MONTHS_OF_THE_YEAR: MONTHS_OF_THE_YEAR:
- ledna - ledna

75
system/languages/da.yaml Normal file
View File

@@ -0,0 +1,75 @@
---
FRONTMATTER_ERROR_PAGE: |
---
Titel: %1$s
---
# Fejl: Ugyldigt frontmatter
Sti: `%2$s`
**%3$s**
```
%4$s
```
NICETIME:
NO_DATE_PROVIDED: Ingen dato angivet
BAD_DATE: Ugyldig dato
AGO: siden
FROM_NOW: fra nu
SECOND: sekund
MINUTE: minut
HOUR: time
DAY: dag
WEEK: uge
MONTH: måned
YEAR: år
DECADE: årti
SEC: sek
MIN: min
HR: t
WK: u
MO: md
YR: år
DEC: årti
SECOND_PLURAL: sekunder
MINUTE_PLURAL: minutter
HOUR_PLURAL: timer
DAY_PLURAL: dage
WEEK_PLURAL: uger
MONTH_PLURAL: måneder
YEAR_PLURAL: år
DECADE_PLURAL: årtier
SEC_PLURAL: sek
MIN_PLURAL: min
HR_PLURAL: timer
WK_PLURAL: uger
MO_PLURAL: mdr
YR_PLURAL: år
DEC_PLURAL: årtier
FORM:
VALIDATION_FAIL: '<b>Validering mislykkedes:</b>'
INVALID_INPUT: Ugyldigt input i
MISSING_REQUIRED_FIELD: 'Mangler obligatorisk felt:'
MONTHS_OF_THE_YEAR:
- Januar
- Februar
- Marts
- April
- Maj
- Juni
- Juli
- August
- September
- Oktober
- November
- December
DAYS_OF_THE_WEEK:
- Mandag
- Tirsdag
- Onsdag
- Torsdag
- Fredag
- Lørdag
- Søndag

View File

@@ -1,13 +1,14 @@
---
FRONTMATTER_ERROR_PAGE: | FRONTMATTER_ERROR_PAGE: |
--- ---
title: %1$s title: %1$s
--- ---
# Fehler: Frontmatter enthält Fehler # Fehler: Frontmatter enthält Fehler
Pfad: `%2$s` Pfad: `%2$s`
**%3$s ** **%3$s **
``` ```
%4$s %4$s
``` ```
@@ -21,8 +22,13 @@ INFLECTOR_IRREGULAR:
child: Kinder child: Kinder
sex: Geschlecht sex: Geschlecht
move: Züge move: Züge
INFLECTOR_ORDINALS:
default: '.'
first: '.'
second: '.'
third: '.'
NICETIME: NICETIME:
NO_DATE_PROVIDED: Keine Daten vorhanden NO_DATE_PROVIDED: Kein Datum angegeben
BAD_DATE: Falsches Datum BAD_DATE: Falsches Datum
AGO: her AGO: her
FROM_NOW: ab jetzt FROM_NOW: ab jetzt
@@ -33,13 +39,14 @@ NICETIME:
WEEK: Woche WEEK: Woche
MONTH: Monat MONTH: Monat
YEAR: Jahr YEAR: Jahr
DECADE: Dekade DECADE: Jahrzehnt
SEC: sek SEC: Sek.
MIN: Min MIN: Min.
HR: std HR: Std.
WK: wo WK: Wo.
YR: yh MO: Mo.
DEC: Jz YR: J.
DEC: Dek.
SECOND_PLURAL: Sekunden SECOND_PLURAL: Sekunden
MINUTE_PLURAL: Minuten MINUTE_PLURAL: Minuten
HOUR_PLURAL: Stunden HOUR_PLURAL: Stunden
@@ -47,14 +54,14 @@ NICETIME:
WEEK_PLURAL: Wochen WEEK_PLURAL: Wochen
MONTH_PLURAL: Monate MONTH_PLURAL: Monate
YEAR_PLURAL: Jahre YEAR_PLURAL: Jahre
DECADE_PLURAL: Dekaden DECADE_PLURAL: Jahrzehnte
SEC_PLURAL: Sekunden SEC_PLURAL: Sekunden
MIN_PLURAL: Minuten MIN_PLURAL: Minuten
HR_PLURAL: Stunden HR_PLURAL: Stunden
WK_PLURAL: Wochen WK_PLURAL: Wochen
MO_PLURAL: Monate MO_PLURAL: Monate
YR_PLURAL: Jahre YR_PLURAL: Jahre
DEC_PLURAL: Dekaden DEC_PLURAL: Jahrzehnten
FORM: FORM:
VALIDATION_FAIL: '<b>Überprüfung fehlgeschlagen:</b>' VALIDATION_FAIL: '<b>Überprüfung fehlgeschlagen:</b>'
INVALID_INPUT: Ungültige Eingabe in INVALID_INPUT: Ungültige Eingabe in
@@ -68,7 +75,7 @@ MONTHS_OF_THE_YEAR:
- Juni - Juni
- Juli - Juli
- August - August
- Semptember - September
- Oktober - Oktober
- November - November
- Dezember - Dezember

View File

@@ -1,3 +1,4 @@
---
MONTHS_OF_THE_YEAR: MONTHS_OF_THE_YEAR:
- Ιανουάριος - Ιανουάριος
- Φεβρουάριος - Φεβρουάριος
@@ -13,9 +14,9 @@ MONTHS_OF_THE_YEAR:
- Δεκέμβριος - Δεκέμβριος
DAYS_OF_THE_WEEK: DAYS_OF_THE_WEEK:
- Δευτέρα - Δευτέρα
- Τρλιτη - Τρίτη
- Τετάρτη - Τετάρτη
- Πέμπτη - Πέμπτη
- Παρασκευή - Παρασκευή
- Σαββάτο - Σάββατο
- Κυριακή - Κυριακή

View File

@@ -1,3 +1,18 @@
---
FRONTMATTER_ERROR_PAGE: |
---
title: %1$s
---
# Error: Frontmatter Inválido
Ruta: `%2$s`
**%3$s**
```
%4$s
```
INFLECTOR_UNCOUNTABLE: INFLECTOR_UNCOUNTABLE:
0: equipo 0: equipo
1: información 1: información

60
system/languages/fi.yaml Normal file
View File

@@ -0,0 +1,60 @@
---
NICETIME:
NO_DATE_PROVIDED: Päivämäärää ei annettu
BAD_DATE: Virheellinen päivämäärä
AGO: sitten
FROM_NOW: tästä lähtien
SECOND: sekunti
MINUTE: minuutti
HOUR: tunti
DAY: päivä
WEEK: viikko
MONTH: kuukausi
YEAR: vuosi
DECADE: vuosikymmen
SEC: sek
MIN: min
HR: h
WK: vk
MO: kk
YR: v
DEC: vuosikymmen
SECOND_PLURAL: sekuntia
MINUTE_PLURAL: minuuttia
HOUR_PLURAL: tuntia
DAY_PLURAL: päivää
WEEK_PLURAL: viikkoa
MONTH_PLURAL: kuukautta
YEAR_PLURAL: vuotta
DECADE_PLURAL: vuosikymmentä
SEC_PLURAL: sek
MIN_PLURAL: min
HR_PLURAL: h
WK_PLURAL: v
MO_PLURAL: kk
YR_PLURAL: v
DEC_PLURAL: vuosikymmentä
FORM:
VALIDATION_FAIL: '<b>Vahvistus epäonnistui:</b>'
MISSING_REQUIRED_FIELD: 'Puuttuva pakollinen kenttä:'
MONTHS_OF_THE_YEAR:
- Tammikuu
- Helmikuu
- Maaliskuu
- Huhtikuu
- Toukokuu
- Kesäkuuta
- Heinäkuu
- Elokuu
- Syyskuu
- Lokakuu
- Marraskuu
- Joulukuu
DAYS_OF_THE_WEEK:
- Maanantai
- Tiistai
- Keskiviikko
- Torstai
- Perjantai
- Lauantai
- Sunnuntai

View File

@@ -1,14 +1,15 @@
---
FRONTMATTER_ERROR_PAGE: | FRONTMATTER_ERROR_PAGE: |
--- ---
title: %1$s title: %1$s
--- ---
# Erreur : Frontmatter invalide # Erreur : Frontmatter invalide
Path: `%2$s` Path: `%2$s`
**%3$s** **%3$s**
``` ```
%4$s %4$s
``` ```

View File

@@ -1,3 +1,4 @@
---
INFLECTOR_UNCOUNTABLE: INFLECTOR_UNCOUNTABLE:
- oprema - oprema
- informacije - informacije

View File

@@ -1,17 +1,70 @@
---
FRONTMATTER_ERROR_PAGE: | FRONTMATTER_ERROR_PAGE: |
--- ---
cím: %1$s cím: %1$s
--- ---
# Hiba: Érvénytelen Frontmatter # Hiba: Érvénytelen Frontmatter
Elérési út: `%2$s` Elérési út: `%2$s`
**%3$s** **%3$s**
``` ```
%4$s %4$s
``` ```
INFLECTOR_PLURALS:
/(quiz)$/i: '\1zes'
/^(ox)$/i: '\1en'
"/([m|l])ouse$/i": '\1ice'
/(matr|vert|ind)ix|ex$/i: '\1ices'
/(x|ch|ss|sh)$/i: '\1es'
"/([^aeiouy]|qu)ies$/i": '\1y'
"/([^aeiouy]|qu)y$/i": '\1ies'
/(hive)$/i: '\1s'
"/(?:([^f])fe|([lr])f)$/i": '\1\2ves'
/sis$/i: ses
"/([ti])um$/i": '\1a'
/(buffal|tomat)o$/i: '\1oes'
/(bu)s$/i: '\1ses'
/(alias|status)/i: '\1es'
/(octop|vir)us$/i: '\1i'
/(ax|test)is$/i: '\1es'
/s$/i: s
/$/: s
INFLECTOR_SINGULAR:
/(quiz)zes$/i: '\1'
/(matr)ices$/i: '\1ix'
/(vert|ind)ices$/i: '\1ex'
/^(ox)en/i: '\1'
/(alias|status)es$/i: '\1'
"/([octop|vir])i$/i": '\1us'
/(cris|ax|test)es$/i: '\1is'
/(shoe)s$/i: '\1'
/(o)es$/i: '\1'
/(bus)es$/i: '\1'
"/([m|l])ice$/i": '\1ouse'
/(x|ch|ss|sh)es$/i: '\1'
/(m)ovies$/i: '\1ovie'
/(s)eries$/i: '\1eries'
"/([^aeiouy]|qu)ies$/i": '\1y'
"/([lr])ves$/i": '\1f'
/(tive)s$/i: '\1'
/(hive)s$/i: '\1'
"/([^f])ves$/i": '\1fe'
/(^analy)ses$/i: '\1sis'
/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$/i: '\1\2sis'
"/([ti])a$/i": '\1um'
/(n)ews$/i: '\1ews'
INFLECTOR_UNCOUNTABLE:
- felszerelés
- információ
- rizs
- pénz
- fajok
- sorozat
- hal
- juh
INFLECTOR_IRREGULAR: INFLECTOR_IRREGULAR:
person: személyek person: személyek
man: férfiak man: férfiak
@@ -62,3 +115,24 @@ FORM:
VALIDATION_FAIL: '<b>A validáció hibát talált:</b>' VALIDATION_FAIL: '<b>A validáció hibát talált:</b>'
INVALID_INPUT: 'Az itt megadott érték érvénytelen:' INVALID_INPUT: 'Az itt megadott érték érvénytelen:'
MISSING_REQUIRED_FIELD: 'Ez a kötelező mező nincs kitöltve:' MISSING_REQUIRED_FIELD: 'Ez a kötelező mező nincs kitöltve:'
MONTHS_OF_THE_YEAR:
- január
- február
- március
- április
- május
- június
- július
- augusztus
- szeptember
- október
- november
- december
DAYS_OF_THE_WEEK:
- hétfő
- kedd
- szerda
- csütörtök
- péntek
- szombat
- vasárnap

View File

@@ -1,6 +1,8 @@
---
FRONTMATTER_ERROR_PAGE: "---Titolo: %1$s---# Errore: Frontmatter non valido: '%2$s' * *%3$s * * ' '%4$s ' '"
NICETIME: NICETIME:
NO_DATE_PROVIDED: Nessuna data fornita NO_DATE_PROVIDED: Nessuna data fornita
BAD_DATE: Data errata BAD_DATE: Data non valida
AGO: fa AGO: fa
FROM_NOW: da adesso FROM_NOW: da adesso
SECOND: secondo SECOND: secondo
@@ -10,6 +12,14 @@ NICETIME:
WEEK: settimana WEEK: settimana
MONTH: mese MONTH: mese
YEAR: anno YEAR: anno
DECADE: decennio
SEC: sec
MIN: min
HR: ora
WK: settimana
MO: mese
YR: anno
DEC: decennio
SECOND_PLURAL: secondi SECOND_PLURAL: secondi
MINUTE_PLURAL: minuti MINUTE_PLURAL: minuti
HOUR_PLURAL: ore HOUR_PLURAL: ore
@@ -18,9 +28,16 @@ NICETIME:
MONTH_PLURAL: mesi MONTH_PLURAL: mesi
YEAR_PLURAL: anni YEAR_PLURAL: anni
DECADE_PLURAL: decadi DECADE_PLURAL: decadi
SEC_PLURAL: secondi
MIN_PLURAL: minuti
HR_PLURAL: ore
WK_PLURAL: settimane
MO_PLURAL: mesi
YR_PLURAL: anni
DEC_PLURAL: decenni
FORM: FORM:
VALIDATION_FAIL: '<b>Validazione fallita:</b>' VALIDATION_FAIL: '<b>Validazione fallita:</b>'
INVALID_INPUT: Input invalido in INVALID_INPUT: Input non valido in
MISSING_REQUIRED_FIELD: 'Campo richiesto mancante:' MISSING_REQUIRED_FIELD: 'Campo richiesto mancante:'
MONTHS_OF_THE_YEAR: MONTHS_OF_THE_YEAR:
- Gennaio - Gennaio
@@ -36,10 +53,10 @@ MONTHS_OF_THE_YEAR:
- Novembre - Novembre
- Dicembre - Dicembre
DAYS_OF_THE_WEEK: DAYS_OF_THE_WEEK:
- Lunedi - Lunedì
- Martedi - Martedì
- Mercoledi - Mercoledì
- Giovedi - Giovedì
- Venerdi - Venerdì
- Sabato - Sabato
- Domenica - Domenica

View File

@@ -1,3 +1,4 @@
---
INFLECTOR_UNCOUNTABLE: INFLECTOR_UNCOUNTABLE:
2: ryžiai 2: ryžiai
3: pinigai 3: pinigai

View File

@@ -1,3 +1,4 @@
---
INFLECTOR_IRREGULAR: INFLECTOR_IRREGULAR:
person: personen person: personen
man: mensen man: mensen
@@ -13,10 +14,15 @@ NICETIME:
MINUTE: minuut MINUTE: minuut
HOUR: uur HOUR: uur
DAY: dag DAY: dag
WEEK: week
MONTH: maand MONTH: maand
YEAR: jaar YEAR: jaar
DECADE: decenium DECADE: decenium
SEC: s
MIN: min
HR: u
MO: ma MO: ma
YR: j
SECOND_PLURAL: seconden SECOND_PLURAL: seconden
MINUTE_PLURAL: minuten MINUTE_PLURAL: minuten
HOUR_PLURAL: uren HOUR_PLURAL: uren
@@ -31,15 +37,23 @@ NICETIME:
WK_PLURAL: weken WK_PLURAL: weken
MO_PLURAL: maanden MO_PLURAL: maanden
YR_PLURAL: jaren YR_PLURAL: jaren
FORM:
VALIDATION_FAIL: '<b>Validatie mislukt:</b>'
INVALID_INPUT: Ongeldige invoer in
MISSING_REQUIRED_FIELD: 'Verplicht veld ontbreekt:'
MONTHS_OF_THE_YEAR: MONTHS_OF_THE_YEAR:
0: Januari - Januari
1: Februari - Februari
2: Maart - Maart
4: Mei - april
5: Juni - Mei
6: Juli - Juni
7: Augustus - Juli
9: Oktober - Augustus
- september
- Oktober
- november
- december
DAYS_OF_THE_WEEK: DAYS_OF_THE_WEEK:
- Maandag - Maandag
- Dinsdag - Dinsdag

View File

@@ -1,14 +1,15 @@
---
FRONTMATTER_ERROR_PAGE: | FRONTMATTER_ERROR_PAGE: |
--- ---
Tittel: %1$s Tittel: %1$s
--- ---
# Feilmelding: Ugyldig Frontmatter # Feilmelding: Ugyldig Frontmatter
Pane: '%2$s' Pane: '%2$s'
**%3$s ** **%3$s **
``` ```
%4$s %4$s
``` ```
@@ -62,7 +63,9 @@ NICETIME:
MIN_PLURAL: min MIN_PLURAL: min
HR_PLURAL: timer HR_PLURAL: timer
WK_PLURAL: uker WK_PLURAL: uker
MO_PLURAL: mdr
YR_PLURAL: år YR_PLURAL: år
DEC_PLURAL: årtier
FORM: FORM:
VALIDATION_FAIL: '<b>Validering mislyktes:</b>' VALIDATION_FAIL: '<b>Validering mislyktes:</b>'
INVALID_INPUT: Ugyldig innhold i INVALID_INPUT: Ugyldig innhold i

View File

@@ -1,14 +1,15 @@
---
FRONTMATTER_ERROR_PAGE: | FRONTMATTER_ERROR_PAGE: |
--- ---
title: %1$s title: %1$s
--- ---
# Error: Nieprawidłowy Frontmatter # Error: Nieprawidłowy Frontmatter
Path: `%2$s` Path: `%2$s`
**%3$s** **%3$s**
``` ```
%4$s %4$s
``` ```
@@ -28,8 +29,8 @@ NICETIME:
SEC: sek SEC: sek
MIN: min MIN: min
HR: godz HR: godz
WK: tydź WK: tydz
MO: mieś MO: m-c
YR: rok YR: rok
DEC: dekada DEC: dekada
SECOND_PLURAL: sekund SECOND_PLURAL: sekund
@@ -40,16 +41,16 @@ NICETIME:
MONTH_PLURAL: miesięcy MONTH_PLURAL: miesięcy
YEAR_PLURAL: lat YEAR_PLURAL: lat
DECADE_PLURAL: dekad DECADE_PLURAL: dekad
SEC_PLURAL: sekund SEC_PLURAL: sek
MIN_PLURAL: minut MIN_PLURAL: min
HR_PLURAL: godz HR_PLURAL: godz
WK_PLURAL: tyg WK_PLURAL: tyg
MO_PLURAL: mieś MO_PLURAL: m-ce
YR_PLURAL: lat YR_PLURAL: lat
DEC_PLURAL: dekad DEC_PLURAL: dekad
FORM: FORM:
VALIDATION_FAIL: '<b>Weryfikacja nie powiodła się:</b>' VALIDATION_FAIL: '<b>Weryfikacja nie powiodła się:</b>'
INVALID_INPUT: Nieprawidłowe dane w INVALID_INPUT: Nieprawidłowe dane wejściowe
MISSING_REQUIRED_FIELD: 'Opuszczono wymagane pole:' MISSING_REQUIRED_FIELD: 'Opuszczono wymagane pole:'
MONTHS_OF_THE_YEAR: MONTHS_OF_THE_YEAR:
- Styczeń - Styczeń

View File

@@ -1,3 +1,18 @@
---
FRONTMATTER_ERROR_PAGE: |
---
título: %1$s
---
# Erro: Frontmatter inválida
Caminho: `%2$s`
**%3$s**
```
%4$s
```
INFLECTOR_UNCOUNTABLE: INFLECTOR_UNCOUNTABLE:
1: informação 1: informação
2: arroz 2: arroz
@@ -6,6 +21,10 @@ INFLECTOR_IRREGULAR:
man: homens man: homens
sex: sexos sex: sexos
NICETIME: NICETIME:
NO_DATE_PROVIDED: Não foi fornecida data
BAD_DATE: Data inválida
AGO: atrás
FROM_NOW: a partir de agora
SECOND: segundo SECOND: segundo
MINUTE: minuto MINUTE: minuto
HOUR: hora HOUR: hora
@@ -16,8 +35,11 @@ NICETIME:
DECADE: década DECADE: década
SEC: seg SEC: seg
MIN: mín MIN: mín
MO: mês HR: h
YR: ano WK: sem
MO: m
YR: a
DEC: dec
SECOND_PLURAL: segundos SECOND_PLURAL: segundos
MINUTE_PLURAL: minutos MINUTE_PLURAL: minutos
HOUR_PLURAL: horas HOUR_PLURAL: horas
@@ -29,9 +51,11 @@ NICETIME:
SEC_PLURAL: seg SEC_PLURAL: seg
MIN_PLURAL: mins MIN_PLURAL: mins
HR_PLURAL: hrs HR_PLURAL: hrs
WK_PLURAL: sems
YR_PLURAL: anos YR_PLURAL: anos
FORM: FORM:
VALIDATION_FAIL: '<b>Validação falhada: </b>' VALIDATION_FAIL: '<b>Validação falhada: </b>'
MISSING_REQUIRED_FIELD: 'Campo obrigatório ausente:'
MONTHS_OF_THE_YEAR: MONTHS_OF_THE_YEAR:
- Janeiro - Janeiro
- Fevereiro - Fevereiro

View File

@@ -1,18 +1,99 @@
---
FRONTMATTER_ERROR_PAGE: |
---
Titlu: %1$s
---
# Eroare: Frontmatter este invalid
Calea: `%2$s`
**%3$s**
```
%4$s
INFLECTOR_PLURALS:
/(quiz)$/i: '\1zes'
/^(ox)$/i: '\1en'
"/([m|l])ouse$/i": '\1ice'
/(matr|vert|ind)ix|ex$/i: '\1ices'
/(x|ch|ss|sh)$/i: '\1es'
"/([^aeiouy]|qu)ies$/i": '\1y'
"/([^aeiouy]|qu)y$/i": '\1ies'
/(hive)$/i: '\1s'
"/(?:([^f])fe|([lr])f)$/i": '\1\2ves'
/sis$/i: ses
"/([ti])um$/i": '\1a'
/(buffal|tomat)o$/i: '\1oes'
INFLECTOR_UNCOUNTABLE:
- echipament
- informaţie
- orez
- bani
- specii
- serii
- peşte
- oaie
INFLECTOR_IRREGULAR:
person: persoane
man: bărbați
child: copii
sex: sexe
move: mutări
NICETIME:
NO_DATE_PROVIDED: Nu există o dată prevăzută
BAD_DATE: Dată incorectă
AGO: în urmă
FROM_NOW: de acum
SECOND: secundă
MINUTE: minut
HOUR: oră
DAY: zi
WEEK: săptămână
MONTH: lună
YEAR: an
DECADE: decadă
SEC: sec
MIN: min
HR: oră
WK: săpt
MO: lună
YR: an
DEC: decadă
SECOND_PLURAL: secunde
MINUTE_PLURAL: minute
HOUR_PLURAL: ore
DAY_PLURAL: zile
WEEK_PLURAL: săptămâni
MONTH_PLURAL: luni
YEAR_PLURAL: ani
DECADE_PLURAL: decade
SEC_PLURAL: sec
MIN_PLURAL: min
HR_PLURAL: ore
WK_PLURAL: săpt
MO_PLURAL: luni
YR_PLURAL: ani
DEC_PLURAL: decenii
FORM:
VALIDATION_FAIL: '<b>Validare nereușită</b>'
INVALID_INPUT: Date incorecte în
MISSING_REQUIRED_FIELD: 'Câmp obligatoriu lipsă:'
MONTHS_OF_THE_YEAR: MONTHS_OF_THE_YEAR:
0: Ianuarie - Ianuarie
1: Februarie - Februarie
2: Martie - Martie
3: Aprilue - Aprilie
4: Mai - Mai
5: Iunie - Iunie
6: Iulie - Iulie
8: Septembrie - August
9: Octombrie - Septembrie
10: Noiembrie - Octombrie
11: Decembrie - Noiembrie
- Decembrie
DAYS_OF_THE_WEEK: DAYS_OF_THE_WEEK:
- Luni - Luni
- Marti - Marți
- Miercuri - Miercuri
- Joi - Joi
- Vineri - Vineri

View File

@@ -1,3 +1,18 @@
---
FRONTMATTER_ERROR_PAGE: |
---
title: %1$s
---
# Ошибка: Недопустимое содержимое
Path: `%2$s`
**%3$s**
```
%4$s
```
INFLECTOR_IRREGULAR: INFLECTOR_IRREGULAR:
person: люди person: люди
man: человек man: человек
@@ -20,8 +35,8 @@ NICETIME:
SEC: с SEC: с
MIN: мин MIN: мин
HR: ч HR: ч
WK: нед WK: нед.
MO: мес MO: мес.
YR: г. YR: г.
DEC: гг. DEC: гг.
SECOND_PLURAL: секунды SECOND_PLURAL: секунды

42
system/languages/sk.yaml Normal file
View File

@@ -0,0 +1,42 @@
---
NICETIME:
NO_DATE_PROVIDED: Neposkytnutý žiaden dátum
BAD_DATE: Nesprávny dátum
AGO: pred
FROM_NOW: odteraz
SECOND: sekunda
MINUTE: minúta
HOUR: hodina
DAY: deň
WEEK: týždeň
MONTH: mesiac
YEAR: rok
DECADE: desaťročie
SEC: sek
MIN: min
HR: hod
FORM:
VALIDATION_FAIL: '<b>Overenie zlyhalo:</b>'
INVALID_INPUT: Neplatný vstup v
MISSING_REQUIRED_FIELD: 'Chýba vyžadované pole:'
MONTHS_OF_THE_YEAR:
- Január
- Február
- Marec
- Apríl
- Máj
- Jún
- Júl
- August
- September
- Október
- November
- December
DAYS_OF_THE_WEEK:
- Pondelok
- Utorok
- Streda
- Štvrtok
- Piatok
- Sobota
- Nedeľa

View File

@@ -1,2 +1,62 @@
---
FRONTMATTER_ERROR_PAGE: '--- titel: %1$s --- # Fel: Ogiltig Frontmatter-sökväg: `%2$s` **%3$s** ``` %4$s ```'
NICETIME: NICETIME:
NO_DATE_PROVIDED: Inget datum har angivits
BAD_DATE: Ogiltigt datum
AGO: sedan
FROM_NOW: från nu
SECOND: sekund
MINUTE: minut
HOUR: timme
DAY: dag DAY: dag
WEEK: vecka
MONTH: månad
YEAR: år
DECADE: årtionde
SEC: sek
MIN: min
HR: t
WK: v
MO: m
YR: år
DEC: dec
SECOND_PLURAL: sekunder
MINUTE_PLURAL: minuter
HOUR_PLURAL: timmar
DAY_PLURAL: dagar
WEEK_PLURAL: veckor
MONTH_PLURAL: månader
YEAR_PLURAL: år
DECADE_PLURAL: årtionden
SEC_PLURAL: sek
MIN_PLURAL: min
HR_PLURAL: t
WK_PLURAL: v
MO_PLURAL:
YR_PLURAL: år
DEC_PLURAL: dec
FORM:
VALIDATION_FAIL: '<b>Kontrollen misslyckades:</b>'
INVALID_INPUT: Ogiltig indata i
MISSING_REQUIRED_FIELD: 'Obligatoriskt fält måste fyllas i:'
MONTHS_OF_THE_YEAR:
- Januari
- Februrari
- Mars
- April
- Maj
- Juni
- Juli
- Augusti
- September
- Oktober
- November
- December
DAYS_OF_THE_WEEK:
- Måndag
- Tisdag
- Onsdag
- Torsdag
- Fredag
- Lördag
- Söndag

75
system/languages/th.yaml Normal file
View File

@@ -0,0 +1,75 @@
---
FRONTMATTER_ERROR_PAGE: |
---
ชื่อเรื่อง: %1$s
---
# ข้อผิดพลาด: Invalid Frontmatter
Path: `%2$s`
**%3$s**
```
%4$s
```
NICETIME:
NO_DATE_PROVIDED: ไม่มีวันที่ให้
BAD_DATE: รูปแบบวันที่ผิด
AGO: ที่ผ่านมา
FROM_NOW: จากตอนนี้
SECOND: วินาที
MINUTE: นาที
HOUR: ชั่วโมง
DAY: วัน
WEEK: สัปดาห์
MONTH: เดือน
YEAR: ปี
DECADE: ทศวรรษที่ผ่านมา
SEC: วิ
MIN: นาที
HR: ชม.
WK: wk
MO: mo
YR: yr
DEC: dec
SECOND_PLURAL: วินาที
MINUTE_PLURAL: นาที
HOUR_PLURAL: ชั่วโมง
DAY_PLURAL: วัน
WEEK_PLURAL: สัปดาห์
MONTH_PLURAL: เดือน
YEAR_PLURAL: ปี
DECADE_PLURAL: ทศวรรษที่ผ่านมา
SEC_PLURAL: วินาที
MIN_PLURAL: นาที
HR_PLURAL: ชั่วโมง
WK_PLURAL: wks
MO_PLURAL: mos
YR_PLURAL: ปี
DEC_PLURAL: decs
FORM:
VALIDATION_FAIL: '<b>ตรวจสอบล้มเหลว: </b>'
INVALID_INPUT: ป้อนข้อมูลไม่ถูกต้องใน
MISSING_REQUIRED_FIELD: 'ขาดข้อมูลที่จำเป็น:'
MONTHS_OF_THE_YEAR:
- มกราคม
- กุมภาพันธ์
- มีนาคม
- เมษายน
- พฤษภาคม
- มิถุนายน
- กรกฏาคม
- สิงหาคม
- กันยายน
- ตุลาคม
- พฤศจิกายน
- ธันวาคม
DAYS_OF_THE_WEEK:
- จันทร์
- อังคาร
- พุธ
- พฤหัสบดี
- ศุกร์
- เสาร์
- อาทิตย์

View File

@@ -1,3 +1,4 @@
---
NICETIME: NICETIME:
NO_DATE_PROVIDED: Tarih yok NO_DATE_PROVIDED: Tarih yok
BAD_DATE: Yanlış tarih BAD_DATE: Yanlış tarih
@@ -33,3 +34,26 @@ NICETIME:
MO_PLURAL: ay MO_PLURAL: ay
YR_PLURAL: yl YR_PLURAL: yl
DEC_PLURAL: onyl DEC_PLURAL: onyl
FORM:
VALIDATION_FAIL: '<b>Doğrulama başarısız:</b>'
MONTHS_OF_THE_YEAR:
- Ocak
- Şubat
- Mart
- Nisan
- Mayıs
- Haziran
- Temmuz
- Ağustos
- Eylül
- Ekim
- Kasım
- Aralık
DAYS_OF_THE_WEEK:
- Pazartesi
- Salı
- Çarşamba
- Perşembe
- Cuma
- Cumartesi
- Pazar

75
system/languages/uk.yaml Normal file
View File

@@ -0,0 +1,75 @@
---
FRONTMATTER_ERROR_PAGE: |
---
title: %1$s
---
# Помилка: Недопустимий вміст
Path: `%2$s`
**%3$s**
```
%4$s
```
NICETIME:
NO_DATE_PROVIDED: Не вказана дата
BAD_DATE: Невірна дата
AGO: назад
FROM_NOW: відтепер
SECOND: секунда
MINUTE: хвилина
HOUR: година
DAY: день
WEEK: тиждень
MONTH: місяць
YEAR: рік
DECADE: десятиріччя
SEC: с
MIN: хв
HR: год
WK: тиж.
MO: міс.
YR: р.
DEC: рр.
SECOND_PLURAL: секунди
MINUTE_PLURAL: хвилини
HOUR_PLURAL: години
DAY_PLURAL: дні
WEEK_PLURAL: тижні
MONTH_PLURAL: місяці
YEAR_PLURAL: роки
DECADE_PLURAL: десятиріччя
SEC_PLURAL: с
MIN_PLURAL: хв
HR_PLURAL: год
WK_PLURAL: тиж.
MO_PLURAL: міс.
YR_PLURAL: рр.
DEC_PLURAL: рр.
FORM:
VALIDATION_FAIL: '<b>Перевірка не вдалася:</b>'
INVALID_INPUT: Невірне введення в
MISSING_REQUIRED_FIELD: 'Відсутнє необхідне поле:'
MONTHS_OF_THE_YEAR:
- Січень
- Лютий
- Березень
- Квітень
- Травень
- Червень
- Липень
- Серпень
- Вересень
- Жовтень
- Листопад
- Грудень
DAYS_OF_THE_WEEK:
- Понеділок
- Вівторок
- Середа
- Четвер
- "П'ятниця"
- Субота
- Неділя

75
system/languages/vi.yaml Normal file
View File

@@ -0,0 +1,75 @@
---
FRONTMATTER_ERROR_PAGE: |
---
title: %1$s
---
# Error: Invalid Frontmatter
Path: `%2$s`
**%3$s**
```
%4$s
```
NICETIME:
NO_DATE_PROVIDED: Không có ngày được cung cấp
BAD_DATE: Ngày không hợp lệ
AGO: cách đây
FROM_NOW: từ bây giờ
SECOND: giây
MINUTE: phút
HOUR: giờ
DAY: ngày
WEEK: tuần
MONTH: tháng
YEAR: năm
DECADE: thập kỷ
SEC: giây
MIN: phút
HR: giờ
WK: tuần
MO: tháng
YR: năm
DEC: thập kỷ
SECOND_PLURAL: giây
MINUTE_PLURAL: phút
HOUR_PLURAL: giờ
DAY_PLURAL: ngày
WEEK_PLURAL: tuần
MONTH_PLURAL: tháng
YEAR_PLURAL: năm
DECADE_PLURAL: thập kỷ
SEC_PLURAL: giây
MIN_PLURAL: phút
HR_PLURAL: giờ
WK_PLURAL: tuần
MO_PLURAL: tháng
YR_PLURAL: năm
DEC_PLURAL: thập kỷ
FORM:
VALIDATION_FAIL: '<b>Xác nhận thất bại:</b>'
INVALID_INPUT: Dữ liệu nhập không hợp lệ cho
MISSING_REQUIRED_FIELD: 'Thiếu trường bắt buộc:'
MONTHS_OF_THE_YEAR:
- Tháng 1
- Tháng 2
- Tháng 3
- Tháng 4
- Tháng 5
- Tháng 6
- Tháng 7
- Tháng 8
- Tháng 9
- Tháng 10
- Tháng Mười 11
- Tháng 12
DAYS_OF_THE_WEEK:
- Thứ 2
- Thứ 3
- Thứ 4
- Thứ 5
- Thứ 6
- Thứ 7
- Chủ Nhật

View File

@@ -1,4 +1,11 @@
<?php <?php
/**
* @package Grav.Common
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common; namespace Grav\Common;
use Closure; use Closure;
@@ -13,14 +20,6 @@ use RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator;
define('CSS_ASSET', true); define('CSS_ASSET', true);
define('JS_ASSET', false); define('JS_ASSET', false);
/**
* Handles Asset management (CSS & JS) and also pipelining (combining into a single file for each asset)
*
* Based on stolz/assets (https://github.com/Stolz/Assets) package modified for use with Grav
*
* @author RocketTheme
* @license MIT
*/
class Assets class Assets
{ {
/** @const Regex to match CSS and JavaScript files */ /** @const Regex to match CSS and JavaScript files */
@@ -282,7 +281,10 @@ class Assets
return $this; return $this;
} }
if (!$this->isRemoteLink($asset)) { $modified = false;
$remote = $this->isRemoteLink($asset);
if (!$remote) {
$modified = $this->getLastModificationTime($asset);
$asset = $this->buildLocalLink($asset); $asset = $this->buildLocalLink($asset);
} }
@@ -293,10 +295,12 @@ class Assets
$data = [ $data = [
'asset' => $asset, 'asset' => $asset,
'remote' => $remote,
'priority' => intval($priority ?: 10), 'priority' => intval($priority ?: 10),
'order' => count($this->css), 'order' => count($this->css),
'pipeline' => (bool)$pipeline, 'pipeline' => (bool) $pipeline,
'group' => $group ?: 'head' 'group' => $group ?: 'head',
'modified' => $modified
]; ];
// check for dynamic array and merge with defaults // check for dynamic array and merge with defaults
@@ -343,7 +347,10 @@ class Assets
return $this; return $this;
} }
if (!$this->isRemoteLink($asset)) { $modified = false;
$remote = $this->isRemoteLink($asset);
if (!$remote) {
$modified = $this->getLastModificationTime($asset);
$asset = $this->buildLocalLink($asset); $asset = $this->buildLocalLink($asset);
} }
@@ -354,11 +361,13 @@ class Assets
$data = [ $data = [
'asset' => $asset, 'asset' => $asset,
'remote' => $remote ,
'priority' => intval($priority ?: 10), 'priority' => intval($priority ?: 10),
'order' => count($this->js), 'order' => count($this->js),
'pipeline' => (bool)$pipeline, 'pipeline' => (bool) $pipeline,
'loading' => $loading ?: '', 'loading' => $loading ?: '',
'group' => $group ?: 'head' 'group' => $group ?: 'head',
'modified' => $modified
]; ];
// check for dynamic array and merge with defaults // check for dynamic array and merge with defaults
@@ -553,7 +562,7 @@ class Assets
foreach ($this->css_no_pipeline as $file) { foreach ($this->css_no_pipeline as $file) {
if ($group && $file['group'] == $group) { if ($group && $file['group'] == $group) {
$media = isset($file['media']) ? sprintf(' media="%s"', $file['media']) : ''; $media = isset($file['media']) ? sprintf(' media="%s"', $file['media']) : '';
$output .= '<link href="' . $file['asset'] . $this->timestamp . '"' . $attributes . $media . ' />' . "\n"; $output .= '<link href="' . $file['asset'] . $this->getTimestamp($file) . '"' . $attributes . $media . ' />' . "\n";
} }
} }
if (!$this->css_pipeline_before_excludes && $pipeline_result) { if (!$this->css_pipeline_before_excludes && $pipeline_result) {
@@ -563,7 +572,7 @@ class Assets
foreach ($this->css as $file) { foreach ($this->css as $file) {
if ($group && $file['group'] == $group) { if ($group && $file['group'] == $group) {
$media = isset($file['media']) ? sprintf(' media="%s"', $file['media']) : ''; $media = isset($file['media']) ? sprintf(' media="%s"', $file['media']) : '';
$output .= '<link href="' . $file['asset'] . $this->timestamp . '"' . $attributes . $media . ' />' . "\n"; $output .= '<link href="' . $file['asset'] . $this->getTimestamp($file) . '"' . $attributes . $media . ' />' . "\n";
} }
} }
} }
@@ -631,7 +640,7 @@ class Assets
} }
foreach ($this->js_no_pipeline as $file) { foreach ($this->js_no_pipeline as $file) {
if ($group && $file['group'] == $group) { if ($group && $file['group'] == $group) {
$output .= '<script src="' . $file['asset'] . $this->timestamp . '"' . $attributes . ' ' . $file['loading'] . '></script>' . "\n"; $output .= '<script src="' . $file['asset'] . $this->getTimestamp($file) . '"' . $attributes . ' ' . $file['loading'] . '></script>' . "\n";
} }
} }
if (!$this->js_pipeline_before_excludes && $pipeline_result) { if (!$this->js_pipeline_before_excludes && $pipeline_result) {
@@ -640,7 +649,7 @@ class Assets
} else { } else {
foreach ($this->js as $file) { foreach ($this->js as $file) {
if ($group && $file['group'] == $group) { if ($group && $file['group'] == $group) {
$output .= '<script src="' . $file['asset'] . $this->timestamp . '"' . $attributes . ' ' . $file['loading'] . '></script>' . "\n"; $output .= '<script src="' . $file['asset'] . $this->getTimestamp($file) . '"' . $attributes . ' ' . $file['loading'] . '></script>' . "\n";
} }
} }
} }
@@ -668,16 +677,13 @@ class Assets
*/ */
protected function pipelineCss($group = 'head') protected function pipelineCss($group = 'head')
{ {
/** @var Cache $cache */
$cache = Grav::instance()['cache'];
$key = '?' . $cache->getKey();
// temporary list of assets to pipeline // temporary list of assets to pipeline
$temp_css = []; $temp_css = [];
// clear no-pipeline assets lists // clear no-pipeline assets lists
$this->css_no_pipeline = []; $this->css_no_pipeline = [];
// Compute uid based on assets and timestamp
$uid = md5(json_encode($this->css) . $this->css_minify . $this->css_rewrite . $group); $uid = md5(json_encode($this->css) . $this->css_minify . $this->css_rewrite . $group);
$file = $uid . '.css'; $file = $uid . '.css';
$inline_file = $uid . '-inline.css'; $inline_file = $uid . '-inline.css';
@@ -691,14 +697,14 @@ class Assets
// If pipeline exist return it // If pipeline exist return it
if (file_exists($this->assets_dir . $file)) { if (file_exists($this->assets_dir . $file)) {
return $relative_path . $key; return $relative_path . $this->getTimestamp();
} }
// Remove any non-pipeline files // Remove any non-pipeline files
foreach ($this->css as $id => $asset) { foreach ($this->css as $id => $asset) {
if ($asset['group'] == $group) { if ($asset['group'] == $group) {
if (!$asset['pipeline'] || if (!$asset['pipeline'] ||
($this->isRemoteLink($asset['asset']) && $this->css_pipeline_include_externals === false)) { ($asset['remote'] && $this->css_pipeline_include_externals === false)) {
$this->css_no_pipeline[$id] = $asset; $this->css_no_pipeline[$id] = $asset;
} else { } else {
$temp_css[$id] = $asset; $temp_css[$id] = $asset;
@@ -738,7 +744,7 @@ class Assets
if (strlen(trim($buffer)) > 0) { if (strlen(trim($buffer)) > 0) {
file_put_contents($this->assets_dir . $file, $buffer); file_put_contents($this->assets_dir . $file, $buffer);
return $relative_path . $key; return $relative_path . $this->getTimestamp();
} else { } else {
return false; return false;
} }
@@ -753,16 +759,13 @@ class Assets
*/ */
protected function pipelineJs($group = 'head') protected function pipelineJs($group = 'head')
{ {
/** @var Cache $cache */
$cache = Grav::instance()['cache'];
$key = '?' . $cache->getKey();
// temporary list of assets to pipeline // temporary list of assets to pipeline
$temp_js = []; $temp_js = [];
// clear no-pipeline assets lists // clear no-pipeline assets lists
$this->js_no_pipeline = []; $this->js_no_pipeline = [];
// Compute uid based on assets and timestamp
$uid = md5(json_encode($this->js) . $this->js_minify . $group); $uid = md5(json_encode($this->js) . $this->js_minify . $group);
$file = $uid . '.js'; $file = $uid . '.js';
$inline_file = $uid . '-inline.js'; $inline_file = $uid . '-inline.js';
@@ -776,14 +779,14 @@ class Assets
// If pipeline exist return it // If pipeline exist return it
if (file_exists($this->assets_dir . $file)) { if (file_exists($this->assets_dir . $file)) {
return $relative_path . $key; return $relative_path . $this->getTimestamp();
} }
// Remove any non-pipeline files // Remove any non-pipeline files
foreach ($this->js as $id => $asset) { foreach ($this->js as $id => $asset) {
if ($asset['group'] == $group) { if ($asset['group'] == $group) {
if (!$asset['pipeline'] || if (!$asset['pipeline'] ||
($this->isRemoteLink($asset['asset']) && $this->js_pipeline_include_externals === false)) { ($asset['remote'] && $this->js_pipeline_include_externals === false)) {
$this->js_no_pipeline[] = $asset; $this->js_no_pipeline[] = $asset;
} else { } else {
$temp_js[$id] = $asset; $temp_js[$id] = $asset;
@@ -813,7 +816,7 @@ class Assets
if (strlen(trim($buffer)) > 0) { if (strlen(trim($buffer)) > 0) {
file_put_contents($this->assets_dir . $file, $buffer); file_put_contents($this->assets_dir . $file, $buffer);
return $relative_path . $key; return $relative_path . $this->getTimestamp();
} else { } else {
return false; return false;
} }
@@ -821,24 +824,94 @@ class Assets
/** /**
* Return the array of all the registered CSS assets * Return the array of all the registered CSS assets
* If a $key is provided, it will try to return only that asset
* else it will return null
* *
* @param null|string $key the asset key
* @return array * @return array
*/ */
public function getCss() public function getCss($key = null)
{ {
if (!empty($key)) {
$asset_key = md5($key);
if (isset($this->css[$asset_key])) {
return $this->css[$asset_key];
} else {
return null;
}
}
return $this->css; return $this->css;
} }
/** /**
* Return the array of all the registered JS assets * Return the array of all the registered JS assets
* If a $key is provided, it will try to return only that asset
* else it will return null
* *
* @param null|string $key the asset key
* @return array * @return array
*/ */
public function getJs() public function getJs($key = null)
{ {
if (!empty($key)) {
$asset_key = md5($key);
if (isset($this->js[$asset_key])) {
return $this->js[$asset_key];
} else {
return null;
}
}
return $this->js; return $this->js;
} }
/**
* Set the whole array of CSS assets
*
* @param $css
*/
public function setCss($css)
{
$this->css = $css;
}
/**
* Set the whole array of JS assets
*
* @param $js
*/
public function setJs($js)
{
$this->js = $js;
}
/**
* Removes an item from the CSS array if set
*
* @param $key the asset key
*/
public function removeCss($key)
{
$asset_key = md5($key);
if (isset($this->css[$asset_key])) {
unset($this->css[$asset_key]);
}
}
/**
* Removes an item from the JS array if set
*
* @param $key the asset key
*/
public function removeJs($key)
{
$asset_key = md5($key);
if (isset($this->js[$asset_key])) {
unset($this->js[$asset_key]);
}
}
/** /**
* Return the array of all the registered collections * Return the array of all the registered collections
* *
@@ -849,6 +922,16 @@ class Assets
return $this->collections; return $this->collections;
} }
/**
* Set the array of collections explicitly
*
* @param $collections
*/
public function setCollection($collections)
{
$this->collections = $collections;
}
/** /**
* Determines if an asset exists as a collection, CSS or JS reference * Determines if an asset exists as a collection, CSS or JS reference
* *
@@ -1020,18 +1103,37 @@ class Assets
/** /**
* Build local links including grav asset shortcodes * Build local links including grav asset shortcodes
* *
* @param string $asset the asset string reference * @param string $asset the asset string reference
* @param bool $absolute build absolute asset link
* *
* @return string the final link url to the asset * @return string the final link url to the asset
*/ */
protected function buildLocalLink($asset) protected function buildLocalLink($asset, $absolute = false)
{ {
try { try {
$asset = Grav::instance()['locator']->findResource($asset, false); $asset = Grav::instance()['locator']->findResource($asset, $absolute);
} catch (\Exception $e) { } catch (\Exception $e) {
} }
return $asset ? $this->base_url . ltrim($asset, '/') : false; $uri = $absolute ? $asset : $this->base_url . ltrim($asset, '/');
return $asset ? $uri : false;
}
/**
* Get the last modification time of asset
*
* @param string $asset the asset string reference
*
* @return string the last modifcation time or false on error
*/
protected function getLastModificationTime($asset)
{
$file = GRAV_ROOT . $asset;
if (Grav::instance()['locator']->isStream($asset)) {
$file = $this->buildLocalLink($asset, true);
}
return file_exists($file) ? filemtime($file) : false;
} }
/** /**
@@ -1244,6 +1346,21 @@ class Assets
$this->timestamp = '?' . $value; $this->timestamp = '?' . $value;
} }
public function getTimestamp($asset = null)
{
if (is_array($asset)) {
if ($asset['remote'] == false) {
if (Utils::contains($asset['asset'], '?')) {
return str_replace('?', '&', $this->timestamp);
} else {
return $this->timestamp;
}
}
} elseif (empty($asset)) {
return $this->timestamp;
}
}
/** /**
* @return string * @return string
*/ */

View File

@@ -1,15 +1,16 @@
<?php <?php
/**
* @package Grav.Common.Backup
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Backup; namespace Grav\Common\Backup;
use Grav\Common\Grav; use Grav\Common\Grav;
use Grav\Common\Inflector; use Grav\Common\Inflector;
/**
* The ZipBackup class lets you create simple zip-backups of a grav site
*
* @author RocketTheme
* @license MIT
*/
class ZipBackup class ZipBackup
{ {
protected static $ignorePaths = [ protected static $ignorePaths = [
@@ -45,7 +46,7 @@ class ZipBackup
} }
} }
$name = Grav::instance()['config']->get('site.title', basename(GRAV_ROOT)); $name = substr(strip_tags(Grav::instance()['config']->get('site.title', basename(GRAV_ROOT))), 0, 20);
$inflector = new Inflector(); $inflector = new Inflector();

View File

@@ -1,13 +1,15 @@
<?php <?php
/**
* @package Grav.Common
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common; namespace Grav\Common;
/** /**
* Handles browser and platform versions
*
* Internally uses the PhpUserAgent package https://github.com/donatj/PhpUserAgent * Internally uses the PhpUserAgent package https://github.com/donatj/PhpUserAgent
*
* @author RocketTheme
* @license MIT
*/ */
class Browser class Browser
{ {

View File

@@ -1,4 +1,11 @@
<?php <?php
/**
* @package Grav.Common
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common; namespace Grav\Common;
use \Doctrine\Common\Cache as DoctrineCache; use \Doctrine\Common\Cache as DoctrineCache;
@@ -16,9 +23,6 @@ use Grav\Common\Grav;
* MemCache * MemCache
* MemCacheD * MemCacheD
* FileSystem * FileSystem
*
* @author RocketTheme
* @license MIT
*/ */
class Cache extends Getters class Cache extends Getters
{ {
@@ -177,11 +181,18 @@ class Cache extends Getters
$driver->setMemcache($memcache); $driver->setMemcache($memcache);
break; break;
case 'memcached':
$memcached = new \Memcached();
$memcached->connect($this->config->get('system.cache.memcached.server', 'localhost'),
$this->config->get('system.cache.memcached.port', 11211));
$driver = new DoctrineCache\MemcachedCache();
$driver->setMemcached($memcached);
break;
case 'redis': case 'redis':
$redis = new \Redis(); $redis = new \Redis();
$redis->connect($this->config->get('system.cache.redis.server', 'localhost'), $redis->connect($this->config->get('system.cache.redis.server', 'localhost'),
$this->config->get('system.cache.redis.port', 6379)); $this->config->get('system.cache.redis.port', 6379));
$driver = new DoctrineCache\RedisCache(); $driver = new DoctrineCache\RedisCache();
$driver->setRedis($redis); $driver->setRedis($redis);
break; break;

View File

@@ -1,13 +1,13 @@
<?php <?php
/**
* @package Grav.Common
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common; namespace Grav\Common;
/**
* Offers composer helper methods.
*
* @author eschmar
* @license MIT
*/
class Composer class Composer
{ {
/** @const Default composer location */ /** @const Default composer location */

View File

@@ -1,11 +1,15 @@
<?php <?php
/**
* @package Grav.Common.Config
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Config; namespace Grav\Common\Config;
use RocketTheme\Toolbox\File\PhpFile; use RocketTheme\Toolbox\File\PhpFile;
/**
* The Compiled base class.
*/
abstract class CompiledBase abstract class CompiledBase
{ {
/** /**
@@ -192,9 +196,9 @@ abstract class CompiledBase
} }
$this->createObject($cache['data']); $this->createObject($cache['data']);
$this->finalizeObject(); $this->finalizeObject();
return true; return true;
} }

View File

@@ -1,13 +1,16 @@
<?php <?php
/**
* @package Grav.Common.Config
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Config; namespace Grav\Common\Config;
use Grav\Common\Data\Blueprint; use Grav\Common\Data\Blueprint;
use Grav\Common\Data\BlueprintSchema; use Grav\Common\Data\BlueprintSchema;
use Grav\Common\Grav; use Grav\Common\Grav;
/**
* The Compiled Blueprints class.
*/
class CompiledBlueprints extends CompiledBase class CompiledBlueprints extends CompiledBase
{ {
/** /**

View File

@@ -1,11 +1,15 @@
<?php <?php
/**
* @package Grav.Common.Config
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Config; namespace Grav\Common\Config;
use Grav\Common\File\CompiledYamlFile; use Grav\Common\File\CompiledYamlFile;
/**
* The Compiled Configuration class.
*/
class CompiledConfig extends CompiledBase class CompiledConfig extends CompiledBase
{ {
/** /**

View File

@@ -1,11 +1,15 @@
<?php <?php
/**
* @package Grav.Common.Config
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Config; namespace Grav\Common\Config;
use Grav\Common\File\CompiledYamlFile; use Grav\Common\File\CompiledYamlFile;
/**
* The Compiled Languages class.
*/
class CompiledLanguages extends CompiledBase class CompiledLanguages extends CompiledBase
{ {
/** /**

View File

@@ -1,4 +1,11 @@
<?php <?php
/**
* @package Grav.Common.Config
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Config; namespace Grav\Common\Config;
use Grav\Common\Debugger; use Grav\Common\Debugger;
@@ -6,12 +13,6 @@ use Grav\Common\Grav;
use Grav\Common\Data\Data; use Grav\Common\Data\Data;
use Grav\Common\Service\ConfigServiceProvider; use Grav\Common\Service\ConfigServiceProvider;
/**
* The Config class contains configuration information.
*
* @author RocketTheme
* @license MIT
*/
class Config extends Data class Config extends Data
{ {
protected $checksum; protected $checksum;

View File

@@ -1,11 +1,15 @@
<?php <?php
/**
* @package Grav.Common.Config
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Config; namespace Grav\Common\Config;
use Grav\Common\Filesystem\Folder; use Grav\Common\Filesystem\Folder;
/**
* The Configuration & Blueprints Finder class.
*/
class ConfigFileFinder class ConfigFileFinder
{ {
protected $base = ''; protected $base = '';

View File

@@ -1,14 +1,15 @@
<?php <?php
/**
* @package Grav.Common.Config
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Config; namespace Grav\Common\Config;
use Grav\Common\Data\Data; use Grav\Common\Data\Data;
/**
* The Languages class contains configuration rules.
*
* @author RocketTheme
* @license MIT
*/
class Languages extends Data class Languages extends Data
{ {
public function checksum($checksum = null) public function checksum($checksum = null)

View File

@@ -1,4 +1,11 @@
<?php <?php
/**
* @package Grav.Common.Config
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Config; namespace Grav\Common\Config;
use Grav\Common\File\CompiledYamlFile; use Grav\Common\File\CompiledYamlFile;
@@ -8,12 +15,6 @@ use Pimple\Container;
use RocketTheme\Toolbox\File\YamlFile; use RocketTheme\Toolbox\File\YamlFile;
use RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator; use RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator;
/**
* The Config class contains configuration information.
*
* @author RocketTheme
* @license MIT
*/
class Setup extends Data class Setup extends Data
{ {
protected $streams = [ protected $streams = [

View File

@@ -1,4 +1,11 @@
<?php <?php
/**
* @package Grav.Common.Data
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Data; namespace Grav\Common\Data;
use Grav\Common\File\CompiledYamlFile; use Grav\Common\File\CompiledYamlFile;
@@ -6,11 +13,6 @@ use Grav\Common\Grav;
use RocketTheme\Toolbox\Blueprints\BlueprintForm; use RocketTheme\Toolbox\Blueprints\BlueprintForm;
use RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator; use RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator;
/**
* The Config class contains configuration information.
*
* @author RocketTheme
*/
class Blueprint extends BlueprintForm class Blueprint extends BlueprintForm
{ {
/** /**

View File

@@ -1,4 +1,11 @@
<?php <?php
/**
* @package Grav.Common.Data
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Data; namespace Grav\Common\Data;
use Grav\Common\Grav; use Grav\Common\Grav;
@@ -6,12 +13,6 @@ use RocketTheme\Toolbox\ArrayTraits\Export;
use RocketTheme\Toolbox\ArrayTraits\ExportInterface; use RocketTheme\Toolbox\ArrayTraits\ExportInterface;
use RocketTheme\Toolbox\Blueprints\BlueprintSchema as BlueprintSchemaBase; use RocketTheme\Toolbox\Blueprints\BlueprintSchema as BlueprintSchemaBase;
/**
* Blueprint schema handles the internal logic of blueprints.
*
* @author RocketTheme
* @license MIT
*/
class BlueprintSchema extends BlueprintSchemaBase implements ExportInterface class BlueprintSchema extends BlueprintSchemaBase implements ExportInterface
{ {
use Export; use Export;
@@ -132,8 +133,15 @@ class BlueprintSchema extends BlueprintSchemaBase implements ExportInterface
} }
$field = $this->items[$field]; $field = $this->items[$field];
if (isset($field['validate']['required']) if (isset($field['validate']['required'])
&& $field['validate']['required'] === true && $field['validate']['required'] === true) {
&& !isset($data[$name])) {
if (isset($data[$name])) {
continue;
}
if ($field['type'] == 'file' && isset($data['data']['name'][$name])) { //handle case of file input fields required
continue;
}
$value = isset($field['label']) ? $field['label'] : $field['name']; $value = isset($field['label']) ? $field['label'] : $field['name'];
$language = Grav::instance()['language']; $language = Grav::instance()['language'];
$message = sprintf($language->translate('FORM.MISSING_REQUIRED_FIELD', null, true) . ' %s', $language->translate($value)); $message = sprintf($language->translate('FORM.MISSING_REQUIRED_FIELD', null, true) . ' %s', $language->translate($value));

View File

@@ -1,15 +1,16 @@
<?php <?php
/**
* @package Grav.Common.Data
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Data; namespace Grav\Common\Data;
use Grav\Common\Grav; use Grav\Common\Grav;
use RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator; use RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator;
/**
* Blueprints class keeps track on blueprint instances.
*
* @author RocketTheme
* @license MIT
*/
class Blueprints class Blueprints
{ {
protected $search; protected $search;

View File

@@ -1,4 +1,11 @@
<?php <?php
/**
* @package Grav.Common.Data
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Data; namespace Grav\Common\Data;
use RocketTheme\Toolbox\ArrayTraits\Countable; use RocketTheme\Toolbox\ArrayTraits\Countable;
@@ -8,12 +15,6 @@ use RocketTheme\Toolbox\ArrayTraits\NestedArrayAccessWithGetters;
use RocketTheme\Toolbox\File\File; use RocketTheme\Toolbox\File\File;
use RocketTheme\Toolbox\File\FileInterface; use RocketTheme\Toolbox\File\FileInterface;
/**
* Recursive data object
*
* @author RocketTheme
* @license MIT
*/
class Data implements DataInterface, \ArrayAccess, \Countable, ExportInterface class Data implements DataInterface, \ArrayAccess, \Countable, ExportInterface
{ {
use NestedArrayAccessWithGetters, Countable, Export; use NestedArrayAccessWithGetters, Countable, Export;

View File

@@ -1,14 +1,15 @@
<?php <?php
/**
* @package Grav.Common.Data
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Data; namespace Grav\Common\Data;
use RocketTheme\Toolbox\File\FileInterface; use RocketTheme\Toolbox\File\FileInterface;
/**
* Data interface
*
* @author RocketTheme
* @license MIT
*/
interface DataInterface interface DataInterface
{ {
/** /**

View File

@@ -1,4 +1,11 @@
<?php <?php
/**
* @package Grav.Common.Data
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Data; namespace Grav\Common\Data;
use Grav\Common\Grav; use Grav\Common\Grav;
@@ -6,12 +13,6 @@ use Symfony\Component\Yaml\Exception\ParseException;
use Symfony\Component\Yaml\Parser; use Symfony\Component\Yaml\Parser;
use Symfony\Component\Yaml\Yaml; use Symfony\Component\Yaml\Yaml;
/**
* Data validation.
*
* @author RocketTheme
* @license MIT
*/
class Validation class Validation
{ {
/** /**
@@ -404,7 +405,15 @@ class Validation
*/ */
public static function typeEmail($value, array $params, array $field) public static function typeEmail($value, array $params, array $field)
{ {
return self::typeText($value, $params, $field) && filter_var($value, FILTER_VALIDATE_EMAIL); $values = !is_array($value) ? explode(',', preg_replace('/\s+/', '', $value)) : $value;
foreach ($values as $value) {
if (!(self::typeText($value, $params, $field) && filter_var($value, FILTER_VALIDATE_EMAIL))) {
return false;
}
}
return true;
} }
/** /**

View File

@@ -1,4 +1,11 @@
<?php <?php
/**
* @package Grav.Common.Data
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Data; namespace Grav\Common\Data;
use Grav\Common\Grav; use Grav\Common\Grav;

View File

@@ -1,4 +1,11 @@
<?php <?php
/**
* @package Grav.Common
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common; namespace Grav\Common;
use DebugBar\DataCollector\ConfigCollector; use DebugBar\DataCollector\ConfigCollector;
@@ -6,10 +13,6 @@ use DebugBar\JavascriptRenderer;
use DebugBar\StandardDebugBar; use DebugBar\StandardDebugBar;
use Grav\Common\Config\Config; use Grav\Common\Config\Config;
/**
* Class Debugger
* @package Grav\Common
*/
class Debugger class Debugger
{ {
/** @var Grav $grav */ /** @var Grav $grav */
@@ -214,4 +217,19 @@ class Debugger
return $this; return $this;
} }
/**
* Dump exception into the Messages tab of the Debug Bar
*
* @param \Exception $e
* @return Debugger
*/
public function addException(\Exception $e)
{
if ($this->enabled()) {
$this->debugbar['exceptions']->addException($e);
}
return $this;
}
} }

View File

@@ -1,13 +1,16 @@
<?php <?php
/**
* @package Grav.Common.Errors
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Errors; namespace Grav\Common\Errors;
use Grav\Common\Grav; use Grav\Common\Grav;
use Whoops; use Whoops;
/**
* Class Debugger
* @package Grav\Common
*/
class Errors class Errors
{ {
public function resetHandlers() public function resetHandlers()

View File

@@ -1,4 +1,11 @@
<?php <?php
/**
* @package Grav.Common.Errors
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Errors; namespace Grav\Common\Errors;
use Whoops\Handler\Handler; use Whoops\Handler\Handler;

View File

@@ -1,17 +1,15 @@
<?php <?php
/**
* @package Grav.Common.File
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\File; namespace Grav\Common\File;
use RocketTheme\Toolbox\File\PhpFile; use RocketTheme\Toolbox\File\PhpFile;
/**
* Class CompiledFile
* @package Grav\Common\File
*
* @property string $filename
* @property string $extension
* @property string $raw
* @property array|string $content
*/
trait CompiledFile trait CompiledFile
{ {
/** /**

View File

@@ -1,4 +1,11 @@
<?php <?php
/**
* @package Grav.Common.File
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\File; namespace Grav\Common\File;
use RocketTheme\Toolbox\File\MarkdownFile; use RocketTheme\Toolbox\File\MarkdownFile;

View File

@@ -1,4 +1,11 @@
<?php <?php
/**
* @package Grav.Common.File
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\File; namespace Grav\Common\File;
use RocketTheme\Toolbox\File\YamlFile; use RocketTheme\Toolbox\File\YamlFile;

View File

@@ -1,15 +1,16 @@
<?php <?php
/**
* @package Grav.Common.FileSystem
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Filesystem; namespace Grav\Common\Filesystem;
use Grav\Common\Grav; use Grav\Common\Grav;
use RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator; use RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator;
/**
* Folder helper class.
*
* @author RocketTheme
* @license MIT
*/
abstract class Folder abstract class Folder
{ {
/** /**
@@ -435,22 +436,11 @@ abstract class Folder
return @unlink($folder); return @unlink($folder);
} }
$files = new \RecursiveIteratorIterator( // Go through all items in filesystem and recursively remove everything.
new \RecursiveDirectoryIterator($folder, \RecursiveDirectoryIterator::SKIP_DOTS), $files = array_diff(scandir($folder), array('.', '..'));
\RecursiveIteratorIterator::CHILD_FIRST foreach ($files as $file) {
); $path = "{$folder}/{$file}";
(is_dir($path)) ? self::doDelete($path) : @unlink($path);
/** @var \DirectoryIterator $fileinfo */
foreach ($files as $fileinfo) {
if ($fileinfo->isDir()) {
if (false === @rmdir($fileinfo->getRealPath())) {
return false;
}
} else {
if (false === @unlink($fileinfo->getRealPath())) {
return false;
}
}
} }
return $include_target ? @rmdir($folder) : true; return $include_target ? @rmdir($folder) : true;

View File

@@ -1,12 +1,15 @@
<?php <?php
/**
* @package Grav.Common.FileSystem
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Filesystem; namespace Grav\Common\Filesystem;
use Grav\Common\Grav; use Grav\Common\Grav;
/**
* Class RecursiveFolderFilterIterator
* @package Grav\Common\Filesystem
*/
class RecursiveFolderFilterIterator extends \RecursiveFilterIterator class RecursiveFolderFilterIterator extends \RecursiveFilterIterator
{ {
protected static $folder_ignores; protected static $folder_ignores;

View File

@@ -1,4 +1,11 @@
<?php <?php
/**
* @package Grav.Common.GPM
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\GPM; namespace Grav\Common\GPM;
use Grav\Common\Iterator; use Grav\Common\Iterator;

View File

@@ -1,4 +1,11 @@
<?php <?php
/**
* @package Grav.Common.GPM
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\GPM\Common; namespace Grav\Common\GPM\Common;
use Grav\Common\Iterator; use Grav\Common\Iterator;

View File

@@ -1,4 +1,11 @@
<?php <?php
/**
* @package Grav.Common.GPM
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\GPM\Common; namespace Grav\Common\GPM\Common;
use Grav\Common\Iterator; use Grav\Common\Iterator;

View File

@@ -1,19 +1,15 @@
<?php <?php
/**
* @package Grav.Common.GPM
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\GPM\Common; namespace Grav\Common\GPM\Common;
use Grav\Common\Data\Data; use Grav\Common\Data\Data;
/**
* @property string name
* @property string version
* @property string available
* @property string package_type
* @property string description_plain
* @property string slug
* @property array author
* @property mixed changelog
*/
class Package { class Package {
protected $data; protected $data;

View File

@@ -1,4 +1,11 @@
<?php <?php
/**
* @package Grav.Common.GPM
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\GPM; namespace Grav\Common\GPM;
use Grav\Common\Grav; use Grav\Common\Grav;
@@ -32,19 +39,23 @@ class GPM extends Iterator
*/ */
protected $cache; protected $cache;
protected $install_paths = ['plugins' => 'user/plugins/%name%', 'themes' => 'user/themes/%name%', 'skeletons' => 'user/']; protected $install_paths = [
'plugins' => 'user/plugins/%name%',
'themes' => 'user/themes/%name%',
'skeletons' => 'user/'
];
/** /**
* Creates a new GPM instance with Local and Remote packages available * Creates a new GPM instance with Local and Remote packages available
* @param boolean $refresh Applies to Remote Packages only and forces a refetch of data * @param boolean $refresh Applies to Remote Packages only and forces a refetch of data
* @param callable $callback Either a function or callback in array notation * @param callable $callback Either a function or callback in array notation
*/ */
public function __construct($refresh = false, $callback = null) public function __construct($refresh = false, $callback = null)
{ {
$this->installed = new Local\Packages(); $this->installed = new Local\Packages();
try { try {
$this->repository = new Remote\Packages($refresh, $callback); $this->repository = new Remote\Packages($refresh, $callback);
$this->grav = new Remote\GravCore($refresh, $callback); $this->grav = new Remote\GravCore($refresh, $callback);
} catch (\Exception $e) { } catch (\Exception $e) {
} }
} }
@@ -72,7 +83,7 @@ class GPM extends Iterator
/** /**
* Return the instance of a specific Package * Return the instance of a specific Package
* *
* @param string $slug The slug of the Package * @param string $slug The slug of the Package
* @return Local\Package The instance of the Package * @return Local\Package The instance of the Package
*/ */
public function getInstalledPackage($slug) public function getInstalledPackage($slug)
@@ -88,7 +99,7 @@ class GPM extends Iterator
/** /**
* Return the instance of a specific Plugin * Return the instance of a specific Plugin
* @param string $slug The slug of the Plugin * @param string $slug The slug of the Plugin
* @return Local\Package The instance of the Plugin * @return Local\Package The instance of the Plugin
*/ */
public function getInstalledPlugin($slug) public function getInstalledPlugin($slug)
@@ -107,7 +118,7 @@ class GPM extends Iterator
/** /**
* Checks if a Plugin is installed * Checks if a Plugin is installed
* @param string $slug The slug of the Plugin * @param string $slug The slug of the Plugin
* @return boolean True if the Plugin has been installed. False otherwise * @return boolean True if the Plugin has been installed. False otherwise
*/ */
public function isPluginInstalled($slug) public function isPluginInstalled($slug)
@@ -122,7 +133,7 @@ class GPM extends Iterator
/** /**
* Return the instance of a specific Theme * Return the instance of a specific Theme
* @param string $slug The slug of the Theme * @param string $slug The slug of the Theme
* @return Local\Package The instance of the Theme * @return Local\Package The instance of the Theme
*/ */
public function getInstalledTheme($slug) public function getInstalledTheme($slug)
@@ -141,7 +152,7 @@ class GPM extends Iterator
/** /**
* Checks if a Theme is installed * Checks if a Theme is installed
* @param string $slug The slug of the Theme * @param string $slug The slug of the Theme
* @return boolean True if the Theme has been installed. False otherwise * @return boolean True if the Theme has been installed. False otherwise
*/ */
public function isThemeInstalled($slug) public function isThemeInstalled($slug)
@@ -166,20 +177,23 @@ class GPM extends Iterator
/** /**
* Returns an array of Plugins and Themes that can be updated. * Returns an array of Plugins and Themes that can be updated.
* Plugins and Themes are extended with the `available` property that relies to the remote version * Plugins and Themes are extended with the `available` property that relies to the remote version
* @param $list_type_update specifies what type of package to update
* @return array Array of updatable Plugins and Themes. * @return array Array of updatable Plugins and Themes.
* Format: ['total' => int, 'plugins' => array, 'themes' => array] * Format: ['total' => int, 'plugins' => array, 'themes' => array]
*/ */
public function getUpdatable() public function getUpdatable($list_type_update = ['plugins' => true, 'themes' => true])
{ {
$plugins = $this->getUpdatablePlugins();
$themes = $this->getUpdatableThemes();
$items = [
'total' => count($plugins)+count($themes),
'plugins' => $plugins,
'themes' => $themes
];
$items = ['total' => 0];
foreach ($list_type_update as $type => $type_updatable) {
if ($type_updatable === false) {
continue;
}
$methodUpdatableType = 'getUpdatable' . ucfirst($type);
$to_update = $this->$methodUpdatableType();
$items[$type] = $to_update;
$items['total'] += count($to_update);
}
return $items; return $items;
} }
@@ -190,7 +204,7 @@ class GPM extends Iterator
*/ */
public function getUpdatablePlugins() public function getUpdatablePlugins()
{ {
$items = []; $items = [];
$repository = $this->repository['plugins']; $repository = $this->repository['plugins'];
// local cache to speed things up // local cache to speed things up
@@ -203,15 +217,15 @@ class GPM extends Iterator
continue; continue;
} }
$local_version = $plugin->version ? $plugin->version : 'Unknown'; $local_version = $plugin->version ? $plugin->version : 'Unknown';
$remote_version = $repository[$slug]->version; $remote_version = $repository[$slug]->version;
if (version_compare($local_version, $remote_version) < 0) { if (version_compare($local_version, $remote_version) < 0) {
$repository[$slug]->available = $remote_version; $repository[$slug]->available = $remote_version;
$repository[$slug]->version = $local_version; $repository[$slug]->version = $local_version;
$repository[$slug]->name = $repository[$slug]->name; $repository[$slug]->name = $repository[$slug]->name;
$repository[$slug]->type = $repository[$slug]->release_type; $repository[$slug]->type = $repository[$slug]->release_type;
$items[$slug] = $repository[$slug]; $items[$slug] = $repository[$slug];
} }
} }
@@ -245,7 +259,7 @@ class GPM extends Iterator
/** /**
* Check if a Plugin or Theme is updatable * Check if a Plugin or Theme is updatable
* @param string $slug The slug of the package * @param string $slug The slug of the package
* @return boolean True if updatable. False otherwise or if not found * @return boolean True if updatable. False otherwise or if not found
*/ */
public function isUpdatable($slug) public function isUpdatable($slug)
@@ -255,12 +269,12 @@ class GPM extends Iterator
/** /**
* Checks if a Plugin is updatable * Checks if a Plugin is updatable
* @param string $plugin The slug of the Plugin * @param string $plugin The slug of the Plugin
* @return boolean True if the Plugin is updatable. False otherwise * @return boolean True if the Plugin is updatable. False otherwise
*/ */
public function isPluginUpdatable($plugin) public function isPluginUpdatable($plugin)
{ {
return array_key_exists($plugin, (array) $this->getUpdatablePlugins()); return array_key_exists($plugin, (array)$this->getUpdatablePlugins());
} }
/** /**
@@ -270,7 +284,7 @@ class GPM extends Iterator
*/ */
public function getUpdatableThemes() public function getUpdatableThemes()
{ {
$items = []; $items = [];
$repository = $this->repository['themes']; $repository = $this->repository['themes'];
// local cache to speed things up // local cache to speed things up
@@ -283,14 +297,14 @@ class GPM extends Iterator
continue; continue;
} }
$local_version = $plugin->version ? $plugin->version : 'Unknown'; $local_version = $plugin->version ? $plugin->version : 'Unknown';
$remote_version = $repository[$slug]->version; $remote_version = $repository[$slug]->version;
if (version_compare($local_version, $remote_version) < 0) { if (version_compare($local_version, $remote_version) < 0) {
$repository[$slug]->available = $remote_version; $repository[$slug]->available = $remote_version;
$repository[$slug]->version = $local_version; $repository[$slug]->version = $local_version;
$repository[$slug]->type = $repository[$slug]->release_type; $repository[$slug]->type = $repository[$slug]->release_type;
$items[$slug] = $repository[$slug]; $items[$slug] = $repository[$slug];
} }
} }
@@ -301,12 +315,12 @@ class GPM extends Iterator
/** /**
* Checks if a Theme is Updatable * Checks if a Theme is Updatable
* @param string $theme The slug of the Theme * @param string $theme The slug of the Theme
* @return boolean True if the Theme is updatable. False otherwise * @return boolean True if the Theme is updatable. False otherwise
*/ */
public function isThemeUpdatable($theme) public function isThemeUpdatable($theme)
{ {
return array_key_exists($theme, (array) $this->getUpdatableThemes()); return array_key_exists($theme, (array)$this->getUpdatableThemes());
} }
/** /**
@@ -409,7 +423,7 @@ class GPM extends Iterator
/** /**
* Searches for a Package in the repository * Searches for a Package in the repository
* @param string $search Can be either the slug or the name * @param string $search Can be either the slug or the name
* @return Remote\Package Package if found, FALSE if not * @return Remote\Package Package if found, FALSE if not
*/ */
public function findPackage($search) public function findPackage($search)
@@ -437,15 +451,19 @@ class GPM extends Iterator
throw new \RuntimeException("GPM not reachable. Please check your internet connection or check the Grav site is reachable"); throw new \RuntimeException("GPM not reachable. Please check your internet connection or check the Grav site is reachable");
} }
if ($themes) foreach ($themes as $slug => $theme) { if ($themes) {
if ($search == $slug || $search == $theme->name) { foreach ($themes as $slug => $theme) {
return $theme; if ($search == $slug || $search == $theme->name) {
return $theme;
}
} }
} }
if ($plugins) foreach ($plugins as $slug => $plugin) { if ($plugins) {
if ($search == $slug || $search == $plugin->name) { foreach ($plugins as $slug => $plugin) {
return $plugin; if ($search == $slug || $search == $plugin->name) {
return $plugin;
}
} }
} }
@@ -467,7 +485,7 @@ class GPM extends Iterator
$repository = ''; $repository = '';
// if this is an object, get the search data from the key // if this is an object, get the search data from the key
if (is_object($search)) { if (is_object($search)) {
$search = (array) $search; $search = (array)$search;
$key = key($search); $key = key($search);
$repository = $search[$key]; $repository = $search[$key];
$search = $key; $search = $key;
@@ -521,9 +539,9 @@ class GPM extends Iterator
$dependent_packages = []; $dependent_packages = [];
foreach($packages as $package_name => $package) { foreach ($packages as $package_name => $package) {
if (isset($package['dependencies'])) { if (isset($package['dependencies'])) {
foreach($package['dependencies'] as $dependency) { foreach ($package['dependencies'] as $dependency) {
if (is_array($dependency)) { if (is_array($dependency)) {
$dependency = array_keys($dependency)[0]; $dependency = array_keys($dependency)[0];
} }
@@ -550,7 +568,7 @@ class GPM extends Iterator
public function getVersionOfDependencyRequiredByPackage($package_slug, $dependency_slug) public function getVersionOfDependencyRequiredByPackage($package_slug, $dependency_slug)
{ {
$dependencies = $this->getInstalledPackage($package_slug)->dependencies; $dependencies = $this->getInstalledPackage($package_slug)->dependencies;
foreach($dependencies as $dependency) { foreach ($dependencies as $dependency) {
if (isset($dependency[$dependency_slug])) { if (isset($dependency[$dependency_slug])) {
return $dependency[$dependency_slug]; return $dependency[$dependency_slug];
} }
@@ -562,22 +580,27 @@ class GPM extends Iterator
* Thrown an exception if it cannot be updated because another package installed requires it to be at an older version. * Thrown an exception if it cannot be updated because another package installed requires it to be at an older version.
* *
* @param string $slug * @param string $slug
* @param string $version_with_operator * @param string $version_with_operator
* @param array $ignore_packages_list * @param array $ignore_packages_list
* *
* @return bool * @return bool
* @throws \Exception * @throws \Exception
*/ */
public function checkNoOtherPackageNeedsThisDependencyInALowerVersion($slug, $version_with_operator, $ignore_packages_list) { public function checkNoOtherPackageNeedsThisDependencyInALowerVersion(
$slug,
$version_with_operator,
$ignore_packages_list
) {
// check if any of the currently installed package need this in a lower version than the one we need. In case, abort and tell which package // check if any of the currently installed package need this in a lower version than the one we need. In case, abort and tell which package
$dependent_packages = $this->getPackagesThatDependOnPackage($slug); $dependent_packages = $this->getPackagesThatDependOnPackage($slug);
$version = $this->calculateVersionNumberFromDependencyVersion($version_with_operator); $version = $this->calculateVersionNumberFromDependencyVersion($version_with_operator);
if (count($dependent_packages)) { if (count($dependent_packages)) {
foreach($dependent_packages as $dependent_package) { foreach ($dependent_packages as $dependent_package) {
$other_dependency_version_with_operator = $this->getVersionOfDependencyRequiredByPackage($dependent_package, $slug); $other_dependency_version_with_operator = $this->getVersionOfDependencyRequiredByPackage($dependent_package,
$other_dependency_version= $this->calculateVersionNumberFromDependencyVersion($other_dependency_version_with_operator); $slug);
$other_dependency_version = $this->calculateVersionNumberFromDependencyVersion($other_dependency_version_with_operator);
// check version is compatible with the one needed by the current package // check version is compatible with the one needed by the current package
if ($this->versionFormatIsNextSignificantRelease($other_dependency_version_with_operator)) { if ($this->versionFormatIsNextSignificantRelease($other_dependency_version_with_operator)) {
@@ -606,7 +629,8 @@ class GPM extends Iterator
public function checkPackagesCanBeInstalled($packages_names_list) public function checkPackagesCanBeInstalled($packages_names_list)
{ {
foreach ($packages_names_list as $package_name) { foreach ($packages_names_list as $package_name) {
$this->checkNoOtherPackageNeedsThisDependencyInALowerVersion($package_name, $this->getLatestVersionOfPackage($package_name), $packages_names_list); $this->checkNoOtherPackageNeedsThisDependencyInALowerVersion($package_name,
$this->getLatestVersionOfPackage($package_name), $packages_names_list);
} }
} }
@@ -623,7 +647,8 @@ class GPM extends Iterator
* @return mixed * @return mixed
* @throws \Exception * @throws \Exception
*/ */
public function getDependencies($packages) { public function getDependencies($packages)
{
$dependencies = $this->calculateMergedDependenciesOfPackages($packages); $dependencies = $this->calculateMergedDependenciesOfPackages($packages);
foreach ($dependencies as $dependency_slug => $dependencyVersionWithOperator) { foreach ($dependencies as $dependency_slug => $dependencyVersionWithOperator) {
if (in_array($dependency_slug, $packages)) { if (in_array($dependency_slug, $packages)) {
@@ -633,7 +658,9 @@ class GPM extends Iterator
//First, check for Grav dependency. If a dependency requires Grav > the current version, abort and tell. //First, check for Grav dependency. If a dependency requires Grav > the current version, abort and tell.
if ($dependency_slug == 'grav') { if ($dependency_slug == 'grav') {
if (version_compare($this->calculateVersionNumberFromDependencyVersion($dependencyVersionWithOperator), GRAV_VERSION) === 1) { if (version_compare($this->calculateVersionNumberFromDependencyVersion($dependencyVersionWithOperator),
GRAV_VERSION) === 1
) {
//Needs a Grav update first //Needs a Grav update first
throw new \Exception("<red>One of the packages require Grav " . $dependencies['grav'] . ". Please update Grav to the latest release."); throw new \Exception("<red>One of the packages require Grav " . $dependencies['grav'] . ". Please update Grav to the latest release.");
} else { } else {
@@ -674,7 +701,8 @@ class GPM extends Iterator
if ($this->firstVersionIsLower($latestRelease, $dependencyVersion)) { if ($this->firstVersionIsLower($latestRelease, $dependencyVersion)) {
//throw an exception if a required version cannot be found in the GPM yet //throw an exception if a required version cannot be found in the GPM yet
throw new \Exception('Dependency <cyan>' . $package_yaml['name'] . '</cyan> is required in version <cyan>' . $dependencyVersion . '</cyan> which is higher than the latest release, <cyan>' . $latestRelease . '</cyan>. Try running `bin/gpm -f index` to force a refresh of the GPM cache', 1); throw new \Exception('Dependency <cyan>' . $package_yaml['name'] . '</cyan> is required in version <cyan>' . $dependencyVersion . '</cyan> which is higher than the latest release, <cyan>' . $latestRelease . '</cyan>. Try running `bin/gpm -f index` to force a refresh of the GPM cache',
1);
} }
if ($this->firstVersionIsLower($currentlyInstalledVersion, $dependencyVersion)) { if ($this->firstVersionIsLower($currentlyInstalledVersion, $dependencyVersion)) {
@@ -717,18 +745,20 @@ class GPM extends Iterator
public function checkNoOtherPackageNeedsTheseDependenciesInALowerVersion($dependencies_slugs) public function checkNoOtherPackageNeedsTheseDependenciesInALowerVersion($dependencies_slugs)
{ {
foreach ($dependencies_slugs as $dependency_slug) { foreach ($dependencies_slugs as $dependency_slug) {
$this->checkNoOtherPackageNeedsThisDependencyInALowerVersion($dependency_slug, $this->getLatestVersionOfPackage($dependency_slug), $dependencies_slugs); $this->checkNoOtherPackageNeedsThisDependencyInALowerVersion($dependency_slug,
$this->getLatestVersionOfPackage($dependency_slug), $dependencies_slugs);
} }
} }
private function firstVersionIsLower($firstVersion, $secondVersion) { private function firstVersionIsLower($firstVersion, $secondVersion)
{
return version_compare($firstVersion, $secondVersion) == -1; return version_compare($firstVersion, $secondVersion) == -1;
} }
/** /**
* Calculates and merges the dependencies of a package * Calculates and merges the dependencies of a package
* *
* @param string $packageName The package information * @param string $packageName The package information
* *
* @param array $dependencies The dependencies array * @param array $dependencies The dependencies array
* *
@@ -758,8 +788,7 @@ class GPM extends Iterator
//Factor in the package dependencies too //Factor in the package dependencies too
$dependencies = $this->calculateMergedDependenciesOfPackage($current_package_name, $dependencies); $dependencies = $this->calculateMergedDependenciesOfPackage($current_package_name, $dependencies);
} } else {
else {
// Dependency already added by another package // Dependency already added by another package
//if this package requires a version higher than the currently stored one, store this requirement instead //if this package requires a version higher than the currently stored one, store this requirement instead
if (isset($current_package_version_information) && $current_package_version_information !== '*') { if (isset($current_package_version_information) && $current_package_version_information !== '*') {
@@ -778,7 +807,8 @@ class GPM extends Iterator
$current_package_version_number = $this->calculateVersionNumberFromDependencyVersion($current_package_version_information); $current_package_version_number = $this->calculateVersionNumberFromDependencyVersion($current_package_version_information);
if (!$current_package_version_number) { if (!$current_package_version_number) {
throw new \Exception('Bad format for version of dependency ' . $current_package_name . ' for package ' . $packageName, 1); throw new \Exception('Bad format for version of dependency ' . $current_package_name . ' for package ' . $packageName,
1);
} }
$current_package_version_is_in_next_significant_release_format = false; $current_package_version_is_in_next_significant_release_format = false;
@@ -792,13 +822,17 @@ class GPM extends Iterator
} else { } else {
if (!$currently_stored_version_is_in_next_significant_release_format && !$current_package_version_is_in_next_significant_release_format) { if (!$currently_stored_version_is_in_next_significant_release_format && !$current_package_version_is_in_next_significant_release_format) {
//Comparing versions equals or higher, a simple version_compare is enough //Comparing versions equals or higher, a simple version_compare is enough
if (version_compare($currently_stored_version_number, $current_package_version_number) == -1) { //Current package version is higher if (version_compare($currently_stored_version_number,
$current_package_version_number) == -1
) { //Current package version is higher
$dependencies[$current_package_name] = $current_package_version_information; $dependencies[$current_package_name] = $current_package_version_information;
} }
} else { } else {
$compatible = $this->checkNextSignificantReleasesAreCompatible($currently_stored_version_number, $current_package_version_number); $compatible = $this->checkNextSignificantReleasesAreCompatible($currently_stored_version_number,
$current_package_version_number);
if (!$compatible) { if (!$compatible) {
throw new \Exception('Dependency ' . $current_package_name . ' is required in two incompatible versions', 2); throw new \Exception('Dependency ' . $current_package_name . ' is required in two incompatible versions',
2);
} }
} }
} }
@@ -866,7 +900,8 @@ class GPM extends Iterator
* *
* @return bool * @return bool
*/ */
public function versionFormatIsNextSignificantRelease($version) { public function versionFormatIsNextSignificantRelease($version)
{
return substr($version, 0, 1) == '~'; return substr($version, 0, 1) == '~';
} }
@@ -879,7 +914,8 @@ class GPM extends Iterator
* *
* @return bool * @return bool
*/ */
public function versionFormatIsEqualOrHigher($version) { public function versionFormatIsEqualOrHigher($version)
{
return substr($version, 0, 2) == '>='; return substr($version, 0, 2) == '>=';
} }

View File

@@ -1,4 +1,11 @@
<?php <?php
/**
* @package Grav.Common.GPM
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\GPM; namespace Grav\Common\GPM;
use Grav\Common\Filesystem\Folder; use Grav\Common\Filesystem\Folder;

View File

@@ -1,4 +1,10 @@
<?php <?php
/**
* @package Grav.Common.GPM
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\GPM\Local; namespace Grav\Common\GPM\Local;

View File

@@ -1,4 +1,11 @@
<?php <?php
/**
* @package Grav.Common.GPM
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\GPM\Local; namespace Grav\Common\GPM\Local;
use Grav\Common\Data\Data; use Grav\Common\Data\Data;

View File

@@ -1,4 +1,11 @@
<?php <?php
/**
* @package Grav.Common.GPM
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\GPM\Local; namespace Grav\Common\GPM\Local;
use Grav\Common\GPM\Common\CachedCollection; use Grav\Common\GPM\Common\CachedCollection;

View File

@@ -1,12 +1,15 @@
<?php <?php
/**
* @package Grav.Common.GPM
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\GPM\Local; namespace Grav\Common\GPM\Local;
use Grav\Common\Grav; use Grav\Common\Grav;
/**
* Class Plugins
* @package Grav\Common\GPM\Local
*/
class Plugins extends AbstractPackageCollection class Plugins extends AbstractPackageCollection
{ {
/** /**

View File

@@ -1,12 +1,15 @@
<?php <?php
/**
* @package Grav.Common.GPM
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\GPM\Local; namespace Grav\Common\GPM\Local;
use Grav\Common\Grav; use Grav\Common\Grav;
/**
* Class Themes
* @package Grav\Common\GPM\Local
*/
class Themes extends AbstractPackageCollection class Themes extends AbstractPackageCollection
{ {
/** /**

View File

@@ -1,4 +1,11 @@
<?php <?php
/**
* @package Grav.Common.GPM
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\GPM\Remote; namespace Grav\Common\GPM\Remote;
use Grav\Common\Grav; use Grav\Common\Grav;
@@ -6,10 +13,6 @@ use Grav\Common\GPM\Common\AbstractPackageCollection as BaseCollection;
use Grav\Common\GPM\Response; use Grav\Common\GPM\Response;
use \Doctrine\Common\Cache\FilesystemCache; use \Doctrine\Common\Cache\FilesystemCache;
/**
* Class AbstractPackageCollection
* @package Grav\Common\GPM\Remote
*/
class AbstractPackageCollection extends BaseCollection class AbstractPackageCollection extends BaseCollection
{ {
/** /**

View File

@@ -1,4 +1,11 @@
<?php <?php
/**
* @package Grav.Common.GPM
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\GPM\Remote; namespace Grav\Common\GPM\Remote;
use Grav\Common\Grav; use Grav\Common\Grav;

View File

@@ -1,4 +1,11 @@
<?php <?php
/**
* @package Grav.Common.GPM
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\GPM\Remote; namespace Grav\Common\GPM\Remote;
use Grav\Common\Data\Data; use Grav\Common\Data\Data;

View File

@@ -1,4 +1,11 @@
<?php <?php
/**
* @package Grav.Common.GPM
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\GPM\Remote; namespace Grav\Common\GPM\Remote;
use Grav\Common\GPM\Common\CachedCollection; use Grav\Common\GPM\Common\CachedCollection;

View File

@@ -1,10 +1,13 @@
<?php <?php
/**
* @package Grav.Common.GPM
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\GPM\Remote; namespace Grav\Common\GPM\Remote;
/**
* Class Plugins
* @package Grav\Common\GPM\Remote
*/
class Plugins extends AbstractPackageCollection class Plugins extends AbstractPackageCollection
{ {
/** /**

View File

@@ -1,10 +1,13 @@
<?php <?php
/**
* @package Grav.Common.GPM
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\GPM\Remote; namespace Grav\Common\GPM\Remote;
/**
* Class Themes
* @package Grav\Common\GPM\Remote
*/
class Themes extends AbstractPackageCollection class Themes extends AbstractPackageCollection
{ {
/** /**

View File

@@ -1,13 +1,16 @@
<?php <?php
/**
* @package Grav.Common.GPM
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\GPM; namespace Grav\Common\GPM;
use Grav\Common\Utils; use Grav\Common\Utils;
use Grav\Common\Grav; use Grav\Common\Grav;
/**
* Class Response
* @package Grav\Common\GPM
*/
class Response class Response
{ {
/** /**

View File

@@ -1,7 +1,12 @@
<?php <?php
namespace Grav\Common\GPM; /**
* @package Grav.Common.GPM
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
use Grav\Common\Grav; namespace Grav\Common\GPM;
/** /**
* Class Upgrader * Class Upgrader

View File

@@ -1,13 +1,13 @@
<?php <?php
/**
* @package Grav.Common
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common; namespace Grav\Common;
/**
* Abstract class to implement magic __get(), __set(), __isset() and __unset().
* Also implements ArrayAccess.
*
* @author RocketTheme
* @license MIT
*/
abstract class Getters implements \ArrayAccess, \Countable abstract class Getters implements \ArrayAccess, \Countable
{ {
/** /**

View File

@@ -1,19 +1,17 @@
<?php <?php
/**
* @package Grav.Common
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common; namespace Grav\Common;
use Grav\Common\Page\Medium\ImageMedium; use Grav\Common\Page\Medium\ImageMedium;
use RocketTheme\Toolbox\DI\Container; use RocketTheme\Toolbox\DI\Container;
use RocketTheme\Toolbox\Event\Event; use RocketTheme\Toolbox\Event\Event;
/**
* Grav
*
* @author Andy Miller
* @link http://www.rockettheme.com
* @license http://opensource.org/licenses/MIT
*
* Influenced by Pico, Stacey, Kirby, PieCrust and other great platforms...
*/
class Grav extends Container class Grav extends Container
{ {
@@ -219,7 +217,10 @@ class Grav extends Container
*/ */
public function mime($format) public function mime($format)
{ {
// look for some standard types
switch ($format) { switch ($format) {
case null:
return 'text/html';
case 'json': case 'json':
return 'application/json'; return 'application/json';
case 'html': case 'html':
@@ -232,6 +233,16 @@ class Grav extends Container
return 'application/xml'; return 'application/xml';
} }
// Try finding mime type from media
$media_types = $this['config']->get('media.types');
if (key_exists($format, $media_types)) {
$type = $media_types[$format];
if (isset($type['mime'])) {
return $type['mime'];
}
}
// Can't find the mime type, send as HTML
return 'text/html'; return 'text/html';
} }
@@ -446,6 +457,8 @@ class Grav extends Container
*/ */
public function fallbackUrl($path) public function fallbackUrl($path)
{ {
$this->fireEvent('onPageFallBackUrl');
/** @var Uri $uri */ /** @var Uri $uri */
$uri = $this['uri']; $uri = $this['uri'];
@@ -454,7 +467,7 @@ class Grav extends Container
$uri_extension = $uri->extension(); $uri_extension = $uri->extension();
$fallback_types = $config->get('system.media.allowed_fallback_types', null); $fallback_types = $config->get('system.media.allowed_fallback_types', null);
$supported_types = $config->get('media'); $supported_types = $config->get('media.types');
// Check whitelist first, then ensure extension is a valid media type // Check whitelist first, then ensure extension is a valid media type
if (!empty($fallback_types) && !in_array($uri_extension, $fallback_types)) { if (!empty($fallback_types) && !in_array($uri_extension, $fallback_types)) {

View File

@@ -1,12 +1,13 @@
<?php <?php
/**
* @package Grav.Common
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common; namespace Grav\Common;
/**
* Class GravTrait
*
* @package Grav\Common
* @deprecated
*/
trait GravTrait trait GravTrait
{ {
protected static $grav; protected static $grav;

View File

@@ -1,4 +1,11 @@
<?php <?php
/**
* @package Grav.Common.Helpers
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Helpers; namespace Grav\Common\Helpers;
use DOMDocument; use DOMDocument;

View File

@@ -1,4 +1,11 @@
<?php <?php
/**
* @package Grav.Common
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common; namespace Grav\Common;
use Grav\Common\Grav; use Grav\Common\Grav;
@@ -7,19 +14,6 @@ use Grav\Common\Grav;
* This file was originally part of the Akelos Framework * This file was originally part of the Akelos Framework
*/ */
/**
* Inflector for pluralize and singularize English nouns.
*
* This Inflector is a port of Ruby on Rails Inflector.
*
* It can be really helpful for developers that want to
* create frameworks based on naming conventions rather than
* configurations.
*
* @author RocketTheme
* @license MIT
*/
class Inflector class Inflector
{ {
protected $plural; protected $plural;

View File

@@ -1,4 +1,11 @@
<?php <?php
/**
* @package Grav.Common
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common; namespace Grav\Common;
use RocketTheme\Toolbox\ArrayTraits\ArrayAccessWithGetters; use RocketTheme\Toolbox\ArrayTraits\ArrayAccessWithGetters;
@@ -8,10 +15,6 @@ use RocketTheme\Toolbox\ArrayTraits\Countable;
use RocketTheme\Toolbox\ArrayTraits\Export; use RocketTheme\Toolbox\ArrayTraits\Export;
use RocketTheme\Toolbox\ArrayTraits\Serializable; use RocketTheme\Toolbox\ArrayTraits\Serializable;
/**
* Class Iterator
* @package Grav\Common
*/
class Iterator implements \ArrayAccess, \Iterator, \Countable, \Serializable class Iterator implements \ArrayAccess, \Iterator, \Countable, \Serializable
{ {
use Constructor, ArrayAccessWithGetters, ArrayIterator, Countable, Serializable, Export; use Constructor, ArrayAccessWithGetters, ArrayIterator, Countable, Serializable, Export;

View File

@@ -1,12 +1,16 @@
<?php <?php
/**
* @package Grav.Common.Language
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Language; namespace Grav\Common\Language;
use Grav\Common\Grav; use Grav\Common\Grav;
use Grav\Common\Config\Config; use Grav\Common\Config\Config;
/**
* Language and translation functionality for Grav
*/
class Language class Language
{ {
protected $grav; protected $grav;

View File

@@ -1,9 +1,13 @@
<?php <?php
/**
* @package Grav.Common.Language
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Language; namespace Grav\Common\Language;
/**
* Language and translation functionality for Grav
*/
class LanguageCodes class LanguageCodes
{ {
protected static $codes = [ protected static $codes = [
@@ -18,8 +22,8 @@ class LanguageCodes
'bn-BD' => [ 'name' => 'Bengali (Bangladesh)', 'nativeName' => 'বাংলা (বাংলাদেশ)' ], 'bn-BD' => [ 'name' => 'Bengali (Bangladesh)', 'nativeName' => 'বাংলা (বাংলাদেশ)' ],
'bn-IN' => [ 'name' => 'Bengali (India)', 'nativeName' => 'বাংলা (ভারত)' ], 'bn-IN' => [ 'name' => 'Bengali (India)', 'nativeName' => 'বাংলা (ভারত)' ],
'br' => [ 'name' => 'Breton', 'nativeName' => 'Brezhoneg' ], 'br' => [ 'name' => 'Breton', 'nativeName' => 'Brezhoneg' ],
'ca' => [ 'name' => 'Catalan', 'nativeName' => 'català' ], 'ca' => [ 'name' => 'Catalan', 'nativeName' => 'Català' ],
'ca-valencia'=> [ 'name' => 'Catalan (Valencian)', 'nativeName' => 'català (valencià)' ], // not iso-639-1. a=l10n-drivers 'ca-valencia'=> [ 'name' => 'Catalan (Valencian)', 'nativeName' => 'Català (valencià)' ], // not iso-639-1. a=l10n-drivers
'cs' => [ 'name' => 'Czech', 'nativeName' => 'Čeština' ], 'cs' => [ 'name' => 'Czech', 'nativeName' => 'Čeština' ],
'cy' => [ 'name' => 'Welsh', 'nativeName' => 'Cymraeg' ], 'cy' => [ 'name' => 'Welsh', 'nativeName' => 'Cymraeg' ],
'da' => [ 'name' => 'Danish', 'nativeName' => 'Dansk' ], 'da' => [ 'name' => 'Danish', 'nativeName' => 'Dansk' ],
@@ -45,7 +49,7 @@ class LanguageCodes
'et' => [ 'name' => 'Estonian', 'nativeName' => 'Eesti keel' ], 'et' => [ 'name' => 'Estonian', 'nativeName' => 'Eesti keel' ],
'eu' => [ 'name' => 'Basque', 'nativeName' => 'Euskara' ], 'eu' => [ 'name' => 'Basque', 'nativeName' => 'Euskara' ],
'fa' => [ 'name' => 'Persian', 'nativeName' => 'فارسی' ], 'fa' => [ 'name' => 'Persian', 'nativeName' => 'فارسی' ],
'fi' => [ 'name' => 'Finnish', 'nativeName' => 'suomi' ], 'fi' => [ 'name' => 'Finnish', 'nativeName' => 'Suomi' ],
'fj-FJ' => [ 'name' => 'Fijian', 'nativeName' => 'Vosa vaka-Viti' ], 'fj-FJ' => [ 'name' => 'Fijian', 'nativeName' => 'Vosa vaka-Viti' ],
'fr' => [ 'name' => 'French', 'nativeName' => 'Français' ], 'fr' => [ 'name' => 'French', 'nativeName' => 'Français' ],
'fur' => [ 'name' => 'Friulian', 'nativeName' => 'Furlan' ], 'fur' => [ 'name' => 'Friulian', 'nativeName' => 'Furlan' ],
@@ -77,8 +81,9 @@ class LanguageCodes
'ko' => [ 'name' => 'Korean', 'nativeName' => '한국어' ], 'ko' => [ 'name' => 'Korean', 'nativeName' => '한국어' ],
'ku' => [ 'name' => 'Kurdish', 'nativeName' => 'Kurdî' ], 'ku' => [ 'name' => 'Kurdish', 'nativeName' => 'Kurdî' ],
'la' => [ 'name' => 'Latin', 'nativeName' => 'Latina' ], 'la' => [ 'name' => 'Latin', 'nativeName' => 'Latina' ],
'lb' => [ 'name' => 'Luxembourgish', 'nativeName' => 'Lëtzebuergesch' ],
'lg' => [ 'name' => 'Luganda', 'nativeName' => 'Luganda' ], 'lg' => [ 'name' => 'Luganda', 'nativeName' => 'Luganda' ],
'lt' => [ 'name' => 'Lithuanian', 'nativeName' => 'lietuvių kalba' ], 'lt' => [ 'name' => 'Lithuanian', 'nativeName' => 'Lietuvių kalba' ],
'lv' => [ 'name' => 'Latvian', 'nativeName' => 'Latviešu' ], 'lv' => [ 'name' => 'Latvian', 'nativeName' => 'Latviešu' ],
'mai' => [ 'name' => 'Maithili', 'nativeName' => 'मैथिली মৈথিলী' ], 'mai' => [ 'name' => 'Maithili', 'nativeName' => 'मैथिली মৈথিলী' ],
'mg' => [ 'name' => 'Malagasy', 'nativeName' => 'Malagasy' ], 'mg' => [ 'name' => 'Malagasy', 'nativeName' => 'Malagasy' ],
@@ -87,14 +92,15 @@ class LanguageCodes
'ml' => [ 'name' => 'Malayalam', 'nativeName' => 'മലയാളം' ], 'ml' => [ 'name' => 'Malayalam', 'nativeName' => 'മലയാളം' ],
'mn' => [ 'name' => 'Mongolian', 'nativeName' => 'Монгол' ], 'mn' => [ 'name' => 'Mongolian', 'nativeName' => 'Монгол' ],
'mr' => [ 'name' => 'Marathi', 'nativeName' => 'मराठी' ], 'mr' => [ 'name' => 'Marathi', 'nativeName' => 'मराठी' ],
'no' => [ 'name' => 'Norwegian', 'nativeName' => 'Norsk' ],
'nb' => [ 'name' => 'Norwegian', 'nativeName' => 'Norsk' ], 'nb' => [ 'name' => 'Norwegian', 'nativeName' => 'Norsk' ],
'nb-NO' => [ 'name' => 'Norwegian (Bokmål)', 'nativeName' => 'Norsk bokmål' ], 'nb-NO' => [ 'name' => 'Norwegian (Bokmål)', 'nativeName' => 'Norsk bokmål' ],
'ne-NP' => [ 'name' => 'Nepali', 'nativeName' => 'नेपाली' ], 'ne-NP' => [ 'name' => 'Nepali', 'nativeName' => 'नेपाली' ],
'nn-NO' => [ 'name' => 'Norwegian (Nynorsk)', 'nativeName' => 'Norsk nynorsk' ], 'nn-NO' => [ 'name' => 'Norwegian (Nynorsk)', 'nativeName' => 'Norsk nynorsk' ],
'nl' => [ 'name' => 'Dutch', 'nativeName' => 'Nederlands' ], 'nl' => [ 'name' => 'Dutch', 'nativeName' => 'Nederlands' ],
'nr' => [ 'name' => 'Ndebele, South', 'nativeName' => 'isiNdebele' ], 'nr' => [ 'name' => 'Ndebele, South', 'nativeName' => 'IsiNdebele' ],
'nso' => [ 'name' => 'Northern Sotho', 'nativeName' => 'Sepedi' ], 'nso' => [ 'name' => 'Northern Sotho', 'nativeName' => 'Sepedi' ],
'oc' => [ 'name' => 'Occitan (Lengadocian)', 'nativeName' => 'occitan (lengadocian)' ], 'oc' => [ 'name' => 'Occitan (Lengadocian)', 'nativeName' => 'Occitan (lengadocian)' ],
'or' => [ 'name' => 'Oriya', 'nativeName' => 'ଓଡ଼ିଆ' ], 'or' => [ 'name' => 'Oriya', 'nativeName' => 'ଓଡ଼ିଆ' ],
'pa' => [ 'name' => 'Punjabi', 'nativeName' => 'ਪੰਜਾਬੀ' ], 'pa' => [ 'name' => 'Punjabi', 'nativeName' => 'ਪੰਜਾਬੀ' ],
'pa-IN' => [ 'name' => 'Punjabi', 'nativeName' => 'ਪੰਜਾਬੀ' ], 'pa-IN' => [ 'name' => 'Punjabi', 'nativeName' => 'ਪੰਜਾਬੀ' ],
@@ -102,13 +108,13 @@ class LanguageCodes
'pt' => [ 'name' => 'Portuguese', 'nativeName' => 'Português' ], 'pt' => [ 'name' => 'Portuguese', 'nativeName' => 'Português' ],
'pt-BR' => [ 'name' => 'Portuguese (Brazilian)', 'nativeName' => 'Português (do Brasil)' ], 'pt-BR' => [ 'name' => 'Portuguese (Brazilian)', 'nativeName' => 'Português (do Brasil)' ],
'pt-PT' => [ 'name' => 'Portuguese (Portugal)', 'nativeName' => 'Português (Europeu)' ], 'pt-PT' => [ 'name' => 'Portuguese (Portugal)', 'nativeName' => 'Português (Europeu)' ],
'ro' => [ 'name' => 'Romanian', 'nativeName' => 'română' ], 'ro' => [ 'name' => 'Romanian', 'nativeName' => 'Română' ],
'rm' => [ 'name' => 'Romansh', 'nativeName' => 'rumantsch' ], 'rm' => [ 'name' => 'Romansh', 'nativeName' => 'Rumantsch' ],
'ru' => [ 'name' => 'Russian', 'nativeName' => 'Русский' ], 'ru' => [ 'name' => 'Russian', 'nativeName' => 'Русский' ],
'rw' => [ 'name' => 'Kinyarwanda', 'nativeName' => 'Ikinyarwanda' ], 'rw' => [ 'name' => 'Kinyarwanda', 'nativeName' => 'Ikinyarwanda' ],
'si' => [ 'name' => 'Sinhala', 'nativeName' => 'සිංහල' ], 'si' => [ 'name' => 'Sinhala', 'nativeName' => 'සිංහල' ],
'sk' => [ 'name' => 'Slovak', 'nativeName' => 'slovenčina' ], 'sk' => [ 'name' => 'Slovak', 'nativeName' => 'Slovenčina' ],
'sl' => [ 'name' => 'Slovenian', 'nativeName' => 'slovensko' ], 'sl' => [ 'name' => 'Slovenian', 'nativeName' => 'Slovensko' ],
'son' => [ 'name' => 'Songhai', 'nativeName' => 'Soŋay' ], 'son' => [ 'name' => 'Songhai', 'nativeName' => 'Soŋay' ],
'sq' => [ 'name' => 'Albanian', 'nativeName' => 'Shqip' ], 'sq' => [ 'name' => 'Albanian', 'nativeName' => 'Shqip' ],
'sr' => [ 'name' => 'Serbian', 'nativeName' => 'Српски' ], 'sr' => [ 'name' => 'Serbian', 'nativeName' => 'Српски' ],
@@ -122,6 +128,7 @@ class LanguageCodes
'ta-LK' => [ 'name' => 'Tamil (Sri Lanka)', 'nativeName' => 'தமிழ் (இலங்கை)' ], 'ta-LK' => [ 'name' => 'Tamil (Sri Lanka)', 'nativeName' => 'தமிழ் (இலங்கை)' ],
'te' => [ 'name' => 'Telugu', 'nativeName' => 'తెలుగు' ], 'te' => [ 'name' => 'Telugu', 'nativeName' => 'తెలుగు' ],
'th' => [ 'name' => 'Thai', 'nativeName' => 'ไทย' ], 'th' => [ 'name' => 'Thai', 'nativeName' => 'ไทย' ],
'tlh' => [ 'name' => 'Klingon', 'nativeName' => 'Klingon' ],
'tn' => [ 'name' => 'Tswana', 'nativeName' => 'Setswana' ], 'tn' => [ 'name' => 'Tswana', 'nativeName' => 'Setswana' ],
'tr' => [ 'name' => 'Turkish', 'nativeName' => 'Türkçe' ], 'tr' => [ 'name' => 'Turkish', 'nativeName' => 'Türkçe' ],
'ts' => [ 'name' => 'Tsonga', 'nativeName' => 'Xitsonga' ], 'ts' => [ 'name' => 'Tsonga', 'nativeName' => 'Xitsonga' ],

View File

@@ -1,10 +1,13 @@
<?php <?php
/**
* @package Grav.Common.Markdown
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Markdown; namespace Grav\Common\Markdown;
/**
* Class Parsedown
* @package Grav\Common\Markdown
*/
class Parsedown extends \Parsedown class Parsedown extends \Parsedown
{ {
use ParsedownGravTrait; use ParsedownGravTrait;

View File

@@ -1,10 +1,13 @@
<?php <?php
/**
* @package Grav.Common.Markdown
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Markdown; namespace Grav\Common\Markdown;
/**
* Class ParsedownExtra
* @package Grav\Common\Markdown
*/
class ParsedownExtra extends \ParsedownExtra class ParsedownExtra extends \ParsedownExtra
{ {
use ParsedownGravTrait; use ParsedownGravTrait;

View File

@@ -1,4 +1,11 @@
<?php <?php
/**
* @package Grav.Common.Markdown
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Markdown; namespace Grav\Common\Markdown;
use Grav\Common\Grav; use Grav\Common\Grav;
@@ -6,9 +13,6 @@ use Grav\Common\Uri;
use Grav\Common\Utils; use Grav\Common\Utils;
use RocketTheme\Toolbox\Event\Event; use RocketTheme\Toolbox\Event\Event;
/**
* A trait to add some custom processing to the identifyLink() method in Parsedown and ParsedownExtra
*/
trait ParsedownGravTrait trait ParsedownGravTrait
{ {
/** @var Page $page */ /** @var Page $page */
@@ -208,6 +212,7 @@ trait ParsedownGravTrait
$alt = $excerpt['element']['attributes']['alt'] ?: ''; $alt = $excerpt['element']['attributes']['alt'] ?: '';
$title = $excerpt['element']['attributes']['title'] ?: ''; $title = $excerpt['element']['attributes']['title'] ?: '';
$class = isset($excerpt['element']['attributes']['class']) ? $excerpt['element']['attributes']['class'] : ''; $class = isset($excerpt['element']['attributes']['class']) ? $excerpt['element']['attributes']['class'] : '';
$id = isset($excerpt['element']['attributes']['id']) ? $excerpt['element']['attributes']['id'] : '';
//get the url and parse it //get the url and parse it
$url = parse_url(htmlspecialchars_decode($excerpt['element']['attributes']['src'])); $url = parse_url(htmlspecialchars_decode($excerpt['element']['attributes']['src']));
@@ -260,7 +265,7 @@ trait ParsedownGravTrait
$medium->urlHash($url['fragment']); $medium->urlHash($url['fragment']);
} }
$excerpt['element'] = $medium->parseDownElement($title, $alt, $class, true); $excerpt['element'] = $medium->parseDownElement($title, $alt, $class, $id, true);
} else { } else {
// not a current page media file, see if it needs converting to relative // not a current page media file, see if it needs converting to relative

View File

@@ -1,16 +1,17 @@
<?php <?php
/**
* @package Grav.Common.Page
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Page; namespace Grav\Common\Page;
use Grav\Common\Grav; use Grav\Common\Grav;
use Grav\Common\Iterator; use Grav\Common\Iterator;
use Grav\Common\Utils; use Grav\Common\Utils;
/**
* Collection of Pages.
*
* @author RocketTheme
* @license MIT
*/
class Collection extends Iterator class Collection extends Iterator
{ {
/** /**
@@ -270,22 +271,21 @@ class Collection extends Iterator
public function dateRange($startDate, $endDate = false, $field = false) public function dateRange($startDate, $endDate = false, $field = false)
{ {
$start = Utils::date2timestamp($startDate); $start = Utils::date2timestamp($startDate);
$end = $endDate ? Utils::date2timestamp($endDate) : strtotime("now +1000 years"); $end = $endDate ? Utils::date2timestamp($endDate) : false;
$date_range = []; $date_range = [];
foreach ($this->items as $path => $slug) { foreach ($this->items as $path => $slug) {
$page = $this->pages->get($path); $page = $this->pages->get($path);
if ($page !== null) { if ($page !== null) {
$date = $field ? strtotime($page->value($field)) : $page->date(); $date = $field ? strtotime($page->value($field)) : $page->date();
if ($date > $start && $date < $end) { if ($date >= $start && (!$end || $date <= $end)) {
$date_range[$path] = $slug; $date_range[$path] = $slug;
} }
} }
} }
$this->items = $date_range;
$this->items = $date_range;
return $this; return $this;
} }

View File

@@ -1,14 +1,16 @@
<?php <?php
/**
* @package Grav.Common.Page
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Page; namespace Grav\Common\Page;
use RocketTheme\Toolbox\ArrayTraits\Constructor; use RocketTheme\Toolbox\ArrayTraits\Constructor;
use RocketTheme\Toolbox\ArrayTraits\NestedArrayAccess; use RocketTheme\Toolbox\ArrayTraits\NestedArrayAccess;
/**
* Class Header
* @package Grav\Common\Page
*/
class Header implements \ArrayAccess class Header implements \ArrayAccess
{ {
use NestedArrayAccess, Constructor; use NestedArrayAccess, Constructor;

View File

@@ -1,17 +1,17 @@
<?php <?php
/**
* @package Grav.Common.Page
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Page; namespace Grav\Common\Page;
use Grav\Common\Getters; use Grav\Common\Getters;
use Grav\Common\Page\Medium\Medium; use Grav\Common\Page\Medium\Medium;
use Grav\Common\Page\Medium\MediumFactory; use Grav\Common\Page\Medium\MediumFactory;
/**
* Media is a holder object that contains references to the media of page. This object is created and
* populated during the getMedia() method in the Pages object
*
* @author RocketTheme
* @license MIT
*/
class Media extends Getters class Media extends Getters
{ {
protected $gettersVariable = 'instances'; protected $gettersVariable = 'instances';

View File

@@ -1,4 +1,11 @@
<?php <?php
/**
* @package Grav.Common.Page
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Page\Medium; namespace Grav\Common\Page\Medium;
class AudioMedium extends Medium class AudioMedium extends Medium

View File

@@ -1,4 +1,11 @@
<?php <?php
/**
* @package Grav.Common.Page
*
* @copyright Copyright (C) 2014 - 2016 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Page\Medium; namespace Grav\Common\Page\Medium;
use Grav\Common\Grav; use Grav\Common\Grav;
@@ -6,7 +13,6 @@ use Gregwar\Image\Exceptions\GenerationError;
use Gregwar\Image\Image; use Gregwar\Image\Image;
use RocketTheme\Toolbox\Event\Event; use RocketTheme\Toolbox\Event\Event;
class ImageFile extends Image class ImageFile extends Image
{ {
/** /**

Some files were not shown because too many files have changed in this diff Show More