Code Duplication    Length = 13-13 lines in 2 locations

acp/main_module.php 1 location

@@ 244-256 (lines=13) @@
241
		{
242
			return;
243
		}
244
		foreach ($iterator as $fileInfo)
245
		{
246
			if ($fileInfo->isDot() || $fileInfo->isDir())
247
			{
248
				continue;
249
			}
250
251
			$filename = $fileInfo->getFilename();
252
			if (strpos($filename, 'http.') === 0)
253
			{
254
				$this->cache->remove_file($fileInfo->getPathname());
255
			}
256
		}
257
258
		$this->log->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_PHPBB_MEDIA_EMBED_CACHE_PURGED');
259

cron/mediaembed.php 1 location

@@ 82-94 (lines=13) @@
79
			return;
80
		}
81
82
		foreach ($iterator as $fileInfo)
83
		{
84
			if ($fileInfo->isDot() || $fileInfo->isDir())
85
			{
86
				continue;
87
			}
88
89
			$filename = $fileInfo->getFilename();
90
			if (strpos($filename, 'http.') === 0)
91
			{
92
				$this->cache->remove_file($fileInfo->getPathname());
93
			}
94
		}
95
96
		$this->config->set('mediaembed_last_gc', time(), false);
97
	}