Code Duplication    Length = 3-12 lines in 3 locations

main/inc/lib/document.lib.php 1 location

@@ 5810-5821 (lines=12) @@
5807
                    }
5808
5809
                    // Admin setting for Hide/Show Default folders to all users
5810
                    if (api_get_setting('show_default_folders') == 'false' &&
5811
                        (
5812
                            $folder == '/images' ||
5813
                            $folder == '/flash' ||
5814
                            $folder == '/audio' ||
5815
                            $folder == '/video' ||
5816
                            strstr($folder, '/images/gallery') ||
5817
                            $folder == '/video/flv'
5818
                        )
5819
                    ) {
5820
                        continue;
5821
                    }
5822
5823
                    // Admin setting for Hide/Show chat history folder
5824
                    if (api_get_setting('show_chat_folder') == 'false' &&

main/document/create_document.php 2 locations

@@ 340-342 (lines=3) @@
337
                continue;
338
            }
339
            // Admin setting for Hide/Show Default folders to all users
340
            if (api_get_setting('show_default_folders') == 'false' && ($val=='/images' || $val=='/flash' || $val=='/audio' || $val=='/video' || strstr($val, '/images/gallery') || $val=='/video/flv')){
341
                continue;
342
            }
343
            // Admin setting for Hide/Show chat history folder
344
            if (api_get_setting('show_chat_folder') == 'false' && $val=='/chat_files'){
345
                continue;
@@ 379-390 (lines=12) @@
376
					continue;
377
				}
378
				//Admin setting for Hide/Show Default folders to all users
379
				if (api_get_setting('show_default_folders') == 'false' &&
380
                    (
381
                        $folder == '/images' ||
382
                        $folder == '/flash' ||
383
                        $folder == '/audio' ||
384
                        $folder == '/video' ||
385
                        strstr($folder, '/images/gallery') ||
386
                        $folder == '/video/flv'
387
                    )
388
                ){
389
					continue;
390
				}
391
				//Admin setting for Hide/Show chat history folder
392
				if (api_get_setting('show_chat_folder') == 'false' &&
393
                    $folder=='/chat_files'