Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
osticket
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
docker
osticket
Commits
956b8c80
Commit
956b8c80
authored
11 years ago
by
Jared Hancock
Browse files
Options
Downloads
Patches
Plain Diff
Fix upgrade from 1.8 develop branch
parent
efe859a1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/upgrader/streams/core/d51f303a-ec19794f.patch.sql
+11
-0
11 additions, 0 deletions
include/upgrader/streams/core/d51f303a-ec19794f.patch.sql
include/upgrader/streams/core/d51f303a-ec19794f.task.php
+14
-1
14 additions, 1 deletion
include/upgrader/streams/core/d51f303a-ec19794f.task.php
with
25 additions
and
1 deletion
include/upgrader/streams/core/d51f303a-ec19794f.patch.sql
+
11
−
0
View file @
956b8c80
...
...
@@ -32,6 +32,17 @@ INSERT INTO `%TABLE_PREFIX%attachment`
DROP
TABLE
`%TABLE_PREFIX%faq_attachment`
;
DROP
TABLE
IF
EXISTS
`%TABLE_PREFIX%draft`
;
CREATE
TABLE
`%TABLE_PREFIX%draft`
(
`id`
int
(
11
)
unsigned
NOT
NULL
AUTO_INCREMENT
,
`staff_id`
int
(
11
)
unsigned
NOT
NULL
,
`namespace`
varchar
(
32
)
NOT
NULL
DEFAULT
''
,
`body`
text
NOT
NULL
,
`created`
timestamp
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
,
`updated`
timestamp
NULL
DEFAULT
NULL
,
PRIMARY
KEY
(
`id`
)
)
DEFAULT
CHARSET
=
utf8
;
-- Migrate email templates to HTML
UPDATE
`%TABLE_PREFIX%email_template`
SET
`body`
=
REPLACE
(
'
\n
'
,
'<br/>'
,
...
...
This diff is collapsed.
Click to expand it.
include/upgrader/streams/core/d51f303a-ec19794f.task.php
+
14
−
1
View file @
956b8c80
...
...
@@ -4,10 +4,23 @@ class NewHtmlTemplate extends MigrationTask {
var
$description
=
"Adding new super-awesome HTML templates"
;
function
run
(
$runtime
)
{
$errors
=
array
();
$i18n
=
new
Internationalization
(
'en_US'
);
$tpls
=
$i18n
->
getTemplate
(
'email_template_group.yaml'
)
->
getData
();
foreach
(
$tpls
as
$t
)
EmailTemplateGroup
::
create
(
$t
);
EmailTemplateGroup
::
create
(
$t
,
$errors
);
$files
=
$i18n
->
getTemplate
(
'file.yaml'
)
->
getData
();
foreach
(
$files
as
$f
)
{
$id
=
AttachmentFile
::
create
(
$f
,
$errors
);
// Ensure the new files are never deleted (attached to Disk)
$sql
=
'INSERT INTO '
.
ATTACHMENT_TABLE
.
' SET object_id=0, `type`=\'D\', inline=1'
.
', file_id='
.
db_input
(
$id
);
db_query
(
$sql
);
}
}
}
return
'NewHtmlTemplate'
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment