Revision 2613,
1.1 KB
checked in by JcDenis, 13 years ago
(diff) |
Private mode : version 1.5 - Cleaner release
|
Line | |
---|
1 | <?php |
---|
2 | # -- BEGIN LICENSE BLOCK ---------------------------------- |
---|
3 | # |
---|
4 | # This file is part of Private mode, a plugin for Dotclear 2. |
---|
5 | # |
---|
6 | # Copyright (c) 2008-2010 Osku and contributors |
---|
7 | # |
---|
8 | # Licensed under the GPL version 2.0 license. |
---|
9 | # A copy of this license is available in LICENSE file or at |
---|
10 | # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html |
---|
11 | # |
---|
12 | # -- END LICENSE BLOCK ------------------------------------ |
---|
13 | |
---|
14 | if (!defined('DC_CONTEXT_ADMIN')) { exit; } |
---|
15 | |
---|
16 | $new_version = $core->plugins->moduleInfo('private','version'); |
---|
17 | $current_version = $core->getVersion('private'); |
---|
18 | |
---|
19 | if (version_compare($current_version,$new_version,'>=')) { |
---|
20 | return; |
---|
21 | } |
---|
22 | |
---|
23 | $s = $core->blog->settings->private; |
---|
24 | |
---|
25 | $s->put('private_flag', |
---|
26 | false, |
---|
27 | 'boolean', |
---|
28 | 'Private mode activation flag', |
---|
29 | true,true |
---|
30 | ); |
---|
31 | |
---|
32 | $s->put('private_conauto_flag', |
---|
33 | false, |
---|
34 | 'boolean', |
---|
35 | 'Private mode automatic connection option', |
---|
36 | true,true |
---|
37 | ); |
---|
38 | |
---|
39 | $s->put('message', |
---|
40 | __('<h2>Private blog</h2><p class="message">You need the password to view this blog.</p>'), |
---|
41 | 'string', |
---|
42 | 'Private mode public welcome message', |
---|
43 | true,true |
---|
44 | ); |
---|
45 | |
---|
46 | $core->setVersion('private',$new_version); |
---|
47 | return true; |
---|
48 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.