Pluf Framework

Pluf Framework Commit Details


Date:2009-03-27 23:48:42 (15 years 8 months ago)
Author:Loic d'Anterroches
Branch:develop, master
Commit:b3f5684117c700fc7231a632cd7177aca2fa06e8
Parents: c7d2912bb09c2d620469a14116e6da38b64edea1
Message:Added PHP version check and better error display.

Changes:

File differences

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

Archive Download the corresponding diff file

Branches

Tags

Number of commits:
Page rendered in 0.06171s using 13 queries.