Skip to content

Commit

Permalink
Coding style (misc)
Browse files Browse the repository at this point in the history
  • Loading branch information
svivian committed Sep 7, 2017
1 parent 4078a0a commit fa84118
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 10 deletions.
2 changes: 2 additions & 0 deletions qa-include/app/page.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand All @@ -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()
{
Expand Down
2 changes: 1 addition & 1 deletion qa-include/db/maxima.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
'QA_DB_MAX_EVENTS_PER_Q' => 5,
);

foreach ($maximaDefaults as $key=>$def) {
foreach ($maximaDefaults as $key => $def) {
if (!defined($key)) {
define($key, $def);
}
Expand Down
3 changes: 2 additions & 1 deletion qa-include/pages/tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@

// 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')),
Expand Down
10 changes: 6 additions & 4 deletions qa-include/pages/tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,19 +63,21 @@
'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;
3 changes: 2 additions & 1 deletion qa-include/pages/users-blocked.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@

// 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
Expand Down
4 changes: 3 additions & 1 deletion qa-include/pages/users-newest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@

// 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)
Expand Down Expand Up @@ -89,4 +90,5 @@

$qa_content['navigation']['sub'] = qa_users_sub_navigation();


return $qa_content;
4 changes: 3 additions & 1 deletion qa-include/pages/users-special.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@

// 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
Expand Down Expand Up @@ -77,4 +78,5 @@

$qa_content['navigation']['sub'] = qa_users_sub_navigation();


return $qa_content;
2 changes: 1 addition & 1 deletion qa-include/qa-base.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit fa84118

Please sign in to comment.