1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 20:58:30 +01:00

Admin routine copy callback

This commit is contained in:
SecretR 2014-02-26 16:56:17 +02:00
parent d7c2fb8275
commit 737fc995c0
2 changed files with 14 additions and 2 deletions

View File

@ -4054,7 +4054,9 @@ class e_admin_ui extends e_admin_controller_ui
protected function handleListCopyBatch($selected)
{
// Batch Copy
$this->getTreeModel()->copy($selected);
$res = $this->getTreeModel()->copy($selected);
// callback
$this->afterCopy($res, $selected);
// move messages to default stack
$this->getTreeModel()->setMessages();
// send messages to session
@ -4820,6 +4822,16 @@ class e_admin_ui extends e_admin_controller_ui
{
}
/**
* User defined after-update logic
* @param mixed $result
* @param array $selected
* @return void
*/
public function afterCopy($result, $selected)
{
}
/**
* Create - send JS to page Header
* @return none

View File

@ -3617,7 +3617,7 @@ class e_admin_tree_model extends e_front_tree_model
/**
* Batch Copy Table Rows.
*/
public function copy($ids)
public function copy($ids, $session_messages = false)
{
$tp = e107::getParser();
$ids = array_map(array($tp, 'toDB'), $ids);