本文整理汇总了PHP中Installer::removeTable方法的典型用法代码示例。如果您正苦于以下问题:PHP Installer::removeTable方法的具体用法?PHP Installer::removeTable怎么用?PHP Installer::removeTable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Installer
的用法示例。
在下文中一共展示了Installer::removeTable方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: use_helper
<?php
/*
* Banner Plugin for WolfCMS <http://www.wolfcms.org>
* Copyright (C) 2011 Shannon Brooks <shannon@brooksworks.com>
*
* 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: use_helper
* Redirector Plugin for WolfCMS <http://www.wolfcms.org>
* Copyright (c) 2011 Shannon Brooks <shannon@brooksworks.com>
* 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: use_helper
<?php
/*
* Downloads Plugin for WolfCMS <http://www.wolfcms.org>
* Copyright (C) 2011 Shannon Brooks <shannon@brooksworks.com>
*
* 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: use_helper
<?php
/*
* Facts Plugin for WolfCMS <http://www.wolfcms.org>
* Copyright (C) 2011 Shannon Brooks <shannon@brooksworks.com>
*/
// 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'));