Code Duplication    Length = 10-11 lines in 3 locations

Sources/MessageIndex.php 1 location

@@ 403-413 (lines=11) @@
400
					censorText($row['last_body']);
401
				}
402
			}
403
			else
404
			{
405
				$row['first_body'] = '';
406
				$row['last_body'] = '';
407
				censorText($row['first_subject']);
408
409
				if ($row['id_first_msg'] == $row['id_last_msg'])
410
					$row['last_subject'] = $row['first_subject'];
411
				else
412
					censorText($row['last_subject']);
413
			}
414
415
			// Decide how many pages the topic should have.
416
			if ($row['num_replies'] + 1 > $context['messages_per_page'])

Sources/Recent.php 2 locations

@@ 1218-1227 (lines=10) @@
1215
			censorText($row['first_body']);
1216
1217
			// Don't censor them twice!
1218
			if ($row['id_first_msg'] == $row['id_last_msg'])
1219
			{
1220
				$row['last_subject'] = $row['first_subject'];
1221
				$row['last_body'] = $row['first_body'];
1222
			}
1223
			else
1224
			{
1225
				censorText($row['last_subject']);
1226
				censorText($row['last_body']);
1227
			}
1228
		}
1229
		else
1230
		{
@@ 1229-1239 (lines=11) @@
1226
				censorText($row['last_body']);
1227
			}
1228
		}
1229
		else
1230
		{
1231
			$row['first_body'] = '';
1232
			$row['last_body'] = '';
1233
			censorText($row['first_subject']);
1234
1235
			if ($row['id_first_msg'] == $row['id_last_msg'])
1236
				$row['last_subject'] = $row['first_subject'];
1237
			else
1238
				censorText($row['last_subject']);
1239
		}
1240
1241
		// Decide how many pages the topic should have.
1242
		$topic_length = $row['num_replies'] + 1;