mirror of
https://github.com/e107inc/e107.git
synced 2025-05-04 11:24:54 +02:00
Admin UI ajax sort supports no numerical primary IDs now
This commit is contained in:
parent
da62465879
commit
3b78d19acb
@ -4203,10 +4203,13 @@ class e_admin_ui extends e_admin_controller_ui
|
||||
{
|
||||
|
||||
list($tmp,$id) = explode("-", $row, 2);
|
||||
if($sql->db_Update($this->table, $this->sortField." = ".intval($c)." WHERE ".$this->pid." = ".intval($id)))
|
||||
$id = preg_replace('/[^\w\-]/', '', $id);
|
||||
if(!is_numeric($id)) $id = "'{$id}'";
|
||||
if($sql->db_Update($this->table, $this->sortField." = {$c} WHERE ".$this->pid." = ".$id))
|
||||
{
|
||||
$updated[] = $id;
|
||||
}
|
||||
echo($sql->getLastQuery()."\n");
|
||||
$c++;
|
||||
}
|
||||
//echo "Updated ".implode(",",$updated);
|
||||
|
Loading…
x
Reference in New Issue
Block a user