$files){ foreach($files as $file){ //skip this one, since it's deleted after the update if ($file == 'cron/modules/com_vtiger_workflow/com_vtiger_workflow.service.php') { continue; } $fileData = file_exists($file) ? file_get_contents($file) : false; if($fileData){ foreach($words as $word){ if(strpos($fileData, $word) !== false){ Update::warn('We found some incompatibilities in custom files due to the use of some old functions: ' . $word . ' in file: ' . $file); } } } } } foreach($customizations as $customization){ $fileData = file_exists($customization) ? file_get_contents($customization) : false; if($fileData){ foreach($words as $word){ if(strpos($fileData, $word) !== false){ Update::warn('We found some incompatibilities in custom files due to the use of some old functions: ' . $word . ' in file: ' . $customization); } } } } function getDirContents($path) { $rii = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path)); $files = array(); foreach ($rii as $file){ $filename = $file->getPathname(); if (!$file->isDir() && isAllowedFile($filename)) $files[] = $filename; } return $files; } function isAllowedFile($file){ if((strpos($file, ".php") !== false || strpos($file, ".js") !== false || strpos($file, ".tpl") !== false || strpos($file, ".inc") !== false) && (strpos($file, "modules/Update") === false)){ return true; } return false; }