Esempio n. 1
0
             $action = 'list';
         }
     }
     break;
 case 'make_posts':
     // TODO: We don't need the Filelist, move UP!
     // Make posts with selected images:
     if (!$selected_Filelist->count()) {
         $Messages->add(T_('Nothing selected.'), 'error');
         $action = 'list';
         break;
     }
     // fp> TODO: this block should move to a general level
     // Try to go to the right blog:
     if ($fm_Filelist->get_root_type() == 'collection') {
         set_working_blog($fm_Filelist->get_root_ID());
         // Load the blog we're in:
         $Blog =& $BlogCache->get_by_ID($blog);
     }
     // ---
     if (empty($Blog)) {
         $Messages->add(T_('No destination blog is selected.'), 'error');
         break;
     }
     //$Blog->disp('name');
     // Get default status (includes PERM CHECK):
     $item_status = $Blog->get_allowed_item_status();
     if (empty($item_status)) {
         $Messages->add(T_('Sorry, you have no permission to post into this blog.'), 'error');
         break;
     }