diff --git a/bl-kernel/admin/controllers/about.php b/bl-kernel/admin/controllers/about.php index cac5222a..0952dfa0 100644 --- a/bl-kernel/admin/controllers/about.php +++ b/bl-kernel/admin/controllers/about.php @@ -1,4 +1,4 @@ g('About') . ' - ' . $layout['title']; \ No newline at end of file +$layout['title'] = $language->g('About') . ' - ' . $layout['title']; \ No newline at end of file diff --git a/bl-kernel/admin/controllers/categories.php b/bl-kernel/admin/controllers/categories.php index 0fef0285..60facd80 100644 --- a/bl-kernel/admin/controllers/categories.php +++ b/bl-kernel/admin/controllers/categories.php @@ -23,4 +23,4 @@ checkRole(array('admin')); // ============================================================================ // Title of the page -$layout['title'] .= ' - '.$Language->g('Categories'); \ No newline at end of file +$layout['title'] .= ' - '.$language->g('Categories'); \ No newline at end of file diff --git a/bl-kernel/admin/controllers/configure-plugin.php b/bl-kernel/admin/controllers/configure-plugin.php index 6b22ef20..3cc69501 100644 --- a/bl-kernel/admin/controllers/configure-plugin.php +++ b/bl-kernel/admin/controllers/configure-plugin.php @@ -41,10 +41,10 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { // Call the method post of the plugin if ($plugin->post()) { - Alert::set( $Language->g('The changes have been saved') ); + Alert::set( $language->g('The changes have been saved') ); Redirect::page('configure-plugin/'.$plugin->className()); } else { - Alert::set( $Language->g('Complete all fields') ); + Alert::set( $language->g('Complete all fields') ); } } @@ -53,4 +53,4 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { // ============================================================================ // Title of the page -$layout['title'] = $Language->g('Plugin').' - '.$plugin->name().' - '.$layout['title']; \ No newline at end of file +$layout['title'] = $language->g('Plugin').' - '.$plugin->name().' - '.$layout['title']; \ No newline at end of file diff --git a/bl-kernel/admin/controllers/content.php b/bl-kernel/admin/controllers/content.php index fb44a492..4690e4fd 100644 --- a/bl-kernel/admin/controllers/content.php +++ b/bl-kernel/admin/controllers/content.php @@ -39,4 +39,4 @@ $static = $pages->getStaticDB(true); $sticky = $pages->getStickyDB(true); // Title of the page -$layout['title'] .= ' - '.$Language->g('Manage content'); \ No newline at end of file +$layout['title'] .= ' - '.$language->g('Manage content'); \ No newline at end of file diff --git a/bl-kernel/admin/controllers/dashboard.php b/bl-kernel/admin/controllers/dashboard.php index 75ed0e68..04da6450 100644 --- a/bl-kernel/admin/controllers/dashboard.php +++ b/bl-kernel/admin/controllers/dashboard.php @@ -36,4 +36,4 @@ function updateBludit() { updateBludit(); // Title of the page -$layout['title'] .= ' - '.$Language->g('Dashboard'); \ No newline at end of file +$layout['title'] .= ' - '.$language->g('Dashboard'); \ No newline at end of file diff --git a/bl-kernel/admin/controllers/developers.php b/bl-kernel/admin/controllers/developers.php index 9eaa7be8..f27918bb 100644 --- a/bl-kernel/admin/controllers/developers.php +++ b/bl-kernel/admin/controllers/developers.php @@ -48,4 +48,4 @@ function printTable($title, $array) { // Main after POST // ============================================================================ -$layout['title'] .= ' - '.$Language->g('Developers'); \ No newline at end of file +$layout['title'] .= ' - '.$language->g('Developers'); \ No newline at end of file diff --git a/bl-kernel/admin/controllers/edit-category.php b/bl-kernel/admin/controllers/edit-category.php index ed1e21ee..842e0b56 100644 --- a/bl-kernel/admin/controllers/edit-category.php +++ b/bl-kernel/admin/controllers/edit-category.php @@ -41,4 +41,4 @@ if (!$categories->exists($categoryKey)) { $categoryMap = $categories->getMap($categoryKey); // Title of the page -$layout['title'] .= ' - '.$Language->g('Edit Category').' [ '.$categoryMap['name'] . ' ] '; \ No newline at end of file +$layout['title'] .= ' - '.$language->g('Edit Category').' [ '.$categoryMap['name'] . ' ] '; \ No newline at end of file diff --git a/bl-kernel/admin/controllers/edit-content.php b/bl-kernel/admin/controllers/edit-content.php index 2de998f8..1caaeca5 100644 --- a/bl-kernel/admin/controllers/edit-content.php +++ b/bl-kernel/admin/controllers/edit-content.php @@ -9,7 +9,7 @@ if (!checkRole(array('admin','editor'), false)) { $pageKey = isset($_POST['key']) ? $_POST['key'] : $layout['parameters']; $page = new Page($pageKey); } catch (Exception $e) { - Alert::set($Language->g('You do not have sufficient permissions')); + Alert::set($language->g('You do not have sufficient permissions')); Redirect::page('dashboard'); } @@ -20,7 +20,7 @@ if (!checkRole(array('admin','editor'), false)) { 'notes'=>$login->username() )); - Alert::set($Language->g('You do not have sufficient permissions')); + Alert::set($language->g('You do not have sufficient permissions')); Redirect::page('dashboard'); } } @@ -40,7 +40,7 @@ if (!checkRole(array('admin','editor'), false)) { if ($_SERVER['REQUEST_METHOD'] == 'POST') { if ($_POST['type']==='delete') { if (deletePage($_POST['key'])) { - Alert::set( $Language->g('The changes have been saved') ); + Alert::set( $language->g('The changes have been saved') ); } } else { // If the checkbox is not selected the form doesn't send the field @@ -50,7 +50,7 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { $key = editPage($_POST); if ($key!==false) { - Alert::set( $Language->g('The changes have been saved') ); + Alert::set( $language->g('The changes have been saved') ); Redirect::page('edit-content/'.$key); } } @@ -70,4 +70,4 @@ try { } // Title of the page -$layout['title'] .= ' - '.$Language->g('Edit content').' - '.$page->title(); \ No newline at end of file +$layout['title'] .= ' - '.$language->g('Edit content').' - '.$page->title(); \ No newline at end of file diff --git a/bl-kernel/admin/controllers/edit-user.php b/bl-kernel/admin/controllers/edit-user.php index 910c75dd..c2ffb32c 100644 --- a/bl-kernel/admin/controllers/edit-user.php +++ b/bl-kernel/admin/controllers/edit-user.php @@ -31,7 +31,7 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { editUser($_POST); } - Alert::set($Language->g('The changes have been saved')); + Alert::set($language->g('The changes have been saved')); Redirect::page('users'); } @@ -53,4 +53,4 @@ try { } // Title of the page -$layout['title'] = $Language->g('Edit user').' - '.$layout['title']; \ No newline at end of file +$layout['title'] = $language->g('Edit user').' - '.$layout['title']; \ No newline at end of file diff --git a/bl-kernel/admin/controllers/install-theme.php b/bl-kernel/admin/controllers/install-theme.php index aa70e330..6fa573ab 100644 --- a/bl-kernel/admin/controllers/install-theme.php +++ b/bl-kernel/admin/controllers/install-theme.php @@ -33,7 +33,7 @@ if (Sanitize::pathFile(PATH_THEMES.$themeDirname)) { )); // Create an alert - Alert::set( $Language->g('The changes have been saved') ); + Alert::set( $language->g('The changes have been saved') ); } // Redirect diff --git a/bl-kernel/admin/controllers/login.php b/bl-kernel/admin/controllers/login.php index 66ce83e1..ff2b2e8f 100644 --- a/bl-kernel/admin/controllers/login.php +++ b/bl-kernel/admin/controllers/login.php @@ -12,10 +12,10 @@ function checkLogin($args) { global $security; global $login; - global $Language; + global $language; if ($security->isBlocked()) { - Alert::set($Language->g('IP address has been blocked').'
'.$Language->g('Try again in a few minutes'), ALERT_STATUS_FAIL); + Alert::set($language->g('IP address has been blocked').'
'.$language->g('Try again in a few minutes'), ALERT_STATUS_FAIL); return false; } @@ -40,7 +40,7 @@ function checkLogin($args) $security->addToBlacklist(); // Create alert - Alert::set($Language->g('Username or password incorrect'), ALERT_STATUS_FAIL); + Alert::set($language->g('Username or password incorrect'), ALERT_STATUS_FAIL); return false; } diff --git a/bl-kernel/admin/controllers/new-category.php b/bl-kernel/admin/controllers/new-category.php index 725a2760..5151cee6 100644 --- a/bl-kernel/admin/controllers/new-category.php +++ b/bl-kernel/admin/controllers/new-category.php @@ -29,4 +29,4 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { // ============================================================================ // Title of the page -$layout['title'] .= ' - '.$Language->g('New category'); \ No newline at end of file +$layout['title'] .= ' - '.$language->g('New category'); \ No newline at end of file diff --git a/bl-kernel/admin/controllers/new-content.php b/bl-kernel/admin/controllers/new-content.php index 69572720..92edd450 100644 --- a/bl-kernel/admin/controllers/new-content.php +++ b/bl-kernel/admin/controllers/new-content.php @@ -33,4 +33,4 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { // ============================================================================ // Title of the page -$layout['title'] = $Language->g('New content').' - '.$layout['title']; \ No newline at end of file +$layout['title'] = $language->g('New content').' - '.$layout['title']; \ No newline at end of file diff --git a/bl-kernel/admin/controllers/new-user.php b/bl-kernel/admin/controllers/new-user.php index df2b76f5..ea52e1b3 100644 --- a/bl-kernel/admin/controllers/new-user.php +++ b/bl-kernel/admin/controllers/new-user.php @@ -29,4 +29,4 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { // ============================================================================ // Title of the page -$layout['title'] .= ' - '.$Language->g('Add a new user'); \ No newline at end of file +$layout['title'] .= ' - '.$language->g('Add a new user'); \ No newline at end of file diff --git a/bl-kernel/admin/controllers/plugins-position.php b/bl-kernel/admin/controllers/plugins-position.php index cbc12b5d..3d914421 100644 --- a/bl-kernel/admin/controllers/plugins-position.php +++ b/bl-kernel/admin/controllers/plugins-position.php @@ -26,4 +26,4 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { // ============================================================================ // Title of the page -$layout['title'] .= ' - '.$Language->g('Plugins'); \ No newline at end of file +$layout['title'] .= ' - '.$language->g('Plugins'); \ No newline at end of file diff --git a/bl-kernel/admin/controllers/plugins.php b/bl-kernel/admin/controllers/plugins.php index e9450ef3..8cea2044 100644 --- a/bl-kernel/admin/controllers/plugins.php +++ b/bl-kernel/admin/controllers/plugins.php @@ -23,4 +23,4 @@ checkRole(array('admin')); // ============================================================================ // Title of the page -$layout['title'] .= ' - '.$Language->g('Plugins'); \ No newline at end of file +$layout['title'] .= ' - '.$language->g('Plugins'); \ No newline at end of file diff --git a/bl-kernel/admin/controllers/settings-general.php b/bl-kernel/admin/controllers/settings-general.php index 83f84682..e3e13e45 100644 --- a/bl-kernel/admin/controllers/settings-general.php +++ b/bl-kernel/admin/controllers/settings-general.php @@ -28,4 +28,4 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { // ============================================================================ // Title of the page -$layout['title'] .= ' - '.$Language->g('General Settings'); \ No newline at end of file +$layout['title'] .= ' - '.$language->g('General Settings'); \ No newline at end of file diff --git a/bl-kernel/admin/controllers/settings-regional.php b/bl-kernel/admin/controllers/settings-regional.php index 24c66eae..7767fb80 100644 --- a/bl-kernel/admin/controllers/settings-regional.php +++ b/bl-kernel/admin/controllers/settings-regional.php @@ -28,4 +28,4 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { // ============================================================================ // Title of the page -$layout['title'] .= ' - '.$Language->g('Language and timezone'); \ No newline at end of file +$layout['title'] .= ' - '.$language->g('Language and timezone'); \ No newline at end of file diff --git a/bl-kernel/admin/controllers/settings.php b/bl-kernel/admin/controllers/settings.php index 94b2f289..0da3a3c5 100644 --- a/bl-kernel/admin/controllers/settings.php +++ b/bl-kernel/admin/controllers/settings.php @@ -28,4 +28,4 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { // ============================================================================ // Title of the page -$layout['title'] .= ' - '.$Language->g('Advanced Settings'); \ No newline at end of file +$layout['title'] .= ' - '.$language->g('Advanced Settings'); \ No newline at end of file diff --git a/bl-kernel/admin/controllers/themes.php b/bl-kernel/admin/controllers/themes.php index b8147818..b7892759 100644 --- a/bl-kernel/admin/controllers/themes.php +++ b/bl-kernel/admin/controllers/themes.php @@ -21,4 +21,4 @@ checkRole(array('admin')); $themes = buildThemes(); // Title of the page -$layout['title'] .= ' - '.$Language->g('Themes'); \ No newline at end of file +$layout['title'] .= ' - '.$language->g('Themes'); \ No newline at end of file diff --git a/bl-kernel/admin/controllers/user-password.php b/bl-kernel/admin/controllers/user-password.php index 87689e85..ed93e187 100644 --- a/bl-kernel/admin/controllers/user-password.php +++ b/bl-kernel/admin/controllers/user-password.php @@ -41,4 +41,4 @@ try { } // Title of the page -$layout['title'] = $Language->g('Change password').' - '.$layout['title']; \ No newline at end of file +$layout['title'] = $language->g('Change password').' - '.$layout['title']; \ No newline at end of file diff --git a/bl-kernel/admin/controllers/users.php b/bl-kernel/admin/controllers/users.php index 7ebb9a25..b22cebf6 100644 --- a/bl-kernel/admin/controllers/users.php +++ b/bl-kernel/admin/controllers/users.php @@ -28,4 +28,4 @@ if( $_SERVER['REQUEST_METHOD'] == 'POST' ) // ============================================================================ // Title of the page -$layout['title'] .= ' - '.$Language->g('Users'); \ No newline at end of file +$layout['title'] .= ' - '.$language->g('Users'); \ No newline at end of file diff --git a/bl-kernel/admin/views/content.php b/bl-kernel/admin/views/content.php index df50249c..2d0f8134 100644 --- a/bl-kernel/admin/views/content.php +++ b/bl-kernel/admin/views/content.php @@ -4,7 +4,7 @@ echo Bootstrap::pageTitle(array('title'=>$L->g('Content'), 'icon'=>'layers')); function table($type) { global $url; - global $Language; + global $language; global $published; global $drafts; global $scheduled; @@ -15,7 +15,7 @@ function table($type) { $list = $published; if (empty($list)) { echo '

'; - echo $Language->g('There are no pages at this moment.'); + echo $language->g('There are no pages at this moment.'); echo '

'; return false; } @@ -23,7 +23,7 @@ function table($type) { $list = $drafts; if (empty($list)) { echo '

'; - echo $Language->g('There are no draft pages at this moment.'); + echo $language->g('There are no draft pages at this moment.'); echo '

'; return false; } @@ -31,7 +31,7 @@ function table($type) { $list = $scheduled; if (empty($list)) { echo '

'; - echo $Language->g('There are no scheduled pages at this moment.'); + echo $language->g('There are no scheduled pages at this moment.'); echo '

'; return false; } @@ -39,7 +39,7 @@ function table($type) { $list = $static; if (empty($list)) { echo '

'; - echo $Language->g('There are no static pages at this moment.'); + echo $language->g('There are no static pages at this moment.'); echo '

'; return false; } @@ -47,7 +47,7 @@ function table($type) { $list = $sticky; if (empty($list)) { echo '

'; - echo $Language->g('There are no sticky pages at this moment.'); + echo $language->g('There are no sticky pages at this moment.'); echo '

'; return false; } @@ -57,8 +57,8 @@ function table($type) { - - + + @@ -73,7 +73,7 @@ function table($type) { echo ''; @@ -89,7 +89,7 @@ function table($type) { echo ''; @@ -114,7 +114,7 @@ function table($type) { echo '
'.$Language->g('Title').''.$Language->g('URL').''.$language->g('Title').''.$language->g('URL').' Actions
' - .($page->title()?$page->title():''.$Language->g('Empty title').' ') + .($page->title()?$page->title():''.$language->g('Empty title').' ') .'
' - .($child->title()?$child->title():''.$Language->g('Empty title').' ') + .($child->title()?$child->title():''.$language->g('Empty title').' ') .'
' - .($page->title()?$page->title():''.$Language->g('Empty title').' ') + .($page->title()?$page->title():''.$language->g('Empty title').' ') .'
@@ -175,22 +175,22 @@ function table($type) {
  • - get('First'); ?> + get('First'); ?>
  • - get('Previous'); ?> + get('Previous'); ?>
  • - get('Next'); ?> + get('Next'); ?>
  • - get('Last'); ?> + get('Last'); ?>
  • diff --git a/bl-kernel/admin/views/edit-content.php b/bl-kernel/admin/views/edit-content.php index d6309532..432c9888 100644 --- a/bl-kernel/admin/views/edit-content.php +++ b/bl-kernel/admin/views/edit-content.php @@ -344,7 +344,7 @@ 'class'=>'', 'value'=>$page->description(), 'rows'=>3, - 'placeholder'=>$Language->get('this-field-can-help-describe-the-content') + 'placeholder'=>$language->get('this-field-can-help-describe-the-content') )); ?>
    diff --git a/bl-kernel/admin/views/edit-user.php b/bl-kernel/admin/views/edit-user.php index 56c35adf..30fa3e69 100644 --- a/bl-kernel/admin/views/edit-user.php +++ b/bl-kernel/admin/views/edit-user.php @@ -229,13 +229,13 @@ echo ' $(document).ready(function() { $("#jsdeleteUserAndDeleteContent").click(function() { - if(confirm("p('Confirm delete this action cannot be undone') ?>")==false) { + if(confirm("p('Confirm delete this action cannot be undone') ?>")==false) { return false; } }); $("#jsdeleteUserAndKeepContent").click(function() { - if(confirm("p('Confirm delete this action cannot be undone') ?>")==false) { + if(confirm("p('Confirm delete this action cannot be undone') ?>")==false) { return false; } }); diff --git a/bl-kernel/admin/views/new-content.php b/bl-kernel/admin/views/new-content.php index 1d2d35e5..57d5d8d8 100644 --- a/bl-kernel/admin/views/new-content.php +++ b/bl-kernel/admin/views/new-content.php @@ -278,7 +278,7 @@ 'class'=>'', 'value'=>'', 'rows'=>3, - 'placeholder'=>$Language->get('this-field-can-help-describe-the-content') + 'placeholder'=>$language->get('this-field-can-help-describe-the-content') )); ?> diff --git a/bl-kernel/admin/views/settings.php b/bl-kernel/admin/views/settings.php index ab75e71d..6c6813d5 100644 --- a/bl-kernel/admin/views/settings.php +++ b/bl-kernel/admin/views/settings.php @@ -366,7 +366,7 @@ echo Bootstrap::pageTitle(array('title'=>$L->g('Settings'), 'icon'=>'cog')); echo Bootstrap::formSelect(array( 'name'=>'language', 'label'=>$L->g('Language'), - 'options'=>$Language->getLanguageList(), + 'options'=>$language->getLanguageList(), 'selected'=>$site->language(), 'class'=>'', 'tip'=>$L->g('select-your-sites-language') diff --git a/bl-kernel/boot/rules/60.plugins.php b/bl-kernel/boot/rules/60.plugins.php index 6feb9ff7..9685e665 100644 --- a/bl-kernel/boot/rules/60.plugins.php +++ b/bl-kernel/boot/rules/60.plugins.php @@ -50,7 +50,7 @@ function buildPlugins() { global $plugins; global $pluginsEvents; - global $Language; + global $language; global $site; // List plugins directories @@ -90,7 +90,7 @@ function buildPlugins() // This function overwrite the key=>value unset($database['plugin-data']); if (!empty($database)) { - $Language->add($database); + $language->add($database); } // $plugins['all'] Array with all plugins, installed and not installed diff --git a/bl-kernel/boot/rules/99.themes.php b/bl-kernel/boot/rules/99.themes.php index 6674f397..67b1547f 100644 --- a/bl-kernel/boot/rules/99.themes.php +++ b/bl-kernel/boot/rules/99.themes.php @@ -85,6 +85,6 @@ if( Sanitize::pathFile($languageFilename) ) // Load words from the theme language if(!empty($database)) { - $Language->add($database); + $language->add($database); } } \ No newline at end of file diff --git a/bl-kernel/boot/site.php b/bl-kernel/boot/site.php index 263aacba..4df94f5d 100644 --- a/bl-kernel/boot/site.php +++ b/bl-kernel/boot/site.php @@ -31,7 +31,7 @@ if (Sanitize::pathFile(PATH_THEMES, $site->theme().DS.'init.php')) { if (Sanitize::pathFile(PATH_THEMES, $site->theme().DS.'index.php')) { include(PATH_THEMES.$site->theme().DS.'index.php'); } else { - $Language->p('Please check your theme configuration'); + $language->p('Please check your theme configuration'); } // Plugins after site loaded diff --git a/bl-kernel/functions.php b/bl-kernel/functions.php index 9e60824a..caef3c1a 100644 --- a/bl-kernel/functions.php +++ b/bl-kernel/functions.php @@ -18,7 +18,6 @@ function reindexTags() { function buildErrorPage() { global $site; global $language; - global $users; try { $pageNotFoundKey = $site->pageNotFound(); @@ -198,7 +197,7 @@ function pluginActivated($pluginClassName) { function activatePlugin($pluginClassName) { global $plugins; global $syslog; - global $Language; + global $language; // Check if the plugin exists if (isset($plugins['all'][$pluginClassName])) { @@ -211,7 +210,7 @@ function activatePlugin($pluginClassName) { )); // Create an alert - Alert::set($Language->g('plugin-activated')); + Alert::set($language->g('plugin-activated')); return true; } } @@ -221,7 +220,7 @@ function activatePlugin($pluginClassName) { function deactivatePlugin($pluginClassName) { global $plugins; global $syslog; - global $Language; + global $language; // Check if the plugin exists if (isset($plugins['all'][$pluginClassName])) { @@ -235,7 +234,7 @@ function deactivatePlugin($pluginClassName) { )); // Create an alert - Alert::set($Language->g('plugin-deactivated')); + Alert::set($language->g('plugin-deactivated')); return true; } } @@ -245,7 +244,7 @@ function deactivatePlugin($pluginClassName) { function changePluginsPosition($pluginClassList) { global $plugins; global $syslog; - global $Language; + global $language; foreach ($pluginClassList as $position=>$pluginClassName) { if (isset($plugins['all'][$pluginClassName])) { @@ -260,14 +259,14 @@ function changePluginsPosition($pluginClassList) { 'notes'=>'' )); - Alert::set($Language->g('The changes have been saved')); + Alert::set($language->g('The changes have been saved')); return true; } function createPage($args) { global $pages; global $syslog; - global $Language; + global $language; // Check if the autosave page exists for this new page and delete it if (isset($args['uuid'])) { @@ -299,7 +298,7 @@ function createPage($args) { 'notes'=>$args['title'] )); - Alert::set( $Language->g('new-content-created') ); + Alert::set( $language->g('new-content-created') ); return $key; } @@ -489,30 +488,30 @@ function deleteUser($args) { function createUser($args) { global $users; - global $Language; + global $language; global $syslog; // Check empty username if (Text::isEmpty($args['new_username'])) { - Alert::set($Language->g('username-field-is-empty'), ALERT_STATUS_FAIL); + Alert::set($language->g('username-field-is-empty'), ALERT_STATUS_FAIL); return false; } // Check already exist username if ($users->exists($args['new_username'])) { - Alert::set($Language->g('username-already-exists'), ALERT_STATUS_FAIL); + Alert::set($language->g('username-already-exists'), ALERT_STATUS_FAIL); return false; } // Password length if (Text::length($args['new_password']) < PASSWORD_LENGTH) { - Alert::set($Language->g('Password must be at least '.PASSWORD_LENGTH.' characters long'), ALERT_STATUS_FAIL); + Alert::set($language->g('Password must be at least '.PASSWORD_LENGTH.' characters long'), ALERT_STATUS_FAIL); return false; } // Check new password and confirm password are equal if ($args['new_password'] != $args['confirm_password']) { - Alert::set($Language->g('The password and confirmation password do not match'), ALERT_STATUS_FAIL); + Alert::set($language->g('The password and confirmation password do not match'), ALERT_STATUS_FAIL); return false; } @@ -540,7 +539,7 @@ function createUser($args) { function editSettings($args) { global $site; global $syslog; - global $Language; + global $language; global $pages; if (isset($args['language'])) { @@ -592,7 +591,7 @@ function editSettings($args) { )); // Create alert - Alert::set($Language->g('The changes have been saved')); + Alert::set($language->g('The changes have been saved')); return true; } @@ -601,7 +600,7 @@ function editSettings($args) { function changeUserPassword($args) { global $users; - global $Language; + global $language; global $syslog; // Arguments @@ -611,12 +610,12 @@ function changeUserPassword($args) { // Password length if (Text::length($newPassword) < 6) { - Alert::set($Language->g('Password must be at least 6 characters long'), ALERT_STATUS_FAIL); + Alert::set($language->g('Password must be at least 6 characters long'), ALERT_STATUS_FAIL); return false; } if ($newPassword!=$confirmPassword) { - Alert::set($Language->g('The password and confirmation password do not match'), ALERT_STATUS_FAIL); + Alert::set($language->g('The password and confirmation password do not match'), ALERT_STATUS_FAIL); return false; } @@ -627,7 +626,7 @@ function changeUserPassword($args) { 'notes'=>$username )); - Alert::set($Language->g('The changes have been saved'), ALERT_STATUS_OK); + Alert::set($language->g('The changes have been saved'), ALERT_STATUS_OK); return true; } @@ -637,7 +636,7 @@ function changeUserPassword($args) { // Returns true if the user is allowed to procceded function checkRole($allowRoles, $redirect=true) { global $login; - global $Language; + global $language; global $syslog; $userRole = $login->role(); @@ -652,7 +651,7 @@ function checkRole($allowRoles, $redirect=true) { 'notes'=>$login->username() )); - Alert::set($Language->g('You do not have sufficient permissions')); + Alert::set($language->g('You do not have sufficient permissions')); if ($userRole=='reader') { Redirect::home(); } @@ -665,11 +664,11 @@ function checkRole($allowRoles, $redirect=true) { // Returns TRUE is successfully added, FALSE otherwise function createCategory($category) { global $categories; - global $Language; + global $language; global $syslog; if (Text::isEmpty($category)) { - Alert::set($Language->g('Category name is empty'), ALERT_STATUS_FAIL); + Alert::set($language->g('Category name is empty'), ALERT_STATUS_FAIL); return false; } @@ -680,29 +679,29 @@ function createCategory($category) { 'notes'=>$category )); - Alert::set($Language->g('Category added'), ALERT_STATUS_OK); + Alert::set($language->g('Category added'), ALERT_STATUS_OK); return true; } - Alert::set($Language->g('The category already exists'), ALERT_STATUS_FAIL); + Alert::set($language->g('The category already exists'), ALERT_STATUS_FAIL); return false; } function editCategory($args) { - global $Language; + global $language; global $pages; global $categories; global $syslog; if (Text::isEmpty($args['name']) || Text::isEmpty($args['newKey']) ) { - Alert::set($Language->g('Empty fields')); + Alert::set($language->g('Empty fields')); return false; } $newCategoryKey = $categories->edit($args); if ($newCategoryKey==false) { - Alert::set($Language->g('The category already exists')); + Alert::set($language->g('The category already exists')); return false; } @@ -715,12 +714,12 @@ function editCategory($args) { 'notes'=>$newCategoryKey )); - Alert::set($Language->g('The changes have been saved')); + Alert::set($language->g('The changes have been saved')); return true; } function deleteCategory($args) { - global $Language; + global $language; global $categories; global $syslog; @@ -735,7 +734,7 @@ function deleteCategory($args) { 'notes'=>$args['oldKey'] )); - Alert::set($Language->g('The changes have been saved')); + Alert::set($language->g('The changes have been saved')); return true; } @@ -797,7 +796,7 @@ function activateTheme($themeDirectory) { 'notes'=>$themeDirname )); - Alert::set( $Language->g('The changes have been saved') ); + Alert::set( $language->g('The changes have been saved') ); return true; } return false; diff --git a/bl-kernel/helpers/date.class.php b/bl-kernel/helpers/date.class.php index 6bceda74..511175a3 100644 --- a/bl-kernel/helpers/date.class.php +++ b/bl-kernel/helpers/date.class.php @@ -6,15 +6,15 @@ class Date { // Example: $date = 'Mon, 27th March' > 'Lun, 27th Marzo' public static function translate($date) { - global $Language; + global $language; // If English default language don't translate - if ($Language->currentLanguage()=='en') { + if ($language->currentLanguage()=='en') { return $date; } // Get the array of dates from the language file - $dates = $Language->getDates(); + $dates = $language->getDates(); foreach ($dates as $english=>$anotherLang) { $date = preg_replace('/\b'.$english.'\b/u', $anotherLang, $date); } diff --git a/bl-kernel/helpers/paginator.class.php b/bl-kernel/helpers/paginator.class.php index e64e0de3..3591afc5 100644 --- a/bl-kernel/helpers/paginator.class.php +++ b/bl-kernel/helpers/paginator.class.php @@ -104,7 +104,7 @@ class Paginator { public static function html($textPrevPage=false, $textNextPage=false, $showPageNumber=false) { - global $Language; + global $language; $html = '
    '; $html .= '
      '; @@ -112,7 +112,7 @@ class Paginator { if(self::get('showNext')) { if($textPrevPage===false) { - $textPrevPage = '« '.$Language->g('Previous page'); + $textPrevPage = '« '.$language->g('Previous page'); } $html .= '
    • '; @@ -127,7 +127,7 @@ class Paginator { if(self::get('showPrev')) { if($textNextPage===false) { - $textNextPage = $Language->g('Next page').' »'; + $textNextPage = $language->g('Next page').' »'; } $html .= '
    • '; diff --git a/bl-kernel/helpers/text.class.php b/bl-kernel/helpers/text.class.php index 01b99d09..62825553 100644 --- a/bl-kernel/helpers/text.class.php +++ b/bl-kernel/helpers/text.class.php @@ -126,7 +126,7 @@ class Text { // This function can return an empty string public static function cleanUrl($string, $separator='-') { - global $Language; + global $language; if (EXTREME_FRIENDLY_URL) { $string = self::lowercase($string); @@ -137,7 +137,7 @@ class Text { } // Transliterate characters to ASCII - $specialCharsFromDictionary = $Language->getSpecialChars(); + $specialCharsFromDictionary = $language->getSpecialChars(); $string = str_replace(array_keys($specialCharsFromDictionary), $specialCharsFromDictionary, $string); $string = str_replace(array_keys(self::$specialChars), self::$specialChars, $string); diff --git a/bl-kernel/pagex.class.php b/bl-kernel/pagex.class.php index e559dcd9..4f99322c 100644 --- a/bl-kernel/pagex.class.php +++ b/bl-kernel/pagex.class.php @@ -484,7 +484,7 @@ class Page { // Returns the amount of minutes takes to read the page public function readingTime() { - global $Language; + global $language; $words = $this->content(true); $words = strip_tags($words); @@ -493,10 +493,10 @@ class Page { $minutes = round($average); if ($minutes>0) { - return $minutes.' '.$Language->get('minutes'); + return $minutes.' '.$language->get('minutes'); } - return '~1 '.$Language->get('minute'); + return '~1 '.$language->get('minute'); } // Returns relative time (e.g. "1 minute ago") diff --git a/bl-kernel/syslog.class.php b/bl-kernel/syslog.class.php index 92c89e63..742ad4b3 100644 --- a/bl-kernel/syslog.class.php +++ b/bl-kernel/syslog.class.php @@ -39,7 +39,7 @@ class Syslog extends dbJSON { public function add($args) { - global $Language; + global $language; $data = array(); $data['date'] = Date::current(DB_DATE_FORMAT); diff --git a/bl-plugins/about/plugin.php b/bl-plugins/about/plugin.php index 5351cb70..bd78983a 100644 --- a/bl-plugins/about/plugin.php +++ b/bl-plugins/about/plugin.php @@ -12,20 +12,20 @@ class pluginAbout extends Plugin { public function form() { - global $Language; + global $language; $html = ''; $html .= '
      '; - $html .= ''; + $html .= ''; $html .= ''; - $html .= ''.$Language->get('This title is almost always used in the sidebar of the site').''; + $html .= ''.$language->get('This title is almost always used in the sidebar of the site').''; $html .= '
      '; $html .= '
      '; - $html .= ''; + $html .= ''; $html .= ''; $html .= '
      '; diff --git a/bl-plugins/api/plugin.php b/bl-plugins/api/plugin.php index 523be426..fbb4d470 100644 --- a/bl-plugins/api/plugin.php +++ b/bl-plugins/api/plugin.php @@ -17,22 +17,22 @@ class pluginAPI extends Plugin { public function form() { - global $Language; + global $language; $html = ''; $html .= '
      '; - $html .= ''; + $html .= ''; $html .= ''; - $html .= ''.$Language->get('This token is for read only and is regenerated every time you install the plugin').''; + $html .= ''.$language->get('This token is for read only and is regenerated every time you install the plugin').''; $html .= '
      '; $html .= '
      '; - $html .= ''; + $html .= ''; $html .= ''; - $html .= ''.$Language->get('This is the maximum of pages to return when you call to').''; + $html .= ''.$language->get('This is the maximum of pages to return when you call to').''; $html .= '
      '; return $html; diff --git a/bl-plugins/backup/plugin.php b/bl-plugins/backup/plugin.php index 0a96bce1..521abf81 100644 --- a/bl-plugins/backup/plugin.php +++ b/bl-plugins/backup/plugin.php @@ -64,19 +64,19 @@ class pluginBackup extends Plugin { public function form() { - global $Language; + global $language; $backups = $this->backupList(); $html = ''; if (empty($backups)) { $html .= ''; } $html .= '
      '; - $html .= ''; + $html .= ''; $html .= '
      '; $html .= '
      '; @@ -88,10 +88,10 @@ class pluginBackup extends Plugin { $html .= '

      '.Date::format($filename, BACKUP_DATE_FORMAT, 'F j, Y, g:i a').'

      '; // Allow download if a zip file if ($this->zip) { - $html .= ' '.$Language->get('download').''; + $html .= ' '.$language->get('download').''; } - $html .= ''; - $html .= ''; + $html .= ''; + $html .= ''; $html .= '
    '; $html .= '
    '; } diff --git a/bl-plugins/categories/plugin.php b/bl-plugins/categories/plugin.php index 333edfe2..63cc6679 100644 --- a/bl-plugins/categories/plugin.php +++ b/bl-plugins/categories/plugin.php @@ -14,23 +14,23 @@ class pluginCategories extends Plugin { // Method called on the settings of the plugin on the admin area public function form() { - global $Language; + global $language; $html = ''; $html .= '
    '; - $html .= ''; + $html .= ''; $html .= ''; - $html .= ''.$Language->get('This title is almost always used in the sidebar of the site').''; + $html .= ''.$language->get('This title is almost always used in the sidebar of the site').''; $html .= '
    '; $html .= '
    '; - $html .= ''; + $html .= ''; $html .= ''; $html .= '
    '; @@ -40,7 +40,7 @@ class pluginCategories extends Plugin { // Method called on the sidebar of the website public function siteSidebar() { - global $Language; + global $language; global $categories; // HTML for sidebar diff --git a/bl-plugins/disqus/plugin.php b/bl-plugins/disqus/plugin.php index 7bd93e76..a0a9bed6 100644 --- a/bl-plugins/disqus/plugin.php +++ b/bl-plugins/disqus/plugin.php @@ -13,29 +13,29 @@ class pluginDisqus extends Plugin { public function form() { - global $Language; + global $language; $html = ''; $html .= '
    '; - $html .= ''; + $html .= ''; $html .= ''; $html .= '
    '; $html .= '
    '; - $html .= ''; + $html .= ''; $html .= ''; $html .= '
    '; $html .= '
    '; - $html .= ''; + $html .= ''; $html .= ''; $html .= '
    '; diff --git a/bl-plugins/html-code/plugin.php b/bl-plugins/html-code/plugin.php index bfbc9c33..daaeb81c 100644 --- a/bl-plugins/html-code/plugin.php +++ b/bl-plugins/html-code/plugin.php @@ -13,7 +13,7 @@ class pluginHTMLCode extends Plugin { public function form() { - global $Language; + global $language; $html = ' @@ -46,7 +46,7 @@
  • - get('Previous'); ?> + get('Previous'); ?>
  • @@ -56,7 +56,7 @@
  • - get('Next'); ?> ► + get('Next'); ?> ►
  • diff --git a/bl-themes/blogx/php/page.php b/bl-themes/blogx/php/page.php index 5d1289d5..54138a39 100644 --- a/bl-themes/blogx/php/page.php +++ b/bl-themes/blogx/php/page.php @@ -17,7 +17,7 @@ isStatic() && !$url->notFound()): ?> -
    date(); ?> - get('Reading time') . ': ' . $page->readingTime() ?>
    +
    date(); ?> - get('Reading time') . ': ' . $page->readingTime() ?>
    diff --git a/install.php b/install.php index d9e0e6cb..7eb042ab 100644 --- a/install.php +++ b/install.php @@ -253,7 +253,7 @@ RewriteRule ^(.*) index.php [PT,L] // Install Bludit function install($adminPassword, $timezone) { - global $Language; + global $language; if (!date_default_timezone_set($timezone)) { date_default_timezone_set('UTC'); @@ -268,8 +268,8 @@ function install($adminPassword, $timezone) // Directories for initial pages $pagesToInstall = array('example-page-1-slug', 'example-page-2-slug', 'example-page-3-slug', 'example-page-4-slug'); foreach ($pagesToInstall as $page) { - if (!mkdir(PATH_PAGES.$Language->get($page), DIR_PERMISSIONS, true)) { - $errorText = 'Error when trying to created the directory=>'.PATH_PAGES.$Language->get($page); + if (!mkdir(PATH_PAGES.$language->get($page), DIR_PERMISSIONS, true)) { + $errorText = 'Error when trying to created the directory=>'.PATH_PAGES.$language->get($page); error_log('[ERROR] '.$errorText, 0); } } @@ -312,8 +312,8 @@ function install($adminPassword, $timezone) $title = Text::replace('slug','title', $slug); $content = Text::replace('slug','content', $slug); - $data[$Language->get($slug)]= array( - 'title'=>$Language->get($title), + $data[$language->get($slug)]= array( + 'title'=>$language->get($title), 'description'=>'', 'username'=>'admin', 'tags'=>array(), @@ -333,7 +333,7 @@ function install($adminPassword, $timezone) 'noarchive'=>false ); - file_put_contents(PATH_PAGES.$Language->get($slug).DS.FILENAME, $Language->get($content), LOCK_EX); + file_put_contents(PATH_PAGES.$language->get($slug).DS.FILENAME, $language->get($content), LOCK_EX); } file_put_contents(PATH_DATABASES.'pages.php', $dataHead.json_encode($data, JSON_PRETTY_PRINT), LOCK_EX); @@ -349,12 +349,12 @@ function install($adminPassword, $timezone) } $data = array( 'title'=>'BLUDIT', - 'slogan'=>$Language->get('welcome-to-bludit'), - 'description'=>$Language->get('congratulations-you-have-successfully-installed-your-bludit'), + 'slogan'=>$language->get('welcome-to-bludit'), + 'description'=>$language->get('congratulations-you-have-successfully-installed-your-bludit'), 'footer'=>'Copyright © '.Date::current('Y'), 'itemsPerPage'=>6, - 'language'=>$Language->currentLanguage(), - 'locale'=>$Language->locale(), + 'language'=>$language->currentLanguage(), + 'locale'=>$language->locale(), 'timezone'=>$timezone, 'theme'=>'alternative', 'adminTheme'=>'booty', @@ -394,7 +394,7 @@ function install($adminPassword, $timezone) $data = array( 'admin'=>array( 'nickname'=>'Admin', - 'firstName'=>$Language->get('Administrator'), + 'firstName'=>$language->get('Administrator'), 'lastName'=>'', 'role'=>'admin', 'password'=>$passwordHash, @@ -458,8 +458,8 @@ function install($adminPassword, $timezone) $dataHead.json_encode( array( 'position'=>1, - 'label'=>$Language->get('About'), - 'text'=>$Language->get('this-is-a-brief-description-of-yourself-our-your-site') + 'label'=>$language->get('About'), + 'text'=>$language->get('this-is-a-brief-description-of-yourself-our-your-site') ), JSON_PRETTY_PRINT), LOCK_EX @@ -471,7 +471,7 @@ function install($adminPassword, $timezone) $dataHead.json_encode( array( 'position'=>2, - 'label'=>$Language->get('Tags') + 'label'=>$language->get('Tags') ), JSON_PRETTY_PRINT), LOCK_EX @@ -483,7 +483,7 @@ function install($adminPassword, $timezone) $dataHead.json_encode( array( 'numberOfDays'=>7, - 'label'=>$Language->get('Visits'), + 'label'=>$language->get('Visits'), 'excludeAdmins'=>false, 'position'=>1 ), @@ -555,7 +555,7 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { - <?php echo $Language->get('Bludit Installer') ?> + <?php echo $language->get('Bludit Installer') ?> @@ -576,7 +576,7 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    -

    get('Bludit Installer') ?>

    +

    get('Bludit Installer') ?>

    -

    get('Choose a password for the username admin') ?>

    +

    get('Choose a password for the username admin') ?>

    @@ -601,12 +601,12 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    - +
    -
    p('Show password') ?>
    +
    p('Show password') ?>
    - +
    - +