Ignore:
Timestamp:
Mar 16, 2014, 7:16:27 PM (10 years ago)
Author:
Miklfe
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/MyPiwiShop/main.inc.php

    r27743 r27781  
    3535add_event_handler('init', 'mps_init');
    3636
    37 if (defined('IN_ADMIN'))
    38 {
     37if (defined('IN_ADMIN')) {
    3938  include_once(MPS_PATH . 'include/admin_events.inc.php');
    4039 
     
    4746  add_event_handler('element_set_global_action', 'mps_element_set_global_action', EVENT_HANDLER_PRIORITY_NEUTRAL, 2);
    4847  add_event_handler('loc_end_element_set_unit', 'mps_loc_end_element_set_unit');
    49 
    50 }
    51 else
    52 {
     48} else {
    5349  // file containing all public handlers functions
    5450  include_once(MPS_PATH . 'include/public_events.inc.php');
     
    6056  // form on photo page
    6157  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');
    6359}
    6460
     
    6662include_once(MPS_PATH . 'include/functions.inc.php');
    6763
    68  function mps_init()
    69 {
     64 function mps_init() {
    7065  global $prefixeTable;
    7166 
     
    7570  $maintain->autoUpdate(MPS_VERSION, 'install');
    7671 
    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  }
    8685 
    8786  // load plugin language file
    8887  load_language('plugin.lang', MPS_PATH);
    89  
    9088}
    9189
Note: See TracChangeset for help on using the changeset viewer.