mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 12:48:26 +02:00
Admin routine copy callback
This commit is contained in:
@@ -4054,7 +4054,9 @@ class e_admin_ui extends e_admin_controller_ui
|
|||||||
protected function handleListCopyBatch($selected)
|
protected function handleListCopyBatch($selected)
|
||||||
{
|
{
|
||||||
// Batch Copy
|
// Batch Copy
|
||||||
$this->getTreeModel()->copy($selected);
|
$res = $this->getTreeModel()->copy($selected);
|
||||||
|
// callback
|
||||||
|
$this->afterCopy($res, $selected);
|
||||||
// move messages to default stack
|
// move messages to default stack
|
||||||
$this->getTreeModel()->setMessages();
|
$this->getTreeModel()->setMessages();
|
||||||
// send messages to session
|
// 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
|
* Create - send JS to page Header
|
||||||
* @return none
|
* @return none
|
||||||
|
@@ -3617,7 +3617,7 @@ class e_admin_tree_model extends e_front_tree_model
|
|||||||
/**
|
/**
|
||||||
* Batch Copy Table Rows.
|
* Batch Copy Table Rows.
|
||||||
*/
|
*/
|
||||||
public function copy($ids)
|
public function copy($ids, $session_messages = false)
|
||||||
{
|
{
|
||||||
$tp = e107::getParser();
|
$tp = e107::getParser();
|
||||||
$ids = array_map(array($tp, 'toDB'), $ids);
|
$ids = array_map(array($tp, 'toDB'), $ids);
|
||||||
|
Reference in New Issue
Block a user