diff --git a/.travis.yml b/.travis.yml index a79b85d7de..5f52afce70 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,19 +1,19 @@ # for travis-ci # see also. https://travis-ci.org language: php -sudo: required +sudo: false php: - #- 5.3.3 - #- 5.3 - 5.4 - 5.5 - 5.6 - 7.0 - 7.1 + - 7.2 matrix: fast_finish: true - + allow_failures: + - php: 7.2 env: global: - DBNAME=myapp_test HTTP_URL=http://localhost:8085/ HTTPS_URL=https://localhost:8085/ @@ -23,8 +23,7 @@ env: before_script: - composer self-update || true - - if [[ $TRAVIS_PHP_VERSION == '5.3.3' ]]; then composer install --dev --no-interaction --prefer-source ; fi - - if [[ $TRAVIS_PHP_VERSION != '5.3.3' ]]; then composer install --dev --no-interaction ; fi + - composer install --dev --no-interaction - sh -c "if [ '$DB' = 'mysql' ]; then sh ./eccube_install.sh mysql; fi" - sh -c "if [ '$DB' = 'pgsql' ]; then sh ./eccube_install.sh appveyor; fi" - cp tests/require.php.jenkins tests/require.php @@ -41,7 +40,7 @@ script: after_script: - php data/vendor/bin/coveralls -v - - cat ./data/logs/error.log + - tail -n 100 ./data/logs/error.log # Cache folder, you can delete cache from Travis CI web interface cache: diff --git a/data/Smarty/templates/admin/contents/index.tpl b/data/Smarty/templates/admin/contents/index.tpl index d53c41b5cc..ccf543aafb 100644 --- a/data/Smarty/templates/admin/contents/index.tpl +++ b/data/Smarty/templates/admin/contents/index.tpl @@ -136,6 +136,8 @@ 削除 + + 番目へ移動
diff --git a/data/app_initial.php b/data/app_initial.php index 51398aff3b..1a9b55daca 100644 --- a/data/app_initial.php +++ b/data/app_initial.php @@ -21,6 +21,12 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +// Flexible SSLへの対応 +if( isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && 'https' == $_SERVER['HTTP_X_FORWARDED_PROTO'] ){ + $_SERVER['HTTPS'] = 1; + $_SERVER['SERVER_PORT'] = 443; +} + if (!defined('CLASS_REALDIR')) { /** クラスパス */ define('CLASS_REALDIR', DATA_REALDIR . "class/"); diff --git a/data/class/SC_CartSession.php b/data/class/SC_CartSession.php index 545a834767..e79cb97240 100644 --- a/data/class/SC_CartSession.php +++ b/data/class/SC_CartSession.php @@ -233,9 +233,6 @@ public function getAllProductsPoint($productTypeId) } $point_rate = $this->cartSession[$productTypeId][$i]['point_rate']; - if (!isset($this->cartSession[$productTypeId][$i]['id'][0])) { - $this->cartSession[$productTypeId][$i]['id'][0] = ''; - } $point = SC_Utils_Ex::sfPrePoint($price, $point_rate); $total+= ($point * $quantity); } @@ -300,7 +297,7 @@ public function getPrevURL() public function delProductKey($keyname, $val, $productTypeId) { $max = $this->getMax($productTypeId); - for ($i = 0; $i < $max; $i++) { + for ($i = 0; $i <= $max; $i++) { if ($this->cartSession[$productTypeId][$i][$keyname] == $val) { unset($this->cartSession[$productTypeId][$i]); } diff --git a/data/class/SC_CheckError.php b/data/class/SC_CheckError.php index f67bde1823..ae83900015 100644 --- a/data/class/SC_CheckError.php +++ b/data/class/SC_CheckError.php @@ -1762,4 +1762,18 @@ public function numelicCheck($string) return strlen($string) > 0 && !ctype_digit($string); } + + // 都道府県マスタに存在する値かチェック + public function PREF_CHECK($value) + { + $disp = $value[0]; + $key = $value[1]; + + $pref_id = $this->arrParam[$key]; + $objQuery =& SC_Query_Ex::getSingletonInstance(); + $exists = $objQuery->exists('mtb_pref', 'id = ?', array($pref_id)); + if (!$exists) { + $this->arrErr[$key] = '※ ' . $disp . 'が不正な値です。
'; + } + } } diff --git a/data/class/SC_FormParam.php b/data/class/SC_FormParam.php index 4593481a88..d12da67177 100644 --- a/data/class/SC_FormParam.php +++ b/data/class/SC_FormParam.php @@ -229,6 +229,7 @@ public function checkError($br = true) case 'SELECT_CHECK': case 'FILE_NAME_CHECK_BY_NOUPLOAD': case 'NUM_POINT_CHECK': + case 'PREF_CHECK': $this->recursionCheck($this->disp_name[$index], $func, $value, $arrErr[$key], $this->length[$index]); if (SC_Utils_Ex::isBlank($arrErr[$key])) { diff --git a/data/class/helper/SC_Helper_Customer.php b/data/class/helper/SC_Helper_Customer.php index ef905a8605..e708643cf9 100644 --- a/data/class/helper/SC_Helper_Customer.php +++ b/data/class/helper/SC_Helper_Customer.php @@ -394,7 +394,7 @@ public function sfCustomerCommonParam(&$objFormParam, $prefix = '') $objFormParam->addParam('郵便番号1', $prefix . 'zip01', ZIP01_LEN, 'n', array('EXIST_CHECK', 'SPTAB_CHECK', 'NUM_CHECK', 'NUM_COUNT_CHECK')); $objFormParam->addParam('郵便番号2', $prefix . 'zip02', ZIP02_LEN, 'n', array('EXIST_CHECK', 'SPTAB_CHECK', 'NUM_CHECK', 'NUM_COUNT_CHECK')); $objFormParam->addParam('国', $prefix . 'country_id', INT_LEN, 'n', array('NUM_CHECK')); - $objFormParam->addParam('都道府県', $prefix . 'pref', INT_LEN, 'n', array('EXIST_CHECK', 'NUM_CHECK')); + $objFormParam->addParam('都道府県', $prefix . 'pref', INT_LEN, 'n', array('PREF_CHECK', 'EXIST_CHECK', 'NUM_CHECK')); } else { $objFormParam->addParam('お名前(フリガナ・姓)', $prefix . 'kana01', STEXT_LEN, 'CKV', array('NO_SPTAB', 'SPTAB_CHECK', 'MAX_LENGTH_CHECK', 'KANA_CHECK')); $objFormParam->addParam('お名前(フリガナ・名)', $prefix . 'kana02', STEXT_LEN, 'CKV', array('NO_SPTAB', 'SPTAB_CHECK', 'MAX_LENGTH_CHECK', 'KANA_CHECK')); diff --git a/data/class/pages/admin/contents/LC_Page_Admin_Contents.php b/data/class/pages/admin/contents/LC_Page_Admin_Contents.php index 5a44c4e5fe..d0d338d393 100644 --- a/data/class/pages/admin/contents/LC_Page_Admin_Contents.php +++ b/data/class/pages/admin/contents/LC_Page_Admin_Contents.php @@ -145,8 +145,13 @@ public function action() $input_pos = $this->getPostRank($news_id); if (SC_Utils_Ex::sfIsInt($input_pos)) { $objNews->moveRank($news_id, $input_pos); + SC_Response_Ex::reload(); + } else { + $this->arrErr[$news_id] = "※ 移動先は数字で入力してください。
"; + $this->arrNews = $objNews->getList(); + $this->line_max = count($this->arrNews); + return; } - SC_Response_Ex::reload(); break; default: diff --git a/data/class/pages/admin/order/LC_Page_Admin_Order.php b/data/class/pages/admin/order/LC_Page_Admin_Order.php index a873ce0710..a18ff23505 100644 --- a/data/class/pages/admin/order/LC_Page_Admin_Order.php +++ b/data/class/pages/admin/order/LC_Page_Admin_Order.php @@ -93,6 +93,8 @@ public function action() $objFormParam = new SC_FormParam_Ex(); $this->lfInitParam($objFormParam); $objFormParam->setParam($_POST); + $objFormParam->convParam(); + $objFormParam->trimParam(); $this->arrHidden = $objFormParam->getSearchArray(); $this->arrForm = $objFormParam->getFormParamList();