当前位置: 首页>>代码示例>>PHP>>正文


PHP Installer::removeRoles方法代码示例

本文整理汇总了PHP中Installer::removeRoles方法的典型用法代码示例。如果您正苦于以下问题:PHP Installer::removeRoles方法的具体用法?PHP Installer::removeRoles怎么用?PHP Installer::removeRoles使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Installer的用法示例。


在下文中一共展示了Installer::removeRoles方法的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'));
开发者ID:realslacker,项目名称:Banner-Plugin,代码行数:24,代码来源:uninstall.php

示例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
开发者ID:realslacker,项目名称:Redirector-Plugin,代码行数:31,代码来源:uninstall.php

示例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'));
开发者ID:realslacker,项目名称:Downloads-Plugin,代码行数:27,代码来源:uninstall.php

示例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'));
开发者ID:realslacker,项目名称:Facts-Plugin,代码行数:22,代码来源:uninstall.php


注:本文中的Installer::removeRoles方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。