Changeset 27781 for extensions/MyPiwiShop/main.inc.php
- Timestamp:
- Mar 16, 2014, 7:16:27 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/MyPiwiShop/main.inc.php
r27743 r27781 35 35 add_event_handler('init', 'mps_init'); 36 36 37 if (defined('IN_ADMIN')) 38 { 37 if (defined('IN_ADMIN')) { 39 38 include_once(MPS_PATH . 'include/admin_events.inc.php'); 40 39 … … 47 46 add_event_handler('element_set_global_action', 'mps_element_set_global_action', EVENT_HANDLER_PRIORITY_NEUTRAL, 2); 48 47 add_event_handler('loc_end_element_set_unit', 'mps_loc_end_element_set_unit'); 49 50 } 51 else 52 { 48 } else { 53 49 // file containing all public handlers functions 54 50 include_once(MPS_PATH . 'include/public_events.inc.php'); … … 60 56 // form on photo page 61 57 add_event_handler('loc_end_picture', 'mps_prepar_tpl'); 62 add_event_handler('loc_end_picture', 'mps_ loc_end_picture');58 add_event_handler('loc_end_picture', 'mps_init_form_picture'); 63 59 } 64 60 … … 66 62 include_once(MPS_PATH . 'include/functions.inc.php'); 67 63 68 function mps_init() 69 { 64 function mps_init() { 70 65 global $prefixeTable; 71 66 … … 75 70 $maintain->autoUpdate(MPS_VERSION, 'install'); 76 71 77 $query='SELECT * FROM '.MPS_CONF_TABLE.';'; 78 if(pwg_db_num_rows(pwg_query($query))==0){ 79 single_insert( 80 $prefixeTable."mps_conf", 81 array( 82 'currency' => 'EUR', 83 ) 84 ); 85 } 72 $query=' 73 SELECT * 74 FROM '.MPS_CONF_TABLE.' 75 ;'; 76 77 if(pwg_db_num_rows(pwg_query($query))==0) { 78 single_insert( 79 $prefixeTable."mps_conf", 80 array( 81 'currency' => 'EUR', 82 ) 83 ); 84 } 86 85 87 86 // load plugin language file 88 87 load_language('plugin.lang', MPS_PATH); 89 90 88 } 91 89
Note: See TracChangeset
for help on using the changeset viewer.