File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed
Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 22
33declare (strict_types=1 );
44
5- $ Vgit = file_get_contents ("https://julianprieber.github.io/littlelink-custom/version.json " );
5+ if (env ('JOIN_BETA ' ) === true ) {
6+ $ Vgit = file_get_contents ("https://julianprieber.github.io/littlelink-custom/version.json " );
7+ } else {
8+ $ Vgit = '0 ' ;
9+ }
610
711if ($ Vgit > $ Vlocal ) {
812 $ userver = 'https://update.littlelink-custom.com/ ' ;
Original file line number Diff line number Diff line change @@ -194,26 +194,26 @@ function has_sslsb( $domain ) {
194194 <div class=" row " >
195195
196196 <! –– #### begin update detection #### ––>
197- @if (env (' NOTIFY_UPDATES' ) == ' all ' or env ( ' NOTIFY_UPDATES ' ) == ' true ' )
197+ @if (env (' NOTIFY_UPDATES' ) == ' old ' )
198198 <! –– Checks if file version.json exists to continue (without this PHP will throw ErrorException ) ––>
199199 @if (file_exists (base_path (" version.json" )) )
200200
201201 <?php // Requests newest version from server and sets it as variable
202202 ini_set (' user_agent' , ' Mozilla/4.0 (compatible; MSIE 6.0)' );
203- $json = file_get_contents (" https://api.github.com/repos/julianprieber/littlelink-custom/releases/latest" ) ;
203+ $json = file_get_contents (" https://api.github.com/repos/julianprieber/littlelink-custom/releases/latest" );
204204 $myObj = json_decode ($json );
205- $Vgit = $myObj -> tag_name ;
205+ $Vgit = $myObj -> tag_name ;
206206
207207 // Requests current version from the local version file and sets it as variable
208- $Vlocal = ' v' . file_get_contents (base_path (" version.json" ));
208+ $Vlocal = ' v' . file_get_contents (base_path (" version.json" ));
209209 ? >
210210
211211 <! –– If user has role admin AND newest GitHub release version is higher than the local one an update notice will be displayed ––>
212212 @if (auth ()-> user ()-> role == ' admin' and $Vgit > $Vlocal )
213213 <a style=" color:#007bff " class=" nav-link " href=" {{ url (' update' ) } }" title=" Click here to learn more about how to update " >An update is available</a>
214214 @endif
215215 @endif
216- @elseif ( env ( ' NOTIFY_UPDATES ' ) == ' major ' )
216+ @else
217217 <?php // Checks if URL exists
218218 try {
219219 function URL_exists (string $url ): bool
You can’t perform that action at this time.
0 commit comments