@if(auth()->user()->role == 'admin' and $Vgit > $Vlocal or env('JOIN_BETA') === true)
@if($_SERVER['QUERY_STRING'] === '')
l
Updater
@if(strtoupper(substr(PHP_OS, 0, 3)) === 'WIN')
The updater only works on Linux based systems.
@else
@if(env('JOIN_BETA') === true)
$Vlocal) {echo "You need to update to the latest mainline release";} else {echo "You're running the latest mainline release";} ?>
@else
You can update your installation automatically or download the update and install it manually:
@endif
@endif
@endif
@if($_SERVER['QUERY_STRING'] === 'backup')
@Push('updater-head')
@endpush
l
Creating backup
@endif
@if($_SERVER['QUERY_STRING'] === 'backups')
true]);
$tst = base_path('backups/');
file_put_contents($tst.'CANUPDATE', '');
$URL = Route::current()->getName();
header("Location: ".$URL."?updating");
exit(); ?>
@endif
@if($_SERVER['QUERY_STRING'] === 'updating' and (file_exists(base_path("backups/CANUPDATE")) or env('SKIP_UPDATE_BACKUP') == true))
l
Updating
@Push('updater-head')
@endpush
@endif
@elseif($_SERVER['QUERY_STRING'] === '')
l
No new version
There is no new version available
@endif
@if($_SERVER['QUERY_STRING'] === 'finishing')
l
Finishing up
has('advanced-config.expand_panel_admin_menu_permanently') and !config()->has('advanced-config.redirect_https')) {
function getStringBetween($string, $start, $end) {
$lastStartIndex = strrpos($string, $start);
$lastEndIndex = strrpos($string, $end);
$substringStartIndex = $lastStartIndex + strlen($start);
$substringSize = $lastStartIndex - $lastEndIndex - 1;
return substr($string, $substringStartIndex, $substringSize);
}
$subject = file_get_contents('config/advanced-config.php');
$search = ")";
$replace = "),";
file_put_contents('config/advanced-config.php', str_replace('),,', '),', strrev(implode(strrev($replace), explode(strrev($search), strrev($subject), 2)))));
$replace = "];";
file_put_contents('config/advanced-config.php', str_replace($replace, file_get_contents('storage/templates/advanced-config-update-1.php'), file_get_contents('config/advanced-config.php')));
}
echo "
current() . "?success\" />";
?>
@endif
@if($_SERVER['QUERY_STRING'] === 'success')
l
Success!
@if(env('JOIN_BETA') === true)
$Vlocal) {echo "You need to update to the latest mainline release";} else {echo "You're running the latest mainline release";} ?>
@else
The update was successful, you can now return to the Admin Panel.
View the release notes
@endif
@endif
@if($_SERVER['QUERY_STRING'] === 'error')
l
Error
Something went wrong with the update :(
@endif
@endpush