diff --git a/system/admin/admin.php b/system/admin/admin.php
index 00cc08d8..53785437 100644
--- a/system/admin/admin.php
+++ b/system/admin/admin.php
@@ -673,7 +673,6 @@ function get_feed($feed_url, $credit)
// Get recent posts by user
function get_user_posts()
{
- global $date_format;
if (isset($_SESSION[config("site.url")]['user'])) {
$posts = get_profile_posts($_SESSION[config("site.url")]['user'], 1, 5);
@@ -696,7 +695,7 @@ function get_user_posts()
$i++;
echo '
';
echo '' . $p->title . ' | ';
- echo '' . strftime($date_format, $p->date) . ' | ';
+ echo '' . date('d F Y', $p->date) . ' | ';
if (config("views.counter") == "true")
echo '' . $p->views . ' | ';
echo '' . $p->tag . ' | ';
diff --git a/system/admin/views/popular-posts.html.php b/system/admin/views/popular-posts.html.php
index e2828c1a..1206aa1d 100644
--- a/system/admin/views/popular-posts.html.php
+++ b/system/admin/views/popular-posts.html.php
@@ -24,7 +24,7 @@
?>
title ?> |
- date) ?> |
+ date) ?> |
views ?> |
author ?> |
diff --git a/system/admin/views/posts-list.html.php b/system/admin/views/posts-list.html.php
index a7132ecd..71ffcdc6 100644
--- a/system/admin/views/posts-list.html.php
+++ b/system/admin/views/posts-list.html.php
@@ -24,7 +24,7 @@
?>
title ?> |
- date) ?> |
+ date) ?> |
views ?> |
author ?> |
diff --git a/system/admin/views/user-draft.html.php b/system/admin/views/user-draft.html.php
index 0ef1a541..c91eadc7 100644
--- a/system/admin/views/user-draft.html.php
+++ b/system/admin/views/user-draft.html.php
@@ -22,7 +22,7 @@
?>
title ?> |
- date) ?> |
+ date) ?> |
tag) ?> |
|
diff --git a/system/includes/functions.php b/system/includes/functions.php
index d9f1a856..12371115 100644
--- a/system/includes/functions.php
+++ b/system/includes/functions.php
@@ -3215,7 +3215,7 @@ function get_language()
setlocale(LC_ALL, 'en_US'); // Change time format to English
} else {
if (file_exists($langFile)) {
- i18n('source', 'lang/' . $langID . '.ini');
+ i18n('source', $langFile);
setlocale(LC_ALL, $local);
} else {
i18n('source', 'lang/en.ini'); // Load the English language file
@@ -3224,3 +3224,16 @@ function get_language()
}
}
+
+function format_date($date)
+{
+
+ $date_format = config('date.format');
+
+ if (!isset($date_format) || empty($date_format)) {
+ return date('d F Y', $date);
+ } else {
+ return date($date_format, $date);
+ }
+
+}
diff --git a/themes/twentyfifteen/profile.html.php b/themes/twentyfifteen/profile.html.php
index fa66c884..937e0030 100644
--- a/themes/twentyfifteen/profile.html.php
+++ b/themes/twentyfifteen/profile.html.php
@@ -19,7 +19,7 @@
$i++; ?>
title ?> on
- date) ?> - tag ?>
+ date) ?> - tag ?>
diff --git a/themes/twentysixteen/main.html.php b/themes/twentysixteen/main.html.php
index bb1d4f1a..4e31d93d 100644
--- a/themes/twentysixteen/main.html.php
+++ b/themes/twentysixteen/main.html.php
@@ -50,7 +50,7 @@