Code Duplication    Length = 4-6 lines in 2 locations

main/inc/lib/phpdocx/lib/log4php/appenders/LoggerAppenderFile.php 1 location

@@ 70-75 (lines=6) @@
67
	public function activateOptions() {
68
		$fileName = $this->getFile();
69
70
		if(!is_file($fileName)) {
71
			$dir = dirname($fileName);
72
			if(!is_dir($dir)) {
73
				mkdir($dir, 0777, true);
74
			}
75
		}
76
77
		$this->fp = fopen($fileName, ($this->getAppend()? 'a':'w'));
78
		if($this->fp) {

main/admin/settings.lib.php 1 location

@@ 563-566 (lines=4) @@
560
                        $entry_without_first_dir = substr($entry, $pos_slash + 1);
561
                        // If there is still a slash, we need to make sure the directories are created.
562
                        if (strpos($entry_without_first_dir, '/') !== false) {
563
                            if (!is_dir($extraction_path.dirname($entry_without_first_dir))) {
564
                                // Create it.
565
                                @mkdir($extraction_path.dirname($entry_without_first_dir), $mode = 0777, true);
566
                            }
567
                        }
568
569
                        $fp = $zip->getStream($entry);