1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-17 03:54:09 +02:00

Batch-Copy added to admin-ui. Adding missing core shortcodes. Media-Category NewsThumbs added (legacy support)

This commit is contained in:
CaMer0n
2011-07-25 02:41:49 +00:00
parent a6613cb515
commit 7a9ae43aad
8 changed files with 102 additions and 6 deletions

View File

@@ -3314,4 +3314,32 @@ class e_admin_tree_model extends e_front_tree_model
return $res;
}
/**
* Batch Copy Table Rows.
*/
public function copy($ids)
{
$ids = array_map('intval', $ids);
$idstr = implode(', ', $ids);
$sql = e107::getDb();
if($res = $sql->db_CopyRow($this->getModelTable(), "*", $this->getFieldIdName().' IN ('.$idstr.')'))
{
$this->addMessageSuccess('Copied #'.$idstr);
}
else
{
if($sql->getLastErrorNumber())
{
$this->addMessageError('SQL Delete Error', $session_messages); //TODO - Lan
$this->addMessageDebug('SQL Error #'.$sql->getLastErrorNumber().': '.$sql->getLastErrorText());
}
}
$this->_db_errno = $sql->getLastErrorNumber();
$this->_db_errmsg = $sql->getLastErrorText();
return $res;
}
}