public function themeCopyAction() { try { $theme = new waTheme(waRequest::post('theme')); $duplicate = $theme->duplicate(); $this->logAction('theme_duplicate', $theme->id); $this->displayJson(array('redirect' => "{$this->design_url}theme={$duplicate->id}&action=theme")); } catch (Exception $e) { $this->displayJson(array(), $e->getMessage()); } }