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
cd542c7d
Commit
cd542c7d
authored
Feb 18, 2015
by
Scott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Database upgrade to fix missing smiley plugin
parent
3343735a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
2 deletions
+22
-2
install.php
qa-include/db/install.php
+22
-2
No files found.
qa-include/db/install.php
View file @
cd542c7d
...
...
@@ -25,7 +25,7 @@
exit
;
}
define
(
'QA_DB_VERSION_CURRENT'
,
5
8
);
define
(
'QA_DB_VERSION_CURRENT'
,
5
9
);
function
qa_db_user_column_type_verify
()
...
...
@@ -1428,7 +1428,27 @@
$keyrecalc
[
'dorecalcpoints'
]
=
true
;
break
;
// Up to here: Verison 1.7 beta
// Up to here: Verison 1.7
case
59
:
// Fix path to WYSIWYG editor smilies
require_once
QA_INCLUDE_DIR
.
'app/posts.php'
;
qa_db_upgrade_query
(
'UNLOCK TABLES'
);
$sql
=
'SELECT postid, title, content FROM ^posts WHERE content LIKE "%/wysiwyg-editor/plugins/smiley/images/%"'
;
$result
=
qa_db_query_sub
(
$sql
);
while
((
$post
=
qa_db_read_one_assoc
(
$result
,
true
))
!==
null
)
{
$search
=
'#<(img|a)([^>]+)(src|href)="([^"]+)/wysiwyg-editor/plugins/smiley/images/([^"]+)"#'
;
$replace
=
'<$1$2$3="$4/wysiwyg-editor/ckeditor/plugins/smiley/images/$5"'
;
$newcontent
=
preg_replace
(
$search
,
$replace
,
$post
[
'content'
]);
qa_post_set_content
(
$post
[
'postid'
],
$post
[
'title'
],
$newcontent
);
}
qa_db_upgrade_query
(
$locktablesquery
);
break
;
// Up to here: Verison 1.7.1
}
...
...
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