[Comoblog-commit] comoblog/_install failed_patch.php,NONE,1.1 patch_0.php,1.2,1.3
Status: Inactive
Brought to you by:
markwallis
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2006-01-10 02:17:00
|
Update of /cvsroot/comoblog/comoblog/_install In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16470 Modified Files: patch_0.php Added Files: failed_patch.php Log Message: Add support for notification of failed patching attempts --- NEW FILE: failed_patch.php --- <?php require ('../include/xtemplate.inc.php'); require_once (dirname(__FILE__).'/../include/config.inc.php'); $tpl = @new XTemplate ('templates/failed_patch.tpl.htm', 'main'); $query = "select pref_value from ".CFG_MYSQL_TABPREFIX."preferences where pref_name='CFG_VERSION'"; $res = mysql_query($query); $row = mysql_fetch_array($res, MYSQL_NUM); $old_ver = $row[0]; $file_version = file(dirname(__FILE__).'/../VERSION'); $new_ver = $file_version[0]; if ($old_ver == "0.5.1") $tpl->assign('OLD_VERSION', "Easymoblog ".$old_ver); else $tpl->assign('OLD_VERSION', "CoMoblog ".$old_ver); $tpl->assign('NEW_VERSION', "CoMoblog ".$new_ver); $tpl->parse('main'); $tpl->out('main'); ?> Index: patch_0.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/_install/patch_0.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- patch_0.php 10 Jan 2006 01:26:01 -0000 1.2 +++ patch_0.php 10 Jan 2006 02:16:47 -0000 1.3 @@ -13,7 +13,7 @@ $file_version = file(dirname(__FILE__).'/../VERSION'); if (!in_supported_patch_list(CFG_VERSION)) { - Header ('Location: ../_install/upgrade_0.php'); + Header ('Location: failed_patch.php'); exit; } |