Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Q
question2answer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
outils
question2answer
Commits
ceada519
Commit
ceada519
authored
Jul 23, 2020
by
Scott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hide RSS feeds if empty
parent
fb64ec5a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
2 deletions
+7
-2
search.php
qa-include/pages/search.php
+1
-1
tag.php
qa-include/pages/tag.php
+1
-1
qa-feed.php
qa-include/qa-feed.php
+5
-0
No files found.
qa-include/pages/search.php
View file @
ceada519
...
@@ -129,7 +129,7 @@ if (strlen(qa_get('q'))) {
...
@@ -129,7 +129,7 @@ if (strlen(qa_get('q'))) {
$qa_content
[
'page_links'
]
=
qa_html_page_links
(
qa_request
(),
$start
,
$pagesize
,
$start
+
$gotcount
,
$qa_content
[
'page_links'
]
=
qa_html_page_links
(
qa_request
(),
$start
,
$pagesize
,
$start
+
$gotcount
,
qa_opt
(
'pages_prev_next'
),
array
(
'q'
=>
$inquery
),
$gotcount
>=
$count
);
qa_opt
(
'pages_prev_next'
),
array
(
'q'
=>
$inquery
),
$gotcount
>=
$count
);
if
(
qa_opt
(
'feed_for_search'
))
{
if
(
qa_opt
(
'feed_for_search'
)
&&
count
(
$results
)
>
0
)
{
$qa_content
[
'feed'
]
=
array
(
$qa_content
[
'feed'
]
=
array
(
'url'
=>
qa_path_html
(
qa_feed_request
(
'search/'
.
$inquery
)),
'url'
=>
qa_path_html
(
qa_feed_request
(
'search/'
.
$inquery
)),
'label'
=>
qa_lang_html_sub
(
'main/results_for_x'
,
qa_html
(
$inquery
)),
'label'
=>
qa_lang_html_sub
(
'main/results_for_x'
,
qa_html
(
$inquery
)),
...
...
qa-include/pages/tag.php
View file @
ceada519
...
@@ -89,7 +89,7 @@ $qa_content['page_links'] = qa_html_page_links(qa_request(), $start, $pagesize,
...
@@ -89,7 +89,7 @@ $qa_content['page_links'] = qa_html_page_links(qa_request(), $start, $pagesize,
if
(
empty
(
$qa_content
[
'page_links'
]))
if
(
empty
(
$qa_content
[
'page_links'
]))
$qa_content
[
'suggest_next'
]
=
qa_html_suggest_qs_tags
(
true
);
$qa_content
[
'suggest_next'
]
=
qa_html_suggest_qs_tags
(
true
);
if
(
qa_opt
(
'feed_for_tag_qs'
))
{
if
(
qa_opt
(
'feed_for_tag_qs'
)
&&
count
(
$questions
)
>
0
)
{
$qa_content
[
'feed'
]
=
array
(
$qa_content
[
'feed'
]
=
array
(
'url'
=>
qa_path_html
(
qa_feed_request
(
'tag/'
.
$tag
)),
'url'
=>
qa_path_html
(
qa_feed_request
(
'tag/'
.
$tag
)),
'label'
=>
qa_lang_html_sub
(
'main/questions_tagged_x'
,
qa_html
(
$tag
)),
'label'
=>
qa_lang_html_sub
(
'main/questions_tagged_x'
,
qa_html
(
$tag
)),
...
...
qa-include/qa-feed.php
View file @
ceada519
...
@@ -286,6 +286,11 @@ require_once QA_INCLUDE_DIR . 'util/string.php';
...
@@ -286,6 +286,11 @@ require_once QA_INCLUDE_DIR . 'util/string.php';
if
(
$feedtype
!=
'search'
&&
$feedtype
!=
'hot'
)
// leave search results and hot questions sorted by relevance
if
(
$feedtype
!=
'search'
&&
$feedtype
!=
'hot'
)
// leave search results and hot questions sorted by relevance
$questions
=
qa_any_sort_and_dedupe
(
$questions
);
$questions
=
qa_any_sort_and_dedupe
(
$questions
);
// If there are no questions, raise a 404 error but show the feed so users can still subscribe if wanted
if
(
count
(
$questions
)
===
0
)
{
qa_404
();
}
$questions
=
array_slice
(
$questions
,
0
,
$count
);
$questions
=
array_slice
(
$questions
,
0
,
$count
);
$blockwordspreg
=
qa_get_block_words_preg
();
$blockwordspreg
=
qa_get_block_words_preg
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment