version 4.0 は version 3 を php8.1 で走るようにアップグレードしたものである。 ============================================================== [1] web/lib/sys/CPreProc.class.php -------------------------------------------------------------- public static function reverseMagicQuote(){ $ver_req="5.4"; $ver_cur=phpversion(); if(strnatcmp($ver_cur,$ver_req)>=0){ // equal or newer }else{ $func="reverseMagicQuote_stripslashes_deep"; if(!function_exists($func)&& function_exists("get_magic_quotes_gpc")&& get_magic_quotes_gpc()){ define('REVERSE_MAGIC_QUOTE',$func); function reverseMagicQuote_stripslashes_deep($value){ $value=is_array($value)? array_map(REVERSE_MAGIC_QUOTE,$value): stripslashes($value); return $value; } $_POST=array_map($func,$_POST); $_GET=array_map($func,$_GET); $_COOKIE=array_map($func,$_COOKIE); $_REQUEST=array_map($func,$_REQUEST); } } } ============================================================== [2] codegen/mod/btpl/MPage.class.php -------------------------------------------------------------- if($this->item){ CApp::set( "page-title", $this->item['title'] ); } ============================================================== [3] web/codegen/include/CSRouter.class.php web/lib/app/CInsta.class.php web/lib/sys/CPreProc.class.php -------------------------------------------------------------- public static function getCurrentPageUrl($http=true){ $url=""; if($http){ $url.="http"; $b_https=((isset($_SERVER["HTTPS"]))&&($_SERVER["HTTPS"]=="on")); if($b_https){ $url.="s"; } $url.="://".$_SERVER["SERVER_NAME"]; if(($_SERVER["SERVER_PORT"]!="80")&&!$b_https){ $url.=":".$_SERVER["SERVER_PORT"]; } } // $_SERVER["SCRIPT_NAME"] trancates GET params and PathInfo. $url.=$_SERVER["SCRIPT_NAME"]; return $url; } ==============================================================