Compare commits

...

144 Commits

Author SHA1 Message Date
Andy Miller
231bc816f0 Merge branch 'release/1.1.0' 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
cd30e6a331 version update 2016-06-01 17:43:54 -06:00
Andy Miller
35c7698139 Reverted the gzip fixes.. will try again! 2016-05-31 11:51:51 -06:00
Andy Miller
471cf7fe31 Removed references to mcrclay/minify's CSS and JS min 2016-05-31 11:29:37 -06:00
Andy Miller
88fad44dca switched mcrclay/minify library for matthiasmullie/minify 2016-05-31 11:26:27 -06:00
Flavio Copes
cb28112d94 Also enable system.apache_zlib_fix if apache+fcgi 2016-05-31 17:12:45 +02:00
Flavio Copes
822a111919 Re-apply 7619d3b54a which got lost in the Grav classes refactoring
Preserve url query/fragment/params on lang redirect
2016-05-31 13:17:00 +02:00
Andy Miller
d6a47af84a updated changelog 2016-05-30 23:07:04 -06:00
Andy Miller
a24b7faef5 Added a new CSS / JS minify library that seems to do a better job #864 2016-05-30 23:05:59 -06:00
Andy Miller
395e640e39 Changelog + Version update 2016-05-30 20:27:23 -06:00
Andy Miller
db082e4e62 updated composer packages 2016-05-30 20:23:31 -06:00
Andy Miller
4de9c94bd5 Remove double URL encode when processing params in links - #860 2016-05-30 17:14:21 -06:00
Andy Miller
7fc2f20f1b Better handling of params with more complex Urls - #859 2016-05-30 16:41:07 -06:00
Andy Miller
1c12bb5fc1 I broke InitializeProcessor in last commit! 2016-05-30 16:02:31 -06:00
Quy
a485644c38 Replace underscore with space for display of timezones #626 (#861)
Thanks!
2016-05-30 15:03:42 -06:00
Andy Miller
32cf73e865 changelog updated 2016-05-30 12:29:53 -06:00
Andy Miller
e4a3d6a3b9 Merge branch 'feature/bettef-gzip-flush-buffers' into develop 2016-05-30 12:27:16 -06:00
Andy Miller
4fbf4329fd Fix for Validation::typeX() missing causing validation errors - #626 2016-05-30 12:17:13 -06:00
Flavio Copes
43c0ac275f Correctly handle language strings to termine if it's admin or not Fix https://github.com/getgrav/grav-plugin-admin/issues/627 2016-05-30 18:28:50 +02:00
Flavio Copes
a381e5bb66 Fix #798 use raw routes in blueprints 2016-05-30 10:44:11 +02:00
Andy Miller
971c5d326d Code cleanup 2016-05-29 19:36:17 -06:00
Benny
4c687ee368 Install plugins and themes in correct multisite folders (#841)
* Adresses #319 (https://github.com/getgrav/grav-plugin-admin/issues/319)
2016-05-29 19:27:25 -06:00
Andy Miller
7b56041dad The fix here seems to do more damage than harm.. removing 2016-05-28 21:38:54 -06:00
Andy Miller
d7f286f601 Updated with more lang codes 2016-05-28 18:25:13 -06:00
Andy Miller
581bbaf19c Updated with more lang codes 2016-05-28 18:24:27 -06:00
Andy Miller
6c9037e125 flush any and all buffers 2016-05-28 16:52:04 -06:00
Andy Miller
da0f9cd4d9 bit more compression 2016-05-28 16:51:34 -06:00
Andy Miller
6ed1f767b9 Fixed issue with zlib and no shutdown close_connection false 2016-05-28 13:50:18 -06:00
Andy Miller
13c5035386 zlib + gzip incompatibility is not specific to mod_php, it's for all.. so that needed adjusting 2016-05-27 18:03:12 -06:00
Andy Miller
5acfdee876 Only implement zlib fix for apache2handler - tested fine with Caddy 2016-05-27 17:50:31 -06:00
Andy Miller
7a3ae9186b working pretty well with zlib + grav gzip.. deflate needs work 2016-05-27 16:37:40 -06:00
Flavio Copes
02f863ad2c Use the raw route for page parent select 2016-05-27 19:50:15 +02:00
Andy Miller
d048057249 Added back GravTrait::$grav for compatibility for < 1.0.10 versions of admin plugin 2016-05-26 17:46:14 -06:00
Andy Miller
5fb6b634e9 Changelog updated 2016-05-25 17:12:52 -06:00
Andy Miller
c7fe13aa6a updated changelog 2016-05-25 15:40:26 -06:00
Andy Miller
36661a88d0 fixed a bug in Page::relativePagePath() when name is not defined 2016-05-25 15:39:30 -06:00
Andy Miller
e8f3a43ded changelog updated 2016-05-25 11:13:32 -06:00
Andy Miller
78891add6a setDotNotation() Test added 2016-05-25 11:12:56 -06:00
Andy Miller
892fb83a32 Replace remove with dotNotation() methods 2016-05-25 11:05:52 -06:00
Andy Miller
841d4727ef useful functions for getting and setting dot notation based arrays 2016-05-24 21:50:56 -06:00
Andy Miller
a3e31c786e Better fix for redirects loop (admin safe) 2016-05-24 11:43:44 -06:00
Andy Miller
24bc4b2644 Merge branch 'develop' of https://github.com/getgrav/grav into develop 2016-05-24 10:56:22 -06:00
Andy Miller
0b81fda01c Break redirect logic out of the main page not found if statement - causing infinite loops 2016-05-24 10:56:07 -06:00
Matias Griese
a3ec59d678 Detect if user really meant to extend parent blueprint, not another one (composer update) 2016-05-24 11:09:51 +03:00
Andy Miller
2ce137eb3e Switch to markdown-notices styling rather than older >>> block quote overrides 2016-05-23 15:39:43 -06:00
Andy Miller
d18aa3e11e version update 2016-05-23 14:44:02 -06:00
Andy Miller
f549b27dfc Modular Children text 2016-05-23 12:59:45 -06:00
Andy Miller
83bbc497a8 Added ability to get a specific item of content meta 2016-05-23 12:51:53 -06:00
Andy Miller
10d301a179 Added flash storage 2016-05-20 16:53:00 -06:00
Andy Miller
18a8483522 Updated some vendor libs 2016-05-20 13:13:18 -06:00
Andy Miller
daebf05f9b Make URI::ip() static by default 2016-05-20 13:13:03 -06:00
Matias Griese
7e4dad1cb1 Blueprint::setTypes(): initialize internals before setting the types 2016-05-20 22:06:01 +03:00
Matias Griese
b3755b371f Revert last change (not needed) 2016-05-20 22:03:17 +03:00
Matias Griese
4cba419d6d Set default form field types while loading blueprint 2016-05-20 21:57:15 +03:00
Matias Griese
57544f6fe3 Add function Blueprint::setTypes() 2016-05-20 21:52:31 +03:00
Andy Miller
f449c560c4 fix for getting admin route when Uri::init() is called after Session::init() 2016-05-20 10:38:43 -06:00
Flavio Copes
77d03b6a46 Load session prior to uri as the initialization of Uri does some session handling for the active language (#843)
Refs https://github.com/getgrav/grav/issues/842
2016-05-20 10:13:01 -06:00
Flavio Copes
d9ebf3580a Update changelog 2016-05-18 10:14:48 +02:00
Djamil Legato
16527218b9 Updated changelog 2016-05-17 18:30:26 -07:00
Djamil Legato
f4b7e36763 Fixed Filtering for files, always threat as multiple 2016-05-17 14:20:03 -07:00
Flavio Copes
6bd7641862 Ignore errors with ob_gzhandler.
We handle the possible error in the Problems plugin via
https://github.com/getgrav/grav-plugin-problems/commit/83ef2a2917e5ad2f0
a8d4eb62b16fde3a621e4f0
2016-05-17 09:45:53 +02:00
Philipp Kitzberger
97ffb87d69 Fix absolute URLs in pipelined CSS (#837)
* Fix absolute URLs in pipelined CSS

The way that absolute URLs get excluded during cssRewrite() doesn't cover all possible cases due to a incorrect CSS_URL_REGEX.

* Improve CSS_URL_REGEX

Performance improvement by using a back reference. Additionally this makes sure the same kind of quote (single, double, none) is being used.
2016-05-16 17:57:08 -06:00
Flavio Copes
504f3df857 Update from jQuery 2.2.0 to jQuery 2.2.3 2016-05-16 18:06:15 +02:00
Flavio Copes
cfe1734d50 Fix indentation, use 4 spaces 2016-05-16 11:51:58 +02:00
Flavio Copes
a4bc30d725 Fix #835 check for empty image file first to prevent getimagesize() fatal error 2016-05-16 09:30:57 +02:00
Matias Griese
7d6ffe01a9 Merge remote-tracking branch 'origin/develop' into develop 2016-05-12 21:38:44 +03:00
Matias Griese
0e08f97f46 Make registering page types to remember previous additions 2016-05-12 21:38:35 +03:00
Andy Miller
b3db9876e0 various vendor updates 2016-05-12 12:12:01 -06:00
Matias Griese
b25eeb9586 Add support for extending system page types 2016-05-12 17:40:51 +03:00
Matias Griese
966308b14a Fix Page Type blueprints not being able to extend their parents 2016-05-12 15:43:02 +03:00
Andy Miller
6959012a0f Merge branch 'develop' of https://github.com/getgrav/grav into develop 2016-05-11 15:14:17 -06:00
Andy Miller
09f766bcf5 typo in docblock 2016-05-11 15:13:42 -06:00
Flavio Copes
62f794e6cd Add explicit encoding to htmlspecialchars 2016-05-11 14:29:49 +02:00
Andy Miller
ad74446a89 Don't try to set Page::slug() to empty string causing error in slug format 2016-05-10 11:01:17 -06:00
Flavio Copes
eacdea5377 Only ignore main vendor folder 2016-05-10 15:41:23 +02:00
Flavio Copes
896808c824 Fix trying to delete grav when removing a plugin which has a dependency on a specific grav version 2016-05-10 15:39:27 +02:00
Andy Miller
9a54c3257c version update 2016-05-09 16:04:41 -06:00
Andy Miller
30163aadad Fix for entities not being properly decoded in Page::summary() #825 2016-05-09 10:27:43 -06:00
Flavio Copes
59c320eb17 Also send package name 2016-05-07 10:45:07 +02:00
Flavio Copes
44dbb7f509 Drop Grav from dependencies list, already taken care of 2016-05-07 10:24:20 +02:00
Flavio Copes
a862f18836 If a plugin is installed as symlink, drop from dependencies calculation 2016-05-07 10:23:57 +02: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
182 changed files with 3610 additions and 2009 deletions

View File

@@ -7,6 +7,10 @@ git:
url: https://github.com/getgrav/grav-plugin-error
path: user/plugins/error
branch: master
markdown-notices:
url: https://github.com/getgrav/grav-plugin-markdown-notices
path: user/plugins/markdown-notices
branch: master
antimatter:
url: https://github.com/getgrav/grav-theme-antimatter
path: user/themes/antimatter
@@ -20,6 +24,10 @@ links:
src: grav-plugin-error
path: user/plugins/error
scm: github
markdown-notices:
src: grav-plugin-markdown-notices
path: user/plugins/markdown-notices
scm: github
antimatter:
src: grav-theme-antimatter
path: user/themes/antimatter

2
.gitignore vendored
View File

@@ -1,6 +1,6 @@
# Composer
.composer
vendor/
/vendor
# Sass
.sass-cache

View File

@@ -1,3 +1,90 @@
# 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
## 06/01/2016
1. [](#new)
* Added `Utils::getDotNotation()` and `Utils::setDotNotation()` methods + tests
* Added support for `xx-XX` locale language lookups in `LanguageCodes` class [#854](https://github.com/getgrav/grav/issues/854)
* New CSS/JS Minify library that does a more reliable job [#864](https://github.com/getgrav/grav/issues/864)
1. [](#improved)
* GPM installation of plugins and themes into correct multisite folders [#841](https://github.com/getgrav/grav/issues/841)
* Use `Page::rawRoute()` in blueprints for more reliable mulit-language support
1. [](#bugfix)
* Fixes for `zlib.output_compression` as well as `mod_deflate` GZIP compression
* Fix for corner-case redirect logic causing infinite loops and out-of-memory errors
* Fix for saving fields in expert mode that have no `Validation::typeX()` methods [#626](https://github.com/getgrav/grav-plugin-admin/issues/626)
* Detect if user really meant to extend parent blueprint, not another one (fixes old page type blueprints)
* Fixed a bug in `Page::relativePagePath()` when `Page::$name` is not defined
* Fix for poor handling of params + query element in `Uri::processParams()` [#859](https://github.com/getgrav/grav/issues/859)
* Fix for double encoding in markdown links [#860](https://github.com/getgrav/grav/issues/860)
* Correctly handle language strings to determine if it's in admin or not [#627](https://github.com/getgrav/grav-plugin-admin/issues/627)
# v1.1.0-beta.5
## 05/23/2016
1. [](#improved)
* Updated jQuery from 2.2.0 to 2.2.3
* Set `Uri::ip()` to static by default so it can be used in form fields
* Improved `Session` class with flash storage
* `Page::getContentMeta()` now supports an optional key.
1. [](#bugfix)
* Fixed "Invalid slug set in YAML frontmatter" when setting `Page::slug()` with empty string [#580](https://github.com/getgrav/grav-plugin-admin/issues/580)
* Only `.gitignore` Grav's vendor folder
* Fix trying to remove Grav with `GPM uninstall` of a plugin with Grav dependency
* Fix Page Type blueprints not being able to extend their parents
* `filterFile` validation method always returns an array of files, behaving like `multiple="multiple"`
* Fixed [#835](https://github.com/getgrav/grav-plugin-admin/issues/835) check for empty image file first to prevent getimagesize() fatal error
* Avoid throwing an error when Grav's Gzip and mod_deflate are enabled at the same time on a non php-fpm setup
# v1.1.0-beta.4
## 05/09/2016
1. [](#bugfix)
* Drop dependencies calculations if plugin is installed via symlink
* Drop Grav from dependencies calculations
* Send slug name as part of installed packages
* Fix for summary entities not being properly decoded [#825](https://github.com/getgrav/grav/issues/825)
# v1.1.0-beta.3
## 05/04/2016

View File

@@ -55,6 +55,8 @@ Guidelines for bug reports:
6. **Isolate the problem** &mdash; 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.
7. **Check the problem on Grav 1.1** &mdash; 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
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.
**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
* [YAML](http://yaml.org): for simple configuration
* [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
* [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

View File

@@ -17,16 +17,17 @@
"symfony/polyfill-iconv": "~1.0",
"doctrine/cache": "~1.5",
"filp/whoops": "~2.0",
"matthiasmullie/minify": "^1.3",
"monolog/monolog": "~1.0",
"gregwar/image": "~2.0",
"mrclay/minify": "~2.2",
"donatj/phpuseragentparser": "~0.3",
"pimple/pimple": "~3.0",
"rockettheme/toolbox": "dev-develop",
"maximebf/debugbar": "~1.10",
"ext-mbstring": "*",
"ext-openssl": "*",
"ext-curl": "*"
"ext-curl": "*",
"ext-zip": "*"
},
"require-dev": {
"codeception/codeception": "^2.1",

675
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

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

File diff suppressed because one or more lines are too long

View File

@@ -479,9 +479,54 @@ form:
auto: Auto detect
file: File
apc: APC
xcache: XCache
memcache: MemCache
apcu: APCu
xcache: Xcache
memcache: Memcache
memcached: Memcached
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:
type: text
@@ -510,7 +555,6 @@ form:
validate:
type: bool
twig:
type: section
title: PLUGIN_ADMIN.TWIG_TEMPLATING

View File

@@ -139,7 +139,7 @@ form:
label: PLUGIN_ADMIN.PARENT
classes: fancy
data-options@: '\Grav\Common\Page\Pages::parentsRawRoutes'
data-default@: '\Grav\Plugin\admin::route'
data-default@: '\Grav\Plugin\admin::rawRoute'
options:
'/': PLUGIN_ADMIN.DEFAULT_OPTION_ROOT

View File

@@ -18,7 +18,7 @@ form:
label: PLUGIN_ADMIN.ITEMS
default: '@self.modular'
options:
'@self.modular': Children
'@self.modular': Modular Children
header.content.order.by:
type: select

View File

@@ -29,8 +29,8 @@ form:
type: select
label: PLUGIN_ADMIN.PAGE
classes: fancy
data-options@: '\Grav\Common\Page\Pages::parents'
data-default@: '\Grav\Plugin\admin::route'
data-options@: '\Grav\Common\Page\Pages::parentsRawRoutes'
data-default@: '\Grav\Plugin\admin::rawRoute'
validate:
required: true

View File

@@ -78,8 +78,8 @@ form:
type: select
label: PLUGIN_ADMIN.PARENT
classes: fancy
data-options@: '\Grav\Common\Page\Pages::parents'
data-default@: '\Grav\Plugin\admin::route'
data-options@: '\Grav\Common\Page\Pages::parentsRawRoutes'
data-default@: '\Grav\Plugin\admin::rawRoute'
options:
'': PLUGIN_ADMIN.DEFAULT_OPTION_SELECT
validate:

View File

@@ -11,7 +11,7 @@ form:
type: select
label: PLUGIN_ADMIN.PARENT
classes: fancy
data-options@: '\Grav\Common\Page\Pages::parents'
data-default@: '\Grav\Plugin\admin::route'
data-options@: '\Grav\Common\Page\Pages::parentsRawRoutes'
data-default@: '\Grav\Plugin\admin::rawRoute'
options:
'/': PLUGIN_ADMIN.DEFAULT_OPTION_ROOT

View File

@@ -31,7 +31,7 @@ form:
type: select
label: PLUGIN_ADMIN.PARENT_PAGE
classes: fancy
data-options@: '\Grav\Common\Page\Pages::parents'
data-options@: '\Grav\Common\Page\Pages::parentsRawRoutes'
data-default@: '\Grav\Plugin\admin::getLastPageRoute'
options:
'/': PLUGIN_ADMIN.DEFAULT_OPTION_ROOT

View File

@@ -24,7 +24,7 @@ form:
type: select
label: PLUGIN_ADMIN.PARENT_PAGE
classes: fancy
data-options@: '\Grav\Common\Page\Pages::parents'
data-options@: '\Grav\Common\Page\Pages::parentsRawRoutes'
data-default@: '\Grav\Plugin\admin::getLastPageRoute'
options:
'/': PLUGIN_ADMIN.DEFAULT_OPTION_ROOT

View File

@@ -78,8 +78,8 @@ form:
type: select
label: PLUGIN_ADMIN.PARENT
classes: fancy
data-options@: '\Grav\Common\Page\Pages::parents'
data-default@: '\Grav\Plugin\admin::route'
data-options@: '\Grav\Common\Page\Pages::parentsRawRoutes'
data-default@: '\Grav\Plugin\admin::rawRoute'
options:
'/': PLUGIN_ADMIN.DEFAULT_OPTION_ROOT

View File

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

View File

@@ -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.
gpm:
releases: testing # Set to either 'stable' or 'testing'
proxy_url: # Configure a manual proxy URL for GPM (eg 127.0.0.1:3128)
releases: stable # Set to either 'stable' or 'testing'
proxy_url: # Configure a manual proxy URL for GPM (eg 127.0.0.1:3128)

View File

@@ -1,9 +1,15 @@
<?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
define('GRAV', true);
define('GRAV_VERSION', '1.1.0-beta.3');
define('GRAV_TESTING', true);
define('GRAV_VERSION', '1.1.0');
define('GRAV_TESTING', false);
define('DS', '/');
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:
- vybavení
- informace
@@ -55,6 +56,7 @@ NICETIME:
DEC_PLURAL: dek
FORM:
VALIDATION_FAIL: '<b>Ověření se nezdařilo:</b>'
INVALID_INPUT: Neplatný vstup v
MISSING_REQUIRED_FIELD: 'Chybí požadované pole:'
MONTHS_OF_THE_YEAR:
- 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: |
---
title: %1$s
---
# Fehler: Frontmatter enthält Fehler
Pfad: `%2$s`
**%3$s **
**%3$s **
```
%4$s
```
@@ -21,8 +22,13 @@ INFLECTOR_IRREGULAR:
child: Kinder
sex: Geschlecht
move: Züge
INFLECTOR_ORDINALS:
default: '.'
first: '.'
second: '.'
third: '.'
NICETIME:
NO_DATE_PROVIDED: Keine Daten vorhanden
NO_DATE_PROVIDED: Kein Datum angegeben
BAD_DATE: Falsches Datum
AGO: her
FROM_NOW: ab jetzt
@@ -33,13 +39,14 @@ NICETIME:
WEEK: Woche
MONTH: Monat
YEAR: Jahr
DECADE: Dekade
SEC: sek
MIN: Min
HR: std
WK: wo
YR: yh
DEC: Jz
DECADE: Jahrzehnt
SEC: Sek.
MIN: Min.
HR: Std.
WK: Wo.
MO: Mo.
YR: J.
DEC: Dek.
SECOND_PLURAL: Sekunden
MINUTE_PLURAL: Minuten
HOUR_PLURAL: Stunden
@@ -47,14 +54,14 @@ NICETIME:
WEEK_PLURAL: Wochen
MONTH_PLURAL: Monate
YEAR_PLURAL: Jahre
DECADE_PLURAL: Dekaden
DECADE_PLURAL: Jahrzehnte
SEC_PLURAL: Sekunden
MIN_PLURAL: Minuten
HR_PLURAL: Stunden
WK_PLURAL: Wochen
MO_PLURAL: Monate
YR_PLURAL: Jahre
DEC_PLURAL: Dekaden
DEC_PLURAL: Jahrzehnten
FORM:
VALIDATION_FAIL: '<b>Überprüfung fehlgeschlagen:</b>'
INVALID_INPUT: Ungültige Eingabe in
@@ -68,7 +75,7 @@ MONTHS_OF_THE_YEAR:
- Juni
- Juli
- August
- Semptember
- September
- Oktober
- November
- Dezember

View File

@@ -1,3 +1,4 @@
---
MONTHS_OF_THE_YEAR:
- Ιανουάριος
- Φεβρουάριος
@@ -13,9 +14,9 @@ MONTHS_OF_THE_YEAR:
- Δεκέμβριος
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:
0: equipo
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: |
---
title: %1$s
---
# Erreur : Frontmatter invalide
Path: `%2$s`
**%3$s**
```
%4$s
```

View File

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

View File

@@ -1,17 +1,70 @@
---
FRONTMATTER_ERROR_PAGE: |
---
cím: %1$s
---
# Hiba: Érvénytelen Frontmatter
Elérési út: `%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'
/(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:
person: személyek
man: férfiak
@@ -62,3 +115,24 @@ FORM:
VALIDATION_FAIL: '<b>A validáció hibát talált:</b>'
INVALID_INPUT: 'Az itt megadott érték érvénytelen:'
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:
NO_DATE_PROVIDED: Nessuna data fornita
BAD_DATE: Data errata
BAD_DATE: Data non valida
AGO: fa
FROM_NOW: da adesso
SECOND: secondo
@@ -10,6 +12,14 @@ NICETIME:
WEEK: settimana
MONTH: mese
YEAR: anno
DECADE: decennio
SEC: sec
MIN: min
HR: ora
WK: settimana
MO: mese
YR: anno
DEC: decennio
SECOND_PLURAL: secondi
MINUTE_PLURAL: minuti
HOUR_PLURAL: ore
@@ -18,9 +28,16 @@ NICETIME:
MONTH_PLURAL: mesi
YEAR_PLURAL: anni
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:
VALIDATION_FAIL: '<b>Validazione fallita:</b>'
INVALID_INPUT: Input invalido in
INVALID_INPUT: Input non valido in
MISSING_REQUIRED_FIELD: 'Campo richiesto mancante:'
MONTHS_OF_THE_YEAR:
- Gennaio
@@ -36,10 +53,10 @@ MONTHS_OF_THE_YEAR:
- Novembre
- Dicembre
DAYS_OF_THE_WEEK:
- Lunedi
- Martedi
- Mercoledi
- Giovedi
- Venerdi
- Lunedì
- Martedì
- Mercoledì
- Giovedì
- Venerdì
- Sabato
- Domenica

View File

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

View File

@@ -1,3 +1,4 @@
---
INFLECTOR_IRREGULAR:
person: personen
man: mensen
@@ -13,10 +14,15 @@ NICETIME:
MINUTE: minuut
HOUR: uur
DAY: dag
WEEK: week
MONTH: maand
YEAR: jaar
DECADE: decenium
SEC: s
MIN: min
HR: u
MO: ma
YR: j
SECOND_PLURAL: seconden
MINUTE_PLURAL: minuten
HOUR_PLURAL: uren
@@ -31,15 +37,23 @@ NICETIME:
WK_PLURAL: weken
MO_PLURAL: maanden
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:
0: Januari
1: Februari
2: Maart
4: Mei
5: Juni
6: Juli
7: Augustus
9: Oktober
- Januari
- Februari
- Maart
- april
- Mei
- Juni
- Juli
- Augustus
- september
- Oktober
- november
- december
DAYS_OF_THE_WEEK:
- Maandag
- Dinsdag

View File

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

View File

@@ -1,14 +1,15 @@
---
FRONTMATTER_ERROR_PAGE: |
---
title: %1$s
---
# Error: Nieprawidłowy Frontmatter
Path: `%2$s`
**%3$s**
```
%4$s
```
@@ -28,8 +29,8 @@ NICETIME:
SEC: sek
MIN: min
HR: godz
WK: tydź
MO: mieś
WK: tydz
MO: m-c
YR: rok
DEC: dekada
SECOND_PLURAL: sekund
@@ -40,16 +41,16 @@ NICETIME:
MONTH_PLURAL: miesięcy
YEAR_PLURAL: lat
DECADE_PLURAL: dekad
SEC_PLURAL: sekund
MIN_PLURAL: minut
SEC_PLURAL: sek
MIN_PLURAL: min
HR_PLURAL: godz
WK_PLURAL: tyg
MO_PLURAL: mieś
MO_PLURAL: m-ce
YR_PLURAL: lat
DEC_PLURAL: dekad
FORM:
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:'
MONTHS_OF_THE_YEAR:
- 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:
1: informação
2: arroz
@@ -6,6 +21,10 @@ INFLECTOR_IRREGULAR:
man: homens
sex: sexos
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
MINUTE: minuto
HOUR: hora
@@ -16,8 +35,11 @@ NICETIME:
DECADE: década
SEC: seg
MIN: mín
MO: mês
YR: ano
HR: h
WK: sem
MO: m
YR: a
DEC: dec
SECOND_PLURAL: segundos
MINUTE_PLURAL: minutos
HOUR_PLURAL: horas
@@ -29,9 +51,11 @@ NICETIME:
SEC_PLURAL: seg
MIN_PLURAL: mins
HR_PLURAL: hrs
WK_PLURAL: sems
YR_PLURAL: anos
FORM:
VALIDATION_FAIL: '<b>Validação falhada: </b>'
MISSING_REQUIRED_FIELD: 'Campo obrigatório ausente:'
MONTHS_OF_THE_YEAR:
- Janeiro
- 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:
0: Ianuarie
1: Februarie
2: Martie
3: Aprilue
4: Mai
5: Iunie
6: Iulie
8: Septembrie
9: Octombrie
10: Noiembrie
11: Decembrie
- Ianuarie
- Februarie
- Martie
- Aprilie
- Mai
- Iunie
- Iulie
- August
- Septembrie
- Octombrie
- Noiembrie
- Decembrie
DAYS_OF_THE_WEEK:
- Luni
- Marti
- Marți
- Miercuri
- Joi
- Vineri

View File

@@ -1,3 +1,18 @@
---
FRONTMATTER_ERROR_PAGE: |
---
title: %1$s
---
# Ошибка: Недопустимое содержимое
Path: `%2$s`
**%3$s**
```
%4$s
```
INFLECTOR_IRREGULAR:
person: люди
man: человек
@@ -20,8 +35,8 @@ NICETIME:
SEC: с
MIN: мин
HR: ч
WK: нед
MO: мес
WK: нед.
MO: мес.
YR: г.
DEC: гг.
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:
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
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:
NO_DATE_PROVIDED: Tarih yok
BAD_DATE: Yanlış tarih
@@ -33,3 +34,26 @@ NICETIME:
MO_PLURAL: ay
YR_PLURAL: yl
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,11 +1,17 @@
<?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;
use Closure;
use Exception;
use FilesystemIterator;
use Grav\Common\Config\Config;
use Grav\Common\Grav;
use RecursiveDirectoryIterator;
use RecursiveIteratorIterator;
use RegexIterator;
@@ -14,14 +20,6 @@ use RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator;
define('CSS_ASSET', true);
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
{
/** @const Regex to match CSS and JavaScript files */
@@ -34,7 +32,7 @@ class Assets
const JS_REGEX = '/.\.js$/i';
/** @const Regex to match CSS urls */
const CSS_URL_REGEX = '{url\([\'\"]?((?!http|//).*?)[\'\"]?\)}';
const CSS_URL_REGEX = '{url\(([\'\"]?)(.*?)\1\)}';
/** @const Regex to match CSS sourcemap comments */
const CSS_SOURCEMAP_REGEX = '{\/\*# (.*) \*\/}';
@@ -283,7 +281,9 @@ class Assets
return $this;
}
$modified = 0;
if (!$this->isRemoteLink($asset)) {
$modified = $this->getLastModificationTime($asset);
$asset = $this->buildLocalLink($asset);
}
@@ -296,8 +296,9 @@ class Assets
'asset' => $asset,
'priority' => intval($priority ?: 10),
'order' => count($this->css),
'pipeline' => (bool)$pipeline,
'group' => $group ?: 'head'
'pipeline' => (bool) $pipeline,
'group' => $group ?: 'head',
'modified' => $modified
];
// check for dynamic array and merge with defaults
@@ -344,7 +345,9 @@ class Assets
return $this;
}
$modified = 0;
if (!$this->isRemoteLink($asset)) {
$modified = $this->getLastModificationTime($asset);
$asset = $this->buildLocalLink($asset);
}
@@ -357,9 +360,10 @@ class Assets
'asset' => $asset,
'priority' => intval($priority ?: 10),
'order' => count($this->js),
'pipeline' => (bool)$pipeline,
'pipeline' => (bool) $pipeline,
'loading' => $loading ?: '',
'group' => $group ?: 'head'
'group' => $group ?: 'head',
'modified' => $modified
];
// check for dynamic array and merge with defaults
@@ -669,16 +673,13 @@ class Assets
*/
protected function pipelineCss($group = 'head')
{
/** @var Cache $cache */
$cache = Grav::instance()['cache'];
$key = '?' . $cache->getKey();
// temporary list of assets to pipeline
$temp_css = [];
// clear no-pipeline assets lists
$this->css_no_pipeline = [];
// Compute uid based on assets and timestamp
$uid = md5(json_encode($this->css) . $this->css_minify . $this->css_rewrite . $group);
$file = $uid . '.css';
$inline_file = $uid . '-inline.css';
@@ -692,7 +693,7 @@ class Assets
// If pipeline exist return it
if (file_exists($this->assets_dir . $file)) {
return $relative_path . $key;
return $relative_path . $this->timestamp;
}
// Remove any non-pipeline files
@@ -730,15 +731,16 @@ class Assets
// Concatenate files
$buffer = $this->gatherLinks($temp_css, CSS_ASSET);
if ($css_minify) {
$min = new \CSSmin();
$buffer = $min->run($buffer);
$minifier = new \MatthiasMullie\Minify\CSS();
$minifier->add($buffer);
$buffer = $minifier->minify();
}
// Write file
if (strlen(trim($buffer)) > 0) {
file_put_contents($this->assets_dir . $file, $buffer);
return $relative_path . $key;
return $relative_path . $this->timestamp;
} else {
return false;
}
@@ -753,16 +755,13 @@ class Assets
*/
protected function pipelineJs($group = 'head')
{
/** @var Cache $cache */
$cache = Grav::instance()['cache'];
$key = '?' . $cache->getKey();
// temporary list of assets to pipeline
$temp_js = [];
// clear no-pipeline assets lists
$this->js_no_pipeline = [];
// Compute uid based on assets and timestamp
$uid = md5(json_encode($this->js) . $this->js_minify . $group);
$file = $uid . '.js';
$inline_file = $uid . '-inline.js';
@@ -776,7 +775,7 @@ class Assets
// If pipeline exist return it
if (file_exists($this->assets_dir . $file)) {
return $relative_path . $key;
return $relative_path . $this->timestamp;
}
// Remove any non-pipeline files
@@ -804,14 +803,16 @@ class Assets
// Concatenate files
$buffer = $this->gatherLinks($temp_js, JS_ASSET);
if ($this->js_minify) {
$buffer = \JSMin::minify($buffer);
$minifier = new \MatthiasMullie\Minify\JS();
$minifier->add($buffer);
$buffer = $minifier->minify();
}
// Write file
if (strlen(trim($buffer)) > 0) {
file_put_contents($this->assets_dir . $file, $buffer);
return $relative_path . $key;
return $relative_path . $this->timestamp;
} else {
return false;
}
@@ -819,24 +820,94 @@ class 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
*/
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 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
*/
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;
}
/**
* 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
*
@@ -847,6 +918,16 @@ class Assets
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
*
@@ -1018,18 +1099,37 @@ class Assets
/**
* 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 {
$asset = Grav::instance()['locator']->findResource($asset, false);
$asset = Grav::instance()['locator']->findResource($asset, $absolute);
} 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;
}
/**
@@ -1149,13 +1249,18 @@ class Assets
// Then replace the old url with the new one
$file = preg_replace_callback(self::CSS_URL_REGEX, function ($matches) use ($relative_path) {
$old_url = $matches[1];
$old_url = $matches[2];
// ensure this is not a data url
if (strpos($old_url, 'data:') === 0) {
return $matches[0];
}
// ensure this is not a remote url
if ($this->isRemoteLink($old_url)) {
return $matches[0];
}
$new_url = $this->base_url . ltrim(Utils::normalizePath($relative_path . '/' . $old_url), '/');
return str_replace($old_url, $new_url, $matches[0]);

View File

@@ -1,15 +1,16 @@
<?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;
use Grav\Common\Grav;
use Grav\Common\Inflector;
/**
* The ZipBackup class lets you create simple zip-backups of a grav site
*
* @author RocketTheme
* @license MIT
*/
class ZipBackup
{
protected static $ignorePaths = [

View File

@@ -1,13 +1,15 @@
<?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;
/**
* Handles browser and platform versions
*
* Internally uses the PhpUserAgent package https://github.com/donatj/PhpUserAgent
*
* @author RocketTheme
* @license MIT
*/
class Browser
{

View File

@@ -1,4 +1,11 @@
<?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;
use \Doctrine\Common\Cache as DoctrineCache;
@@ -16,9 +23,6 @@ use Grav\Common\Grav;
* MemCache
* MemCacheD
* FileSystem
*
* @author RocketTheme
* @license MIT
*/
class Cache extends Getters
{
@@ -177,11 +181,18 @@ class Cache extends Getters
$driver->setMemcache($memcache);
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':
$redis = new \Redis();
$redis->connect($this->config->get('system.cache.redis.server', 'localhost'),
$this->config->get('system.cache.redis.port', 6379));
$driver = new DoctrineCache\RedisCache();
$driver->setRedis($redis);
break;

View File

@@ -1,13 +1,13 @@
<?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;
/**
* Offers composer helper methods.
*
* @author eschmar
* @license MIT
*/
class Composer
{
/** @const Default composer location */

View File

@@ -1,11 +1,15 @@
<?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;
use RocketTheme\Toolbox\File\PhpFile;
/**
* The Compiled base class.
*/
abstract class CompiledBase
{
/**
@@ -192,9 +196,9 @@ abstract class CompiledBase
}
$this->createObject($cache['data']);
$this->finalizeObject();
return true;
}

View File

@@ -1,13 +1,16 @@
<?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;
use Grav\Common\Data\Blueprint;
use Grav\Common\Data\BlueprintSchema;
use Grav\Common\Grav;
/**
* The Compiled Blueprints class.
*/
class CompiledBlueprints extends CompiledBase
{
/**

View File

@@ -1,11 +1,15 @@
<?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;
use Grav\Common\File\CompiledYamlFile;
/**
* The Compiled Configuration class.
*/
class CompiledConfig extends CompiledBase
{
/**

View File

@@ -1,11 +1,15 @@
<?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;
use Grav\Common\File\CompiledYamlFile;
/**
* The Compiled Languages class.
*/
class CompiledLanguages extends CompiledBase
{
/**

View File

@@ -1,4 +1,11 @@
<?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;
use Grav\Common\Debugger;
@@ -6,12 +13,6 @@ use Grav\Common\Grav;
use Grav\Common\Data\Data;
use Grav\Common\Service\ConfigServiceProvider;
/**
* The Config class contains configuration information.
*
* @author RocketTheme
* @license MIT
*/
class Config extends Data
{
protected $checksum;

View File

@@ -1,11 +1,15 @@
<?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;
use Grav\Common\Filesystem\Folder;
/**
* The Configuration & Blueprints Finder class.
*/
class ConfigFileFinder
{
protected $base = '';

View File

@@ -1,14 +1,15 @@
<?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;
use Grav\Common\Data\Data;
/**
* The Languages class contains configuration rules.
*
* @author RocketTheme
* @license MIT
*/
class Languages extends Data
{
public function checksum($checksum = null)

View File

@@ -1,4 +1,11 @@
<?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;
use Grav\Common\File\CompiledYamlFile;
@@ -8,12 +15,6 @@ use Pimple\Container;
use RocketTheme\Toolbox\File\YamlFile;
use RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator;
/**
* The Config class contains configuration information.
*
* @author RocketTheme
* @license MIT
*/
class Setup extends Data
{
protected $streams = [

View File

@@ -1,4 +1,11 @@
<?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;
use Grav\Common\File\CompiledYamlFile;
@@ -6,11 +13,6 @@ use Grav\Common\Grav;
use RocketTheme\Toolbox\Blueprints\BlueprintForm;
use RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator;
/**
* The Config class contains configuration information.
*
* @author RocketTheme
*/
class Blueprint extends BlueprintForm
{
/**
@@ -23,6 +25,21 @@ class Blueprint extends BlueprintForm
*/
protected $blueprintSchema;
/**
* Set default values for field types.
*
* @param array $types
* @return $this
*/
public function setTypes(array $types)
{
$this->initInternals();
$this->blueprintSchema->setTypes($types);
return $this;
}
/**
* Get nested structure containing default values defined in the blueprints.
*
@@ -130,35 +147,41 @@ class Blueprint extends BlueprintForm
*/
protected function getFiles($path, $context = null)
{
if (is_string($path) && !strpos($path, '://')) {
// Resolve filename.
if (isset($this->overrides[$path])) {
$path = $this->overrides[$path];
} else {
if ($context === null) {
$context = $this->context;
}
if ($context && $context[strlen($context)-1] !== '/') {
$context .= '/';
}
$path = $context . $path;
/** @var UniformResourceLocator $locator */
$locator = Grav::instance()['locator'];
if (!preg_match('/\.yaml$/', $path)) {
$path .= '.yaml';
}
if (is_string($path) && !$locator->isStream($path)) {
// Find path overrides.
$paths = isset($this->overrides[$path]) ? (array) $this->overrides[$path] : [];
// Add path pointing to default context.
if ($context === null) {
$context = $this->context;
}
if ($context && $context[strlen($context)-1] !== '/') {
$context .= '/';
}
$path = $context . $path;
if (!preg_match('/\.yaml$/', $path)) {
$path .= '.yaml';
}
$paths[] = $path;
} else {
$paths = (array) $path;
}
$files = [];
foreach ($paths as $lookup) {
if (is_string($lookup) && strpos($lookup, '://')) {
$files = array_merge($files, $locator->findResources($lookup));
} else {
$files[] = $lookup;
}
}
if (is_string($path) && strpos($path, '://')) {
/** @var UniformResourceLocator $locator */
$locator = Grav::instance()['locator'];
$files = $locator->findResources($path);
} else {
$files = (array) $path;
}
return $files;
return array_values(array_unique($files));
}
/**

View File

@@ -1,4 +1,11 @@
<?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;
use Grav\Common\Grav;
@@ -6,12 +13,6 @@ use RocketTheme\Toolbox\ArrayTraits\Export;
use RocketTheme\Toolbox\ArrayTraits\ExportInterface;
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
{
use Export;
@@ -132,8 +133,15 @@ class BlueprintSchema extends BlueprintSchemaBase implements ExportInterface
}
$field = $this->items[$field];
if (isset($field['validate']['required'])
&& $field['validate']['required'] === true
&& !isset($data[$name])) {
&& $field['validate']['required'] === true) {
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'];
$language = Grav::instance()['language'];
$message = sprintf($language->translate('FORM.MISSING_REQUIRED_FIELD', null, true) . ' %s', $language->translate($value));

View File

@@ -1,15 +1,16 @@
<?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;
use Grav\Common\Grav;
use RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator;
/**
* Blueprints class keeps track on blueprint instances.
*
* @author RocketTheme
* @license MIT
*/
class Blueprints
{
protected $search;
@@ -87,7 +88,9 @@ class Blueprints
$blueprint = new Blueprint($name);
if (is_array($this->search) || is_object($this->search)) {
// Page types.
$blueprint->setOverrides($this->search);
$blueprint->setContext('blueprints://pages');
} else {
$blueprint->setContext($this->search);
}

View File

@@ -1,4 +1,11 @@
<?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;
use RocketTheme\Toolbox\ArrayTraits\Countable;
@@ -8,12 +15,6 @@ use RocketTheme\Toolbox\ArrayTraits\NestedArrayAccessWithGetters;
use RocketTheme\Toolbox\File\File;
use RocketTheme\Toolbox\File\FileInterface;
/**
* Recursive data object
*
* @author RocketTheme
* @license MIT
*/
class Data implements DataInterface, \ArrayAccess, \Countable, ExportInterface
{
use NestedArrayAccessWithGetters, Countable, Export;

View File

@@ -1,14 +1,15 @@
<?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;
use RocketTheme\Toolbox\File\FileInterface;
/**
* Data interface
*
* @author RocketTheme
* @license MIT
*/
interface DataInterface
{
/**

View File

@@ -1,4 +1,11 @@
<?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;
use Grav\Common\Grav;
@@ -6,12 +13,6 @@ use Symfony\Component\Yaml\Exception\ParseException;
use Symfony\Component\Yaml\Parser;
use Symfony\Component\Yaml\Yaml;
/**
* Data validation.
*
* @author RocketTheme
* @license MIT
*/
class Validation
{
/**
@@ -49,16 +50,16 @@ class Validation
$type = (string) isset($field['validate']['type']) ? $field['validate']['type'] : $field['type'];
$method = 'type'.strtr($type, '-', '_');
if (!method_exists(__CLASS__, $method)) {
$method = 'typeText';
}
$name = ucfirst(isset($field['label']) ? $field['label'] : $field['name']);
$message = (string) isset($field['validate']['message'])
? $language->translate($field['validate']['message'])
: $language->translate('FORM.INVALID_INPUT', null, true) . ' "' . $language->translate($name) . '"';
$success = self::$method($value, $validate, $field);
if (method_exists(__CLASS__, $method)) {
$success = self::$method($value, $validate, $field);
} else {
$success = true;
}
if (!$success) {
$messages[$field['name']][] = $message;
@@ -301,15 +302,7 @@ class Validation
protected static function filterFile($value, array $params, array $field)
{
if (isset($field['multiple']) && $field['multiple'] === true) {
return (array) $value;
}
if (is_array($value)) {
return reset($value);
}
return $value;
return (array) $value;
}
/**
@@ -333,7 +326,6 @@ class Validation
* @param array $field Blueprint for the field.
* @return bool True if validation succeeded.
*/
public static function typeNumber($value, array $params, array $field)
{
if (!is_numeric($value)) {
@@ -413,7 +405,15 @@ class Validation
*/
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
/**
* @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;
use Grav\Common\Grav;

View File

@@ -1,4 +1,11 @@
<?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;
use DebugBar\DataCollector\ConfigCollector;
@@ -6,10 +13,6 @@ use DebugBar\JavascriptRenderer;
use DebugBar\StandardDebugBar;
use Grav\Common\Config\Config;
/**
* Class Debugger
* @package Grav\Common
*/
class Debugger
{
/** @var Grav $grav */

View File

@@ -1,13 +1,16 @@
<?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;
use Grav\Common\Grav;
use Whoops;
/**
* Class Debugger
* @package Grav\Common
*/
class Errors
{
public function resetHandlers()

View File

@@ -1,4 +1,11 @@
<?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;
use Whoops\Handler\Handler;

View File

@@ -1,17 +1,15 @@
<?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;
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
{
/**

View File

@@ -1,4 +1,11 @@
<?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;
use RocketTheme\Toolbox\File\MarkdownFile;

View File

@@ -1,4 +1,11 @@
<?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;
use RocketTheme\Toolbox\File\YamlFile;

View File

@@ -1,15 +1,16 @@
<?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;
use Grav\Common\Grav;
use RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator;
/**
* Folder helper class.
*
* @author RocketTheme
* @license MIT
*/
abstract class Folder
{
/**

View File

@@ -1,12 +1,15 @@
<?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;
use Grav\Common\Grav;
/**
* Class RecursiveFolderFilterIterator
* @package Grav\Common\Filesystem
*/
class RecursiveFolderFilterIterator extends \RecursiveFilterIterator
{
protected static $folder_ignores;

View File

@@ -1,4 +1,11 @@
<?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;
use Grav\Common\Iterator;

View File

@@ -1,4 +1,11 @@
<?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;
use Grav\Common\Iterator;

View File

@@ -1,4 +1,11 @@
<?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;
use Grav\Common\Iterator;

View File

@@ -1,19 +1,15 @@
<?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;
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 {
protected $data;

View File

@@ -1,4 +1,11 @@
<?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;
use Grav\Common\Grav;
@@ -32,19 +39,23 @@ class GPM extends Iterator
*/
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
* @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
*/
public function __construct($refresh = false, $callback = null)
{
$this->installed = new Local\Packages();
$this->installed = new Local\Packages();
try {
$this->repository = new Remote\Packages($refresh, $callback);
$this->grav = new Remote\GravCore($refresh, $callback);
$this->grav = new Remote\GravCore($refresh, $callback);
} catch (\Exception $e) {
}
}
@@ -72,7 +83,7 @@ class GPM extends Iterator
/**
* 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
*/
public function getInstalledPackage($slug)
@@ -88,7 +99,7 @@ class GPM extends Iterator
/**
* 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
*/
public function getInstalledPlugin($slug)
@@ -107,7 +118,7 @@ class GPM extends Iterator
/**
* 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
*/
public function isPluginInstalled($slug)
@@ -115,9 +126,14 @@ class GPM extends Iterator
return isset($this->installed['plugins'][$slug]);
}
public function isPluginInstalledAsSymlink($slug)
{
return $this->installed['plugins'][$slug]->symlink;
}
/**
* 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
*/
public function getInstalledTheme($slug)
@@ -136,7 +152,7 @@ class GPM extends Iterator
/**
* 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
*/
public function isThemeInstalled($slug)
@@ -161,20 +177,23 @@ class GPM extends Iterator
/**
* 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
* @param $list_type_update specifies what type of package to update
* @return array Array of updatable Plugins and Themes.
* 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;
}
@@ -185,7 +204,7 @@ class GPM extends Iterator
*/
public function getUpdatablePlugins()
{
$items = [];
$items = [];
$repository = $this->repository['plugins'];
// local cache to speed things up
@@ -198,14 +217,15 @@ class GPM extends Iterator
continue;
}
$local_version = $plugin->version ? $plugin->version : 'Unknown';
$local_version = $plugin->version ? $plugin->version : 'Unknown';
$remote_version = $repository[$slug]->version;
if (version_compare($local_version, $remote_version) < 0) {
$repository[$slug]->available = $remote_version;
$repository[$slug]->version = $local_version;
$repository[$slug]->type = $repository[$slug]->release_type;
$items[$slug] = $repository[$slug];
$repository[$slug]->version = $local_version;
$repository[$slug]->name = $repository[$slug]->name;
$repository[$slug]->type = $repository[$slug]->release_type;
$items[$slug] = $repository[$slug];
}
}
@@ -239,7 +259,7 @@ class GPM extends Iterator
/**
* 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
*/
public function isUpdatable($slug)
@@ -249,12 +269,12 @@ class GPM extends Iterator
/**
* 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
*/
public function isPluginUpdatable($plugin)
{
return array_key_exists($plugin, (array) $this->getUpdatablePlugins());
return array_key_exists($plugin, (array)$this->getUpdatablePlugins());
}
/**
@@ -264,7 +284,7 @@ class GPM extends Iterator
*/
public function getUpdatableThemes()
{
$items = [];
$items = [];
$repository = $this->repository['themes'];
// local cache to speed things up
@@ -277,14 +297,14 @@ class GPM extends Iterator
continue;
}
$local_version = $plugin->version ? $plugin->version : 'Unknown';
$local_version = $plugin->version ? $plugin->version : 'Unknown';
$remote_version = $repository[$slug]->version;
if (version_compare($local_version, $remote_version) < 0) {
$repository[$slug]->available = $remote_version;
$repository[$slug]->version = $local_version;
$repository[$slug]->type = $repository[$slug]->release_type;
$items[$slug] = $repository[$slug];
$repository[$slug]->version = $local_version;
$repository[$slug]->type = $repository[$slug]->release_type;
$items[$slug] = $repository[$slug];
}
}
@@ -295,12 +315,12 @@ class GPM extends Iterator
/**
* 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
*/
public function isThemeUpdatable($theme)
{
return array_key_exists($theme, (array) $this->getUpdatableThemes());
return array_key_exists($theme, (array)$this->getUpdatableThemes());
}
/**
@@ -403,7 +423,7 @@ class GPM extends Iterator
/**
* 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
*/
public function findPackage($search)
@@ -431,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");
}
if ($themes) foreach ($themes as $slug => $theme) {
if ($search == $slug || $search == $theme->name) {
return $theme;
if ($themes) {
foreach ($themes as $slug => $theme) {
if ($search == $slug || $search == $theme->name) {
return $theme;
}
}
}
if ($plugins) foreach ($plugins as $slug => $plugin) {
if ($search == $slug || $search == $plugin->name) {
return $plugin;
if ($plugins) {
foreach ($plugins as $slug => $plugin) {
if ($search == $slug || $search == $plugin->name) {
return $plugin;
}
}
}
@@ -461,7 +485,7 @@ class GPM extends Iterator
$repository = '';
// if this is an object, get the search data from the key
if (is_object($search)) {
$search = (array) $search;
$search = (array)$search;
$key = key($search);
$repository = $search[$key];
$search = $key;
@@ -515,9 +539,9 @@ class GPM extends Iterator
$dependent_packages = [];
foreach($packages as $package_name => $package) {
foreach ($packages as $package_name => $package) {
if (isset($package['dependencies'])) {
foreach($package['dependencies'] as $dependency) {
foreach ($package['dependencies'] as $dependency) {
if (is_array($dependency)) {
$dependency = array_keys($dependency)[0];
}
@@ -544,7 +568,7 @@ class GPM extends Iterator
public function getVersionOfDependencyRequiredByPackage($package_slug, $dependency_slug)
{
$dependencies = $this->getInstalledPackage($package_slug)->dependencies;
foreach($dependencies as $dependency) {
foreach ($dependencies as $dependency) {
if (isset($dependency[$dependency_slug])) {
return $dependency[$dependency_slug];
}
@@ -556,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.
*
* @param string $slug
* @param string $version_with_operator
* @param string $version_with_operator
* @param array $ignore_packages_list
*
* @return bool
* @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
$dependent_packages = $this->getPackagesThatDependOnPackage($slug);
$version = $this->calculateVersionNumberFromDependencyVersion($version_with_operator);
if (count($dependent_packages)) {
foreach($dependent_packages as $dependent_package) {
$other_dependency_version_with_operator = $this->getVersionOfDependencyRequiredByPackage($dependent_package, $slug);
$other_dependency_version= $this->calculateVersionNumberFromDependencyVersion($other_dependency_version_with_operator);
foreach ($dependent_packages as $dependent_package) {
$other_dependency_version_with_operator = $this->getVersionOfDependencyRequiredByPackage($dependent_package,
$slug);
$other_dependency_version = $this->calculateVersionNumberFromDependencyVersion($other_dependency_version_with_operator);
// check version is compatible with the one needed by the current package
if ($this->versionFormatIsNextSignificantRelease($other_dependency_version_with_operator)) {
@@ -600,7 +629,8 @@ class GPM extends Iterator
public function checkPackagesCanBeInstalled($packages_names_list)
{
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);
}
}
@@ -617,7 +647,8 @@ class GPM extends Iterator
* @return mixed
* @throws \Exception
*/
public function getDependencies($packages) {
public function getDependencies($packages)
{
$dependencies = $this->calculateMergedDependenciesOfPackages($packages);
foreach ($dependencies as $dependency_slug => $dependencyVersionWithOperator) {
if (in_array($dependency_slug, $packages)) {
@@ -627,15 +658,23 @@ class GPM extends Iterator
//First, check for Grav dependency. If a dependency requires Grav > the current version, abort and tell.
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
throw new \Exception("<red>One of the packages require Grav " . $dependencies['grav'] . ". Please update Grav to the latest release.");
} else {
unset($dependencies[$dependency_slug]);
continue;
}
}
if ($this->isPluginInstalled($dependency_slug)) {
if ($this->isPluginInstalledAsSymlink($dependency_slug)) {
unset($dependencies[$dependency_slug]);
continue;
}
$dependencyVersion = $this->calculateVersionNumberFromDependencyVersion($dependencyVersionWithOperator);
// get currently installed version
@@ -662,7 +701,8 @@ class GPM extends Iterator
if ($this->firstVersionIsLower($latestRelease, $dependencyVersion)) {
//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)) {
@@ -705,18 +745,20 @@ class GPM extends Iterator
public function checkNoOtherPackageNeedsTheseDependenciesInALowerVersion($dependencies_slugs)
{
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;
}
/**
* 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
*
@@ -746,8 +788,7 @@ class GPM extends Iterator
//Factor in the package dependencies too
$dependencies = $this->calculateMergedDependenciesOfPackage($current_package_name, $dependencies);
}
else {
} else {
// Dependency already added by another package
//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 !== '*') {
@@ -766,7 +807,8 @@ class GPM extends Iterator
$current_package_version_number = $this->calculateVersionNumberFromDependencyVersion($current_package_version_information);
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;
@@ -780,13 +822,17 @@ class GPM extends Iterator
} else {
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
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;
}
} 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) {
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);
}
}
}
@@ -854,7 +900,8 @@ class GPM extends Iterator
*
* @return bool
*/
public function versionFormatIsNextSignificantRelease($version) {
public function versionFormatIsNextSignificantRelease($version)
{
return substr($version, 0, 1) == '~';
}
@@ -867,7 +914,8 @@ class GPM extends Iterator
*
* @return bool
*/
public function versionFormatIsEqualOrHigher($version) {
public function versionFormatIsEqualOrHigher($version)
{
return substr($version, 0, 2) == '>=';
}

View File

@@ -1,4 +1,11 @@
<?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;
use Grav\Common\Filesystem\Folder;

View File

@@ -1,4 +1,10 @@
<?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;

View File

@@ -1,4 +1,11 @@
<?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;
use Grav\Common\Data\Data;

View File

@@ -1,4 +1,11 @@
<?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;
use Grav\Common\GPM\Common\CachedCollection;

View File

@@ -1,12 +1,15 @@
<?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;
use Grav\Common\Grav;
/**
* Class Plugins
* @package Grav\Common\GPM\Local
*/
class Plugins extends AbstractPackageCollection
{
/**

View File

@@ -1,12 +1,15 @@
<?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;
use Grav\Common\Grav;
/**
* Class Themes
* @package Grav\Common\GPM\Local
*/
class Themes extends AbstractPackageCollection
{
/**

View File

@@ -1,4 +1,11 @@
<?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;
use Grav\Common\Grav;
@@ -6,10 +13,6 @@ use Grav\Common\GPM\Common\AbstractPackageCollection as BaseCollection;
use Grav\Common\GPM\Response;
use \Doctrine\Common\Cache\FilesystemCache;
/**
* Class AbstractPackageCollection
* @package Grav\Common\GPM\Remote
*/
class AbstractPackageCollection extends BaseCollection
{
/**
@@ -50,6 +53,11 @@ class AbstractPackageCollection extends BaseCollection
$this->fetch($refresh, $callback);
foreach (json_decode($this->raw, true) as $slug => $data) {
// Temporarily fix for using multisites
if (isset($data['install_path'])) {
$path = preg_replace('~^user/~i', 'user://', $data['install_path']);
$data['install_path'] = Grav::instance()['locator']->findResource($path, false, true);
}
$this->items[$slug] = new Package($data, $this->type);
}
}

View File

@@ -1,4 +1,11 @@
<?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;
use Grav\Common\Grav;

View File

@@ -1,4 +1,11 @@
<?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;
use Grav\Common\Data\Data;

View File

@@ -1,4 +1,11 @@
<?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;
use Grav\Common\GPM\Common\CachedCollection;

View File

@@ -1,10 +1,13 @@
<?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;
/**
* Class Plugins
* @package Grav\Common\GPM\Remote
*/
class Plugins extends AbstractPackageCollection
{
/**

View File

@@ -1,10 +1,13 @@
<?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;
/**
* Class Themes
* @package Grav\Common\GPM\Remote
*/
class Themes extends AbstractPackageCollection
{
/**

View File

@@ -1,13 +1,16 @@
<?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;
use Grav\Common\Utils;
use Grav\Common\Grav;
/**
* Class Response
* @package Grav\Common\GPM
*/
class Response
{
/**

View File

@@ -1,7 +1,12 @@
<?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

View File

@@ -1,13 +1,13 @@
<?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;
/**
* Abstract class to implement magic __get(), __set(), __isset() and __unset().
* Also implements ArrayAccess.
*
* @author RocketTheme
* @license MIT
*/
abstract class Getters implements \ArrayAccess, \Countable
{
/**

View File

@@ -1,19 +1,17 @@
<?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;
use Grav\Common\Page\Medium\ImageMedium;
use RocketTheme\Toolbox\DI\Container;
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
{
@@ -126,6 +124,7 @@ class Grav extends Container
// Set the header type
$this->header();
echo $this->output;
$debugger->render();
@@ -322,9 +321,8 @@ class Grav extends Container
$success = function_exists('fastcgi_finish_request') ? @fastcgi_finish_request() : false;
if (!$success) {
// Unfortunately without FastCGI there is no way to close the connection. We need to ask browser to
// close the connection for us.
// Unfortunately without FastCGI there is no way to force close the connection.
// We need to ask browser to close the connection for us.
if ($this['config']->get('system.cache.gzip')) {
// Flush gzhandler buffer if gzip setting was enabled.
ob_end_flush();
@@ -335,11 +333,11 @@ class Grav extends Container
header('Content-Encoding: none');
}
// Get length and close the connection.
header('Content-Length: ' . ob_get_length());
header("Connection: close");
// Finally flush the regular buffer.
ob_end_flush();
@ob_flush();
flush();
@@ -446,6 +444,8 @@ class Grav extends Container
*/
public function fallbackUrl($path)
{
$this->fireEvent('onPageFallBackUrl');
/** @var Uri $uri */
$uri = $this['uri'];
@@ -454,7 +454,7 @@ class Grav extends Container
$uri_extension = $uri->extension();
$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
if (!empty($fallback_types) && !in_array($uri_extension, $fallback_types)) {

View File

@@ -1,20 +1,26 @@
<?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;
/**
* Class GravTrait
*
* @package Grav\Common
* @deprecated
*/
trait GravTrait
{
protected static $grav;
/**
* @return Grav
*/
public static function getGrav()
{
return Grav::instance();
if (!self::$grav) {
self::$grav = Grav::instance();
}
return self::$grav;
}
}

View File

@@ -1,4 +1,11 @@
<?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;
use DOMDocument;

View File

@@ -1,4 +1,11 @@
<?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;
use Grav\Common\Grav;
@@ -7,19 +14,6 @@ use Grav\Common\Grav;
* 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
{
protected $plural;

View File

@@ -1,4 +1,11 @@
<?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;
use RocketTheme\Toolbox\ArrayTraits\ArrayAccessWithGetters;
@@ -8,10 +15,6 @@ use RocketTheme\Toolbox\ArrayTraits\Countable;
use RocketTheme\Toolbox\ArrayTraits\Export;
use RocketTheme\Toolbox\ArrayTraits\Serializable;
/**
* Class Iterator
* @package Grav\Common
*/
class Iterator implements \ArrayAccess, \Iterator, \Countable, \Serializable
{
use Constructor, ArrayAccessWithGetters, ArrayIterator, Countable, Serializable, Export;

View File

@@ -1,12 +1,16 @@
<?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;
use Grav\Common\Grav;
use Grav\Common\Config\Config;
/**
* Language and translation functionality for Grav
*/
class Language
{
protected $grav;

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