From c54373bd7feade9029890ad6fbd243161a6dad21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor?= Date: Fri, 25 Nov 2016 12:15:32 +0100 Subject: [PATCH 1/5] Update lan_plugin.php --- e107_languages/English/admin/lan_plugin.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/e107_languages/English/admin/lan_plugin.php b/e107_languages/English/admin/lan_plugin.php index d27d9fa16..30f599fb8 100644 --- a/e107_languages/English/admin/lan_plugin.php +++ b/e107_languages/English/admin/lan_plugin.php @@ -273,6 +273,8 @@ define ("EPL_ADLAN_231", "Remove icons from Media-Manager"); define ("EPL_ADLAN_232", "Create Files"); define ("TPVLAN_81", "Downloading..."); define ("TPVLAN_82", "Download Complete!"); +define ("EPL_ADLAN_233", "Adding Link:"); +define ("EPL_ADLAN_234", "Removing Link:"); define ("EPL_ADLAN_235", "Automated download not possible."); define ("EPL_ADLAN_236", "Please Download Manually"); define ("EPL_ADLAN_237", "Download"); @@ -284,6 +286,15 @@ define ("EPL_ADLAN_242","Removing Pref:"); define ("EPL_ADLAN_243","Updating Pref:"); define ("EPL_ADLAN_244","Only 5 Media Categories are permitted during installation."); +define ("EPL_ADLAN_245","Adding Media Category: [x]"); +define ("EPL_ADLAN_246","Deleting All Media Categories owned by : [x]"); +define ("EPL_ADLAN_247","Adding [x] to: [y]"); +define ("EPL_ADLAN_248","Removing [x] from: [y]"); +define ("EPL_ADLAN_249","Adding Extended Field: "); +define ("EPL_ADLAN_250","Removing Extended Field: "); +define ("EPL_ADLAN_251","Extended Field left in place: "); +define ("EPL_ADLAN_252","Perm: "); + define ("LAN_RELEASED", "Released"); define ("LAN_REPAIR_PLUGIN_SETTINGS", "Repair plugin settings"); define ("LAN_SYNC_WITH_GIT_REPO", "Sync with Git Repo"); @@ -295,4 +306,4 @@ define("LAN_INSTALL_FAIL", "Installation failed!"); define("LAN_UNINSTALL_FAIL", "Unable to uninstall!"); define("LAN_PLUGIN_IS_USED", "[x] plugin is used by:"); -?> \ No newline at end of file +?> From 0086f21dd19bd1e48c631457f8511c53da6ae5dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor?= Date: Fri, 25 Nov 2016 12:25:15 +0100 Subject: [PATCH 2/5] Update plugin_class.php Add lang codes. --- e107_handlers/plugin_class.php | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/e107_handlers/plugin_class.php b/e107_handlers/plugin_class.php index c2770f586..aadd8c232 100644 --- a/e107_handlers/plugin_class.php +++ b/e107_handlers/plugin_class.php @@ -2047,7 +2047,8 @@ class e107plugin case 'refresh': if ($currentPref != $pathEntry) { - $mes->addDebug('Adding '.$plugin.' to '.$prefName); + $message = e107::getParser()->lanVars(EPL_ADLAN_247, array('x'=> $plugin, 'y'=> $prefName)); + $mes->addDebug($message); $core->setPref($prefName.'/'.$plugin, $pathEntry); $updated = true; } @@ -2055,7 +2056,8 @@ class e107plugin case 'uninstall': if ($currentPref) { - $mes->addDebug('Removing '.$plugin.' from '.$prefName); + $message = e107::getParser()->lanVars(EPL_ADLAN_248, array('x'=> $plugin, 'y'=> $prefName)); + $mes->addDebug($message); $core->removePref($prefName.'/'.$plugin); $updated = true; } @@ -2198,14 +2200,14 @@ class e107plugin if($result !== NULL) { $status = ($result) ? E_MESSAGE_SUCCESS : E_MESSAGE_ERROR; - $mes->add("Adding Link: {$linkName} with url [{$url}] and perm {$perm} ", $status); + $mes->add(EPL_ADLAN_233." {$linkName} URL: [{$url}] ".EPL_ADLAN_252." {$perm} ", $status); } } if ($function == 'upgrade' && $remove) //remove inactive links on upgrade { $status = ($this->manage_link('remove', $url, $linkName,false, $options)) ? E_MESSAGE_SUCCESS : E_MESSAGE_ERROR; - $mes->add("Removing Link: {$linkName} with url [{$url}]", $status); + $mes->add(EPL_ADLAN_234." {$linkName} URL: [{$url}]", $status); } break; @@ -2213,7 +2215,7 @@ class e107plugin case 'uninstall': //remove all links $status = ($this->manage_link('remove', $url, $linkName, $perm, $options)) ? E_MESSAGE_SUCCESS : E_MESSAGE_ERROR; - $mes->add("Removing Link: {$linkName} with url [{$url}]", $status); + $mes->add(EPL_ADLAN_234." {$linkName} URL: [{$url}]", $status); break; } } @@ -2315,7 +2317,8 @@ class e107plugin $data['class'] = $this->getPerm(varset($v['@attributes']['perm']), 'member'); $status = e107::getMedia()->createCategory($data) ? E_MESSAGE_SUCCESS : E_MESSAGE_ERROR; - $mes->add("Adding Media Category: {$data['category']}", $status); + $message = str_replace('[x]', $data['category'], EPL_ADLAN_245); + $mes->add($message, $status); e107::getMedia()->import($data['category'],e_PLUGIN.$folder, false,'min-size=20000'); $c++; $i[$type]++; @@ -2325,7 +2328,8 @@ class e107plugin case 'uninstall': // Probably best to leave well alone $status = e107::getMedia()->deleteAllCategories($folder)? E_MESSAGE_SUCCESS : E_MESSAGE_ERROR; - $mes->add("Deleting All Media Categories owned by : {$folder}", $status); + $message = str_replace('[x]', $folder, EPL_ADLAN_246); + $mes->add($message, $status); break; @@ -2467,14 +2471,14 @@ class e107plugin //$status = $this->manage_extended_field('add', $name, $type, $attrib['default'], $source) ? E_MESSAGE_SUCCESS : E_MESSAGE_ERROR; $status = $this->manage_extended_field('add', $name, $attrib, $source) ? E_MESSAGE_SUCCESS : E_MESSAGE_ERROR; - $mes->add('Adding Extended Field: '.$name.' ... ', $status); + $mes->add(EPL_ADLAN_249 .$name.' ... ', $status); } if ($function == 'upgrade' && $remove) //If upgrading, removing any inactive extended fields { $status = $this->manage_extended_field('remove', $name, $attrib, $source) ? E_MESSAGE_SUCCESS : E_MESSAGE_ERROR; - $mes->add('Removing Extended Field: '.$name.' ... ', $status); + $mes->add(EPL_ADLAN_250 .$name.' ... ', $status); } break; @@ -2483,11 +2487,11 @@ class e107plugin if (vartrue($this->unInstallOpts['delete_xfields'], FALSE)) { $status = ($this->manage_extended_field('remove', $name, $attrib, $source)) ? E_MESSAGE_SUCCESS : E_MESSAGE_ERROR; - $mes->add('Removing Extended Field: '.$name.' ... ', $status); + $mes->add(EPL_ADLAN_250 .$name.' ... ', $status); } else { - $mes->add('Extended Field: '.$name.' left in place', E_MESSAGE_SUCCESS); + $mes->add(EPL_ADLAN_251 .$name, E_MESSAGE_SUCCESS); } break; } From 98fbcf499b4f0002bc217f64abe3b7ca71c77556 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor?= Date: Sat, 26 Nov 2016 08:17:19 +0100 Subject: [PATCH 3/5] Update lan_plugin.php --- e107_languages/English/admin/lan_plugin.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/e107_languages/English/admin/lan_plugin.php b/e107_languages/English/admin/lan_plugin.php index 30f599fb8..562166278 100644 --- a/e107_languages/English/admin/lan_plugin.php +++ b/e107_languages/English/admin/lan_plugin.php @@ -285,11 +285,9 @@ define ("EPL_ADLAN_241","Adding Pref:"); define ("EPL_ADLAN_242","Removing Pref:"); define ("EPL_ADLAN_243","Updating Pref:"); define ("EPL_ADLAN_244","Only 5 Media Categories are permitted during installation."); - define ("EPL_ADLAN_245","Adding Media Category: [x]"); define ("EPL_ADLAN_246","Deleting All Media Categories owned by : [x]"); -define ("EPL_ADLAN_247","Adding [x] to: [y]"); -define ("EPL_ADLAN_248","Removing [x] from: [y]"); + define ("EPL_ADLAN_249","Adding Extended Field: "); define ("EPL_ADLAN_250","Removing Extended Field: "); define ("EPL_ADLAN_251","Extended Field left in place: "); From ac77918946289d956c7b942ce0fe486105ea244c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor?= Date: Sat, 26 Nov 2016 08:19:36 +0100 Subject: [PATCH 4/5] Update plugin_class.php --- e107_handlers/plugin_class.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/e107_handlers/plugin_class.php b/e107_handlers/plugin_class.php index aadd8c232..de1cd3c64 100644 --- a/e107_handlers/plugin_class.php +++ b/e107_handlers/plugin_class.php @@ -2047,8 +2047,7 @@ class e107plugin case 'refresh': if ($currentPref != $pathEntry) { - $message = e107::getParser()->lanVars(EPL_ADLAN_247, array('x'=> $plugin, 'y'=> $prefName)); - $mes->addDebug($message); + $mes->addDebug('Adding '.$plugin.' to '.$prefName); $core->setPref($prefName.'/'.$plugin, $pathEntry); $updated = true; } @@ -2056,8 +2055,7 @@ class e107plugin case 'uninstall': if ($currentPref) { - $message = e107::getParser()->lanVars(EPL_ADLAN_248, array('x'=> $plugin, 'y'=> $prefName)); - $mes->addDebug($message); + $mes->addDebug('Removing '.$plugin.' from '.$prefName); $core->removePref($prefName.'/'.$plugin); $updated = true; } From 8bd28d6d3d07af884a91ac247fc391bb8b871499 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor?= Date: Sat, 26 Nov 2016 08:27:24 +0100 Subject: [PATCH 5/5] Update lan_plugin.php --- e107_languages/English/admin/lan_plugin.php | 1 + 1 file changed, 1 insertion(+) diff --git a/e107_languages/English/admin/lan_plugin.php b/e107_languages/English/admin/lan_plugin.php index 562166278..00b084eec 100644 --- a/e107_languages/English/admin/lan_plugin.php +++ b/e107_languages/English/admin/lan_plugin.php @@ -285,6 +285,7 @@ define ("EPL_ADLAN_241","Adding Pref:"); define ("EPL_ADLAN_242","Removing Pref:"); define ("EPL_ADLAN_243","Updating Pref:"); define ("EPL_ADLAN_244","Only 5 Media Categories are permitted during installation."); + define ("EPL_ADLAN_245","Adding Media Category: [x]"); define ("EPL_ADLAN_246","Deleting All Media Categories owned by : [x]");