mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 18:48:21 -07:00
Use DEFAULT_CHARSET
constant instead of hardcoded string (#1734)
* Use `DEFAULT_CHARSET` constant instead of hardcoded string * Update CHANGELOG.md * Update defines.php * Update info.php * Updated * Update page_header.tpl * Update index.tpl * Update index.tpl
This commit is contained in:
parent
616a19351f
commit
e5aaaf4abd
20 changed files with 35 additions and 33 deletions
|
@ -57,15 +57,15 @@ if (isset($ffpInfo->streams)) {
|
|||
$result = '<span class="warnColor2">' . sprintf($lang['AUDIO_TRACK'], (!isset($stream->index) || $stream->index === 0) ? 1 : $stream->index) . '</span><br/>';
|
||||
if (isset($stream->tags->language)) {
|
||||
if (isset($stream->tags->title)) {
|
||||
$result .= '<b>' . mb_strtoupper($stream->tags->language, 'UTF-8') . ' (' . $stream->tags->title . ')' . '</b>';
|
||||
$result .= '<b>' . mb_strtoupper($stream->tags->language, DEFAULT_CHARSET) . ' (' . $stream->tags->title . ')' . '</b>';
|
||||
} else {
|
||||
$result .= '<b>' . mb_strtoupper($stream->tags->language, 'UTF-8') . '</b>';
|
||||
$result .= '<b>' . mb_strtoupper($stream->tags->language, DEFAULT_CHARSET) . '</b>';
|
||||
}
|
||||
$result .= '<br/>';
|
||||
}
|
||||
|
||||
if (!empty($stream->codec_name)) {
|
||||
$result .= sprintf($lang['AUDIO_CODEC'], $stream->codec_long_name, mb_strtoupper($stream->codec_name, 'UTF-8')) . '<br/>';
|
||||
$result .= sprintf($lang['AUDIO_CODEC'], $stream->codec_long_name, mb_strtoupper($stream->codec_name, DEFAULT_CHARSET)) . '<br/>';
|
||||
}
|
||||
if (!empty($stream->bit_rate)) {
|
||||
$result .= sprintf($lang['BITRATE'], humn_bitrate((int)$stream->bit_rate)) . '<br/>';
|
||||
|
@ -87,7 +87,7 @@ if (isset($ffpInfo->streams)) {
|
|||
$data = [
|
||||
'filesize' => sprintf($lang['FILESIZE'] . ': <b>%s</b>', humn_size($ffpInfo->format->size)),
|
||||
'resolution' => (!$isAudio && isset($videoCodecInfo)) ? sprintf($lang['RESOLUTION'], $videoCodecInfo->width . 'x' . $videoCodecInfo->height) : '',
|
||||
'video_codec' => (!$isAudio && isset($videoCodecInfo->codec_name)) ? sprintf($lang['VIDEO_CODEC'], $videoCodecInfo->codec_long_name, mb_strtoupper($videoCodecInfo->codec_name, 'UTF-8')) : '',
|
||||
'video_codec' => (!$isAudio && isset($videoCodecInfo->codec_name)) ? sprintf($lang['VIDEO_CODEC'], $videoCodecInfo->codec_long_name, mb_strtoupper($videoCodecInfo->codec_name, DEFAULT_CHARSET)) : '',
|
||||
'audio_dub' => implode('<hr/>', $audioDub)
|
||||
];
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@ switch ($this->request['type']) {
|
|||
if ($post['post_id'] == $post['topic_first_post_id']) {
|
||||
$message = "[quote]" . $post['topic_title'] . "[/quote]\r";
|
||||
}
|
||||
if (mb_strlen($message, 'UTF-8') > 1000) {
|
||||
if (mb_strlen($message, DEFAULT_CHARSET) > 1000) {
|
||||
$this->response['redirect'] = make_url(POSTING_URL . '?mode=quote&' . POST_POST_URL . '=' . $post_id);
|
||||
}
|
||||
|
||||
|
@ -112,7 +112,7 @@ switch ($this->request['type']) {
|
|||
if ($post['poster_id'] != $userdata['user_id'] && !$is_auth['auth_mod']) {
|
||||
$this->ajax_die($lang['EDIT_OWN_POSTS']);
|
||||
}
|
||||
if ((mb_strlen($post['post_text'], 'UTF-8') > 1000) || $post['post_attachment'] || ($post['topic_first_post_id'] == $post_id)) {
|
||||
if ((mb_strlen($post['post_text'], DEFAULT_CHARSET) > 1000) || $post['post_attachment'] || ($post['topic_first_post_id'] == $post_id)) {
|
||||
$this->response['redirect'] = make_url(POSTING_URL . '?mode=editpost&' . POST_POST_URL . '=' . $post_id);
|
||||
} elseif ($this->request['type'] == 'editor') {
|
||||
$text = (string)$this->request['text'];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue