Dotclear

Changeset 1538:b956d78197c5 for admin


Ignore:
Timestamp:
08/23/13 15:33:51 (11 years ago)
Author:
Franck Paul <carnet.franck.paul@…>
Branch:
2.5
Parents:
1515:03b3235091cf (diff), 1537:a3ac778e9132 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merged in lipki/dotclear/ticket #1406-2 (pull request #59) - fixes #1406

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • admin/services.php

    r1500 r1538  
    238238          } 
    239239           
    240           $core->media = new dcMedia($core); 
    241           $file = $core->media->getFile($id); 
     240          try { 
     241               $core->media = new dcMedia($core); 
     242               $file = $core->media->getFile($id); 
     243          } catch (Exception $e) {} 
    242244           
    243245          if ($file === null || $file->type != 'application/zip' || !$file->editable) { 
  • admin/services.php

    r1537 r1538  
    141141     public static function quickPost($core,$get,$post) 
    142142     { 
     143          # Create category 
     144          if (!empty($post['new_cat_title']) && $core->auth->check('categories', $core->blog->id)) { 
     145           
     146               $cur_cat = $core->con->openCursor($core->prefix.'category'); 
     147               $cur_cat->cat_title = $post['new_cat_title']; 
     148               $cur_cat->cat_url = ''; 
     149                
     150               $parent_cat = !empty($post['new_cat_parent']) ? $post['new_cat_parent'] : ''; 
     151                
     152               # --BEHAVIOR-- adminBeforeCategoryCreate 
     153               $core->callBehavior('adminBeforeCategoryCreate', $cur_cat); 
     154                
     155               $post['cat_id'] = $core->blog->addCategory($cur_cat, (integer) $parent_cat); 
     156                
     157               # --BEHAVIOR-- adminAfterCategoryCreate 
     158               $core->callBehavior('adminAfterCategoryCreate', $cur_cat, $post['cat_id']); 
     159          } 
     160           
    143161          $cur = $core->con->openCursor($core->prefix.'post'); 
    144162           
Note: See TracChangeset for help on using the changeset viewer.

Sites map