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

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

[extensions] - see_photos_by_user new class install

File size: 1.6 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  }
45 
46  function deactivate()
47  {
48  }
49
50  function uninstall()
51  {
52    conf_delete_param('see_photos_by_user_nbphotos');
53    conf_delete_param('see_photos_by_user_limit');
54    conf_delete_param('see_photos_by_user_order');
55    conf_delete_param('see_photos_by_user_show');
56    conf_delete_param('see_photos_by_user_color');
57  }
58}
59?>
Note: See TracBrowser for help on using the repository browser.