Commit fa841183 by Scott

Coding style (misc)

parent 4078a0aa
......@@ -813,6 +813,7 @@ function qa_content_prepare($voting = false, $categoryids = null)
/**
* Get the start parameter which should be used, as constrained by the setting in qa-config.php
* @return int
*/
function qa_get_start()
{
......@@ -822,6 +823,7 @@ function qa_get_start()
/**
* Get the state parameter which should be used, as set earlier in qa_load_state()
* @return string
*/
function qa_get_state()
{
......
......@@ -63,7 +63,7 @@ $maximaDefaults = array(
'QA_DB_MAX_EVENTS_PER_Q' => 5,
);
foreach ($maximaDefaults as $key=>$def) {
foreach ($maximaDefaults as $key => $def) {
if (!defined($key)) {
define($key, $def);
}
......
......@@ -35,8 +35,9 @@ $userid = qa_get_logged_in_userid();
// Find the questions with this tag
if (!strlen($tag))
if (!strlen($tag)) {
qa_redirect('tags');
}
list($questions, $tagword) = qa_db_select_with_pending(
qa_db_tag_recent_qs_selectspec($userid, $tag, $start, false, qa_opt_if_loaded('page_size_tag_qs')),
......
......@@ -63,19 +63,21 @@ if (count($populartags)) {
'count' => qa_format_number($count, 0, true),
);
if ((++$output) >= $pagesize)
if ((++$output) >= $pagesize) {
break;
}
}
} else
} else {
$qa_content['title'] = qa_lang_html('main/no_tags_found');
}
$qa_content['canonical'] = qa_get_canonical();
$qa_content['page_links'] = qa_html_page_links(qa_request(), $start, $pagesize, $tagcount, qa_opt('pages_prev_next'));
if (empty($qa_content['page_links']))
if (empty($qa_content['page_links'])) {
$qa_content['suggest_next'] = qa_html_suggest_ask();
}
return $qa_content;
......@@ -31,8 +31,9 @@ require_once QA_INCLUDE_DIR . 'app/format.php';
// Check we're not using single-sign on integration
if (QA_FINAL_EXTERNAL_USERS)
if (QA_FINAL_EXTERNAL_USERS) {
qa_fatal_error('User accounts are handled by external code');
}
// Get list of blocked users
......
......@@ -30,8 +30,9 @@ require_once QA_INCLUDE_DIR . 'app/format.php';
// Check we're not using single-sign on integration
if (QA_FINAL_EXTERNAL_USERS)
if (QA_FINAL_EXTERNAL_USERS) {
qa_fatal_error('User accounts are handled by external code');
}
// Check we have permission to view this page (moderator or above)
......@@ -89,4 +90,5 @@ $qa_content['page_links'] = qa_html_page_links(qa_request(), $start, $pageSize,
$qa_content['navigation']['sub'] = qa_users_sub_navigation();
return $qa_content;
......@@ -31,8 +31,9 @@ require_once QA_INCLUDE_DIR . 'app/format.php';
// Check we're not using single-sign on integration
if (QA_FINAL_EXTERNAL_USERS)
if (QA_FINAL_EXTERNAL_USERS) {
qa_fatal_error('User accounts are handled by external code');
}
// Get list of special users
......@@ -77,4 +78,5 @@ foreach ($users as $user) {
$qa_content['navigation']['sub'] = qa_users_sub_navigation();
return $qa_content;
......@@ -253,7 +253,7 @@ function qa_initialize_constants_2()
'QA_DEBUG_PERFORMANCE' => false,
);
foreach ($defaults as $key=>$def) {
foreach ($defaults as $key => $def) {
if (!defined($key)) {
define($key, $def);
}
......
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