Code Duplication    Length = 16-21 lines in 3 locations

web_interface/astpp/system/helpers/smiley_helper.php 1 location

@@ 228-248 (lines=21) @@
225
 * @access	private
226
 * @return	mixed
227
 */
228
if ( ! function_exists('_get_smiley_array'))
229
{
230
	function _get_smiley_array()
231
	{
232
		if (defined('ENVIRONMENT') AND file_exists(APPPATH.'config/'.ENVIRONMENT.'/smileys.php'))
233
		{
234
			include(APPPATH.'config/'.ENVIRONMENT.'/smileys.php');
235
		}
236
		elseif (file_exists(APPPATH.'config/smileys.php'))
237
		{
238
			include(APPPATH.'config/smileys.php');
239
		}
240
		
241
		if (isset($smileys) AND is_array($smileys))
242
		{
243
			return $smileys;
244
		}
245
246
		return FALSE;
247
	}
248
}
249
250
// ------------------------------------------------------------------------
251

web_interface/astpp/system/helpers/file_helper.php 1 location

@@ 360-375 (lines=16) @@
357
358
		global $mimes;
359
360
		if ( ! is_array($mimes))
361
		{
362
			if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/mimes.php'))
363
			{
364
				include(APPPATH.'config/'.ENVIRONMENT.'/mimes.php');
365
			} elseif (is_file(APPPATH.'config/mimes.php'))
366
			{
367
				include(APPPATH.'config/mimes.php');
368
			}
369
370
			if ( ! is_array($mimes))
371
			{
372
				return FALSE;
373
			}
374
		}
375
376
		if (array_key_exists($extension, $mimes))
377
		{
378
			if (is_array($mimes[$extension]))

web_interface/astpp/system/helpers/html_helper.php 1 location

@@ 262-277 (lines=16) @@
259
	{
260
		global $_doctypes;
261
262
		if ( ! is_array($_doctypes))
263
		{
264
			if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/doctypes.php'))
265
			{
266
				include(APPPATH.'config/'.ENVIRONMENT.'/doctypes.php');
267
			} elseif (is_file(APPPATH.'config/doctypes.php'))
268
			{
269
				include(APPPATH.'config/doctypes.php');
270
			}
271
272
			if ( ! is_array($_doctypes))
273
			{
274
				return FALSE;
275
			}
276
		}
277
278
		if (isset($_doctypes[$type]))
279
		{
280
			return $_doctypes[$type];