Changeset 19815
- Timestamp:
- Jan 5, 2013, 12:11:07 AM (12 years ago)
- Location:
- extensions/Mobile_Theme_for_Tablets
- Files:
-
- 16 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Mobile_Theme_for_Tablets/admin.php
r19778 r19815 1 1 <?php 2 2 //Chech whether we are indeed included by Piwigo. 3 if (!defined('M EDIA_ICON_PATH')) die('Hacking attempt!');3 if (!defined('MTT_PATH')) die('Hacking attempt!'); 4 4 5 5 //Load globals … … 12 12 check_status(ACCESS_ADMINISTRATOR); 13 13 14 14 include_once(MTT_PATH.'admin/admin_config.php'); 15 15 ?> -
extensions/Mobile_Theme_for_Tablets/include/functions.inc.php
r19778 r19815 1 1 <? 2 3 $array = array('mobile', 'tablet'); //A remplacer par un $conf2 function mtt_activate_mobile_theme() { 3 global $conf; 4 4 5 if (in_array(pwg_get_session_var('device'), $array)) { 6 pwg_set_session_var('mobile_theme', true); 7 } else { 8 pwg_set_session_var('mobile_theme', false); 9 } 10 } 5 $conf_mtt = unserialize($conf['mobile_theme_for_tablets']); 6 7 if (isset($conf_mtt['devices'][pwg_get_session_var('device')]) && $conf_mtt['devices'][pwg_get_session_var('device')] == '1') { 8 pwg_set_session_var('mobile_theme', true); 9 } else { 10 pwg_set_session_var('mobile_theme', false); 11 } 12 } 11 13 ?> -
extensions/Mobile_Theme_for_Tablets/main.inc.php
r19778 r19815 38 38 * +-----------------------------------------------------------------------+ */ 39 39 include_once(MTT_PATH.'include/functions.inc.php'); 40 add_event_handler('loading_lang', ' activate_mobile_theme');40 add_event_handler('loading_lang', 'mtt_activate_mobile_theme'); 41 41 ?> -
extensions/Mobile_Theme_for_Tablets/maintain.inc.php
r19778 r19815 3 3 4 4 function plugin_install() { 5 5 include_once(dirname(__FILE__).'/install/functions.inc.php'); 6 include_once(dirname(__FILE__).'/install/config_default.inc.php'); 7 8 mtt_install($config_default); 6 9 } 7 10 8 11 function plugin_activate() { 12 include_once(dirname(__FILE__).'/install/functions.inc.php'); 9 13 14 mtt_update_db(); 10 15 } 11 16 12 17 function plugin_uninstall() { 18 include_once(dirname(__FILE__).'/install/functions.inc.php'); 13 19 20 mtt_delete_conf("mobile_theme_for_tablets"); 14 21 } 15 22
Note: See TracChangeset
for help on using the changeset viewer.