本文整理汇总了PHP中Settings::Set方法的典型用法代码示例。如果您正苦于以下问题:PHP Settings::Set方法的具体用法?PHP Settings::Set怎么用?PHP Settings::Set使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Settings
的用法示例。
在下文中一共展示了Settings::Set方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: initAccount
public function initAccount($certrow, $isFroxlorVhost = false)
{
// Let's see if we have the private accountkey
$this->accountKey = $certrow['leprivatekey'];
if (!$this->accountKey || $this->accountKey == 'unset' || Settings::Get('system.letsencryptca') != 'production') {
// generate and save new private key for account
// ---------------------------------------------
$this->log('Starting new account registration');
$keys = $this->generateKey();
// Only store the accountkey in production, in staging always generate a new key
if (Settings::Get('system.letsencryptca') == 'production') {
if ($isFroxlorVhost) {
Settings::Set('system.lepublickey', $keys['public']);
Settings::Set('system.leprivatekey', $keys['private']);
} else {
$upd_stmt = Database::prepare("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `lepublickey` = :public, `leprivatekey` = :private " . "WHERE `customerid` = :customerid;");
Database::pexecute($upd_stmt, array('public' => $keys['public'], 'private' => $keys['private'], 'customerid' => $certrow['customerid']));
}
}
$this->accountKey = $keys['private'];
$response = $this->postNewReg();
if ($this->client->getLastCode() != 201) {
throw new \RuntimeException("Account not initialized, probably due to rate limiting. Whole response: " . json_encode($response));
}
$this->license = $this->client->getAgreementURL();
// Terms of Servce are optional according to ACME specs; if no ToS are presented, no need to update registration
if (!empty($this->license)) {
$this->postRegAgreement(parse_url($this->client->getLastLocation(), PHP_URL_PATH));
}
$this->log('New account certificate registered');
} else {
$this->log('Account already registered. Continuing.');
}
}
示例2: updateToVersion
/**
* Function updateToVersion
*
* updates the panel.version field
* to the given value (no checks here!)
*
* @param string $new_version new-version
*
* @return bool true on success, else false
*/
function updateToVersion($new_version = null)
{
if ($new_version !== null && $new_version != '') {
$upd_stmt = Database::prepare("\n\t\t\t\tUPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = :newversion\n\t\t\t\tWHERE `settinggroup` = 'panel' AND `varname` = 'version'");
Database::pexecute($upd_stmt, array('newversion' => $new_version));
Settings::Set('panel.version', $new_version);
return true;
}
return false;
}
示例3: storeSettingFieldInsertBindTask
function storeSettingFieldInsertBindTask($fieldname, $fielddata, $newfieldvalue)
{
if (is_array($fielddata) && isset($fielddata['settinggroup']) && $fielddata['settinggroup'] != '' && isset($fielddata['varname']) && $fielddata['varname'] != '') {
if (Settings::Set($fielddata['settinggroup'] . '.' . $fielddata['varname'], $newfieldvalue) !== false) {
return array($fielddata['settinggroup'] . '.' . $fielddata['varname'] => $newfieldvalue);
} else {
return false;
}
} else {
return false;
}
}
示例4: storeSettingIpAddress
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Functions
*
*/
function storeSettingIpAddress($fieldname, $fielddata, $newfieldvalue)
{
$returnvalue = storeSettingField($fieldname, $fielddata, $newfieldvalue);
if ($returnvalue !== false && is_array($fielddata) && isset($fielddata['settinggroup']) && $fielddata['settinggroup'] == 'system' && isset($fielddata['varname']) && $fielddata['varname'] == 'ipaddress') {
$mysql_access_host_array = array_map('trim', explode(',', Settings::Get('system.mysql_access_host')));
$mysql_access_host_array[] = $newfieldvalue;
$mysql_access_host_array = array_unique(array_trim($mysql_access_host_array));
$mysql_access_host = implode(',', $mysql_access_host_array);
correctMysqlUsers($mysql_access_host_array);
Settings::Set('system.mysql_access_host', $mysql_access_host);
}
return $returnvalue;
}
示例5: GetEnabledPlugins
/**
* Retrieve a list of valid enabled plugins
* @return array Returns a list of enabled plugins, any orphaned plugins are disabled
*/
static function GetEnabledPlugins()
{
$enabled = Settings::Get('enabled_plugins');
$enabled = unserialize($enabled);
foreach ($enabled as $key => $plugin) {
$plugin_file = DOC_ROOT . "/cc-content/plugins/{$plugin}/{$plugin}.php";
if (!file_exists($plugin_file)) {
unset($enabled[$key]);
}
}
reset($enabled);
Settings::Set('enabled_plugins', serialize($enabled));
return $enabled;
}
示例6: checkLastGuid
/**
* Function checkLastGuid
*
* Checks if the system's last guid is not higher than the one saved
* in froxlor's database. If it's higher, froxlor needs to
* set its last guid to this one to avoid conflicts with libnss-users
*
* @param int guid (from froxlor database)
*
* @return null
*/
function checkLastGuid()
{
global $log, $cronlog;
$mylog = null;
if (isset($cronlog) && $cronlog instanceof FroxlorLogger) {
$mylog = $cronlog;
} else {
$mylog = $log;
}
$group_lines = array();
$group_guids = array();
$update_to_guid = 0;
$froxlor_guid = 0;
$result_stmt = Database::query("SELECT MAX(`guid`) as `fguid` FROM `" . TABLE_PANEL_CUSTOMERS . "`");
$result = $result_stmt->fetch(PDO::FETCH_ASSOC);
$froxlor_guid = $result['fguid'];
// possibly no customers yet or f*cked up lastguid settings
if ($froxlor_guid < Settings::Get('system.lastguid')) {
$froxlor_guid = Settings::Get('system.lastguid');
}
$g_file = '/etc/group';
if (file_exists($g_file)) {
if (is_readable($g_file)) {
if (true == ($groups = file_get_contents($g_file))) {
$group_lines = explode("\n", $groups);
foreach ($group_lines as $group) {
$group_guids[] = explode(":", $group);
}
foreach ($group_guids as $idx => $group) {
/**
* nogroup | nobody have very high guids
* ignore them
*/
if ($group[0] == 'nogroup' || $group[0] == 'nobody') {
continue;
}
$guid = isset($group[2]) ? (int) $group[2] : 0;
if ($guid > $update_to_guid) {
$update_to_guid = $guid;
}
}
// if it's lower, then froxlor's highest guid is the last
if ($update_to_guid < $froxlor_guid) {
$update_to_guid = $froxlor_guid;
} elseif ($update_to_guid == $froxlor_guid) {
// if it's equal, that means we already have a collision
// to ensure it won't happen again, increase the guid by one
$update_to_guid = (int) $update_to_guid++;
}
// now check if it differs from our settings
if ($update_to_guid != Settings::Get('system.lastguid')) {
$mylog->logAction(CRON_ACTION, LOG_NOTICE, 'Updating froxlor last guid to ' . $update_to_guid);
Settings::Set('system.lastguid', $update_to_guid);
}
} else {
$mylog->logAction(CRON_ACTION, LOG_NOTICE, 'File /etc/group not readable; cannot check for latest guid');
}
} else {
$mylog->logAction(CRON_ACTION, LOG_NOTICE, 'File /etc/group not readable; cannot check for latest guid');
}
} else {
$cronlog->logAction(CRON_ACTION, LOG_NOTICE, 'File /etc/group does not exist; cannot check for latest guid');
}
}
示例7: dirname
<?php
// Include required files
include_once dirname(dirname(__FILE__)) . '/cc-core/config/admin.bootstrap.php';
App::LoadClass('User');
// Establish page variables, objects, arrays, etc
Functions::RedirectIf($logged_in = User::LoginCheck(), HOST . '/login/');
$admin = new User($logged_in);
Functions::RedirectIf(User::CheckPermissions('admin_panel', $admin), HOST . '/myaccount/');
$page_title = 'CumulusClips Admin Panel - Dashboard';
$first_run = null;
// Execute post install / first run operations
if (isset($_GET['first_run']) && file_exists(DOC_ROOT . '/cc-install')) {
Settings::Set('version', CURRENT_VERSION);
Filesystem::Open();
Filesystem::Delete(DOC_ROOT . '/cc-install');
Filesystem::Close();
$first_run = true;
}
// Retrieve news from mothership
if (isset($_POST['news'])) {
$curl_handle = curl_init();
curl_setopt($curl_handle, CURLOPT_URL, MOTHERSHIP_URL . '/news/');
curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl_handle, CURLOPT_FOLLOWLOCATION, true);
$news = curl_exec($curl_handle);
curl_close($curl_handle);
$news = !empty($news) ? $news : '<strong>Nothing to report.</strong>';
exit($news);
}
// Retrieve Video totals
示例8: serialize
}
// Enable plugin
$enabled_plugins[] = $_GET['enable'];
Settings::Set('enabled_plugins', serialize($enabled_plugins));
// Output message
$plugin_info = Plugin::GetPluginInfo($_GET['enable']);
$message = $plugin_info->name . ' has been enabled.';
$message_type = 'success';
}
} else {
if (!empty($_GET['disable']) && !ctype_space($_GET['disable'])) {
// Uninstall plugin if applicable
$key = array_search($_GET['disable'], $enabled_plugins);
if ($key !== false && Plugin::ValidPlugin($_GET['disable'])) {
unset($enabled_plugins[$key]);
Settings::Set('enabled_plugins', serialize($enabled_plugins));
// Output message
$plugin_info = Plugin::GetPluginInfo($_GET['disable']);
$message = $plugin_info->name . ' has been disabled.';
$message_type = 'success';
}
}
}
}
// Retrieve plugins
foreach (glob(DOC_ROOT . '/cc-content/plugins/*') as $plugin_path) {
// Load plugin and retrieve it's info
$plugin_name = basename($plugin_path);
include_once "{$plugin_path}/{$plugin_name}.php";
// Store info for output
$plugin = new stdClass();
示例9: panel_customers
Database::query("ALTER TABLE `panel_traffic`\n \tDROP KEY `customerid`,\n \tADD FOREIGN KEY `fk_customer` (customerid)\n \tREFERENCES panel_customers(customerid)\n \tON UPDATE CASCADE ON DELETE CASCADE;");
Database::query("ALTER TABLE `panel_traffic_admins`\n \tDROP KEY `adminid`,\n \t\tADD FOREIGN KEY `fk_admin` (adminid)\n \tREFERENCES panel_admins(adminid)\n \tON UPDATE CASCADE ON DELETE CASCADE;");
// it seems there are occasions where diskspace info
// for deleted customers is still in the database.
// remove that, just in case
Database::query("DELETE FROM `panel_diskspace` WHERE customerid NOT IN (SELECT customerid FROM `panel_customers`)");
Database::query("ALTER TABLE `panel_diskspace`\n \tDROP KEY `customerid`,\n \tADD FOREIGN KEY `fk_customer` (customerid)\n \tREFERENCES panel_customers(customerid)\n \tON UPDATE CASCADE ON DELETE CASCADE;");
Database::query("ALTER TABLE `panel_diskspace_admins`\n \tDROP KEY `adminid`,\n \tADD FOREIGN KEY `fk_admin` (adminid)\n \tREFERENCES panel_admins(adminid)\n \tON UPDATE CASCADE ON DELETE CASCADE;");
Database::query("ALTER TABLE `panel_tickets`\n \tMODIFY COLUMN `adminid` INT(11) UNSIGNED NOT NULL,\n \tMODIFY COLUMN `customerid` INT(11) UNSIGNED DEFAULT NULL");
Database::query("UPDATE `panel_tickets` set customerid=NULL where customerid='0'");
Database::query("ALTER TABLE `panel_tickets`\n\t\tDROP KEY `customerid`,\n \t ADD FOREIGN KEY `fk_admin` (adminid)\n\t REFERENCES panel_admins(adminid)\n \t ON UPDATE CASCADE ON DELETE CASCADE,\n \tADD FOREIGN KEY `fk_customer` (customerid)\n \tREFERENCES panel_customers(customerid)\n \tON UPDATE CASCADE ON DELETE CASCADE;");
Database::query("ALTER TABLE `panel_ticket_categories`\n \tMODIFY COLUMN `adminid` INT(11) UNSIGNED DEFAULT NULL,\n \tADD FOREIGN KEY `fk_admin` (adminid)\n \tREFERENCES panel_admins(adminid)\n \tON UPDATE CASCADE ON DELETE CASCADE;");
// it seems there can be redirect codes for deleted
// domains. Delete those, too
Database::query("DELETE from `domain_redirect_codes` where did not in (select id from `panel_domains`)");
Database::query("ALTER TABLE `domain_redirect_codes`\n \tADD PRIMARY KEY `pk` (`rid`,`did`),\n \tADD FOREIGN KEY `fk_redirect` (`rid`)\n\t REFERENCES redirect_codes(id)\n \t ON UPDATE CASCADE ON DELETE CASCADE,\n \tADD FOREIGN KEY `fk_domain` (did)\n \tREFERENCES panel_domains(id)\n \tON UPDATE CASCADE ON DELETE CASCADE;");
Database::query("ALTER TABLE `domain_ssl_settings`\n \tMODIFY COLUMN `domainid` INT(11) UNSIGNED NOT NULL,\n \tADD FOREIGN KEY `fk_domain` (domainid)\n \tREFERENCES panel_domains(id)\n \tON UPDATE CASCADE ON DELETE CASCADE;");
Database::query("ALTER TABLE `panel_domaintoip`\n \tADD FOREIGN KEY `fk_domain` (id_domain)\n \tREFERENCES panel_domains(id)\n \tON UPDATE CASCADE ON DELETE CASCADE,\n \tADD FOREIGN KEY `fk_ipandport` (id_ipandports)\n \tREFERENCES panel_ipsandports(id)\n \tON UPDATE CASCADE ON DELETE CASCADE;");
Database::query("ALTER TABLE `ftp_quotalimits`\n\t\tADD PRIMARY KEY `pk` (`name`, `quota_type`);");
Database::query("ALTER TABLE `ftp_quotatallies`\n\t\tADD PRIMARY KEY `pk` (`name`, `quota_type`);");
// add setting for webserver group
Settings::AddNew('system.customerdir_group_webserver', '0');
// add multinode version
Settings::AddNew('multinode.version', '0.0.1.0');
}
if (MN_getVersion() == array(0, 0, 1, 0)) {
showUpdateStep("Updating to multinode 0.0.2.0", false);
Database::query("CREATE TABLE `panel_nodes` (\n \t\t`id` int(11) unsigned NOT NULL AUTO_INCREMENT,\n \t\t`name` varchar(64) NOT NULL,\n \t\t`image_name` varchar(128) NOT NULL,\n \t\t`image_tag` varchar(128) DEFAULT 'latest' NOT NULL,\n \t\t`is_default` tinyint(1) DEFAULT '0',\n \t\tPRIMARY KEY (`id`)\n\t\t) ENGINE=InnoDB CHARSET=utf8 COLLATE=utf8_general_ci;");
Database::query("CREATE TABLE `panel_nodetodomain` (\n \t\t`id_node` int(11) unsigned NOT NULL,\n \t\t`id_domain` int(11) unsigned NOT NULL,\n \t\tPRIMARY KEY (`id_node`,`id_domain`),\n \t\tFOREIGN KEY `fk_node` (id_node)\n \t\t\tREFERENCES panel_nodes(id)\n \t\tON UPDATE CASCADE ON DELETE CASCADE,\n \t\tFOREIGN KEY `fk_domain` (id_domain)\n \t\t\tREFERENCES panel_domains(id)\n \t\tON UPDATE CASCADE ON DELETE CASCADE\n\t\t) ENGINE=InnoDB CHARSET=utf8 COLLATE=utf8_general_ci;");
Settings::Set('multinode.version', '0.0.2.0');
}
示例10: eval
if (Settings::Get('panel.version') == null || Settings::Get('panel.version') == '') {
Settings::Set('panel.version', '1.4.2.1');
}
if (Settings::Get('system.dbversion') == null || Settings::Get('system.dbversion') == '') {
/**
* for syscp-stable (1.4.2.1) this value has to be 0
* so the required table-fields are added correctly
* and the svn-version has its value in the database
* -> bug #54
*/
$result_stmt = Database::query("\n\t\t\t\tSELECT `value` FROM `" . TABLE_PANEL_SETTINGS . "` WHERE `varname` = 'dbversion'");
$result = $result_stmt->fetch(PDO::FETCH_ASSOC);
if (isset($result['value'])) {
Settings::Set('system.dbversion', (int) $result['value'], false);
} else {
Settings::Set('system.dbversion', 0, false);
}
}
}
if (hasUpdates($version)) {
$successful_update = false;
$message = '';
if (isset($_POST['send']) && $_POST['send'] == 'send') {
if (isset($_POST['update_preconfig']) && isset($_POST['update_changesagreed']) && intval($_POST['update_changesagreed']) != 0 || !isset($_POST['update_preconfig'])) {
eval("echo \"" . getTemplate('update/update_start') . "\";");
include_once './install/updatesql.php';
$redirect_url = 'admin_index.php?s=' . $s;
eval("echo \"" . getTemplate('update/update_end') . "\";");
updateCounters();
inserttask('1');
@chmod('./lib/userdata.inc.php', 0440);
示例11: header
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Install
*
*/
if (!defined('AREA') || defined('AREA') && AREA != 'admin' || !isset($userinfo['loginname']) || isset($userinfo['loginname']) && $userinfo['loginname'] == '') {
header('Location: ../../../index.php');
exit;
}
$updateto = '0.9-r0';
$frontend = 'froxlor';
showUpdateStep("Upgrading SysCP " . Settings::Get('panel.version') . " to Froxlor " . $updateto, false);
updateToVersion($updateto);
// add field frontend
Database::query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` SET\n\t`settinggroup` = 'panel',\n\t`varname` = 'frontend',\n\t`value` = 'froxlor'");
Settings::Set('panel.frontend', $frontend);
示例12:
Settings::Set('opf_email_filter', $data["email_filter"], false);
} else {
Settings::Set('opf_email_filter', 1, false);
}
if (isset($data["mailto_filter"])) {
Settings::Set('opf_mailto_filter', $data["mailto_filter"], false);
} else {
Settings::Set('opf_mailto_filter', 1, false);
}
Settings::Set('opf_js_mailto', 1, false);
Settings::Set('opf_short_url', 0, false);
Settings::Set('opf_css_to_head', 1, false);
if (isset($data["at_replacement"])) {
Settings::Set('opf_at_replacement', $data["at_replacement"], false);
} else {
Settings::Set('opf_at_replacement', "(at)", false);
}
if (isset($data["dot_replacement"])) {
Settings::Set('opf_dot_replacement', $data["dot_replacement"], false);
} else {
Settings::Set('opf_dot_replacement', "(dot)", false);
}
//finally delete the old table as its no longer needed
$table = TABLE_PREFIX . 'mod_output_filter';
$database->query("DROP TABLE IF EXISTS `{$table}`");
//Setting Version
include "info.php";
Settings::Set("opf_version", $module_version);
Settings::Set('opf_insert_be', 1);
Settings::Set('opf_css_to_head_be', 1);
示例13: simplexml_load_file
// Validate theme
$language_file = DOC_ROOT . '/cc-content/languages/' . $_GET['deactivate'] . '.xml';
if (array_key_exists($_GET['deactivate'], $active_languages)) {
$xml = simplexml_load_file($language_file);
unset($active_languages[$_GET['deactivate']]);
Settings::Set('active_languages', serialize($active_languages));
$message = $xml->information->lang_name . ' has been deactivated.';
$message_type = 'success';
}
} else {
if (!empty($_GET['default']) && !ctype_space($_GET['default'])) {
// Validate language
$language_file = DOC_ROOT . '/cc-content/languages/' . $_GET['default'] . '.xml';
if (array_key_exists($_GET['default'], $active_languages) && file_exists($language_file)) {
$xml = simplexml_load_file($language_file);
Settings::Set('default_language', $_GET['default']);
$message = $xml->information->lang_name . ' is now the default language.';
$message_type = 'success';
}
}
}
}
}
// Retrieve languages
foreach (glob(DOC_ROOT . '/cc-content/languages/*') as $language) {
$lang = new stdClass();
$lang->filename = basename($language, '.xml');
$lang->active = array_key_exists($lang->filename, $active_languages) ? true : false;
$lang->default = $lang->filename == Settings::Get('default_language') ? true : false;
$lang->xml = simplexml_load_file($language);
$lang_list[] = $lang;
示例14: showUpdateStep
if (isDatabaseVersion('201604270')) {
showUpdateStep("Adding new dns related tables and settings");
$enable_dns = isset($_POST['enable_dns']) ? (int) $_POST['enable_dns'] : "0";
Settings::AddNew("system.dnsenabled", $enable_dns);
Database::query("DROP TABLE IF EXISTS `domain_dns_entries`;");
$sql = "CREATE TABLE `domain_dns_entries` (\n\t\t`id` int(20) NOT NULL auto_increment,\n\t\t`domain_id` int(15) NOT NULL,\n\t\t`record` varchar(255) NOT NULL,\n\t\t`type` varchar(10) NOT NULL DEFAULT 'A',\n\t\t`content` text NOT NULL,\n\t\t`ttl` int(11) NOT NULL DEFAULT '18000',\n\t\t`prio` int(11) DEFAULT NULL,\n\t\tPRIMARY KEY (`id`)\n\t\t) DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;";
Database::query($sql);
lastStepStatus(0);
updateToDbVersion('201605090');
}
if (isDatabaseVersion('201605090')) {
showUpdateStep("Adjusting SPF record setting");
$current_spf = Settings::Get('spf.spf_entry');
// @ IN TXT "v=spf1 a mx -all"
$new_spf = substr($current_spf, strpos($current_spf, '"'));
Settings::Set('spf.spf_entry', $new_spf, true);
lastStepStatus(0);
updateToDbVersion('201605120');
}
if (isDatabaseVersion('201605120')) {
showUpdateStep("Adding new dns-server setting");
$new_dns_daemon = isset($_POST['new_dns_daemon']) ? $_POST['new_dns_daemon'] : "bind";
Settings::AddNew("system.dns_server", $new_dns_daemon);
lastStepStatus(0);
updateToDbVersion('201605170');
}
if (isDatabaseVersion('201605170')) {
showUpdateStep("Adding new dns-editor setting for customers");
Database::query("ALTER TABLE `" . TABLE_PANEL_CUSTOMERS . "` ADD `dnsenabled` tinyint(1) NOT NULL default '0' AFTER `perlenabled`;");
lastStepStatus(0);
updateToDbVersion('201605180');
示例15:
// get configuration settings
$enabled_captcha = $_POST['enabled_captcha'] == '1' ? 'true' : 'false';
$enabled_asp = $_POST['enabled_asp'] == '1' ? 'true' : 'false';
$captcha_type = $admin->add_slashes($_POST['captcha_type']);
// update settings
Settings::Set("enabled_captcha", $enabled_captcha);
Settings::Set("enabled_asp", $enabled_asp);
Settings::Set("captcha_type", $captcha_type);
// save text-captchas if they are set , so we dont forget em
if (isset($_POST['text_qa'])) {
// text question/answer
$text_qa = $admin->add_slashes($_POST['text_qa']);
//check for valid phrases
if (!preg_match('/### .*? ###/', $text_qa)) {
//set value
Settings::Set("ct_text", $text_qa);
}
}
// check if there is a database error, otherwise say successful
if ($database->is_error()) {
$admin->print_error($database->get_error(), $returnUrl, false);
} else {
$admin->print_success($MESSAGE['PAGES_SAVED'], $returnUrl);
}
} else {
// include captcha-file from here we get the "$useable_captchas" var
require_once WB_PATH . '/include/captcha/captcha.php';
// load text-captchas
$text_qa = CT_TEXT;
if ($text_qa == '') {
$text_qa = $MOD_CAPTCHA_CONTROL['CAPTCHA_TEXT_DESC'];