Skip to content

Commit 08cbd95

Browse files
committed
Merge branch 'release/1.0.5'
2 parents 747daa4 + dcaa9a3 commit 08cbd95

File tree

16 files changed

+257
-21
lines changed

16 files changed

+257
-21
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,10 @@ env:
4040
- 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)
4141

4242
before_install:
43+
- export TZ=Pacific/Honolulu
4344
- composer self-update
4445
- go get github.com/aktau/github-release
46+
- echo "Travis Date: `date`"
4547
- git clone --quiet --depth=50 --branch=master https://${BB_TOKEN}bitbucket.org/rockettheme/grav-devtools.git $RT_DEVTOOLS &>/dev/null;
4648
- if [ ! -z "$TRAVIS_TAG" ]; then
4749
cd "${RT_DEVTOOLS}";

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
# v1.0.5
2+
## 12/18/2015
3+
4+
1. [](#new)
5+
* Add ability to extend markdown with plugins
6+
* Added support for plugins to have individual language files
7+
* Added `7z` to media formats
8+
* Use Grav's fork of Parsedown until PR is merged
9+
* New function to persist plugin configuration to disk
10+
* GPM `selfupgrade` will now check PHP version requirements
11+
1. [](#improved)
12+
* If the field allows multiple files, return array
13+
* Handle non-array values in file validation
14+
1. [](#bugfix)
15+
* Fix when looping `fields` param in a `list` field
16+
* Properly convert commas to spaces for media attributes
17+
* Forcing Travis VM to HI timezone to address future files in zip file
18+
119
# v1.0.4
220
## 12/12/2015
321

composer.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"require": {
99
"php": ">=5.4.0",
1010
"twig/twig": "~1.23",
11+
"erusev/parsedown": "dev-master as 1.6.0",
1112
"erusev/parsedown-extra": "~0.7",
1213
"symfony/yaml": "~2.8",
1314
"symfony/console": "~2.8",
@@ -25,6 +26,12 @@
2526
"rockettheme/toolbox": "~1.2",
2627
"maximebf/debugbar": "~1.10"
2728
},
29+
"repositories": [
30+
{
31+
"type": "vcs",
32+
"url": "https://github.com/getgrav/parsedown"
33+
}
34+
],
2835
"autoload": {
2936
"psr-4": {
3037
"Grav\\": "system/src/Grav"

composer.lock

Lines changed: 22 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

system/config/media.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,10 @@ zip:
168168
type: file
169169
thumb: media/thumb-zip.png
170170
mime: application/zip
171+
7z:
172+
type: file
173+
thumb: media/thumb-7zip.png
174+
mime: application/x-7z-compressed
171175
gz:
172176
type: file
173177
thumb: media/thumb-gz.png

system/defines.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
// Some standard defines
44
define('GRAV', true);
5-
define('GRAV_VERSION', '1.0.4');
5+
define('GRAV_VERSION', '1.0.5');
66
define('DS', '/');
7+
define('GRAV_PHP_MIN', '5.5.9');
78

89
// Directories and Paths
910
if (!defined('GRAV_ROOT')) {

system/src/Grav/Common/Assets.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ public function init()
186186
$this->base_url = $base_url . '/';
187187

188188
// Register any preconfigured collections
189-
foreach ($config->get('system.assets.collections') as $name => $collection) {
189+
foreach ($config->get('system.assets.collections', []) as $name => $collection) {
190190
$this->registerCollection($name, (array)$collection);
191191
}
192192
}

system/src/Grav/Common/Data/Blueprint.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,10 @@ protected function parseFormFields(array &$fields, $params, $prefix, array &$cur
338338

339339
if ($field['type'] === 'list') {
340340
// we loop through list to get the actual field
341-
foreach($field['fields'] as $subName => &$subField) {
342-
$this->parseFormField($subField);
341+
if (isset($field['fields']) && $field['fields']) {
342+
foreach($field['fields'] as $subName => &$subField) {
343+
$this->parseFormField($subField);
344+
}
343345
}
344346
} else {
345347
$this->parseFormField($field);

system/src/Grav/Common/Data/Validation.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,15 @@ public static function typeFile($value, array $params, array $field)
283283

284284
protected static function filterFile($value, array $params, array $field)
285285
{
286-
return (array) $value;
286+
if ($field['multiple'] == true) {
287+
return (array) $value;
288+
}
289+
290+
if (is_array($value)) {
291+
return reset($value);
292+
}
293+
294+
return $value;
287295
}
288296

289297
/**

system/src/Grav/Common/GPM/Installer.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,10 @@ public static function lastErrorMsg()
281281
{
282282
$msg = 'Unknown Error';
283283

284+
if (is_string(self::$error)) {
285+
return self::$error;
286+
}
287+
284288
switch (self::$error) {
285289
case 0:
286290
$msg = 'No Error';
@@ -333,7 +337,7 @@ public static function lastErrorCode()
333337

334338
/**
335339
* Allows to manually set an error
336-
* @param $error the Error code
340+
* @param int|string $error the Error code
337341
*/
338342

339343
public static function setError($error)

0 commit comments

Comments
 (0)