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

@@ 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' &&