Skip to content

Commit d51929e

Browse files
committed
Add an error message upon theme update for no connection to GitHub or its API rate limit excess
1 parent 807804c commit d51929e

22 files changed

+30
-21
lines changed

authentic-lib.pm

+8-2
Original file line numberDiff line numberDiff line change
@@ -1921,8 +1921,8 @@ sub theme_update_incompatible
19211921
my $usermin_compatible_version;
19221922
my @notice;
19231923
my $force_button =
1924-
'<a data-git="1" data-stable="0" data-force="1" class="authentic_update text-darker" href="javascript:;">'
1925-
. $theme_text{'theme_xhred_global_click_here'} . '</a>';
1924+
'<a data-git="1" data-stable="0" data-force="1" class="authentic_update text-darker" href="javascript:;">' .
1925+
$theme_text{'theme_xhred_global_click_here'} . '</a>';
19261926
my $usermin_enabled_updates = ($theme_config{'settings_sysinfo_theme_updates_for_usermin'} ne 'false' ? 1 : 0);
19271927
my ($authentic_remote_version) = $authentic_remote_data =~ /^version=(.*)/gm;
19281928

@@ -3126,6 +3126,12 @@ sub get_xhr_request
31263126
$authentic_remote_data = theme_remote_version(1, 0, 1);
31273127
}
31283128

3129+
if ($authentic_remote_data eq '0') {
3130+
@update_rs = { "no_connection" => $theme_text{'theme_git_update_locked'} };
3131+
print convert_to_json(\@update_rs);
3132+
exit;
3133+
}
3134+
31293135
@update_rs = theme_update_incompatible($authentic_remote_data);
31303136
if (@update_rs) {
31313137
print convert_to_json(\@update_rs);

lang/ca.UTF-8

+1-1
Original file line numberDiff line numberDiff line change
@@ -975,4 +975,4 @@ theme_xhred_filemanager_context_clipboard_selection=Copy selection to clipboard
975975

976976
settings_hotkey_slider=Hotkey for toggling side slider
977977

978-
978+
theme_git_update_locked=Theme update cannot be completed due to no connection to GitHub or its API rate limit excess. For latter, unauthenticated requests, the rate limit allows for up to 60 requests per hour. Try again later or use console to do it manually via update script.

lang/cz.UTF-8

+1-1
Original file line numberDiff line numberDiff line change
@@ -974,4 +974,4 @@ theme_xhred_filemanager_context_clipboard_selection=Copy selection to clipboard
974974

975975
settings_hotkey_slider=Hotkey for toggling side slider
976976

977-
977+
theme_git_update_locked=Theme update cannot be completed due to no connection to GitHub or its API rate limit excess. For latter, unauthenticated requests, the rate limit allows for up to 60 requests per hour. Try again later or use console to do it manually via update script.

lang/da.UTF-8

+1-1
Original file line numberDiff line numberDiff line change
@@ -975,4 +975,4 @@ theme_xhred_filemanager_context_clipboard_selection=Copy selection to clipboard
975975

976976
settings_hotkey_slider=Hotkey for toggling side slider
977977

978-
978+
theme_git_update_locked=Theme update cannot be completed due to no connection to GitHub or its API rate limit excess. For latter, unauthenticated requests, the rate limit allows for up to 60 requests per hour. Try again later or use console to do it manually via update script.

lang/de.UTF-8

+1-1
Original file line numberDiff line numberDiff line change
@@ -966,4 +966,4 @@ theme_xhred_filemanager_context_clipboard_selection=Copy selection to clipboard
966966

967967
settings_hotkey_slider=Hotkey for toggling side slider
968968

969-
969+
theme_git_update_locked=Theme update cannot be completed due to no connection to GitHub or its API rate limit excess. For latter, unauthenticated requests, the rate limit allows for up to 60 requests per hour. Try again later or use console to do it manually via update script.

lang/en.UTF-8

+2
Original file line numberDiff line numberDiff line change
@@ -974,3 +974,5 @@ theme_xhred_search_in_servermanager=Search Cloudmin
974974
theme_xhred_filemanager_context_clipboard_selection=Copy selection to clipboard
975975

976976
settings_hotkey_slider=Hotkey for toggling side slider
977+
978+
theme_git_update_locked=Theme update cannot be completed due to no connection to GitHub or its API rate limit excess. For latter, unauthenticated requests, the rate limit allows for up to 60 requests per hour. Try again later or use console to do it manually via update script.

lang/es.UTF-8

+1-1
Original file line numberDiff line numberDiff line change
@@ -975,4 +975,4 @@ theme_xhred_filemanager_context_clipboard_selection=Copy selection to clipboard
975975

976976
settings_hotkey_slider=Hotkey for toggling side slider
977977

978-
978+
theme_git_update_locked=Theme update cannot be completed due to no connection to GitHub or its API rate limit excess. For latter, unauthenticated requests, the rate limit allows for up to 60 requests per hour. Try again later or use console to do it manually via update script.

lang/fr.UTF-8

+1-1
Original file line numberDiff line numberDiff line change
@@ -975,4 +975,4 @@ theme_xhred_filemanager_context_clipboard_selection=Copy selection to clipboard
975975

976976
settings_hotkey_slider=Hotkey for toggling side slider
977977

978-
978+
theme_git_update_locked=Theme update cannot be completed due to no connection to GitHub or its API rate limit excess. For latter, unauthenticated requests, the rate limit allows for up to 60 requests per hour. Try again later or use console to do it manually via update script.

lang/id.UTF-8

+1-1
Original file line numberDiff line numberDiff line change
@@ -977,4 +977,4 @@ theme_xhred_filemanager_context_clipboard_selection=Copy selection to clipboard
977977

978978
settings_hotkey_slider=Hotkey for toggling side slider
979979

980-
980+
theme_git_update_locked=Theme update cannot be completed due to no connection to GitHub or its API rate limit excess. For latter, unauthenticated requests, the rate limit allows for up to 60 requests per hour. Try again later or use console to do it manually via update script.

lang/it.UTF-8

+1-1
Original file line numberDiff line numberDiff line change
@@ -975,4 +975,4 @@ theme_xhred_filemanager_context_clipboard_selection=Copy selection to clipboard
975975

976976
settings_hotkey_slider=Hotkey for toggling side slider
977977

978-
978+
theme_git_update_locked=Theme update cannot be completed due to no connection to GitHub or its API rate limit excess. For latter, unauthenticated requests, the rate limit allows for up to 60 requests per hour. Try again later or use console to do it manually via update script.

lang/ja_JP.UTF-8

+1-1
Original file line numberDiff line numberDiff line change
@@ -972,4 +972,4 @@ theme_xhred_filemanager_context_clipboard_selection=Copy selection to clipboard
972972

973973
settings_hotkey_slider=Hotkey for toggling side slider
974974

975-
975+
theme_git_update_locked=Theme update cannot be completed due to no connection to GitHub or its API rate limit excess. For latter, unauthenticated requests, the rate limit allows for up to 60 requests per hour. Try again later or use console to do it manually via update script.

lang/nl.UTF-8

+1-1
Original file line numberDiff line numberDiff line change
@@ -975,4 +975,4 @@ theme_xhred_filemanager_context_clipboard_selection=Copy selection to clipboard
975975

976976
settings_hotkey_slider=Hotkey for toggling side slider
977977

978-
978+
theme_git_update_locked=Theme update cannot be completed due to no connection to GitHub or its API rate limit excess. For latter, unauthenticated requests, the rate limit allows for up to 60 requests per hour. Try again later or use console to do it manually via update script.

lang/no.UTF-8

+1-1
Original file line numberDiff line numberDiff line change
@@ -831,4 +831,4 @@ theme_xhred_filemanager_context_clipboard_selection=Copy selection to clipboard
831831

832832
settings_hotkey_slider=Hotkey for toggling side slider
833833

834-
834+
theme_git_update_locked=Theme update cannot be completed due to no connection to GitHub or its API rate limit excess. For latter, unauthenticated requests, the rate limit allows for up to 60 requests per hour. Try again later or use console to do it manually via update script.

lang/pl.UTF-8

+1-1
Original file line numberDiff line numberDiff line change
@@ -975,4 +975,4 @@ theme_xhred_filemanager_context_clipboard_selection=Copy selection to clipboard
975975

976976
settings_hotkey_slider=Hotkey for toggling side slider
977977

978-
978+
theme_git_update_locked=Theme update cannot be completed due to no connection to GitHub or its API rate limit excess. For latter, unauthenticated requests, the rate limit allows for up to 60 requests per hour. Try again later or use console to do it manually via update script.

lang/pt.UTF-8

+1-1
Original file line numberDiff line numberDiff line change
@@ -975,4 +975,4 @@ theme_xhred_filemanager_context_clipboard_selection=Copy selection to clipboard
975975

976976
settings_hotkey_slider=Hotkey for toggling side slider
977977

978-
978+
theme_git_update_locked=Theme update cannot be completed due to no connection to GitHub or its API rate limit excess. For latter, unauthenticated requests, the rate limit allows for up to 60 requests per hour. Try again later or use console to do it manually via update script.

lang/ro_RO.UTF-8

+1-1
Original file line numberDiff line numberDiff line change
@@ -973,4 +973,4 @@ theme_xhred_filemanager_context_clipboard_selection=Copy selection to clipboard
973973

974974
settings_hotkey_slider=Hotkey for toggling side slider
975975

976-
976+
theme_git_update_locked=Theme update cannot be completed due to no connection to GitHub or its API rate limit excess. For latter, unauthenticated requests, the rate limit allows for up to 60 requests per hour. Try again later or use console to do it manually via update script.

lang/ru.UTF-8

+1-1
Original file line numberDiff line numberDiff line change
@@ -978,4 +978,4 @@ theme_xhred_filemanager_context_clipboard_selection=Copy selection to clipboard
978978

979979
settings_hotkey_slider=Hotkey for toggling side slider
980980

981-
981+
theme_git_update_locked=Theme update cannot be completed due to no connection to GitHub or its API rate limit excess. For latter, unauthenticated requests, the rate limit allows for up to 60 requests per hour. Try again later or use console to do it manually via update script.

lang/sq.UTF-8

+1-1
Original file line numberDiff line numberDiff line change
@@ -986,4 +986,4 @@ theme_xhred_filemanager_context_clipboard_selection=Copy selection to clipboard
986986

987987
settings_hotkey_slider=Hotkey for toggling side slider
988988

989-
989+
theme_git_update_locked=Theme update cannot be completed due to no connection to GitHub or its API rate limit excess. For latter, unauthenticated requests, the rate limit allows for up to 60 requests per hour. Try again later or use console to do it manually via update script.

lang/sv.UTF-8

+1-1
Original file line numberDiff line numberDiff line change
@@ -972,4 +972,4 @@ theme_xhred_filemanager_context_clipboard_selection=Kopiera markerat till urklip
972972

973973
settings_hotkey_slider=Snabbtangent för att växla sidomenyn
974974

975-
975+
theme_git_update_locked=Theme update cannot be completed due to no connection to GitHub or its API rate limit excess. For latter, unauthenticated requests, the rate limit allows for up to 60 requests per hour. Try again later or use console to do it manually via update script.

lang/zh_CN.UTF-8

+1
Original file line numberDiff line numberDiff line change
@@ -972,3 +972,4 @@ theme_xhred_filemanager_context_clipboard_selection=Copy selection to clipboard
972972

973973
settings_hotkey_slider=Hotkey for toggling side slider
974974

975+
theme_git_update_locked=Theme update cannot be completed due to no connection to GitHub or its API rate limit excess. For latter, unauthenticated requests, the rate limit allows for up to 60 requests per hour. Try again later or use console to do it manually via update script.

theme.info

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
desc=Authentic Theme
22
longdesc=Webmin/Usermin/Virtualmin/Cloudmin theme based on Bootstrap and Font Awesome (https://github.com/authentic-theme/authentic-theme)
33
version=19.20
4-
mversion=01
4+
mversion=02
55
depends=1.900 1.750
66
webmin=1
77
usermin=1

unauthenticated/js/bundle.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)