|
@@ 514-517 (lines=4) @@
|
| 511 |
|
|
| 512 |
|
case 'sync': |
| 513 |
|
|
| 514 |
|
if (!$cat_id) |
| 515 |
|
{ |
| 516 |
|
trigger_error($user->lang['DIR_NO_CAT'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING); |
| 517 |
|
} |
| 518 |
|
|
| 519 |
|
@set_time_limit(0); |
| 520 |
|
|
|
@@ 528-531 (lines=4) @@
|
| 525 |
|
$row = $db->sql_fetchrow($result); |
| 526 |
|
$db->sql_freeresult($result); |
| 527 |
|
|
| 528 |
|
if (!$row) |
| 529 |
|
{ |
| 530 |
|
trigger_error($user->lang['DIR_NO_CAT'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING); |
| 531 |
|
} |
| 532 |
|
|
| 533 |
|
if ($row['cat_links']) |
| 534 |
|
{ |
|
@@ 606-609 (lines=4) @@
|
| 603 |
|
$row = $db->sql_fetchrow($result); |
| 604 |
|
$db->sql_freeresult($result); |
| 605 |
|
|
| 606 |
|
if (!$row) |
| 607 |
|
{ |
| 608 |
|
trigger_error($user->lang['DIR_NO_CAT'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING); |
| 609 |
|
} |
| 610 |
|
|
| 611 |
|
sync_dir_cat($cat_id); |
| 612 |
|
|
|
@@ 623-626 (lines=4) @@
|
| 620 |
|
case 'move_up': |
| 621 |
|
case 'move_down': |
| 622 |
|
|
| 623 |
|
if (!$cat_id) |
| 624 |
|
{ |
| 625 |
|
trigger_error($user->lang['DIR_NO_CAT'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING); |
| 626 |
|
} |
| 627 |
|
|
| 628 |
|
$sql = 'SELECT cat_id, cat_name, parent_id, left_id, right_id |
| 629 |
|
FROM ' . DIR_CAT_TABLE . ' |
|
@@ 635-638 (lines=4) @@
|
| 632 |
|
$row = $db->sql_fetchrow($result); |
| 633 |
|
$db->sql_freeresult($result); |
| 634 |
|
|
| 635 |
|
if (!$row) |
| 636 |
|
{ |
| 637 |
|
trigger_error($user->lang['DIR_NO_CAT'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING); |
| 638 |
|
} |
| 639 |
|
|
| 640 |
|
$move_cat_name = $this->move_cat_by($row, $action, 1); |
| 641 |
|
|
|
@@ 790-793 (lines=4) @@
|
| 787 |
|
|
| 788 |
|
case 'delete': |
| 789 |
|
|
| 790 |
|
if (!$cat_id) |
| 791 |
|
{ |
| 792 |
|
trigger_error($user->lang['DIR_NO_CAT'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING); |
| 793 |
|
} |
| 794 |
|
|
| 795 |
|
$cat_data = $this->get_cat_info($cat_id); |
| 796 |
|
|
|
@@ 1335-1338 (lines=4) @@
|
| 1332 |
|
$row = $db->sql_fetchrow($result); |
| 1333 |
|
$db->sql_freeresult($result); |
| 1334 |
|
|
| 1335 |
|
if (!$row) |
| 1336 |
|
{ |
| 1337 |
|
trigger_error($user->lang['PARENT_NOT_EXIST'] . adm_back_link($this->u_action . '&' . $this->parent_id), E_USER_WARNING); |
| 1338 |
|
} |
| 1339 |
|
|
| 1340 |
|
$sql = 'UPDATE ' . DIR_CAT_TABLE . ' |
| 1341 |
|
SET left_id = left_id + 2, right_id = right_id + 2 |