Skip to content

Commit

Permalink
Merge pull request #60 from CrazyHackGUT/dev
Browse files Browse the repository at this point in the history
Official update 1.1.5.3
  • Loading branch information
CrazyHackGUT authored Feb 5, 2017
2 parents c8c354b + 1e11c27 commit d9b371f
Show file tree
Hide file tree
Showing 168 changed files with 113 additions and 70 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# SourceBans - Material Design
![Образец](http://s09.radikal.ru/i182/1610/5f/e56ed82e77f8t.jpg)
#### Основан на [SourceBans++ 1.5.4.7](https://sbpp.github.io/)
#### Последняя актуальная версия: **1.1.5.2** *(от 28.01.2017)*
Официальная тема рефорка на *[HLmod.ru](http://hlmod.ru/threads/alpha-material-admin-refork-na-osnove-sb-1-5-4-7-bootstrap-3.36382/)* и на *[MyArena.ru](http://forum.myarena.ru/index.php?/topic/35781-alpha-material-admin-refork-sb-1547/)*
#### Последняя актуальная версия: **1.1.5.3** *(от 05.02.2017)*
Официальная тема рефорка на *[HLmod.ru](http://hlmod.ru/threads/v1-1-5-2-material-admin-refork-sb-1-5-4-7.38415/)* и на *[MyArena.ru](http://forum.myarena.ru/index.php?/topic/35781-alpha-material-admin-refork-sb-1547/)*

### Ссылки на загрузку:
- **Dev-ветка (1.1.6)** (временно недоступно)
- **[Stable-релиз (1.1.5.2)](https://github.com/CrazyHackGUT/SB_Material_Design/archive/release_1152.zip)**
- **[Stable-релиз (1.1.5.3)](https://github.com/CrazyHackGUT/SB_Material_Design/archive/release_1153.zip)**

[Список всех планируемых изменений (TODO)](https://github.com/CrazyHackGUT/SB_Material_Design/blob/master/TODO.md)

Expand Down
19 changes: 0 additions & 19 deletions TODO.md

This file was deleted.

14 changes: 0 additions & 14 deletions Thanks.md

This file was deleted.

7 changes: 0 additions & 7 deletions authors.md

This file was deleted.

12 changes: 0 additions & 12 deletions changelist.md

This file was deleted.

11 changes: 6 additions & 5 deletions updates.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"release": "1.1.5.2",
"release": "1.1.5.3",
"changes": [
"Теперь кнопка, показывающая список администрации сбоку, скрывается, если некого показывать.",
"Добавлен раздел Обслуживания системы в настройки"
"Добавлена ссылка на справочную статью на Wiki рядом с обслуживанием системы.",
"Исправлена ошибка, когда предупреждения корректно не выдавались.",
"Изменена ссылка на список разработчиков в футере сайта."
],
"download_url": "https://github.com/CrazyHackGUT/SB_Material_Design/archive/release_1152.zip",
"changelist": "https://github.com/CrazyHackGUT/SB_Material_Design/blob/master/changelist.md",
"download_url": "https://github.com/CrazyHackGUT/SB_Material_Design/archive/release_1153.zip",
"changelist": "https://github.com/CrazyHackGUT/SB_Material_Design/wiki/%D0%A1%D0%BF%D0%B8%D1%81%D0%BE%D0%BA-%D0%B8%D0%B7%D0%BC%D0%B5%D0%BD%D0%B5%D0%BD%D0%B8%D0%B9",

"mods_manifest": "http://dl.kruzefag.ru/SB_MaterialDesign/manifest.json"
}
Binary file modified web_upload/images/favicon.ico
Binary file not shown.
Binary file removed web_upload/images/favicon_black.ico
Binary file not shown.
Binary file removed web_upload/images/games/tf2.gif
Binary file not shown.
Binary file removed web_upload/images/logos/sb-large_noalpha.png
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web_upload/images/maps/csgo/aim_aztec.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web_upload/images/maps/csgo/aim_bang.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web_upload/images/maps/csgo/aim_deadweight_b4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web_upload/images/maps/csgo/aim_deagle7k.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web_upload/images/maps/csgo/aim_map.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web_upload/images/maps/csgo/aim_map_usp.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web_upload/images/maps/csgo/aim_multi_v4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web_upload/images/maps/csgo/aim_neonlight.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web_upload/images/maps/csgo/aim_phosphor.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web_upload/images/maps/csgo/aim_pistol_tron.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web_upload/images/maps/csgo/aim_serenity.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web_upload/images/maps/csgo/aim_shootout.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web_upload/images/maps/csgo/aim_travesty.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web_upload/images/maps/csgo/am_alley.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web_upload/images/maps/csgo/am_asgard.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web_upload/images/maps/csgo/am_banana.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web_upload/images/maps/csgo/am_basement.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web_upload/images/maps/csgo/am_brickyard.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web_upload/images/maps/csgo/am_carcrash.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web_upload/images/maps/csgo/am_courtyard.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web_upload/images/maps/csgo/am_crashz_dust_v2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web_upload/images/maps/csgo/am_d2_tunel_3d1.jpg
Binary file added web_upload/images/maps/csgo/am_d2_yard.jpg
Binary file added web_upload/images/maps/csgo/am_dd2_b_dolnma.jpg
Binary file added web_upload/images/maps/csgo/am_dust2014.jpg
Binary file added web_upload/images/maps/csgo/am_dust2_cat.jpg
Binary file added web_upload/images/maps/csgo/am_four.jpg
Binary file added web_upload/images/maps/csgo/am_grass2.jpg
Binary file added web_upload/images/maps/csgo/am_lanii.jpg
Binary file added web_upload/images/maps/csgo/am_lead.jpg
Binary file added web_upload/images/maps/csgo/am_lego_v1.jpg
Binary file added web_upload/images/maps/csgo/am_loot.jpg
Binary file added web_upload/images/maps/csgo/am_marble.jpg
Binary file added web_upload/images/maps/csgo/am_market.jpg
Binary file added web_upload/images/maps/csgo/am_midnight.jpg
Binary file added web_upload/images/maps/csgo/am_mirage_a_3d1.jpg
Binary file added web_upload/images/maps/csgo/am_mirage_b_3d1.jpg
Binary file added web_upload/images/maps/csgo/am_mirage_mid_3D1.jpg
Binary file added web_upload/images/maps/csgo/am_must2.jpg
Binary file added web_upload/images/maps/csgo/am_must2014.jpg
Binary file added web_upload/images/maps/csgo/am_nuke.jpg
Binary file added web_upload/images/maps/csgo/am_nuke2016_03.jpg
Binary file added web_upload/images/maps/csgo/am_nuke_ramp.jpg
Binary file added web_upload/images/maps/csgo/am_nuke_ramp_3D1.jpg
Binary file added web_upload/images/maps/csgo/am_overpass_tunel.jpg
Binary file added web_upload/images/maps/csgo/am_park2.jpg
Binary file added web_upload/images/maps/csgo/am_plain2.jpg
Binary file added web_upload/images/maps/csgo/am_poolparty.jpg
Binary file added web_upload/images/maps/csgo/am_rob_a.jpg
Binary file added web_upload/images/maps/csgo/am_sewage.jpg
Binary file added web_upload/images/maps/csgo/am_skybound.jpg
Binary file added web_upload/images/maps/csgo/am_snow_cbg.jpg
Binary file added web_upload/images/maps/csgo/am_stock.jpg
Binary file added web_upload/images/maps/csgo/am_texture2014.jpg
Binary file added web_upload/images/maps/csgo/am_trainwreck.jpg
Binary file added web_upload/images/maps/csgo/am_trainyard.jpg
Binary file added web_upload/images/maps/csgo/am_tunnels.jpg
Binary file added web_upload/images/maps/csgo/am_warehouse3.jpg
Binary file added web_upload/images/maps/csgo/am_water.jpg
Binary file added web_upload/images/maps/csgo/am_water2014.jpg
Binary file added web_upload/images/maps/csgo/am_xenon.jpg
Binary file added web_upload/images/maps/csgo/am_yard.jpg
Binary file added web_upload/images/maps/csgo/ar_baggage.jpg
Binary file added web_upload/images/maps/csgo/ar_monastery.jpg
Binary file added web_upload/images/maps/csgo/ar_shoots.jpg
Binary file added web_upload/images/maps/csgo/awp_arena_gm.jpg
Binary file added web_upload/images/maps/csgo/awp_batson_dev.jpg
Binary file added web_upload/images/maps/csgo/awp_baw.jpg
Binary file added web_upload/images/maps/csgo/awp_blocks.jpg
Binary file added web_upload/images/maps/csgo/awp_boostex2.jpg
Binary file added web_upload/images/maps/csgo/awp_city_csgo.jpg
Binary file added web_upload/images/maps/csgo/awp_dev_by_meska.jpg
Binary file added web_upload/images/maps/csgo/awp_devindia.jpg
Binary file added web_upload/images/maps/csgo/awp_dream.jpg
Binary file added web_upload/images/maps/csgo/awp_dust.jpg
Binary file added web_upload/images/maps/csgo/awp_dust_sky.jpg
Binary file added web_upload/images/maps/csgo/awp_dust_target.jpg
Binary file added web_upload/images/maps/csgo/awp_dusty.jpg
Binary file added web_upload/images/maps/csgo/awp_geyser.jpg
Binary file added web_upload/images/maps/csgo/awp_greengrass.jpg
Binary file added web_upload/images/maps/csgo/awp_hunter.jpg
Binary file added web_upload/images/maps/csgo/awp_ice_csgo.jpg
Binary file added web_upload/images/maps/csgo/awp_indiaNG.jpg
Binary file added web_upload/images/maps/csgo/awp_india_nav72.jpg
Binary file added web_upload/images/maps/csgo/awp_india_winter.jpg
Binary file added web_upload/images/maps/csgo/awp_islands.jpg
Binary file added web_upload/images/maps/csgo/awp_lego_2.jpg
Binary file added web_upload/images/maps/csgo/awp_lego_2016.jpg
Binary file added web_upload/images/maps/csgo/awp_lego_2_remake.jpg
Binary file added web_upload/images/maps/csgo/awp_lego_2_winter.jpg
Binary file added web_upload/images/maps/csgo/awp_lego_8.jpg
Binary file added web_upload/images/maps/csgo/awp_lego_9.jpg
Binary file added web_upload/images/maps/csgo/awp_lego_asia.jpg
Binary file added web_upload/images/maps/csgo/awp_lego_fort_fix.jpg
Binary file added web_upload/images/maps/csgo/awp_lego_x.jpg
Binary file added web_upload/images/maps/csgo/awp_matpac_2.jpg
Binary file added web_upload/images/maps/csgo/awp_minecraft2.jpg
Binary file added web_upload/images/maps/csgo/awp_nitros_india.jpg
Binary file added web_upload/images/maps/csgo/awp_summer.jpg
Binary file added web_upload/images/maps/csgo/awp_taj_heaven.jpg
Binary file added web_upload/images/maps/csgo/awp_tower_def.jpg
Binary file added web_upload/images/maps/csgo/awp_tridust.jpg
Binary file added web_upload/images/maps/csgo/awp_vietnam.jpg
Binary file added web_upload/images/maps/csgo/candy2.jpg
Binary file added web_upload/images/maps/csgo/cs_assault.jpg
Binary file added web_upload/images/maps/csgo/cs_italy.jpg
Binary file added web_upload/images/maps/csgo/cs_militia.jpg
Binary file added web_upload/images/maps/csgo/cs_office.jpg
Binary file added web_upload/images/maps/csgo/de_aztec.jpg
Binary file added web_upload/images/maps/csgo/de_bank.jpg
Binary file added web_upload/images/maps/csgo/de_cache.jpg
Binary file added web_upload/images/maps/csgo/de_castle.jpg
Binary file added web_upload/images/maps/csgo/de_cbble.jpg
Binary file added web_upload/images/maps/csgo/de_dust.jpg
Binary file added web_upload/images/maps/csgo/de_dust2.jpg
Binary file added web_upload/images/maps/csgo/de_dust2_night.jpg
Binary file added web_upload/images/maps/csgo/de_inferno.jpg
Binary file added web_upload/images/maps/csgo/de_inferno_dawn.jpg
Binary file added web_upload/images/maps/csgo/de_lake.jpg
Binary file added web_upload/images/maps/csgo/de_mirage.jpg
Binary file added web_upload/images/maps/csgo/de_mirage_dusk.jpg
Binary file added web_upload/images/maps/csgo/de_nuke.jpg
Binary file added web_upload/images/maps/csgo/de_oldnuke.jpg
Binary file added web_upload/images/maps/csgo/de_overpass.jpg
Binary file added web_upload/images/maps/csgo/de_pripyat.jpg
Binary file added web_upload/images/maps/csgo/de_safehouse.jpg
Binary file added web_upload/images/maps/csgo/de_shorttrain.jpg
Binary file added web_upload/images/maps/csgo/de_sparity_v37.jpg
Binary file added web_upload/images/maps/csgo/de_stmarc.jpg
Binary file added web_upload/images/maps/csgo/de_sugarcane.jpg
Binary file added web_upload/images/maps/csgo/de_train.jpg
Binary file added web_upload/images/maps/csgo/de_tuscan.jpg
Binary file added web_upload/images/maps/csgo/de_vertigo.jpg
Binary file added web_upload/images/maps/csgo/de_waterfall.jpg
Binary file added web_upload/images/maps/csgo/neon_2000.jpg
Binary file added web_upload/images/type_silence.png
33 changes: 33 additions & 0 deletions web_upload/includes/sb-callback.php
Original file line number Diff line number Diff line change
Expand Up @@ -3100,6 +3100,39 @@ function Maintenance($type) {
break;
}

case "avatarupdate": {
Maintenance("avatarcache");
$users = $GLOBALS['db']->GetAll(sprintf("SELECT `authid` FROM `%s_admins`", DB_PREFIX));
foreach ($users as &$user)
GetUserAvatar($user['authid']);
ShowBox_ajx("Успех", "Кеш аватаров Администраторов обновлён.", "green", "", true, $objResponse);
break;
}

case "commentsclean": {
$GLOBALS['db']->Execute(sprintf("TRUNCATE `%s_comments`;", DB_PREFIX));
ShowBox_ajx("Успех", "Все комментарии были успешно удалены.", "green", "", true, $objResponse);
break;
}

case "banlogclean": {
$GLOBALS['db']->Execute(sprintf("TRUNCATE `%s_banlog`;", DB_PREFIX));
ShowBox_ajx("Успех", "История заблокированных соединений к серверам успешно очищена.", "green", "", true, $objResponse);
break;
}

case "protests": {
$GLOBALS['db']->Execute(sprintf("TRUNCATE `%s_protests`;", DB_PREFIX));
ShowBox_ajx("Успех", "Протесты успешно удалены.", "green", "", true, $objResponse);
break;
}

case "reports": {
$GLOBALS['db']->Execute(sprintf("TRUNCATE `%s_submissions`;", DB_PREFIX));
ShowBox_ajx("Успех", "Предложения бана (репорты) успешно удалены.", "green", "", true, $objResponse);
break;
}

default: {
ShowBox_ajx("Ошибка", "Неизвестная операция", "red", "", true, $objResponse);
break;
Expand Down
2 changes: 1 addition & 1 deletion web_upload/init.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
// ---------------------------------------------------
// Initial setup
// ---------------------------------------------------
#define('SB_GIT', true);

if(!defined('SB_VERSION')){
define('SB_VERSION', '1.5.4.7');
define('MA_BRANCH', 'master');
Expand Down
4 changes: 4 additions & 0 deletions web_upload/install/includes/system-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,10 @@ function getRequestProtocol() {
}

function TryAutodetectURL() {
if (isset($_SERVER['HTTP_REFERER']) && !empty($_SERVER['HTTP_REFERER'])) {
$uri = explode("/install", $_SERVER['HTTP_REFERER']);
return $uri[0];
}
$proto = getRequestProtocol();
$domain = $_SERVER['SERVER_NAME'];
$uri = explode("/install", $_SERVER['REQUEST_URI']);
Expand Down
5 changes: 5 additions & 0 deletions web_upload/pages/page.commslist.php
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,11 @@ function setPostKey()
$data['type_icon'] = '<img src="images/type_c.png" alt="Чат" border="0" align="absmiddle" />';
$gag_count = $gag_count - 1;
break;
case 3:
$data['type_icon'] = '<img src="images/type_silence.png" alt="Микрофон и чат" border=0 align="absmiddle" />';
$gag_count -= 1;
$mute_count -= 1;
break;
default:
$data['type_icon'] = '<img src="images/country/zz.gif" alt="Неизвестный тип блока" border="0" align="absmiddle" />';
break;
Expand Down
File renamed without changes.
5 changes: 5 additions & 0 deletions web_upload/themes/new_box/page_admin_settings_settings.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,15 @@
<option value="bansexpired">Удалить истёкшие баны</option>
<option value="commsexpired">Удалить истёкшие блокировки чата</option>
<option value="adminsexpired">Удалить истёкших Администраторов</option>
<option value="commentsclean">Удалить все комментарии</option>
<option value="protests">Удалить все протесты банов</option>
<option value="reports">Удалить все предложения бана (репорты)</option>
<option value="banlogclean">Очистить историю заблокированных соединений</option>
<option value="warningsexpired">Удалить истёкшие Предупреждения</option>
<option value="rehashcountries">Обновить кеш стран в банлисте</option>
<option value="updatecountries">Обновить файл GeoIP</option>
<option value="optimizebd">Произвести оптимизацию БД</option>
<option value="avatarupdate">Пересобрать кеш аватарок</option>
</select>
</div>
<div class="col-sm-2 p-t-5">
Expand Down
18 changes: 13 additions & 5 deletions web_upload/themes/new_box/page_dashboard.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,8 @@
</div>
{if $stats}
<div class="mini-charts">
<div class="row">
<div class="row">
<a href="index.php?p=adminlist">
<div class="col-sm-6 col-md-3">
<div class="mini-charts-item bgm-cyan">
<div class="clearfix">
Expand All @@ -249,8 +250,10 @@
</div>
</div>
</div>
</a>

<div class="col-sm-6 col-md-3">
<a href="index.php?p=banlist">
<div class="col-sm-6 col-md-3">
<div class="mini-charts-item bgm-lightgreen">
<div class="clearfix">
<div class="chart stats-bar-2"></div>
Expand All @@ -261,8 +264,10 @@
</div>
</div>
</div>
</a>

<div class="col-sm-6 col-md-3">
<a href="index.php?p=servers">
<div class="col-sm-6 col-md-3">
<div class="mini-charts-item bgm-orange">
<div class="clearfix">
<div class="chart stats-line"></div>
Expand All @@ -273,8 +278,10 @@
</div>
</div>
</div>
</a>

<div class="col-sm-6 col-md-3">
<a href="index.php?p=commslist">
<div class="col-sm-6 col-md-3">
<div class="mini-charts-item bgm-bluegray">
<div class="clearfix">
<div class="chart stats-line-2"></div>
Expand All @@ -285,6 +292,7 @@
</div>
</div>
</div>
</div>
</a>
</div>
</div>
{/if}
2 changes: 1 addition & 1 deletion web_upload/themes/new_box/page_login.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<div class="form-group">
-{if $login_allowed}-<label class="col-sm-2 control-label">Другие способы</label>-{/if}-
<div class="col-sm-10 p-t-10">
-{sb_button text="Войти через STEAM" onclick="window.location.href='steam_aut.php?login'" icon="<i class='zmdi zmdi-steam'></i>" class="btn-icon-text bgm-bluegray"}-
-{sb_button text="Войти через STEAM" onclick="window.location.href='steam_auth.php?login'" icon="<i class='zmdi zmdi-steam'></i>" class="btn-icon-text bgm-bluegray"}-
</div>
</div>
-{/if}-
Expand Down
4 changes: 2 additions & 2 deletions web_upload/themes/new_box/theme.conf.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
define('theme_author', "ASTRO & XaH JoB & Vampir & SAZONISCHE & NoTiCE & CrazyHackGUT & Серый™");

// Set the version of the theme here
define('theme_version', "1.1.5.2");
define('theme_version', "1.1.5.3");

// Set the link of the theme here
define('theme_link', "https://github.com/CrazyHackGUT/SB_Material_Design");
define('theme_link', "https://discord.gg/BrTP9Cu");

// Set the screenshot filename for your theme (must be inside your theme folder)
// Must be: 250px wide X 170px High
Expand Down
38 changes: 38 additions & 0 deletions web_upload/updater/data/Warnings_fixes.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php
/* Фикс системы предупреждений */
$table_struct = $GLOBALS['db']->GetAll("DESCRIBE `". DB_PREFIX . "_warns`");
foreach ($table_struct as &$field) {
if ($field['Field'] == "id") {
if ($field['Key'] != "PRI") {
$GLOBALS['db']->Execute("ALTER TABLE `" . DB_PREFIX . "_warns`
ADD UNIQUE KEY `id` (`id`);");
}
if ($field['Extra'] != "auto_increment") {
$GLOBALS['db']->Execute("ALTER TABLE `" . DB_PREFIX . "_warns`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;");
}
}
}

/* Для новой серверной части, чтобы ошибки не спамила. В 1.1.6 надо сделать... */
$GLOBALS['db']->Execute("ALTER TABLE `" . DB_PREFIX . "_srvgroups`
ADD `maxbantime` INT NOT NULL DEFAULT '-1' AFTER `groups_immune`,
ADD `maxmutetime` INT NOT NULL DEFAULT '-1' AFTER `maxbantime`;");

/* Обновление иконки МОДа TF2 */
if ($GLOBALS['db']->GetOne("SELECT `icon` FROM `" . DB_PREFIX . "_mods` WHERE `modfolder` = 'tf';") == "tf2.gif") {
$GLOBALS['db']->Execute("UPDATE `" . DB_PREFIX . "_mods`
SET `icon` = 'tf2.png'
WHERE `modfolder` = 'tf';");
}

/* Удаление неиспользуемого контента в /images/games/ */
$data = scandir(SB_ICONS);
foreach ($data as &$obj) {
if (!is_file(sprintf("%s/%s", SB_ICONS, $obj)))
continue;

if ((int) $GLOBALS['db']->GetOne(sprintf("SELECT COUNT(`icon`) FROM `%s_mods` WHERE `icon` = %s;", DB_PREFIX, $GLOBALS['db']->qstr($obj))) == 0) {
unlink(sprintf("%s/%s", SB_ICONS, $obj));
}
}
3 changes: 2 additions & 1 deletion web_upload/updater/store.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
513 => "SteamAvatars_ExpireDrop.php",
514 => "OldServerSide.php",
515 => "Theme_CFG.php",
516 => "Warnings.php"
516 => "Warnings.php",
517 => "Warnings_fixes.php"
];
?>

0 comments on commit d9b371f

Please sign in to comment.