Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob-grahn committed Sep 10, 2024
1 parent 23be799 commit 0f8e873
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 9 deletions.
3 changes: 1 addition & 2 deletions common/queries/campaigns.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,8 @@ function campaign_update($pdo, $campaign_id, $levels)
throw new Exception('Nine levels must be specified.');
}

foreach ($levels as $key => $data) {
foreach ($levels as $key => $level) {
$level_num = $key + 1;
$level = $levels[$key];

// sanity: all info present?
if (empty($level->level_id) || empty($level->prize_type) || empty($level->prize_id)) {
Expand Down
3 changes: 0 additions & 3 deletions functions/http_fns/output_fns.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,4 @@ function output_error_page($message, $staff = null, $page_title = 'Error')
output_header($page_title, $mod, $admin);
$error = htmlspecialchars($message, ENT_QUOTES);
echo !empty($error) ? "Error: $error<br><br><a href='javascript:history.back()'><- Go Back</a>" : '';
if ($footer) {
output_footer();
}
}
1 change: 0 additions & 1 deletion functions/http_fns/pages/player_search_fns.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ function output_page($pdo, $user)

// make some variables
$group = get_group_info($user);
$name_color = $group->color;
$guild_id = (int) $user->guild; // guild id
$rank = $user->rank + $user->used_tokens; // rank
$hats = count(explode(',', $user->hat_array)) - 1; // hats
Expand Down
2 changes: 1 addition & 1 deletion functions/http_fns/query_fns.php
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ function moderate_level($pdo, $mod, $level_id, $action = 'unpublish')
}


function is_arti_level($pdo, $levels, $level_id)
function is_arti_level($levels, $level_id)
{
foreach ($levels as $level) {
if ($level->level_id == $level_id) {
Expand Down
2 changes: 1 addition & 1 deletion http_server/delete_level.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
}

// check if this is currently (or will be) the level of the week
if (is_arti_level($pdo, artifact_locations_select($pdo), $level_id)) {
if (is_arti_level(artifact_locations_select($pdo), $level_id)) {
$msg = 'Your level could not be deleted because it is or will be the Level of the Week. '
.'Please contact a member of the PR2 Staff Team for more information.';
throw new Exception($msg);
Expand Down
2 changes: 1 addition & 1 deletion http_server/upload_level.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@
}

// check if this is currently (or will be) the level of the week
if (is_arti_level($pdo, artifact_locations_select($pdo), $level->level_id)) {
if (is_arti_level(artifact_locations_select($pdo), $level->level_id)) {
$msg = 'Your level could not be modified because it is or will be the Level of the Week. '
.'To save your progress, save this level under a different name. '
.'Please contact a member of the PR2 Staff Team for more information.';
Expand Down

0 comments on commit 0f8e873

Please sign in to comment.