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

Denied URL access to disabled pages in the Pages section #29

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion qa-include/qa-page-activity.php
Expand Up @@ -28,7 +28,11 @@
header('Location: ../');
exit;
}


// Do not grant access to this section if it has been disabled
if (!qa_opt('nav_activity')) {
return include QA_INCLUDE_DIR . 'qa-page-not-found.php';
}

require_once QA_INCLUDE_DIR.'qa-db-selects.php';
require_once QA_INCLUDE_DIR.'qa-app-format.php';
Expand Down
5 changes: 5 additions & 0 deletions qa-include/qa-page-categories.php
Expand Up @@ -28,6 +28,11 @@
header('Location: ../');
exit;
}

// Do not grant access to this section if it has been disabled
if (!qa_opt('nav_categories')) {
return include QA_INCLUDE_DIR . 'qa-page-not-found.php';
}

require_once QA_INCLUDE_DIR.'qa-db-selects.php';
require_once QA_INCLUDE_DIR.'qa-app-format.php';
Expand Down
5 changes: 5 additions & 0 deletions qa-include/qa-page-hot.php
Expand Up @@ -28,6 +28,11 @@
header('Location: ../');
exit;
}

// Do not grant access to this section if it has been disabled
if (!qa_opt('nav_hot')) {
return include QA_INCLUDE_DIR . 'qa-page-not-found.php';
}

require_once QA_INCLUDE_DIR.'qa-db-selects.php';
require_once QA_INCLUDE_DIR.'qa-app-q-list.php';
Expand Down
5 changes: 5 additions & 0 deletions qa-include/qa-page-questions.php
Expand Up @@ -28,6 +28,11 @@
header('Location: ../');
exit;
}

// Do not grant access to this section if it has been disabled
if (!qa_opt('nav_questions')) {
return include QA_INCLUDE_DIR . 'qa-page-not-found.php';
}

require_once QA_INCLUDE_DIR.'qa-db-selects.php';
require_once QA_INCLUDE_DIR.'qa-app-format.php';
Expand Down
5 changes: 5 additions & 0 deletions qa-include/qa-page-tags.php
Expand Up @@ -28,6 +28,11 @@
header('Location: ../');
exit;
}

// Do not grant access to this section if it has been disabled
if (!qa_opt('nav_tags')) {
return include QA_INCLUDE_DIR . 'qa-page-not-found.php';
}

require_once QA_INCLUDE_DIR.'qa-db-selects.php';
require_once QA_INCLUDE_DIR.'qa-app-format.php';
Expand Down
5 changes: 5 additions & 0 deletions qa-include/qa-page-users.php
Expand Up @@ -28,6 +28,11 @@
header('Location: ../');
exit;
}

// Do not grant access to this section if it has been disabled
if (!qa_opt('nav_users')) {
return include QA_INCLUDE_DIR . 'qa-page-not-found.php';
}

require_once QA_INCLUDE_DIR.'qa-db-users.php';
require_once QA_INCLUDE_DIR.'qa-db-selects.php';
Expand Down