Skip to content

Commit

Permalink
SC_CartSession::setPrevURL() の呼び出しを削除する EC-CUBE#805
Browse files Browse the repository at this point in the history
  • Loading branch information
seasoftjapan committed Dec 29, 2023
1 parent c438132 commit 4aa5ac3
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 32 deletions.
5 changes: 0 additions & 5 deletions data/class/SC_AdminView.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@

class SC_AdminView extends SC_View_Ex
{
public function __construct()
{
parent::__construct();
}

public function init()
{
parent::init();
Expand Down
12 changes: 10 additions & 2 deletions data/class/SC_CartSession.php
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,11 @@ public function addProduct($product_class_id, $quantity)
}
}

// 前頁のURLを記録しておく
/**
* 前頁のURLを記録しておく
*
* @deprecated 2.18.0 本体では呼ばれない。
*/
public function setPrevURL($url, $excludePaths = array())
{
// 前頁として記録しないページを指定する。
Expand All @@ -301,7 +305,11 @@ public function setPrevURL($url, $excludePaths = array())
}
}

// 前頁のURLを取得する
/**
* 前頁のURLを取得する
*
* @deprecated 2.18.0 本体では利用していない。
*/
public function getPrevURL()
{
return isset($_SESSION['prev_url']) ? $_SESSION['prev_url'] : '';
Expand Down
9 changes: 4 additions & 5 deletions data/class/SC_Display.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,16 @@ class SC_Display
* const('ADMIN',99);
*/

public function __construct($hasPrevURL = true)
public function __construct()
{
$this->response = new SC_Response_Ex();
if ($hasPrevURL) {
$this->setPrevURL();
}
}

/**
* @deprecated 2.18.0 本体では利用していない。
*/
public function setPrevURL()
{
// TODO SC_SiteSession で実装した方が良さげ
$objCartSess = new SC_CartSession_Ex();
$objCartSess->setPrevURL($_SERVER['REQUEST_URI']);
}
Expand Down
5 changes: 0 additions & 5 deletions data/class/SC_MobileView.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@
*/
class SC_MobileView extends SC_SiteView_Ex
{
public function __construct($setPrevURL = true)
{
parent::__construct($setPrevURL);
}

public function init()
{
parent::init();
Expand Down
12 changes: 3 additions & 9 deletions data/class/SC_SiteView.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,6 @@

class SC_SiteView extends SC_View_Ex
{
public function __construct($setPrevURL = true)
{
parent::__construct();

if ($setPrevURL) {
$this->setPrevURL();
}
}

public function init()
{
parent::init();
Expand All @@ -42,6 +33,9 @@ public function init()
$this->assignTemplatePath(DEVICE_TYPE_PC);
}

/**
* @deprecated 2.18.0 本体では利用していない。
*/
public function setPrevURL()
{
$objCartSess = new SC_CartSession_Ex();
Expand Down
5 changes: 0 additions & 5 deletions data/class/SC_SmartphoneView.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@

class SC_SmartphoneView extends SC_SiteView_Ex
{
public function __construct($setPrevURL = true)
{
parent::__construct($setPrevURL);
}

public function init()
{
parent::init();
Expand Down
1 change: 0 additions & 1 deletion data/class/pages/cart/LC_Page_Cart.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ public function action()
}

// 前頁のURLを取得
// TODO: SC_CartSession::setPrevURL()利用不可。
$this->lfGetCartPrevUrl($_SESSION, $_SERVER['HTTP_REFERER']);
$this->tpl_prev_url = (isset($_SESSION['cart_prev_url'])) ? $_SESSION['cart_prev_url'] : '';

Expand Down

0 comments on commit 4aa5ac3

Please sign in to comment.