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
ff73e09e
Commit
ff73e09e
authored
9 years ago
by
Scott
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #319 from amiyasahu/patch-1.8-4
Break out of loop once the duplicate content found
parents
412caea3
4ca23251
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
question-submit.php
qa-include/pages/question-submit.php
+6
-2
No files found.
qa-include/pages/question-submit.php
View file @
ff73e09e
...
...
@@ -351,8 +351,10 @@
foreach
(
$answers
as
$answer
)
if
(
!
$answer
[
'hidden'
])
if
(
implode
(
' '
,
qa_string_to_words
(
$answer
[
'content'
]))
==
$testwords
)
if
(
implode
(
' '
,
qa_string_to_words
(
$answer
[
'content'
]))
==
$testwords
)
{
$errors
[
'content'
]
=
qa_lang_html
(
'question/duplicate_content'
);
break
;
}
}
$userid
=
qa_get_logged_in_userid
();
...
...
@@ -425,8 +427,10 @@
foreach
(
$commentsfollows
as
$comment
)
if
((
$comment
[
'basetype'
]
==
'C'
)
&&
(
$comment
[
'parentid'
]
==
$parentid
)
&&
!
$comment
[
'hidden'
])
if
(
implode
(
' '
,
qa_string_to_words
(
$comment
[
'content'
]))
==
$testwords
)
if
(
implode
(
' '
,
qa_string_to_words
(
$comment
[
'content'
]))
==
$testwords
)
{
$errors
[
'content'
]
=
qa_lang_html
(
'question/duplicate_content'
);
break
;
}
}
if
(
empty
(
$errors
))
{
...
...
This diff is collapsed.
Click to expand it.
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