From ff8fe8dc02aa4272ac52419cdc89c2e154a6773e Mon Sep 17 00:00:00 2001 From: torkel104 Date: Mon, 7 Nov 2016 20:58:47 +0100 Subject: [PATCH] Update plugins to use the new l10n function --- bl-plugins/about/plugin.php | 6 ++---- bl-plugins/disqus/plugin.php | 10 ++++------ bl-plugins/googletools/plugin.php | 10 ++++------ bl-plugins/latest_posts/plugin.php | 6 ++---- bl-plugins/maintenancemode/plugin.php | 6 ++---- bl-plugins/pages/plugin.php | 9 +++------ bl-plugins/simplemde/plugin.php | 12 ++++-------- bl-plugins/tags/plugin.php | 11 ++++------- 8 files changed, 25 insertions(+), 45 deletions(-) mode change 100644 => 100755 bl-plugins/about/plugin.php mode change 100644 => 100755 bl-plugins/disqus/plugin.php mode change 100644 => 100755 bl-plugins/googletools/plugin.php mode change 100644 => 100755 bl-plugins/latest_posts/plugin.php mode change 100644 => 100755 bl-plugins/maintenancemode/plugin.php mode change 100644 => 100755 bl-plugins/pages/plugin.php mode change 100644 => 100755 bl-plugins/simplemde/plugin.php mode change 100644 => 100755 bl-plugins/tags/plugin.php diff --git a/bl-plugins/about/plugin.php b/bl-plugins/about/plugin.php old mode 100644 new mode 100755 index bb3eccb1..3ef91ad4 --- a/bl-plugins/about/plugin.php +++ b/bl-plugins/about/plugin.php @@ -12,14 +12,12 @@ class pluginAbout extends Plugin { public function form() { - global $Language; - $html = '
'; - $html .= ''; + $html .= ''; $html .= ''; $html .= '
'; $html .= '
'; - $html .= ''; + $html .= ''; $html .= ''; $html .= '
'; diff --git a/bl-plugins/disqus/plugin.php b/bl-plugins/disqus/plugin.php old mode 100644 new mode 100755 index d5861887..fe754b96 --- a/bl-plugins/disqus/plugin.php +++ b/bl-plugins/disqus/plugin.php @@ -36,29 +36,27 @@ class pluginDisqus extends Plugin { public function form() { - global $Language; - $html = '
'; - $html .= ''; + $html .= ''; $html .= ''; $html .= '
'; $html .= '
'; $html .= ''; $html .= 'getDbField('enablePages')?'checked':'').'>'; - $html .= ''; + $html .= ''; $html .= '
'; $html .= '
'; $html .= ''; $html .= 'getDbField('enablePosts')?'checked':'').'>'; - $html .= ''; + $html .= ''; $html .= '
'; $html .= '
'; $html .= ''; $html .= 'getDbField('enableDefaultHomePage')?'checked':'').'>'; - $html .= ''; + $html .= ''; $html .= '
'; return $html; diff --git a/bl-plugins/googletools/plugin.php b/bl-plugins/googletools/plugin.php old mode 100644 new mode 100755 index 34c93996..0f4a5326 --- a/bl-plugins/googletools/plugin.php +++ b/bl-plugins/googletools/plugin.php @@ -12,18 +12,16 @@ class pluginGoogleTools extends Plugin { public function form() { - global $Language; - $html = '
'; - $html .= ''; + $html .= ''; $html .= ''; - $html .= '
'.$Language->get('complete-this-field-with-the-google-site-verification').'
'; + $html .= '
'.$this->L('complete-this-field-with-the-google-site-verification').'
'; $html .= '
'; $html .= '
'; - $html .= ''; + $html .= ''; $html .= ''; - $html .= '
'.$Language->get('complete-this-field-with-the-tracking-id').'
'; + $html .= '
'.$this->L('complete-this-field-with-the-tracking-id').'
'; $html .= '
'; return $html; diff --git a/bl-plugins/latest_posts/plugin.php b/bl-plugins/latest_posts/plugin.php old mode 100644 new mode 100755 index d8dc1af5..190a1a4a --- a/bl-plugins/latest_posts/plugin.php +++ b/bl-plugins/latest_posts/plugin.php @@ -12,15 +12,13 @@ class pluginLatestPosts extends Plugin { public function form() { - global $Language; - $html = '
'; - $html .= ''; + $html .= ''; $html .= ''; $html .= '
'; $html .= '
'; - $html .= ''; + $html .= ''; $html .= ''; $html .= '
'; diff --git a/bl-plugins/maintenancemode/plugin.php b/bl-plugins/maintenancemode/plugin.php old mode 100644 new mode 100755 index 5a36614e..b01e8603 --- a/bl-plugins/maintenancemode/plugin.php +++ b/bl-plugins/maintenancemode/plugin.php @@ -12,16 +12,14 @@ class pluginMaintenanceMode extends Plugin { public function form() { - global $Language; - $html = '
'; $html .= ''; $html .= 'getDbField('enable')?'checked':'').'>'; - $html .= ''; + $html .= ''; $html .= '
'; $html .= '
'; - $html .= ''; + $html .= ''; $html .= ''; $html .= '
'; diff --git a/bl-plugins/pages/plugin.php b/bl-plugins/pages/plugin.php old mode 100644 new mode 100755 index 16b84896..74a61c2c --- a/bl-plugins/pages/plugin.php +++ b/bl-plugins/pages/plugin.php @@ -12,17 +12,15 @@ class pluginPages extends Plugin { public function form() { - global $Language; - $html = '
'; - $html .= ''; + $html .= ''; $html .= ''; $html .= '
'; $html .= '
'; $html .= ''; $html .= 'getDbField('homeLink')?'checked':'').'>'; - $html .= ''; + $html .= ''; $html .= '
'; return $html; @@ -30,7 +28,6 @@ class pluginPages extends Plugin { public function siteSidebar() { - global $Language; global $pagesParents; global $Site, $Url; @@ -48,7 +45,7 @@ class pluginPages extends Plugin { // Show home link ? if($this->getDbField('homeLink')) { $html .= '
  • '; - $html .= ''.$Language->get('Home').''; + $html .= ''.$this->L('Home').''; $html .= '
  • '; } diff --git a/bl-plugins/simplemde/plugin.php b/bl-plugins/simplemde/plugin.php old mode 100644 new mode 100755 index 5b976cfc..629ed84e --- a/bl-plugins/simplemde/plugin.php +++ b/bl-plugins/simplemde/plugin.php @@ -20,22 +20,20 @@ class pluginsimpleMDE extends Plugin { public function form() { - global $Language; - $html = '
    '; - $html .= ''; + $html .= ''; $html .= ''; $html .= '
    '; $html .= '
    '; - $html .= ''; + $html .= ''; $html .= ''; $html .= '
    '; $html .= '
    '; $html .= ''; $html .= 'getDbField('autosave')?'checked':'').'>'; - $html .= ''; + $html .= ''; $html .= '
    '; return $html; @@ -78,8 +76,6 @@ class pluginsimpleMDE extends Plugin { public function adminBodyEnd() { global $layout; - global $Language; - $html = ''; // Load CSS and JS only on Controllers in array. @@ -109,7 +105,7 @@ class pluginsimpleMDE extends Plugin { // This function is necesary on each Editor, it is used by Bludit Images v8. $html .= 'function editorAddImage(filename) { - addContentSimpleMDE("!['.$Language->get('Image description').']("+filename+")"); + addContentSimpleMDE("!['.$this->L('Image description').']("+filename+")"); }'.PHP_EOL; $html .= '$(document).ready(function() { '.PHP_EOL; diff --git a/bl-plugins/tags/plugin.php b/bl-plugins/tags/plugin.php old mode 100644 new mode 100755 index 978fbd64..3f7f4664 --- a/bl-plugins/tags/plugin.php +++ b/bl-plugins/tags/plugin.php @@ -12,23 +12,21 @@ class pluginTags extends Plugin { public function form() { - global $Language; - $html = '
    '; - $html .= ''; + $html .= ''; $html .= ''; $html .= '
    '; $html .= '
    '; - $html .= $Language->get('Sort the tag list by').': '; foreach(array('alpha' => 'Alphabetical order', 'count' => 'Number of times each tag has been used', 'date' => 'Date each tag was first used') as $key=>$value) { if ($key == $this->getDbField('sort')) { - $html .= ''; + $html .= ''; } else { - $html .= ''; + $html .= ''; } } $html .= ''; @@ -39,7 +37,6 @@ class pluginTags extends Plugin { public function siteSidebar() { - global $Language; global $dbTags; global $Url;