Pluf Framework

Sign in or create your account | Project List | Help

Pluf Framework Commit Details

Date:2009-03-28 05:48:42 (11 months 21 days ago)
Author:Loïc d'Anterroches
Commit:b3f5684117c700fc7231a632cd7177aca2fa06e8
Message:Added PHP version check and better error display.

Files: src/migrate.php (2 diffs)

Change Details

src/migrate.php
2424/**
2525 * Migration script.
2626 */
27
27if (version_compare(PHP_VERSION, '5.2.4', '<')) {
28    echo 'Error: You need at least PHP 5.2.4'."\n";
29    exit(1);
30}
2831set_include_path(get_include_path().PATH_SEPARATOR.dirname(__FILE__));
2932require 'Pluf.php';
3033require 'Console/Getopt.php';
...... 
195198    $m->display = true;
196199}
197200$m->dry_run = $what['dry_run'];
198try {
199    if ($what['install']) {
200        debug('Install '.$app_disp);
201        $m->install();
202    } elseif ($what['un-install']) {
203        debug('Uninstall '.$app_disp);
204        $m->unInstall();
205    } else {
206        debug('Migrate '.$app.' to version '.$what['version']);
207        $m->migrate($what['version']);
208    }
209} catch (Exception $e) {
210    echo 'Error: '.$e->getMessage()."\n";
211    die();
212}
201
202if ($what['install']) {
203    debug('Install '.$app_disp);
204    $m->install();
205} elseif ($what['un-install']) {
206    debug('Uninstall '.$app_disp);
207    $m->unInstall();
208} else {
209    debug('Migrate '.$app.' to version '.$what['version']);
210    $m->migrate($what['version']);
211}
212
213
214

Archive Download the corresponding diff file

Branches:
master