| | 182 | if ($_REQUEST['style'] === '__create') |
|---|
| | 183 | { |
|---|
| | 184 | $this->_topic->require_do('midcom.admin.folder:template_management'); |
|---|
| | 185 | |
|---|
| | 186 | $this->_topic->style = $this->_create_style($this->_topic->name); |
|---|
| | 187 | |
|---|
| | 188 | // Failed to create the new style template |
|---|
| | 189 | if ($this->_topic->style === '') |
|---|
| | 190 | { |
|---|
| | 191 | return false; |
|---|
| | 192 | } |
|---|
| | 193 | |
|---|
| | 194 | $_MIDCOM->uimessages->add($this->_l10n->get('midcom.admin.folder'), $this->_l10n->get('new style created')); |
|---|
| | 195 | |
|---|
| | 196 | if (! $this->_topic->update()) |
|---|
| | 197 | { |
|---|
| | 198 | $_MIDCOM->uimessages->add($this->_l10n->get('midcom.admin.folder'),'Could not save Folder: ' . mgd_errstr()); |
|---|
| | 199 | return false; |
|---|
| | 200 | } |
|---|
| | 201 | |
|---|
| | 202 | } |
|---|
| | 203 | |
|---|