Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

master の変更をマージ #180

Merged
merged 23 commits into from
Jan 5, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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/
Expand All @@ -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
Expand All @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions data/Smarty/templates/admin/contents/index.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@
<td><a href="#" onclick="eccube.fnFormModeSubmit('move','delete','news_id','<!--{$arrNews[data].news_id|h}-->'); return false;">削除</a></td>
<td>
<!--{if count($arrNews) != 1}-->
<!--{assign var=news_id value="`$arrNews[data].news_id`"}-->
<!--{if $arrErr[$news_id] != ""}--><span class="attention"><!--{$arrErr[$news_id]}--></span><!--{/if}-->
<input type="text" name="pos-<!--{$arrNews[data].news_id|h}-->" size="3" class="box3" />番目へ<a href="?" onclick="eccube.fnFormModeSubmit('move', 'moveRankSet','news_id', '<!--{$arrNews[data].news_id|h}-->'); return false;">移動</a><br />
<!--{/if}-->
<!--{if $smarty.section.data.iteration != 1}-->
Expand Down
6 changes: 6 additions & 0 deletions data/app_initial.php
Original file line number Diff line number Diff line change
Expand Up @@ -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/");
Expand Down
5 changes: 1 addition & 4 deletions data/class/SC_CartSession.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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]);
}
Expand Down
14 changes: 14 additions & 0 deletions data/class/SC_CheckError.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 . 'が不正な値です。<br />';
}
}
}
1 change: 1 addition & 0 deletions data/class/SC_FormParam.php
Original file line number Diff line number Diff line change
Expand Up @@ -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])) {
Expand Down
2 changes: 1 addition & 1 deletion data/class/helper/SC_Helper_Customer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
Expand Down
7 changes: 6 additions & 1 deletion data/class/pages/admin/contents/LC_Page_Admin_Contents.php
Original file line number Diff line number Diff line change
Expand Up @@ -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] = "※ 移動先は数字で入力してください。<br>";
$this->arrNews = $objNews->getList();
$this->line_max = count($this->arrNews);
return;
}
SC_Response_Ex::reload();
break;

default:
Expand Down
2 changes: 2 additions & 0 deletions data/class/pages/admin/order/LC_Page_Admin_Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down