mirror of
https://github.com/e107inc/e107.git
synced 2025-08-03 21:27:25 +02:00
Issue #2146 Partial compatibility fix. Testing required.
This commit is contained in:
@@ -5205,7 +5205,7 @@ class e_admin_ui extends e_admin_controller_ui
|
|||||||
*/
|
*/
|
||||||
protected function handleListBoolBatch($selected, $field, $value)
|
protected function handleListBoolBatch($selected, $field, $value)
|
||||||
{
|
{
|
||||||
$cnt = $this->getTreeModel()->update($field, $value, $selected, $value, false);
|
$cnt = $this->getTreeModel()->batchUpdate($field, $value, $selected, $value, false);
|
||||||
if($cnt)
|
if($cnt)
|
||||||
{
|
{
|
||||||
$caption = e107::getParser()->lanVars(LAN_UI_BATCH_BOOL_SUCCESS, $cnt, true);
|
$caption = e107::getParser()->lanVars(LAN_UI_BATCH_BOOL_SUCCESS, $cnt, true);
|
||||||
@@ -5222,7 +5222,7 @@ class e_admin_ui extends e_admin_controller_ui
|
|||||||
protected function handleListBoolreverseBatch($selected, $field, $value)
|
protected function handleListBoolreverseBatch($selected, $field, $value)
|
||||||
{
|
{
|
||||||
$tree = $this->getTreeModel();
|
$tree = $this->getTreeModel();
|
||||||
$cnt = $tree->update($field, "1-{$field}", $selected, null, false);
|
$cnt = $tree->batchUpdate($field, "1-{$field}", $selected, null, false);
|
||||||
if($cnt)
|
if($cnt)
|
||||||
{
|
{
|
||||||
$caption = e107::getParser()->lanVars(LAN_UI_BATCH_REVERSED_SUCCESS, $cnt, true);
|
$caption = e107::getParser()->lanVars(LAN_UI_BATCH_REVERSED_SUCCESS, $cnt, true);
|
||||||
@@ -5292,7 +5292,7 @@ class e_admin_ui extends e_admin_controller_ui
|
|||||||
$value = implode(',', array_map('trim', $value));
|
$value = implode(',', array_map('trim', $value));
|
||||||
}
|
}
|
||||||
|
|
||||||
$cnt = $this->getTreeModel()->update($field, $value, $selected, true, true);
|
$cnt = $this->getTreeModel()->batchUpdate($field, $value, $selected, true, true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -5305,7 +5305,7 @@ class e_admin_ui extends e_admin_controller_ui
|
|||||||
$allowed = !is_array($value) ? explode(',', $value) : $value;
|
$allowed = !is_array($value) ? explode(',', $value) : $value;
|
||||||
if(!$allowed)
|
if(!$allowed)
|
||||||
{
|
{
|
||||||
$rcnt = $this->getTreeModel()->update($field, '', $selected, '', true);
|
$rcnt = $this->getTreeModel()->batchUpdate($field, '', $selected, '', true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -5393,7 +5393,7 @@ class e_admin_ui extends e_admin_controller_ui
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
$cnt = $this->getTreeModel()->update($field, $val, $selected, true, false);
|
$cnt = $this->getTreeModel()->batchUpdate($field, $val, $selected, true, false);
|
||||||
if($cnt)
|
if($cnt)
|
||||||
{
|
{
|
||||||
$vttl = $this->getUI()->renderValue($field, $value, $this->getFieldAttr($field));
|
$vttl = $this->getUI()->renderValue($field, $value, $this->getFieldAttr($field));
|
||||||
|
@@ -2849,10 +2849,10 @@ class e_front_model extends e_model
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Update record
|
* Update record
|
||||||
*
|
* @see save()
|
||||||
* @param boolen $from_post
|
* @param boolen $from_post
|
||||||
* @return boolean|integer
|
* @return boolean|integer
|
||||||
*/
|
*//*
|
||||||
public function update($from_post = true, $force = false, $session_messages = false)
|
public function update($from_post = true, $force = false, $session_messages = false)
|
||||||
{
|
{
|
||||||
if(!$this->getFieldIdName())
|
if(!$this->getFieldIdName())
|
||||||
@@ -2867,7 +2867,7 @@ class e_front_model extends e_model
|
|||||||
}
|
}
|
||||||
|
|
||||||
return $this->dbUpdate($force, $session_messages);
|
return $this->dbUpdate($force, $session_messages);
|
||||||
}
|
}*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Exactly what it says - your debug helper
|
* Exactly what it says - your debug helper
|
||||||
@@ -3165,7 +3165,7 @@ class e_tree_model extends e_front_model
|
|||||||
/**
|
/**
|
||||||
* Set table name
|
* Set table name
|
||||||
* @param object $table
|
* @param object $table
|
||||||
* @return e_admin_tree_model
|
* @return e_tree_model
|
||||||
*/
|
*/
|
||||||
public function setModelTable($table)
|
public function setModelTable($table)
|
||||||
{
|
{
|
||||||
@@ -3840,7 +3840,7 @@ class e_front_tree_model extends e_tree_model
|
|||||||
* @param boolean $session_messages [optional] default false
|
* @param boolean $session_messages [optional] default false
|
||||||
* @return integer updated count or false on error
|
* @return integer updated count or false on error
|
||||||
*/
|
*/
|
||||||
public function update($field, $value, $ids, $syncvalue = null, $sanitize = true, $session_messages = false)
|
public function batchUpdate($field, $value, $ids, $syncvalue = null, $sanitize = true, $session_messages = false)
|
||||||
{
|
{
|
||||||
$tp = e107::getParser();
|
$tp = e107::getParser();
|
||||||
$sql = e107::getDb();
|
$sql = e107::getDb();
|
||||||
|
Reference in New Issue
Block a user