From 9e027a0a4fe10c4a2c6198e7baf423c24a97dae5 Mon Sep 17 00:00:00 2001
From: Szymon Olewniczak <(my first name) [at] imz [dot] re>
Date: Tue, 14 Mar 2017 15:32:44 +0100
Subject: [PATCH] change DokuWiki_Plugin:localFN signature

---
 inc/plugin.php | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/inc/plugin.php b/inc/plugin.php
index a3314d4c7..fb6bb0b37 100644
--- a/inc/plugin.php
+++ b/inc/plugin.php
@@ -106,17 +106,18 @@ class DokuWiki_Plugin {
      * plugin equivalent of localFN()
      *
      * @param string $id id of localization file
+     * @param  string $ext The file extension (usually txt)
      * @return string wiki text
      */
-    public function localFN($id) {
+    public function localFN($id,$ext='txt') {
         global $conf;
         $plugin = $this->getPluginName();
-        $file = DOKU_CONF.'plugin_lang/'.$plugin.'/'.$conf['lang'].'/'.$id.'.txt';
+        $file = DOKU_CONF.'plugin_lang/'.$plugin.'/'.$conf['lang'].'/'.$id.'.'.$ext;
         if (!file_exists($file)){
-            $file = DOKU_PLUGIN.$plugin.'/lang/'.$conf['lang'].'/'.$id.'.txt';
+            $file = DOKU_PLUGIN.$plugin.'/lang/'.$conf['lang'].'/'.$id.'.'.$ext;
             if(!file_exists($file)){
                 //fall back to english
-                $file = DOKU_PLUGIN.$plugin.'/lang/en/'.$id.'.txt';
+                $file = DOKU_PLUGIN.$plugin.'/lang/en/'.$id.'.'.$ext;
             }
         }
         return $file;
-- 
GitLab