From f811f585d4071b87a2e6d3215580c2e097345ed2 Mon Sep 17 00:00:00 2001 From: Kazuki Przyborowski Date: Tue, 24 Nov 2009 00:32:21 +0000 Subject: [PATCH] Small bug fix. git-svn-id: svn://svn.code.sf.net/p/intdb/svn/trunk@360 2b68903e-0b30-0410-9a39-a2e4f3c5be39 --- inc/members.php | 6 +++--- inc/misc/mysql.php | 7 ++++--- inc/prelogin.php | 7 ++++--- inc/versioninfo.php | 4 ++-- install.php | 15 ++++++++++++++- setup/mkconfig.php | 33 +++++++++++++++++---------------- 6 files changed, 44 insertions(+), 28 deletions(-) diff --git a/inc/members.php b/inc/members.php index 917eaba..dc199e0 100644 --- a/inc/members.php +++ b/inc/members.php @@ -11,7 +11,7 @@ Copyright 2004-2009 iDB Support - http://idb.berlios.de/ Copyright 2004-2009 Game Maker 2k - http://gamemaker2k.org/ - $FileInfo: members.php - Last Update: 11/23/2009 SVN 359 - Author: cooldude2k $ + $FileInfo: members.php - Last Update: 11/23/2009 SVN 360 - Author: cooldude2k $ */ $File3Name = basename($_SERVER['SCRIPT_NAME']); if ($File3Name=="members.php"||$File3Name=="/members.php") { @@ -671,7 +671,7 @@ Title:   -=$CGMTime) { $BanError = "yes"; } } @@ -89,5 +91,4 @@ $_SESSION = array(); session_unset(); session_destroy(); redirect("location",$basedir.url_maker($exfile['member'],$Settings['file_ext'],"act=login",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member'],false)); sql_free_result($resultlog2); sql_free_result($gresult); ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']); gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); } -sql_free_result($resultlog2); sql_free_result($gresult); ?> diff --git a/inc/versioninfo.php b/inc/versioninfo.php index 96d2efa..0758d17 100644 --- a/inc/versioninfo.php +++ b/inc/versioninfo.php @@ -11,7 +11,7 @@ Copyright 2004-2009 iDB Support - http://idb.berlios.de/ Copyright 2004-2009 Game Maker 2k - http://gamemaker2k.org/ - $FileInfo: versioninfo.php - Last Update: 11/23/2009 SVN 359 - Author: cooldude2k $ + $FileInfo: versioninfo.php - Last Update: 11/23/2009 SVN 360 - Author: cooldude2k $ */ $File3Name = basename($_SERVER['SCRIPT_NAME']); if ($File3Name=="versioninfo.php"||$File3Name=="/versioninfo.php") { @@ -27,7 +27,7 @@ function version_info($proname,$subver,$ver,$supver,$reltype,$svnver,$showsvn) { return $return_var; } // Version number and date stuff. :P $VER1[0] = 0; $VER1[1] = 3; $VER1[2] = 2; $VERFull[1] = $VER1[0].".".$VER1[1].".".$VER1[2]; -$VER2[0] = "Alpha"; $VER2[1] = "Al"; $VER2[2] = "SVN"; $SubVerN = 359; $RName = "iDB"; $SFName = "IntDB"; +$VER2[0] = "Alpha"; $VER2[1] = "Al"; $VER2[2] = "SVN"; $SubVerN = 360; $RName = "iDB"; $SFName = "IntDB"; $SVNDay[0] = 11; $SVNDay[1] = 23; $SVNDay[2] = 2009; $SVNDay[3] = $SVNDay[0]."/".$SVNDay[1]."/".$SVNDay[2]; $VerInfo['iDB_Ver'] = version_info($RName,$VER1[0],$VER1[1],$VER1[2],$VER2[1],$SubVerN,false); $VerInfo['iDB_Ver_SVN'] = version_info($RName,$VER1[0],$VER1[1],$VER1[2],$VER2[1],$SubVerN,true); diff --git a/install.php b/install.php index e1cb30f..afcc8e4 100644 --- a/install.php +++ b/install.php @@ -12,11 +12,24 @@ Copyright 2004-2009 Game Maker 2k - http://gamemaker2k.org/ iDB Installer made by Game Maker 2k - http://idb.berlios.de/support/category.php?act=view&id=2 - $FileInfo: install.php - Last Update: 11/23/2009 SVN 359 - Author: cooldude2k $ + $FileInfo: install.php - Last Update: 11/23/2009 SVN 360 - Author: cooldude2k $ */ if(ini_get("register_globals")) { require_once('inc/misc/killglobals.php'); } +//ini_set("display_errors", true); +//ini_set("display_startup_errors", true); error_reporting(E_ALL ^ E_NOTICE); +/* Get rid of session id in urls */ +//ini_set("session.use_trans_sid", false); +//ini_set("session.use_cookies", true); +//ini_set("session.use_only_cookies", true); +//ini_set("url_rewriter.tags",""); +set_time_limit(30); ignore_user_abort(true); +/* Change session garbage collection settings */ +//ini_set("session.gc_probability", 1); +//ini_set("session.gc_divisor", 100); +//ini_set("session.gc_maxlifetime", 1440); +ob_start(); if(ini_get("register_globals")) { if(!isset($SettDir['misc'])) { $SettDir['misc'] = "inc/misc/"; } require_once($SettDir['misc'].'killglobals.php'); } diff --git a/setup/mkconfig.php b/setup/mkconfig.php index 9f9e939..fb4106b 100644 --- a/setup/mkconfig.php +++ b/setup/mkconfig.php @@ -12,7 +12,7 @@ Copyright 2004-2009 Game Maker 2k - http://gamemaker2k.org/ iDB Installer made by Game Maker 2k - http://idb.berlios.net/ - $FileInfo: mkconfig.php - Last Update: 11/23/2009 SVN 359 - Author: cooldude2k $ + $FileInfo: mkconfig.php - Last Update: 11/23/2009 SVN 360 - Author: cooldude2k $ */ $File3Name = basename($_SERVER['SCRIPT_NAME']); if ($File3Name=="mkconfig.php"||$File3Name=="/mkconfig.php") { @@ -35,12 +35,12 @@ $_POST['tableprefix'] = preg_replace("/[^A-Za-z0-9_$]/", "", $_POST['tableprefix if($_POST['tableprefix']==null||$_POST['tableprefix']=="_") { $_POST['tableprefix']="idb_"; } if($_POST['sessprefix']==null||$_POST['sessprefix']=="_") { $_POST['sessprefix']="idb_"; } $checkfile="settings.php"; -chmod("settings.php",0766); -chmod("settingsbak.php",0766); +@chmod("settings.php",0766); +@chmod("settingsbak.php",0766); if (!is_writable($checkfile)) { echo "
Settings is not writable."; - chmod("settings.php",0766); $Error="Yes"; - chmod("settingsbak.php",0766); + @chmod("settings.php",0766); $Error="Yes"; + @chmod("settingsbak.php",0766); } else { /* settings.php is writable install iDB. ^_^ */ } session_name($_POST['tableprefix']."sess"); $URLsTest = parse_url($_POST['BoardURL']); @@ -120,7 +120,7 @@ if($Settings['charset']=="UTF-8") { $SQLCollate = "utf8_unicode_ci"; $SQLCharset = "utf8"; } sql_set_charset($SQLCharset); -if($mydbtest!==true) { $Error="Yes"; +if($mydbtest===false) { $Error="Yes"; echo "
".sql_errno().": ".sql_error()."\n"; } if ($Error!="Yes") { $ServerUUID = uuid(false,true,false,$_POST['usehashtype'],null); @@ -182,20 +182,21 @@ $fp = fopen("settingsbak.php","w+"); fwrite($fp, $BoardSettingsBak); fclose($fp); if($_POST['storecookie']=="true") { -setcookie("MemberName", $_POST['AdminUser'], time() + (7 * 86400), $this_dir, $URLsTest['host']); -setcookie("UserID", 1, time() + (7 * 86400), $this_dir, $URLsTest['host']); -setcookie("SessPass", $NewPassword, time() + (7 * 86400), $this_dir, $URLsTest['host']); } +//setcookie("MemberName", $_POST['AdminUser'], time() + (7 * 86400), $this_dir, $URLsTest['host']); +//setcookie("UserID", 1, time() + (7 * 86400), $this_dir, $URLsTest['host']); +//setcookie("SessPass", $NewPassword, time() + (7 * 86400), $this_dir, $URLsTest['host']); +} mysql_close(); $chdel = true; if($Error!="Yes") { if($_POST['unlink']=="true") { -$chdel1 = unlink($SetupDir['setup'].'presetup.php'); $chdel2 = unlink($SetupDir['setup'].'setup.php'); -$chdel3 = unlink($SetupDir['setup'].'mkconfig.php'); $chdel4 = unlink($SetupDir['setup'].'mktable.php'); -$chdel5 = unlink($SetupDir['setup'].'index.php'); $chdel6 = unlink($SetupDir['setup'].'license.php'); -$chdel7 = unlink($SetupDir['setup'].'preinstall.php'); $chdel8 = unlink($SetupDir['convert'].'index.php'); -if($ConvertInfo['ConvertFile']!=null) { $chdel0 = unlink($ConvertInfo['ConvertFile']); } -$chdel9 = unlink($SetupDir['convert'].'info.php'); +$chdel1 = @unlink($SetupDir['setup'].'presetup.php'); $chdel2 = @unlink($SetupDir['setup'].'setup.php'); +$chdel3 = @unlink($SetupDir['setup'].'mkconfig.php'); $chdel4 = @unlink($SetupDir['setup'].'mktable.php'); +$chdel5 = @unlink($SetupDir['setup'].'index.php'); $chdel6 = @unlink($SetupDir['setup'].'license.php'); +$chdel7 = @unlink($SetupDir['setup'].'preinstall.php'); $chdel8 = @unlink($SetupDir['convert'].'index.php'); +if($ConvertInfo['ConvertFile']!=null) { $chdel0 = @unlink($ConvertInfo['ConvertFile']); } +$chdel9 = @unlink($SetupDir['convert'].'info.php'); $chdel10 = rmdir($SetupDir['convert']); $chdel11 = rmdir('setup'); -$chdel12 = unlink('install.php'); } } +$chdel12 = @unlink('install.php'); } } if($chdel1===false||$chdel2===false||$chdel3===false||$chdel4===false) { $chdel = false; } if($chdel5===false||$chdel6===false||$chdel7===false||$chdel8===false) { $chdel = false; } if($chdel9===false||$chdel10===false||$chdel11===false||$chdel12===false) { $chdel = false; } -- 2.11.0