Ejemplo n.º 1
0
<?php

require_once dirname(__FILE__) . "/common.php";
$content = str_replace("SET_ATHENS_ENCRYPTION_PASSWORD", "'" . makeEncryptionPassword() . "'", getFileTemplate("local-settings.php"));
$file = fopen(getBaseDirectory() . "/local-settings.php", "w");
fwrite($file, $content);
fclose($file);
Ejemplo n.º 2
0
$filesContent["project-assets/.htaccess"] = "Allow from all";
$filesContent["project-assets/notice.php"] = pageDocBlock("Any .css files placed into the project-assets/css directory, or .js files placed into the project-assets/js directory, will be automatically loaded into the <head> of any non-AJAX template provided by Framework.");
$filesContent["project-assets/css/project.css"] = cssCommentBlock("Any .css files placed into the project-assets/css directory, including this .css file, will be automatically loaded into the <head> of any non-AJAX template provided by Framework.");
$filesContent["project-assets/js/project.js"] = jsCommentBlock("Any .js files placed into the project-assets/js directory, including this .js file, will be automatically loaded into the <head> of any non-AJAX template provided by Framework.");
$directories[] = "project-components";
$filesContent["project-components/notice.php"] = pageDocBlock("Place here any re-usable classes that you use to build your pages. These will be autoloaded on page load by setup.php.");
$directories[] = "project-docs";
$directories[] = "project-docs/api-docs";
$filesContent["project-docs/.htaccess"] = "Allow from all";
$filesContent["project-docs/api-docs/notice.php"] = pageDocBlock("Leave this directory empty. If you choose to build documentation via php-documentor, build it into this directory.");
$filesContent["project-docs/notice.php"] = pageDocBlock("Place here any narrative project documentation.");
$filesContent["project-docs/index.php"] = getFileTemplate("index.php");
$filesContent["project-docs/index.md"] = getFileTemplate("index.md");
$directories[] = "project-schema";
$directories[] = "project-schema/generated-classes";
$filesContent["project-schema/propel.inc"] = getFileTemplate("propel.inc");
$filesContent["project-schema/schema.xml"] = getFileTemplate("schema.xml");
$filesContent["project-schema/generated-classes/notice.php"] = pageDocBlock("Propel will place the classes it generates in this directory.");
$directories[] = "project-templates";
$filesContent["project-templates/notice.php"] = pageDocBlock("Place here any custom templates that are specific to your project.");
$directories[] = "project-tests";
$filesContent["project-tests/notice.php"] = pageDocBlock("Place here your software tests.");
foreach ($directories as $directory) {
    mkdir(getBaseDirectory() . "/" . $directory);
}
foreach ($filesContent as $relativeFilePath => $content) {
    $file = fopen(getBaseDirectory() . "/" . $relativeFilePath, "w");
    fwrite($file, $content);
    fclose($file);
}
/* END NEW PROJECT CREATION */