Code Duplication    Length = 18-22 lines in 3 locations

Themes/default/ManageMaintenance.template.php 1 location

@@ 416-437 (lines=22) @@
413
	$middle = ceil(count($context['categories']) / 2);
414
415
	$i = 0;
416
	foreach ($context['categories'] as $category)
417
	{
418
		echo '
419
							<fieldset>
420
								<legend>', $category['name'], '</legend>
421
								<ul>';
422
423
		// Display a checkbox with every board.
424
		foreach ($category['boards'] as $board)
425
			echo '
426
									<li style="margin-', $context['right_to_left'] ? 'right' : 'left', ': ', $board['child_level'] * 1.5, 'em;">
427
										<label for="boards_', $board['id'], '"><input type="checkbox" name="boards[', $board['id'], ']" id="boards_', $board['id'], '" checked>', $board['name'], '</label>
428
									</li>';
429
430
		echo '
431
								</ul>
432
							</fieldset>';
433
434
		// Increase $i, and check if we're at the middle yet.
435
		if (++$i == $middle)
436
			echo '
437
						</div><!-- .floatleft -->
438
						<div class="floatright" style="width: 49%;">';
439
	}
440

Themes/default/Search.template.php 1 location

@@ 155-174 (lines=20) @@
152
							<a href="javascript:void(0);" onclick="selectBoards([', implode(', ', $category['child_ids']), '], \'searchform\'); return false;">', $category['name'], '</a>
153
							<ul>';
154
155
			foreach ($category['boards'] as $board)
156
			{
157
				if ($i == $limit)
158
					echo '
159
							</ul>
160
						</li>
161
					</ul>
162
					<ul class="ignoreboards floatright">
163
						<li class="category">
164
							<ul>';
165
166
				echo '
167
								<li class="board">
168
									<label for="brd', $board['id'], '" style="margin-', $context['right_to_left'] ? 'right' : 'left', ': ', $board['child_level'], 'em;">
169
										<input type="checkbox" id="brd', $board['id'], '" name="brd[', $board['id'], ']" value="', $board['id'], '"', $board['selected'] ? ' checked' : '', '> ', $board['name'], '
170
									</label>
171
								</li>';
172
173
				$i++;
174
			}
175
176
			echo '
177
							</ul>

Themes/default/Profile.template.php 1 location

@@ 2217-2234 (lines=18) @@
2214
						<a href="javascript:void(0);" onclick="selectBoards([', implode(', ', $category['child_ids']), '], \'creator\'); return false;">', $category['name'], '</a>
2215
						<ul>';
2216
2217
		foreach ($category['boards'] as $board)
2218
		{
2219
			if ($i == $limit)
2220
				echo '
2221
						</ul>
2222
					</li>
2223
				</ul>
2224
				<ul class="ignoreboards floatright">
2225
					<li class="category">
2226
						<ul>';
2227
2228
			echo '
2229
							<li class="board" style="margin-', $context['right_to_left'] ? 'right' : 'left', ': ', $board['child_level'], 'em;">
2230
								<label for="ignore_brd', $board['id'], '"><input type="checkbox" id="brd', $board['id'], '" name="ignore_brd[', $board['id'], ']" value="', $board['id'], '"', $board['selected'] ? ' checked' : '', '> ', $board['name'], '</label>
2231
							</li>';
2232
2233
			$i++;
2234
		}
2235
2236
		echo '
2237
						</ul>