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
78b7842a
Commit
78b7842a
authored
May 26, 2019
by
pupi1985
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix database overflow issue when trying to insert content words
parent
7ed3f6a0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletions
+6
-1
maxima.php
qa-include/db/maxima.php
+1
-0
post-create.php
qa-include/db/post-create.php
+5
-1
No files found.
qa-include/db/maxima.php
View file @
78b7842a
...
...
@@ -48,6 +48,7 @@ $maximaDefaults = array(
'QA_DB_MAX_BLOB_FILE_NAME_LENGTH'
=>
255
,
'QA_DB_MAX_META_TITLE_LENGTH'
=>
40
,
'QA_DB_MAX_META_CONTENT_LENGTH'
=>
8000
,
'QA_DB_MAX_WORD_COUNT'
=>
255
,
// The field is currently a TINYINT so it shouldn't exceed this value
// How many records to retrieve for different circumstances. In many cases we retrieve more records than we
// end up needing to display once we know the value of an option. Wasteful, but allows one query per page.
...
...
qa-include/db/post-create.php
View file @
78b7842a
...
...
@@ -166,8 +166,12 @@ function qa_db_contentwords_add_post_wordidcounts($postid, $type, $questionid, $
{
if
(
count
(
$wordidcounts
))
{
$rowstoadd
=
array
();
foreach
(
$wordidcounts
as
$wordid
=>
$count
)
foreach
(
$wordidcounts
as
$wordid
=>
$count
)
{
if
(
$count
>
QA_DB_MAX_WORD_COUNT
)
{
$count
=
QA_DB_MAX_WORD_COUNT
;
}
$rowstoadd
[]
=
array
(
$postid
,
$wordid
,
$count
,
$type
,
$questionid
);
}
qa_db_query_sub
(
'INSERT INTO ^contentwords (postid, wordid, count, type, questionid) VALUES #'
,
...
...
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