Skip to content

Commit

Permalink
Merge branch 'release/1.0.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Dec 19, 2015
2 parents f1fd89c + 331898d commit 261001e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# v1.0.2
## 12/18/2015

1. [](#bugfix)
* Fixed issue with user edit page causing error due to individual language files

# v1.0.1
## 12/18/2015

Expand Down
2 changes: 1 addition & 1 deletion blueprints.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Admin Panel
version: 1.0.1
version: 1.0.2
description: Adds an advanced administration panel to manage your site
icon: empire
author:
Expand Down
14 changes: 12 additions & 2 deletions classes/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -689,9 +689,19 @@ public function getPage($path)
public static function adminLanguages()
{
$languages = [];
$lang_data = Yaml::parse(file_get_contents(__DIR__ . '/../languages.yaml'));
foreach ($lang_data as $lang => $values) {

$path = Grav::instance()['locator']->findResource('plugins://admin/languages');

/** @var \DirectoryIterator $directory */
foreach (new \DirectoryIterator($path) as $file) {
if ($file->isDir() || $file->isDot()) {
continue;
}

$lang = basename($file->getBasename(), '.yaml');

$languages[$lang] = LanguageCodes::getNativeName($lang);

}
return $languages;
}
Expand Down

0 comments on commit 261001e

Please sign in to comment.