4
4
<div class =" container" >
5
5
6
6
<?php // Requests newest version from server and sets it as variable
7
- $Vgit = file_get_contents (" https://version. littlelink-custom.com/ " );
7
+ $Vgit = file_get_contents (" https://julianprieber.github.io/ littlelink-custom/version.json " );
8
8
9
9
// Requests current version from the local version file and sets it as variable
10
10
$Vlocal = file_get_contents (base_path (" version.json" ));
42
42
@endif
43
43
<br ><div class =" row" >
44
44
@if (env (' SKIP_UPDATE_BACKUP' ) == true )
45
- &ensp ; <a class =" btn" href =" {{ url ()-> current ()} } /?updating " ><button ><i class =" fa-solid fa-user-gear btn" ></i > Update automatically</button ></a >&ensp ;
45
+ &ensp ; <a class =" btn" href =" {{ url ()-> current ()} } /?preparing " ><button ><i class =" fa-solid fa-user-gear btn" ></i > Update automatically</button ></a >&ensp ;
46
46
@else
47
47
&ensp ; <a class =" btn" href =" {{ url ()-> current ()} } /?backup" ><button ><i class =" fa-solid fa-user-gear btn" ></i > Update automatically</button ></a >&ensp ;
48
48
@endif
61
61
</div >
62
62
<h1 class =" loadingtxt" >Updating</h1 >
63
63
@Push (' updater-head' )
64
- <meta http-equiv =" refresh" content =" 2; URL={{ url ()-> current ()} } /?updating-windows-bat " />
64
+ <meta http-equiv =" refresh" content =" 2; URL={{ url ()-> current ()} } /?preparing " />
65
65
@endpush
66
66
@endif
67
67
121
121
$tst = base_path (' backups/' );
122
122
file_put_contents ($tst . ' CANUPDATE' , ' ' );
123
123
$URL = Route:: current ()-> getName ();
124
- header (" Location: " . $URL . " ?updating " );
124
+ header (" Location: " . $URL . " ?preparing " );
125
125
exit (); ? >
126
126
@endif
127
127
128
+ @if ($_SERVER [' QUERY_STRING' ] === ' preparing' )
129
+ <?php // preparing update ? >
130
+ <div class =" logo-container fadein" >
131
+ <img class =" logo-img loading" src =" {{ asset (' littlelink/images/just-gear.svg' ) } }" alt =" Logo" >
132
+ <div class =" logo-centered" >l</div >
133
+ </div >
134
+ <h1 class =" loadingtxt" >Preparing update</h1 >
135
+
136
+ <?php // Get update preperation script from GitHub
137
+ try {
138
+ $file = file_get_contents (' https://raw.githubusercontent.com/JulianPrieber/littlelink-custom/main/resources/views/components/pre-update.blade.php' );
139
+ $newfile = base_path (' resources/views/components/pre-update.blade.php' );
140
+ file_put_contents ($newfile , $file );
141
+ } catch (exception $e ) {}
142
+ ? >
143
+
144
+ @include (' components.pre-update' )
145
+
146
+ @if (strtoupper (substr (PHP_OS , 0 , 3 )) === ' WIN' )
147
+ <meta http-equiv =" refresh" content =" 2; URL={{ url ()-> current ()} } /?updating-windows-bat" />
148
+ @else
149
+ <?php echo " <meta http-equiv=\" refresh\" content=\" 0; " . url ()-> current () . " ?updating\" />" ? >
150
+ @endif
151
+ @endif
152
+
128
153
@if ($_SERVER [' QUERY_STRING' ] === ' updating' and (file_exists (base_path (" backups/CANUPDATE" )) or env (' SKIP_UPDATE_BACKUP' ) == true ) )
129
154
<?php // updating... ? >
130
155
<div class =" logo-container fadein" >
211
236
@endif
212
237
213
238
@if (" 8" > phpversion () ) <br ><br ><a style =" background-color :tomato ;color :#fff ;border-radius :5px ;" class =" nav-link" href =" {{ url (' /studio/profile' ) } }" target =" " ><i class =" bi bi-exclamation-circle-fill" ></i > <strong >You are using an outdated version of PHP! Official support for this version will end soon.</strong ></a > @endif
214
- </div >
215
239
240
+ </div >
216
241
@endpush
0 commit comments