Minor improvements (#1651)

* Minor improvements

* Update main.js

* Update main.js

* Update CHANGELOG.md
This commit is contained in:
Roman Kelesidis 2024-10-03 12:51:27 +07:00 committed by GitHub
commit ca81d99a71
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 13 additions and 12 deletions

View file

@ -19,8 +19,8 @@
- Fixed `md5()` deprecated in PHP 8.4 [\#1561](https://github.com/torrentpier/torrentpier/pull/1561) ([belomaxorka](https://github.com/belomaxorka))
- Increased `USEREMAIL_MAX_LENGTH` [\#1566](https://github.com/torrentpier/torrentpier/pull/1566) ([belomaxorka](https://github.com/belomaxorka))
- Disabled resizing for textarea tag [\#1638](https://github.com/torrentpier/torrentpier/pull/1638) ([belomaxorka](https://github.com/belomaxorka))
- Minor improvements [\#1570](https://github.com/torrentpier/torrentpier/pull/1570), [\#1571](https://github.com/torrentpier/torrentpier/pull/1571), [\#1575](https://github.com/torrentpier/torrentpier/pull/1575), [\#1589](https://github.com/torrentpier/torrentpier/pull/1589), [\#1592](https://github.com/torrentpier/torrentpier/pull/1592), [\#1605](https://github.com/torrentpier/torrentpier/pull/1605), [\#1611](https://github.com/torrentpier/torrentpier/pull/1611), [\#1612](https://github.com/torrentpier/torrentpier/pull/1612), [\#1615](https://github.com/torrentpier/torrentpier/pull/1615), [\#1627](https://github.com/torrentpier/torrentpier/pull/1627), [\#1633](https://github.com/torrentpier/torrentpier/pull/1633), [\#1641](https://github.com/torrentpier/torrentpier/pull/1641) ([belomaxorka](https://github.com/belomaxorka))
- Updated deps [\#1563](https://github.com/torrentpier/torrentpier/pull/1563), [\#1564](https://github.com/torrentpier/torrentpier/pull/1564), [\#1608](https://github.com/torrentpier/torrentpier/pull/1608), [\#1609](https://github.com/torrentpier/torrentpier/pull/1609), [\#1610](https://github.com/torrentpier/torrentpier/pull/1610), [\#1637](https://github.com/torrentpier/torrentpier/pull/1637), [\#1646](https://github.com/torrentpier/torrentpier/pull/1646), [\#1647](https://github.com/torrentpier/torrentpier/pull/1647) ([belomaxorka](https://github.com/belomaxorka))
- Minor improvements [\#1570](https://github.com/torrentpier/torrentpier/pull/1570), [\#1571](https://github.com/torrentpier/torrentpier/pull/1571), [\#1575](https://github.com/torrentpier/torrentpier/pull/1575), [\#1589](https://github.com/torrentpier/torrentpier/pull/1589), [\#1592](https://github.com/torrentpier/torrentpier/pull/1592), [\#1605](https://github.com/torrentpier/torrentpier/pull/1605), [\#1611](https://github.com/torrentpier/torrentpier/pull/1611), [\#1612](https://github.com/torrentpier/torrentpier/pull/1612), [\#1615](https://github.com/torrentpier/torrentpier/pull/1615), [\#1627](https://github.com/torrentpier/torrentpier/pull/1627), [\#1633](https://github.com/torrentpier/torrentpier/pull/1633), [\#1641](https://github.com/torrentpier/torrentpier/pull/1641), [\#1651](https://github.com/torrentpier/torrentpier/pull/1651) ([belomaxorka](https://github.com/belomaxorka))
- Updated deps [\#1563](https://github.com/torrentpier/torrentpier/pull/1563), [\#1564](https://github.com/torrentpier/torrentpier/pull/1564), [\#1608](https://github.com/torrentpier/torrentpier/pull/1608), [\#1609](https://github.com/torrentpier/torrentpier/pull/1609), [\#1610](https://github.com/torrentpier/torrentpier/pull/1610), [\#1637](https://github.com/torrentpier/torrentpier/pull/1637), [\#1646](https://github.com/torrentpier/torrentpier/pull/1646), [\#1647](https://github.com/torrentpier/torrentpier/pull/1647), [\#1650](https://github.com/torrentpier/torrentpier/pull/1650) ([belomaxorka](https://github.com/belomaxorka))
- New Crowdin updates [\#1569](https://github.com/torrentpier/torrentpier/pull/1569), [\#1572](https://github.com/torrentpier/torrentpier/pull/1572), [\#1573](https://github.com/torrentpier/torrentpier/pull/1573), [\#1574](https://github.com/torrentpier/torrentpier/pull/1574), [\#1588](https://github.com/torrentpier/torrentpier/pull/1588), [\#1590](https://github.com/torrentpier/torrentpier/pull/1590), [\#1600](https://github.com/torrentpier/torrentpier/pull/1600), [\#1601](https://github.com/torrentpier/torrentpier/pull/1601), [\#1606](https://github.com/torrentpier/torrentpier/pull/1606), [\#1607](https://github.com/torrentpier/torrentpier/pull/1607), [\#1625](https://github.com/torrentpier/torrentpier/pull/1625), [\#1626](https://github.com/torrentpier/torrentpier/pull/1626), [\#1629](https://github.com/torrentpier/torrentpier/pull/1629), [\#1630](https://github.com/torrentpier/torrentpier/pull/1630), [\#1631](https://github.com/torrentpier/torrentpier/pull/1631), [\#1632](https://github.com/torrentpier/torrentpier/pull/1632), [\#1639](https://github.com/torrentpier/torrentpier/pull/1639), [\#1640](https://github.com/torrentpier/torrentpier/pull/1640) ([Exileum](https://github.com/Exileum))
## [v2.4.4](https://github.com/torrentpier/torrentpier/tree/v2.4.4) (2024-07-22)

View file

@ -44,7 +44,8 @@ if (!$row = DB()->fetch_row($sql)) {
}
// Check m3u file exist
if (!$m3uFile = (new \TorrentPier\TorrServerAPI())->getM3UPath($row['attach_id'])) {
$torrServer = new \TorrentPier\TorrServerAPI();
if (!$m3uFile = $torrServer->getM3UPath($row['attach_id'])) {
bb_die($lang['ERROR_NO_ATTACHMENT']);
}
@ -77,7 +78,7 @@ foreach ($m3uData as $entry) {
// Validate file extension
$getExtension = pathinfo($title, PATHINFO_EXTENSION);
if ($getExtension === 'm3u') {
if ($getExtension === str_replace('.', '', $torrServer::M3U['extension'])) {
// Skip m3u files
continue;
}

View file

@ -132,7 +132,7 @@ class CronHelper
}
break;
default:
bb_simple_die('Invalid mode');
bb_simple_die("Invalid mode: $mode");
}
}
}

View file

@ -62,7 +62,7 @@ if (document.all) {
}
function imgFit(img, maxW) {
img.title = 'Размеры изображения: ' + img.width + ' x ' + img.height;
img.title = 'Image Dimensions: ' + img.width + ' x ' + img.height;
if (typeof (img.naturalHeight) === 'undefined') {
img.naturalHeight = img.height;
img.naturalWidth = img.width;
@ -70,13 +70,13 @@ function imgFit(img, maxW) {
if (img.width > maxW) {
img.height = Math.round((maxW / img.width) * img.height);
img.width = maxW;
img.title = 'Нажмите на изображение, чтобы посмотреть его в полный размер';
img.title = 'Click on the image to view it full size';
img.style.cursor = 'move';
return false;
} else if (img.width === maxW && img.width < img.naturalWidth) {
img.height = img.naturalHeight;
img.width = img.naturalWidth;
img.title = 'Размеры изображения: ' + img.naturalWidth + ' x ' + img.naturalHeight;
img.title = 'Image Dimensions: ' + img.naturalWidth + ' x ' + img.naturalHeight;
return false;
} else {
return true;
@ -324,14 +324,14 @@ Ajax.prototype = {
}
}
if (response.prompt_password) {
var user_password = prompt('Для доступа к данной функции, пожалуйста, введите свой пароль', '');
var user_password = prompt('To access this feature, please enter your password', '');
if (user_password) {
var req = ajax.request[action];
req.user_password = user_password;
ajax.exec(req);
} else {
ajax.clearActionState(action);
ajax.showErrorMsg('Введен неверный пароль');
ajax.showErrorMsg('Incorrect password entered');
}
} else if (response.prompt_confirm) {
if (window.confirm(response.confirm_msg)) {
@ -439,9 +439,9 @@ $(document).ready(function () {
var text = xml.statusText;
if (status === 200) {
status = '';
text = 'неверный формат данных';
text = 'invalid data format';
}
$(this).html("Ошибка в: <i>" + ajax.url + "</i><br /><b>" + status + " " + text + "</b>").show();
$(this).html("Error in: <i>" + ajax.url + "</i><br /><b>" + status + " " + text + "</b>").show();
ajax.setStatusBoxPosition($(this));
});