Code Duplication    Length = 3-12 lines in 3 locations

main/document/create_document.php 2 locations

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

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

@@ 5918-5929 (lines=12) @@
5915
                    }
5916
5917
                    // Admin setting for Hide/Show Default folders to all users
5918
                    if (api_get_setting('show_default_folders') == 'false' &&
5919
                        (
5920
                            $folder == '/images' ||
5921
                            $folder == '/flash' ||
5922
                            $folder == '/audio' ||
5923
                            $folder == '/video' ||
5924
                            strstr($folder, '/images/gallery') ||
5925
                            $folder == '/video/flv'
5926
                        )
5927
                    ) {
5928
                        continue;
5929
                    }
5930
5931
                    // Admin setting for Hide/Show chat history folder
5932
                    if (api_get_setting('show_chat_folder') == 'false' &&