From db5c02e731df3c32fa44278b5d3b2140abeae633 Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Wed, 20 Dec 2017 20:37:17 +0100 Subject: [PATCH] Minor changes --- bl-kernel/admin/views/dashboard.php | 44 ++++++++++++++++++----------- bl-kernel/functions.php | 10 +++++++ 2 files changed, 37 insertions(+), 17 deletions(-) diff --git a/bl-kernel/admin/views/dashboard.php b/bl-kernel/admin/views/dashboard.php index 76360a47..ec53cc4c 100644 --- a/bl-kernel/admin/views/dashboard.php +++ b/bl-kernel/admin/views/dashboard.php @@ -98,24 +98,15 @@
-
-

p('Scheduled content') ?>

-
    - getScheduledDB(); - if( empty($scheduledPages) ) { - echo '
  • '.$Language->g('There are no scheduled content').'
  • '; - } - else { - $keys = array_keys($scheduledPages); - foreach($keys as $key) { - $page = buildPage($key); - echo '
  • '.$page->dateRaw(SCHEDULED_DATE_FORMAT).''.($page->title()?$page->title():'['.$Language->g('Empty title').'] ').'
  • '; - } - } + '; + echo '

    '.$SimpleStats->getValue('label').'

    '; + echo $SimpleStats->dashboard(); + echo '
'; + } ?> - -
+

p('Statistics') ?>

@@ -140,6 +131,25 @@
+
+

p('Scheduled content') ?>

+
    + getScheduledDB(); + if( empty($scheduledPages) ) { + echo '
  • '.$Language->g('There are no scheduled content').'
  • '; + } + else { + $keys = array_keys($scheduledPages); + foreach($keys as $key) { + $page = buildPage($key); + echo '
  • '.$page->dateRaw(SCHEDULED_DATE_FORMAT).''.($page->title()?$page->title():'['.$Language->g('Empty title').'] ').'
  • '; + } + } + ?> +
+
+

p('Draft content') ?>

    diff --git a/bl-kernel/functions.php b/bl-kernel/functions.php index 3d07b8ed..e1441a98 100644 --- a/bl-kernel/functions.php +++ b/bl-kernel/functions.php @@ -251,6 +251,16 @@ function buildAllpages($publishedPages=true, $staticPages=true, $draftPages=true return $tmp; } +function getPlugin($pluginName) { + global $plugins; + + if (pluginEnabled($pluginName)) { + $pluginClass = 'plugin'.Text::firstCharUp($pluginName); + return $plugins['all'][$pluginClass]; + } + return false; +} + // Returns TRUE if the plugin is enabled, FALSE otherwise function pluginEnabled($pluginName) { global $plugins;