Skip to content

Commit ad58301

Browse files
Ilia RostovtsevIlia Rostovtsev
Ilia Rostovtsev
authored and
Ilia Rostovtsev
committed
18.40 [patch-2 #707]
1 parent 763b5d0 commit ad58301

10 files changed

+20
-13
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Changelog
22

3-
#### Version 18.41-beta20 (02 April, 2017)
3+
#### Version 18.41-beta21 (03 April, 2017)
44
* Added ability to install patched version of the theme directly from _GitHub_, to get early access on the new features [#707](https://github.com/qooob/authentic-theme/issues/707)
55
* Added console script for updating the theme [#703](https://github.com/qooob/authentic-theme/issues/703)
66
* Added error handler for saving files in background calls [#689](https://github.com/qooob/authentic-theme/issues/689)

authentic-init.pm

+5-2
Original file line numberDiff line numberDiff line change
@@ -1077,9 +1077,12 @@ sub theme_night_mode
10771077

10781078
sub theme_git_version
10791079
{
1080+
my ($force) = @_;
10801081
my $git_version = undef;
10811082
my $git_version_file = $root_directory . "/authentic-theme/version";
1082-
if ( -e $git_version_file && $__settings{'settings_sysinfo_theme_patched_updates'} eq 'true' ) {
1083+
if ( -e $git_version_file
1084+
&& ( $__settings{'settings_sysinfo_theme_patched_updates'} eq 'true' || $force ) )
1085+
{
10831086
$git_version = read_file_lines( $git_version_file, 1 );
10841087
$git_version = $git_version->[0];
10851088
}
@@ -1091,7 +1094,7 @@ sub theme_version
10911094
my ($switch) = @_;
10921095
my $sh__ln__p___version = '18.32';
10931096
my $sh__ln__c___version = '18.40';
1094-
my $sh__ln__g___version = theme_git_version();
1097+
my $sh__ln__g___version = theme_git_version('uncond');
10951098
( ( !$switch ) && ( $sh__ln__c___version =~ s/\.//ig ) );
10961099
( ( !$switch && $sh__ln__g___version )
10971100
&& ( $sh__ln__c___version = $sh__ln__g___version, ( $sh__ln__c___version =~ s/\.|-|git//ig ) ) );

authentic-lib.pm

+3-2
Original file line numberDiff line numberDiff line change
@@ -1121,7 +1121,7 @@ sub get_sysinfo_vars
11211121
$authentic_theme_version =
11221122
'<a href="https://github.com/qooob/authentic-theme" target="_blank">'
11231123
. $Atext{'theme_name'} . '</a> '
1124-
. $installed_version . '. '
1124+
. ($git_version_local ? $git_version_local : $installed_version) . '. '
11251125
. (
11261126
$git_version_remote ? $Atext{'theme_git_patch_available'} : $Atext{'theme_update_available'} )
11271127
. ' '
@@ -1164,7 +1164,7 @@ sub get_sysinfo_vars
11641164
$authentic_theme_version =
11651165
'<a href="https://github.com/qooob/authentic-theme" target="_blank">'
11661166
. $Atext{'theme_name'} . '</a> '
1167-
. $installed_version
1167+
. ($git_version_local ? $git_version_local : $installed_version)
11681168
. '<div class="btn-group margined-left-4"><a href="'
11691169
. $gconfig{'webprefix'}
11701170
. '/webmin/edit_themes.cgi" data-href="'
@@ -1863,6 +1863,7 @@ sub get_authentic_version
18631863
{
18641864

18651865
our $remote_version;
1866+
our $git_version_local = theme_git_version('uncond');
18661867

18671868
# Get local version
18681869
our $installed_version = read_file_lines( $root_directory . "/authentic-theme/VERSION.txt", 1 );

authentic.pm

+2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ sub theme_header
3030
. $__settings{'settings_navigation_color'}
3131
. '" data-theme-version="'
3232
. (theme_git_version() ? theme_git_version() : theme_version('version'))
33+
. '" data-theme-git-version="'
34+
. theme_git_version('uncond')
3335
. '" data-level="'
3436
. $get_user_level
3537
. '" data-user-home="'

sysinfo.cgi

+4-4
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ elsif ( $get_user_level eq '1' || $get_user_level eq '2' ) {
243243
$authentic_theme_version =
244244
'<a href="https://github.com/qooob/authentic-theme" target="_blank">'
245245
. $Atext{'theme_name'} . '</a> '
246-
. $installed_version
246+
. ($git_version_local ? $git_version_local : $installed_version)
247247
. '<div class="btn-group margined-left-4"><a href="'
248248
. $gconfig{'webprefix'}
249249
. '/settings-user.cgi" data-href="'
@@ -256,7 +256,7 @@ elsif ( $get_user_level eq '1' || $get_user_level eq '2' ) {
256256
else {
257257
$authentic_theme_version = ''
258258
. $Atext{'theme_name'} . ' '
259-
. $installed_version . '. '
259+
. ($git_version_local ? $git_version_local : $installed_version) . '. '
260260
. $Atext{'theme_update_available'} . ' '
261261
. $remote_version
262262
. '&nbsp;&nbsp;<a class="btn btn-xs btn-info" style="padding:0 6px; line-height: 12px; height:15px;font-size:11px" target="_blank" href="https://github.com/qooob/authentic-theme/blob/master/CHANGELOG.md"><i class="fa fa-fw fa-pencil-square-o" style="padding-top:1px">&nbsp;</i>'
@@ -400,7 +400,7 @@ elsif ( $get_user_level eq '3' ) {
400400
$authentic_theme_version =
401401
'<a href="https://github.com/qooob/authentic-theme" target="_blank">'
402402
. $Atext{'theme_name'} . '</a> '
403-
. $installed_version
403+
. ($git_version_local ? $git_version_local : $installed_version)
404404
. '<div class="btn-group margined-left-4"><a href="'
405405
. $gconfig{'webprefix'}
406406
. '/settings-user.cgi" data-href="'
@@ -413,7 +413,7 @@ elsif ( $get_user_level eq '3' ) {
413413
else {
414414
$authentic_theme_version = ''
415415
. $Atext{'theme_name'} . ' '
416-
. $installed_version . '. '
416+
. ($git_version_local ? $git_version_local : $installed_version) . '. '
417417
. $Atext{'theme_update_available'} . ' '
418418
. $remote_version
419419
. '&nbsp;&nbsp;<a class="btn btn-xs btn-info" style="padding:0 6px; line-height: 12px; height:15px;font-size:11px" target="_blank" href="https://github.com/qooob/authentic-theme/blob/master/CHANGELOG.md"><i class="fa fa-fw fa-pencil-square-o" style="padding-top:1px">&nbsp;</i>'

unauthenticated/js/parent.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ if ($access_level == 0) {
1010
}
1111
}
1212
if (t__wi_p.$___________initial === 1) {
13-
console.log("Welcome to Authentic Theme " + $g__t__ver + "\nhttps://github.com/qooob/authentic-theme")
13+
console.log("Welcome to Authentic Theme " + ($g__t__gver ? $g__t__gver : $g__t__ver) + "\nhttps://github.com/qooob/authentic-theme")
1414
}
1515
typeof t__wi_p.t___p__xhr_l == "undefined" ? t__wi_p.t___p__xhr_l = 0 : false;
1616
typeof t__wi_p.t___p__ll == "undefined" ? t__wi_p.t___p__ll = 0 : false;

unauthenticated/js/parent.min.js

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

unauthenticated/js/postinit.js

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ var $_url = URI(t___wi.location),
4343
$g__user__home = $("body").data("user-home"),
4444
$g__m__name = $("body").data("module"),
4545
$g__t__ver = $("body").data("theme-version").toString(),
46+
$g__t__gver = $("body").data("theme-git-version").toString(),
4647
$g__t__ver_str = $g__t__ver.replace(".", ""),
4748
__isNR = (typeof settings_background_color != "undefined" && settings_background_color === "nightRider" ? 1 : __isNM);
4849
const __ua__ = window.navigator.userAgent,

unauthenticated/js/postinit.min.js

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

version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
18.40-git-201704022116
1+
18.40-git-201704031120

0 commit comments

Comments
 (0)