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

SC_CartSession::setPrevURL() の呼び出しを削除する #805 #807

Merged
merged 1 commit into from
Feb 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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
Loading