Dotclear

source: plugins/pacKman/_install.php @ 2298

Revision 2298, 1.7 KB checked in by JcDenis, 14 years ago (diff)

pacKman 0.5

  • Switched to DC 2.2
  • Changed admin interface (easy, light, fast)
  • Added direct download button on repository (closes #449)
Line 
1<?php
2# -- BEGIN LICENSE BLOCK ----------------------------------
3# This file is part of pacKman, a plugin for Dotclear 2.
4#
5# Copyright (c) 2009-2010 JC Denis and contributors
6# jcdenis@gdwd.com
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# -- END LICENSE BLOCK ------------------------------------
12
13if (!defined('DC_CONTEXT_ADMIN')){return;}
14
15$new_version = $core->plugins->moduleInfo('pacKman','version');
16$old_version = $core->getVersion('pacKman');
17
18if (version_compare($old_version,$new_version,'>=')) return;
19
20try
21{
22     if (version_compare(DC_VERSION,'2.2-beta','<'))
23     {
24          throw new Exception('pacKman requires Dotclear 2.2');
25     }
26     
27     $core->blog->settings->addNamespace('pacKman');
28     $core->blog->settings->pacKman->put('packman_menu_plugins',false,'boolean','Add link to pacKman in plugins page',false,true);
29     $core->blog->settings->pacKman->put('packman_pack_overwrite',false,'boolean','Overwrite existing package',false,true);
30     $core->blog->settings->pacKman->put('packman_pack_filename','%type%-%id%','string','Name of package',false,true);
31     $core->blog->settings->pacKman->put('packman_secondpack_filename','%type%-%id%-%version%','string','Name of second package',false,true);
32     $core->blog->settings->pacKman->put('packman_pack_repository','','string','Path to package repository',false,true);
33     $core->blog->settings->pacKman->put('packman_pack_excludefiles','*.zip,*.tar,*.tar.gz,.directory','string','Extra files to exclude from package',false,true);
34     
35     $core->setVersion('pacKman',$new_version);
36     
37     return true;
38}
39catch (Exception $e)
40{
41     $core->error->add($e->getMessage());
42}
43return false;
44?>
Note: See TracBrowser for help on using the repository browser.

Sites map