This repository was archived by the owner on Dec 31, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path_install.php
More file actions
67 lines (57 loc) · 1.4 KB
/
_install.php
File metadata and controls
67 lines (57 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?php
# -- BEGIN LICENSE BLOCK ----------------------------------
#
# This file is part of construction, a plugin for Dotclear 2.
#
# Copyright (c) 2010 Osku and contributors
#
# Licensed under the GPL version 2.0 license.
# A copy of this license is available in LICENSE file or at
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
#
# -- END LICENSE BLOCK ------------------------------------
if (!defined('DC_CONTEXT_ADMIN')) { exit; }
$new_version = dcCore::app()->plugins->moduleInfo('construction','version');
$current_version = dcCore::app()->getVersion('construction');
if (version_compare($current_version,$new_version,'>=')) {
return;
}
dcCore::app()->blog->settings->addNamespace('construction');
$s =& dcCore::app()->blog->settings->construction;
$s->put('construction_flag',
false,
'boolean',
'Construction blog flag',
true,
true
);
$s->put('construction_allowed_ip',
serialize(array('127.0.0.1')),
'string',
'Construction blog allowed ip',
true,
true
);
$s->put('construction_title',
__('Work in progress'),
'string',
'Construction blog title',
true,
true
);
$s->put('construction_message',
__('<p>The blog is currently under construction.</p>'),
'string',
'Construction blog message',
true,
true
);
$s->put('construction_extra_urls',
serialize(array()),
'string',
'Construction blog message',
true,
true
);
dcCore::app()->setVersion('construction',$new_version);
return true;