[ Index ] |
|
Code source de Dotclear 2.0-beta6 |
1 #!/usr/bin/env php 2 <?php 3 # ***** BEGIN LICENSE BLOCK ***** 4 # This file is part of DotClear. 5 # Copyright (c) 2007 Olivier Meunier and contributors. All rights 6 # reserved. 7 # 8 # DotClear is free software; you can redistribute it and/or modify 9 # it under the terms of the GNU General Public License as published by 10 # the Free Software Foundation; either version 2 of the License, or 11 # (at your option) any later version. 12 # 13 # DotClear is distributed in the hope that it will be useful, 14 # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 # GNU General Public License for more details. 17 # 18 # You should have received a copy of the GNU General Public License 19 # along with DotClear; if not, write to the Free Software 20 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 # 22 # ***** END LICENSE BLOCK ***** 23 24 try 25 { 26 if (isset($_SERVER['argv'][1])) { 27 $dc_conf = $_SERVER['argv'][1]; 28 } elseif (isset($_SERVER['DC_RC_PATH'])) { 29 $dc_conf = realpath($_SERVER['DC_RC_PATH']); 30 } else { 31 $dc_conf = dirname(__FILE__).'/../config.php'; 32 } 33 34 if (!is_file($dc_conf)) { 35 throw new Exception(sprintf('%s is not a file',$dc_conf)); 36 } 37 38 $_SERVER['DC_RC_PATH'] = $dc_conf; 39 unset($dc_conf); 40 41 require dirname(__FILE__).'/../prepend.php'; 42 require dirname(__FILE__).'/upgrade.php'; 43 44 echo "Starting upgrade process\n"; 45 $core->con->begin(); 46 try { 47 dotclearUpgrade(&$core); 48 } catch (Exception $e) { 49 $core->con->rollback(); 50 throw $e; 51 } 52 $core->con->commit(); 53 echo "Upgrade process successfully completed\n"; 54 exit(0); 55 } 56 catch (Exception $e) 57 { 58 echo $e->getMessage()."\n"; 59 exit(1); 60 } 61 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Fri Feb 23 22:16:06 2007 | par Balluche grâce à PHPXref 0.7 |