Index: branches/RC/core/units/general/helpers/themes_helper.php =================================================================== diff -u -r8929 -r11177 --- branches/RC/core/units/general/helpers/themes_helper.php (.../themes_helper.php) (revision 8929) +++ branches/RC/core/units/general/helpers/themes_helper.php (.../themes_helper.php) (revision 11177) @@ -170,7 +170,15 @@ $id_field = $this->Application->getUnitOption('theme', 'IDField'); $table_name = $this->Application->getUnitOption('theme', 'TableName'); - // if none themes found -> delete all from db OR delete all except of found themes + // 1. only one theme found -> enable it and make primary + /*if (count($themes_found) == 1) { + $sql = 'UPDATE ' . $table_name . ' + SET Enabled = 1, PrimaryTheme = 1 + WHERE ' . $id_field . ' = ' . current($themes_found); + $this->Conn->Query($sql); + }*/ + + // 2. if none themes found -> delete all from db OR delete all except of found themes $sql = 'SELECT '.$id_field.' FROM '.$table_name; if ($themes_found) {