Commit ba885abc authored by Robert Lyon's avatar Robert Lyon
Browse files

Bug 1650954: View Constructor to ignore trying to make view_rows_columns



When it is set to be deleted straight away via parameter 'deleted' = true

behatnotneeded

Change-Id: I26204b8d358520c6acf3434531c06c4490152f47
Signed-off-by: default avatarRobert Lyon <robertl@catalyst.net.nz>
(cherry picked from commit 0e470890)
parent 747657e5
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -312,7 +312,8 @@ class View {
        $this->dirtycolumns = array();

        // set only for existing views - _create provides default value
        if (empty($this->columnsperrow)) {
        // Ignore if the constructor is called with deleted set to true
        if (empty($this->columnsperrow) && empty($this->deleted)) {
            $this->columnsperrow = get_records_assoc('view_rows_columns', 'view', $this->get('id'), 'row', 'row, columns');
            if (empty($this->columnsperrow)) {
                // if we are missing the info for some reason we will give the page it's layout back