Ignore:
Timestamp:
Nov 9, 2014, 11:00:26 PM (9 years ago)
Author:
ddtddt
Message:
 
File:
1 edited

Legend:

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

    r27442 r30403  
    11<?php
    22
    3 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
     3if (!defined('PHPWG_ROOT_PATH'))
     4    die('Hacking attempt!');
    45
    5 function plugin_activate()
    6 {
     6function plugin_activate() {
    77
    8 global $conf;
     8    global $conf;
    99
    10 if (!isset($conf['see_photos_by_user_nbphotos']))
    11  {
    12  conf_update_param('see_photos_by_user_nbphotos', '0');
    13  }
    14 if (!isset($conf['see_photos_by_user_limit']))
    15  {
    16  conf_update_param('see_photos_by_user_limit', '1000');
    17  }
    18 if (!isset($conf['see_photos_by_user_order']))
    19  {
    20  conf_update_param('see_photos_by_user_order', 'username ASC');
    21  }
    22 if (!isset($conf['see_photos_by_user_show']))
    23  {
    24  conf_update_param('see_photos_by_user_show', '1');
    25  }
     10    if (!isset($conf['see_photos_by_user_nbphotos'])) {
     11        conf_update_param('see_photos_by_user_nbphotos', '0');
     12    }
     13    if (!isset($conf['see_photos_by_user_limit'])) {
     14        conf_update_param('see_photos_by_user_limit', '1000');
     15    }
     16    if (!isset($conf['see_photos_by_user_order'])) {
     17        conf_update_param('see_photos_by_user_order', 'username ASC');
     18    }
     19    if (!isset($conf['see_photos_by_user_show'])) {
     20        conf_update_param('see_photos_by_user_show', '1');
     21    }
     22    if (!isset($conf['see_photos_by_user_color'])) {
     23        conf_update_param('see_photos_by_user_color', '#ffffff');
     24    }
    2625}
    2726
    28 function plugin_install()
    29 {       
     27function plugin_install() {
    3028}
    3129
    32 function plugin_uninstall()
    33 {       
    34 conf_delete_param('see_photos_by_user_nbphotos');
    35 conf_delete_param('see_photos_by_user_limit');
    36 conf_delete_param('see_photos_by_user_order');
    37 conf_delete_param('see_photos_by_user_show');
     30function plugin_uninstall() {
     31    conf_delete_param('see_photos_by_user_nbphotos');
     32    conf_delete_param('see_photos_by_user_limit');
     33    conf_delete_param('see_photos_by_user_order');
     34    conf_delete_param('see_photos_by_user_show');
     35    conf_delete_param('see_photos_by_user_color');
    3836}
    39 
    40 
    4137?>
Note: See TracChangeset for help on using the changeset viewer.