diff --git a/includes/omega_tools.admin.inc b/includes/omega_tools.admin.inc index 4b1f4d0..448dcce 100644 --- a/includes/omega_tools.admin.inc +++ b/includes/omega_tools.admin.inc @@ -218,6 +218,7 @@ function omega_tools_subtheme_validate_automation($element, $form_state) { */ function omega_tools_subtheme_add_submit($form, &$form_state) { $values = $form_state['values']; + $hash = substr(hash('sha256', microtime()), 0, 8); $subtheme = new stdClass; $subtheme->new = TRUE; @@ -229,8 +230,8 @@ function omega_tools_subtheme_add_submit($form, &$form_state) { $subtheme->default = FALSE; $subtheme->automated = $values['automated']; $subtheme->destination = $values['automated'] ? 'sites/' . $values['destination'] . '/themes/' . $subtheme->machine_name : NULL; - $subtheme->path = 'temporary://omega-tools/' . $subtheme->machine_name . '-' . substr(hash('sha256', serialize($subtheme) . microtime()), 0, 8); - + $subtheme->path = 'temporary://omega-' . $subtheme->machine_name . '-' . $hash; + if (omega_tools_subtheme_create($subtheme)) { omega_tools_cache_set($subtheme->machine_name, $subtheme);