Code Duplication    Length = 3-12 lines in 3 locations

main/document/create_document.php 2 locations

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

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

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