Commit 279c2d49 authored by Cecilia Vela Gurovic's avatar Cecilia Vela Gurovic Committed by Robert Lyon

Bug 1813987: checking old layout tables exists before using them

- when deleting an institution
- added a function to simulate the content of
view_layout_column table that was deleted.
This is needed when importing a portfolio with
old layout
- removed function addcustomlayout and some
other code not used anymore
- removed function get_layoutrows that was used
when editing old layouts


Change-Id: Ibebf50103bf1811894e75a21a668c4700283e703
parent fb37ef6e
......@@ -180,7 +180,9 @@ if ($institution || $add) {
delete_records('institution_registration', 'institution', $values['i']);
delete_records('site_content', 'institution', $values['i']);
delete_records('institution_config', 'institution', $values['i']);
delete_records('usr_custom_layout', 'institution', $values['i']);
if (db_table_exists('usr_custom_layout')) {
delete_records('usr_custom_layout', 'institution', $values['i']);
delete_records('usr_registration', 'institution', $values['i']);
if ($versions = get_records_assoc('site_content_version', 'institution', $values['i'])) {
foreach($versions as $version) {
......@@ -1195,7 +1195,8 @@ class PluginImportLeap extends PluginImport {
if (!$gridlayout && is_null($columnlayouts)) {
$columnlayouts = get_records_assoc('view_layout_columns');
$columnlayouts = View::get_old_view_layout_columns();
if (is_null($viewtypes)) {
This diff is collapsed.
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