| @@ 158-178 (lines=21) @@ | ||
| 155 | ||
| 156 | // check status of Inherit Parent Template plugin |
|
| 157 | $auto_template_logic = 'parent'; |
|
| 158 | if ($installMode != 0) { |
|
| 159 | $rs = mysqli_query($conn, "SELECT properties, disabled FROM $dbase.`" . $table_prefix . "site_plugins` WHERE name='Inherit Parent Template'"); |
|
| 160 | $row = mysqli_fetch_row($rs); |
|
| 161 | if(!$row) { |
|
| 162 | // not installed |
|
| 163 | $auto_template_logic = 'system'; |
|
| 164 | } else { |
|
| 165 | if($row[1] == 1) { |
|
| 166 | // installed but disabled |
|
| 167 | $auto_template_logic = 'system'; |
|
| 168 | } else { |
|
| 169 | // installed, enabled .. see how it's configured |
|
| 170 | $properties = parseProperties($row[0]); |
|
| 171 | if(isset($properties['inheritTemplate'])) { |
|
| 172 | if($properties['inheritTemplate'] == 'From First Sibling') { |
|
| 173 | $auto_template_logic = 'sibling'; |
|
| 174 | } |
|
| 175 | } |
|
| 176 | } |
|
| 177 | } |
|
| 178 | } |
|
| 179 | ||
| 180 | // open db connection |
|
| 181 | $setupPath = realpath(dirname(__FILE__)); |
|
| @@ 537-557 (lines=21) @@ | ||
| 534 | ||
| 535 | // check status of Inherit Parent Template plugin |
|
| 536 | $auto_template_logic = 'parent'; |
|
| 537 | if ($installMode != 0) { |
|
| 538 | $rs = mysqli_query($conn, "SELECT properties, disabled FROM $dbase.`" . $table_prefix . "site_plugins` WHERE name='Inherit Parent Template'"); |
|
| 539 | $row = mysqli_fetch_row($rs); |
|
| 540 | if(!$row) { |
|
| 541 | // not installed |
|
| 542 | $auto_template_logic = 'system'; |
|
| 543 | } else { |
|
| 544 | if($row[1] == 1) { |
|
| 545 | // installed but disabled |
|
| 546 | $auto_template_logic = 'system'; |
|
| 547 | } else { |
|
| 548 | // installed, enabled .. see how it's configured |
|
| 549 | $properties = parseProperties($row[0]); |
|
| 550 | if(isset($properties['inheritTemplate'])) { |
|
| 551 | if($properties['inheritTemplate'] == 'From First Sibling') { |
|
| 552 | $auto_template_logic = 'sibling'; |
|
| 553 | } |
|
| 554 | } |
|
| 555 | } |
|
| 556 | } |
|
| 557 | } |
|
| 558 | ||
| 559 | ||
| 560 | ||