Skip to content

Commit

Permalink
Merge branch 'release/1.4.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Jul 13, 2018
2 parents 5435ee6 + a5e97ef commit 24edf15
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 11 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# v1.4.7
## 07/13/2018

1. [](#improved)
* Use `getFilename` instead of `getBasename` [#2087](https://github.com/getgrav/grav/issues/2087)
1. [](#bugfix)
* Fix for modular page preview [#2066](https://github.com/getgrav/grav/issues/2066)
* `Page::routeCanonical()` should be string not array [#2069](https://github.com/getgrav/grav/issues/2069)

# v1.4.6
## 06/20/2018

Expand Down
2 changes: 1 addition & 1 deletion system/defines.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

// Some standard defines
define('GRAV', true);
define('GRAV_VERSION', '1.4.6');
define('GRAV_VERSION', '1.4.7');
define('GRAV_TESTING', false);
define('DS', '/');

Expand Down
2 changes: 1 addition & 1 deletion system/src/Grav/Common/Config/ConfigFileFinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ protected function detectInFolder($folder, $lookup = null)
continue;
}

$name = $directory->getBasename();
$name = $directory->getFilename();
$find = ($lookup ?: $name) . '.yaml';
$filename = "{$path}/{$name}/{$find}";

Expand Down
6 changes: 3 additions & 3 deletions system/src/Grav/Common/GPM/Installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -296,17 +296,17 @@ public static function sophisticatedInstall($source_path, $install_path, $ignore
{
foreach (new \DirectoryIterator($source_path) as $file) {

if ($file->isLink() || $file->isDot() || in_array($file->getBasename(),$ignores)) {
if ($file->isLink() || $file->isDot() || in_array($file->getFilename(), $ignores)) {
continue;
}

$path = $install_path . DS . $file->getBasename();
$path = $install_path . DS . $file->getFilename();

if ($file->isDir()) {
Folder::delete($path);
Folder::move($file->getPathname(), $path);

if ($file->getBasename() == 'bin') {
if ($file->getFilename() === 'bin') {
foreach (glob($path . DS . '*') as $bin_file) {
@chmod($bin_file, 0755);
}
Expand Down
2 changes: 1 addition & 1 deletion system/src/Grav/Common/Page/Media.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ protected function init()
/** @var \DirectoryIterator $info */
foreach ($iterator as $path => $info) {
// Ignore folders and Markdown files.
if (!$info->isFile() || $info->getExtension() === 'md' || $info->getBasename()[0] === '.') {
if (!$info->isFile() || $info->getExtension() === 'md' || $info->getFilename()[0] === '.') {
continue;
}

Expand Down
2 changes: 1 addition & 1 deletion system/src/Grav/Common/Page/Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -1790,7 +1790,7 @@ public function routeAliases($var = null)
public function routeCanonical($var = null)
{
if ($var !== null) {
$this->routes['canonical'] = (array)$var;
$this->routes['canonical'] = $var;
}

if (!empty($this->routes) && isset($this->routes['canonical'])) {
Expand Down
2 changes: 1 addition & 1 deletion system/src/Grav/Common/Page/Pages.php
Original file line number Diff line number Diff line change
Expand Up @@ -1041,7 +1041,7 @@ function ($str) {
}

// Ignore all files in ignore list.
if (\in_array($file->getBasename(), $this->ignore_files, true)) {
if (\in_array($filename, $this->ignore_files, true)) {
continue;
}

Expand Down
2 changes: 1 addition & 1 deletion system/src/Grav/Common/Plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function __construct()
if (!$directory->isDir()) {
continue;
}
$plugins[] = $directory->getBasename();
$plugins[] = $directory->getFilename();
}

natsort($plugins);
Expand Down
2 changes: 1 addition & 1 deletion system/src/Grav/Common/Themes.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function all()
continue;
}

$theme = $directory->getBasename();
$theme = $directory->getFilename();
$result = self::get($theme);

if ($result) {
Expand Down
2 changes: 1 addition & 1 deletion system/src/Grav/Common/Twig/Twig.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ public function processPage(Page $item, $content = null)
// Process Modular Twig
if ($item->modularTwig()) {
$twig_vars['content'] = $content;
$extension = $this->grav['uri']->extension();
$extension = $item->templateFormat();
$extension = $extension ? ".{$extension}.twig" : TEMPLATE_EXT;
$template = $item->template() . $extension;
$output = $content = $local_twig->render($template, $twig_vars);
Expand Down

0 comments on commit 24edf15

Please sign in to comment.