1 | <?php |
---|
2 | # ***** BEGIN LICENSE BLOCK ***** |
---|
3 | # This file is part of daInstaller, a plugin for DotClear2. |
---|
4 | # Copyright (c) 2008-2011 Tomtom, Pep and contributors, for DotAddict.org. |
---|
5 | # All rights reserved. |
---|
6 | # |
---|
7 | # ***** END LICENSE BLOCK ***** |
---|
8 | if (!defined('DC_CONTEXT_ADMIN')) { return; } |
---|
9 | |
---|
10 | $m_version = $core->plugins->moduleInfo('daInstaller','version'); |
---|
11 | $i_version = $core->getVersion('daInstaller'); |
---|
12 | if (version_compare($i_version,$m_version,'>=')) { |
---|
13 | return; |
---|
14 | } |
---|
15 | |
---|
16 | # Settings compatibility test |
---|
17 | if (!version_compare(DC_VERSION,'2.2-x','<')) { |
---|
18 | $core->blog->settings->addNamespace('dainstaller'); |
---|
19 | $s = $core->blog->settings->dainstaller; |
---|
20 | } |
---|
21 | else { |
---|
22 | $core->blog->settings->setNamespace('dainstaller'); |
---|
23 | $s = $core->blog->settings; |
---|
24 | } |
---|
25 | |
---|
26 | # Création du setting |
---|
27 | $s->put( |
---|
28 | 'dainstaller_plugins_xml', |
---|
29 | 'http://update.dotaddict.org/dc2/plugins.xml', |
---|
30 | 'string','Plugins XML feed location',true,true |
---|
31 | ); |
---|
32 | $s->put( |
---|
33 | 'dainstaller_themes_xml', |
---|
34 | 'http://update.dotaddict.org/dc2/themes.xml', |
---|
35 | 'string','Themes XML feed location',true,true |
---|
36 | ); |
---|
37 | $s->put( |
---|
38 | 'dainstaller_allow_multi_install', |
---|
39 | false, |
---|
40 | 'boolean','Allow the multi-installation',true,true |
---|
41 | ); |
---|
42 | |
---|
43 | $daInstaller = new daInstaller($core); |
---|
44 | $daInstaller->check(true); |
---|
45 | unset($daInstaller); |
---|
46 | |
---|
47 | $core->setVersion('daInstaller',$m_version); |
---|
48 | return true; |
---|
49 | |
---|
50 | ?> |
---|