Code Duplication    Length = 12-12 lines in 2 locations

modules/recent.php 2 locations

@@ 141-152 (lines=12) @@
138
			ORDER BY topic_time DESC';
139
		$result = $this->db->sql_query_limit($sql, $this->config['board3_max_topics_' . $module_id], 0 , 30);
140
141
		while (($row = $this->db->sql_fetchrow($result)) && ($row['topic_title']))
142
		{
143
			// auto auth
144
			if (($this->auth->acl_get('f_read', $row['forum_id'])) || ($row['forum_id'] == '0'))
145
			{
146
				$this->template->assign_block_vars('latest_announcements', array(
147
					'TITLE'			=> character_limit($row['topic_title'], $this->config['board3_recent_title_limit_' . $module_id]),
148
					'FULL_TITLE'	=> censor_text($row['topic_title']),
149
					'U_VIEW_TOPIC'	=> append_sid("{$this->phpbb_root_path}viewtopic.{$this->php_ext}", 'f=' . (($row['forum_id'] == 0) ? $g_forum_id : $row['forum_id']) . '&t=' . $row['topic_id'])
150
				));
151
			}
152
		}
153
		$this->db->sql_freeresult($result);
154
155
		//
@@ 167-178 (lines=12) @@
164
			ORDER BY topic_time DESC';
165
		$result = $this->db->sql_query_limit($sql, $this->config['board3_max_topics_' . $module_id], 0, 30);
166
167
		while (($row = $this->db->sql_fetchrow($result)) && ($row['topic_title']))
168
		{
169
			// auto auth
170
			if (($this->auth->acl_get('f_read', $row['forum_id'])) || ($row['forum_id'] == '0'))
171
			{
172
				$this->template->assign_block_vars('latest_hot_topics', array(
173
					'TITLE'			=> character_limit($row['topic_title'], $this->config['board3_recent_title_limit_' . $module_id]),
174
					'FULL_TITLE'	=> censor_text($row['topic_title']),
175
					'U_VIEW_TOPIC'	=> append_sid("{$this->phpbb_root_path}viewtopic.{$this->php_ext}", 'f=' . (($row['forum_id'] == 0) ? $g_forum_id : $row['forum_id']) . '&t=' . $row['topic_id'])
176
				));
177
			}
178
		}
179
		$this->db->sql_freeresult($result);
180
181
		//