Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QOL Patch | Address GDPR concerns #497

Merged
merged 18 commits into from
Jul 27, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rework routing in installer
  • Loading branch information
Groruk committed Jul 27, 2018
commit e49c255793bdda58ed8be10d2d1864e8b084253a
64 changes: 0 additions & 64 deletions web/install/includes/page-builder.php

This file was deleted.

27 changes: 27 additions & 0 deletions web/install/includes/routing.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php
function route($step)
{
switch ($step) {
case 6:
return ['AMXBans Import', '/page.6.php'];
case 5:
return ['Initial Setup', '/page.5.php'];
case 4:
return ['Table Creation', '/page.4.php'];
case 3:
return ['System Requirements Check', '/page.3.php'];
case 2:
return ['Database Details', '/page.2.php'];
default:
return ['License agreement', '/page.1.php'];
}
}

function build($title, $page, $step)
{
require_once(TEMPLATES_PATH.'/header.php');
require_once(TEMPLATES_PATH.'/submenu.php');
require_once(TEMPLATES_PATH.'/content.header.php');
require_once(TEMPLATES_PATH.$page);
require_once(TEMPLATES_PATH.'/footer.php');
}
43 changes: 13 additions & 30 deletions web/install/index.php
Original file line number Diff line number Diff line change
@@ -1,31 +1,14 @@
<?php
/*************************************************************************
This file is part of SourceBans++

Copyright © 2014-2016 SourceBans++ Dev Team <https://github.com/sbpp>

SourceBans++ is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.

You should have received a copy of the license along with this
work. If not, see <http://creativecommons.org/licenses/by-nc-sa/3.0/>.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

This program is based off work covered by the following copyright(s):
SourceBans 1.4.11
Copyright © 2007-2014 SourceBans Team - Part of GameConnect
Licensed under CC BY-NC-SA 3.0
Page: <http://www.sourcebans.net/> - <http://www.gameconnect.net/>
*************************************************************************/

include_once 'init.php';
include_once(INCLUDES_PATH . "/user-functions.php");
include_once(INCLUDES_PATH . "/system-functions.php");
include_once(INCLUDES_PATH . "/page-builder.php");
require_once('init.php');
require_once(INCLUDES_PATH.'/system-functions.php');
require_once(INCLUDES_PATH.'/routing.php');

$options = [
'min_range' => 1,
'max_range' => 6,
'default' => 1
];
$step = filter_input(INPUT_GET, 'step', FILTER_VALIDATE_INT, ['options' => $options]);

[$title, $page] = route($step);
build($title, $page, $step);