aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/language_switch/main.inc.php
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2012-06-21 10:23:12 +0000
committermistic100 <mistic@piwigo.org>2012-06-21 10:23:12 +0000
commitb2149f3c10f6dea603fee68070cd0cca9e761355 (patch)
treea0cdc8a09dd2980b9c8256fc7dd32453b0df57ad /plugins/language_switch/main.inc.php
parent7fd3211427fda67c442ee26b9a495a3269431b87 (diff)
[Language Switch] new version using 2.4 drop-down menus
git-svn-id: http://piwigo.org/svn/trunk@15923 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'plugins/language_switch/main.inc.php')
-rw-r--r--plugins/language_switch/main.inc.php15
1 files changed, 10 insertions, 5 deletions
diff --git a/plugins/language_switch/main.inc.php b/plugins/language_switch/main.inc.php
index 6bbc4f51d..e03c2e70b 100644
--- a/plugins/language_switch/main.inc.php
+++ b/plugins/language_switch/main.inc.php
@@ -23,15 +23,20 @@
/*
Plugin Name: Language Switch
-Version: 2.3.0
+Version: 2.4.0
Description: Switch to another language from flags on your gallery home page.
Plugin URI: http://piwigo.org/ext/extension_view.php?eid=123
Author: Piwigo team
Author URI: http://piwigo.org
*/
-include_once(PHPWG_PLUGINS_PATH.'language_switch/language_switch.inc.php');
-$language_controler = new language_controler();
-add_event_handler('loading_lang', array(&$language_controler, '_switch'), 5 );
-add_event_handler('loc_end_index', array(&$language_controler, '_flags'), 95 );
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+define('LANGUAGE_SWITCH_PATH' , PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/');
+
+include_once(LANGUAGE_SWITCH_PATH.'language_switch.inc.php');
+
+add_event_handler('loading_lang', 'language_controler_switch', 5 );
+add_event_handler('loc_end_index', 'language_controler_flags', 95 );
+
?> \ No newline at end of file