OSDN Git Service

Add files via upload
authorKazuki Suzuki Przyborowski <kazuki.przyborowski@gmail.com>
Mon, 4 Apr 2022 22:50:36 +0000 (17:50 -0500)
committerGitHub <noreply@github.com>
Mon, 4 Apr 2022 22:50:36 +0000 (17:50 -0500)
inc/misc/functions.php
inc/versioninfo.php

index eecfabe..77a59d5 100644 (file)
@@ -11,7 +11,7 @@
     Copyright 2004-2019 iDB Support - https://idb.osdn.jp/support/category.php?act=view&id=1
     Copyright 2004-2019 Game Maker 2k - https://idb.osdn.jp/support/category.php?act=view&id=2
 
-    $FileInfo: functions.php - Last Update: 6/16/2021 SVN 934 - Author: cooldude2k $
+    $FileInfo: functions.php - Last Update: 4/4/2022 SVN 942 - Author: cooldude2k $
 */
 $File3Name = basename($_SERVER['SCRIPT_NAME']);
 if ($File3Name=="functions.php"||$File3Name=="/functions.php") {
@@ -83,6 +83,22 @@ $SessName = session_name();
 $output = preg_replace("/&PHPSESSID/", "&amp;PHPSESSID", $output);
 $qstrcode = htmlentities($Settings['qstr'], ENT_QUOTES, $Settings['charset']);
 $output = str_replace($Settings['qstr'].$SessName, $qstrcode.$SessName, $output);
+if (extension_loaded('tidy') && (isset($Settings['clean_html']) && $Settings['clean_html']==true)) {
+ $tidyxhtml = false;
+ if($Settings['output_type']=="html") {
+  $tidyxhtml = false; }
+ if($Settings['output_type']=="xhtml") {
+  $tidyxhtml = true; }
+ if($Settings['output_type']!="html" && $Settings['output_type']!="xhtml") {
+  $tidyxhtml = false; }
+  $config = array(
+            'indent' => true,
+            'clean' => true,
+            'output-xhtml' => $tidyxhtml,
+            'show-body-only' => true,
+            'wrap' => 0);
+ $output = tidy_parse_string($output, $config, 'UTF8');
+ $output ->cleanRepair(); }
 if($use_gzip!="on") {
        if($Settings['send_pagesize']=="on") {
        @header("Content-Length: ".decoct(strlen($output))); 
@@ -115,6 +131,22 @@ $SessName = session_name();
 $output = preg_replace("/&PHPSESSID/", "&amp;PHPSESSID", $output);
 $qstrcode = htmlentities($Settings['qstr'], ENT_QUOTES, $Settings['charset']);
 $output = str_replace($Settings['qstr'].$SessName, $qstrcode.$SessName, $output);
+if (extension_loaded('tidy') && (isset($Settings['clean_html']) && $Settings['clean_html']==true)) {
+ $tidyxhtml = false;
+ if($Settings['output_type']=="html") {
+  $tidyxhtml = false; }
+ if($Settings['output_type']=="xhtml") {
+  $tidyxhtml = true; }
+ if($Settings['output_type']!="html" && $Settings['output_type']!="xhtml") {
+  $tidyxhtml = false; }
+  $config = array(
+            'indent' => true,
+            'clean' => true,
+            'output-xhtml' => $tidyxhtml,
+            'show-body-only' => true,
+            'wrap' => 0);
+ $output = tidy_parse_string($output, $config, 'UTF8');
+ $output ->cleanRepair(); }
 if($use_gzip!="on") {
        if($Settings['send_pagesize']=="on") {
        @header("Content-Length: ".decoct(strlen($output))); 
@@ -140,6 +172,22 @@ function gzip_page($use_gzip="off",$gzip_type="gzip") {
 global $Settings,$urlstatus;
 if(!isset($urlstatus)||!is_numeric($urlstatus)) { $urlstatus = 200; }
 $output = trim(ob_get_clean());
+if (extension_loaded('tidy') && (isset($Settings['clean_html']) && $Settings['clean_html']==true)) {
+ $tidyxhtml = false;
+ if($Settings['output_type']=="html") {
+  $tidyxhtml = false; }
+ if($Settings['output_type']=="xhtml") {
+  $tidyxhtml = true; }
+ if($Settings['output_type']!="html" && $Settings['output_type']!="xhtml") {
+  $tidyxhtml = false; }
+  $config = array(
+            'indent' => true,
+            'clean' => true,
+            'output-xhtml' => $tidyxhtml,
+            'show-body-only' => true,
+            'wrap' => 0);
+ $output = tidy_parse_string($output, $config, 'UTF8');
+ $output ->cleanRepair(); }
 if($gzip_type!="gzip"&&$gzip_type!="deflate"&&$gzip_type!="brotli") { $gzip_type = "gzip"; }
 if($gzip_type=="brotli"&&!function_exists('brotli_compress')) { $gzip_type = "gzip"; }
 if($use_gzip!="on") {
index c3c1792..5603e7e 100644 (file)
@@ -11,7 +11,7 @@
     Copyright 2004-2019 iDB Support - https://idb.osdn.jp/support/category.php?act=view&id=1\r
     Copyright 2004-2019 Game Maker 2k - https://idb.osdn.jp/support/category.php?act=view&id=2\r
 \r
-    $FileInfo: versioninfo.php - Last Update: 4/2/2022 SVN 941 - Author: cooldude2k $\r
+    $FileInfo: versioninfo.php - Last Update: 4/4/2022 SVN 942 - Author: cooldude2k $\r
 */\r
 $File3Name = basename($_SERVER['SCRIPT_NAME']);\r
 if ($File3Name=="versioninfo.php"||$File3Name=="/versioninfo.php") {\r
@@ -27,8 +27,8 @@ function version_info($proname,$subver,$ver,$supver,$reltype,$svnver,$showsvn) {
        return $return_var; }\r
 // Version number and date stuff. :P\r
 $VER1[0] = 0; $VER1[1] = 5; $VER1[2] = 4; $VERFull[1] = $VER1[0].".".$VER1[1].".".$VER1[2];\r
-$VER2[0] = "Alpha"; $VER2[1] = "Al"; $VER2[2] = "SVN"; $SubVerN = 941; $GitRevN = "$Id: 492f6ad6859dec94966a7dcb8a23d233c85e847e $";\r
-$SVNDay[0] = 4; $SVNDay[1] = 2; $SVNDay[2] = 2022; $SVNDay[3] = $SVNDay[0]."/".$SVNDay[1]."/".$SVNDay[2];\r
+$VER2[0] = "Alpha"; $VER2[1] = "Al"; $VER2[2] = "SVN"; $SubVerN = 942; $GitRevN = "$Id: c3c1792f8f1d020f0834e0dd5c3047cbc0fcecce $";\r
+$SVNDay[0] = 4; $SVNDay[1] = 4; $SVNDay[2] = 2022; $SVNDay[3] = $SVNDay[0]."/".$SVNDay[1]."/".$SVNDay[2];\r
 $AltName = "DF2k"; $AltName2 = "DF2k"; $RName = "iDB"; $SFName = "IntDB";\r
 $RFullName = "Internet Discussion Boards"; $AltFullName = "Discussion Forums 2k"; $AltGM2k = "Game Maker 2k";\r
 $VerCheckName = "iDB"; $AltVerCheckName = "DF2k"; $AltiDBHome = "https://idb.osdn.jp/";\r