Ignore:
Timestamp:
Mar 12, 2014, 11:28:47 PM (10 years ago)
Author:
Miklfe
Message:

Version de lancement

File:
1 edited

Legend:

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

    r27589 r27743  
    55Description: a litle shop for your piwigo.
    66Plugin URI: auto
    7 Author: Miklfe/Harry
     7Author: Miklfe
    88Author URI: http://piwitheme.fr
    99*/
     
    1313defined('PHPWG_ROOT_PATH') or die('Hacking attempt!');
    1414
    15 global $prefixeTable, $template, $conf;
     15global $prefixeTable;
    1616
    1717
     
    3131define('MPS_DIR',               PHPWG_ROOT_PATH . PWG_LOCAL_DIR . 'MyPiwiShop/');
    3232define('MPS_VERSION',           'auto');
    33 
    3433
    3534// init the plugin
     
    6766include_once(MPS_PATH . 'include/functions.inc.php');
    6867
    69 /**
    70  * plugin initialization
    71  */
    72 function mps_init()
     68 function mps_init()
    7369{
    74   global $conf, $template;
     70  global $prefixeTable;
    7571 
    7672  // apply upgrade if needed
    7773  include_once(MPS_PATH . 'maintain.inc.php');
    78   $maintain = new mps_maintain(MPS_ID);
     74  $maintain = new MyPiwiShop_maintain(MPS_ID);
    7975  $maintain->autoUpdate(MPS_VERSION, 'install');
    80  
    81  
     76 
     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        }
     86 
    8287  // load plugin language file
    8388  load_language('plugin.lang', MPS_PATH);
    8489 
     90}
     91
     92
     93
     94 
    8595 
    8696
    87 }
    8897
    8998
Note: See TracChangeset for help on using the changeset viewer.