@@ 310-331 (lines=22) @@ | ||
307 | * @param int $id ID of state to be deleted. |
|
308 | * @return int Always {@link NO_ERROR}. |
|
309 | */ |
|
310 | function state_delete ($id) |
|
311 | { |
|
312 | debug_write_log(DEBUG_TRACE, '[state_delete]'); |
|
313 | debug_write_log(DEBUG_DUMP, '[state_delete] $id = ' . $id); |
|
314 | ||
315 | dal_query('filters/fadelalls.sql', $id); |
|
316 | dal_query('filters/fdelalls.sql', $id); |
|
317 | ||
318 | dal_query('states/rdelall.sql', $id); |
|
319 | dal_query('states/ftdelall.sql', $id); |
|
320 | dal_query('states/fsdelall.sql', $id); |
|
321 | dal_query('states/lvdelall.sql', $id); |
|
322 | dal_query('states/fpdelall.sql', $id); |
|
323 | dal_query('states/fdelall.sql', $id); |
|
324 | dal_query('states/gtdelall.sql', $id); |
|
325 | dal_query('states/rtdelall.sql', $id); |
|
326 | dal_query('states/sadelall.sql', $id); |
|
327 | dal_query('states/clrdef.sql', $id); |
|
328 | dal_query('states/delete.sql', $id); |
|
329 | ||
330 | return NO_ERROR; |
|
331 | } |
|
332 | ||
333 | /** |
|
334 | * Marks specified state as initial in its dataflow. |
@@ 360-382 (lines=23) @@ | ||
357 | * @param int $id ID of template to be deleted. |
|
358 | * @return int Always {@link NO_ERROR}. |
|
359 | */ |
|
360 | function template_delete ($id) |
|
361 | { |
|
362 | debug_write_log(DEBUG_TRACE, '[template_delete]'); |
|
363 | debug_write_log(DEBUG_DUMP, '[template_delete] $id = ' . $id); |
|
364 | ||
365 | dal_query('subscriptions/sdelallt.sql', $id); |
|
366 | ||
367 | dal_query('filters/fadelallt.sql', $id); |
|
368 | dal_query('filters/fdelallt.sql', $id); |
|
369 | ||
370 | dal_query('templates/lvdelall.sql', $id); |
|
371 | dal_query('templates/fpdelall.sql', $id); |
|
372 | dal_query('templates/fsdelall.sql', $id); |
|
373 | dal_query('templates/fdelall.sql', $id); |
|
374 | dal_query('templates/gtdelall.sql', $id); |
|
375 | dal_query('templates/rtdelall.sql', $id); |
|
376 | dal_query('templates/sadelall.sql', $id); |
|
377 | dal_query('templates/sdelall.sql', $id); |
|
378 | dal_query('templates/gpdelall.sql', $id); |
|
379 | dal_query('templates/delete.sql', $id); |
|
380 | ||
381 | return NO_ERROR; |
|
382 | } |
|
383 | ||
384 | /** |
|
385 | * Locks specified template. |