source: extensions/see_photos_by_user/maintain.class.php @ 30439

Last change on this file since 30439 was 30429, checked in by ddtddt, 9 years ago

[extensions] - see_photos_by_user use new url

File size: 1.7 KB
Line 
1<?php
2defined('PHPWG_ROOT_PATH') or die('Hacking attempt!');
3
4class see_photos_by_user_maintain extends PluginMaintain
5{
6  private $installed = false;
7
8  function __construct($plugin_id)
9  {
10    parent::__construct($plugin_id);
11  }
12
13  function install($plugin_version, &$errors=array())
14  {
15   
16  }
17
18  function activate($plugin_version, &$errors=array())
19  {
20 
21  }
22
23  function update($old_version, $new_version, &$errors=array())
24  {
25    global $conf;
26    if (!isset($conf['see_photos_by_user_nbphotos'])) {
27        conf_update_param('see_photos_by_user_nbphotos', '0',true);
28    }
29    if (!isset($conf['see_photos_by_user_limit'])) {
30        conf_update_param('see_photos_by_user_limit', '1000',true);
31    }
32    if (!isset($conf['see_photos_by_user_order'])) {
33        conf_update_param('see_photos_by_user_order', 'username ASC');
34    }
35    if (!isset($conf['see_photos_by_user_show'])||$conf['see_photos_by_user_show']>2) {
36        conf_update_param('see_photos_by_user_show', '1',true);
37    }
38    if (!isset($conf['see_photos_by_user_show_user_home'])) {
39        conf_update_param('see_photos_by_user_show_user_home', '1',true);
40    }
41    if (!isset($conf['see_photos_by_user_color'])) {
42        conf_update_param('see_photos_by_user_color', '#ffffff',true);
43    }
44    if (!isset($conf['see_photos_by_user_shape'])) {
45        conf_update_param('see_photos_by_user_shape', 'sphere',true);
46    }
47  }
48 
49  function deactivate()
50  {
51  }
52
53  function uninstall()
54  {
55    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');
60  }
61}
62?>
Note: See TracBrowser for help on using the repository browser.