Ignore:
Timestamp:
Dec 17, 2014, 8:55:48 AM (10 years ago)
Author:
ddtddt
Message:

[extensions] - see_photos_by_user - inisialise conf install

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/see_photos_by_user/maintain.class.php

    r30429 r30768  
    1818  function activate($plugin_version, &$errors=array())
    1919  {
     20      global $conf;
     21    if (!isset($conf['see_photos_by_user_nbphotos'])) {
     22        conf_update_param('see_photos_by_user_nbphotos', '0',true);
     23    }
     24    if (!isset($conf['see_photos_by_user_limit'])) {
     25        conf_update_param('see_photos_by_user_limit', '1000',true);
     26    }
     27    if (!isset($conf['see_photos_by_user_order'])) {
     28        conf_update_param('see_photos_by_user_order', 'username ASC');
     29    }
     30    if (!isset($conf['see_photos_by_user_show'])||$conf['see_photos_by_user_show']>2) {
     31        conf_update_param('see_photos_by_user_show', '1',true);
     32    }
     33    if (!isset($conf['see_photos_by_user_show_user_home'])) {
     34        conf_update_param('see_photos_by_user_show_user_home', '1',true);
     35    }
     36    if (!isset($conf['see_photos_by_user_color'])) {
     37        conf_update_param('see_photos_by_user_color', '#ffffff',true);
     38    }
     39    if (!isset($conf['see_photos_by_user_shape'])) {
     40        conf_update_param('see_photos_by_user_shape', 'sphere',true);
     41    }
    2042 
    2143  }
     
    5476  {
    5577    conf_delete_param('see_photos_by_user_nbphotos');
    56     conf_delete_param('see_photos_by_user_limit');
    57     conf_delete_param('see_photos_by_user_order');
    58     conf_delete_param('see_photos_by_user_show');
    59     conf_delete_param('see_photos_by_user_color');
     78        conf_delete_param('see_photos_by_user_limit');
     79        conf_delete_param('see_photos_by_user_order');
     80        conf_delete_param('see_photos_by_user_show');
     81        conf_delete_param('see_photos_by_user_show_user_home');
     82        conf_delete_param('see_photos_by_user_color');
     83        conf_delete_param('see_photos_by_user_shape');
    6084  }
    6185}
Note: See TracChangeset for help on using the changeset viewer.