OSDN Git Service

Small update added output buffer checker.
authorKazuki Przyborowski <kazuki.przyborowski@gmail.com>
Thu, 12 Jul 2007 07:51:25 +0000 (07:51 +0000)
committerKazuki Przyborowski <kazuki.przyborowski@gmail.com>
Thu, 12 Jul 2007 07:51:25 +0000 (07:51 +0000)
git-svn-id: svn://svn.code.sf.net/p/intdb/svn/trunk@41 2b68903e-0b30-0410-9a39-a2e4f3c5be39

inc/filename.php
mysql.php

index 342520e..66dd556 100644 (file)
@@ -11,7 +11,7 @@
     Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/
     Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/
 
-    $FileInfo: filename.php - Last Update: 07/11/2007 SVN 40 - Author: cooldude2k $
+    $FileInfo: filename.php - Last Update: 07/12/2007 SVN 41 - Author: cooldude2k $
 */
 $File3Name = basename($_SERVER['SCRIPT_NAME']);
 if ($File3Name=="filename.php"||$File3Name=="/filename.php") {
@@ -49,8 +49,8 @@ function version_info($proname,$subver,$ver,$supver,$reltype,$svnver,$showsvn) {
        return $return_var; }
 // Version number and date stuff. :P
 $VER1[0] = 0; $VER1[1] = 1; $VER1[2] = 5; $VERFull[1] = $VER1[0].".".$VER1[1].".".$VER1[2];
-$VER2[0] = "Pre-Alpha"; $VER2[1] = "PA"; $VER2[2] = "SVN"; $SubVerN = 40; $RName = "iDB"; $SFName = "IntDB";
-$SVNDay[0] = 07; $SVNDay[1] = 11; $SVNDay[2] = 2007; $SVNDay[3] = $SVNDay[0]."/".$SVNDay[1]."/".$SVNDay[2];
+$VER2[0] = "Pre-Alpha"; $VER2[1] = "PA"; $VER2[2] = "SVN"; $SubVerN = 41; $RName = "iDB"; $SFName = "IntDB";
+$SVNDay[0] = 07; $SVNDay[1] = 12; $SVNDay[2] = 2007; $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);
 $VerInfo['iDB_Full_Ver'] = version_info($RName,$VER1[0],$VER1[1],$VER1[2],$VER2[0],$SubVerN,false);
index 2eedefd..4b5c85f 100644 (file)
--- a/mysql.php
+++ b/mysql.php
@@ -11,7 +11,7 @@
     Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/
     Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/
 
-    $FileInfo: mysql.php - Last Update: 07/11/2007 SVN 40 - Author: cooldude2k $
+    $FileInfo: mysql.php - Last Update: 07/12/2007 SVN 41 - Author: cooldude2k $
 */
 @error_reporting(E_ALL ^ E_NOTICE);
 @ini_set('session.use_trans_sid', false);
@@ -34,6 +34,7 @@ if(!isset($SettDir['admin'])) { $SettDir['admin'] = "inc/admin/"; }
 if(!isset($SettDir['mod'])) { $SettDir['mod'] = "inc/mod/"; }
 if(!isset($SettDir['themes'])) { $SettDir['themes'] = "themes/"; }
 if(!isset($Settings['use_iniset'])) { $Settings['use_iniset'] = null; }
+if(!isset($Settings['clean_ob'])) { $Settings['clean_ob'] = false; }
 if(!isset($_SERVER['PATH_INFO'])) { $_SERVER['PATH_INFO'] = null; }
 if(!isset($_GET['page'])) { $_GET['page'] = null; }
 if(!isset($_GET['act'])) { $_GET['act'] = null; }
@@ -66,7 +67,13 @@ if(strstr($_SERVER['HTTP_ACCEPT_ENCODING'], "gzip")) { $Settings['use_gzip'] = "
 if($Settings['use_gzip']=="deflate") {
 if(strstr($_SERVER['HTTP_ACCEPT_ENCODING'], "deflate")) { $Settings['use_gzip'] = "on";
        $GZipEncode['Type'] = "deflate"; } else { $Settings['use_gzip'] = "off"; } }
-@ob_start();
+if($Settings['clean_ob']==true) {
+/* Check for other output handlers/buffers are open
+   and close and get the contents in an array */
+$numob = count(ob_list_handlers()); $iob = 0; 
+while ($iob < $numob) { 
+       $old_ob_var[$iob] = @ob_get_clean(); 
+       ++$iob; } } @ob_start();
 if($Settings['use_gzip']=="on") { 
 if($GZipEncode['Type']!="gzip") { if($GZipEncode['Type']!="deflate") { $GZipEncode['Type'] = "gzip"; } }
        if($GZipEncode['Type']=="gzip") {