From 2f92cdce0bd6c26ebfba12180dc00a1b68531423 Mon Sep 17 00:00:00 2001 From: Ibnu Maksum Date: Wed, 16 Aug 2023 13:58:20 +0700 Subject: [PATCH] Forgot to add branch --- update.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/update.php b/update.php index a22e9fc0..d8d45fbf 100644 --- a/update.php +++ b/update.php @@ -12,6 +12,7 @@ if(empty($update_url)){ $update_url = 'https://github.com/hotspotbilling/phpnuxbill/archive/refs/heads/master.zip'; } + if (!isset($_SESSION['aid']) || empty($_SESSION['aid'])) { r2("./?_route=login&You_are_not_admin", 'e', 'You are not admin'); } @@ -35,7 +36,8 @@ if (!extension_loaded('zip')) { $file = pathFixer('system/cache/phpnuxbill.zip'); -$folder = pathFixer('system/cache/phpnuxbill-master/'); +$folder = pathFixer('system/cache/phpnuxbill-'.basename($update_url, ".zip").'/'); + if (empty($step)) { $step++; } else if ($step == 1) {