From 76aee3bd68e045301db6d213a80a26b5e9486f89 Mon Sep 17 00:00:00 2001 From: Benjamin Aerni Date: Sun, 3 Apr 2022 15:35:59 -0700 Subject: [PATCH] Display release notes on the update screen (#1257) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Display release notes on the update screen * Minor changes Co-authored-by: Yağızhan --- src/bb-library/Box/Update.php | 15 ++++++++++++++- src/bb-modules/System/Api/Admin.php | 11 +++++++++++ .../admin_default/html/mod_extension_index.phtml | 7 ++++--- 3 files changed, 29 insertions(+), 4 deletions(-) diff --git a/src/bb-library/Box/Update.php b/src/bb-library/Box/Update.php index ba3fed807..b31e98701 100644 --- a/src/bb-library/Box/Update.php +++ b/src/bb-library/Box/Update.php @@ -44,7 +44,20 @@ class Box_Update } /** - * Return latest version number + * Returns latest release notes + * @return string + */ + public function getLatestReleaseNotes() + { + $response = $this->_getLatestVersionInfo(); + if(!isset($response['body'])){ + return "**Error: Release info unavailable**"; + } + return $response['body']; + } + + /** + * Returns latest version number * @return string */ public function getLatestVersion() diff --git a/src/bb-modules/System/Api/Admin.php b/src/bb-modules/System/Api/Admin.php index 945b4ec17..cf3cc43fb 100644 --- a/src/bb-modules/System/Api/Admin.php +++ b/src/bb-modules/System/Api/Admin.php @@ -162,4 +162,15 @@ class Admin extends \Api_Abstract { return $this->getService()->clearCache(); } + + /** + * Gets the latest release notes. + * + * @return string + */ + public function release_notes() + { + $updater = $this->di['updater']; + return $updater->getLatestReleaseNotes(); + } } diff --git a/src/bb-themes/admin_default/html/mod_extension_index.phtml b/src/bb-themes/admin_default/html/mod_extension_index.phtml index 5887b02e9..1894d3549 100644 --- a/src/bb-themes/admin_default/html/mod_extension_index.phtml +++ b/src/bb-themes/admin_default/html/mod_extension_index.phtml @@ -108,6 +108,7 @@
+ {{ admin.system_release_notes|bbmd }} Update BoxBilling
@@ -118,10 +119,10 @@
    -
  • Download latest BoxBilling from Our Github
  • -
  • Extract files at your computer
  • +
  • Download the latest release from GitHub
  • +
  • Extract the files into your computer
  • Upload (overwrite) extracted files via FTP to {{ constant('BB_PATH_ROOT') }}
  • -
  • When upload is complete, execute {{constant('BB_URL')}}bb-update.php in your browser
  • +
  • When the uploading is done, execute {{constant('BB_URL')}}bb-update.php in your browser
  • Your BoxBilling is now updated to latest version.