Changeset 11713

Show
Ignore:
Timestamp:
08/25/07 09:03:55 (1 year ago)
Author:
solt
Message:

Fixed new style creation

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/midcom/midcom.admin.folder/handler/edit.php

    r11672 r11713  
    180180                if ($this->_handler_id === 'edit') 
    181181                { 
     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 
    182204                    $_MIDCOM->uimessages->add($this->_l10n->get('midcom.admin.folder'), $this->_l10n->get('folder saved')); 
    183205