From 68f939935724c7e659298b1ab417632256553866 Mon Sep 17 00:00:00 2001 From: Ibnu Maksum Date: Tue, 15 Aug 2023 14:04:21 +0700 Subject: [PATCH] allow change url update from config.php --- update.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/update.php b/update.php index bfdba922..ae8deb1a 100644 --- a/update.php +++ b/update.php @@ -6,8 +6,11 @@ * This script is for updating PHPNuxBill **/ session_start(); +include "config.php"; -$download_url = 'https://github.com/hotspotbilling/phpnuxbill/archive/refs/heads/master.zip'; +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'); @@ -40,7 +43,7 @@ if (empty($step)) { // Download update $fp = fopen($file, 'w+'); - $ch = curl_init($download_url); + $ch = curl_init($update_url); curl_setopt($ch, CURLOPT_POST, 0); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 600); curl_setopt($ch, CURLOPT_TIMEOUT, 600);