<?php
    function downloads($dirName = "") {
        $realDirName = ($dirName === "")?$_SERVER["DOCUMENT_ROOT"]."/downloads":$dirName;

        foreach (array_diff(scandir($realDirName), array(".", "..")) as $fileName) {
            if (is_dir($realDirName."/".$fileName))
                downloads($realDirName."/".$fileName);
            else if (strpos($fileName, "OpenCOR") !== false)
                echo str_replace($_SERVER["DOCUMENT_ROOT"]."/downloads/", "", $realDirName."/".$fileName).",".filesize($realDirName."/".$fileName)."\n";
        }
    }

    downloads();
?>

Revert "Some minor cleaning up ."
Revert "Some minor cleaning up [ci skip]."

This reverts commit 5c22c16917e7b9d7c6885ccba09c6443043d2c1f.
