Advertisement
Guest User

Untitled

a guest
Aug 30th, 2016
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. public function batch_categories()
  2. {
  3. $cid = $this->app->input->get('cid', '', 'array');
  4. if ( $task == 'copy' )
  5. {
  6. $categories = $this->getCategories($cid);
  7.  
  8. foreach ($categories as $cat)
  9. {
  10. list($title, $alias) = $this->_generateNewTitle($cat->id, $cat->alias, $cat->name);
  11.  
  12. $_POST['name'] = $title;
  13. $_POST['alias'] = $alias;
  14. $_POST['parent_id'] = intval($cat_parent);
  15. $_POST['catid'] = 0;
  16. $this->_save();
  17. }
  18.  
  19. $this->app->enqueueMessage(JText::_('BATCH_COPY_SUCCESS'));
  20. }
  21. }
  22.  
  23. protected function _save()
  24. {
  25. $post = $this->app->input->getArray();
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement