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
b8afbd15
Commit
b8afbd15
authored
May 07, 2019
by
Cecilia Vela Gurovic
Committed by
Robert Lyon
Oct 04, 2019
Browse files
Bug 1813987: removing old layout from mahara install
behatnotneeded Change-Id: If0e93ba7d1ff49fac57fc3d910c4586c9c23d877
parent
a5fd2d09
Changes
4
Hide whitespace changes
Inline
Side-by-side
htdocs/blocktype/lib.php
View file @
b8afbd15
...
...
@@ -1647,6 +1647,10 @@ class BlockInstance {
$this
->
rebuild_artefact_list
();
// check the table exists in case we need to update a block in the upgrade before the creation of the table
if
(
db_table_exists
(
'block_instance_dimension'
))
{
$this
->
set_block_dimensions
(
$this
->
positionx
,
$this
->
positiony
,
$this
->
width
,
$this
->
height
);
}
// Tell stuff about this
handle_event
(
'blockinstancecommit'
,
$this
);
...
...
@@ -1942,6 +1946,10 @@ class BlockInstance {
'row'
=>
$this
->
get
(
'row'
),
'column'
=>
$this
->
get
(
'column'
),
'order'
=>
$this
->
get
(
'order'
),
'positionx'
=>
$this
->
get
(
'positionx'
),
'positiony'
=>
$this
->
get
(
'positiony'
),
'width'
=>
$this
->
get
(
'width'
),
'height'
=>
$this
->
get
(
'height'
),
));
if
((
$sameowner
&&
$copytype
!=
'fullinclself'
)
||
$copytype
==
'reference'
)
{
...
...
htdocs/lib/db/install.xml
View file @
b8afbd15
...
...
@@ -796,7 +796,6 @@
<KEY
NAME=
"ownerfk"
TYPE=
"foreign"
FIELDS=
"owner"
REFTABLE=
"usr"
REFFIELDS=
"id"
/>
<KEY
NAME=
"submittedgroupfk"
TYPE=
"foreign"
FIELDS=
"submittedgroup"
REFTABLE=
"group"
REFFIELDS=
"id"
/>
<KEY
NAME=
"submittedhostfk"
TYPE=
"foreign"
FIELDS=
"submittedhost"
REFTABLE=
"host"
REFFIELDS=
"wwwroot"
/>
<KEY
NAME=
"layoutfk"
TYPE=
"foreign"
FIELDS=
"layout"
REFTABLE=
"view_layout"
REFFIELDS=
"id"
/>
<KEY
NAME=
"groupfk"
TYPE=
"foreign"
FIELDS=
"group"
REFTABLE=
"group"
REFFIELDS=
"id"
/>
<KEY
NAME=
"institutionfk"
TYPE=
"foreign"
FIELDS=
"institution"
REFTABLE=
"institution"
REFFIELDS=
"name"
/>
<KEY
NAME=
"typefk"
TYPE=
"foreign"
FIELDS=
"type"
REFTABLE=
"view_type"
REFFIELDS=
"type"
/>
...
...
@@ -815,7 +814,6 @@
</FIELDS>
<KEYS>
<KEY
NAME=
"primary"
TYPE=
"primary"
FIELDS=
"id"
/>
<KEY
NAME=
"layoutfk"
TYPE=
"foreign"
FIELDS=
"layout"
REFTABLE=
"view_layout"
REFFIELDS=
"id"
/>
<KEY
NAME=
"usrfk"
TYPE=
"foreign"
FIELDS=
"usr"
REFTABLE=
"usr"
REFFIELDS=
"id"
/>
<KEY
NAME=
"groupfk"
TYPE=
"foreign"
FIELDS=
"group"
REFTABLE=
"group"
REFFIELDS=
"id"
/>
<KEY
NAME=
"institutionfk"
TYPE=
"foreign"
FIELDS=
"institution"
REFTABLE=
"institution"
REFFIELDS=
"name"
/>
...
...
@@ -851,9 +849,9 @@
<FIELD
NAME=
"title"
TYPE=
"char"
LENGTH=
"255"
NOTNULL=
"true"
/>
<FIELD
NAME=
"configdata"
TYPE=
"text"
LENGTH=
"big"
NOTNULL=
"false"
/>
<FIELD
NAME=
"view"
TYPE=
"int"
LENGTH=
"10"
NOTNULL=
"true"
/>
<FIELD
NAME=
"row"
TYPE=
"int"
LENGTH=
"2"
NOTNULL=
"true"
DEFAULT=
"1
"
/>
<FIELD
NAME=
"column"
TYPE=
"int"
LENGTH=
"2"
NOTNULL=
"
tru
e"
/>
<FIELD
NAME=
"order"
TYPE=
"int"
LENGTH=
"2"
NOTNULL=
"
tru
e"
/>
<FIELD
NAME=
"row"
TYPE=
"int"
LENGTH=
"2"
DEFAULT=
"1"
NOTNULL=
"false
"
/>
<FIELD
NAME=
"column"
TYPE=
"int"
LENGTH=
"2"
NOTNULL=
"
fals
e"
/>
<FIELD
NAME=
"order"
TYPE=
"int"
LENGTH=
"2"
NOTNULL=
"
fals
e"
/>
</FIELDS>
<KEYS>
<KEY
NAME=
"primary"
TYPE=
"primary"
FIELDS=
"id"
/>
...
...
htdocs/lib/group.php
View file @
b8afbd15
...
...
@@ -2631,22 +2631,19 @@ function install_system_grouphomepage_view() {
array
(
'blocktype'
=>
'groupinfo'
,
'title'
=>
''
,
'row'
=>
1
,
'column'
=>
1
,
'positiony'
=>
0
,
'config'
=>
null
,
),
array
(
'blocktype'
=>
'recentforumposts'
,
'title'
=>
''
,
'row'
=>
1
,
'column'
=>
1
,
'positiony'
=>
3
,
'config'
=>
null
,
),
array
(
'blocktype'
=>
'groupviews'
,
'title'
=>
''
,
'row'
=>
1
,
'column'
=>
1
,
'positiony'
=>
6
,
'config'
=>
array
(
'showgroupviews'
=>
1
,
'showsharedviews'
=>
1
,
...
...
@@ -2656,23 +2653,21 @@ function install_system_grouphomepage_view() {
array
(
'blocktype'
=>
'groupmembers'
,
'title'
=>
''
,
'row'
=>
1
,
'column'
=>
1
,
'positiony'
=>
9
,
'config'
=>
null
,
),
);
$installed
=
get_column_sql
(
'SELECT name FROM {blocktype_installed}'
);
$weights
=
array
(
1
=>
0
);
foreach
(
$blocktypes
as
$blocktype
)
{
if
(
in_array
(
$blocktype
[
'blocktype'
],
$installed
))
{
$weights
[
$blocktype
[
'column'
]]
++
;
$newblock
=
new
BlockInstance
(
0
,
array
(
'blocktype'
=>
$blocktype
[
'blocktype'
],
'title'
=>
$blocktype
[
'title'
],
'view'
=>
$view
->
get
(
'id'
),
'row'
=>
$blocktype
[
'row'
],
'column'
=>
$blocktype
[
'column'
],
'order'
=>
$weights
[
$blocktype
[
'column'
]],
'positionx'
=>
0
,
'positiony'
=>
$blocktype
[
'positiony'
],
'width'
=>
12
,
'height'
=>
3
,
'configdata'
=>
$blocktype
[
'config'
],
));
$newblock
->
commit
();
...
...
htdocs/lib/user.php
View file @
b8afbd15
...
...
@@ -2813,20 +2813,25 @@ function install_system_profile_view() {
$view
->
set_access
(
array
(
array
(
'type'
=>
'loggedin'
)));
$blocktypes
=
array
(
'profileinfo'
=>
1
,
'myviews'
=>
1
,
'mygroups'
=>
1
,
'myfriends'
=>
2
,
'wall'
=>
2
);
// column ids
$blocktypes
=
array
(
'profileinfo'
=>
array
(
0
,
0
),
'myviews'
=>
array
(
0
,
1
),
'mygroups'
=>
array
(
0
,
2
),
'myfriends'
=>
array
(
1
,
0
),
'wall'
=>
array
(
1
,
1
)
);
// block coordinates (x,y) in grid
$installed
=
get_column_sql
(
'SELECT name FROM {blocktype_installed} WHERE name IN ('
.
join
(
','
,
array_map
(
'db_quote'
,
array_keys
(
$blocktypes
)))
.
')'
);
$weights
=
array
(
1
=>
0
,
2
=>
0
);
foreach
(
array_keys
(
$blocktypes
)
as
$blocktype
)
{
if
(
in_array
(
$blocktype
,
$installed
))
{
$weights
[
$blocktypes
[
$blocktype
]]
++
;
$title
=
(
$blocktype
==
'profileinfo'
)
?
get_string
(
'aboutme'
,
'blocktype.internal/profileinfo'
)
:
''
;
$newblock
=
new
BlockInstance
(
0
,
array
(
'blocktype'
=>
$blocktype
,
'title'
=>
$title
,
'view'
=>
$view
->
get
(
'id'
),
'row'
=>
1
,
'column'
=>
$blocktypes
[
$blocktype
],
'order'
=>
$weights
[
$blocktypes
[
$blocktype
]],
'positionx'
=>
$blocktypes
[
$blocktype
][
0
]
*
6
,
'positiony'
=>
$blocktypes
[
$blocktype
][
1
]
*
3
,
'height'
=>
3
,
'width'
=>
6
,
));
$newblock
->
commit
();
}
...
...
@@ -2862,8 +2867,8 @@ function install_system_dashboard_view() {
array
(
'blocktype'
=>
'newviews'
,
'title'
=>
''
,
'
row'
=>
1
,
'
column
'
=>
1
,
'
positionx'
=>
0
,
'
positiony
'
=>
0
,
'config'
=>
array
(
'limit'
=>
5
,
),
...
...
@@ -2871,15 +2876,15 @@ function install_system_dashboard_view() {
array
(
'blocktype'
=>
'myviews'
,
'title'
=>
''
,
'
row'
=>
1
,
'
column
'
=>
1
,
'
positionx'
=>
0
,
'
positiony
'
=>
3
,
'config'
=>
null
,
),
array
(
'blocktype'
=>
'inbox'
,
'title'
=>
''
,
'
row'
=>
1
,
'
column
'
=>
2
,
'
positionx'
=>
6
,
'
positiony
'
=>
0
,
'config'
=>
array
(
'feedback'
=>
true
,
'groupmessage'
=>
true
,
...
...
@@ -2895,8 +2900,8 @@ function install_system_dashboard_view() {
array
(
'blocktype'
=>
'inbox'
,
'title'
=>
''
,
'
row'
=>
1
,
'
column
'
=>
2
,
'
positionx'
=>
6
,
'
positiony
'
=>
3
,
'config'
=>
array
(
'newpost'
=>
true
,
'maxitems'
=>
'5'
,
...
...
@@ -2905,25 +2910,24 @@ function install_system_dashboard_view() {
array
(
'blocktype'
=>
'watchlist'
,
'title'
=>
''
,
'
row'
=>
1
,
'
column
'
=>
2
,
'
positionx'
=>
6
,
'
positiony
'
=>
6
,
'config'
=>
array
(
'count'
=>
'10'
,
),
),
);
$installed
=
get_column_sql
(
'SELECT name FROM {blocktype_installed}'
);
$weights
=
array
(
1
=>
0
,
2
=>
0
);
foreach
(
$blocktypes
as
$blocktype
)
{
if
(
in_array
(
$blocktype
[
'blocktype'
],
$installed
))
{
$weights
[
$blocktype
[
'column'
]]
++
;
$newblock
=
new
BlockInstance
(
0
,
array
(
'blocktype'
=>
$blocktype
[
'blocktype'
],
'title'
=>
$blocktype
[
'title'
],
'view'
=>
$view
->
get
(
'id'
),
'row'
=>
$blocktype
[
'row'
],
'column'
=>
$blocktype
[
'column'
],
'order'
=>
$weights
[
$blocktype
[
'column'
]],
'positionx'
=>
$blocktype
[
'positionx'
],
'positiony'
=>
$blocktype
[
'positiony'
],
'width'
=>
6
,
'height'
=>
3
,
'configdata'
=>
$blocktype
[
'config'
],
));
$newblock
->
commit
();
...
...
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