Code Duplication    Length = 3-12 lines in 3 locations

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'

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

@@ 5819-5830 (lines=12) @@
5816
                    }
5817
5818
                    // Admin setting for Hide/Show Default folders to all users
5819
                    if (api_get_setting('show_default_folders') == 'false' &&
5820
                        (
5821
                            $folder == '/images' ||
5822
                            $folder == '/flash' ||
5823
                            $folder == '/audio' ||
5824
                            $folder == '/video' ||
5825
                            strstr($folder, '/images/gallery') ||
5826
                            $folder == '/video/flv'
5827
                        )
5828
                    ) {
5829
                        continue;
5830
                    }
5831
5832
                    // Admin setting for Hide/Show chat history folder
5833
                    if (api_get_setting('show_chat_folder') == 'false' &&