FileHelper::foldercheck($folderusersmodulestmptmpl); // Create files $modulelines = ModuleHelper::modulefile($varObject); $xmllines = ModuleHelper::modulexml($varObject); $helperlines = ModuleHelper::helperfile($varObject); $defaultlines = ModuleHelper::defaultfile($varObject); // Set filenames $indexfile = 'index.html'; $modulefile = $folderusersmodulestmp . 'mod_' . $varObject->filename . '.php'; $xmlfile = $folderusersmodulestmp . 'mod_' . $varObject->filename . '.xml'; $helperfile = $folderusersmodulestmp . 'helper.php'; $defaultfile = $folderusersmodulestmptmpl . 'default.php'; $totallinescreated[] = FileHelper::createFile($modulefile, $modulelines); $totallinescreated[] = FileHelper::createFile($xmlfile, $xmllines); $totallinescreated[] = FileHelper::createFile($helperfile, $helperlines); $totallinescreated[] = FileHelper::createFile($defaultfile, $defaultlines); // Zip Files $filestozip[] = $modulefile; $filestozip[] = $xmlfile; $filestozip[] = $helperfile; $filestozip[] = $defaultfile; $indexlines[] = Files::indexFile(); // Can't go into tmp directory! $totallinescreated[] = FileHelper::createfile($folderusersmodules . $indexfile, $indexlines); $indexpaths[] = $folderusersmodulestmp . $indexfile; $indexpaths[] = $folderusersmodulestmptmpl . $indexfile; // Create index files under all paths foreach ($indexpaths as $indexpath) { $totallinescreated[] = FileHelper::createfile($indexpath, $indexlines); $filestozip[] = $indexpath; }
$filestozip[] = $sqluninstallfile; $filestozip[] = $sqlupdatesmysqlfile; } // end - added v.0.6.0 $filestozip[] = $helperfile; $filestozip[] = $languagefile; $filestozip[] = $languagesysfile; $filestozip[] = $cssfile; $filestozip[] = $jsfile; // Site files $totallinescreated[] = FileHelper::createFile($sitecomponentfile, $sitecomponentlines); $totallinescreated[] = FileHelper::createFile($sitecontrollerfile, $sitecontrollerlines); $totallinescreated[] = FileHelper::createFile($siterouterfile, $siterouterlines); $totallinescreated[] = FileHelper::createFile($sitehelperfile, $sitehelperlines); $totallinescreated[] = FileHelper::createFile($sitecssfile, ""); $totallinescreated[] = FileHelper::createFile($sitejsfile, ""); $filestozip[] = $sitecomponentfile; $filestozip[] = $sitecontrollerfile; $filestozip[] = $siterouterfile; $filestozip[] = $sitehelperfile; $filestozip[] = $sitecssfile; $filestozip[] = $sitejsfile; /** * Lines created calculate */ $totallinescalculated = 0; foreach ($totallinescreated as $totallineseach) { $totallinescalculated = $totallinescalculated + $totallineseach; } // 15 seconds per line - round up or down.. $totaltimesaved = round($totallinescalculated / 4 / 60);