Skip to content

Instantly share code, notes, and snippets.

@zenith6
zenith6 / SC_CheckError.patch
Created February 14, 2014 10:48
EC-CUBEの SC_CheckError::FILE_NAME_CHECK_BY_NOUPLOAD() を修正するパッチです。
Index: data/class/SC_CheckError.php
===================================================================
--- data/class/SC_CheckError.php (リビジョン 23348)
+++ data/class/SC_CheckError.php (作業コピー)
@@ -851,7 +851,7 @@
return;
}
$this->createParam($value);
- if (strlen($this->arrParam[$value[1]]) > 0 && !preg_match("/^[[:alnum:]_\.-]+$/i", $this->arrParam[$value[1]]) || preg_match('/[\\]/' ,$this->arrParam[$value[1]])) {
+ if (strlen($this->arrParam[$value[1]]) > 0 && preg_match("/[^[:alnum:]_.\\-]/", $this->arrParam[$value[1]])) {
@zenith6
zenith6 / charset.patch
Created February 1, 2014 03:46
EC-CUBEに対して、DB接続の文字エンコーディングをDSNで指定するパッチです。
Index: data/class/db/SC_DB_DBFactory.php
===================================================================
--- data/class/db/SC_DB_DBFactory.php (リビジョン 23329)
+++ data/class/db/SC_DB_DBFactory.php (作業コピー)
@@ -70,7 +70,8 @@
'protocol' => 'tcp',
'hostspec' => DB_SERVER,
'port' => DB_PORT,
- 'database' => DB_NAME
+ 'database' => DB_NAME,
@zenith6
zenith6 / ItemSearchWithClass.php
Last active January 3, 2016 16:29
API_ItemSearch の検索結果に商品規格も含めるように拡張したAPIです。 data/downloads/api 以下に配置して下さい。
<?php
/*
* This file is part of EC-CUBE
*
* Copyright(c) 2000-2013 LOCKON CO.,LTD. All Rights Reserved.
*
* http://www.lockon.co.jp/
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License