Changeset 11948 for extensions/imgpreview/maintain.inc.php
- Timestamp:
- Aug 14, 2011, 7:07:14 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/imgpreview/maintain.inc.php
r11091 r11948 7 7 INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment) 8 8 VALUES 9 ("imgpreview" , "600#600 " , "max-width#max-height");';9 ("imgpreview" , "600#600#true#true" , "max-width#max-height#title#opacity");'; 10 10 pwg_query($q); 11 11 … … 16 16 function plugin_activate() 17 17 { 18 global $prefixeTable; 18 global $prefixeTable, $conf; 19 //////////// Check Config 20 $query = ' 21 SELECT COUNT(*) AS result FROM '.CONFIG_TABLE.' 22 WHERE param IN (\'imgpreview\') 23 ;'; 24 $data_table = pwg_db_fetch_assoc(pwg_query($query)); 25 $exist = $data_table['result']; 26 if ( $exist == 0 ) 27 { 28 plugin_install(); 29 } 30 else { 31 load_conf_from_db(); 32 33 if (count(explode("#" , $conf['imgpreview']))!=4) 34 { 35 pwg_query('DELETE FROM '.CONFIG_TABLE.' WHERE param IN (\'imgpreview\')'); 36 pwg_query($q); 37 plugin_install(); 38 } 39 } 19 40 }//fin active 20 41
Note: See TracChangeset
for help on using the changeset viewer.