From f03a7ced0692c80de1897327de4736c73a7d87cf Mon Sep 17 00:00:00 2001 From: Djamil Legato Date: Fri, 5 Feb 2016 15:32:51 -0800 Subject: [PATCH 01/12] Check if php version starts with 5.6 for the release --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index fbcc77d32..c152de758 100644 --- a/.travis.yml +++ b/.travis.yml @@ -50,7 +50,7 @@ before_install: - if [ $TRAVIS_BRANCH == 'develop' ] || [ $TRAVIS_PULL_REQUEST != 'false' ]; then composer install --dev --prefer-dist; fi - - if [ $TRAVIS_BRANCH != 'develop' ] && [ $TRAVIS_PHP_VERSION == '5.6' ] && [ $TRAVIS_PULL_REQUEST == "false" ]; then + - if [ $TRAVIS_BRANCH != 'develop' ] && [[ $TRAVIS_PHP_VERSION == "5.6*" ]] && [ $TRAVIS_PULL_REQUEST == "false" ]; then TRAVIS_TAG=$(curl --fail --user ${GH_API_USER} -s https://api.github.com/repos/getgrav/grav/releases/latest | grep tag_name | head -n 1 | cut -d '"' -f 4); go get github.com/aktau/github-release; git clone --quiet --depth=50 --branch=master https://${BB_TOKEN}bitbucket.org/rockettheme/grav-devtools.git $RT_DEVTOOLS &>/dev/null; @@ -67,7 +67,7 @@ script: else TRAVIS_TAG=$(curl --fail --user ${GH_API_USER} -s https://api.github.com/repos/getgrav/grav/releases/latest | grep tag_name | head -n 1 | cut -d '"' -f 4); fi - - if [ ! -z "$TRAVIS_TAG" ] && [ $TRAVIS_BRANCH != 'develop' ] && [ $TRAVIS_PHP_VERSION == '5.6' ] && [ $TRAVIS_PULL_REQUEST == "false" ]; then + - if [ ! -z "$TRAVIS_TAG" ] && [ $TRAVIS_BRANCH != 'develop' ] && [[ $TRAVIS_PHP_VERSION == "5.6*" ]] && [ $TRAVIS_PULL_REQUEST == "false" ]; then FILES="$RT_DEVTOOLS/grav-dist/*.zip"; for file in ${FILES[@]}; do NAME=${file##*/}; From 88c84ed02823cacb60b560690bcac1b43aab1c79 Mon Sep 17 00:00:00 2001 From: Djamil Legato Date: Fri, 5 Feb 2016 16:10:51 -0800 Subject: [PATCH 02/12] Updated auth token (and kicking of unit tests) --- .travis.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index c152de758..e36c4a617 100644 --- a/.travis.yml +++ b/.travis.yml @@ -42,16 +42,20 @@ env: # BB_TOKEN value => "user:pass@" - secure: "einUtSEkUWy2IrqLXyVjwUU+mwaaoiOXRRVdLBpA3Zye6bZx8cm5h/5AplkPWhM/NmCJoW/MwNZHHkFhlr3mDRov5iOxVmTTYfnXB+I5lxYTSgduOLLErS7mU8hfADpVDU8bHNU44fNGD3UEiG1PD4qQBX4DMlqIFmR20mjs81k=" # GH_API_USER [for curl] - - secure: "Xbk/V9aIys0NxccJGR3Zrm2GRxDnA0RuazBs1puIboTYDhbi0Z7JTL+mOx3xp5Kfoniad/xAuijQESTM9MMrKqq/qCzhAMaC1+vcL4pCHZH4NSG6DBxB9BPkKVFq+1llu5FTEf8bkxHzwGR0l1ARW6TVRcgTHr5B58bCEIwEOrI=" + - secure: "AQGcX1B2NrI8ajflY4AimZDNcK2kBA3F6mbtEFQ78NkDoWhMipsQHayWXiSTzRc0YJKvQl2Y16MTwQF4VHzjTAiiZFATgA8J88vQUjIPabi/kKjqSmcLFoaAOAxStQbW6e0z2GiQ6KBMcNF1y5iUuI63xVrBvtKrYX/w5y+ako8=" + # Latest Release version + - TRAVIS_TAG=$(curl --fail -s https://api.github.com/repos/getgrav/grav/releases/latest | grep tag_name | head -n 1 | cut -d '"' -f 4) before_install: - export TZ=Pacific/Honolulu + - echo $TRAVIS_PHP_VERSION + - echo $TRAVIS_BRANCH + - echo $TRAVIS_PULL_REQUEST - composer self-update - if [ $TRAVIS_BRANCH == 'develop' ] || [ $TRAVIS_PULL_REQUEST != 'false' ]; then composer install --dev --prefer-dist; fi - - if [ $TRAVIS_BRANCH != 'develop' ] && [[ $TRAVIS_PHP_VERSION == "5.6*" ]] && [ $TRAVIS_PULL_REQUEST == "false" ]; then - TRAVIS_TAG=$(curl --fail --user ${GH_API_USER} -s https://api.github.com/repos/getgrav/grav/releases/latest | grep tag_name | head -n 1 | cut -d '"' -f 4); + - if [ $TRAVIS_BRANCH != 'develop' ] && [ $TRAVIS_PHP_VERSION == "5.6" ] && [ $TRAVIS_PULL_REQUEST == "false" ]; then go get github.com/aktau/github-release; git clone --quiet --depth=50 --branch=master https://${BB_TOKEN}bitbucket.org/rockettheme/grav-devtools.git $RT_DEVTOOLS &>/dev/null; if [ ! -z "$TRAVIS_TAG" ]; then @@ -64,10 +68,9 @@ before_script: script: - if [ $TRAVIS_BRANCH == 'develop' ] || [ $TRAVIS_PULL_REQUEST != 'false' ]; then vendor/bin/codecept run; - else - TRAVIS_TAG=$(curl --fail --user ${GH_API_USER} -s https://api.github.com/repos/getgrav/grav/releases/latest | grep tag_name | head -n 1 | cut -d '"' -f 4); fi - - if [ ! -z "$TRAVIS_TAG" ] && [ $TRAVIS_BRANCH != 'develop' ] && [[ $TRAVIS_PHP_VERSION == "5.6*" ]] && [ $TRAVIS_PULL_REQUEST == "false" ]; then + - echo $TRAVIS_TAG + - if [ ! -z "$TRAVIS_TAG" ] && [ $TRAVIS_BRANCH != 'develop' ] && [ $TRAVIS_PHP_VERSION == "5.6" ] && [ $TRAVIS_PULL_REQUEST == "false" ]; then FILES="$RT_DEVTOOLS/grav-dist/*.zip"; for file in ${FILES[@]}; do NAME=${file##*/}; From 360286f3d430d9fb18e6c6ec949803eaaaee5b56 Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Sat, 6 Feb 2016 17:53:43 -0700 Subject: [PATCH 03/12] moved build status --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6f0cf6241..0586f6c00 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# ![](https://avatars1.githubusercontent.com/u/8237355?v=2&s=50) Grav [![Build Status](https://travis-ci.org/getgrav/grav.svg?branch=develop)](https://travis-ci.org/getgrav/grav) +# ![](https://avatars1.githubusercontent.com/u/8237355?v=2&s=50) Grav -[![SensioLabsInsight](https://insight.sensiolabs.com/projects/cfd20465-d0f8-4a0a-8444-467f5b5f16ad/mini.png)](https://insight.sensiolabs.com/projects/cfd20465-d0f8-4a0a-8444-467f5b5f16ad) [![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/getgrav/grav?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) +[![SensioLabsInsight](https://insight.sensiolabs.com/projects/cfd20465-d0f8-4a0a-8444-467f5b5f16ad/mini.png)](https://insight.sensiolabs.com/projects/cfd20465-d0f8-4a0a-8444-467f5b5f16ad) [![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/getgrav/grav?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Build Status](https://travis-ci.org/getgrav/grav.svg?branch=develop)](https://travis-ci.org/getgrav/grav) Grav is a **Fast**, **Simple**, and **Flexible**, file-based Web-platform. There is **Zero** installation required. Just extract the ZIP archive, and you are already up and running. It follows similar principles to other flat-file CMS platforms, but has a different design philosophy than most. Grav comes with a powerful **Package Management System** to allow for simple installation and upgrading of plugins and themes, as well as simple updating of Grav itself. From 39b1eed912b5105f2068b3d89df1b46c3f5c6180 Mon Sep 17 00:00:00 2001 From: Takefumi Ota <8305@dragonparts.com> Date: Tue, 9 Feb 2016 10:27:57 +0900 Subject: [PATCH 04/12] Add Ja language file. --- system/languages/ja.yaml | 59 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 system/languages/ja.yaml diff --git a/system/languages/ja.yaml b/system/languages/ja.yaml new file mode 100644 index 000000000..a2ba94aea --- /dev/null +++ b/system/languages/ja.yaml @@ -0,0 +1,59 @@ +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: [] + +INFLECTOR_SINGULAR: [] + +INFLECTOR_UNCOUNTABLE: [] + +INFLECTOR_IRREGULAR: + 'person': 'みんな' + 'man': '人' + 'child': '子供' + 'sex': '性別' + 'move': '移動' + +INFLECTOR_ORDINALS: [] + +NICETIME: + NO_DATE_PROVIDED: 日付が設定されていません + BAD_DATE: 不正な日付 + AGO: 前 + FROM_NOW: from now + SECOND: 秒 + MINUTE: 分 + HOUR: 時 + DAY: 日 + WEEK: 週 + MONTH: 月 + YEAR: 年 + DECADE: 10年 + SEC: 秒 + MIN: 分 + HR: 時 + DAY: 日 + WK: 週 + MO: 月 + YR: 年 + DEC: dec + SECOND_PLURAL: 秒 + MINUTE_PLURAL: 分 + HOUR_PLURAL: 時 + DAY_PLURAL: 日 + WEEK_PLURAL: 週 + MONTH_PLURAL: 月 + YEAR_PLURAL: 年 + DECADE_PLURAL: 10年 + SEC_PLURAL: 秒 + MIN_PLURAL: 分 + HR_PLURAL: 時 + DAY_PLURAL: 日 + WK_PLURAL: 週 + MO_PLURAL: 月 + YR_PLURAL: 年 + DEC_PLURAL: 10年 +FORM: + VALIDATION_FAIL: バリデーション失敗 : + INVALID_INPUT: 不正な入力: + MISSING_REQUIRED_FIELD: 必須項目が入力されていません: +MONTHS_OF_THE_YEAR: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'] +DAYS_OF_THE_WEEK: ['月', '火', '水', '木', '金', '土', '日'] From bb23f6157f17eff5fc7d84c607b656de76b5e231 Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Wed, 10 Feb 2016 22:44:54 -0700 Subject: [PATCH 05/12] Support content level meta data .. so you can store things in cache alongside content --- system/src/Grav/Common/Page/Page.php | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/system/src/Grav/Common/Page/Page.php b/system/src/Grav/Common/Page/Page.php index 99ccd702d..db055d528 100644 --- a/system/src/Grav/Common/Page/Page.php +++ b/system/src/Grav/Common/Page/Page.php @@ -65,6 +65,7 @@ class Page protected $frontmatter; protected $language; protected $content; + protected $content_meta; protected $summary; protected $raw_content; protected $pagination; @@ -516,8 +517,16 @@ public function content($var = null) // Load cached content /** @var Cache $cache */ $cache = self::getGrav()['cache']; - $cache_id = md5('page' . $this->id()); - $this->content = $cache->fetch($cache_id); + $cache_id = $this->id(); + $content_obj = $cache->fetch($cache_id); + + if (is_array($content_obj)) { + $this->content = $content_obj['content']; + $this->content_meta = $content_obj['content_meta']; + } else { + $this->content = $content_obj; + } + $process_markdown = $this->shouldProcess('markdown'); $process_twig = $this->shouldProcess('twig'); @@ -574,6 +583,17 @@ public function content($var = null) return $this->content; } + public function addContentMeta($name, $value) + { + $this->content_meta[$name] = $value; + } + + public function getContentMeta() + { + return $this->content_meta; + } + + /** * Process the Markdown content. Uses Parsedown or Parsedown Extra depending on configuration */ @@ -618,8 +638,8 @@ private function processTwig() private function cachePageContent() { $cache = self::getGrav()['cache']; - $cache_id = md5('page' . $this->id()); - $cache->save($cache_id, $this->content); + $cache_id = $this->id(); + $cache->save($cache_id, ['content' => $this->content, 'content_meta' => $this->content_meta]); } /** From 36be17617d7cff79a236d01ebfb56b45f2ecb1ea Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Wed, 10 Feb 2016 22:48:04 -0700 Subject: [PATCH 06/12] use old cache_id mechanism for safety --- system/src/Grav/Common/Page/Page.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/src/Grav/Common/Page/Page.php b/system/src/Grav/Common/Page/Page.php index db055d528..85573528b 100644 --- a/system/src/Grav/Common/Page/Page.php +++ b/system/src/Grav/Common/Page/Page.php @@ -517,7 +517,7 @@ public function content($var = null) // Load cached content /** @var Cache $cache */ $cache = self::getGrav()['cache']; - $cache_id = $this->id(); + $cache_id = md5('page' . $this->id()); $content_obj = $cache->fetch($cache_id); if (is_array($content_obj)) { @@ -638,7 +638,7 @@ private function processTwig() private function cachePageContent() { $cache = self::getGrav()['cache']; - $cache_id = $this->id(); + $cache_id = md5('page' . $this->id()); $cache->save($cache_id, ['content' => $this->content, 'content_meta' => $this->content_meta]); } From bda8de30768210e105731b29129f2379a681d374 Mon Sep 17 00:00:00 2001 From: Flavio Copes Date: Wed, 10 Feb 2016 17:16:04 +0100 Subject: [PATCH 07/12] Typo --- system/src/Grav/Common/Browser.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/src/Grav/Common/Browser.php b/system/src/Grav/Common/Browser.php index 3272901d3..bcced4899 100644 --- a/system/src/Grav/Common/Browser.php +++ b/system/src/Grav/Common/Browser.php @@ -6,8 +6,8 @@ * * Internally uses the PhpUserAgent package https://github.com/donatj/PhpUserAgent * - * @author RocketTHeme - * @licence MIT + * @author RocketTheme + * @license MIT */ class Browser { From 028554dbf8d5cd598299160ce174a61e13481d1a Mon Sep 17 00:00:00 2001 From: Flavio Copes Date: Thu, 11 Feb 2016 16:11:46 +0100 Subject: [PATCH 08/12] Fix languages in Grav --- system/languages/cs.yaml | 1 - system/languages/de.yaml | 9 ++++----- system/languages/el.yaml | 1 - system/languages/es.yaml | 1 - system/languages/fi.yaml | 1 - system/languages/fr.yaml | 9 ++++----- system/languages/hr.yaml | 1 - system/languages/hu.yaml | 9 ++++----- system/languages/it.yaml | 1 - system/languages/lt.yaml | 1 - system/languages/nl.yaml | 1 - system/languages/no.yaml | 9 ++++----- system/languages/pl.yaml | 9 ++++----- system/languages/pt.yaml | 1 - system/languages/ro.yaml | 1 - system/languages/ru.yaml | 1 - system/languages/sk.yaml | 1 - system/languages/sv.yaml | 1 - system/languages/tr.yaml | 1 - 19 files changed, 20 insertions(+), 39 deletions(-) delete mode 100644 system/languages/fi.yaml delete mode 100644 system/languages/sk.yaml diff --git a/system/languages/cs.yaml b/system/languages/cs.yaml index f019accd1..a97eb4cab 100644 --- a/system/languages/cs.yaml +++ b/system/languages/cs.yaml @@ -1,4 +1,3 @@ ---- INFLECTOR_UNCOUNTABLE: - vybavení - informace diff --git a/system/languages/de.yaml b/system/languages/de.yaml index a5285fa76..8fcf2e620 100644 --- a/system/languages/de.yaml +++ b/system/languages/de.yaml @@ -1,14 +1,13 @@ ---- FRONTMATTER_ERROR_PAGE: | --- title: %1$s --- # Fehler: Frontmatter enthält Fehler - + Pfad: `%2$s` - - **%3$s ** - + + **%3$s ** + ``` %4$s ``` diff --git a/system/languages/el.yaml b/system/languages/el.yaml index efbdb72d0..2a03c9d7e 100644 --- a/system/languages/el.yaml +++ b/system/languages/el.yaml @@ -1,4 +1,3 @@ ---- MONTHS_OF_THE_YEAR: - Ιανουάριος - Φεβρουάριος diff --git a/system/languages/es.yaml b/system/languages/es.yaml index 068b4ed57..9bfedec7f 100644 --- a/system/languages/es.yaml +++ b/system/languages/es.yaml @@ -1,4 +1,3 @@ ---- INFLECTOR_UNCOUNTABLE: 0: equipo 1: información diff --git a/system/languages/fi.yaml b/system/languages/fi.yaml deleted file mode 100644 index ed97d539c..000000000 --- a/system/languages/fi.yaml +++ /dev/null @@ -1 +0,0 @@ ---- diff --git a/system/languages/fr.yaml b/system/languages/fr.yaml index d6dd9121b..c6d603885 100644 --- a/system/languages/fr.yaml +++ b/system/languages/fr.yaml @@ -1,15 +1,14 @@ ---- FRONTMATTER_ERROR_PAGE: | --- title: %1$s --- - + # Erreur : Frontmatter invalide - + Path: `%2$s` - + **%3$s** - + ``` %4$s ``` diff --git a/system/languages/hr.yaml b/system/languages/hr.yaml index adcdde56d..8d4eeb125 100644 --- a/system/languages/hr.yaml +++ b/system/languages/hr.yaml @@ -1,4 +1,3 @@ ---- INFLECTOR_UNCOUNTABLE: - oprema - informacije diff --git a/system/languages/hu.yaml b/system/languages/hu.yaml index 6b5bdcfe5..127353eec 100644 --- a/system/languages/hu.yaml +++ b/system/languages/hu.yaml @@ -1,15 +1,14 @@ ---- FRONTMATTER_ERROR_PAGE: | --- cím: %1$s --- - + # Hiba: Érvénytelen Frontmatter - + Elérési út: `%2$s` - + **%3$s** - + ``` %4$s ``` diff --git a/system/languages/it.yaml b/system/languages/it.yaml index 5ae76457a..d091e8ff3 100644 --- a/system/languages/it.yaml +++ b/system/languages/it.yaml @@ -1,4 +1,3 @@ ---- NICETIME: NO_DATE_PROVIDED: Nessuna data fornita BAD_DATE: Data errata diff --git a/system/languages/lt.yaml b/system/languages/lt.yaml index 6b77aa176..fcd34ef13 100644 --- a/system/languages/lt.yaml +++ b/system/languages/lt.yaml @@ -1,4 +1,3 @@ ---- INFLECTOR_UNCOUNTABLE: 2: ryžiai 3: pinigai diff --git a/system/languages/nl.yaml b/system/languages/nl.yaml index 175fa7127..383f38cc3 100644 --- a/system/languages/nl.yaml +++ b/system/languages/nl.yaml @@ -1,4 +1,3 @@ ---- INFLECTOR_IRREGULAR: person: personen man: mensen diff --git a/system/languages/no.yaml b/system/languages/no.yaml index 8dc4e62db..41cd4b003 100644 --- a/system/languages/no.yaml +++ b/system/languages/no.yaml @@ -1,15 +1,14 @@ ---- FRONTMATTER_ERROR_PAGE: | --- Tittel: %1$s --- - + # Feilmelding: Ugyldig Frontmatter - + Pane: '%2$s' - + **%3$s ** - + ``` %4$s ``` diff --git a/system/languages/pl.yaml b/system/languages/pl.yaml index ba695db48..9aac0940c 100644 --- a/system/languages/pl.yaml +++ b/system/languages/pl.yaml @@ -1,15 +1,14 @@ ---- FRONTMATTER_ERROR_PAGE: | --- title: %1$s --- - + # Error: Nieprawidłowy Frontmatter - + Path: `%2$s` - + **%3$s** - + ``` %4$s ``` diff --git a/system/languages/pt.yaml b/system/languages/pt.yaml index fa24f2500..f108e992c 100644 --- a/system/languages/pt.yaml +++ b/system/languages/pt.yaml @@ -1,4 +1,3 @@ ---- INFLECTOR_UNCOUNTABLE: 1: informação 2: arroz diff --git a/system/languages/ro.yaml b/system/languages/ro.yaml index 371610590..a95fcde0b 100644 --- a/system/languages/ro.yaml +++ b/system/languages/ro.yaml @@ -1,4 +1,3 @@ ---- MONTHS_OF_THE_YEAR: 0: Ianuarie 1: Februarie diff --git a/system/languages/ru.yaml b/system/languages/ru.yaml index feac69428..6f7600c04 100644 --- a/system/languages/ru.yaml +++ b/system/languages/ru.yaml @@ -1,4 +1,3 @@ ---- INFLECTOR_IRREGULAR: person: люди man: человек diff --git a/system/languages/sk.yaml b/system/languages/sk.yaml deleted file mode 100644 index ed97d539c..000000000 --- a/system/languages/sk.yaml +++ /dev/null @@ -1 +0,0 @@ ---- diff --git a/system/languages/sv.yaml b/system/languages/sv.yaml index c5410b766..648167849 100644 --- a/system/languages/sv.yaml +++ b/system/languages/sv.yaml @@ -1,3 +1,2 @@ ---- NICETIME: DAY: dag diff --git a/system/languages/tr.yaml b/system/languages/tr.yaml index 9d8c5b062..28bb5c58b 100644 --- a/system/languages/tr.yaml +++ b/system/languages/tr.yaml @@ -1,4 +1,3 @@ ---- NICETIME: NO_DATE_PROVIDED: Tarih yok BAD_DATE: Yanlış tarih From 81e25e314b08957918e77e63174e4403ec1538d4 Mon Sep 17 00:00:00 2001 From: Matias Griese Date: Thu, 11 Feb 2016 20:55:48 +0200 Subject: [PATCH 09/12] Hide streams blueprint from admin --- system/blueprints/config/streams.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/system/blueprints/config/streams.yaml b/system/blueprints/config/streams.yaml index 636bed295..c73b80baf 100644 --- a/system/blueprints/config/streams.yaml +++ b/system/blueprints/config/streams.yaml @@ -2,6 +2,7 @@ title: PLUGIN_ADMIN.FILE_STREAMS form: validation: loose + hidden: true fields: schemes.xxx: type: array From 864f14344ea05d133149102a0ccd5ebba33b07e5 Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Thu, 11 Feb 2016 12:59:46 -0700 Subject: [PATCH 10/12] Add method to get contentMeta and initialize content if needed --- system/src/Grav/Common/Page/Page.php | 34 ++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/system/src/Grav/Common/Page/Page.php b/system/src/Grav/Common/Page/Page.php index 85573528b..b9b6db7b8 100644 --- a/system/src/Grav/Common/Page/Page.php +++ b/system/src/Grav/Common/Page/Page.php @@ -583,16 +583,50 @@ public function content($var = null) return $this->content; } + /** + * Get the contentMeta array and initialize content first if it's not already + * + * @return mixed + */ + public function contentMeta() + { + if ($this->content === null) { + $this->content(); + } + return $this->getContentMeta(); + } + + /** + * Add an entry to the page's contentMeta array + * + * @param $name + * @param $value + */ public function addContentMeta($name, $value) { $this->content_meta[$name] = $value; } + /** + * Return the whole contentMeta array as it currently stands + * + * @return mixed + */ public function getContentMeta() { return $this->content_meta; } + /** + * Sets the whole content meta array in one shot + * + * @param $content_meta + * @return mixed + */ + public function setContentMeta($content_meta) + { + return $this->content_meta = $content_meta; + } /** * Process the Markdown content. Uses Parsedown or Parsedown Extra depending on configuration From 0bd60d24b7df17c785a7f833fb50fc4bef5f555b Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Thu, 11 Feb 2016 15:28:57 -0700 Subject: [PATCH 11/12] updated libraries --- composer.lock | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/composer.lock b/composer.lock index c5c236f9f..5ff8b3311 100644 --- a/composer.lock +++ b/composer.lock @@ -675,16 +675,16 @@ }, { "name": "rockettheme/toolbox", - "version": "1.2.0", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/rockettheme/toolbox.git", - "reference": "0c7a3b4b6e4d73be8512e89f7acde6899334b7f2" + "reference": "22273dff75748eb1f51fcfa41fa85d8eff1f9f6c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/rockettheme/toolbox/zipball/0c7a3b4b6e4d73be8512e89f7acde6899334b7f2", - "reference": "0c7a3b4b6e4d73be8512e89f7acde6899334b7f2", + "url": "https://api.github.com/repos/rockettheme/toolbox/zipball/22273dff75748eb1f51fcfa41fa85d8eff1f9f6c", + "reference": "22273dff75748eb1f51fcfa41fa85d8eff1f9f6c", "shasum": "" }, "require": { @@ -720,7 +720,7 @@ "php", "rockettheme" ], - "time": "2015-11-24 17:04:24" + "time": "2016-02-11 19:08:48" }, { "name": "symfony/console", @@ -1137,16 +1137,16 @@ "packages-dev": [ { "name": "codeception/codeception", - "version": "2.1.5", + "version": "2.1.6", "source": { "type": "git", "url": "https://github.com/Codeception/Codeception.git", - "reference": "4ee562f421fd404139dd7b73ae46d075396a4baf" + "reference": "b199941f5e59d1e7fd32d78296c8ab98db873d89" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/Codeception/zipball/4ee562f421fd404139dd7b73ae46d075396a4baf", - "reference": "4ee562f421fd404139dd7b73ae46d075396a4baf", + "url": "https://api.github.com/repos/Codeception/Codeception/zipball/b199941f5e59d1e7fd32d78296c8ab98db873d89", + "reference": "b199941f5e59d1e7fd32d78296c8ab98db873d89", "shasum": "" }, "require": { @@ -1213,7 +1213,7 @@ "functional testing", "unit testing" ], - "time": "2015-12-20 12:11:42" + "time": "2016-02-09 22:27:48" }, { "name": "doctrine/instantiator", @@ -1886,16 +1886,16 @@ }, { "name": "phpunit/phpunit", - "version": "4.8.22", + "version": "4.8.23", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "dfb11aa5236376b4fc63853cf746af39fe780e72" + "reference": "6e351261f9cd33daf205a131a1ba61c6d33bd483" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/dfb11aa5236376b4fc63853cf746af39fe780e72", - "reference": "dfb11aa5236376b4fc63853cf746af39fe780e72", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/6e351261f9cd33daf205a131a1ba61c6d33bd483", + "reference": "6e351261f9cd33daf205a131a1ba61c6d33bd483", "shasum": "" }, "require": { @@ -1954,7 +1954,7 @@ "testing", "xunit" ], - "time": "2016-02-02 09:01:21" + "time": "2016-02-11 14:56:33" }, { "name": "phpunit/phpunit-mock-objects", From bf91d13222dfa9ca4413e19cf36dd561366d60ca Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Thu, 11 Feb 2016 15:37:14 -0700 Subject: [PATCH 12/12] version update --- CHANGELOG.md | 12 ++++++++++++ system/defines.php | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 93cee99ff..02d5c1927 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,15 @@ +# v1.0.10 +## 02/11/2016 + +1. [](#new) + * Added new `Page::contentMeta()` mechanism to store content-level meta data alongside content + * Added Japanese language translation +1. [](#improved) + * Updated some vendor libraries +1. [](#bugfix) + * Hide `streams` blueprint from Admin plugin + * Fix translations of languages with `---` in YAML files + # v1.0.9 ## 02/05/2016 diff --git a/system/defines.php b/system/defines.php index 8efc90724..a56126901 100644 --- a/system/defines.php +++ b/system/defines.php @@ -2,7 +2,7 @@ // Some standard defines define('GRAV', true); -define('GRAV_VERSION', '1.0.9'); +define('GRAV_VERSION', '1.0.10'); define('DS', '/'); define('GRAV_PHP_MIN', '5.5.9');