Beispiel #1
0
            ?>
</h4><p><?php 
            echo $spl->getPackageDescription();
            ?>
</td>
		</tr>
		
		<?php 
        }
        ?>
		
		</tbody>
		</table>
		<br/>
		<?php 
        if (!StartingPointPackage::hasCustomList()) {
            ?>
			<div class="alert-message block-message info"><?php 
            echo t('concrete5 veterans can choose "Empty Site," but otherwise we recommend starting with some sample content.');
            ?>
</div>
		<?php 
        }
        ?>

	
</div>
</div>

<div class="row">
<div class="span10 offset1">
$cliconfig = array_merge($_defaults, $cliArguments);
// Configurations
require $cliconfig['core'] . "/bootstrap/configure.php";
// Autoloader
require $cliconfig['core'] . "/bootstrap/autoload.php";
// CMS
$cms = (require $cliconfig['core'] . "/bootstrap/start.php");
// Database connection
\Database::extend('install', function () use($cliconfig) {
    return \Database::getFactory()->createConnection(array('host' => $cliconfig['db-server'], 'user' => $cliconfig['db-username'], 'password' => $cliconfig['db-password'], 'database' => $cliconfig['db-database']));
});
\Database::setDefaultConnection('install');
$cms['config']['database.connections.install'] = array();
// Disable all caches
Cache::disableAll();
// Install data setup
$passHash = new PasswordHash(Config::get('concrete.user.password.hash_cost_log2'), Config::get('concrete.user.password.hash_portable'));
define('INSTALL_USER_EMAIL', $cliconfig['admin-email']);
define('INSTALL_USER_PASSWORD_HASH', $passHash->HashPassword($cliconfig['admin-password']));
define('INSTALL_STARTING_POINT', $cliconfig['starting-point']);
define('SITE', $cliconfig['site']);
$startingPoint = StartingPointPackage::getClass(INSTALL_STARTING_POINT);
$routines = $startingPoint->getInstallRoutines();
// Redefine the error handlers, overriding any registered by C5
set_error_handler('customErrorHandler');
foreach ($routines as $r) {
    fwrite(STDOUT, sprintf("%s: %s \n", $r->getProgress(), $r->getText()));
    call_user_func(array($startingPoint, $r->getMethod()));
}
fwrite(STDOUT, "!!!!!! Installation Complete: OK !!!!!!\n");
exit(0);
$_POST['uPasswordConfirm'] = $cliconfig['admin-password'];
$_POST['uEmail'] = $cliconfig['admin-email'];
if ($e->has()) {
    foreach ($e->getList() as $ei) {
        print "ERROR: " . $ei . "\n";
    }
    exit(1);
}
$cnt->configure($e);
if ($e->has()) {
    foreach ($e->getList() as $ei) {
        print "ERROR: " . $ei . "\n";
    }
    exit(1);
} else {
    $spl = StartingPointPackage::getClass($cliconfig['starting-point']);
    require DIR_CONFIG_SITE . '/site_install.php';
    require DIR_CONFIG_SITE . '/site_install_user.php';
    $routines = $spl->getInstallRoutines();
    try {
        foreach ($routines as $r) {
            print $r->getProgress() . '%: ' . $r->getText() . "\n";
            call_user_func(array($spl, $r->getMethod()));
        }
    } catch (Exception $ex) {
        print "ERROR: " . $ex->getMessage() . "\n";
        $cnt->reset();
    }
    if ($cliconfig['default-locale']) {
        \Config::save('concrete.locale', $cliconfig['default-locale']);
    }
Beispiel #4
0
                            </div>
                        </div>
                    </div>
                </div>
                <div class="panel-heading">
                    <h4 class="panel-title">
                        <?php 
    echo t('Starting Point');
    ?>
                    </h4>
                </div>
                <div id="starting-point" class="">
                    <div class="panel-body">
                        <div class="row">
                            <?php 
    $availableSampleContent = StartingPointPackage::getAvailableList();
    foreach ($availableSampleContent as $spl) {
        $pkgHandle = $spl->getPackageHandle();
        ?>
                                <div class="col-md-6">
                                    <div class="radio">
                                        <label>
                                            <?php 
        echo $form->radio('SAMPLE_CONTENT', $pkgHandle, $pkgHandle == 'elemental_full' || count($availableSampleContent) == 1);
        ?>
                                            <strong><?php 
        echo $spl->getPackageName();
        ?>
</strong><br/>
                                            <?php 
        echo $spl->getPackageDescription();