Skip to content

Commit 26b2897

Browse files
committed
Added check for stable or dev release
1 parent 57fb795 commit 26b2897

File tree

8 files changed

+25
-22
lines changed

8 files changed

+25
-22
lines changed

web/includes/sb-callback.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2285,16 +2285,16 @@ function CheckVersion()
22852285

22862286
$objResponse->addAssign("relver", "innerHTML", $version['version']);
22872287

2288-
if (defined('SB_GIT')) {
2288+
if (SB_DEV) {
22892289
if (intval($version['git']) > SB_GITREV) {
2290-
$svnmsg = "<span style='color:#aa0000;'><strong>A New Beta Version is Available.</strong></span>";
2290+
$svnmsg = "<span style='color:#aa0000;'><strong>A New Dev Version is Available.</strong></span>";
22912291
} else {
2292-
$svnmsg = "<span style='color:#00aa00;'><strong>You have the Latest Beta Version.</strong></span>";
2292+
$svnmsg = "<span style='color:#00aa00;'><strong>You have the Latest Dev Version.</strong></span>";
22932293
}
22942294

22952295
if (strlen($version['git']) > 8 || $version['git'] == "") {
22962296
$version['git'] = "<span style='color:#aa0000;'>Error</span>";
2297-
$svnmsg = "<span style='color:#aa0000;'><strong>Error retrieving latest Beta Release.</strong></span>";
2297+
$svnmsg = "<span style='color:#aa0000;'><strong>Error retrieving latest Dev Version.</strong></span>";
22982298
}
22992299
$msg .= "<br>".$svnmsg;
23002300
$objResponse->addAssign("svnrev", "innerHTML", $version['git']);

web/init.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,11 @@
113113
$json = json_decode(file_get_contents('version.json'), true);
114114
define('SB_VERSION', $json['version']);
115115
define('SB_GITREV', $json['git']);
116+
define('SB_DEV', $json['dev']);
116117
} else {
117118
define('SB_VERSION', 'N/A');
118119
define('SB_GITREV', '0');
120+
define('SB_DEV', false);
119121
}
120122
}
121123
define('LOGIN_COOKIE_LIFETIME', (60*60*24*7)*2);

web/pages/footer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
}
3232

3333
global $theme;
34-
$theme->assign('SB_REV', defined('SB_GIT') ? "-git" . SB_GITREV : '');
34+
$theme->assign('SB_REV', (SB_DEV) ? "-git" . SB_GITREV : '');
3535
$theme->assign('SB_VERSION', SB_VERSION);
3636
$theme->assign('SB_QUOTE', CreateQuote());
3737
$theme->display('page_footer.tpl');

web/pages/page.admin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
$theme->assign('access_settings', $userbank->HasAccess(ADMIN_OWNER | ADMIN_WEB_SETTINGS));
5050
$theme->assign('access_mods', $userbank->HasAccess(ADMIN_OWNER | ADMIN_LIST_MODS | ADMIN_ADD_MODS | ADMIN_EDIT_MODS | ADMIN_DELETE_MODS));
5151

52-
$theme->assign('sb_svn', defined('SB_GIT'));
52+
$theme->assign('dev', SB_DEV);
5353

5454
$theme->assign('demosize', sizeFormat($demsi['size']));
5555
$theme->assign('total_admins', $counts['admins']);

web/themes/default/page_admin.tpl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
<a href="index.php?p=admin&amp;c=settings">
4343
<img src="themes/default/images/admin/settings.png" alt="SourceBans Settings" border="0" /><br />
4444
Webpanel Settings
45-
</a>
45+
</a>
4646
</li>
4747
{/if}
4848
{if $access_mods}
@@ -54,7 +54,7 @@
5454
</li>
5555
{/if}
5656
</ul>
57-
</div>
57+
</div>
5858
<br />
5959

6060
<table width="100%" border="0" cellpadding="3" cellspacing="0">
@@ -70,9 +70,9 @@
7070
</tr>
7171
<tr>
7272
<td class="listtable_1" style="border-right: 3px solid #CFCAC6;">
73-
{if $sb_svn}
73+
{if $dev}
7474
Latest Git: <strong id='svnrev'>Please Wait...</strong>
75-
{/if}
75+
{/if}
7676
</td>
7777
<td class="listtable_1" style="border-right: 3px solid #CFCAC6; border-left: 3px solid #CFCAC6;">&nbsp;</td>
7878
<td class="listtable_1" style="border-left: 3px solid #CFCAC6;">Connections Blocked: <strong>{$total_blocks}</strong></td>
@@ -108,4 +108,4 @@
108108
<td class="listtable_1" style="border-left: 3px solid #CFCAC6;">&nbsp;</td>
109109
</tr>
110110
</table>
111-
<script type="text/javascript">xajax_CheckVersion();</script>
111+
<script type="text/javascript">xajax_CheckVersion();</script>

web/themes/sb_default/page_admin.tpl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<a href="index.php?p=admin&amp;c=settings">
3939
<img src="themes/default/images/admin/settings.png" alt="SourceBans Settings" border="0" /><br />
4040
Webpanel Settings
41-
</a>
41+
</a>
4242
</li>
4343
{/if}
4444
{if $access_mods}
@@ -50,7 +50,7 @@
5050
</li>
5151
{/if}
5252
</ul>
53-
</div>
53+
</div>
5454
<br />
5555

5656
<table width="100%" border="0" cellpadding="3" cellspacing="0">
@@ -66,9 +66,9 @@
6666
</tr>
6767
<tr>
6868
<td>
69-
{if $sb_svn}
69+
{if $dev}
7070
Latest Git: <strong id='svnrev'>Please Wait...</strong>
71-
{/if}
71+
{/if}
7272
</td>
7373
<td>&nbsp;</td>
7474
<td>Connections Blocked: <strong>{$total_blocks}</strong></td>
@@ -99,4 +99,4 @@
9999
<td>&nbsp;</td>
100100
</tr>
101101
</table>
102-
<script type="text/javascript">xajax_CheckVersion();</script>
102+
<script type="text/javascript">xajax_CheckVersion();</script>

web/themes/sourcebans_dark/page_admin.tpl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<a href="index.php?p=admin&amp;c=settings">
3939
<img src="themes/default/images/admin/settings.png" alt="SourceBans Settings" border="0" /><br />
4040
Webpanel Settings
41-
</a>
41+
</a>
4242
</li>
4343
{/if}
4444
{if $access_mods}
@@ -50,7 +50,7 @@
5050
</li>
5151
{/if}
5252
</ul>
53-
</div>
53+
</div>
5454
<br />
5555

5656
<table width="100%" border="0" cellpadding="3" cellspacing="0">
@@ -66,9 +66,9 @@
6666
</tr>
6767
<tr>
6868
<td>
69-
{if $sb_svn}
69+
{if $dev}
7070
Latest Git: <strong id='svnrev'>Please Wait...</strong>
71-
{/if}
71+
{/if}
7272
</td>
7373
<td>&nbsp;</td>
7474
<td>Connections Blocked: <strong>{$total_blocks}</strong></td>
@@ -99,4 +99,4 @@
9999
<td>&nbsp;</td>
100100
</tr>
101101
</table>
102-
<script type="text/javascript">xajax_CheckVersion();</script>
102+
<script type="text/javascript">xajax_CheckVersion();</script>

web/version.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"version": "1.6.2",
3-
"git": "531"
3+
"git": "531",
4+
"dev": false
45
}

0 commit comments

Comments
 (0)