Ignore:
Timestamp:
Aug 14, 2011, 7:07:14 PM (13 years ago)
Author:
flop25
Message:

new parameters in database and managed by the admin page
fr lang updated
need translations

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/imgpreview/maintain.inc.php

    r11091 r11948  
    77INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment)
    88        VALUES
    9         ("imgpreview" , "600#600" , "max-width#max-height");';
     9        ("imgpreview" , "600#600#true#true" , "max-width#max-height#title#opacity");';
    1010    pwg_query($q);
    1111
     
    1616function plugin_activate()
    1717{
    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        }
    1940}//fin active
    2041
Note: See TracChangeset for help on using the changeset viewer.