Пример #1
0
<?php
/*
 * Banner Plugin for WolfCMS <http://www.wolfcms.org>
 * Copyright (C) 2011 Shannon Brooks <*****@*****.**>
 *
 * This file is part of Banner Plugin. Banner Plugin is licensed under the GNU GPLv3 license.
 * Please see license.txt for the full license text.
 */

// Security Measure
if (!defined('IN_CMS')) { exit(); }

use_helper('Installer');

if ( ! Installer::removeTable(TABLE_PREFIX.'banner') ) Installer::failUninstall( 'banner' );

if ( ! Installer::removePermissions('banner_view,banner_new,banner_edit,banner_delete,banner_settings') ) Installer::failUninstall( 'banner' );

if ( ! Installer::removeRoles('banner admin,banner manager') ) Installer::failUninstall( 'banner' );

if ( ! Plugin::deleteAllSettings('banner') ) Installer::failUninstall( 'banner', __('Could not remove plugin settings.') );

Flash::set('success', __('Successfully uninstalled plugin.'));
redirect(get_url('setting'));
Пример #2
0
 * Redirector Plugin for WolfCMS <http://www.wolfcms.org>
 * Copyright (c) 2011 Shannon Brooks <*****@*****.**>
 * Adapted from Redirector by Design Spike <http://designspike.ca>
 * Major contributions and original idea by Cody at Design Spike
 *
 * Licensed under the MIT license
 * http://www.opensource.org/licenses/mit-license.php
 *
 * Project home
 * http://www.github.com/realslacker/Redirector-Plugin
 */

//	security measure
if (!defined('IN_CMS')) { exit(); }

//	include the Installer helper
use_helper('Installer');

if ( ! Installer::removeTable(TABLE_PREFIX.'redirector_redirects') ) Installer::failUninstall( 'redirector', __('Could not remove table 1 of 2.') );
if ( ! Installer::removeTable(TABLE_PREFIX.'redirector_404s') ) Installer::failUninstall( 'redirector', __('Could not remove table 2 of 2.') );

if ( ! Installer::removePermissions('redirector_view,redirector_new,redirector_edit,redirector_delete,redirector_settings') ) Installer::failUninstall( 'redirector' );

if ( ! Installer::removeRoles('redirector admin,redirector editor,redirector user') ) Installer::failUninstall( 'redirector' );

if ( ! Plugin::deleteAllSettings('redirector') ) Installer::failUninstall( 'redirector', __('Could not remove plugin settings.') );

Flash::set('success', __('Successfully uninstalled plugin.'));
redirect(get_url('setting'));

// EOF
Пример #3
0
<?php
/*
 * Downloads Plugin for WolfCMS <http://www.wolfcms.org>
 * Copyright (C) 2011 Shannon Brooks <*****@*****.**>
 *
 * This file is part of Downloads Plugin. Downloads Plugin is licensed under the GNU GPLv3 license.
 * Please see license.txt for the full license text.
 */

// Security Measure
if (!defined('IN_CMS')) { exit(); }

//	include the Installer helper
use_helper('Installer');

if ( ! Installer::removeTable(TABLE_PREFIX.'downloads') ) Installer::failUninstall( 'downloads' );
if ( ! Installer::removeTable(TABLE_PREFIX.'downloadtags') ) Installer::failUninstall( 'downloads' );
if ( ! Installer::removeTable(TABLE_PREFIX.'downloads_tags') ) Installer::failUninstall( 'downloads' );

if ( ! Installer::removePermissions('downloads_view,downloads_new,downloads_edit,downloads_delete,downloads_settings') ) Installer::failUninstall( 'downloads' );

if ( ! Installer::removeRoles('download manager admin,download manager editor') ) Installer::failUninstall( 'downloads' );

if ( ! Plugin::deleteAllSettings('downloads') ) Installer::failUninstall( 'downloads', __('Could not remove plugin settings.') );

Flash::set('success', __('Successfully uninstalled plugin.'));
redirect(get_url('setting'));
Пример #4
0
<?php
/*
 * Facts Plugin for WolfCMS <http://www.wolfcms.org>
 * Copyright (C) 2011 Shannon Brooks <*****@*****.**>
 */

//	security measure
if (!defined('IN_CMS')) { exit(); }

//	include the Installer helper
use_helper('Installer');

if ( ! Installer::removeTable(TABLE_PREFIX.'facts') ) Installer::failUninstall( 'facts', __('Could not remove table 1 of 1.') );

if ( ! Installer::removePermissions('facts_view,facts_new,facts_edit,facts_delete') ) Installer::failUninstall( 'facts' );

if ( ! Installer::removeRoles('facts admin,facts editor,facts user') ) Installer::failUninstall( 'facts' );

if ( ! Plugin::deleteAllSettings('facts') ) Installer::failUninstall( 'facts', __('Could not remove plugin settings.') );

Flash::set('success', __('Successfully uninstalled plugin.'));
redirect(get_url('setting'));