本文整理汇总了PHP中PMA_Message::decodeBB方法的典型用法代码示例。如果您正苦于以下问题:PHP PMA_Message::decodeBB方法的具体用法?PHP PMA_Message::decodeBB怎么用?PHP PMA_Message::decodeBB使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PMA_Message
的用法示例。
在下文中一共展示了PMA_Message::decodeBB方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getMessage
/**
* returns compiled message
*
* @return string complete message
*/
public function getMessage()
{
$message = $this->message;
if (0 === strlen($message)) {
$string = $this->getString();
if (isset($GLOBALS[$string])) {
$message = $GLOBALS[$string];
} elseif (0 === strlen($string)) {
$message = '';
} else {
$message = $string;
}
}
if ($this->isDisplayed()) {
$message = $this->getMessageWithIcon($message);
}
if (count($this->getParams()) > 0) {
$message = PMA_Message::format($message, $this->getParams());
}
$message = PMA_Message::decodeBB($message);
foreach ($this->getAddedMessages() as $add_message) {
$message .= $add_message;
}
return $message;
}
示例2: trigger_error
*/
if (!@extension_loaded('mbstring')) {
trigger_error(__('The mbstring PHP extension was not found and you seem to be using a multibyte charset. Without the mbstring extension phpMyAdmin is unable to split strings correctly and it may result in unexpected results.'), E_USER_WARNING);
}
/**
* Check whether session.gc_maxlifetime limits session validity.
*/
$gc_time = (int) @ini_get('session.gc_maxlifetime');
if ($gc_time < $GLOBALS['cfg']['LoginCookieValidity']) {
trigger_error(PMA_Message::decodeBB(__('Your PHP parameter [a@http://php.net/manual/en/session.configuration.php#ini.session.gc-maxlifetime@]session.gc_maxlifetime[/a] is lower that cookie validity configured in phpMyAdmin, because of this, your login will expire sooner than configured in phpMyAdmin.')), E_USER_WARNING);
}
/**
* Check whether LoginCookieValidity is limited by LoginCookieStore.
*/
if ($GLOBALS['cfg']['LoginCookieStore'] != 0 && $GLOBALS['cfg']['LoginCookieStore'] < $GLOBALS['cfg']['LoginCookieValidity']) {
trigger_error(PMA_Message::decodeBB(__('Login cookie store is lower than cookie validity configured in phpMyAdmin, because of this, your login will expire sooner than configured in phpMyAdmin.')), E_USER_WARNING);
}
/**
* Check if user does not have defined blowfish secret and it is being used.
*/
if (!empty($_SESSION['auto_blowfish_secret']) && empty($GLOBALS['cfg']['blowfish_secret'])) {
trigger_error(__('The configuration file now needs a secret passphrase (blowfish_secret).'), E_USER_WARNING);
}
/**
* Check for existence of config directory which should not exist in
* production environment.
*/
if (file_exists('./config')) {
trigger_error(__('Directory [code]config[/code], which is used by the setup script, still exists in your phpMyAdmin directory. You should remove it once phpMyAdmin has been configured.'), E_USER_WARNING);
}
/**
示例3: trigger_error
if (@extension_loaded('mbstring') && @ini_get('mbstring.func_overload') > 1) {
trigger_error($strMbOverloadWarning, E_USER_WARNING);
}
/**
* Nijel: mbstring is used for handling multibyte inside parser, so it is good
* to tell user something might be broken without it, see bug #1063149.
*/
if (!@extension_loaded('mbstring')) {
trigger_error($strMbExtensionMissing, E_USER_WARNING);
}
/**
* Check whether session.gc_maxlifetime limits session validity.
*/
$gc_time = (int) @ini_get('session.gc_maxlifetime');
if ($gc_time < $GLOBALS['cfg']['LoginCookieValidity']) {
trigger_error(PMA_Message::decodeBB($strSessionGCWarning), E_USER_WARNING);
}
/**
* Check if user does not have defined blowfish secret and it is being used.
*/
if (!empty($_SESSION['auto_blowfish_secret']) && empty($GLOBALS['cfg']['blowfish_secret'])) {
trigger_error($strSecretRequired, E_USER_WARNING);
}
/**
* Check for existence of config directory which should not exist in
* production environment.
*/
if (file_exists('./config')) {
trigger_error($strConfigDirectoryWarning, E_USER_WARNING);
}
/**
示例4: testDecodeBB
/**
* testing decodeBB method
*
* @param string $actual BB code string
* @param string $expected Expected decoded string
*
* @return void
*
* @dataProvider decodeBBDataProvider
*/
public function testDecodeBB($actual, $expected)
{
unset($GLOBALS['server']);
unset($GLOBALS['collation_connection']);
$this->assertEquals($expected, PMA_Message::decodeBB($actual));
}
示例5: testDecodeBB
/**
* testing decodeBB method
* @dataProvider decodeBBDataProvider
*/
public function testDecodeBB($actual, $expected)
{
$GLOBALS['lang'] = 'en';
$this->assertEquals($expected, PMA_Message::decodeBB($actual));
}
示例6: testDecodeBB
/**
* testing decodeBB method
*
* @param string $actual BB code string
* @param string $expected Expected decoded string
*
* @dataProvider decodeBBDataProvider
*/
public function testDecodeBB($actual, $expected)
{
$GLOBALS['lang'] = 'en';
$_SESSION[' PMA_token '] = 'token';
unset($GLOBALS['server']);
$this->assertEquals($expected, PMA_Message::decodeBB($actual));
}