Code Duplication    Length = 17-17 lines in 2 locations

install/cli-install.php 1 location

@@ 576-592 (lines=17) @@
573
    $rs = mysqli_query($conn,
574
        "SELECT properties, disabled FROM $dbase.`" . $table_prefix . "site_plugins` WHERE name='Inherit Parent Template'");
575
    $row = mysqli_fetch_row($rs);
576
    if (!$row) {
577
        // not installed
578
        $auto_template_logic = 'system';
579
    } else {
580
        if ($row[1] == 1) {
581
            // installed but disabled
582
            $auto_template_logic = 'system';
583
        } else {
584
            // installed, enabled .. see how it's configured
585
            $properties = parseProperties($row[0]);
586
            if (isset($properties['inheritTemplate'])) {
587
                if ($properties['inheritTemplate'] == 'From First Sibling') {
588
                    $auto_template_logic = 'sibling';
589
                }
590
            }
591
        }
592
    }
593
}
594
595

install/src/controllers/install.php 1 location

@@ 113-129 (lines=17) @@
110
            $query = "SELECT properties, disabled FROM " . $dbase . ".`" . $table_prefix . "site_plugins` WHERE name='Inherit Parent Template'";
111
            $rs = mysqli_query($conn, $query);
112
            $row = mysqli_fetch_row($rs);
113
            if (!$row) {
114
                // not installed
115
                $auto_template_logic = 'system';
116
            } else {
117
                if ($row[1] == 1) {
118
                    // installed but disabled
119
                    $auto_template_logic = 'system';
120
                } else {
121
                    // installed, enabled .. see how it's configured
122
                    $properties = parseProperties($row[0]);
123
                    if (isset($properties['inheritTemplate'])) {
124
                        if ($properties['inheritTemplate'] === 'From First Sibling') {
125
                            $auto_template_logic = 'sibling';
126
                        }
127
                    }
128
                }
129
            }
130
        }
131
132
        // open db connection