Commit c1fac456 authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review
Browse files

Merge "Restructure usr_custom_layout table to take groups into account "

parents 78695f4b 2214b02a
......@@ -1225,7 +1225,7 @@ class PluginImportLeap extends PluginImport {
AND (
vl.iscustom = 0
OR (
vl.iscustom = 1 AND ucl.usr = ?
vl.iscustom = 1 AND ucl.usr = ? AND ucl.group IS NULL
)
)
GROUP BY vlrc.viewlayout
......
......@@ -772,13 +772,15 @@
<TABLE NAME="usr_custom_layout">
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true" />
<FIELD NAME="usr" TYPE="int" LENGTH="10" NOTNULL="true"/>
<FIELD NAME="usr" TYPE="int" LENGTH="10" NOTNULL="false"/>
<FIELD NAME="group" TYPE="int" LENGTH="10" NOTNULL="false"/>
<FIELD NAME="layout" TYPE="int" LENGTH="10" NOTNULL="true"/>
</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" />
</KEYS>
</TABLE>
<TABLE NAME="view_rows_columns">
......
......@@ -1194,6 +1194,7 @@ function install_view_layout_defaults() {
'usr_custom_layout',
(object)array(
'usr' => 0,
'group' => null,
'layout' => $vlid,
)
);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment