From f58df3c48f1dbadc069a651ed3a2a08cde2d5ff2 Mon Sep 17 00:00:00 2001 From: mufac Date: Wed, 26 Aug 2015 15:50:55 -0500 Subject: [PATCH 1/5] Fix issue with date format for PHP 5.1.0+ As of PHP 5.1.0 the character 'o' represents the ISO-8601 year number in a date format. Therefore the 'o' needs to be escaped to avoid being converted to a year in the admin > configuration > system > long/short date format pulldown menu. I should note that this fixes the issue for English, but you might want to consider moving the date format into a language string in order to provide better multi-language support. --- system/blueprints/config/system.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/blueprints/config/system.yaml b/system/blueprints/config/system.yaml index cfb8121a1..30f3ca314 100644 --- a/system/blueprints/config/system.yaml +++ b/system/blueprints/config/system.yaml @@ -58,7 +58,7 @@ form: default: "jS M Y" options: "F jS \\a\\t g:ia": Date1 - "l jS of F g:i A": Date2 + "l jS \\of F g:i A": Date2 "D, m M Y G:i:s": Date3 "d-m-y G:i": Date4 "jS M Y": Date5 @@ -71,7 +71,7 @@ form: help: PLUGIN_ADMIN.LONG_DATE_FORMAT_HELP options: "F jS \\a\\t g:ia": Date1 - "l jS of F g:i A": Date2 + "l jS \\of F g:i A": Date2 "D, m M Y G:i:s": Date3 "d-m-y G:i": Date4 "jS M Y": Date5 From be4af2403b0ea20eb9ed024c77effbf89bd36234 Mon Sep 17 00:00:00 2001 From: Flavio Copes Date: Fri, 28 Aug 2015 15:53:58 +0200 Subject: [PATCH 2/5] Better explanation for `bin/grav newuser` username format --- system/src/Grav/Console/Cli/NewUserCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/src/Grav/Console/Cli/NewUserCommand.php b/system/src/Grav/Console/Cli/NewUserCommand.php index cbab7804d..2e3da7db8 100644 --- a/system/src/Grav/Console/Cli/NewUserCommand.php +++ b/system/src/Grav/Console/Cli/NewUserCommand.php @@ -53,7 +53,7 @@ class NewUserCommand extends Command $question->setValidator(function ($value) { if (!preg_match('/^[a-z0-9_-]{3,16}$/', $value)) { throw new RuntimeException( - 'Username should be between 3 and 16 comprised of lowercase letters, numbers, underscores and hyphens' + 'Username should be between 3 and 16 characters, including lowercase letters, numbers, underscores, and hyphens. Uppercase letters, spaces, and special characters are not allowed' ); } if (file_exists(self::getGrav()['locator']->findResource('user://accounts/' . $value . YAML_EXT))) { From 665974a21e0917e62ff84e57df6cc938ff5599f0 Mon Sep 17 00:00:00 2001 From: Flavio Copes Date: Fri, 28 Aug 2015 15:55:17 +0200 Subject: [PATCH 3/5] Prevent error, check if $child_page is not null --- system/src/Grav/Common/Page/Page.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/src/Grav/Common/Page/Page.php b/system/src/Grav/Common/Page/Page.php index 4e88ce5a0..ed961594e 100644 --- a/system/src/Grav/Common/Page/Page.php +++ b/system/src/Grav/Common/Page/Page.php @@ -1737,7 +1737,7 @@ class Page if (isset($routes[$uri_path])) { $child_page = $pages->dispatch($uri->route())->parent(); - while (!$child_page->root()) { + if ($child_page) while (!$child_page->root()) { if ($this->path() == $child_page->path()) { return true; } From 198c181ed70ce7f04bf7c257f3ce98d00a837256 Mon Sep 17 00:00:00 2001 From: Flavio Copes Date: Fri, 28 Aug 2015 16:01:42 +0200 Subject: [PATCH 4/5] Add help to the username blueprint --- system/blueprints/user/account_new.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/system/blueprints/user/account_new.yaml b/system/blueprints/user/account_new.yaml index 202f68814..6c6505bdb 100644 --- a/system/blueprints/user/account_new.yaml +++ b/system/blueprints/user/account_new.yaml @@ -11,5 +11,6 @@ form: username: type: text label: PLUGIN_ADMIN.USERNAME + help: PLUGIN_ADMIN.USERNAME_HELP validate: required: true From c41e58b1d7270a50f193fc2ba787f71c7d22e423 Mon Sep 17 00:00:00 2001 From: Flavio Copes Date: Fri, 28 Aug 2015 16:52:18 +0200 Subject: [PATCH 5/5] Fix translation label --- system/blueprints/config/system.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/blueprints/config/system.yaml b/system/blueprints/config/system.yaml index 30f3ca314..371b00755 100644 --- a/system/blueprints/config/system.yaml +++ b/system/blueprints/config/system.yaml @@ -324,7 +324,7 @@ form: size: small classes: fancy label: PLUGIN_ADMIN.CACHE_CHECK_METHOD - help: PLUGIN_ADMIN.CACHE_CHECK_METHOD + help: PLUGIN_ADMIN.CACHE_CHECK_METHOD_HELP options: file: File folder: Folder