| @@ 2744-2756 (lines=13) @@ | ||
| 2741 | } |
|
| 2742 | ||
| 2743 | // Add new ones |
|
| 2744 | if (!empty($labels_to_apply)) |
|
| 2745 | { |
|
| 2746 | $inserts = array(); |
|
| 2747 | foreach ($labels_to_apply as $label) |
|
| 2748 | $inserts[] = array($row['id_pm'], $label); |
|
| 2749 | ||
| 2750 | $smcFunc['db_insert']('', |
|
| 2751 | '{db_prefix}pm_labeled_messages', |
|
| 2752 | array('id_pm' => 'int', 'id_label' => 'int'), |
|
| 2753 | $inserts, |
|
| 2754 | array() |
|
| 2755 | ); |
|
| 2756 | } |
|
| 2757 | } |
|
| 2758 | $smcFunc['db_free_result']($request); |
|
| 2759 | } |
|
| @@ 3270-3277 (lines=8) @@ | ||
| 3267 | } |
|
| 3268 | ||
| 3269 | // Save any new labels |
|
| 3270 | if (!empty($labels_to_add)) |
|
| 3271 | { |
|
| 3272 | $inserts = array(); |
|
| 3273 | foreach ($labels_to_add AS $label) |
|
| 3274 | $inserts[] = array($user_info['id'], $label); |
|
| 3275 | ||
| 3276 | $smcFunc['db_insert']('', '{db_prefix}pm_labels', array('id_member' => 'int', 'name' => 'string-30'), $inserts, array()); |
|
| 3277 | } |
|
| 3278 | ||
| 3279 | // Update existing labels as needed |
|
| 3280 | if (!empty($label_upates)) |
|