clear compiled after update
This commit is contained in:
parent
63bba0efb0
commit
c8696f8d1a
@ -423,5 +423,7 @@
|
||||
"Admin": "Admin",
|
||||
"Password_should_be_minimum_6_characters": "Password should be minimum 6 characters",
|
||||
"Add_User": "Add User",
|
||||
"Send_Notification": "Send Notification"
|
||||
"Send_Notification": "Send Notification",
|
||||
"Code": "Code",
|
||||
"Send_To_Customer": "Send To Customer"
|
||||
}
|
16
update.php
16
update.php
@ -8,7 +8,7 @@
|
||||
session_start();
|
||||
include "config.php";
|
||||
|
||||
if(empty($update_url)){
|
||||
if (empty($update_url)) {
|
||||
$update_url = 'https://github.com/hotspotbilling/phpnuxbill/archive/refs/heads/master.zip';
|
||||
}
|
||||
|
||||
@ -36,7 +36,7 @@ if (!extension_loaded('zip')) {
|
||||
|
||||
|
||||
$file = pathFixer('system/cache/phpnuxbill.zip');
|
||||
$folder = pathFixer('system/cache/phpnuxbill-'.basename($update_url, ".zip").'/');
|
||||
$folder = pathFixer('system/cache/phpnuxbill-' . basename($update_url, ".zip") . '/');
|
||||
|
||||
if (empty($step)) {
|
||||
$step++;
|
||||
@ -105,9 +105,9 @@ if (empty($step)) {
|
||||
foreach ($updates as $version => $queries) {
|
||||
if (!in_array($version, $dones)) {
|
||||
foreach ($queries as $q) {
|
||||
try{
|
||||
$db->exec($q);
|
||||
}catch(PDOException $e){
|
||||
try {
|
||||
$db->exec($q);
|
||||
} catch (PDOException $e) {
|
||||
//ignore, it exists already
|
||||
}
|
||||
}
|
||||
@ -119,6 +119,12 @@ if (empty($step)) {
|
||||
$step++;
|
||||
} else {
|
||||
$path = 'ui/compiled/';
|
||||
$files = scandir($path);
|
||||
foreach ($files as $file) {
|
||||
if (is_file($path . $file)) {
|
||||
unlink($path . $file);
|
||||
}
|
||||
}
|
||||
$version = json_decode(file_get_contents('version.json'), true)['version'];
|
||||
$continue = false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user