Skip to content

Commit

Permalink
派生クラス側を使っていない箇所を修正
Browse files Browse the repository at this point in the history
基底クラス側を呼んでしまっているので、派生クラス側(class_extends側)を使うように修正。
  • Loading branch information
3tiles committed Oct 21, 2019
1 parent 4be7f30 commit 11480d9
Show file tree
Hide file tree
Showing 16 changed files with 36 additions and 36 deletions.
2 changes: 1 addition & 1 deletion data/class/pages/admin/basis/LC_Page_Admin_Basis_Tax.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function init()
$this->arrTAXCALCRULE = $masterData->getMasterData('mtb_taxrule');

//適用時刻の項目値設定
$this->objDate = new SC_Date();
$this->objDate = new SC_Date_Ex();
//適用時間の年を、「現在年~現在年+2」の範囲に設定
for ($year=date("Y"); $year<=date("Y") + 2;$year++) {
$arrYear[$year] = $year;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public function lfGetProduct($category_id)
// FIXME SC_Product クラスを使用した実装
$objQuery = SC_Query_Ex::getSingletonInstance();
$col = 'alldtl.product_id, name, main_list_image, product_code_min, product_code_max, status';
$objProduct = new SC_Product();
$objProduct = new SC_Product_Ex();
$table = $objProduct->alldtlSQL();
$table.= ' LEFT JOIN dtb_product_categories AS T5 ON alldtl.product_id = T5.product_id';
$where = 'del_flg = 0 AND category_id = ?';
Expand Down
6 changes: 3 additions & 3 deletions data/class/pages/admin/total/LC_Page_Admin_Total.php
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ public function lfGetGraphLine($arrResults, $keyname, $type, $xtitle, $ytitle, $
if ($interval < 1) {
$interval = 1;
}
$objGraphLine = new SC_Graph_Line();
$objGraphLine = new SC_Graph_Line_Ex();

// 値のセット
$objGraphLine->setData($arrList);
Expand Down Expand Up @@ -380,7 +380,7 @@ public function lfGetGraphPie($arrResults, $keyname, $type, $title = '', $sdate
$pngname = $this->lfGetGraphPng($type);
$path = GRAPH_REALDIR . $pngname;

$objGraphPie = new SC_Graph_Pie();
$objGraphPie = new SC_Graph_Pie_Ex();

// データをセットする
$objGraphPie->setData($arrList);
Expand Down Expand Up @@ -431,7 +431,7 @@ public function lfGetGraphBar($arrResults, $keyname, $type, $xtitle, $ytitle, $s
$pngname = $this->lfGetGraphPng($type);
$path = GRAPH_REALDIR . $pngname;

$objGraphBar = new SC_Graph_Bar();
$objGraphBar = new SC_Graph_Bar_Ex();

foreach ($arrList as $key => $value) {
$arrKey[] = preg_replace('/~/u', '-', $key);
Expand Down
2 changes: 1 addition & 1 deletion data/class/pages/mypage/LC_Page_Mypage_History.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public function action()
$objPurchase->cancelPendingOrder(PENDING_ORDER_CANCEL_FLAG);

$objCustomer = new SC_Customer_Ex();
$objProduct = new SC_Product();
$objProduct = new SC_Product_Ex();

if (!SC_Utils_Ex::sfIsInt($_GET['order_id'])) {
SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR);
Expand Down
12 changes: 6 additions & 6 deletions html/install/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@
$objView = new SC_InstallView_Ex($ownDir . 'templates', $ownDir . 'temp');

// パラメーター管理クラス
$objWebParam = new SC_FormParam();
$objDBParam = new SC_FormParam();
$objWebParam = new SC_FormParam_Ex();
$objDBParam = new SC_FormParam_Ex();
// パラメーター情報の初期化
$objWebParam = lfInitWebParam($objWebParam);
$objDBParam = lfInitDBParam($objDBParam);
Expand Down Expand Up @@ -579,7 +579,7 @@ function lfDispComplete($objPage)
$sqlval['mypage_tpl'] = 'default1';
$sqlval['update_date'] = 'CURRENT_TIMESTAMP';
$sqlval['country_id'] = DEFAULT_COUNTRY_ID;
$objQuery = new SC_Query($arrDsn);
$objQuery = new SC_Query_Ex($arrDsn);
$cnt = $objQuery->count('dtb_baseinfo');
if ($cnt > 0) {
$objQuery->update('dtb_baseinfo', $sqlval);
Expand Down Expand Up @@ -649,7 +649,7 @@ function lfInitWebParam($objWebParam)

// 店名、管理者メールアドレスを取得する。(再インストール時)
if (defined('DEFAULT_DSN')) {
$objQuery = new SC_Query();
$objQuery = new SC_Query_Ex();
$tables = $objQuery->listTables();

if (!PEAR::isError($tables) && in_array('dtb_baseinfo', $tables)) {
Expand Down Expand Up @@ -766,7 +766,7 @@ function lfCheckWebError($objWebParam)
{
// 入力データを渡す。
$arrRet = $objWebParam->getHashArray();
$objErr = new SC_CheckError($arrRet);
$objErr = new SC_CheckError_Ex($arrRet);
$objErr->arrErr = $objWebParam->checkError();

// ディレクトリ名のみ取得する
Expand Down Expand Up @@ -809,7 +809,7 @@ function lfCheckDBError($objDBParam)
// 入力データを渡す。
$arrRet = $objDBParam->getHashArray();

$objErr = new SC_CheckError($arrRet);
$objErr = new SC_CheckError_Ex($arrRet);
$objErr->arrErr = $objDBParam->checkError();

if (count($objErr->arrErr) == 0) {
Expand Down
4 changes: 2 additions & 2 deletions tests/class/SC_DisplayTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function testSetPreviewURL()
$_SERVER['REQUEST_URI'] = '/cart';
$this->objDisplay->setPrevURL();

$objCartSession = new SC_CartSession();
$objCartSession = new SC_CartSession_Ex();
$this->assertEquals('/cart', $objCartSession->getPrevURL());
}

Expand All @@ -57,7 +57,7 @@ public function testSetDevice()

public function testPrepareWithAdmin()
{
$objPage = new LC_Page_Admin_Index();
$objPage = new LC_Page_Admin_Index_Ex();
$objPage->setTemplate(__DIR__.'/../../data/Smarty/templates/admin/home.tpl');
$this->objDisplay->prepare($objPage, true);

Expand Down
2 changes: 1 addition & 1 deletion tests/class/SC_UploadFileTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ protected function setUp()
foreach ([$this->saveDir, $this->tempDir] as $dir) {
mkdir($dir, 0777, true);
}
$this->objUpFile = new SC_UploadFile($this->tempDir, $this->saveDir);
$this->objUpFile = new SC_UploadFile_Ex($this->tempDir, $this->saveDir);
copy(IMAGE_SAVE_REALDIR.'ice500.jpg', $this->tempDir.'/ice500.jpg');

$_FILES = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ protected function tearDown()
public function testCleanupSession__カートとセッションの配送情報が削除される()
{
// 引数の準備
$helper = new SC_Helper_Purchase();
$cartSession = new SC_CartSession();
$customer = new SC_Customer();
$helper = new SC_Helper_Purchase_Ex();
$cartSession = new SC_CartSession_Ex();
$customer = new SC_Customer_Ex();

// 削除前のデータを設定
$cartSession->addProduct($this->product_class_id1, 5); // product_type_id=1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function testClearShipmentItem_配送先ID未指定の場合_全ての配
{
$this->setUpShipping($this->getMultipleShipping());

$helper = new SC_Helper_Purchase();
$helper = new SC_Helper_Purchase_Ex();
$helper->clearShipmentItemTemp(); // default:null

$this->expected = array('00001'=>null, '00002'=>null, '00003'=>null);
Expand All @@ -64,7 +64,7 @@ public function testClearShipmentItem_配送先ID指定の場合_指定したID
{
$this->setUpShipping($this->getMultipleShipping());

$helper = new SC_Helper_Purchase();
$helper = new SC_Helper_Purchase_Ex();
$helper->clearShipmentItemTemp('00001');

$this->expected = array('00001'=>null, '00002'=>array('商品2'), '00003'=>array());
Expand All @@ -79,7 +79,7 @@ public function testClearShipmentItem_存在しないIDを指定した場合_何
{
$this->setUpShipping($this->getMultipleShipping());

$helper = new SC_Helper_Purchase();
$helper = new SC_Helper_Purchase_Ex();
$helper->clearShipmentItemTemp('00004');

$this->expected = array('00001'=>array('商品1'), '00002'=>array('商品2'), '00003'=>array());
Expand All @@ -96,7 +96,7 @@ public function testClearShipmentItem_商品情報が配列でない場合_何
// 内容を配列でないように変更
$_SESSION['shipping']['00001'] = 'temp';

$helper = new SC_Helper_Purchase();
$helper = new SC_Helper_Purchase_Ex();
$helper->clearShipmentItemTemp('00001');

// '00001'は配列でないので全体を取得
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class SC_Helper_Purchase_copyFromCustomerTest extends SC_Helper_Purchase_TestBas
protected function setUp()
{
parent::setUp();
$this->customer = new SC_Customer();
$this->customer = new SC_Customer_Ex();
$this->customer->setValue('customer_id', '1001');
$this->customer->setValue('name01', '姓01');
$this->customer->setValue('name02', '名01');
Expand Down Expand Up @@ -77,7 +77,7 @@ public function testCopyFromCustomer_ログインしていない場合_何もし
User_Utils::setLoginState(FALSE, $this->customer_array, $this->objQuery);

$this->expected = array();
$helper = new SC_Helper_Purchase();
$helper = new SC_Helper_Purchase_Ex();
$helper->copyFromCustomer($dest, $this->customer);
$this->actual = $dest;

Expand Down Expand Up @@ -118,7 +118,7 @@ public function testCopyFromCustomer_モバイルの場合_モバイルのメー
'order_company_name' => '',
'order_zipcode' => ''
);
$helper = new SC_Helper_Purchase();
$helper = new SC_Helper_Purchase_Ex();
$helper->copyFromCustomer($dest, $this->customer);
$this->actual = $dest;

Expand All @@ -140,7 +140,7 @@ public function testCopyFromCustomer_モバイルかつモバイルのメール
'customer_id' => '1001',
'update_date' => 'CURRENT_TIMESTAMP'
);
$helper = new SC_Helper_Purchase();
$helper = new SC_Helper_Purchase_Ex();
$helper->copyFromCustomer($dest, $this->customer, $prefix, $keys);
$this->actual = $dest;

Expand All @@ -163,7 +163,7 @@ public function testCopyFromCustomer_モバイルでない場合_通常のメー
'customer_id' => '1001',
'update_date' => 'CURRENT_TIMESTAMP'
);
$helper = new SC_Helper_Purchase();
$helper = new SC_Helper_Purchase_Ex();
$helper->copyFromCustomer($dest, $this->customer, $prefix, $keys);
$this->actual = $dest;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function testCopyFromOrder_全てデフォルト設定にした場合_デ
'shipping_fax02' => '2345',
'shipping_fax03' => '6789'
);
$helper = new SC_Helper_Purchase();
$helper = new SC_Helper_Purchase_Ex();
$helper->copyFromOrder($dest, $src);
$this->actual = $dest;

Expand All @@ -106,7 +106,7 @@ public function testCopyFromOrder_接頭辞・キーを設定した場合_指定
'output_name01' => '',
'output_name02' => ''
);
$helper = new SC_Helper_Purchase();
$helper = new SC_Helper_Purchase_Ex();
$helper->copyFromOrder($dest, $src, 'output', 'input', array('name01', 'name02'));
$this->actual = $dest;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ protected function tearDown()
/////////////////////////////////////////
public function testExtractShipping__予め指定されたキーだけが抽出される()
{
$helper = new SC_Helper_Purchase();
$helper = new SC_Helper_Purchase_Ex();
$helper->arrShippingKey = array('id', 'name', 'code');
$arrSrc = array(
'shipping_id' => '1001',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function testGetShippings_存在しない受注IDを指定した場合_
$order_id = '100'; // 存在しないID

$this->expected = array();
$helper = new SC_Helper_Purchase();
$helper = new SC_Helper_Purchase_Ex();
$this->actual = $helper->getShippings($order_id);

$this->verify('配送情報');
Expand All @@ -75,7 +75,7 @@ public function testGetShippings_存在する受注IDを指定した場合_結
);
$this->expected['shipment_item_count'] = 3;

$helper = new SC_Helper_Purchase();
$helper = new SC_Helper_Purchase_Ex();
$result = $helper->getShippings($order_id);

$this->actual['count'] = count($result);
Expand All @@ -100,7 +100,7 @@ public function testGetShippings_商品取得フラグをOFFにした場合_結
);
$this->expected['shipment_item_count'] = 0;

$helper = new SC_Helper_Purchase();
$helper = new SC_Helper_Purchase_Ex();
$result = $helper->getShippings($order_id, false);
$this->actual['count'] = count($result);
// shipping_idごとの配列になっているのでshipping_idで抽出
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ protected function setUp()
$_SESSION['shipping']['1001']['shipment_item'] = array(
'1001' => array('productsClass' => array('price02' => 9000))
);
$this->helper = new SC_Helper_Purchase();
$this->helper = new SC_Helper_Purchase_Ex();
}

protected function tearDown()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ protected function setUp()
$this->order_ids = $this->setUpOrder($this->customer_ids);
$this->order_temp_ids = $this->setUpOrderTemp($this->order_ids);

$this->helper = new SC_Helper_Purchase();
$this->helper = new SC_Helper_Purchase_Ex();
}

protected function tearDown()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ protected function tearDown()
{
parent::tearDown();
// ロケールを初期化する
$initial = new SC_Initial();
$initial = new SC_Initial_Ex();
$initial->phpconfigInit();
}

Expand Down

0 comments on commit 11480d9

Please sign in to comment.