From b2019226da26cb10927eca6a7678fac3fea6ba40 Mon Sep 17 00:00:00 2001 From: Clemens Schwaighofer Date: Wed, 3 Apr 2019 17:45:56 +0900 Subject: [PATCH] Update Smarty test, Base class email comment update - smarty test with optgroup - ignore file update for log folder - email regex comment update --- www/admin/class_test.php | 4 ++-- www/admin/smarty_test.php | 19 +++++++++++++++++++ .../admin/default/templates/smarty_test.tpl | 5 +++++ www/lib/CoreLibs/Basic.inc | 7 ++++--- www/log/.gitignore | 1 + 5 files changed, 31 insertions(+), 5 deletions(-) mode change 100644 => 100755 www/layout/admin/default/templates/smarty_test.tpl diff --git a/www/admin/class_test.php b/www/admin/class_test.php index 9f2ee147..47da9ce5 100644 --- a/www/admin/class_test.php +++ b/www/admin/class_test.php @@ -167,14 +167,14 @@ print "DB Version bigger than $to_db_version: ".$basic->dbCompareVersion('>='.$t print "DB Version bigger $to_db_version: ".$basic->dbCompareVersion('>'.$to_db_version)."
"; /* $q = "SELECT FOO FRO BAR"; -// $q = "Select * from foo"; +// $q = "Select * from foo"; $foo = $basic->dbExecAsync($q); print "[ERR] Query: ".$q."
"; print "[ERR] RESOURCE: $foo
"; while (($ret = $basic->dbCheckAsync()) === true) { print "[ERR]: $ret
"; -// sleep(5); + sleep(5); } */ // search path check diff --git a/www/admin/smarty_test.php b/www/admin/smarty_test.php index 4300de3f..147d7313 100755 --- a/www/admin/smarty_test.php +++ b/www/admin/smarty_test.php @@ -18,5 +18,24 @@ require BASE.INCLUDES.'admin_set_paths.inc'; // smarty test $cms->DATA['SMARTY_TEST'] = 'Test Data'; +// drop down test with optgroups +$options = array ( + '' => '選択してください', + '4/25(木)' => array ( + '4/25(木) 11:00-11:50' => '4/25(木) 11:00-11:50', + '4/25(木) 12:20-13:00' => '4/25(木) 12:20-13:00' + ), + '4/26(金)' => array ( + '4/26(金) 11:00-11:50' => '4/26(金) 11:00-11:50', + '4/26(金) 12:20-13:00' => '4/26(金) 12:20-13:00' + ), + '4/27(土)' => array ( + '4/27(土) 11:00-11:50' => '4/27(土) 11:00-11:50', + '4/27(土) 12:20-13:00' => '4/27(土) 12:20-13:00' + ) +); + +$cms->DATA['drop_down_test'] = $options; + require BASE.INCLUDES.'admin_smarty.inc'; require BASE.INCLUDES.'admin_footer.inc'; diff --git a/www/layout/admin/default/templates/smarty_test.tpl b/www/layout/admin/default/templates/smarty_test.tpl old mode 100644 new mode 100755 index 8d2bb078..5dfa26ea --- a/www/layout/admin/default/templates/smarty_test.tpl +++ b/www/layout/admin/default/templates/smarty_test.tpl @@ -1,3 +1,8 @@
{$SMARTY_TEST}
+
+ +
diff --git a/www/lib/CoreLibs/Basic.inc b/www/lib/CoreLibs/Basic.inc index 109de2bc..f410b6a5 100644 --- a/www/lib/CoreLibs/Basic.inc +++ b/www/lib/CoreLibs/Basic.inc @@ -307,8 +307,8 @@ class Basic '.*@bandai\.jp$' => 'keitai_willcom_bandai', # willcom paipo! (kids) '.*@pipopa\.ne\.jp$' => 'keitai_willcom_pipopa', # willcom paipo! (kids) '.*@([a-z0-9]{2,4}\.)?pdx\.ne\.jp$' => 'keitai_willcom_pdx', # actually only di,dj,dk,wm -> all others are "wrong", but none also allowed? - '.*@ymobile([1]{1})?\.ne\.jp$' => 'keitai_willcom_ymobile', # ymobile, ymobile1 techincally not willcom, but I group them there - '.*@y-mobile\.ne\.jp$' => 'keitai_willcom_ymobile', # y-mobile techincally not willcom, but I group them there + '.*@ymobile([1]{1})?\.ne\.jp$' => 'keitai_willcom_ymobile', # ymobile, ymobile1 techincally not willcom, but I group them there (softbank sub) + '.*@y-mobile\.ne\.jp$' => 'keitai_willcom_ymobile', # y-mobile techincally not willcom, but I group them there (softbank sub) '.*@emnet\.ne\.jp$' => 'keitai_willcom_emnet', # e-mobile, group will willcom '.*@emobile\.ne\.jp$' => 'keitai_willcom_emnet', # e-mobile, group will willcom '.*@emobile-s\.ne\.jp$' => 'keitai_willcom_emnet' # e-mobile, group will willcom @@ -484,7 +484,8 @@ class Basic if ($set_microtime == -1) { $string .= substr($microtime, 1); } elseif ($set_microtime >= 1) { - $string .= substr(round($microtime, $set_microtime), 1); + // in round case we run this through number format to always get the same amount of digits + $string .= substr(number_format(round($microtime, $set_microtime), $set_microtime), 1); } return $string; } diff --git a/www/log/.gitignore b/www/log/.gitignore index aac4c7e4..2a50fc00 100644 --- a/www/log/.gitignore +++ b/www/log/.gitignore @@ -1,2 +1,3 @@ *log +*LOG !.gitignore