@@ 714-729 (lines=16) @@ | ||
711 | /** |
|
712 | * @ignore List items related UI must be remastered via jQueryUI. |
|
713 | */ |
|
714 | function field_pickup_list_items ($field_id) |
|
715 | { |
|
716 | debug_write_log(DEBUG_TRACE, '[field_pickup_list_items]'); |
|
717 | debug_write_log(DEBUG_DUMP, '[field_pickup_list_items] $field_id = ' . $field_id); |
|
718 | ||
719 | $list_items = NULL; |
|
720 | ||
721 | $rs = dal_query('values/lvlist.sql', $field_id); |
|
722 | ||
723 | while (($row = $rs->fetch())) |
|
724 | { |
|
725 | $list_items .= sprintf("%u %s\n", $row['int_value'], $row['str_value']); |
|
726 | } |
|
727 | ||
728 | return $list_items; |
|
729 | } |
|
730 | ||
731 | /** |
|
732 | * Creates new field. |
@@ 339-355 (lines=17) @@ | ||
336 | /** |
|
337 | * @ignore |
|
338 | */ |
|
339 | function filter_states_get ($filter_id, $template_id) |
|
340 | { |
|
341 | debug_write_log(DEBUG_TRACE, '[filter_states_set]'); |
|
342 | debug_write_log(DEBUG_DUMP, '[filter_states_set] $filter_id = ' . $filter_id); |
|
343 | debug_write_log(DEBUG_DUMP, '[filter_states_set] $template_id = ' . $template_id); |
|
344 | ||
345 | $states = array(); |
|
346 | ||
347 | $rs = dal_query('filters/fslist.sql', $filter_id, $template_id); |
|
348 | ||
349 | while (($row = $rs->fetch())) |
|
350 | { |
|
351 | array_push($states, $row['state_id']); |
|
352 | } |
|
353 | ||
354 | return $states; |
|
355 | } |
|
356 | ||
357 | /** |
|
358 | * @ignore |
@@ 61-77 (lines=17) @@ | ||
58 | * @param int $id Group ID. |
|
59 | * @return array Array with data if group is found in database, FALSE otherwise. |
|
60 | */ |
|
61 | function group_find ($id) |
|
62 | { |
|
63 | debug_write_log(DEBUG_TRACE, '[group_find]'); |
|
64 | debug_write_log(DEBUG_DUMP, '[group_find] $id = ' . $id); |
|
65 | ||
66 | $rs = dal_query('groups/fndid.sql', $id); |
|
67 | ||
68 | if ($rs->rows == 0) |
|
69 | { |
|
70 | return FALSE; |
|
71 | } |
|
72 | ||
73 | $row = $rs->fetch(); |
|
74 | $row['is_global'] = is_null($row['project_id']); |
|
75 | ||
76 | return $row; |
|
77 | } |
|
78 | ||
79 | /** |
|
80 | * Returns {@link CRecordset DAL recordset} which contains all existing global groups and all the local |