Changeset 27743 for extensions/MyPiwiShop/main.inc.php
- Timestamp:
- Mar 12, 2014, 11:28:47 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/MyPiwiShop/main.inc.php
r27589 r27743 5 5 Description: a litle shop for your piwigo. 6 6 Plugin URI: auto 7 Author: Miklfe /Harry7 Author: Miklfe 8 8 Author URI: http://piwitheme.fr 9 9 */ … … 13 13 defined('PHPWG_ROOT_PATH') or die('Hacking attempt!'); 14 14 15 global $prefixeTable , $template, $conf;15 global $prefixeTable; 16 16 17 17 … … 31 31 define('MPS_DIR', PHPWG_ROOT_PATH . PWG_LOCAL_DIR . 'MyPiwiShop/'); 32 32 define('MPS_VERSION', 'auto'); 33 34 33 35 34 // init the plugin … … 67 66 include_once(MPS_PATH . 'include/functions.inc.php'); 68 67 69 /** 70 * plugin initialization 71 */ 72 function mps_init() 68 function mps_init() 73 69 { 74 global $ conf, $template;70 global $prefixeTable; 75 71 76 72 // apply upgrade if needed 77 73 include_once(MPS_PATH . 'maintain.inc.php'); 78 $maintain = new mps_maintain(MPS_ID);74 $maintain = new MyPiwiShop_maintain(MPS_ID); 79 75 $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 82 87 // load plugin language file 83 88 load_language('plugin.lang', MPS_PATH); 84 89 90 } 91 92 93 94 85 95 86 96 87 }88 97 89 98
Note: See TracChangeset
for help on using the changeset viewer.