source: extensions/stripped/admin/upgrade.inc.php @ 31946

Last change on this file since 31946 was 30457, checked in by plg, 9 years ago

use conf_update_param instead of custom insert query

File size: 3.2 KB
Line 
1<?php
2
3if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
4
5global $prefixeTable, $conf, $stripped;
6
7if (!isset($conf['stripped']))
8{
9    $config = array(
10        'paramVersion'                                  => '2.3',
11       
12        'themeStyle'                                    => 'black',
13        'hideMenu'                                              => true,
14        'animatedMenu'                                  => true,
15        'noLowercase'                                   => false,
16        'albumType'                                             => 'small',
17        'albumFrame'                                    => true,
18        'thumbFrame'                                    => true,
19        'showThumbLegend'                               => false,
20
21        'showTitleOnBrowsePath'                 => false,
22        'imageFrame'                                    => true,
23        'imageCaption'                                  => 'title',
24        'imageArrows'                                   => false,
25        'navArrows'                                             => true,
26        'HDlightbox'                                    => true,
27        'forceLightboxOn'                               => false,
28        'defaultZoomSize'                               => 'fit',
29        'animatedTabs'                                  => true,
30        'infoTabAdminOnly'                              => false,
31        'defaultTab'                                    => "none",
32
33        'albumSize'                                             => "thumb",
34        'thumbSize'                                             => "thumb",
35        'imageSize'                                             => "medium",
36        'hdSize'                                                => "xxlarge",
37       
38        'imageAutosize'                                 => true,
39        'imageAutosizeMargin'                   => 60,
40        'imageAutosizeMinHeight'                => 200,
41
42        'imagePreload'                                  => false,
43        'imagePreloadNb'                                => 5,
44        'imagePreloadThumbs'                    => false,
45        'imagePreloadHD'                                => false,
46
47        'marginContainer'                               => 30,
48        'paddingContainer'                              => 10,
49        'highResClickMode'                              => 'zoom',
50        'maxThumb'                                              => 15,
51      );
52
53  conf_update_param('stripped', $config, true);
54} else {
55       
56        if (isset($stripped['animatedMenu']) & (!isset($stripped['themeStyle']))) {
57
58                $config = $stripped;
59                $config['themeStyle']='original';
60                $config['thumbFrame']=true;
61               
62                if ($stripped['showDescriptionInsteadOfTitle']) {
63                        $config['imageCaption']='description';
64                } else {
65                        $config['imageCaption']='title';
66                }
67
68                $config['HDlightbox']=true;
69                $config['forceLightboxOn']=false;
70                $config['imageArrows']=true;
71                $config['navArrows']=false;
72                $config['paramVersion']='2.3';
73                $config['albumType']='small';
74                $config['albumFrame']=$config['thumbFrame'];
75                $config['albumSize']='thumb';
76                $config['thumbSize']='thumb';
77                $config['imageSize']='medium';
78                $config['hdSize']='xxlarge';
79                 
80                conf_update_param('stripped', $config, true);
81       
82        } else {
83                if (isset($stripped['themeStyle']) & (!isset($stripped['paramVersion']))) {
84
85                        $config = $stripped;
86                        $config['paramVersion']='2.3';
87                        $config['albumType']='small';
88                        $config['albumFrame']=$config['thumbFrame'];
89                        $config['albumSize']='thumb';
90                        $config['thumbSize']='thumb';
91                        $config['imageSize']='medium';
92                        $config['hdSize']='xxlarge';
93                        $config['HDlightbox']=true;
94                        $config['forceLightboxOn']=false;
95                         
96                        conf_update_param('stripped', $config, true);
97               
98                } else {
99                       
100                        if ($stripped['paramVersion'] == '2.1') {
101                                $config = $stripped;
102                                $config['paramVersion']='2.3';
103                                $config['albumSize']='thumb';
104                                $config['thumbSize']='thumb';
105                                $config['imageSize']='medium';
106                                $config['hdSize']='xxlarge';
107                                $config['HDlightbox']=true;
108                                $config['forceLightboxOn']=false;
109                                conf_update_param('stripped', $config, true);
110                        }
111
112                        if ($stripped['paramVersion'] == '2.2') {
113                                $config = $stripped;
114                                $config['paramVersion']='2.3';
115                                $config['HDlightbox']=true;
116                                $config['forceLightboxOn']=false;
117                                conf_update_param('stripped', $config, true);
118                        }
119                               
120                }
121
122        }
123
124        }
125?>
Note: See TracBrowser for help on using the repository browser.