Project

General

Profile

Backport(バックポート) #3973

#2316 「update symfony to 1.4.13 (同梱のsymfonyのバージョンを1.4.13へ上げる)」により一部修正が巻き戻ってしまっている.

Added by kaoru n about 3 years ago. Updated almost 3 years ago.

Status:
Fixed(完了)
Priority:
Normal(通常)
Target version:
Start date:
2016-07-26
Due date:
% Done:

100%


Description

概要

以下のチケット及びコミットが巻き戻ってしまっている.

#1565 「管理画面のSNS設定にアクセスできない(特定のモジュールのページにアクセスできない)」
f30b06229f8dbffc3a3a663f881df3776378c67d
10a1e4f16ae0532478db6495b2e87f9dcfee316f

巻き戻った原因のチケット及びコミットは以下のものである.

チケット: #2316 「update symfony to 1.4.13 (同梱のsymfonyのバージョンを1.4.13へ上げる) 」
64a72113b7cc6eaf39a21ac66efcfc8289354e0c

修正案

OpenPNE 内での lib/vendor 以下にあるライブラリのアップデート方法や独自パッチの管理方法を検討する必要がある.
とりあえず以下のパッチを利用することで本チケットの問題は解決できる.

  $ git diff 90716878b97e49424b0eb6a5fa69161771e06b2c...10a1e4f16ae0532478db6495b2e87f9dcfee316f lib/vendor/symfony/ > t1565.patch
  $ vim t1565.patch
  $ patch -p1 < t1565.patch

t1565.patch
diff --git a/lib/vendor/symfony/lib/request/sfWebRequest.class.php b/lib/vendor/symfony/lib/request/sfWebRequest.class.php
index c2205f6..0c817fd 100644
--- a/lib/vendor/symfony/lib/request/sfWebRequest.class.php
+++ b/lib/vendor/symfony/lib/request/sfWebRequest.class.php
@@ -239,8 +239,8 @@ class sfWebRequest extends sfRequest
   public function getPathInfo()
   {
     $pathInfo = '';
-
     $pathArray = $this->getPathInfoArray();
+    $isIis = (isset($pathArray['SERVER_SOFTWARE']) && false !== stripos($pathArray['SERVER_SOFTWARE'], 'iis'));

     // simulate PATH_INFO if needed
     $sf_path_info_key = $this->options['path_info_key'];
@@ -261,14 +261,14 @@ class sfWebRequest extends sfRequest
     else
     {
       $pathInfo = $pathArray[$sf_path_info_key];
-      if ($relativeUrlRoot = $this->getRelativeUrlRoot())
+      if ($isIis && $relativeUrlRoot = $this->getRelativeUrlRoot())
       {
         $pathInfo = preg_replace('/^'.str_replace('/', '\\/', $relativeUrlRoot).'\//', '', $pathInfo);
       }
     }

     // for IIS
-    if (isset($_SERVER['SERVER_SOFTWARE']) && false !== stripos($_SERVER['SERVER_SOFTWARE'], 'iis') && $pos = stripos($pathInfo, '.php'))
+    if ($isIis && $pos = stripos($pathInfo, '.php'))
     {
       $pathInfo = substr($pathInfo, $pos + 4);
     }


Related issues

Related to OpenPNE 3 - Bug(バグ) #2780: #2316 「update symfony to 1.4.13 (同梱のsymfonyのバージョンを1.4.13へ上げる)」により一部修正が巻き戻ってしまっている. Fixed(完了) 2012-02-07

Associated revisions

Revision d0c6c1f5 (diff)
Added by Yuya Watanabe about 3 years ago

(fixes #3973, BP from #2780) add patch to symfony-1.4.13 and repatch #1565 to symfony for avoding http://trac.symfony-project.org/ticket/9061 problem

(cherry picked from commit 732ca6fe5c6cebc36d0e7bc82d236d1f7ce209f7)

Revision cdf99818
Added by kaoru n almost 3 years ago

Merge pull request #342 from upsilon/t-3973

(fixes #3973, BP from #2780) add patch to symfony-1.4.13 and repatch #1565 to symfony for avoding http://trac.symfony-project.org/ticket/9061 problem

History

#1 Updated by kaoru n about 3 years ago

  • Related to Bug(バグ) #2780: #2316 「update symfony to 1.4.13 (同梱のsymfonyのバージョンを1.4.13へ上げる)」により一部修正が巻き戻ってしまっている. added

#2 Updated by Youichi Kimura about 3 years ago

  • Status changed from New(新規) to Pending Review(レビュー待ち)
  • Assignee set to Youichi Kimura
  • % Done changed from 0 to 50

下記の通り Pull Request を作成しました
https://github.com/openpne/OpenPNE3/pull/342

#3 Updated by Youichi Kimura about 3 years ago

  • Description updated (diff)

732ca6fe5c6cebc36d0e7bc82d236d1f7ce209f7 に合わせて手順を修正

#4 Updated by kaoru n about 3 years ago

  • Target version changed from OpenPNE 3.8.21 to OpenPNE 3.8.x

#5 Updated by Shinichi Urabe almost 3 years ago

  • Status changed from Pending Review(レビュー待ち) to Pending Testing(テスト待ち)
  • % Done changed from 50 to 70

#7 Updated by kaoru n almost 3 years ago

  • Target version changed from OpenPNE 3.8.x to OpenPNE 3.8.22

#8 Updated by Chiharu Nakajima almost 3 years ago

  • Status changed from Pending Testing(テスト待ち) to Pending Merge(マージ待ち)
  • % Done changed from 70 to 80

テストOKです

#9 Updated by kaoru n almost 3 years ago

  • Status changed from Pending Merge(マージ待ち) to Fixed(完了)
  • % Done changed from 80 to 100

マージしました

Also available in: Atom PDF