|
@@ 152-155 (lines=4) @@
|
| 149 |
|
*/ |
| 150 |
|
public function action_delete() |
| 151 |
|
{ |
| 152 |
|
if (!$this->cat_id) |
| 153 |
|
{ |
| 154 |
|
trigger_error($this->language->lang('DIR_NO_CAT') . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING); |
| 155 |
|
} |
| 156 |
|
|
| 157 |
|
$this->cat_data = $this->_get_cat_info($this->cat_id); |
| 158 |
|
|
|
@@ 236-239 (lines=4) @@
|
| 233 |
|
*/ |
| 234 |
|
public function action_move() |
| 235 |
|
{ |
| 236 |
|
if (!$this->cat_id) |
| 237 |
|
{ |
| 238 |
|
trigger_error($this->language->lang('DIR_NO_CAT') . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING); |
| 239 |
|
} |
| 240 |
|
|
| 241 |
|
$sql = 'SELECT cat_id, cat_name, parent_id, left_id, right_id |
| 242 |
|
FROM ' . $this->categories_table . ' |
|
@@ 248-251 (lines=4) @@
|
| 245 |
|
$row = $this->db->sql_fetchrow($result); |
| 246 |
|
$this->db->sql_freeresult($result); |
| 247 |
|
|
| 248 |
|
if (!$row) |
| 249 |
|
{ |
| 250 |
|
trigger_error($this->language->lang('DIR_NO_CAT') . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING); |
| 251 |
|
} |
| 252 |
|
|
| 253 |
|
try |
| 254 |
|
{ |
|
@@ 306-309 (lines=4) @@
|
| 303 |
|
*/ |
| 304 |
|
public function action_sync() |
| 305 |
|
{ |
| 306 |
|
if (!$this->cat_id) |
| 307 |
|
{ |
| 308 |
|
trigger_error($this->language->lang('DIR_NO_CAT') . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING); |
| 309 |
|
} |
| 310 |
|
|
| 311 |
|
@set_time_limit(0); |
| 312 |
|
|
|
@@ 320-323 (lines=4) @@
|
| 317 |
|
$row = $this->db->sql_fetchrow($result); |
| 318 |
|
$this->db->sql_freeresult($result); |
| 319 |
|
|
| 320 |
|
if (!$row) |
| 321 |
|
{ |
| 322 |
|
trigger_error($this->language->lang('DIR_NO_CAT') . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING); |
| 323 |
|
} |
| 324 |
|
|
| 325 |
|
$sql = 'SELECT MIN(link_id) as min_link_id, MAX(link_id) as max_link_id |
| 326 |
|
FROM ' . $this->links_table . ' |
|
@@ 398-401 (lines=4) @@
|
| 395 |
|
$row = $this->db->sql_fetchrow($result); |
| 396 |
|
$this->db->sql_freeresult($result); |
| 397 |
|
|
| 398 |
|
if (!$row) |
| 399 |
|
{ |
| 400 |
|
trigger_error($this->language->lang('DIR_NO_CAT') . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING); |
| 401 |
|
} |
| 402 |
|
|
| 403 |
|
$this->_sync_dir_cat($this->cat_id); |
| 404 |
|
|