Compare commits

..

12 Commits

Author SHA1 Message Date
e72000d2e8 self-upgrade 2025-02-19 16:41:04 +01:00
5e30403988 removed social networks btn 2025-02-19 16:40:24 +01:00
84d8a5f741 maj 2024-06-07 14:19:08 +02:00
ef3f45c3b2 update plugins 2024-06-06 16:18:09 +02:00
adc7d775dc maj 2023-09-19 12:50:55 +02:00
131ffd7020 disabled lead the way as it blocks other scrit execution 2023-01-06 11:42:20 +01:00
faaab9c4d3 maj 2023-01-03 19:00:16 +01:00
c7262233b2 fix bug form devis 2022-04-04 16:50:27 +02:00
2f006c43b0 devis 2022-03-29 10:23:39 +02:00
705918a589 annule changement .gitignore 2022-03-15 15:28:31 +01:00
4239905866 .gitignore 2022-03-15 15:25:06 +01:00
e8f529d64a email 2022-03-15 13:38:07 +01:00
538 changed files with 7024 additions and 3935 deletions

View File

@@ -1,3 +1,307 @@
# v1.7.48
## 10/28/2024
1. [](#new)
* New Trait for fetchPriority attribute on images [#3850](https://github.com/getgrav/grav/pull/3850)
1. [](#improved)
* Fix for #3164. Adds aliases as possible commands during lookup [#3863](https://github.com/getgrav/grav/pull/3863)
1. [](#bugfix)
* Fix style conflict with Clockwork and tooltips [#3861](https://github.com/getgrav/grav/pull/3861)
# v1.7.47
## 10/23/2024
1. [](#new)
* New `Utils::toAscii()` method
* Added support for Clockwork Debugger to allow web UI (requires new `clockwork-web` plugin)
1. [](#improved)
* Include modular sub-pages in last-modification date computation [#3562](https://github.com/getgrav/grav/pull/3562)
* Updated vendor libs to latest versions
* Updated JQuery to `3.7.1` [#3787](https://github.com/getgrav/grav/pull/3827)
* Updated vendor libraries to latest versions
* Support for Fediverse Creator meta tag [#3844](https://github.com/getgrav/grav/pull/3844)
1. [](#bugfix)
* Fixes deprecated for return type in Filesystem with PHP 8.3.6 [#3831](https://github.com/getgrav/grav/issues/3831)
* Fix for `exif_imagtetype()` throwing an exception when file doesn't exist
* Fix JSON output comments check with content type [#3859](https://github.com/getgrav/grav/pull/3859)
# v1.7.46
## 05/15/2024
1. [](#new)
* Added a new `Utils::toAscii()` method to remove UTF-8 characters from string
1. [](#improved)
* Removed unused `symfony/service-contracts` [#3828](https://github.com/getgrav/grav/pull/3828)
* Upgraded bundled legacy JQuery to `3.7.1` [#3727](https://github.com/getgrav/grav/pull/3827)
* Include modular pages in header `last-modified:` calculation [#3562](https://github.com/getgrav/grav/pull/3562)
* Updated vendor libs to latest versions
1. [](#bugfix)
* Fixed some deprecated issues in Filesystem [#3831](https://github.com/getgrav/grav/issues/3831)
# v1.7.46
## 05/15/2024
1. [](#improved)
* Better handling of external protocols in `Utils::url()` such as `mailto:`, `tel:`, etc.
* Handle `GRAV_ROOT` or `GRAV_WEBROOT` when `/` [#3667](https://github.com/getgrav/grav/pull/3667)
1. [](#bugfix)
* Fixes for multi-lang taxonomy when reinitializing the languages (e.g. LangSwitcher plugin)
* Ensure the full filepath is checked for invalid filename in `MediaUploadTrait::checkFileMetadata()`
* Fixed a bug in the `on_events` REGEX pattern of `Security::detectXss()` as it was not matching correctly.
* Fixed an issue where `read_file()` Twig function could be used nefariously in content [#GHSA-f8v5-jmfh-pr69](https://github.com/getgrav/grav/security/advisories/GHSA-f8v5-jmfh-pr69)
# v1.7.45
## 03/18/2024
1. [](#new)
* Added new Image trait for `decoding` attribute [#3796](https://github.com/getgrav/grav/pull/3796)
1. [](#bugfix)
* Fixed some multibyte issues in Inflector class [#732](https://github.com/getgrav/grav/issues/732)
* Fallback to page modified date if Page date provided is invalid and can't be parsed [getgrav/grav-plugin-admin#2394](https://github.com/getgrav/grav-plugin-admin/issues/2394)
* Fixed a path traversal vulnerability with file uploads [#GHSA-m7hx-hw6h-mqmc](https://github.com/getgrav/grav/security/advisories/GHSA-m7hx-hw6h-mqmc)
* Fixed a security issue with insecure Twig functions be processed [#GHSA-2m7x-c7px-hp58](https://github.com/getgrav/grav/security/advisories/GHSA-2m7x-c7px-hp58) [#GHSA-r6vw-8v8r-pmp4](https://github.com/getgrav/grav/security/advisories/GHSA-r6vw-8v8r-pmp4) [#GHSA-qfv4-q44r-g7rv](https://github.com/getgrav/grav/security/advisories/GHSA-qfv4-q44r-g7rv) [#GHSA-c9gp-64c4-2rrh](https://github.com/getgrav/grav/security/advisories/GHSA-c9gp-64c4-2rrh)
1. [](#improved)
* Updated composer packages
* Updated `bin/composer.phar` to latest `2.7.2`
# v1.7.44
## 01/05/2024
1. [](#new)
* Added PHP `8.3` to tests [#3782](https://github.com/getgrav/grav/pull/3782)
* Added debugger messages when Page routes conflict
* Added `ISO 8601` date format [#3721](https://github.com/getgrav/grav/pull/37210)
* Added support for `.vcf` (vCard) in media configuration [#3772](https://github.com/getgrav/grav/pull/3772)
1. [](#improved)
* Update jQuery to `v3.6.4` [#3713](https://github.com/getgrav/grav/pull/3713)
* Updated vendor libraries including Dom-Sanitizer `v1.0.7` that addresses an XSS issue
* Updated `bin/composer.phar` to latest `2.6.6`
* Updated vendor libraries to latest
* Updated language files
* Updated copyright year
1. [](#bugfix)
* Fixed a math rounding issue with number validation when using floating point steps [#3761](https://github.com/getgrav/grav/issues/3761)
* Fixed an issue with `Inflector::ordinalize()` not working as expected [#3759](https://github.com/getgrav/grav/pull/3759)
* Fixed various issues with file extension checking with dangerous extensions [#3756(https://github.com/getgrav/grav/pull/3756)]
* Fix for invalid input to foreach in `UserGroupObject` [#3724](https://github.com/getgrav/grav/pull/3724)
* Fixed exception: `Property 'jsmodule_pipeline_include_externals' does not exist in object` [#3661](https://github.com/getgrav/grav/pull/3661)
* Fixed `too few arguments exception` in FlexObjects [#3658](https://github.com/getgrav/grav/pull/3658)
# v1.7.43
## 10/02/2023
1. [](#new)
* Add the ability to programatically set a page's `modified` timestamp via a `modified:` frontmatter entry
2. [](#improved)
* Update vendor libraries
* Include `phar` in the list of `security.uploads_dangerous_extensions`
* When enabled `system.languages.debug` now dumps **Key -> Value** to debugger [#3752](https://github.com/getgrav/grav/issues/3752)
* Updated built-in composer to latest `2.6.4` [#3748](https://github.com/getgrav/grav/issues/3748)
* Added support for `@import` to ensure paths are rewritten correctly in CSS pipeline [#3750](https://github.com/getgrav/grav/pull/3750)
# v1.7.42.3
## 07/18/2023
2. [](#improved)
* Fixed a typo in `Utils::isDangerousFunction`
# v1.7.42.2
## 07/18/2023
2. [](#improved)
* In `Utils::isDangerousFunction`, handle double `\\` in `|map` twig filter to mitigate SSTI attack
* Better handle empty email in `Validatoin::typeEmail()`
# v1.7.42.1
## 06/15/2023
2. [](#improved)
* Quick fix for `isDangerousFunction` when `$name` was a closure [#3727](https://github.com/getgrav/grav/issues/3727)
# v1.7.42
## 06/14/2023
1. [](#new)
* Added a new `system.languages.debug` option that adds a `<span class="translate-debug"></span>` around strings translated with `|t`. This can be styled by the theme as needed.
1. [](#improved)
* More robust SSTI handling in `filter`, `map`, and `reduce` Twig filters and functions
* Various SSTI improvements `Utils::isDangerousFunction()`
1. [](#bugfix)
* Fixed Twig `|map()` allowing code execution
* Fixed Twig `|reduce()` allowing code execution
# v1.7.41.2
## 06/01/2023
1. [](#improved)
* Added the ability to set a configurable 'key' for the Twig Cache Tag: `{% cache 'my-key' 600 %}`
1. [](#bugfix)
* Fixed an issue with special characters in slug's would cause redirect loops
# v1.7.41.1
## 05/10/2023
1. [](#bugfix)
* Fixed certain UTF-8 characters breaking `Truncator` class [#3716](https://github.com/getgrav/grav/issues/3716)
# v1.7.41
## 05/09/2023
1. [](#improved)
* Removed `FILTER_SANITIZE_STRING` input filter in favor of `htmlspecialchars(strip_tags())` for PHP 8.2+
* Added `GRAV_SANITIZE_STRING` constant to replace `FILTER_SANITIZE_STRING` for PHP 8.2+
* Support non-deprecated style dynamic properties in `Parsedown` class via `ParseDownGravTrait` for PHP 8.2+
* Modified `Truncator` to not use deprecated `mb_convert_encoding()` for PHP 8.2+
* Fixed passing null into `mb_strpos()` deprecated for PHP 8.2+
* Updated internal `TwigDeferredExtension` to be PHP 8.2+ compatible
* Upgraded `getgrav/image` fork to take advantage of various PHP 8.2+ fixes
* Use `UserGroupObject::groupNames` method in blueprints for PHP 8.2+
* Comment out `files-upload` deprecated message as this is not going to be removed
* Added various public `Twig` class variables used by admin to address deprecated messages for PHP 8.2+
* Added `parse_url` to list of PHP functions supported in Twig Extension
* Added support for dynamic functions in `Parsedown` to stop deprecation messages in PHP 8.2+
# v1.7.40
## 03/22/2023
1. [](#new)
* Added a new `timestamp: true|false` option for individual assets
1. [](#improved)
* Removed outdated `xcache` setting [#3615](https://github.com/getgrav/grav/pull/3615)
* Updated `robots.txt` [#3625](https://github.com/getgrav/grav/pull/3625)
* Handle the situation when GRAV_ROOT or GRAV_WEBROOT are `/` [#3625](https://github.com/getgrav/grav/pull/3667)
1. [](#bugfix)
* Fixed `force_ssl` redirect in case of undefined hostname [#3702](https://github.com/getgrav/grav/pull/3702)
* Fixed an issue with duplicate identical page paths
* Fixed `BlueprintSchema:flattenData` to properly handle ignored fields
* Fixed LogViewer regex greediness [#3684](https://github.com/getgrav/grav/pull/3684)
* Fixed `whoami` command [#3695](https://github.com/getgrav/grav/pull/3695)
# v1.7.39.4
## 02/22/2023
1. [](#bugfix)
* Reverted a reorganization of `account.yaml` that caused username to be disabled [admin#2344](https://github.com/getgrav/grav-plugin-admin/issues/2344)
# v1.7.39.3
## 02/21/2023
1. [](#bugfix)
* Fix for overzealous modular page template rendering fix in 1.7.39 causing Feed plugin to break [#3689](https://github.com/getgrav/grav/issues/3689)
# v1.7.39.2
## 02/20/2023
1. [](#bugfix)
* Fix for invalid session breaking Flex Accounts (when switching from Regular to Flex)
# v1.7.39.1
## 02/20/2023
1. [](#bugfix)
* Fix for broken image CSS with the latest version of DebugBar
# v1.7.39
## 02/19/2023
1. [](#improved)
* Vendor library updates to latest versions
1. [](#bugfix)
* Various PHP 8.2 fixes
* Fixed an issue with modular pages rendering thew wrong template when dynamically changing the page
* Fixed an issue with `email` validation that was failing on UTF-8 characters. Following best practices and now only check for `@` and length.
* Fixed PHPUnit tests to remove deprecation warnings
# v1.7.38
## 01/02/2023
1. [](#new)
* New `onBeforeSessionStart()` event to be used to store data lost during session regeneration (e.g. login)
1. [](#improved)
* Vendor library updates to latest versions
* Updated `bin/composer.phar` to latest `2.4.4` version [#3627](https://github.com/getgrav/grav/issues/3627)
1. [](#bugfix)
* Don't fail hard if pages recurse with same path
* Github workflows security hardening [#3624](https://github.com/getgrav/grav/pull/3624)
# v1.7.37.1
## 10/05/2022
1. [](#bugfix)
* Fixed a bad return type [#3630](https://github.com/getgrav/grav/issues/3630)
# v1.7.37
## 10/05/2022
1. [](#new)
* Added new `onPageHeaders()` event to allow for header modification as needed
* Added a `system.pages.dirs` configuration option to allow for configurable paths, and multiple page paths
* Added new `Pages::getSimplePagesHash` which is useful for caching pages specific data
* Updated to latest vendor libraries
1. [](#bugfix)
* An attempt to workaround windows reading locked file issue [getgrav/grav-plugin-admin#2299](https://github.com/getgrav/grav-plugin-admin/issues/2299)
* Force user index file to be updated to fix email addresses [getgrav/grav-plugin-login#229](https://github.com/getgrav/grav-plugin-login/issues/229)
# v1.7.36
## 09/08/2022
1. [](#new)
* Added `authorize-*@:` support for Flex blueprints, e.g. `authorize-disabled@: not delete` disables the field if user does not have access to delete object
* Added support for `flex-ignore@` to hide all the nested fields in the blueprint
1. [](#bugfix)
* Fixed login with a capitalised email address when using old users [getgrav/grav-plugin-login#229](https://github.com/getgrav/grav-plugin-login/issues/229)
# v1.7.35
## 08/04/2022
1. [](#new)
* Added support for `multipart/form-data` content type in PUT and PATCH requests
* Added support for object relationships
* Added variables `$environment` (string), `$request` (PSR-7 ServerRequestInterface|null) and `$uri` (PSR-7 Uri|null) to be used in `setup.php`
1. [](#improved)
* Minor vendor updates
# v1.7.34
## 06/14/2022
1. [](#new)
* Added back Yiddish to Language Codes [#3336](https://github.com/getgrav/grav/pull/3336)
* Ignore upcoming `media.json` file in media
1. [](#bugfix)
* Regression: Fixed saving page with a new language causing cache corruption [getgrav/grav-plugin-admin#2282](https://github.com/getgrav/grav-plugin-admin/issues/2282)
* Fixed a potential fatal error when using watermark in images
* Fixed `bin/grav install` command with arbitrary destination folder name
* Fixed Twig `|filter()` allowing code execution
* Fixed login and user search by email not being case-insensitive when using Flex Users
# v1.7.33
## 04/25/2022
1. [](#improved)
* When saving yaml and markdown, create also a cached version of the file and recompile it in opcache
2. [](#bugfix)
* Fixed missing changes in **yaml** & **markdown** files if saved multiple times during the same second because of a caching issue
* Fixed XSS check not detecting onX events without quotes
* Fixed default collection ordering in pages admin
# v1.7.32
## 03/28/2022
1. [](#new)
* Added `|replace_last(search, replace)` filter
* Added `parseurl` Twig function to expose PHP's `parse_url` function
2. [](#improved)
* Added multi-language support for page routes in `Utils::url()`
* Set default maximum length for text fields
- `password`: 256
- `email`: 320
- `text`, `url`, `hidden`, `commalist`: 2048
- `text` (multiline), `textarea`: 65536
3. [](#bugfix)
* Fixed issue with `system.cache.gzip: true` resulted in "Fetch Failed" for PHP 8.0.17 and PHP 8.1.4 [PHP issue #8218](https://github.com/php/php-src/issues/8218)
* Fix for multi-lang issues with Security Report
* Fixed page search not working with selected language [#3316](https://github.com/getgrav/grav/issues/3316)
# v1.7.31 # v1.7.31
## 03/14/2022 ## 03/14/2022

View File

@@ -7,15 +7,32 @@ We are focusing our security updates on the following versions
| Version | Supported | | Version | Supported |
| ------- | ------------------ | | ------- | ------------------ |
| 1.7.x | :white_check_mark: | | 1.7.x | :white_check_mark: |
| 1.6.x | :warning: | | 1.6.x | :x: |
| < 1.6 | :x: | | < 1.6 | :x: |
## :pushpin: Note on Security Severity
> NOTE: Please use the following guidlines when selecting a **Severity**. Submitted advisories that are marked **High** or **Critical** that don't meet the guidelines below will be cliosed.
* **CRITICAL** - no account required, can modify content, or run malicious code or nefarious activity without any access.
* **HIGH** - publisher level account able to run malicious code or nefarious activity, or other high level security things.
* **MODERATE** - admin level account able to run malicious code or do nefarious things. other moderate security things.
* **LOW** - super admin level account able to run malicious code or do nefarious things. other minor security things.
## :warning: Versions ## :warning: Versions
Versions with :warning: will be supported for security issues, however you won't be able to update to them, you will need to manually update through the [`direct-install` command](https://learn.getgrav.org/17/admin-panel/tools). Versions with :warning: will be supported for security issues, however you won't be able to update to them, you will need to manually update through the [`direct-install` command](https://learn.getgrav.org/17/admin-panel/tools).
If you cannot update to the latest stable version available because, for example, your server does not meet the minimum PHP requirements, you can manually install a previous version by downloading the package from our Releases directory (https://github.com/getgrav/grav/releases). If you cannot update to the latest stable version available because, for example, your server does not meet the minimum PHP requirements, you can manually install a previous version by downloading the package from our Releases directory (https://github.com/getgrav/grav/releases).
## Reporting a Vulnerability ## :pencil: Reporting a Vulnerability
Please contact security@getgrav.org with a detailed explanation of the security issue found. If it appears to be a legitimate issues, please submit an **advisory via GitHub Security**: https://github.com/getgrav/grav/security/advisories
> NOTE: Please do not use 3rd party security issue reporting services, we like to keep everything in the GitHub ecosystem for easier manageability.
## :bug: Bug Bounties
We do greatly appreciate your efforts to improve Grav, but unfortunately because we are a small open source project, we **do not have the resources to offer bounties** for security issues found.
Please contact security@getgrav.org with a detailed explaination of the security issue found and we will work with you to get it resolved as fast as possible.

View File

@@ -1 +1 @@
/* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. */ /* @copyright Copyright (c) 2015 - 2023 Trilby Media, LLC. All rights reserved. */

Binary file not shown.

View File

@@ -2,7 +2,7 @@
<?php <?php
/** /**
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@@ -2,7 +2,7 @@
<?php <?php
/** /**
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@@ -2,7 +2,7 @@
<?php <?php
/** /**
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@@ -19,6 +19,7 @@
"ext-zip": "*", "ext-zip": "*",
"ext-dom": "*", "ext-dom": "*",
"ext-libxml": "*", "ext-libxml": "*",
"ext-gd": "*",
"symfony/polyfill-mbstring": "~1.23", "symfony/polyfill-mbstring": "~1.23",
"symfony/polyfill-iconv": "^1.23", "symfony/polyfill-iconv": "^1.23",
"symfony/polyfill-php74": "^1.23", "symfony/polyfill-php74": "^1.23",
@@ -64,13 +65,12 @@
}, },
"require-dev": { "require-dev": {
"codeception/codeception": "^4.1", "codeception/codeception": "^4.1",
"phpstan/phpstan": "^1.2", "phpstan/phpstan": "^1.8",
"phpstan/phpstan-deprecation-rules": "^1.0", "phpstan/phpstan-deprecation-rules": "^1.0",
"phpunit/php-code-coverage": "~9.2", "phpunit/php-code-coverage": "~9.2",
"getgrav/markdowndocs": "^2.0", "getgrav/markdowndocs": "^2.0",
"codeception/module-asserts": "^1.3", "codeception/module-asserts": "^1.3",
"codeception/module-phpbrowser": "^1.0", "codeception/module-phpbrowser": "^1.0"
"symfony/service-contracts": "*"
}, },
"replace": { "replace": {
"symfony/polyfill-php72": "*", "symfony/polyfill-php72": "*",

1512
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -3,7 +3,7 @@
/** /**
* @package Grav.Core * @package Grav.Core
* *
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@@ -1,2 +1,61 @@
/** Clockwork Debugger CSS **/ /** Clockwork Debugger CSS **/
.clockwork-badge{position:fixed;z-index:10;bottom:0;left:0;padding:2px 4px;background-color:#eee;border:1px solid #ccc;border-bottom:0;border-left:0;display:flex;align-items:center}.clockwork-badge:hover{width:auto}.clockwork-badge:hover:after{content:'Grav Clockwork debugger enabled. Install Clockwork Browser extension (Chrome or Firefox), open your Developer tools and then select the Clockwork tab.'}.clockwork-badge:after{margin-left:10px;font-family:Monaco,Consolas,"Lucida Console",monospace;font-size:12px;line-height:1.5;color:#666}.clockwork-badge i{display:block;float:left;height:22px;width:22px;min-width:22px;background-size:contain;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAA/1BMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAeHh4AAAD///8EBAT7+/sLCwv29vYVFRUvLy/t7e3m5ubCwsKxsbE/Pz+mpqZMTEwcHBzy8vLp6emfn5+AgIA2Njbi4uLf39+rq6tzc3NWVlYhISHa2trW1tbS0tLMzMy7u7uZmZmUlJSMjIxvb29kZGRHR0c7Ozt5eXkqKiq1tbWQkJBqampbW1tSUlLHx8eHh4ckJCRDQ0M3wD42AAAAI3RSTlMA/PibTbQ0x76TVAlw4LhZLOuEYCAN9Hjx0a2ppGZEGYw97djhXHwAAATZSURBVFjDlVcHW+MwDO1eFCjj2McNOzvdpXTTXVbL/P+/5SQ7QSSX5Di1X1onfi/Sk+Q4sTDbKqWK+YuznZ2zi3wxVdqK/Zf92M1nT9gnO8rmd398GX6Z3xaoOFoiAQcx3E5efgmeSuN8F6Xg1x3G06l/wjNpMR1B0uif4EhnIuFb+0diIoFXk3IVfokisR+h52GO4JKgyjmfaMhAFNlSaPR7DpwI+lzn/E4QKIqmKIJirxCMP4izBPPZPXhgXwMBYgULw0nfg/BF5scDbslb7QeJ08yqqTEmGYoB95d4H8ETL8+n9wBqrLu6ao3bBsMwAnxISf/9BHcqxNB8Y7cWl3Zz7TAUfPrvAT6AoNEFFXvsjutL01yOuMrtBxnFXsmT/1wQHmdWAFNnI3uI48Yj0FUcHbKf62GfUfr8eeQt7Uk3mQZpZNoVRPEui5vtEz5zFEpgWnyqVBZMc6oaGNriH2hGVZ0OxEvInPeMaZWJBA7vmPbCr5jjws5HBnAUxvDMH40aCIf4G5BjRQSs8E8HFFYf8bGxgDvD55bzGhwWkoBcuIyHR/AMdaCagxXDhtL6tSqoWpd4BMnlIR+Or+rYTK/a3EAGcc6e4AWHISnWv20iCCojsHoVlQdjrMexFF2C7UMg2A2WEGWbQhXN6l3eXC6XGp4b9qxbuEB2EBGBwtocrK90cVG5mbRXm6vmx/0phq1sIAGKDgLOBiN1MrO5a9aDl+D0W6x0Ar9BCTRuIIANa90Y7LrLVRXzwVtDInCqMRWcf2bUOEAsa4wJqFowQALL9EiAtVRk8QC4OW+1pOM9jIaVASwYagyNXDj+W0NcfuZNzjtXOiL0Zzg30Llj+ptfxQs4+vBPNiL5PawFCBkgXpUaVtqGl+A8dgZHL34BcBUQrwPptToW+o37Ku+UH9eYByJIx3YkAeFnMFuGO7S5gEp7YhXxa5OOAM39RXDPXb0qmpROsswZe+twXdU55oUIZAiEv3bD1UFwIYKkmGqytPCDCwKFQCKK0yL7qtSAPX54UAbtsLuBHkb9zyLmPQSNjsSgmQwKUOIfEY8F8t4B34DvndJY9BA8tNBJq1Nev9axmaStFcQLhgYoCTo0salkIaW8OUDdWjMTR2sHPhrAFZqx6cqcKE4pl2BJJ4K6hfwvqNgAnXfKX/HU6X3Zrhnu0k7tLNZtTBRv1hkwTDBY1NzFU6doDYjJbWdQkQhWwuU7/LvhTh3SDoco4ECL4i5dwURbc8NdDZz2IwKicE8d0KIqWetLE3+lL4hvUuGSeRfVWNLfj/gpOw4smBJBkKQHCzlHGwvAj4woB1gq5NGGLSXtORBPnUQPV5/MPVkDMxbpwG7w4x0xL6Ltxka0A/4NBvV09UVk4DoSn/jl2+JQS9q9KYawisAD4CfhsZ4TH3htylsdEHARIQBusqCKyUpymycgbbkkXEXjT3z7/oKQFTFVuZD2FMJHZIDsO5x2d4aAr2jR+GLwZhtAb028/0yJ9J8dE87jQyKObcjtTXT8dH+fDuKF4/eiPwzH44wTf/yUi6wrpRIOZ9lM1EtXAifFI+CJn9+iX/t2xMQwOMth/UZbASi8btAwR9FHWSpJr75g9Oqbin3VDg+SpwlP6k6TB4ex/7JvmcJx8jydy6XPk8eFTKhyfwCgX71MSvaBHgAAAABJRU5ErkJggg==)} .clockwork-badge {
position: fixed;
z-index: 1000; /* Increased z-index for better visibility */
bottom: 0; /* Added some spacing from the bottom */
left: 0; /* Added some spacing from the left */
padding: 5px;
background-color: #eee;
border: 1px solid #ccc;
border-bottom: 0;
border-left: 0;
display: flex;
align-items: center;
border-radius: 0 4px 0 0; /* Rounded top corners */
box-shadow: 0 2px 5px rgba(0,0,0,0.2);
font-size: 14px;
color: #333;
transition: background-color 0.3s ease;
}
.clockwork-badge:hover {
background-color: #ddd;
}
.clockwork-badge i {
display: block;
height: 24px;
width: 24px;
background-size: contain;
background-image: url(data:image/png;base64,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);
}
.clockwork-badge .tooltip {
display: none; /* Hidden by default */
position: absolute;
bottom: 35px; /* Position above the badge */
left: 0;
width: 450px;
padding: 20px;
background-color: #fff;
border: 1px solid #ccc;
border-radius: 4px;
font-size: 16px;
color: #666;
line-height: 1.5;
box-shadow: 0 2px 8px rgba(0,0,0,0.2);
z-index: 1001; /* Ensure it appears above other elements */
}
.clockwork-badge:hover .tooltip {
display: block; /* Show tooltip on hover */
}
.clockwork-badge .tooltip a {
color: #007BFF;
text-decoration: none;
}
.clockwork-badge .tooltip a:hover {
text-decoration: underline;
}

View File

@@ -1,3 +1,37 @@
/** Clockwork Debugger JS **/ /** Clockwork Debugger JS **/
document.addEventListener("DOMContentLoaded",function () { document.addEventListener("DOMContentLoaded", function () {
var e=document.createElement("div");e.appendChild(document.createElement("i")),e.className="clockwork-badge",document.body.appendChild(e)}); // Directly select the script tag by its id
var currentScript = document.getElementById('clockwork-script');
if (!currentScript) {
console.error("Clockwork Debugger: Script tag with id 'clockwork-script' not found.");
return;
}
var route = currentScript.getAttribute('data-route') || '/clockwork'; // Default route if not specified
// Debugging: Log the route to verify
console.log("Clockwork Debugger Route:", route);
// Create the badge container
var badge = document.createElement("div");
badge.className = "clockwork-badge";
badge.setAttribute('aria-label', 'Clockwork Debugger Enabled');
badge.setAttribute('role', 'button');
// Create the icon element
var icon = document.createElement("i");
badge.appendChild(icon);
// Create the tooltip element
var tooltip = document.createElement("div");
tooltip.className = "tooltip";
tooltip.innerHTML = `
<b>Grav Clockwork Debugger Enabled.</b><br>
Install the <b>Clockwork Browser extension</b> (Chrome or Firefox) or use the <b>"Clockwork Web"</b> Grav plugin to <a href="${route}" target="_blank">View Debug Info 🔗</a>.
`;
badge.appendChild(tooltip);
// Append the badge to the body
document.body.appendChild(badge);
});

View File

@@ -14,11 +14,8 @@ div.phpdebugbar {
padding: 5px 8px; padding: 5px 8px;
} }
.phpdebugbar div.phpdebugbar-header, .phpdebugbar a.phpdebugbar-restore-btn {
background-image: url(data:image/png;base64,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);
}
.phpdebugbar a.phpdebugbar-restore-btn { .phpdebugbar a.phpdebugbar-restore-btn {
background-image: url(data:image/png;base64,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);
width: 13px; width: 13px;
} }

File diff suppressed because one or more lines are too long

View File

@@ -103,6 +103,7 @@ form:
"D, d M Y G:i:s": Date3 "D, d M Y G:i:s": Date3
"d-m-y G:i": Date4 "d-m-y G:i": Date4
"jS M Y": Date5 "jS M Y": Date5
"Y-m-d G:i": Date6
pages.dateformat.long: pages.dateformat.long:
type: dateformat type: dateformat
@@ -116,6 +117,7 @@ form:
"D, d M Y G:i:s": Date3 "D, d M Y G:i:s": Date3
"d-m-y G:i": Date4 "d-m-y G:i": Date4
"jS M Y": Date5 "jS M Y": Date5
"Y-m-d G:i:s": Date6
pages.order.by: pages.order.by:
type: select type: select
@@ -448,6 +450,17 @@ form:
validate: validate:
type: bool type: bool
languages.debug:
type: toggle
label: PLUGIN_ADMIN.LANGUAGE_DEBUG
help: PLUGIN_ADMIN.LANGUAGE_DEBUG_HELP
highlight: 0
options:
1: PLUGIN_ADMIN.YES
0: PLUGIN_ADMIN.NO
validate:
type: bool
http_headers: http_headers:
type: tab type: tab
title: PLUGIN_ADMIN.HTTP_HEADERS title: PLUGIN_ADMIN.HTTP_HEADERS
@@ -608,7 +621,6 @@ form:
file: File file: File
apc: APC apc: APC
apcu: APCu apcu: APCu
xcache: Xcache
memcache: Memcache memcache: Memcache
memcached: Memcached memcached: Memcached
wincache: WinCache wincache: WinCache
@@ -1156,6 +1168,13 @@ form:
local6: local6 local6: local6
local7: local7 local7: local7
log.syslog.tag:
type: text
size: small
label: PLUGIN_ADMIN.SYSLOG_TAG
help: PLUGIN_ADMIN.SYSLOG_TAG_HELP
placeholder: "grav"
debugger: debugger:
type: tab type: tab
title: PLUGIN_ADMIN.DEBUGGER title: PLUGIN_ADMIN.DEBUGGER
@@ -1281,6 +1300,28 @@ form:
auto: Auto auto: Auto
lazy: Lazy lazy: Lazy
eager: Eager eager: Eager
images.defaults.decoding:
type: select
size: small
label: PLUGIN_ADMIN.IMAGES_DECODING
help: PLUGIN_ADMIN.IMAGES_DECODING_HELP
highlight: auto
options:
auto: Auto
sync: Sync
async: Async
images.defaults.fetchpriority:
type: select
size: small
label: PLUGIN_ADMIN.IMAGES_FETCHPRIORITY
help: PLUGIN_ADMIN.IMAGES_FETCHPRIORITY_HELP
highlight: auto
options:
auto: Auto
high: High
low: Low
images.seofriendly: images.seofriendly:
type: toggle type: toggle

View File

@@ -125,6 +125,17 @@ config:
- username - username
- fullname - fullname
relationships:
media:
type: media
cardinality: to-many
avatar:
type: media
cardinality: to-one
# roles:
# type: user-groups
# cardinality: to-many
blueprints: blueprints:
configure: configure:
fields: fields:

View File

@@ -216,3 +216,8 @@ types:
type: file type: file
thumb: media/thumb-json.png thumb: media/thumb-json.png
mime: application/json mime: application/json
vcf:
type: file
thumb: media/thumb-vcf.png
mime: text/x-vcard

View File

@@ -32,8 +32,16 @@ xss_dangerous_tags:
- base - base
uploads_dangerous_extensions: uploads_dangerous_extensions:
- php - php
- php2
- php3
- php4
- php5
- phar
- phtml
- html - html
- htm - htm
- shtml
- shtm
- js - js
- exe - exe
sanitize_svg: true sanitize_svg: true

View File

@@ -25,7 +25,7 @@ routes:
# '/new/(.*)': '/blog/$1' # Regex any /new/my-page URL to /blog/my-page Route # '/new/(.*)': '/blog/$1' # Regex any /new/my-page URL to /blog/my-page Route
blog: blog:
route: '/blog' # Custom value added (accessible via system.blog.route) route: '/blog' # Custom value added (accessible via site.blog.route)
#menu: # Menu Example #menu: # Menu Example
# - text: Source # - text: Source

View File

@@ -28,6 +28,7 @@ languages:
override_locale: false # Override the default or system locale with language specific one override_locale: false # Override the default or system locale with language specific one
content_fallback: {} # Custom language fallbacks. eg: {fr: ['fr', 'en']} content_fallback: {} # Custom language fallbacks. eg: {fr: ['fr', 'en']}
pages_fallback_only: false # DEPRECATED: Use `content_fallback` instead pages_fallback_only: false # DEPRECATED: Use `content_fallback` instead
debug: false # Debug language detection
home: home:
alias: '/home' # Default path for home, ie / alias: '/home' # Default path for home, ie /
@@ -35,6 +36,7 @@ home:
pages: pages:
type: regular # EXPERIMENTAL: Page type: regular or flex type: regular # EXPERIMENTAL: Page type: regular or flex
dirs: ['page://'] # Advanced functionality, allows for multiple page paths
theme: quark # Default theme (defaults to "quark" theme) theme: quark # Default theme (defaults to "quark" theme)
order: order:
by: default # Order pages by "default", "alpha" or "date" by: default # Order pages by "default", "alpha" or "date"
@@ -144,6 +146,7 @@ log:
handler: file # Log handler. Currently supported: file | syslog handler: file # Log handler. Currently supported: file | syslog
syslog: syslog:
facility: local6 # Syslog facilities output facility: local6 # Syslog facilities output
tag: grav # Syslog tag. Default: "grav".
debugger: debugger:
enabled: false # Enable Grav debugger and following settings enabled: false # Enable Grav debugger and following settings
@@ -165,6 +168,8 @@ images:
retina_scale: 1 # scale to adjust auto-sizes for better handling of HiDPI resolutions retina_scale: 1 # scale to adjust auto-sizes for better handling of HiDPI resolutions
defaults: defaults:
loading: auto # Let browser pick [auto|lazy|eager] loading: auto # Let browser pick [auto|lazy|eager]
decoding: auto # Let browser pick [auto|sync|async]
fetchpriority: auto # Let browser pick [auto|high|low]
watermark: watermark:
image: 'system://images/watermark.png' # Path to a watermark image image: 'system://images/watermark.png' # Path to a watermark image
position_y: 'center' # top|center|bottom position_y: 'center' # top|center|bottom

View File

@@ -3,13 +3,13 @@
/** /**
* @package Grav\Core * @package Grav\Core
* *
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */
// Some standard defines // Some standard defines
define('GRAV', true); define('GRAV', true);
define('GRAV_VERSION', '1.7.31'); define('GRAV_VERSION', '1.7.48');
define('GRAV_SCHEMA', '1.7.0_2020-11-20_1'); define('GRAV_SCHEMA', '1.7.0_2020-11-20_1');
define('GRAV_TESTING', false); define('GRAV_TESTING', false);
@@ -26,12 +26,12 @@ if (!defined('DS')) {
// Absolute path to Grav root. This is where Grav is installed into. // Absolute path to Grav root. This is where Grav is installed into.
if (!defined('GRAV_ROOT')) { if (!defined('GRAV_ROOT')) {
$path = rtrim(str_replace(DIRECTORY_SEPARATOR, DS, getenv('GRAV_ROOT') ?: getcwd()), DS); $path = rtrim(str_replace(DIRECTORY_SEPARATOR, DS, getenv('GRAV_ROOT') ?: getcwd()), DS);
define('GRAV_ROOT', $path); define('GRAV_ROOT', $path ?: DS);
} }
// Absolute path to Grav webroot. This is the path where your site is located in. // Absolute path to Grav webroot. This is the path where your site is located in.
if (!defined('GRAV_WEBROOT')) { if (!defined('GRAV_WEBROOT')) {
$path = rtrim(getenv('GRAV_WEBROOT') ?: GRAV_ROOT, DS); $path = rtrim(getenv('GRAV_WEBROOT') ?: GRAV_ROOT, DS);
define('GRAV_WEBROOT', $path); define('GRAV_WEBROOT', $path ?: DS);
} }
// Relative path to user folder. This path needs to be located under GRAV_WEBROOT. // Relative path to user folder. This path needs to be located under GRAV_WEBROOT.
if (!defined('GRAV_USER_PATH')) { if (!defined('GRAV_USER_PATH')) {
@@ -99,3 +99,6 @@ define('RAW_CONTENT', 1);
define('TWIG_CONTENT', 2); define('TWIG_CONTENT', 2);
define('TWIG_CONTENT_LIST', 3); define('TWIG_CONTENT_LIST', 3);
define('TWIG_TEMPLATES', 4); define('TWIG_TEMPLATES', 4);
// Filters
define('GRAV_SANITIZE_STRING', 5001);

View File

@@ -2,7 +2,7 @@
/** /**
* @package Grav\Core * @package Grav\Core
* *
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@@ -5,6 +5,7 @@ GRAV:
BAD_DATE: Невалидна дата BAD_DATE: Невалидна дата
AGO: преди AGO: преди
FROM_NOW: от сега FROM_NOW: от сега
JUST_NOW: току що
SECOND: секунда SECOND: секунда
MINUTE: минута MINUTE: минута
HOUR: час HOUR: час
@@ -60,3 +61,12 @@ GRAV:
- 'петък' - 'петък'
- 'събота' - 'събота'
- 'неделя' - 'неделя'
YES: "Да"
NO: "Не"
CRON:
EVERY: всеки
EVERY_HOUR: Всеки час
EVERY_MINUTE: Всяка минута
EVERY_DAY_OF_WEEK: Всеки ден от седмицата
EVERY_DAY_OF_MONTH: Всеки ден от месеца
EVERY_MONTH: Всеки месец

View File

@@ -2,14 +2,14 @@
GRAV: GRAV:
FRONTMATTER_ERROR_PAGE: "---\ntitle: %1$s\n---\n\n# S'ha produït un error: Frontmatter invàlid\n\nRuta: `%2$s`\n\n**%3$s**\n\n```\n%4$s\n```" FRONTMATTER_ERROR_PAGE: "---\ntitle: %1$s\n---\n\n# S'ha produït un error: Frontmatter invàlid\n\nRuta: `%2$s`\n\n**%3$s**\n\n```\n%4$s\n```"
INFLECTOR_UNCOUNTABLE: INFLECTOR_UNCOUNTABLE:
- 'equipment' - ''
- 'informació' - 'informació'
- 'rice' - ''
- 'money' - ''
- 'species' - ''
- 'series' - ''
- 'fish' - ''
- 'sheep' - ''
NICETIME: NICETIME:
NO_DATE_PROVIDED: No s'ha proporcionat data NO_DATE_PROVIDED: No s'ha proporcionat data
BAD_DATE: Data invàlida BAD_DATE: Data invàlida

View File

@@ -1,6 +1,6 @@
--- ---
GRAV: GRAV:
FRONTMATTER_ERROR_PAGE: "---\ntitle: %1$s\n---\n\n# Chyba: Chybný frontmatter\n\nPath: `%2$s`\n\n**%3$s**\n\n```\n%4$s\n```" FRONTMATTER_ERROR_PAGE: "---\ntitle: %1$s\n---\n\n# Chyba: Chybná hlavička\n\nCesta: `%2$s`\n\n**%3$s**\n\n```\n%4$s\n```"
INFLECTOR_PLURALS: INFLECTOR_PLURALS:
'/(quiz)$/i': '\1zes' '/(quiz)$/i': '\1zes'
'/^(ox)$/i': '\1en' '/^(ox)$/i': '\1en'

40
system/languages/eo.yaml Normal file
View File

@@ -0,0 +1,40 @@
---
GRAV:
FRONTMATTER_ERROR_PAGE: "---\ntitle: %1$s\n---\n\n# Eraro: Nevalida Frontmatter\n\nVojo: `%2$s`\n\n**%3$s**\n\n```\n%4$s\n```"
INFLECTOR_PLURALS:
'/sis$/i': 'j'
NICETIME:
FROM_NOW: ekde nun
JUST_NOW: Ĝuste nun
SECOND: sekundo
MINUTE: minuto
HOUR: horo
DAY: tago
WEEK: semajno
MONTH: monato
YEAR: jaro
DECADE: jardeko
SEC: sek.
MIN: min.
HR: horo
SECOND_PLURAL: sekundoj
MINUTE_PLURAL: minutoj
HOUR_PLURAL: horoj
DAY_PLURAL: tagoj
WEEK_PLURAL: semajnoj
MONTH_PLURAL: monatoj
YEAR_PLURAL: jaroj
DECADE_PLURAL: jardekoj
MONTHS_OF_THE_YEAR:
- 'januaro'
- 'februaro'
- 'marto'
- 'aprilo'
- ''
- ''
- ''
- ''
- ''
- ''
- ''
- ''

View File

@@ -21,9 +21,9 @@ GRAV:
'sex': 'sexos' 'sex': 'sexos'
'move': 'movido' 'move': 'movido'
INFLECTOR_ORDINALS: INFLECTOR_ORDINALS:
'first': 'ro' 'first': ''
'second': 'do' 'second': ''
'third': 'ro' 'third': ''
NICETIME: NICETIME:
NO_DATE_PROVIDED: No se proporcionó fecha NO_DATE_PROVIDED: No se proporcionó fecha
BAD_DATE: Fecha errónea BAD_DATE: Fecha errónea
@@ -101,7 +101,7 @@ GRAV:
TEXT_DOW: ' en <b />' TEXT_DOW: ' en <b />'
TEXT_MONTH: ' de<b />' TEXT_MONTH: ' de<b />'
TEXT_DOM: ' en<b />' TEXT_DOM: ' en<b />'
ERROR1: '¡La etiqueta %s no está soportada!' ERROR1: No se admite la etiqueta %s.
ERROR2: El número de elementos es erróneo ERROR2: El número de elementos es erróneo
ERROR3: El jquery_element debería establecerse en la configuración del jqCron ERROR3: El jquery_element debería establecerse en la configuración del jqCron
ERROR4: Expresión no reconocida ERROR4: Expresión no reconocida

View File

@@ -13,12 +13,12 @@ GRAV:
'/(tive)s$/i': '\1' '/(tive)s$/i': '\1'
'/(hive)s$/i': '\1' '/(hive)s$/i': '\1'
INFLECTOR_UNCOUNTABLE: INFLECTOR_UNCOUNTABLE:
- 'equipment' - ''
- 'informatsioon' - 'informatsioon'
- 'riis' - 'riis'
- 'raha' - 'raha'
- 'species' - ''
- 'series' - ''
- 'kala' - 'kala'
- 'lammas' - 'lammas'
INFLECTOR_IRREGULAR: INFLECTOR_IRREGULAR:
@@ -70,6 +70,7 @@ GRAV:
VALIDATION_FAIL: '<b>Kinnitamine nurjus:</b>' VALIDATION_FAIL: '<b>Kinnitamine nurjus:</b>'
INVALID_INPUT: 'Vigane sisend:' INVALID_INPUT: 'Vigane sisend:'
MISSING_REQUIRED_FIELD: 'Nõutud väli puudub:' MISSING_REQUIRED_FIELD: 'Nõutud väli puudub:'
XSS_ISSUES: "Tuvastasime '%s' väljal võimaliku XSS-riski"
MONTHS_OF_THE_YEAR: MONTHS_OF_THE_YEAR:
- 'jaanuar' - 'jaanuar'
- 'veebruar' - 'veebruar'
@@ -91,11 +92,14 @@ GRAV:
- 'reede' - 'reede'
- 'laupäev' - 'laupäev'
- 'pühapäev' - 'pühapäev'
YES: "Jah"
NO: "Ei"
CRON: CRON:
EVERY: iga EVERY: iga
EVERY_HOUR: iga tund EVERY_HOUR: iga tund
EVERY_MINUTE: iga minut EVERY_MINUTE: iga minut
EVERY_DAY_OF_WEEK: iga nädala päev EVERY_DAY_OF_WEEK: nädala igal päeval
EVERY_DAY_OF_MONTH: kuu igal päeval
EVERY_MONTH: iga kuu EVERY_MONTH: iga kuu
TEXT_PERIOD: Iga <b /> TEXT_PERIOD: Iga <b />
ERROR1: Silt %s pole toetatud! ERROR1: Silt %s pole toetatud!

View File

@@ -45,12 +45,12 @@ GRAV:
'/([ti])a$/i': '\1um' '/([ti])a$/i': '\1um'
'/(n)ews$/i': '\1ews' '/(n)ews$/i': '\1ews'
INFLECTOR_UNCOUNTABLE: INFLECTOR_UNCOUNTABLE:
- 'equipment' - ''
- 'information' - ''
- 'riisi' - 'riisi'
- 'raha' - 'raha'
- 'lajit' - 'lajit'
- 'series' - ''
- 'kala' - 'kala'
- 'lammas' - 'lammas'
INFLECTOR_IRREGULAR: INFLECTOR_IRREGULAR:

View File

@@ -22,8 +22,27 @@ GRAV:
'/$/': 's' '/$/': 's'
INFLECTOR_SINGULAR: INFLECTOR_SINGULAR:
'/(quiz)zes$/i': '\1' '/(quiz)zes$/i': '\1'
'/(matr)ices$/i': '\1ix'
'/(vert|ind)ices$/i': '\1ex'
'/^(ox)en/i': '\1'
'/(alias|status)es$/i': '\1' '/(alias|status)es$/i': '\1'
'/([octop|vir])i$/i': '\1us' '/([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': '\1ouvelles' '/(n)ews$/i': '\1ouvelles'
INFLECTOR_UNCOUNTABLE: INFLECTOR_UNCOUNTABLE:
- 'équipement' - 'équipement'

View File

@@ -1,11 +1,27 @@
--- ---
GRAV: GRAV:
FRONTMATTER_ERROR_PAGE: "---\nכותרת: %1$s\n---\n# שגיאה: Fronmatter לא חוקי\nנתיב: `%2$s`\n**%3$s**\n```\n%4$s\n```" FRONTMATTER_ERROR_PAGE: "---\nכותרת: %1$s\n---\n# שגיאה: Fronmatter לא חוקי\nנתיב: `%2$s`\n**%3$s**\n```\n%4$s\n```"
INFLECTOR_UNCOUNTABLE:
- 'ציוד'
- 'מידע'
- 'אורז'
- 'כסף'
- 'מינים'
- 'סדרה'
- 'דג'
- 'כבשה'
INFLECTOR_IRREGULAR:
'person': 'אנשים'
'man': 'גברים'
'child': 'ילדים'
'sex': 'מינים'
'move': 'מהלכים'
NICETIME: NICETIME:
NO_DATE_PROVIDED: לא סופק תאריך NO_DATE_PROVIDED: לא סופק תאריך
BAD_DATE: תאריך פגום BAD_DATE: תאריך פגום
AGO: לפני AGO: לפני
FROM_NOW: כרגע FROM_NOW: כרגע
JUST_NOW: כרגע
SECOND: שנייה SECOND: שנייה
MINUTE: דקה MINUTE: דקה
HOUR: שעה HOUR: שעה
@@ -40,6 +56,7 @@ GRAV:
VALIDATION_FAIL: '<b>האימות נכשל:</b>' VALIDATION_FAIL: '<b>האימות נכשל:</b>'
INVALID_INPUT: 'קלט לא חוקי' INVALID_INPUT: 'קלט לא חוקי'
MISSING_REQUIRED_FIELD: 'שדות חובה חסרים:' MISSING_REQUIRED_FIELD: 'שדות חובה חסרים:'
XSS_ISSUES: "בעיות XSS פוטנציאליות זוהו בשדה '%s'"
MONTHS_OF_THE_YEAR: MONTHS_OF_THE_YEAR:
- 'ינואר' - 'ינואר'
- 'פברואר' - 'פברואר'
@@ -61,3 +78,22 @@ GRAV:
- 'שישי' - 'שישי'
- 'שבת' - 'שבת'
- 'ראשון' - 'ראשון'
YES: "כן"
NO: "לא"
CRON:
EVERY: בכל
EVERY_HOUR: בכל שעה
EVERY_MINUTE: כל דקה
EVERY_DAY_OF_WEEK: כל יום בשבוע
EVERY_DAY_OF_MONTH: בכל יום בחודש
EVERY_MONTH: כל חודש
TEXT_PERIOD: כל <b />
TEXT_MINS: 'ב <b /> דקות אחרי השעה'
TEXT_TIME: 'ב <b />:<b />'
TEXT_DOW: 'ב <b />'
TEXT_MONTH: 'של <b />'
TEXT_DOM: 'ב <b />'
ERROR1: התגית %s אינו נתמכת
ERROR2: מספר לא חוקי של משתנים.
ERROR3: יש להגדיר את ה-jquery_element להגדרות jqCron
ERROR4: ביטוי לא מזוהה

View File

@@ -1,8 +1,9 @@
--- ---
GRAV: GRAV:
FRONTMATTER_ERROR_PAGE: "---\nnaslov: %1$s\n---\n\n# Pogreška: nevažeći frontmatter\n\nPutanja datoteke: `%2$s`\n\n**%3$s**\n\n```\n%4$s\n```"
INFLECTOR_UNCOUNTABLE: INFLECTOR_UNCOUNTABLE:
- 'oprema' - 'oprema'
- 'informacije' - 'informacija'
- 'riža' - 'riža'
- 'novac' - 'novac'
- 'vrsta' - 'vrsta'
@@ -15,11 +16,17 @@ GRAV:
'child': 'djeca' 'child': 'djeca'
'sex': 'spolovi' 'sex': 'spolovi'
'move': 'Pomakni' 'move': 'Pomakni'
INFLECTOR_ORDINALS:
'default': '.'
'first': '.'
'second': '.'
'third': '.'
NICETIME: NICETIME:
NO_DATE_PROVIDED: Datum nije upisan NO_DATE_PROVIDED: Datum nije upisan
BAD_DATE: Pogrešan datum BAD_DATE: Pogrešan datum
AGO: prije AGO: prije
FROM_NOW: od sada FROM_NOW: od sada
JUST_NOW: upravo sad
SECOND: sekunda SECOND: sekunda
MINUTE: minuta MINUTE: minuta
HOUR: sat HOUR: sat
@@ -29,6 +36,7 @@ GRAV:
YEAR: godina YEAR: godina
DECADE: desetljeće DECADE: desetljeće
SEC: sek SEC: sek
MIN: min
HR: sat HR: sat
WK: t WK: t
MO: m MO: m
@@ -53,6 +61,7 @@ GRAV:
VALIDATION_FAIL: '<b>Validacija nije uspjela:</b>' VALIDATION_FAIL: '<b>Validacija nije uspjela:</b>'
INVALID_INPUT: 'Pogrešan unos u' INVALID_INPUT: 'Pogrešan unos u'
MISSING_REQUIRED_FIELD: 'Nedostaje obavezno polje:' MISSING_REQUIRED_FIELD: 'Nedostaje obavezno polje:'
XSS_ISSUES: "Potencijalni XSS problemi otkriveni u polju '%s'"
MONTHS_OF_THE_YEAR: MONTHS_OF_THE_YEAR:
- 'Siječanj' - 'Siječanj'
- 'Veljača' - 'Veljača'
@@ -74,3 +83,22 @@ GRAV:
- 'Petak' - 'Petak'
- 'Subota' - 'Subota'
- 'Nedjelja' - 'Nedjelja'
YES: "Da"
NO: "Ne"
CRON:
EVERY: svaki
EVERY_HOUR: svaki sat
EVERY_MINUTE: svake minute
EVERY_DAY_OF_WEEK: svaki dan u tjednu
EVERY_DAY_OF_MONTH: svaki dan u mjesecu
EVERY_MONTH: svaki mjesec
TEXT_PERIOD: Svakih <b />
TEXT_MINS: ' u <b /> minut(e) nakon sata'
TEXT_TIME: ' u <b />:<b />'
TEXT_DOW: ' na <b />'
TEXT_MONTH: ' <b />'
TEXT_DOM: ' na <b />'
ERROR1: Oznaka %s nije podržana!
ERROR2: Pogrešan broj elemenata.
ERROR3: jquery_element treba postaviti u postavke jqCron
ERROR4: Izraz nije prepoznat

View File

@@ -2,14 +2,14 @@
GRAV: GRAV:
FRONTMATTER_ERROR_PAGE: "---\ntitill: %1$s\n---\n\n# Villa: Ógilt efni á forsíðu\n\nSlóð: `%2$s`\n\n**%3$s**\n\n```\n%4$s\n```" FRONTMATTER_ERROR_PAGE: "---\ntitill: %1$s\n---\n\n# Villa: Ógilt efni á forsíðu\n\nSlóð: `%2$s`\n\n**%3$s**\n\n```\n%4$s\n```"
INFLECTOR_UNCOUNTABLE: INFLECTOR_UNCOUNTABLE:
- 'equipment' - ''
- 'upplýsingar' - 'upplýsingar'
- 'rice' - ''
- 'money' - ''
- 'species' - ''
- 'series' - ''
- 'fish' - ''
- 'sheep' - ''
NICETIME: NICETIME:
NO_DATE_PROVIDED: Engin dagsetning gefin NO_DATE_PROVIDED: Engin dagsetning gefin
BAD_DATE: Röng dagsetning BAD_DATE: Röng dagsetning

View File

@@ -1,12 +1,12 @@
--- ---
GRAV: GRAV:
INFLECTOR_UNCOUNTABLE: INFLECTOR_UNCOUNTABLE:
- 'equipment' - ''
- '情報' - '情報'
- 'rice' - ''
- 'お金' - 'お金'
- 'species' - ''
- 'series' - ''
- '魚' - '魚'
- 'ヒツジ' - 'ヒツジ'
INFLECTOR_IRREGULAR: INFLECTOR_IRREGULAR:

View File

@@ -1,11 +1,23 @@
--- ---
GRAV: GRAV:
FRONTMATTER_ERROR_PAGE: "---\ntitle: %1$s\n---\n\n# 오류: 무효의 Frontmatter\n\n경로: `%2$s`\n\n**%3$s**\n\n```\n%4$s\n```" FRONTMATTER_ERROR_PAGE: "---\ntitle: %1$s\n---\n\n# 오류: 무효의 Frontmatter\n\n경로: `%2$s`\n\n**%3$s**\n\n```\n%4$s\n```"
INFLECTOR_UNCOUNTABLE:
- '장비'
- '정보'
- ''
- ''
- ''
- '시리즈'
- '물고기'
- ''
INFLECTOR_IRREGULAR:
'person': '사람들'
NICETIME: NICETIME:
NO_DATE_PROVIDED: 제공된 날짜가 없습니다 NO_DATE_PROVIDED: 제공된 날짜가 없습니다
BAD_DATE: 잘못된 날짜 BAD_DATE: 잘못된 날짜
AGO: AGO:
FROM_NOW: FROM_NOW:
JUST_NOW: 방금
SECOND: SECOND:
MINUTE: MINUTE:
HOUR: 시간 HOUR: 시간
@@ -40,6 +52,7 @@ GRAV:
VALIDATION_FAIL: '<b>유효성 검사 실패:</b>' VALIDATION_FAIL: '<b>유효성 검사 실패:</b>'
INVALID_INPUT: '잘못된 입력' INVALID_INPUT: '잘못된 입력'
MISSING_REQUIRED_FIELD: '누락 된 필수 필드:' MISSING_REQUIRED_FIELD: '누락 된 필수 필드:'
XSS_ISSUES: "'%s' 필드에서 잠재적인 XSS 문제가 감지되었습니다."
MONTHS_OF_THE_YEAR: MONTHS_OF_THE_YEAR:
- '일월' - '일월'
- '이월' - '이월'
@@ -61,3 +74,17 @@ GRAV:
- '금요일' - '금요일'
- '토요일' - '토요일'
- '일요일' - '일요일'
YES: "네"
NO: "아니요"
CRON:
EVERY: 모두
EVERY_HOUR: 매 시간
EVERY_MINUTE: 매 분
EVERY_DAY_OF_WEEK: 일주일간 매일
EVERY_DAY_OF_MONTH: 일개월간 매일
EVERY_MONTH: 매달
TEXT_PERIOD: 모든 <b />
ERROR1: '%s 태그는 지원되지 않습니다. '
ERROR2: 잘못된 요소 수
ERROR3: jquery_element는 jqCron 설정에서 설정할 수 있습니다.
ERROR4: 인식할 수 없는 표현

View File

@@ -2,8 +2,8 @@
GRAV: GRAV:
FRONTMATTER_ERROR_PAGE: "---\ntitle: %1$s\n---\n\n# Klaida: klaidinga įžanginė konfigūracija\n\nPath: `%2$s`\n\n**%3$s**\n\n```\n %4$s\n```" FRONTMATTER_ERROR_PAGE: "---\ntitle: %1$s\n---\n\n# Klaida: klaidinga įžanginė konfigūracija\n\nPath: `%2$s`\n\n**%3$s**\n\n```\n %4$s\n```"
INFLECTOR_UNCOUNTABLE: INFLECTOR_UNCOUNTABLE:
- 'equipment' - ''
- 'information' - ''
- 'ryžiai' - 'ryžiai'
- 'pinigai' - 'pinigai'
- 'prieskoniai' - 'prieskoniai'

84
system/languages/lv.yaml Normal file
View File

@@ -0,0 +1,84 @@
---
GRAV:
FRONTMATTER_ERROR_PAGE: "---\nNosaukums: %1$s\n---\n\n# Kļūda: Nederīgs Frontmatter\n\nCeļš: `%2$s`\n\n**%3$s**\n\n```\n%4$s\n```"
INFLECTOR_ORDINALS:
'default': '.'
'first': '.'
'second': '.'
'third': '.'
NICETIME:
NO_DATE_PROVIDED: Nav norādīts datums
BAD_DATE: Nederīgs datums
AGO: iepriekš
FROM_NOW: no šī brīža
JUST_NOW: tikko
SECOND: sekundes
MINUTE: minūte
HOUR: stunda
DAY: diena
WEEK: nedēļa
MONTH: mēnesis
YEAR: gads
DECADE: dekāde
SEC: s
MIN: m
HR: st
WK: ned
MO: mēn.
YR: g.
DEC: dec
SECOND_PLURAL: sekundes
MINUTE_PLURAL: minūtes
HOUR_PLURAL: stundas
DAY_PLURAL: dienas
WEEK_PLURAL: nedēļas
MONTH_PLURAL: mēneši
YEAR_PLURAL: gadi
DECADE_PLURAL: desmitgades
SEC_PLURAL: s
MIN_PLURAL: m
HR_PLURAL: st.
WK_PLURAL: ned.
MO_PLURAL: mēn.
YR_PLURAL: g.
DEC_PLURAL: d
FORM:
VALIDATION_FAIL: '<b>Validācija neizdevās:</b>'
INVALID_INPUT: 'Nederīga ievade'
MISSING_REQUIRED_FIELD: 'Laukā trūkst datu'
XSS_ISSUES: "Atrastas iespējamas XSS problēmas laukā '%s'"
MONTHS_OF_THE_YEAR:
- 'Janvāris'
- 'Februāris'
- 'Marts'
- 'Aprīlis'
- 'Maijs'
- 'Jūnijs'
- 'Jūlijs'
- 'Augusts'
- 'Septembris'
- 'Oktobris'
- 'Novembris'
- 'Decembris'
DAYS_OF_THE_WEEK:
- 'Pirmdiena'
- 'Otrdiena'
- 'Trešdiena'
- 'Ceturtdiena'
- 'Piektdiena'
- 'Sestdiena'
- 'Svētdiena'
YES: "Jā"
NO: "Nē"
CRON:
EVERY: katru
EVERY_HOUR: katru stundu
EVERY_MINUTE: katru minūti
EVERY_DAY_OF_WEEK: katru nedēļas dienu
EVERY_DAY_OF_MONTH: katru mēneša dienu
EVERY_MONTH: katru mēnesi
TEXT_PERIOD: Katru <b />
ERROR1: Marķieris %s nav atbalstīts!
ERROR2: Nederīgs elementu skaits
ERROR3: jquery_element nevajadzētu definēt jqCron iestatījumos
ERROR4: Neatpazīta izteiksme

147
system/languages/my.yaml Normal file
View File

@@ -0,0 +1,147 @@
---
GRAV:
FRONTMATTER_ERROR_PAGE: "---\nခေါင်းစဥ်: %1$s\n---\n\n# အမှား - Frontmatter မမှန်ကန်ပါ\n\nလမ်းကြောင်း `%2$s`\n\n**%3$s**\n\n```\n%4$s\n```"
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:
- 'ကိရိယာ'
- 'အချက်အလက်'
- 'ဆန်'
- 'ငွေ'
- 'မျိုးစိတ်'
- 'အတွဲများ'
- 'ငါး'
- 'သိုးများ'
INFLECTOR_IRREGULAR:
'person': 'လူ'
'man': 'ယောက်ျား'
'child': 'ကလေးများ'
'sex': 'လိင်'
'move': 'ရွှေ့ခြင်း'
INFLECTOR_ORDINALS:
'default': 'th'
'first': 'st'
'second': 'nd'
'third': 'rd'
NICETIME:
NO_DATE_PROVIDED: နေ့စွဲ မသတ်မှတ်ထား
BAD_DATE: ရက်စွဲမမှန်ပါ
AGO: လွန်ခဲ့တဲ့
FROM_NOW: ယခုမှ
JUST_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: 'လိုအပ်သောအကွက်ပျောက်နေသည်'
XSS_ISSUES: "XSS ပြဿနာ ဖြစ်နိုင်ချေ ကို '%s' အကွက်တွင် တွေ့"
MONTHS_OF_THE_YEAR:
- 'ဇန်နဝါရီ'
- 'ဖေဖော်ဝါရီ'
- 'မတ်'
- 'ဧပြီ'
- 'မေ'
- 'ဇွန်'
- 'ဇူလိုင်'
- 'သြဂုတ်'
- 'စက်တင်ဘာ'
- 'အောက်တိုဘာ'
- 'နိုဝင်ဘာ'
- 'ဒီဇင်ဘာ'
DAYS_OF_THE_WEEK:
- 'တနင်္လာ'
- ' အင်္ဂါ'
- 'ဗုဒ္ဓဟူး'
- 'ကြာသပတေး'
- 'သောကြာ'
- 'စနေ'
- 'တနင်္ဂနွေ'
YES: "လုပ်"
NO: "မလုပ်"
CRON:
EVERY: အမြဲတမ်း
EVERY_HOUR: နာရီတိုင်း
EVERY_MINUTE: မိနစ်တိုင်း
EVERY_DAY_OF_WEEK: တစ်ပတ်လုံး နေ့တိုင်း
EVERY_DAY_OF_MONTH: တစ်လလုံး နေ့တိုင်း
EVERY_MONTH: လစဉ်လတိုင်း
TEXT_PERIOD: </b>တိုင်း
TEXT_MINS: 'နာရီ ကျော်ပြီး <b /> မိနစ် တွင်'
TEXT_TIME: ' <b />:<b /> တွင် '
TEXT_DOW: '<b /> ပေါ်တွင် '
TEXT_MONTH: '<b />၏ '
TEXT_DOM: '<b /> တွင် '
ERROR1: ဤ %s တက် ကိုပံ့ပိုးမထားပါ။
ERROR2: လိုအပ်သောထည့်သွင်း နာပတ် အမှားဖြစ်နေသည်
ERROR3: jquery_element ကို jqCron ဆက်တင် တွင်ထားရမည်
ERROR4: အသိအမှတ်မပြုသော အသုံးအနှုန်း

View File

@@ -104,6 +104,7 @@ GRAV:
VALIDATION_FAIL: '<b>Validatie mislukt:</b>' VALIDATION_FAIL: '<b>Validatie mislukt:</b>'
INVALID_INPUT: 'Ongeldige invoer in' INVALID_INPUT: 'Ongeldige invoer in'
MISSING_REQUIRED_FIELD: 'Ontbrekend verplicht veld:' MISSING_REQUIRED_FIELD: 'Ontbrekend verplicht veld:'
XSS_ISSUES: "Mogelijke XSS-problemen ontdekt in '%s' veld"
MONTHS_OF_THE_YEAR: MONTHS_OF_THE_YEAR:
- 'Januari' - 'Januari'
- 'Februari' - 'Februari'
@@ -125,6 +126,8 @@ GRAV:
- 'Vrijdag' - 'Vrijdag'
- 'Zaterdag' - 'Zaterdag'
- 'Zondag' - 'Zondag'
YES: "Ja"
NO: "Nee"
CRON: CRON:
EVERY: elke EVERY: elke
EVERY_HOUR: elk uur EVERY_HOUR: elk uur

View File

@@ -6,10 +6,10 @@ GRAV:
INFLECTOR_UNCOUNTABLE: INFLECTOR_UNCOUNTABLE:
- 'wyposażenie' - 'wyposażenie'
- 'informacja' - 'informacja'
- 'rice' - ''
- 'pieniądze' - 'pieniądze'
- 'species' - ''
- 'series' - ''
- 'ryba' - 'ryba'
- 'owca' - 'owca'
INFLECTOR_IRREGULAR: INFLECTOR_IRREGULAR:

View File

@@ -67,7 +67,7 @@ GRAV:
NICETIME: NICETIME:
NO_DATE_PROVIDED: Nenhuma data fornecida NO_DATE_PROVIDED: Nenhuma data fornecida
BAD_DATE: Data inválida BAD_DATE: Data inválida
AGO: atrás AGO:
FROM_NOW: a partir de agora FROM_NOW: a partir de agora
JUST_NOW: mesmo agora JUST_NOW: mesmo agora
SECOND: segundo SECOND: segundo

View File

@@ -1,6 +1,16 @@
--- ---
GRAV: GRAV:
FRONTMATTER_ERROR_PAGE: "---\ntitle: %1$s\n---\n\n# Ошибка: недопустимое содержимое Frontmatter\n\nПуть: `%2$s`\n\n**%3$s**\n\n```\n%4$s\n```" FRONTMATTER_ERROR_PAGE: "---\ntitle: %1$s\n---\n\n# Ошибка: недопустимое содержимое Frontmatter\n\nПуть: `%2$s`\n\n**%3$s**\n\n```\n%4$s\n```"
INFLECTOR_SINGULAR:
'/([octop|vir])i$/i': '\1us'
'/(cris|ax|test)es$/i': '\1is'
'/(shoe)s$/i': '\1'
'/([lr])ves$/i': '\1f'
'/(tive)s$/i': "\\1\n"
'/(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'
INFLECTOR_UNCOUNTABLE: INFLECTOR_UNCOUNTABLE:
- 'экипировка' - 'экипировка'
- 'информация' - 'информация'

View File

@@ -1,9 +1,120 @@
--- ---
GRAV: GRAV:
FRONTMATTER_ERROR_PAGE: "---\nමාතෘකාව: %1$s\n---\n\n# දෝෂය: වලංගු නොවන ඉදිරිපස\n\nමාර්ගය: `%2$s`\n\n**%3$s**\n\n```\n%4$s\n```"
INFLECTOR_PLURALS:
'/([m|l])ouse$/i': '\1අයිස්'
'/(matr|vert|ind)ix|ex$/i': '\1අයිස්'
'/(?:([^f])fe|([lr])f)$/i': '\1\2වෙස්'
'/([ti])um$/i': '\1අ'
'/(buffal|tomat)o$/i': '\1ඕඑස්'
'/(bu)s$/i': '\1සෙස්'
INFLECTOR_SINGULAR: INFLECTOR_SINGULAR:
'/(quiz)zes$/i': '\1' '/(quiz)zes$/i': '\1'
'/^(ox)en/i': '\1' '/^(ox)en/i': '\1'
'/(alias|status)es$/i': '\1' '/(alias|status)es$/i': '\1'
'/([octop|vir])i$/i': '\1 අප'
'/(cris|ax|test)es$/i': '\1 වේ'
'/(o)es$/i': '\1' '/(o)es$/i': '\1'
'/(bus)es$/i': '\1' '/(bus)es$/i': '\1'
'/([m|l])ice$/i': '\1 භාවිතා කරන්න'
'/(x|ch|ss|sh)es$/i': '\1' '/(x|ch|ss|sh)es$/i': '\1'
'/(m)ovies$/i': '\1ඕවී'
'/(s)eries$/i': '\1මාලා'
'/(^analy)ses$/i': '\1සිස්'
'/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$/i': '\1\2සිස්'
'/([ti])a$/i': '\1ම්'
INFLECTOR_UNCOUNTABLE:
- 'උපකරණ'
- 'විස්තර'
- 'සහල්'
- 'මුදල'
- 'විශේෂ'
- 'මාලාවක්'
- 'මාළු'
- 'බැටළුවන්'
INFLECTOR_IRREGULAR:
'person': 'මහජන'
'man': 'මිනිසුන්'
'child': 'දරුවන්'
'sex': 'ලිංගිකත්වය'
'move': 'චලනය කරයි'
INFLECTOR_ORDINALS:
'first': 'ශාන්ත'
NICETIME:
NO_DATE_PROVIDED: දිනයක් සපයා නැත
BAD_DATE: නරක දිනය
AGO: පෙර
FROM_NOW: මෙතැන් සිට
JUST_NOW: මේ දැන්
SECOND: දෙවැනි
MINUTE: මිනිත්තුව
HOUR: පැය
DAY: දින
WEEK: සතිය
MONTH: මස
YEAR: වර්ෂය
DECADE: දශකය
SEC: තත්පර
MIN: මිනි
HR: පැය
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: සති
YR_PLURAL: වසර
DEC_PLURAL: දෙසැ
FORM:
VALIDATION_FAIL: '<b>වලංගු කිරීම අසාර්ථක විය:</b>'
INVALID_INPUT: 'වලංගු නොවන ආදානය'
MISSING_REQUIRED_FIELD: 'අවශ්‍ය ක්ෂේත්‍රය අස්ථානගත වී ඇත:'
XSS_ISSUES: "විභව XSS ගැටළු '%s' ක්ෂේත්‍රයේ අනාවරණය විය"
MONTHS_OF_THE_YEAR:
- 'ජනවාරි'
- 'පෙබරවාරි'
- 'මාර්තු'
- 'අප්රේල්'
- 'මැයි'
- 'ජූනි'
- 'ජුලි'
- 'අගෝස්තු'
- 'සැප්තැම්බර්'
- 'ඔක්තෝම්බර්'
- 'නොවැම්බර්'
- 'දෙසැම්බර්'
DAYS_OF_THE_WEEK:
- 'සඳුදා'
- 'අඟහරුවාදා'
- 'බදාදා'
- 'බ්රහස්පතින්දා'
- 'සිකුරාදා'
- 'සෙනසුරාදා'
- 'ඉරිදා'
YES: "ඔව්"
NO: "නැත"
CRON:
EVERY: සෑම
EVERY_HOUR: සෑම පැයකටම
EVERY_MINUTE: සෑම විනාඩියකටම
EVERY_DAY_OF_WEEK: සතියේ සෑම දිනකම
EVERY_DAY_OF_MONTH: මාසයේ සෑම දිනකම
EVERY_MONTH: සෑම මාසයකම
TEXT_PERIOD: සෑම <b />
TEXT_MINS: ' පැයට පසු විනාඩි <b /> කින්'
TEXT_TIME: ' <b />:<b />ට'
TEXT_DOW: ' <b />මත'
TEXT_MONTH: ' <b />'
TEXT_DOM: ' <b />මත'
ERROR1: ටැගය %s සහාය නොදක්වයි!
ERROR2: නරක මූලද්රව්ය සංඛ්යාව
ERROR3: jquery_element jqCron සැකසුම් වලට සැකසිය යුතුය
ERROR4: හඳුනා නොගත් ප්‍රකාශනය

View File

@@ -1,6 +1,17 @@
--- ---
GRAV: GRAV:
FRONTMATTER_ERROR_PAGE: "---\ntitle: %1$s\n---\n\n# Napaka: Neveljavna Frontmatter\n\nPath: `%2$s`\n\n**%3$s ** \n\n```\n%4$s \n```" FRONTMATTER_ERROR_PAGE: "---\ntitle: %1$s\n---\n\n# Napaka: Neveljavna Frontmatter\n\nPath: `%2$s`\n\n**%3$s ** \n\n```\n%4$s \n```"
INFLECTOR_UNCOUNTABLE:
- 'oprema'
- 'informacija'
- 'riž'
- 'denar'
- 'vrste'
- 'serija'
- 'riba'
- 'ovca'
INFLECTOR_IRREGULAR:
'person': 'ljudje'
NICETIME: NICETIME:
NO_DATE_PROVIDED: Datum ni na voljo NO_DATE_PROVIDED: Datum ni na voljo
BAD_DATE: Neveljaven datum BAD_DATE: Neveljaven datum
@@ -43,15 +54,15 @@ GRAV:
- 'Januar' - 'Januar'
- 'Februar' - 'Februar'
- 'Marec' - 'Marec'
- 'April' - 'april'
- 'Maj' - 'Maj'
- 'Junij' - 'Junij'
- 'Julij' - 'Julij'
- 'Avgust' - 'Avgust'
- 'September' - 'september'
- 'Oktober' - 'Oktober'
- 'November' - 'november'
- 'December' - 'december'
DAYS_OF_THE_WEEK: DAYS_OF_THE_WEEK:
- 'Ponedeljek' - 'Ponedeljek'
- 'Torek' - 'Torek'
@@ -60,3 +71,15 @@ GRAV:
- 'Petek' - 'Petek'
- 'Sobota' - 'Sobota'
- 'Nedelja' - 'Nedelja'
YES: "Da"
NO: "Ne"
CRON:
EVERY: vsak
EVERY_HOUR: vsako uro
EVERY_MINUTE: vsako minuto
EVERY_DAY_OF_WEEK: vsak dan v tednu
EVERY_DAY_OF_MONTH: vsak dan v mesecu
EVERY_MONTH: vsak mesec
ERROR1: Oznaka %s ni podprta!
ERROR2: Napačno število elementov.
ERROR4: Neznan izraz

View File

@@ -104,6 +104,7 @@ GRAV:
VALIDATION_FAIL: '<b>Провера неуспела:</b>' VALIDATION_FAIL: '<b>Провера неуспела:</b>'
INVALID_INPUT: 'Неисправан унос у' INVALID_INPUT: 'Неисправан унос у'
MISSING_REQUIRED_FIELD: 'Недостаје обавезн поље:' MISSING_REQUIRED_FIELD: 'Недостаје обавезн поље:'
XSS_ISSUES: "Потенцијална грешка у XSS-у детектована у пољу '%s' "
MONTHS_OF_THE_YEAR: MONTHS_OF_THE_YEAR:
- 'Јануар' - 'Јануар'
- 'Фебруар' - 'Фебруар'
@@ -125,6 +126,8 @@ GRAV:
- 'Петак' - 'Петак'
- 'Субота' - 'Субота'
- 'Недеља' - 'Недеља'
YES: "Да"
NO: "Не"
CRON: CRON:
EVERY: сваки EVERY: сваки
EVERY_HOUR: сваки сат EVERY_HOUR: сваки сат

147
system/languages/sw.yaml Normal file
View File

@@ -0,0 +1,147 @@
---
GRAV:
FRONTMATTER_ERROR_PAGE: "---\nkichwa: %1$s\n---\n\n# Kosa: Mbele ya Mbele\n\nNjia: `%2$s`\n\n**%3$s**\n\n```\n%4$s\n```"
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:
- 'vifaa'
- 'habari'
- 'mchele'
- 'pesa'
- 'spishi'
- 'mfululizo'
- 'samaki'
- 'kondoo'
INFLECTOR_IRREGULAR:
'person': 'watu'
'man': 'wanaume'
'child': 'watoto'
'sex': 'jinsia'
'move': 'songa'
INFLECTOR_ORDINALS:
'default': 'th'
'first': 'st'
'second': 'nd'
'third': 'rd'
NICETIME:
NO_DATE_PROVIDED: Hakuna tarehe iliyotolewa
BAD_DATE: Tarehe mbaya
AGO: zilizopita
FROM_NOW: kuanzia sasa
JUST_NOW: sasa hivi
SECOND: pili
MINUTE: dakika
HOUR: saa
DAY: siku
WEEK: wiki
MONTH: mwezi
YEAR: mwaka
DECADE: muongo
SEC: sec
MIN: min
HR: hr
WK: wk
MO: mo
YR: yr
DEC: dec
SECOND_PLURAL: sekunde
MINUTE_PLURAL: dakika
HOUR_PLURAL: masaa
DAY_PLURAL: siku
WEEK_PLURAL: wiki
MONTH_PLURAL: miezi
YEAR_PLURAL: miaka
DECADE_PLURAL: miongo
SEC_PLURAL: secs
MIN_PLURAL: mins
HR_PLURAL: hrs
WK_PLURAL: wks
MO_PLURAL: mos
YR_PLURAL: yrs
DEC_PLURAL: decs
FORM:
VALIDATION_FAIL: '<b> Uthibitishaji umeshindwa: </b>'
INVALID_INPUT: 'Ingizo batili katika'
MISSING_REQUIRED_FIELD: 'Sehemu inayokosekana inahitajika:'
XSS_ISSUES: "Masuala yanayowezekana ya XSS yamegunduliwa katika uwanja wa '% s"
MONTHS_OF_THE_YEAR:
- 'Januari'
- 'Februari'
- 'Machi'
- 'Aprili'
- 'Mei'
- 'Juni'
- 'Julai'
- 'Agosti'
- 'Septemba'
- 'Oktoba'
- 'Novemba'
- 'Desemba'
DAYS_OF_THE_WEEK:
- 'Jumatatu'
- 'Jumanne'
- 'Jumatano'
- 'Alhamisi'
- 'Ijumaa'
- 'Jumamosi'
- 'Jumapili'
YES: "Ndiyo"
NO: "Hapana"
CRON:
EVERY: kila
EVERY_HOUR: kila saa
EVERY_MINUTE: kila dakika
EVERY_DAY_OF_WEEK: kila siku ya juma
EVERY_DAY_OF_MONTH: kila siku ya mwezi
EVERY_MONTH: kila mwezi
TEXT_PERIOD: Kila <b />
TEXT_MINS: ' saa <b /> dakika (saa) zilizopita saa'
TEXT_TIME: ' saa <b />: <b />'
TEXT_DOW: ' kwenye <b />'
TEXT_MONTH: ' ya <b />'
TEXT_DOM: ' kwenye <b />'
ERROR1: Lebo% s haitumiki!
ERROR2: Idadi mbaya ya vitu
ERROR3: Jquery_element inapaswa kuwekwa kwenye mipangilio ya jqCron
ERROR4: Maneno yasiyotambulika

View File

@@ -1,11 +1,75 @@
--- ---
GRAV: GRAV:
FRONTMATTER_ERROR_PAGE: "---\nชื่อเรื่อง: %1$s\n---\n\n# ข้อผิดพลาด: Invalid Frontmatter\n\nPath: `%2$s`\n\n**%3$s**\n\n```\n%4$s\n```" FRONTMATTER_ERROR_PAGE: "---\ntitle: %1$s\n---\n\n# Error: Invalid Frontmatter\n\nPath: `%2$s`\n\n**%3$s**\n\n```\n%4$s\n```"
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:
- 'อุปกรณ์'
- 'ข้อมูล'
- 'ข้าว'
- 'เงิน'
- 'สายพันธุ์'
- 'ซีรีส์'
- 'ปลา'
- 'แกะ'
INFLECTOR_IRREGULAR:
'person': 'คน'
'man': 'ผู้ชาย'
'child': 'เด็กเด็ก'
'sex': 'เพศ'
'move': 'ย้าย'
INFLECTOR_ORDINALS:
'default': 'th'
'first': 'st'
'second': 'nd'
'third': 'rd'
NICETIME: NICETIME:
NO_DATE_PROVIDED: ไม่มีวันที่ให้ NO_DATE_PROVIDED: ไม่มีวันที่ให้
BAD_DATE: รูปแบบวันที่ผิด BAD_DATE: รูปแบบวันที่ผิด
AGO: ที่ผ่านมา AGO: ที่ผ่านมา
FROM_NOW: จากตอนนี้ FROM_NOW: จากตอนนี้
JUST_NOW: เมื่อกี้
SECOND: วินาที SECOND: วินาที
MINUTE: นาที MINUTE: นาที
HOUR: ชั่วโมง HOUR: ชั่วโมง
@@ -17,6 +81,10 @@ GRAV:
SEC: วิ SEC: วิ
MIN: นาที MIN: นาที
HR: ชม. HR: ชม.
WK: wk
MO: mo
YR: yr
DEC: dec
SECOND_PLURAL: วินาที SECOND_PLURAL: วินาที
MINUTE_PLURAL: นาที MINUTE_PLURAL: นาที
HOUR_PLURAL: ชั่วโมง HOUR_PLURAL: ชั่วโมง
@@ -28,11 +96,15 @@ GRAV:
SEC_PLURAL: วินาที SEC_PLURAL: วินาที
MIN_PLURAL: นาที MIN_PLURAL: นาที
HR_PLURAL: ชั่วโมง HR_PLURAL: ชั่วโมง
WK_PLURAL: wks
MO_PLURAL: mos
YR_PLURAL: ปี YR_PLURAL: ปี
DEC_PLURAL: decs
FORM: FORM:
VALIDATION_FAIL: '<b>ตรวจสอบล้มเหลว: </b>' VALIDATION_FAIL: '<b>ตรวจสอบล้มเหลว: </b>'
INVALID_INPUT: 'ป้อนข้อมูลไม่ถูกต้องใน' INVALID_INPUT: 'ป้อนข้อมูลไม่ถูกต้องใน'
MISSING_REQUIRED_FIELD: 'ขาดข้อมูลที่จำเป็น:' MISSING_REQUIRED_FIELD: 'ขาดข้อมูลที่จำเป็น:'
XSS_ISSUES: "ตรวจพบปัญหา XSS ที่เป็นไปได้ในฟิลด์ '%s'"
MONTHS_OF_THE_YEAR: MONTHS_OF_THE_YEAR:
- 'มกราคม' - 'มกราคม'
- 'กุมภาพันธ์' - 'กุมภาพันธ์'
@@ -54,3 +126,22 @@ GRAV:
- 'ศุกร์' - 'ศุกร์'
- 'เสาร์' - 'เสาร์'
- 'อาทิตย์' - 'อาทิตย์'
YES: "ใช่"
NO: "ไม่"
CRON:
EVERY: ทุก ๆ
EVERY_HOUR: ทุกชั่วโมง
EVERY_MINUTE: ทุกนาที
EVERY_DAY_OF_WEEK: ทุกวันในสัปดาห์
EVERY_DAY_OF_MONTH: ทุกวันของเดือน
EVERY_MONTH: ทุกเดือน
TEXT_PERIOD: ทุก ๆ <b />
TEXT_MINS: ' ที่ <b /> นาทีที่ผ่านไปแล้ว'
TEXT_TIME: ' เวลา <b />:<b />'
TEXT_DOW: ' บน <b />'
TEXT_MONTH: ' จาก <b />'
TEXT_DOM: ' บน <b />'
ERROR1: ไม่รองรับแท็ก %s!
ERROR2: จำนวนองค์ประกอบไม่ดี
ERROR3: ควรตั้งค่า jquery_element เป็นการตั้งค่า jqCron
ERROR4: นิพจน์ที่ไม่รู้จัก

View File

@@ -125,6 +125,8 @@ GRAV:
- '星期五' - '星期五'
- '星期六' - '星期六'
- '星期日' - '星期日'
YES: "是"
NO: "否"
CRON: CRON:
EVERY: 每隔 EVERY: 每隔
EVERY_HOUR: 每小时 EVERY_HOUR: 每小时

View File

@@ -62,6 +62,8 @@ GRAV:
- '星期五' - '星期五'
- '星期六' - '星期六'
- '星期日' - '星期日'
YES: "是"
NO: "否"
CRON: CRON:
EVERY: EVERY:
EVERY_HOUR: 每小時 EVERY_HOUR: 每小時

View File

@@ -125,6 +125,8 @@ GRAV:
- '星期五' - '星期五'
- '星期六' - '星期六'
- '星期日' - '星期日'
YES: "是"
NO: "否"
CRON: CRON:
EVERY: 每隔 EVERY: 每隔
EVERY_HOUR: 每小时 EVERY_HOUR: 每小时

View File

@@ -3,7 +3,7 @@
/** /**
* @package Grav\Core * @package Grav\Core
* *
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@@ -3,7 +3,7 @@
/** /**
* @package Grav\Common * @package Grav\Common
* *
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */
@@ -268,7 +268,13 @@ class Assets extends PropertyObject
} }
// Add timestamp // Add timestamp
$options['timestamp'] = $this->timestamp; $timestamp_override = $options['timestamp'] ?? true;
if (filter_var($timestamp_override, FILTER_VALIDATE_BOOLEAN)) {
$options['timestamp'] = $this->timestamp;
} else {
$options['timestamp'] = null;
}
// Set order // Set order
$group = $options['group'] ?? 'head'; $group = $options['group'] ?? 'head';
@@ -392,6 +398,9 @@ class Assets extends PropertyObject
if ($key === 'position' && $value === 'pipeline') { if ($key === 'position' && $value === 'pipeline') {
$type = $asset->getType(); $type = $asset->getType();
if ($type === 'jsmodule') {
$type = 'js_module';
}
if ($asset->getRemote() && $this->{strtolower($type) . '_pipeline_include_externals'} === false && $asset['position'] === 'pipeline') { if ($asset->getRemote() && $this->{strtolower($type) . '_pipeline_include_externals'} === false && $asset['position'] === 'pipeline') {
if ($this->{strtolower($type) . '_pipeline_before_excludes'}) { if ($this->{strtolower($type) . '_pipeline_before_excludes'}) {

View File

@@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Assets * @package Grav\Common\Assets
* *
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Assets * @package Grav\Common\Assets
* *
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Assets * @package Grav\Common\Assets
* *
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Assets * @package Grav\Common\Assets
* *
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Assets * @package Grav\Common\Assets
* *
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Assets * @package Grav\Common\Assets
* *
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Assets * @package Grav\Common\Assets
* *
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Assets * @package Grav\Common\Assets
* *
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Assets * @package Grav\Common\Assets
* *
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Assets * @package Grav\Common\Assets
* *
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */
@@ -34,7 +34,7 @@ class Pipeline extends PropertyObject
protected const JS_MODULE_ASSET = 3; protected const JS_MODULE_ASSET = 3;
/** @const Regex to match CSS urls */ /** @const Regex to match CSS urls */
protected const CSS_URL_REGEX = '{url\(([\'\"]?)(.*?)\1\)}'; protected const CSS_URL_REGEX = '{url\(([\'\"]?)(.*?)\1\)|(@import)\s+([\'\"])(.*?)\4}';
/** @const Regex to match JS imports */ /** @const Regex to match JS imports */
protected const JS_IMPORT_REGEX = '{import.+from\s?[\'|\"](.+?)[\'|\"]}'; protected const JS_IMPORT_REGEX = '{import.+from\s?[\'|\"](.+?)[\'|\"]}';
@@ -257,9 +257,14 @@ class Pipeline extends PropertyObject
// Find any css url() elements, grab the URLs and calculate an absolute path // Find any css url() elements, grab the URLs and calculate an absolute path
// Then replace the old url with the new one // Then replace the old url with the new one
$file = (string)preg_replace_callback(self::CSS_URL_REGEX, function ($matches) use ($dir, $local) { $file = (string)preg_replace_callback(self::CSS_URL_REGEX, function ($matches) use ($dir, $local) {
$isImport = count($matches) > 3 && $matches[3] === '@import';
$old_url = $matches[2]; if ($isImport) {
$old_url = $matches[5];
} else {
$old_url = $matches[2];
}
// Ensure link is not rooted to web server, a data URL, or to a remote host // Ensure link is not rooted to web server, a data URL, or to a remote host
if (preg_match(self::FIRST_FORWARDSLASH_REGEX, $old_url) || Utils::startsWith($old_url, 'data:') || $this->isRemoteLink($old_url)) { if (preg_match(self::FIRST_FORWARDSLASH_REGEX, $old_url) || Utils::startsWith($old_url, 'data:') || $this->isRemoteLink($old_url)) {
return $matches[0]; return $matches[0];
@@ -273,7 +278,11 @@ class Pipeline extends PropertyObject
$new_url = ($local ? $this->base_url : '') . $old_url; $new_url = ($local ? $this->base_url : '') . $old_url;
return str_replace($matches[2], $new_url, $matches[0]); if ($isImport) {
return str_replace($matches[5], $new_url, $matches[0]);
} else {
return str_replace($matches[2], $new_url, $matches[0]);
}
}, $file); }, $file);
return $file; return $file;

View File

@@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Assets\Traits * @package Grav\Common\Assets\Traits
* *
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */
@@ -192,6 +192,7 @@ trait AssetUtilsTrait
$querystring = ''; $querystring = '';
$asset = $asset ?? $this->asset; $asset = $asset ?? $this->asset;
$attributes = $this->attributes;
if (!empty($this->query)) { if (!empty($this->query)) {
if (Utils::contains($asset, '?')) { if (Utils::contains($asset, '?')) {

View File

@@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Assets\Traits * @package Grav\Common\Assets\Traits
* *
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Assets\Traits * @package Grav\Common\Assets\Traits
* *
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Backup * @package Grav\Common\Backup
* *
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */
@@ -218,7 +218,7 @@ class Backups
if ($locator->isStream($backup_root)) { if ($locator->isStream($backup_root)) {
$backup_root = $locator->findResource($backup_root); $backup_root = $locator->findResource($backup_root);
} else { } else {
$backup_root = rtrim(GRAV_ROOT . $backup_root, '/'); $backup_root = rtrim(GRAV_ROOT . $backup_root, DS) ?: DS;
} }
if (!$backup_root || !file_exists($backup_root)) { if (!$backup_root || !file_exists($backup_root)) {

View File

@@ -3,7 +3,7 @@
/** /**
* @package Grav\Common * @package Grav\Common
* *
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@@ -3,7 +3,7 @@
/** /**
* @package Grav\Common * @package Grav\Common
* *
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@@ -3,7 +3,7 @@
/** /**
* @package Grav\Common * @package Grav\Common
* *
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Config * @package Grav\Common\Config
* *
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Config * @package Grav\Common\Config
* *
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Config * @package Grav\Common\Config
* *
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Config * @package Grav\Common\Config
* *
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Config * @package Grav\Common\Config
* *
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Config * @package Grav\Common\Config
* *
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Config * @package Grav\Common\Config
* *
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Config * @package Grav\Common\Config
* *
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */
@@ -182,13 +182,14 @@ class Setup extends Data
// If no environment is set, make sure we get one (CLI or hostname). // If no environment is set, make sure we get one (CLI or hostname).
if (null === $environment) { if (null === $environment) {
if (defined('GRAV_CLI')) { if (defined('GRAV_CLI')) {
$request = null;
$uri = null;
$environment = 'cli'; $environment = 'cli';
} else { } else {
/** @var ServerRequestInterface $request */ /** @var ServerRequestInterface $request */
$request = $container['request']; $request = $container['request'];
$host = $request->getUri()->getHost(); $uri = $request->getUri();
$environment = $uri->getHost();
$environment = Utils::substrToString($host, ':');
} }
} }

View File

@@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Data * @package Grav\Common\Data
* *
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */
@@ -515,7 +515,7 @@ class Blueprint extends BlueprintForm
$success = $this->resolveActions($user, $actions); $success = $this->resolveActions($user, $actions);
} }
if (!$success) { if (!$success) {
$this->addPropertyRecursive($field, 'validate', ['ignore' => true]); static::addPropertyRecursive($field, 'validate', ['ignore' => true]);
} }
} }
@@ -566,7 +566,7 @@ class Blueprint extends BlueprintForm
} }
if ($matches) { if ($matches) {
$this->addPropertyRecursive($field, 'validate', ['ignore' => true]); static::addPropertyRecursive($field, 'validate', ['ignore' => true]);
return; return;
} }
} }
@@ -577,7 +577,7 @@ class Blueprint extends BlueprintForm
* @param mixed $value * @param mixed $value
* @return void * @return void
*/ */
protected function addPropertyRecursive(array &$field, $property, $value) public static function addPropertyRecursive(array &$field, $property, $value)
{ {
if (is_array($value) && isset($field[$property]) && is_array($field[$property])) { if (is_array($value) && isset($field[$property]) && is_array($field[$property])) {
$field[$property] = array_merge_recursive($field[$property], $value); $field[$property] = array_merge_recursive($field[$property], $value);
@@ -587,7 +587,7 @@ class Blueprint extends BlueprintForm
if (!empty($field['fields'])) { if (!empty($field['fields'])) {
foreach ($field['fields'] as $key => &$child) { foreach ($field['fields'] as $key => &$child) {
$this->addPropertyRecursive($child, $property, $value); static::addPropertyRecursive($child, $property, $value);
} }
} }
} }

View File

@@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Data * @package Grav\Common\Data
* *
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */
@@ -129,7 +129,8 @@ class BlueprintSchema extends BlueprintSchemaBase implements ExportInterface
$items = $name !== '' ? $this->getProperty($name)['fields'] ?? [] : $this->items; $items = $name !== '' ? $this->getProperty($name)['fields'] ?? [] : $this->items;
foreach ($items as $key => $rules) { foreach ($items as $key => $rules) {
$type = $rules['type'] ?? ''; $type = $rules['type'] ?? '';
if (!str_starts_with($type, '_') && !str_contains($key, '*')) { $ignore = (bool) array_filter((array)($rules['validate']['ignore'] ?? [])) ?? false;
if (!str_starts_with($type, '_') && !str_contains($key, '*') && $ignore !== true) {
$list[$prefix . $key] = null; $list[$prefix . $key] = null;
} }
} }

View File

@@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Data * @package Grav\Common\Data
* *
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Data * @package Grav\Common\Data
* *
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Data * @package Grav\Common\Data
* *
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Data * @package Grav\Common\Data
* *
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */
@@ -246,7 +246,9 @@ class Validation
return false; return false;
} }
$max = (int)($params['max'] ?? 0); $multiline = isset($params['multiline']) && $params['multiline'];
$max = (int)($params['max'] ?? ($multiline ? 65536 : 2048));
if ($max && $len > $max) { if ($max && $len > $max) {
return false; return false;
} }
@@ -256,7 +258,7 @@ class Validation
return false; return false;
} }
if ((!isset($params['multiline']) || !$params['multiline']) && preg_match('/\R/um', $value)) { if (!$multiline && preg_match('/\R/um', $value)) {
return false; return false;
} }
@@ -317,6 +319,10 @@ class Validation
*/ */
public static function typeCommaList($value, array $params, array $field) public static function typeCommaList($value, array $params, array $field)
{ {
if (!isset($params['max'])) {
$params['max'] = 2048;
}
return is_array($value) ? true : self::typeText($value, $params, $field); return is_array($value) ? true : self::typeText($value, $params, $field);
} }
@@ -379,6 +385,10 @@ class Validation
*/ */
public static function typePassword($value, array $params, array $field) public static function typePassword($value, array $params, array $field)
{ {
if (!isset($params['max'])) {
$params['max'] = 256;
}
return self::typeText($value, $params, $field); return self::typeText($value, $params, $field);
} }
@@ -540,7 +550,7 @@ class Validation
$step = (float)$params['step']; $step = (float)$params['step'];
// Count of how many steps we are above/below the minimum value. // Count of how many steps we are above/below the minimum value.
$pos = ($value - $min) / $step; $pos = ($value - $min) / $step;
$pos = round($pos, 10);
return is_int(static::filterNumber($pos, $params, $field)); return is_int(static::filterNumber($pos, $params, $field));
} }
@@ -621,10 +631,18 @@ class Validation
*/ */
public static function typeEmail($value, array $params, array $field) public static function typeEmail($value, array $params, array $field)
{ {
if (empty($value)) {
return false;
}
if (!isset($params['max'])) {
$params['max'] = 320;
}
$values = !is_array($value) ? explode(',', preg_replace('/\s+/', '', $value)) : $value; $values = !is_array($value) ? explode(',', preg_replace('/\s+/', '', $value)) : $value;
foreach ($values as $val) { foreach ($values as $val) {
if (!(self::typeText($val, $params, $field) && filter_var($val, FILTER_VALIDATE_EMAIL))) { if (!(self::typeText($val, $params, $field) && strpos($val, '@', 1))) {
return false; return false;
} }
} }
@@ -642,6 +660,10 @@ class Validation
*/ */
public static function typeUrl($value, array $params, array $field) public static function typeUrl($value, array $params, array $field)
{ {
if (!isset($params['max'])) {
$params['max'] = 2048;
}
return self::typeText($value, $params, $field) && filter_var($value, FILTER_VALIDATE_URL); return self::typeText($value, $params, $field) && filter_var($value, FILTER_VALIDATE_URL);
} }

View File

@@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Data * @package Grav\Common\Data
* *
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@@ -3,7 +3,7 @@
/** /**
* @package Grav\Common * @package Grav\Common
* *
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */
@@ -279,11 +279,7 @@ class Debugger
->withHeader('X-Clockwork-Id', $clockworkRequest->id) ->withHeader('X-Clockwork-Id', $clockworkRequest->id)
->withHeader('X-Clockwork-Version', $clockwork::VERSION); ->withHeader('X-Clockwork-Version', $clockwork::VERSION);
$grav = Grav::instance(); $response = $response->withHeader('X-Clockwork-Path', Utils::url('/__clockwork/'));
$basePath = $this->grav['base_url_relative'] . $grav['pages']->base();
if ($basePath) {
$response = $response->withHeader('X-Clockwork-Path', $basePath . '/__clockwork/');
}
return $response->withHeader('Server-Timing', ServerTiming::fromRequest($clockworkRequest)->value()); return $response->withHeader('Server-Timing', ServerTiming::fromRequest($clockworkRequest)->value());
} }
@@ -307,7 +303,7 @@ class Debugger
} }
$id = $matches['id'] ?? null; $id = $matches['id'] ?? null;
$direction = $matches['direction'] ?? null; $direction = $matches['direction'] ?? 'latest';
$count = $matches['count'] ?? null; $count = $matches['count'] ?? null;
$storage = $clockwork->getStorage(); $storage = $clockwork->getStorage();
@@ -316,7 +312,7 @@ class Debugger
$data = $storage->previous($id, $count); $data = $storage->previous($id, $count);
} elseif ($direction === 'next') { } elseif ($direction === 'next') {
$data = $storage->next($id, $count); $data = $storage->next($id, $count);
} elseif ($id === 'latest') { } elseif ($direction === 'latest' || $id === 'latest') {
$data = $storage->latest(); $data = $storage->latest();
} else { } else {
$data = $storage->find($id); $data = $storage->find($id);
@@ -403,8 +399,16 @@ class Debugger
// Clockwork specific assets // Clockwork specific assets
if ($this->clockwork) { if ($this->clockwork) {
$assets->addCss('/system/assets/debugger/clockwork.css', ['loading' => 'inline']); if ($this->config->get('plugins.clockwork-web.enabled')) {
$assets->addJs('/system/assets/debugger/clockwork.js', ['loading' => 'inline']); $route = Utils::url($this->grav['config']->get('plugins.clockwork-web.route'));
} else {
$route = 'https://github.com/getgrav/grav-plugin-clockwork-web';
}
$assets->addCss('/system/assets/debugger/clockwork.css');
$assets->addJs('/system/assets/debugger/clockwork.js', [
'id' => 'clockwork-script',
'data-route' => $route
]);
} }

View File

@@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Errors * @package Grav\Common\Errors
* *
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Errors * @package Grav\Common\Errors
* *
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Errors * @package Grav\Common\Errors
* *
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */
@@ -57,7 +57,7 @@ class SimplePageHandler extends Handler
$vars = array( $vars = array(
'stylesheet' => file_get_contents($cssFile), 'stylesheet' => file_get_contents($cssFile),
'code' => $code, 'code' => $code,
'message' => filter_var(rawurldecode($message), FILTER_SANITIZE_STRING), 'message' => htmlspecialchars(strip_tags(rawurldecode($message)), ENT_QUOTES, 'UTF-8'),
); );
$helper->setVariables($vars); $helper->setVariables($vars);

View File

@@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Errors * @package Grav\Common\Errors
* *
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */
@@ -43,4 +43,25 @@ class SystemFacade extends \Whoops\Util\SystemFacade
$handler(); $handler();
} }
} }
/**
* @param int $httpCode
*
* @return int
*/
public function setHttpResponseCode($httpCode)
{
if (!headers_sent()) {
// Ensure that no 'location' header is present as otherwise this
// will override the HTTP code being set here, and mask the
// expected error page.
header_remove('location');
// Work around PHP bug #8218 (8.0.17 & 8.1.4).
header_remove('Content-Encoding');
}
return http_response_code($httpCode);
}
} }

View File

@@ -3,13 +3,15 @@
/** /**
* @package Grav\Common\File * @package Grav\Common\File
* *
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */
namespace Grav\Common\File; namespace Grav\Common\File;
use Exception; use Exception;
use Grav\Common\Debugger;
use Grav\Common\Grav;
use Grav\Common\Utils; use Grav\Common\Utils;
use RocketTheme\Toolbox\File\PhpFile; use RocketTheme\Toolbox\File\PhpFile;
use RuntimeException; use RuntimeException;
@@ -32,9 +34,10 @@ trait CompiledFile
public function content($var = null) public function content($var = null)
{ {
try { try {
$filename = $this->filename;
// If nothing has been loaded, attempt to get pre-compiled version of the file first. // If nothing has been loaded, attempt to get pre-compiled version of the file first.
if ($var === null && $this->raw === null && $this->content === null) { if ($var === null && $this->raw === null && $this->content === null) {
$key = md5($this->filename); $key = md5($filename);
$file = PhpFile::instance(CACHE_DIR . "compiled/files/{$key}{$this->extension}.php"); $file = PhpFile::instance(CACHE_DIR . "compiled/files/{$key}{$this->extension}.php");
$modified = $this->modified(); $modified = $this->modified();
@@ -48,39 +51,49 @@ trait CompiledFile
$class = get_class($this); $class = get_class($this);
$size = filesize($filename);
$cache = $file->exists() ? $file->content() : null; $cache = $file->exists() ? $file->content() : null;
// Load real file if cache isn't up to date (or is invalid). // Load real file if cache isn't up to date (or is invalid).
if (!isset($cache['@class']) if (!isset($cache['@class'])
|| $cache['@class'] !== $class || $cache['@class'] !== $class
|| $cache['modified'] !== $modified || $cache['modified'] !== $modified
|| $cache['filename'] !== $this->filename || ($cache['size'] ?? null) !== $size
|| $cache['filename'] !== $filename
) { ) {
// Attempt to lock the file for writing. // Attempt to lock the file for writing.
try { try {
$file->lock(false); $locked = $file->lock(false);
} catch (Exception $e) { } catch (Exception $e) {
// Another process has locked the file; we will check this in a bit. $locked = false;
/** @var Debugger $debugger */
$debugger = Grav::instance()['debugger'];
$debugger->addMessage(sprintf('%s(): Cannot obtain a lock for compiling cache file for %s: %s', __METHOD__, $this->filename, $e->getMessage()), 'warning');
} }
// Decode RAW file into compiled array. // Decode RAW file into compiled array.
$data = (array)$this->decode($this->raw()); $data = (array)$this->decode($this->raw());
$cache = [ $cache = [
'@class' => $class, '@class' => $class,
'filename' => $this->filename, 'filename' => $filename,
'modified' => $modified, 'modified' => $modified,
'size' => $size,
'data' => $data 'data' => $data
]; ];
// If compiled file wasn't already locked by another process, save it. // If compiled file wasn't already locked by another process, save it.
if ($file->locked() !== false) { if ($locked) {
$file->save($cache); $file->save($cache);
$file->unlock(); $file->unlock();
// Compile cached file into bytecode cache // Compile cached file into bytecode cache
if (function_exists('opcache_invalidate')) { if (function_exists('opcache_invalidate') && filter_var(ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN)) {
$lockName = $file->filename();
// Silence error if function exists, but is restricted. // Silence error if function exists, but is restricted.
@opcache_invalidate($file->filename(), true); @opcache_invalidate($lockName, true);
@opcache_compile_file($lockName);
} }
} }
} }
@@ -89,12 +102,71 @@ trait CompiledFile
$this->content = $cache['data']; $this->content = $cache['data'];
} }
} catch (Exception $e) { } catch (Exception $e) {
throw new RuntimeException(sprintf('Failed to read %s: %s', Utils::basename($this->filename), $e->getMessage()), 500, $e); throw new RuntimeException(sprintf('Failed to read %s: %s', Utils::basename($filename), $e->getMessage()), 500, $e);
} }
return parent::content($var); return parent::content($var);
} }
/**
* Save file.
*
* @param mixed $data Optional data to be saved, usually array.
* @return void
* @throws RuntimeException
*/
public function save($data = null)
{
// Make sure that the cache file is always up to date!
$key = md5($this->filename);
$file = PhpFile::instance(CACHE_DIR . "compiled/files/{$key}{$this->extension}.php");
try {
$locked = $file->lock();
} catch (Exception $e) {
$locked = false;
/** @var Debugger $debugger */
$debugger = Grav::instance()['debugger'];
$debugger->addMessage(sprintf('%s(): Cannot obtain a lock for compiling cache file for %s: %s', __METHOD__, $this->filename, $e->getMessage()), 'warning');
}
parent::save($data);
if ($locked) {
$modified = $this->modified();
$filename = $this->filename;
$class = get_class($this);
$size = filesize($filename);
// windows doesn't play nicely with this as it can't read when locked
if (!Utils::isWindows()) {
// Reload data from the filesystem. This ensures that we always cache the correct data (see issue #2282).
$this->raw = $this->content = null;
$data = (array)$this->decode($this->raw());
}
// Decode data into compiled array.
$cache = [
'@class' => $class,
'filename' => $filename,
'modified' => $modified,
'size' => $size,
'data' => $data
];
$file->save($cache);
$file->unlock();
// Compile cached file into bytecode cache
if (function_exists('opcache_invalidate') && filter_var(ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN)) {
$lockName = $file->filename();
// Silence error if function exists, but is restricted.
@opcache_invalidate($lockName, true);
@opcache_compile_file($lockName);
}
}
}
/** /**
* Serialize file. * Serialize file.
* *

View File

@@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\File * @package Grav\Common\File
* *
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\File * @package Grav\Common\File
* *
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\File * @package Grav\Common\File
* *
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Filesystem * @package Grav\Common\Filesystem
* *
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Filesystem * @package Grav\Common\Filesystem
* *
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */
@@ -31,32 +31,34 @@ abstract class Folder
/** /**
* Recursively find the last modified time under given path. * Recursively find the last modified time under given path.
* *
* @param string $path * @param array $paths
* @return int * @return int
*/ */
public static function lastModifiedFolder($path) public static function lastModifiedFolder(array $paths): int
{ {
if (!file_exists($path)) {
return 0;
}
$last_modified = 0; $last_modified = 0;
/** @var UniformResourceLocator $locator */ /** @var UniformResourceLocator $locator */
$locator = Grav::instance()['locator']; $locator = Grav::instance()['locator'];
$flags = RecursiveDirectoryIterator::SKIP_DOTS; $flags = RecursiveDirectoryIterator::SKIP_DOTS;
if ($locator->isStream($path)) {
$directory = $locator->getRecursiveIterator($path, $flags);
} else {
$directory = new RecursiveDirectoryIterator($path, $flags);
}
$filter = new RecursiveFolderFilterIterator($directory);
$iterator = new RecursiveIteratorIterator($filter, RecursiveIteratorIterator::SELF_FIRST);
foreach ($iterator as $dir) { foreach ($paths as $path) {
$dir_modified = $dir->getMTime(); if (!file_exists($path)) {
if ($dir_modified > $last_modified) { return 0;
$last_modified = $dir_modified; }
if ($locator->isStream($path)) {
$directory = $locator->getRecursiveIterator($path, $flags);
} else {
$directory = new RecursiveDirectoryIterator($path, $flags);
}
$filter = new RecursiveFolderFilterIterator($directory);
$iterator = new RecursiveIteratorIterator($filter, RecursiveIteratorIterator::SELF_FIRST);
foreach ($iterator as $dir) {
$dir_modified = $dir->getMTime();
if ($dir_modified > $last_modified) {
$last_modified = $dir_modified;
}
} }
} }
@@ -66,38 +68,40 @@ abstract class Folder
/** /**
* Recursively find the last modified time under given path by file. * Recursively find the last modified time under given path by file.
* *
* @param string $path * @param array $paths
* @param string $extensions which files to search for specifically * @param string $extensions which files to search for specifically
* @return int * @return int
*/ */
public static function lastModifiedFile($path, $extensions = 'md|yaml') public static function lastModifiedFile(array $paths, $extensions = 'md|yaml'): int
{ {
if (!file_exists($path)) {
return 0;
}
$last_modified = 0; $last_modified = 0;
/** @var UniformResourceLocator $locator */ /** @var UniformResourceLocator $locator */
$locator = Grav::instance()['locator']; $locator = Grav::instance()['locator'];
$flags = RecursiveDirectoryIterator::SKIP_DOTS; $flags = RecursiveDirectoryIterator::SKIP_DOTS;
if ($locator->isStream($path)) {
$directory = $locator->getRecursiveIterator($path, $flags);
} else {
$directory = new RecursiveDirectoryIterator($path, $flags);
}
$recursive = new RecursiveIteratorIterator($directory, RecursiveIteratorIterator::SELF_FIRST);
$iterator = new RegexIterator($recursive, '/^.+\.'.$extensions.'$/i');
/** @var RecursiveDirectoryIterator $file */ foreach($paths as $path) {
foreach ($iterator as $filepath => $file) { if (!file_exists($path)) {
try { return 0;
$file_modified = $file->getMTime(); }
if ($file_modified > $last_modified) { if ($locator->isStream($path)) {
$last_modified = $file_modified; $directory = $locator->getRecursiveIterator($path, $flags);
} else {
$directory = new RecursiveDirectoryIterator($path, $flags);
}
$recursive = new RecursiveIteratorIterator($directory, RecursiveIteratorIterator::SELF_FIRST);
$iterator = new RegexIterator($recursive, '/^.+\.'.$extensions.'$/i');
/** @var RecursiveDirectoryIterator $file */
foreach ($iterator as $file) {
try {
$file_modified = $file->getMTime();
if ($file_modified > $last_modified) {
$last_modified = $file_modified;
}
} catch (Exception $e) {
Grav::instance()['log']->error('Could not process file: ' . $e->getMessage());
} }
} catch (Exception $e) {
Grav::instance()['log']->error('Could not process file: ' . $e->getMessage());
} }
} }
@@ -107,28 +111,30 @@ abstract class Folder
/** /**
* Recursively md5 hash all files in a path * Recursively md5 hash all files in a path
* *
* @param string $path * @param array $paths
* @return string * @return string
*/ */
public static function hashAllFiles($path) public static function hashAllFiles(array $paths): string
{ {
$files = []; $files = [];
if (file_exists($path)) { foreach ($paths as $path) {
$flags = RecursiveDirectoryIterator::SKIP_DOTS; if (file_exists($path)) {
$flags = RecursiveDirectoryIterator::SKIP_DOTS;
/** @var UniformResourceLocator $locator */ /** @var UniformResourceLocator $locator */
$locator = Grav::instance()['locator']; $locator = Grav::instance()['locator'];
if ($locator->isStream($path)) { if ($locator->isStream($path)) {
$directory = $locator->getRecursiveIterator($path, $flags); $directory = $locator->getRecursiveIterator($path, $flags);
} else { } else {
$directory = new RecursiveDirectoryIterator($path, $flags); $directory = new RecursiveDirectoryIterator($path, $flags);
} }
$iterator = new RecursiveIteratorIterator($directory, RecursiveIteratorIterator::SELF_FIRST); $iterator = new RecursiveIteratorIterator($directory, RecursiveIteratorIterator::SELF_FIRST);
foreach ($iterator as $file) { foreach ($iterator as $file) {
$files[] = $file->getPathname() . '?'. $file->getMTime(); $files[] = $file->getPathname() . '?'. $file->getMTime();
}
} }
} }

View File

@@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Filesystem * @package Grav\Common\Filesystem
* *
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */
@@ -49,7 +49,7 @@ class RecursiveDirectoryFilterIterator extends RecursiveFilterIterator
* *
* @return bool true if the current element is acceptable, otherwise false. * @return bool true if the current element is acceptable, otherwise false.
*/ */
public function accept() public function accept() :bool
{ {
/** @var SplFileInfo $file */ /** @var SplFileInfo $file */
$file = $this->current(); $file = $this->current();
@@ -72,7 +72,7 @@ class RecursiveDirectoryFilterIterator extends RecursiveFilterIterator
/** /**
* @return RecursiveDirectoryFilterIterator|RecursiveFilterIterator * @return RecursiveDirectoryFilterIterator|RecursiveFilterIterator
*/ */
public function getChildren() public function getChildren() :RecursiveFilterIterator
{ {
/** @var RecursiveDirectoryFilterIterator $iterator */ /** @var RecursiveDirectoryFilterIterator $iterator */
$iterator = $this->getInnerIterator(); $iterator = $this->getInnerIterator();

View File

@@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Filesystem * @package Grav\Common\Filesystem
* *
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */
@@ -45,7 +45,7 @@ class RecursiveFolderFilterIterator extends \RecursiveFilterIterator
* *
* @return bool true if the current element is acceptable, otherwise false. * @return bool true if the current element is acceptable, otherwise false.
*/ */
public function accept() public function accept() :bool
{ {
/** @var SplFileInfo $current */ /** @var SplFileInfo $current */
$current = $this->current(); $current = $this->current();

View File

@@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Filesystem * @package Grav\Common\Filesystem
* *
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@@ -5,7 +5,7 @@ declare(strict_types=1);
/** /**
* @package Grav\Common\Flex * @package Grav\Common\Flex
* *
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@@ -5,7 +5,7 @@ declare(strict_types=1);
/** /**
* @package Grav\Common\Flex * @package Grav\Common\Flex
* *
* @copyright Copyright (c) 2015 - 2022 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

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