Code Duplication    Length = 21-22 lines in 2 locations

Themes/default/PersonalMessage.template.php 1 location

@@ 1114-1135 (lines=22) @@
1111
	</form>';
1112
1113
	// If the admin enabled the pm drafts feature, show a draft selection box
1114
	if (!empty($context['drafts_pm_save']) && !empty($context['drafts']) && !empty($options['drafts_show_saved_enabled']))
1115
	{
1116
		echo '
1117
			<br>
1118
			<div id="postDraftOptionsHeader" class="cat_bar">
1119
				<h3 class="catbg">
1120
					<span id="postDraftExpand" class="toggle_up floatright" style="display: none;"></span> <strong><a href="#" id="postDraftExpandLink">', $txt['draft_load'], '</a></strong>
1121
				</h3>
1122
			</div>
1123
			<div id="postDraftOptions" class="load_drafts padding">
1124
				<dl class="settings">
1125
					<dt><strong>', $txt['subject'], '</strong></dt>
1126
					<dd><strong>', $txt['draft_saved_on'], '</strong></dd>';
1127
1128
		foreach ($context['drafts'] as $draft)
1129
			echo '
1130
					<dt>', $draft['link'], '</dt>
1131
					<dd>', $draft['poster_time'], '</dd>';
1132
		echo '
1133
				</dl>
1134
			</div>';
1135
	}
1136
1137
	echo '
1138
		<script>';

Themes/default/Post.template.php 1 location

@@ 533-553 (lines=21) @@
530
		echo '
531
					</div>';
532
	// If the admin enabled the drafts feature, show a draft selection box
533
	if (!empty($modSettings['drafts_post_enabled']) && !empty($context['drafts']) && !empty($options['drafts_show_saved_enabled']))
534
	{
535
		echo '
536
					<div id="postDraftOptionsHeader" class="title_bar title_top">
537
						<h4 class="titlebg">
538
							<span id="postDraftExpand" class="toggle_up floatright" style="display: none;"></span> <strong><a href="#" id="postDraftExpandLink">', $txt['draft_load'], '</a></strong>
539
						</h4>
540
					</div>
541
					<div id="postDraftOptions">
542
						<dl class="settings">
543
							<dt><strong>', $txt['subject'], '</strong></dt>
544
							<dd><strong>', $txt['draft_saved_on'], '</strong></dd>';
545
546
		foreach ($context['drafts'] as $draft)
547
			echo '
548
							<dt>', $draft['link'], '</dt>
549
							<dd>', $draft['poster_time'], '</dd>';
550
		echo '
551
						</dl>
552
					</div>';
553
	}
554
555
	// Is visual verification enabled?
556
	if ($context['require_verification'])