Code Duplication    Length = 10-10 lines in 2 locations

Sources/Drafts.php 2 locations

@@ 44-53 (lines=10) @@
41
	$draft_info = ReadDraft($id_draft);
42
43
	// A draft has been saved less than 5 seconds ago, let's not do the autosave again
44
	if (isset($_REQUEST['xml']) && !empty($draft_info['poster_time']) && time() < $draft_info['poster_time'] + 5)
45
	{
46
		$context['draft_saved_on'] = $draft_info['poster_time'];
47
48
		// since we were called from the autosave function, send something back
49
		if (!empty($id_draft))
50
			XmlDraft($id_draft);
51
52
		return true;
53
	}
54
55
	if (!isset($_POST['message']))
56
		$_POST['message'] = isset($_POST['quickReply']) ? $_POST['quickReply'] : '';
@@ 191-200 (lines=10) @@
188
	$draft_info = ReadDraft($id_pm_draft, 1);
189
190
	// 5 seconds is the same limit we have for posting
191
	if (isset($_REQUEST['xml']) && !empty($draft_info['poster_time']) && time() < $draft_info['poster_time'] + 5)
192
	{
193
		$context['draft_saved_on'] = $draft_info['poster_time'];
194
195
		// Send something back to the javascript caller
196
		if (!empty($id_draft))
197
			XmlDraft($id_draft);
198
199
		return true;
200
	}
201
202
	// determine who this is being sent to
203
	if (isset($_REQUEST['xml']))