[ Index ] |
|
Code source de eZ Publish 3.9.0 |
1 <?php 2 // 3 // Created on: <04-Feb-2004 21:56:50 kk> 4 // 5 // SOFTWARE NAME: eZ publish 6 // SOFTWARE RELEASE: 3.9.0 7 // BUILD VERSION: 17785 8 // COPYRIGHT NOTICE: Copyright (C) 1999-2006 eZ systems AS 9 // SOFTWARE LICENSE: GNU General Public License v2.0 10 // NOTICE: > 11 // This program is free software; you can redistribute it and/or 12 // modify it under the terms of version 2.0 of the GNU General 13 // Public License as published by the Free Software Foundation. 14 // 15 // This program is distributed in the hope that it will be useful, 16 // but WITHOUT ANY WARRANTY; without even the implied warranty of 17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 // GNU General Public License for more details. 19 // 20 // You should have received a copy of version 2.0 of the GNU General 21 // Public License along with this program; if not, write to the Free 22 // Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 23 // MA 02110-1301, USA. 24 // 25 // 26 27 $Module =& $Params["Module"]; 28 29 include_once ( "kernel/common/template.php" ); 30 include_once ( "kernel/common/eztemplatedesignresource.php" ); 31 include_once ( 'lib/ezutils/classes/ezhttptool.php' ); 32 33 define( 'MD5_SUM_LIST_FILE', 'share/filelist.md5' ); 34 35 $tpl =& templateInit(); 36 37 $tpl->setVariable( 'md5_result', false ); 38 $tpl->setVariable( 'upgrade_sql', false ); 39 40 if ( $Module->isCurrentAction( 'MD5Check' ) ) 41 { 42 if ( !file_exists( MD5_SUM_LIST_FILE ) ) 43 { 44 $tpl->setVariable( 'md5_result', 'failed' ); 45 $tpl->setVariable( 'failure_reason', 46 ezi18n( 'kernel/setup', 'File %1 does not exist. '. 47 'You should copy it from the recent eZ Publish distribution.', 48 null, array( MD5_SUM_LIST_FILE ) ) ); 49 } 50 else 51 { 52 include_once ( 'lib/ezfile/classes/ezmd5.php' ); 53 $checkResult = eZMD5::checkMD5Sums( 'share/filelist.md5' ); 54 55 if ( count( $checkResult ) == 0 ) 56 { 57 $tpl->setVariable( 'md5_result', 'ok' ); 58 } 59 else 60 { 61 $tpl->setVariable( 'md5_result', $checkResult ); 62 } 63 } 64 } 65 66 if ( $Module->isCurrentAction( 'DBCheck' ) ) 67 { 68 include_once ( 'lib/ezdbschema/classes/ezdbschemachecker.php'); 69 include_once ( 'lib/ezdbschema/classes/ezdbschema.php' ); 70 71 $db =& eZDB::instance(); 72 $dbSchema = eZDBSchema::instance(); 73 $differences = eZDbSchemaChecker::diff( $dbSchema->schema(), eZDBSchema::read( 'share/db_schema.dba' ) ); 74 $sqlDiff = $dbSchema->generateUpgradeFile( $differences ); 75 76 if ( strlen( $sqlDiff ) == 0 ) 77 { 78 $tpl->setVariable( 'upgrade_sql', 'ok' ); 79 } 80 else 81 { 82 $tpl->setVariable( 'upgrade_sql', $sqlDiff ); 83 } 84 } 85 86 $Result = array(); 87 $Result['content'] =& $tpl->fetch( "design:setup/systemupgrade.tpl" ); 88 $Result['path'] = array( array( 'url' => false, 89 'text' => ezi18n( 'kernel/setup', 'System Upgrade' ) ) ); 90 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sat Feb 24 10:30:04 2007 | par Balluche grâce à PHPXref 0.7 |