From e2a04710122a47f30c1789da6df00de30888a1f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AB=8F=E8=A8=AA=E5=AD=90?= Date: Wed, 30 Aug 2023 12:42:15 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=82=E3=81=86=E5=B0=91=E3=81=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 6 ++++++ lib/exceptions/filenotstoredlocallyexception.php | 5 +---- lib/exceptions/usefileasthumbnailexception.php | 5 +---- lib/media/attachmentlistitem.php | 2 +- lib/util/framework.php | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ceb1e898a..78c77b0a44 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # GNU social - Log of Changes +## 2.1.0 - 2023-??-?? + +### 更新 + +- PHP 8.2対応 + ## 2.0.2 - 2023-08-21 ### Added diff --git a/lib/exceptions/filenotstoredlocallyexception.php b/lib/exceptions/filenotstoredlocallyexception.php index 6cac77bc78..02fd3385b4 100644 --- a/lib/exceptions/filenotstoredlocallyexception.php +++ b/lib/exceptions/filenotstoredlocallyexception.php @@ -7,12 +7,9 @@ class FileNotStoredLocallyException extends ServerException public $widgetOpts; public $scoped; - public $file = null; - public function __construct(File $file) { - $this->file = $file; - common_debug('Requested local URL for a file that is not stored locally with id=='._ve($this->file->getID())); + common_debug('Requested local URL for a file that is not stored locally with id=='._ve($file->getID())); parent::__construct(_('Requested local URL for a file that is not stored locally.')); } } diff --git a/lib/exceptions/usefileasthumbnailexception.php b/lib/exceptions/usefileasthumbnailexception.php index cdcc6ff018..5064faf31f 100644 --- a/lib/exceptions/usefileasthumbnailexception.php +++ b/lib/exceptions/usefileasthumbnailexception.php @@ -35,11 +35,8 @@ class UseFileAsThumbnailException extends UnsupportedMediaException public $widgetOpts; public $scoped; - public $file = null; - public function __construct(File $file) { - $this->file = $file; - parent::__construct('Thumbnail not generated', $this->file->getPath()); + parent::__construct('Thumbnail not generated', $file->getPath()); } } diff --git a/lib/media/attachmentlistitem.php b/lib/media/attachmentlistitem.php index 57e422266e..1cfc5d7689 100644 --- a/lib/media/attachmentlistitem.php +++ b/lib/media/attachmentlistitem.php @@ -156,7 +156,7 @@ class AttachmentListItem extends Widget 'src' => $this->attachment->getUrl(true), 'alt' => $this->attachment->getTitle()]); } catch (FileNotStoredLocallyException $e) { - $url = $e->file->getUrl(false); + $url = $this->attachment->url; $this->out->element('a', ['href' => $url, 'rel' => 'external'], $url); } } diff --git a/lib/util/framework.php b/lib/util/framework.php index 3c0072a304..87729fca64 100644 --- a/lib/util/framework.php +++ b/lib/util/framework.php @@ -34,8 +34,8 @@ define('GNUSOCIAL_ENGINE', 'GNU social'); define('GNUSOCIAL_ENGINE_URL', 'https://gnusocial.rocks/'); define('GNUSOCIAL_ENGINE_REPO_URL', 'https://notabug.org/diogo/gnu-social/'); // Change to https://git.gnu.io/gnu/gnu-social -define('GNUSOCIAL_BASE_VERSION', '2.0.2'); -define('GNUSOCIAL_LIFECYCLE', 'beta0'); // 'dev', 'alpha[0-9]+', 'beta[0-9]+', 'rc[0-9]+', 'release' +define('GNUSOCIAL_BASE_VERSION', '2.1.0'); +define('GNUSOCIAL_LIFECYCLE', 'rc1'); // 'dev', 'alpha[0-9]+', 'beta[0-9]+', 'rc[0-9]+', 'release' define('GNUSOCIAL_VERSION', GNUSOCIAL_BASE_VERSION . '-' . GNUSOCIAL_LIFECYCLE);