コード例 #1
0
ファイル: Message.class.php プロジェクト: yszar/linuxwp
 /**
  * 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
0
ファイル: main.php プロジェクト: dingdong2310/g5_theme
 */
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
0
ファイル: main.php プロジェクト: s-kalaus/zkernel
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
0
 /**
  * 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
0
 /**
  * testing decodeBB method
  * @dataProvider decodeBBDataProvider
  */
 public function testDecodeBB($actual, $expected)
 {
     $GLOBALS['lang'] = 'en';
     $this->assertEquals($expected, PMA_Message::decodeBB($actual));
 }
コード例 #6
0
 /**
  * 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));
 }