Dotclear

source: plugins/dcAdvancedCleaner/_prepend.php @ 2257

Revision 2257, 1.9 KB checked in by JcDenis, 13 years ago (diff)

dc 2.1.7

Line 
1<?php
2# -- BEGIN LICENSE BLOCK ----------------------------------
3# This file is part of dcAdvancedCleaner, 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_RC_PATH')) return;
14
15global $__autoload, $core;
16
17# Main class
18$__autoload['dcAdvancedCleaner'] = 
19     dirname(__FILE__).'/inc/class.dc.advanced.cleaner.php';
20
21# Behaviors class
22$__autoload['behaviorsDcAdvancedCleaner'] = 
23     dirname(__FILE__).'/inc/lib.dc.advanced.cleaner.behaviors.php';
24
25# Unsintaller class
26$__autoload['dcUninstaller'] = 
27     dirname(__FILE__).'/inc/class.dc.uninstaller.php';
28
29# Add tab on plugin admin page
30$core->addBehavior('pluginsToolsTabs',
31     array('behaviorsDcAdvancedCleaner','pluginsToolsTabs'));
32
33# Action on plugin deletion
34$core->addBehavior('pluginsBeforeDelete',
35     array('behaviorsDcAdvancedCleaner','pluginsBeforeDelete'));
36
37# Action on theme deletion
38$core->addBehavior('themeBeforeDelete',
39     array('behaviorsDcAdvancedCleaner','themeBeforeDelete'));
40
41# Tabs of dcAvdancedCleaner admin page
42$core->addBehavior('dcAdvancedCleanerAdminTabs',
43     array('behaviorsDcAdvancedCleaner','dcAdvancedCleanerAdminTabs'));
44
45# Add dcac events on plugin activityReport
46if (defined('ACTIVITY_REPORT'))
47{
48     require_once dirname(__FILE__).'/inc/lib.dc.advanced.cleaner.activityreport.php';
49}
50
51# DC 2.1.6 vs 2.2 settings
52function dcAdvancedCleanerSettings($core,$namespace='dcAdvancedCleaner')
53{
54     if (!version_compare(DC_VERSION,'2.1.7','<=')) { 
55          $core->blog->settings->addNamespace($namespace); 
56          return $core->blog->settings->{$namespace}; 
57     } else { 
58          $core->blog->settings->setNamespace($namespace); 
59          return $core->blog->settings; 
60     }
61}
62?>
Note: See TracBrowser for help on using the repository browser.

Sites map