From 9ce2492ade82430bb0b0693b91ea5c4007bb2b7b Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Sun, 24 Sep 2017 01:17:37 +0200 Subject: [PATCH] Bug fixes on dashboard --- bl-kernel/admin/views/dashboard.php | 2 +- bl-kernel/admin/views/pages.php | 2 +- bl-kernel/admin/views/settings-advanced.php | 4 ++-- bl-kernel/dbpages.class.php | 5 +++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/bl-kernel/admin/views/dashboard.php b/bl-kernel/admin/views/dashboard.php index 0bfb0673..92ea58b5 100644 --- a/bl-kernel/admin/views/dashboard.php +++ b/bl-kernel/admin/views/dashboard.php @@ -146,7 +146,7 @@ echo '
  • '.$Language->g('There are no draft pages').'
  • '; } else { - $keys = array_keys($scheduledPages); + $keys = array_keys($draftPages); foreach($keys as $key) { $page = buildPage($key); echo '
  • '.($page->title()?$page->title():'['.$Language->g('Empty title').'] ').'
  • '; diff --git a/bl-kernel/admin/views/pages.php b/bl-kernel/admin/views/pages.php index 8d6b41c1..04df7378 100644 --- a/bl-kernel/admin/views/pages.php +++ b/bl-kernel/admin/views/pages.php @@ -40,7 +40,7 @@ function table($status, $icon='arrow-circle-o-down') { if (!empty($list)) { echo ' - '.$status.' + '.$Language->g($status).' '; diff --git a/bl-kernel/admin/views/settings-advanced.php b/bl-kernel/admin/views/settings-advanced.php index 110f7ce6..5da7a3da 100644 --- a/bl-kernel/admin/views/settings-advanced.php +++ b/bl-kernel/admin/views/settings-advanced.php @@ -32,7 +32,7 @@ HTML::formOpen(array('class'=>'uk-form-horizontal')); HTML::formSelect(array( 'name'=>'homepage', - 'label'=>$L->g('Home page'), + 'label'=>$L->g('Homepage'), 'options'=>$homepageOptions, 'selected'=>$Site->homepage(), 'class'=>'uk-width-1-3 uk-form-medium', @@ -55,7 +55,7 @@ HTML::formOpen(array('class'=>'uk-form-horizontal')); HTML::formSelect(array( 'name'=>'orderBy', 'label'=>$L->g('Order content By'), - 'options'=>array('date'=>'Date','position'=>'Position'), + 'options'=>array('date'=>$L->g('Date'),'position'=>$L->g('Position')), 'selected'=>$Site->orderBy(), 'class'=>'uk-width-1-3 uk-form-medium', 'tip'=>$L->g('Order the content by position to build a Website') diff --git a/bl-kernel/dbpages.class.php b/bl-kernel/dbpages.class.php index 4d859918..b8413a87 100644 --- a/bl-kernel/dbpages.class.php +++ b/bl-kernel/dbpages.class.php @@ -285,11 +285,12 @@ class dbPages extends dbJSON public function getStaticDB() { $tmp = $this->db; - foreach($tmp as $key=>$fields) { - if($fields['status']!='static') { + foreach ($tmp as $key=>$fields) { + if ($fields['status']!='static') { unset($tmp[$key]); } } + uasort($tmp, array($this, 'sortByPositionLowToHigh')); return $tmp; }