本文整理汇总了PHP中Plugin::deleteAllSettings方法的典型用法代码示例。如果您正苦于以下问题:PHP Plugin::deleteAllSettings方法的具体用法?PHP Plugin::deleteAllSettings怎么用?PHP Plugin::deleteAllSettings使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Plugin
的用法示例。
在下文中一共展示了Plugin::deleteAllSettings方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
<?php
/*
| pawedWolf Themer Plugin
| @file ./uninstall.php
| @author svanlaere
| @version 1.1.0 [1.1.0] - Stable
|
| @license GPL License
| @copyright Copyright © 2015 svanlaere
*/
if (!defined("IN_CMS")) {
exit;
}
// DELETE SETTINGS
Plugin::deleteAllSettings("themer");
示例2: 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'));
示例3: redirect
* You should have received a copy of the GNU General Public License
* along with Fresh CMS. If not, see <http://www.gnu.org/licenses/>.
*
* Fresh CMS has made an exception to the GNU General Public License for plugins.
* See exception.txt for details and the full text.
*/
/* Security measure */
if (!defined('IN_CMS')) {
exit;
}
/**
* The BackupRestore plugin provides administrators with the option of backing
* up their pages and settings to an XML file.
*
* @package plugins
* @subpackage backup_restore
*
* @author Jules Piccotti <julpi@jules.it>
* @author Martijn van der Kleijn <martijn.niji@gmail.com>
* @version 0.0.1
* @since Fresh CMS version 0.6.0
* @license http://www.gnu.org/licenses/gpl.html GPLv3 License
* @copyright Martijn van der Kleijn, 2009
*/
if (Plugin::deleteAllSettings('backup_restore') === false) {
Flash::set('error', __('Unable to remove plugin settings.'));
redirect(get_url('setting'));
} else {
Flash::set('success', __('Successfully uninstalled plugin.'));
redirect(get_url('setting'));
}
示例4: 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'));
示例5: defined
<?php
defined('IN_CMS') || exit;
$images = serialize(array('gif', 'jpg', 'jpeg', 'png'));
$settings = array('version' => '2.1.0', 'filemanager_enabled' => '1', 'filemanager_base' => 'public/images', 'filemanager_view' => 'grid', 'filemanager_images' => $images, 'filemanager_dateformat' => 'd M Y H:i', 'filemanager_browse_only' => '0', 'filemanager_upload_overwrite' => '0', 'filemanager_upload_images_only' => '0', 'filemanager_upload_size' => '0');
$old = Plugin::getAllSettings('ckeditor');
//Other ckeditor filter
if (isset($old['fileBrowserRootUri'])) {
$settings['filemanager_base'] = trim($old['fileBrowserRootUri'], '/');
} else {
if (isset($old['filemanager_base'])) {
$settings = $old;
$settings['version'] = '2.1.0';
}
}
// Remove all settings from db
Plugin::deleteAllSettings('ckeditor');
// Insert the new ones
if (Plugin::setAllSettings($settings, 'ckeditor')) {
Flash::setNow('success', __('CKEditor - plugin settings initialized.'));
}
if (!defined('USE_MOD_REWRITE') || !USE_MOD_REWRITE) {
Flash::set('info', __('FileManager will not ne ebabled if "MOD_REWRITE" is set to false'));
} else {
Flash::setNow('error', __('CKEditor - unable to store plugin settings!'));
}
示例6:
<?php
/*
/*
* Wolf CMS - Content Management Simplified. <http://www.wolfcms.org>
* Copyright (C) 2014 Stefan Miller <linuxsmiller@gmail.com>
*/
/**
* The ShoppingCart - an administrative tool for shopping cart inventory.
*
* @package Plugins
* @subpackage shopping-cart
*
* @author Stefan Miller <linuxsmiller@gmail.com>
* Copyright (C) 2014 Stefan Miller <linuxsmiller@gmail.com>
* @license http://www.gnu.org/licenses/gpl.html GPLv3 license
*
*/
/* Security measure */
if (!defined('IN_CMS')) {
exit;
}
if (Plugin::deleteAllSettings('shopping_cart')) {
Flash::set('success', 'Shopping Cart - ' . __('uninstalled.'));
} else {
Flash::set('error', 'Shopping Cart - ' . __('unable to remove stored settings!'));
}
示例7: redirect
*/
/**
* The Comment plugin provides an interface to enable adding and moderating page comments.
*
* @package Plugins
* @subpackage comment
*
* @author Martijn van der Kleijn <martijn.niji@gmail.com>
* @copyright Martijn van der Kleijn, 2009
* @license http://www.gnu.org/licenses/gpl.html GPLv3 license
*/
/* Security measure */
if (!defined('IN_CMS')) {
exit;
}
if (Plugin::deleteAllSettings('comment') === false) {
Flash::set('error', __('Unable to delete plugin settings.'));
redirect(get_url('setting'));
}
$PDO = Record::getConnection();
if ($PDO->exec('DROP TABLE IF EXISTS ' . TABLE_PREFIX . 'comment') === false) {
Flash::set('error', __('Unable to drop table :tablename', array(':tablename' => TABLE_PREFIX . 'comment')));
redirect(get_url('setting'));
}
$driver = strtolower($PDO->getAttribute(Record::ATTR_DRIVER_NAME));
$ret = true;
if ($driver == 'mysql' || $driver == 'pgsql') {
$ret = $PDO->exec('ALTER TABLE ' . TABLE_PREFIX . 'page DROP comment_status');
} else {
if ($driver == 'sqlite') {
// Removing the indexes
示例8: dirname
/**
* Tagger Plugin for Wolf CMS <http://thehub.silentworks.co.uk/plugins/frog-cms/tagger.html>
* Alternate Mirror site <http://www.tbeckett.net/articles/plugins/tagger.xhtml>
* Copyright (C) 2008 - 2011 Andrew Smith <a.smith@silentworks.co.uk>
* Copyright (C) 2008 - 2011 Tyler Beckett <tyler@tbeckett.net>
*
* Dual licensed under the MIT (license/mit-license.txt)
* and GPL (license/gpl-license.txt) licenses.
*/
/**
* Tagger Utils
*/
$tagger_dir = dirname(__FILE__) . '/';
include_once $tagger_dir . "utils.php";
$PDO = Record::getConnection();
$driver = strtolower($PDO->getAttribute(Record::ATTR_DRIVER_NAME));
if ($driver == 'mysql') {
$query = $PDO->query("SELECT * FROM " . TABLE_PREFIX . "page WHERE behavior_id = 'tagger'");
if ($query->rowCount()) {
$page = $query->fetch(PDO::FETCH_ASSOC);
executioner(file($tagger_dir . 'sql/uninstall.sql'), array('{prefix}' => TABLE_PREFIX, '{page_id}' => $page['id']));
}
}
if (Plugin::deleteAllSettings('tagger') === false) {
Flash::set('error', __('Tagger: Unable to remove plugin settings.'));
redirect(get_url('setting'));
} else {
Flash::set('success', __('Tagger: Successfully removed plugin settings.'));
redirect(get_url('setting'));
}
示例9: dirname
<?php
/*
| Dashboard - Wolf CMS Dashboard Plugin
| @file ./uninstall.php
| @author SamBrishes <pytes@gmx.net>
| @version 1.1.1 [1.1.0] - Alpha
|
| @license X11 / MIT License
| @copyright Copyright © 2015 SamBrishes, pytesNET
| Copyright © 2011-2015 Martijn van der Kleijn <martijn.niji@gmail.com>
| Copyright © 2008-2011 Mika Tuupola
*/
if (!defined("IN_CMS")) {
die;
}
// INCLUDE WIDGET CLASS
include_once dirname(__FILE__) . "/system/DashboardWidgets.php";
// CALL WIDGET CALLBACKs
DashboardWidgets::loadWidgets();
$widgets = DashboardWidgets::$widgets;
foreach ($widgets as $key => $value) {
if (!empty($value["uninstall"]) && is_callable($value["uninstall"])) {
call_user_func($value["uninstall"]);
}
Plugin::deleteAllSettings("dashboard-" . $key);
}
// DELETE PLUGIN SETTINGS
Plugin::deleteAllSettings("dashboard");
示例10:
/*
* Wolf CMS - Content Management Simplified. <http://www.wolfcms.org>
* Copyright (C) 2008-2010 Martijn van der Kleijn <martijn.niji@gmail.com>
*
* This file is part of Wolf CMS. Wolf CMS is licensed under the GNU GPLv3 license.
* Please see license.txt for the full license text.
*/
/**
* The FileManager allows users to upload and manipulate files.
*
* Note - Mostly rewritten since Wolf CMS 0.6.0
*
* @package Plugins
* @subpackage file-manager
*
* @author Martijn van der Kleijn <martijn.niji@gmail.com>
* @copyright Martijn van der Kleijn, 2008-2010
* @license http://www.gnu.org/licenses/gpl.html GPLv3 license
*
* @todo Starting from PHP 5.3, use FileInfo
*/
/* Security measure */
if (!defined('IN_CMS')) {
exit;
}
if (Plugin::deleteAllSettings('file_manager')) {
Flash::set('success', 'File Manager - ' . __('uninstalled.'));
} else {
Flash::set('error', 'File Manager - ' . __('unable to remove stored settings!'));
}
示例11: VARCHAR
<?php
/*
| pawUsers An extended User Environment
| @file ./uninstall.php
| @author SamBrishes <pytes@gmx.net>
| @version 0.1.0 [0.1.0] - Alpha
|
| @license X11 / MIT License
| @copyright Copyright © 2015 pytesNET
*/
if (!defined("IN_CMS")) {
die;
}
// REMOVE DB AND PLUGIN STUFF
Plugin::deleteAllSettings("paw_users");
$conn = Record::getConnection();
$conn->exec("DROP TABLE " . TABLE_PREFIX . "user_meta");
$conn->exec("DROP TABLE " . TABLE_PREFIX . "blacklist");
$conn->exec("ALTER TABLE " . TABLE_PREFIX . "user DROP COLUMN ip");
$conn->exec("ALTER TABLE " . TABLE_PREFIX . "user DROP COLUMN blowfish");
$conn->exec("ALTER TABLE " . TABLE_PREFIX . "role DROP COLUMN label");
$conn->exec("ALTER TABLE " . TABLE_PREFIX . "plugin_settings MODIFY COLUMN value VARCHAR(255)");
unset($conn);