| @@ 577-590 (lines=14) @@ | ||
| 574 | if (!$row) { |
|
| 575 | // not installed |
|
| 576 | $auto_template_logic = 'system'; |
|
| 577 | } else { |
|
| 578 | if ($row[1] == 1) { |
|
| 579 | // installed but disabled |
|
| 580 | $auto_template_logic = 'system'; |
|
| 581 | } else { |
|
| 582 | // installed, enabled .. see how it's configured |
|
| 583 | $properties = parseProperties($row[0]); |
|
| 584 | if (isset($properties['inheritTemplate'])) { |
|
| 585 | if ($properties['inheritTemplate'] == 'From First Sibling') { |
|
| 586 | $auto_template_logic = 'sibling'; |
|
| 587 | } |
|
| 588 | } |
|
| 589 | } |
|
| 590 | } |
|
| 591 | } |
|
| 592 | ||
| 593 | ||
| @@ 115-131 (lines=17) @@ | ||
| 112 | $query = "SELECT properties, disabled FROM " . $dbase . ".`" . $table_prefix . "site_plugins` WHERE name='Inherit Parent Template'"; |
|
| 113 | $rs = mysqli_query($conn, $query); |
|
| 114 | $row = mysqli_fetch_row($rs); |
|
| 115 | if (!$row) { |
|
| 116 | // not installed |
|
| 117 | $auto_template_logic = 'system'; |
|
| 118 | } else { |
|
| 119 | if ($row[1] == 1) { |
|
| 120 | // installed but disabled |
|
| 121 | $auto_template_logic = 'system'; |
|
| 122 | } else { |
|
| 123 | // installed, enabled .. see how it's configured |
|
| 124 | $properties = parseProperties($row[0]); |
|
| 125 | if (isset($properties['inheritTemplate'])) { |
|
| 126 | if ($properties['inheritTemplate'] === 'From First Sibling') { |
|
| 127 | $auto_template_logic = 'sibling'; |
|
| 128 | } |
|
| 129 | } |
|
| 130 | } |
|
| 131 | } |
|
| 132 | } |
|
| 133 | ||
| 134 | // open db connection |
|