diff --git a/_admin/js/editor.js b/_admin/js/editor.js index 6f25150..e9644e9 100644 --- a/_admin/js/editor.js +++ b/_admin/js/editor.js @@ -636,6 +636,10 @@ document.addEventListener('DOMContentLoaded', function () { } }); + window.addEventListener('blur', function () { + altPressed = false; + }); + isAltPressed = function () { return altPressed; } diff --git a/_admin/templates/layout.php.inc b/_admin/templates/layout.php.inc index 30cb4b5..00645a2 100644 --- a/_admin/templates/layout.php.inc +++ b/_admin/templates/layout.php.inc @@ -37,7 +37,7 @@ if (!isset($this)) { - + diff --git a/_admin/templates/picture-manager.php.inc b/_admin/templates/picture-manager.php.inc index cc418dd..f921b3a 100644 --- a/_admin/templates/picture-manager.php.inc +++ b/_admin/templates/picture-manager.php.inc @@ -58,7 +58,7 @@ $maxFileSize = $bytesFromString(ini_get('upload_max_filesize')) - + diff --git a/_admin/templates/structure/structure.php.inc b/_admin/templates/structure/structure.php.inc index 3d0e942..7f0051d 100644 --- a/_admin/templates/structure/structure.php.inc +++ b/_admin/templates/structure/structure.php.inc @@ -1,6 +1,7 @@ @@ -24,7 +25,7 @@
- + diff --git a/_extensions/s2_blog/Controller/TagsPageController.php b/_extensions/s2_blog/Controller/TagsPageController.php index e3a63e4..1579533 100644 --- a/_extensions/s2_blog/Controller/TagsPageController.php +++ b/_extensions/s2_blog/Controller/TagsPageController.php @@ -69,7 +69,7 @@ public function body(Request $request, HtmlTemplate $template): ?Response if ($num) { $tags[] = [ 'title' => $tag_name[$id], - 'link' => S2_BLOG_TAGS_PATH . urlencode($tag_url[$id]) . '/', + 'link' => $this->blogUrlBuilder->tag($tag_url[$id]), 'num' => $num, ]; } diff --git a/_extensions/s2_blog/hooks/idx_start.php b/_extensions/s2_blog/hooks/idx_start.php deleted file mode 100644 index b823aac..0000000 --- a/_extensions/s2_blog/hooks/idx_start.php +++ /dev/null @@ -1,15 +0,0 @@ - 1) - { - $size /= 1024; - $i++; - } - - $lang_filesize = self::get('File size units'); - return sprintf(self::get('File size format'), self::number_format($size), $lang_filesize[$i]); - } - /** * Outputs integers using current language settings * diff --git a/_include/src/Image/ThumbnailGenerator.php b/_include/src/Image/ThumbnailGenerator.php index 8851080..8aedac1 100644 --- a/_include/src/Image/ThumbnailGenerator.php +++ b/_include/src/Image/ThumbnailGenerator.php @@ -25,7 +25,7 @@ public function __construct(QueuePublisher $publisher, string $cacheUrlPrefix, s { $this->publisher = $publisher; $this->cacheUrlPrefix = $cacheUrlPrefix; - $this->cacheFilesystemPrefix = $cacheFilesystemPrefix; + $this->cacheFilesystemPrefix = rtrim($cacheFilesystemPrefix, '/'); } /** diff --git a/_include/src/Pdo/PDOStatement.php b/_include/src/Pdo/PDOStatement.php index d590169..e7cec16 100644 --- a/_include/src/Pdo/PDOStatement.php +++ b/_include/src/Pdo/PDOStatement.php @@ -8,8 +8,8 @@ * 3. Updated code to PHP 8.2 * * @copyright 2023-2024 Roman Parpalak, based on code (c) 2021 Filis Futsarov - * @license MIT - * @package S2 + * @license MIT + * @package S2 */ declare(strict_types=1); @@ -40,7 +40,7 @@ public function bindParam( int|string $param, mixed &$var, int $type = NativePdo::PARAM_STR, - int $maxLength = null, + int $maxLength = 0, mixed $driverOptions = null ): bool { $this->bindings[$param] = $var; diff --git a/composer.lock b/composer.lock index 1aaea36..a631075 100644 --- a/composer.lock +++ b/composer.lock @@ -338,12 +338,12 @@ "source": { "type": "git", "url": "https://github.com/parpalak/admin-yard.git", - "reference": "53b007be272da7b874e744bd07e36aac8a7f5d91" + "reference": "edbea31ba558333cd4261a70f1c73aa51ff0a543" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/parpalak/admin-yard/zipball/53b007be272da7b874e744bd07e36aac8a7f5d91", - "reference": "53b007be272da7b874e744bd07e36aac8a7f5d91", + "url": "https://api.github.com/repos/parpalak/admin-yard/zipball/edbea31ba558333cd4261a70f1c73aa51ff0a543", + "reference": "edbea31ba558333cd4261a70f1c73aa51ff0a543", "shasum": "" }, "require": { @@ -383,7 +383,7 @@ "issues": "https://github.com/parpalak/admin-yard/issues", "source": "https://github.com/parpalak/admin-yard/tree/master" }, - "time": "2024-07-30T15:15:02+00:00" + "time": "2024-08-05T20:05:45+00:00" }, { "name": "s2/rose", @@ -3214,16 +3214,16 @@ }, { "name": "phpunit/phpunit", - "version": "11.2.9", + "version": "11.3.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "c197bbaaca360efda351369bf1fd9cc1ca6bcbf7" + "reference": "a8dce73a8938dfec7ac0daa91bdbcaae7d7188a3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c197bbaaca360efda351369bf1fd9cc1ca6bcbf7", - "reference": "c197bbaaca360efda351369bf1fd9cc1ca6bcbf7", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a8dce73a8938dfec7ac0daa91bdbcaae7d7188a3", + "reference": "a8dce73a8938dfec7ac0daa91bdbcaae7d7188a3", "shasum": "" }, "require": { @@ -3262,7 +3262,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "11.2-dev" + "dev-main": "11.3-dev" } }, "autoload": { @@ -3294,7 +3294,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/11.2.9" + "source": "https://github.com/sebastianbergmann/phpunit/tree/11.3.0" }, "funding": [ { @@ -3310,7 +3310,7 @@ "type": "tidelift" } ], - "time": "2024-07-30T11:09:23+00:00" + "time": "2024-08-02T03:56:43+00:00" }, { "name": "psr/http-client", diff --git a/index.php b/index.php index 43c472e..c2863f0 100644 --- a/index.php +++ b/index.php @@ -13,8 +13,6 @@ define('S2_ROOT', './'); require S2_ROOT . '_include/common.php'; -($hook = s2_hook('idx_start')) ? eval($hook) : null; - header('X-Powered-By: S2/' . S2_VERSION); // We create our own request URI with the path removed and only the parts to rewrite included @@ -32,8 +30,6 @@ $_SERVER['REQUEST_URI'] = $request_uri; } -($hook = s2_hook('idx_pre_redirect')) ? eval($hook) : null; - // // Redirect to the admin page //