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