Code Duplication    Length = 7-7 lines in 2 locations

Sources/Drafts.php 2 locations

@@ 147-153 (lines=7) @@
144
		);
145
146
		// everything go as expected?
147
		if (!empty($id_draft))
148
		{
149
			$context['draft_saved'] = true;
150
			$context['id_draft'] = $id_draft;
151
		}
152
		else
153
			$post_errors[] = 'draft_not_saved';
154
155
		// cleanup
156
		unset($_POST['save_draft']);
@@ 279-285 (lines=7) @@
276
		);
277
278
		// everything go as expected, if not toss back an error
279
		if (!empty($id_pm_draft))
280
		{
281
			$context['draft_saved'] = true;
282
			$context['id_pm_draft'] = $id_pm_draft;
283
		}
284
		else
285
			$post_errors[] = 'draft_not_saved';
286
	}
287
288
	// if we were called from the autosave function, send something back