예제 #1
0
파일: update.php 프로젝트: margery/thelia
    echo $trans->trans('It seems that Thelia database is already up to date.');
    ?>
</p>
            <p><em><?php 
    echo $trans->trans('For the moment, the wizard allows only an update of the database. To update your php files you must proceed manually.');
    ?>
</em></p>
        </div>

    <?php 
} else {
    ?>

        <div class="alert alert-info">
            <p><?php 
    echo $trans->trans('Would you like to update your installation of Thelia from version <strong>%current</strong> to version <strong>%latest</strong>.', ['%current' => $update->getCurrentVersion(), '%latest' => $update->getLatestVersion()]);
    ?>
</p>
        </div>

        <div class="alert alert-warning">
            <p><?php 
    echo $trans->trans('It\'s strongly recommended to make a backup before proceeding.');
    ?>
</p>
        </div>

    <?php 
}
?>
예제 #2
0
파일: updater.php 프로젝트: zorn-v/thelia
</p>
                    </div><?php 
        }
    }
    if ($continue) {
        try {
            $update->process();
        } catch (UpdateException $ex) {
            $updateError = $ex;
        }
        if (null === $updateError) {
            ?>

                    <div class="alert alert-success">
                        <p><?php 
            echo $trans->trans('Thelia as been successfully updated to version %version', ['%version' => $update->getCurrentVersion()]);
            ?>
</p>
                    </div>

                    <?php 
            if ($update->hasPostInstructions()) {
                ?>
                    <div class="alert alert-info">
                        <h2><?php 
                echo $trans->trans("Post update instructions");
                ?>
</h2>
                        <?php 
                echo $update->getPostInstructions('html');
                ?>
예제 #3
0
파일: update.php 프로젝트: zorn-v/thelia
use Symfony\Component\Finder\Finder;
use Thelia\Install\Exception\UpdateException;
/***************************************************
 * Load Update class
 ***************************************************/
try {
    $update = new \Thelia\Install\Update(false);
} catch (UpdateException $ex) {
    echo $ex->getMessage() . PHP_EOL;
    exit(2);
}
/***************************************************
 * Check if update is needed
 ***************************************************/
if ($update->isLatestVersion()) {
    echo "You already have the latest version of Thelia : " . $update->getCurrentVersion() . PHP_EOL;
    exit(3);
}
while (1) {
    echo sprintf("You are going to update Thelia from version %s to version %s." . PHP_EOL, $update->getCurrentVersion(), $update->getLatestVersion());
    echo "Continue update process ? (Y/n)" . PHP_EOL;
    $rep = readStdin(true);
    if ($rep == 'y') {
        break;
    } elseif ($rep == 'n') {
        echo "Update aborted" . PHP_EOL;
        exit(0);
    }
}
$backup = false;
while (1) {
예제 #4
0
파일: update.php 프로젝트: thelia/setup
use Symfony\Component\Finder\Finder;
use Thelia\Install\Exception\UpdateException;
/***************************************************
 * Load Update class
 ***************************************************/
try {
    $update = new \Thelia\Install\Update(false);
} catch (UpdateException $ex) {
    cliOutput($ex->getMessage(), 'error');
    exit(2);
}
/***************************************************
 * Check if update is needed
 ***************************************************/
if ($update->isLatestVersion()) {
    cliOutput("You already have the latest version of Thelia : " . $update->getCurrentVersion(), 'success');
    exit(3);
}
$current = $update->getCurrentVersion();
$files = $update->getLatestVersion();
$web = $update->getWebVersion();
while (1) {
    if ($web !== null && $files != $web) {
        cliOutput(sprintf("Thelia server is reporting the current stable release version is %s ", $web), 'warning');
    }
    cliOutput(sprintf("You are going to update Thelia from version %s to version %s.", $current, $files), 'info');
    if ($web !== null && $files < $web) {
        cliOutput(sprintf("Your files belongs to version %s, which is not the latest stable release.", $files), 'warning');
        cliOutput(sprintf("It is recommended to upgrade your files first then run this script again." . PHP_EOL . "The latest version is available at http://thelia.net/#download ."), 'warning');
        cliOutput("Continue update process anyway ? (Y/n)");
    } else {