Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
57035b28
Commit
57035b28
authored
Mar 10, 2015
by
Aaron Wells
Committed by
Gerrit Code Review
Mar 10, 2015
Browse files
Merge "Upgrade the blocktype.text after adding 'shortcut' category (Bug #1401708)"
parents
4cbd5bb0
f247b267
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/lib/db/upgrade.php
View file @
57035b28
...
...
@@ -3548,12 +3548,6 @@ function xmldb_core_upgrade($oldversion=0) {
AND NOT EXISTS (SELECT 1 FROM {institution} i WHERE i.name = {usr_registration}.institution)'
);
}
if
(
$oldversion
<
2014081900
)
{
if
(
$data
=
check_upgrades
(
'blocktype.text'
))
{
upgrade_plugin
(
$data
);
}
}
if
(
$oldversion
<
2014091600
)
{
$table
=
new
XMLDBTable
(
'view'
);
$field
=
new
XMLDBField
(
'anonymise'
);
...
...
@@ -3854,6 +3848,10 @@ function xmldb_core_upgrade($oldversion=0) {
$todb
->
name
=
'shortcut'
;
$todb
->
sort
=
'0'
;
insert_record
(
'blocktype_category'
,
$todb
);
if
(
$data
=
check_upgrades
(
'blocktype.text'
))
{
upgrade_plugin
(
$data
);
}
}
if
(
$oldversion
<
2014112700
)
{
...
...
@@ -3934,6 +3932,9 @@ function xmldb_core_upgrade($oldversion=0) {
$field
=
new
XMLDBField
(
'sortorder'
);
$field
->
setAttributes
(
XMLDB_TYPE_INTEGER
,
10
,
null
,
XMLDB_NOTNULL
,
null
,
null
,
null
,
100000
,
'category'
);
add_field
(
$table
,
$field
);
// make sure the text blocktype has correct sortorder
execute_sql
(
"UPDATE
{
blocktype_installed_category
}
SET sortorder = ? WHERE blocktype = ? AND category = ?"
,
array
(
1000
,
'text'
,
'shortcut'
));
}
if
(
$oldversion
<
2015021000
)
{
...
...
Write
Preview
Supports
Markdown
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