Commit 14d0f823 by Scott

Move page controllers into subdirectory

parent c37a8a02
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
} }
require_once QA_INCLUDE_DIR.'qa-app-limits.php'; require_once QA_INCLUDE_DIR.'qa-app-limits.php';
require_once QA_INCLUDE_DIR.'qa-page-question-submit.php'; require_once QA_INCLUDE_DIR.'pages/question-submit.php';
$code=qa_post_text('code'); $code=qa_post_text('code');
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
require_once QA_INCLUDE_DIR.'qa-util-sort.php'; require_once QA_INCLUDE_DIR.'qa-util-sort.php';
require_once QA_INCLUDE_DIR.'qa-util-string.php'; require_once QA_INCLUDE_DIR.'qa-util-string.php';
require_once QA_INCLUDE_DIR.'qa-app-captcha.php'; require_once QA_INCLUDE_DIR.'qa-app-captcha.php';
require_once QA_INCLUDE_DIR.'qa-page-question-view.php'; require_once QA_INCLUDE_DIR.'pages/question-view.php';
require_once QA_INCLUDE_DIR.'qa-app-updates.php'; require_once QA_INCLUDE_DIR.'qa-app-updates.php';
$questionid=qa_request_part(0); $questionid=qa_request_part(0);
...@@ -162,7 +162,7 @@ ...@@ -162,7 +162,7 @@
} }
if (qa_is_http_post() || strlen($pagestate)) if (qa_is_http_post() || strlen($pagestate))
require QA_INCLUDE_DIR.'qa-page-question-post.php'; require QA_INCLUDE_DIR.'pages/question-post.php';
$formrequested=isset($formtype); $formrequested=isset($formtype);
......
...@@ -60,26 +60,26 @@ ...@@ -60,26 +60,26 @@
switch (qa_request_part(2)) { switch (qa_request_part(2)) {
case 'wall': case 'wall':
qa_set_template('user-wall'); qa_set_template('user-wall');
$qa_content = include QA_INCLUDE_DIR.'qa-page-user-wall.php'; $qa_content = include QA_INCLUDE_DIR.'pages/user-wall.php';
break; break;
case 'activity': case 'activity':
qa_set_template('user-activity'); qa_set_template('user-activity');
$qa_content = include QA_INCLUDE_DIR.'qa-page-user-activity.php'; $qa_content = include QA_INCLUDE_DIR.'pages/user-activity.php';
break; break;
case 'questions': case 'questions':
qa_set_template('user-questions'); qa_set_template('user-questions');
$qa_content = include QA_INCLUDE_DIR.'qa-page-user-questions.php'; $qa_content = include QA_INCLUDE_DIR.'pages/user-questions.php';
break; break;
case 'answers': case 'answers':
qa_set_template('user-answers'); qa_set_template('user-answers');
$qa_content = include QA_INCLUDE_DIR.'qa-page-user-answers.php'; $qa_content = include QA_INCLUDE_DIR.'pages/user-answers.php';
break; break;
case null: case null:
$qa_content = include QA_INCLUDE_DIR.'qa-page-user-profile.php'; $qa_content = include QA_INCLUDE_DIR.'pages/user-profile.php';
break; break;
default: default:
......
...@@ -47,8 +47,8 @@ ...@@ -47,8 +47,8 @@
require_once QA_INCLUDE_DIR.'qa-app-format.php'; require_once QA_INCLUDE_DIR.'qa-app-format.php';
require_once QA_INCLUDE_DIR.'qa-app-post-create.php'; require_once QA_INCLUDE_DIR.'qa-app-post-create.php';
require_once QA_INCLUDE_DIR.'qa-app-cookies.php'; require_once QA_INCLUDE_DIR.'qa-app-cookies.php';
require_once QA_INCLUDE_DIR.'qa-page-question-view.php'; require_once QA_INCLUDE_DIR.'pages/question-view.php';
require_once QA_INCLUDE_DIR.'qa-page-question-submit.php'; require_once QA_INCLUDE_DIR.'pages/question-submit.php';
// Try to create the new answer // Try to create the new answer
......
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
require_once QA_INCLUDE_DIR.'qa-app-format.php'; require_once QA_INCLUDE_DIR.'qa-app-format.php';
require_once QA_INCLUDE_DIR.'qa-app-users.php'; require_once QA_INCLUDE_DIR.'qa-app-users.php';
require_once QA_INCLUDE_DIR.'qa-db-selects.php'; require_once QA_INCLUDE_DIR.'qa-db-selects.php';
require_once QA_INCLUDE_DIR.'qa-page-question-view.php'; require_once QA_INCLUDE_DIR.'pages/question-view.php';
require_once QA_INCLUDE_DIR.'qa-page-question-submit.php'; require_once QA_INCLUDE_DIR.'pages/question-submit.php';
// Load relevant information about this answer // Load relevant information about this answer
......
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
require_once QA_INCLUDE_DIR.'qa-app-format.php'; require_once QA_INCLUDE_DIR.'qa-app-format.php';
require_once QA_INCLUDE_DIR.'qa-app-users.php'; require_once QA_INCLUDE_DIR.'qa-app-users.php';
require_once QA_INCLUDE_DIR.'qa-db-selects.php'; require_once QA_INCLUDE_DIR.'qa-db-selects.php';
require_once QA_INCLUDE_DIR.'qa-page-question-view.php'; require_once QA_INCLUDE_DIR.'pages/question-view.php';
require_once QA_INCLUDE_DIR.'qa-page-question-submit.php'; require_once QA_INCLUDE_DIR.'pages/question-submit.php';
// Load relevant information about this comment // Load relevant information about this comment
......
...@@ -53,8 +53,8 @@ ...@@ -53,8 +53,8 @@
require_once QA_INCLUDE_DIR.'qa-app-format.php'; require_once QA_INCLUDE_DIR.'qa-app-format.php';
require_once QA_INCLUDE_DIR.'qa-app-post-create.php'; require_once QA_INCLUDE_DIR.'qa-app-post-create.php';
require_once QA_INCLUDE_DIR.'qa-app-cookies.php'; require_once QA_INCLUDE_DIR.'qa-app-cookies.php';
require_once QA_INCLUDE_DIR.'qa-page-question-view.php'; require_once QA_INCLUDE_DIR.'pages/question-view.php';
require_once QA_INCLUDE_DIR.'qa-page-question-submit.php'; require_once QA_INCLUDE_DIR.'pages/question-submit.php';
require_once QA_INCLUDE_DIR.'qa-util-sort.php'; require_once QA_INCLUDE_DIR.'qa-util-sort.php';
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
require_once QA_INCLUDE_DIR.'qa-app-users.php'; require_once QA_INCLUDE_DIR.'qa-app-users.php';
require_once QA_INCLUDE_DIR.'qa-app-cookies.php'; require_once QA_INCLUDE_DIR.'qa-app-cookies.php';
require_once QA_INCLUDE_DIR.'qa-app-format.php'; require_once QA_INCLUDE_DIR.'qa-app-format.php';
require_once QA_INCLUDE_DIR.'qa-page-question-view.php'; require_once QA_INCLUDE_DIR.'pages/question-view.php';
require_once QA_INCLUDE_DIR.'qa-util-sort.php'; require_once QA_INCLUDE_DIR.'qa-util-sort.php';
......
...@@ -212,11 +212,11 @@ ...@@ -212,11 +212,11 @@
} elseif (is_numeric($requestparts[0])) { } elseif (is_numeric($requestparts[0])) {
qa_set_template('question'); qa_set_template('question');
$qa_content=require QA_INCLUDE_DIR.'qa-page-question.php'; $qa_content=require QA_INCLUDE_DIR.'pages/question.php';
} else { } else {
qa_set_template(strlen($firstlower) ? $firstlower : 'qa'); // will be changed later qa_set_template(strlen($firstlower) ? $firstlower : 'qa'); // will be changed later
$qa_content=require QA_INCLUDE_DIR.'qa-page-default.php'; // handles many other pages, including custom pages and page modules $qa_content=require QA_INCLUDE_DIR.'pages/default.php'; // handles many other pages, including custom pages and page modules
} }
if ($firstlower=='admin') { if ($firstlower=='admin') {
...@@ -395,52 +395,52 @@ ...@@ -395,52 +395,52 @@
if (qa_to_override(__FUNCTION__)) { $args=func_get_args(); return qa_call_override(__FUNCTION__, $args); } if (qa_to_override(__FUNCTION__)) { $args=func_get_args(); return qa_call_override(__FUNCTION__, $args); }
return array( return array(
'account' => 'qa-page-account.php', 'account' => 'pages/account.php',
'activity/' => 'qa-page-activity.php', 'activity/' => 'pages/activity.php',
'admin/' => 'qa-page-admin-default.php', 'admin/' => 'pages/admin/admin-default.php',
'admin/approve' => 'qa-page-admin-approve.php', 'admin/approve' => 'pages/admin/admin-approve.php',
'admin/categories' => 'qa-page-admin-categories.php', 'admin/categories' => 'pages/admin/admin-categories.php',
'admin/flagged' => 'qa-page-admin-flagged.php', 'admin/flagged' => 'pages/admin/admin-flagged.php',
'admin/hidden' => 'qa-page-admin-hidden.php', 'admin/hidden' => 'pages/admin/admin-hidden.php',
'admin/layoutwidgets' => 'qa-page-admin-widgets.php', 'admin/layoutwidgets' => 'pages/admin/admin-widgets.php',
'admin/moderate' => 'qa-page-admin-moderate.php', 'admin/moderate' => 'pages/admin/admin-moderate.php',
'admin/pages' => 'qa-page-admin-pages.php', 'admin/pages' => 'pages/admin/admin-pages.php',
'admin/plugins' => 'qa-page-admin-plugins.php', 'admin/plugins' => 'pages/admin/admin-plugins.php',
'admin/points' => 'qa-page-admin-points.php', 'admin/points' => 'pages/admin/admin-points.php',
'admin/recalc' => 'qa-page-admin-recalc.php', 'admin/recalc' => 'pages/admin/admin-recalc.php',
'admin/stats' => 'qa-page-admin-stats.php', 'admin/stats' => 'pages/admin/admin-stats.php',
'admin/userfields' => 'qa-page-admin-userfields.php', 'admin/userfields' => 'pages/admin/admin-userfields.php',
'admin/usertitles' => 'qa-page-admin-usertitles.php', 'admin/usertitles' => 'pages/admin/admin-usertitles.php',
'answers/' => 'qa-page-answers.php', 'answers/' => 'pages/answers.php',
'ask' => 'qa-page-ask.php', 'ask' => 'pages/ask.php',
'categories/' => 'qa-page-categories.php', 'categories/' => 'pages/categories.php',
'comments/' => 'qa-page-comments.php', 'comments/' => 'pages/comments.php',
'confirm' => 'qa-page-confirm.php', 'confirm' => 'pages/confirm.php',
'favorites' => 'qa-page-favorites.php', 'favorites' => 'pages/favorites.php',
'favorites/questions' => 'qa-page-favorites-list.php', 'favorites/questions' => 'pages/favorites-list.php',
'favorites/users' => 'qa-page-favorites-list.php', 'favorites/users' => 'pages/favorites-list.php',
'favorites/tags' => 'qa-page-favorites-list.php', 'favorites/tags' => 'pages/favorites-list.php',
'feedback' => 'qa-page-feedback.php', 'feedback' => 'pages/feedback.php',
'forgot' => 'qa-page-forgot.php', 'forgot' => 'pages/forgot.php',
'hot/' => 'qa-page-hot.php', 'hot/' => 'pages/hot.php',
'ip/' => 'qa-page-ip.php', 'ip/' => 'pages/ip.php',
'login' => 'qa-page-login.php', 'login' => 'pages/login.php',
'logout' => 'qa-page-logout.php', 'logout' => 'pages/logout.php',
'messages/' => 'qa-page-messages.php', 'messages/' => 'pages/messages.php',
'message/' => 'qa-page-message.php', 'message/' => 'pages/message.php',
'questions/' => 'qa-page-questions.php', 'questions/' => 'pages/questions.php',
'register' => 'qa-page-register.php', 'register' => 'pages/register.php',
'reset' => 'qa-page-reset.php', 'reset' => 'pages/reset.php',
'search' => 'qa-page-search.php', 'search' => 'pages/search.php',
'tag/' => 'qa-page-tag.php', 'tag/' => 'pages/tag.php',
'tags' => 'qa-page-tags.php', 'tags' => 'pages/tags.php',
'unanswered/' => 'qa-page-unanswered.php', 'unanswered/' => 'pages/unanswered.php',
'unsubscribe' => 'qa-page-unsubscribe.php', 'unsubscribe' => 'pages/unsubscribe.php',
'updates' => 'qa-page-updates.php', 'updates' => 'pages/updates.php',
'user/' => 'qa-page-user.php', 'user/' => 'pages/user.php',
'users' => 'qa-page-users.php', 'users' => 'pages/users.php',
'users/blocked' => 'qa-page-users-blocked.php', 'users/blocked' => 'pages/users-blocked.php',
'users/special' => 'qa-page-users-special.php', 'users/special' => 'pages/users-special.php',
); );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment