Skip to content

Commit

Permalink
Add an error message upon theme update for no connection to GitHub or…
Browse files Browse the repository at this point in the history
… its API rate limit excess
  • Loading branch information
iliajie committed Nov 15, 2018
1 parent 807804c commit d51929e
Show file tree
Hide file tree
Showing 22 changed files with 30 additions and 21 deletions.
10 changes: 8 additions & 2 deletions authentic-lib.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1921,8 +1921,8 @@ sub theme_update_incompatible
my $usermin_compatible_version;
my @notice;
my $force_button =
'<a data-git="1" data-stable="0" data-force="1" class="authentic_update text-darker" href="javascript:;">'
. $theme_text{'theme_xhred_global_click_here'} . '</a>';
'<a data-git="1" data-stable="0" data-force="1" class="authentic_update text-darker" href="javascript:;">' .
$theme_text{'theme_xhred_global_click_here'} . '</a>';
my $usermin_enabled_updates = ($theme_config{'settings_sysinfo_theme_updates_for_usermin'} ne 'false' ? 1 : 0);
my ($authentic_remote_version) = $authentic_remote_data =~ /^version=(.*)/gm;

Expand Down Expand Up @@ -3126,6 +3126,12 @@ sub get_xhr_request
$authentic_remote_data = theme_remote_version(1, 0, 1);
}

if ($authentic_remote_data eq '0') {
@update_rs = { "no_connection" => $theme_text{'theme_git_update_locked'} };
print convert_to_json(\@update_rs);
exit;
}

@update_rs = theme_update_incompatible($authentic_remote_data);
if (@update_rs) {
print convert_to_json(\@update_rs);
Expand Down
2 changes: 1 addition & 1 deletion lang/ca.UTF-8
Original file line number Diff line number Diff line change
Expand Up @@ -975,4 +975,4 @@ theme_xhred_filemanager_context_clipboard_selection=Copy selection to clipboard

settings_hotkey_slider=Hotkey for toggling side slider


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.
2 changes: 1 addition & 1 deletion lang/cz.UTF-8
Original file line number Diff line number Diff line change
Expand Up @@ -974,4 +974,4 @@ theme_xhred_filemanager_context_clipboard_selection=Copy selection to clipboard

settings_hotkey_slider=Hotkey for toggling side slider


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.
2 changes: 1 addition & 1 deletion lang/da.UTF-8
Original file line number Diff line number Diff line change
Expand Up @@ -975,4 +975,4 @@ theme_xhred_filemanager_context_clipboard_selection=Copy selection to clipboard

settings_hotkey_slider=Hotkey for toggling side slider


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.
2 changes: 1 addition & 1 deletion lang/de.UTF-8
Original file line number Diff line number Diff line change
Expand Up @@ -966,4 +966,4 @@ theme_xhred_filemanager_context_clipboard_selection=Copy selection to clipboard

settings_hotkey_slider=Hotkey for toggling side slider


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.
2 changes: 2 additions & 0 deletions lang/en.UTF-8
Original file line number Diff line number Diff line change
Expand Up @@ -974,3 +974,5 @@ theme_xhred_search_in_servermanager=Search Cloudmin
theme_xhred_filemanager_context_clipboard_selection=Copy selection to clipboard

settings_hotkey_slider=Hotkey for toggling side slider

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.
2 changes: 1 addition & 1 deletion lang/es.UTF-8
Original file line number Diff line number Diff line change
Expand Up @@ -975,4 +975,4 @@ theme_xhred_filemanager_context_clipboard_selection=Copy selection to clipboard

settings_hotkey_slider=Hotkey for toggling side slider


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.
2 changes: 1 addition & 1 deletion lang/fr.UTF-8
Original file line number Diff line number Diff line change
Expand Up @@ -975,4 +975,4 @@ theme_xhred_filemanager_context_clipboard_selection=Copy selection to clipboard

settings_hotkey_slider=Hotkey for toggling side slider


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.
2 changes: 1 addition & 1 deletion lang/id.UTF-8
Original file line number Diff line number Diff line change
Expand Up @@ -977,4 +977,4 @@ theme_xhred_filemanager_context_clipboard_selection=Copy selection to clipboard

settings_hotkey_slider=Hotkey for toggling side slider


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.
2 changes: 1 addition & 1 deletion lang/it.UTF-8
Original file line number Diff line number Diff line change
Expand Up @@ -975,4 +975,4 @@ theme_xhred_filemanager_context_clipboard_selection=Copy selection to clipboard

settings_hotkey_slider=Hotkey for toggling side slider


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.
2 changes: 1 addition & 1 deletion lang/ja_JP.UTF-8
Original file line number Diff line number Diff line change
Expand Up @@ -972,4 +972,4 @@ theme_xhred_filemanager_context_clipboard_selection=Copy selection to clipboard

settings_hotkey_slider=Hotkey for toggling side slider


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.
2 changes: 1 addition & 1 deletion lang/nl.UTF-8
Original file line number Diff line number Diff line change
Expand Up @@ -975,4 +975,4 @@ theme_xhred_filemanager_context_clipboard_selection=Copy selection to clipboard

settings_hotkey_slider=Hotkey for toggling side slider


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.
2 changes: 1 addition & 1 deletion lang/no.UTF-8
Original file line number Diff line number Diff line change
Expand Up @@ -831,4 +831,4 @@ theme_xhred_filemanager_context_clipboard_selection=Copy selection to clipboard

settings_hotkey_slider=Hotkey for toggling side slider


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.
2 changes: 1 addition & 1 deletion lang/pl.UTF-8
Original file line number Diff line number Diff line change
Expand Up @@ -975,4 +975,4 @@ theme_xhred_filemanager_context_clipboard_selection=Copy selection to clipboard

settings_hotkey_slider=Hotkey for toggling side slider


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.
2 changes: 1 addition & 1 deletion lang/pt.UTF-8
Original file line number Diff line number Diff line change
Expand Up @@ -975,4 +975,4 @@ theme_xhred_filemanager_context_clipboard_selection=Copy selection to clipboard

settings_hotkey_slider=Hotkey for toggling side slider


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.
2 changes: 1 addition & 1 deletion lang/ro_RO.UTF-8
Original file line number Diff line number Diff line change
Expand Up @@ -973,4 +973,4 @@ theme_xhred_filemanager_context_clipboard_selection=Copy selection to clipboard

settings_hotkey_slider=Hotkey for toggling side slider


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.
2 changes: 1 addition & 1 deletion lang/ru.UTF-8
Original file line number Diff line number Diff line change
Expand Up @@ -978,4 +978,4 @@ theme_xhred_filemanager_context_clipboard_selection=Copy selection to clipboard

settings_hotkey_slider=Hotkey for toggling side slider


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.
2 changes: 1 addition & 1 deletion lang/sq.UTF-8
Original file line number Diff line number Diff line change
Expand Up @@ -986,4 +986,4 @@ theme_xhred_filemanager_context_clipboard_selection=Copy selection to clipboard

settings_hotkey_slider=Hotkey for toggling side slider


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.
2 changes: 1 addition & 1 deletion lang/sv.UTF-8
Original file line number Diff line number Diff line change
Expand Up @@ -972,4 +972,4 @@ theme_xhred_filemanager_context_clipboard_selection=Kopiera markerat till urklip

settings_hotkey_slider=Snabbtangent för att växla sidomenyn


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.
1 change: 1 addition & 0 deletions lang/zh_CN.UTF-8
Original file line number Diff line number Diff line change
Expand Up @@ -972,3 +972,4 @@ theme_xhred_filemanager_context_clipboard_selection=Copy selection to clipboard

settings_hotkey_slider=Hotkey for toggling side slider

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.
2 changes: 1 addition & 1 deletion theme.info
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
desc=Authentic Theme
longdesc=Webmin/Usermin/Virtualmin/Cloudmin theme based on Bootstrap and Font Awesome (https://github.com/authentic-theme/authentic-theme)
version=19.20
mversion=01
mversion=02
depends=1.900 1.750
webmin=1
usermin=1
2 changes: 1 addition & 1 deletion unauthenticated/js/bundle.min.js

Large diffs are not rendered by default.

0 comments on commit d51929e

Please sign in to comment.