Project

General

Profile

Backport(バックポート) #2781

Updated by Yuya Watanabe over 9 years ago

h3. 概要

以下のチケット及びコミットが巻き戻ってしまっている. (タイトルはバックポート元との関連を壊さないために変更せず)

#1026 「Add option not to recreate DB to openpne:install (openpne:install 時に DB を作り直さないオプションを追加する)」
commit:c65b9aa68adeefe685535abb1d116fd08fb8c70e
#1579 「管理画面のSNS設定にアクセスできない(特定のモジュールのページにアクセスできない)」の修正が巻き戻ってしまっている.

具体的には以下のコミットがなくなってしまっている.


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


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

チケット: #2317 「update symfony to 1.4.13 (同梱のsymfonyのバージョンを1.4.13へ上げる) 」
commit:1212428db9bf200a61771a998f0e922ab2f54fa2

h3. 修正案

OpenPNE 内での lib/vendor 以下にあるライブラリのアップデート方法や独自パッチの管理方法を検討する必要がある.
とりあえず以下のパッチを利用することで本チケットの問題は解決できる.
<pre>
$ git diff 901694eda4a4aaebc0c32353c4cdc0e763ca0813...10a1e4f16ae0532478db6495b2e87f9dcfee316f lib/vendor/symfony/ > t2781.patch
$
patch -p1 -p0 -d . < t2781.patch
</pre>
t2780.patch t2781.patch
<pre>
diff --git a/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Export.php b/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Export.php -crN lib/request/sfWebRequest.class.php lib/vendor/symfony/lib/request/sfWebRequest.class.php
index c1e4ef7..02c6e81 100644 *** lib/vendor/symfony/lib/request/sfWebRequest.class.php
--- a/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Export.php lib/vendor/symfony/lib/request/sfWebRequest.class.php
+++ b/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Export.php ***************
@@ -148,7 +148,7 @@ class Doctrine_Export extends Doctrine_Connection_Module
*/
*** 239,246 ****
public function dropForeignKey($table, $name)
getPathInfo()
{
- return $this->dropConstraint($table, $name);
+ return $this->dropConstraint($table, $this->conn->formatter->getForeignKeyName($name));
}

/**
@@ -1386,4 +1386,4 @@ class Doctrine_Export extends Doctrine_Connection_Module
}
}
}
-}
\ No newline at end of file
+}
diff --git a/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Export/Mysql.php b/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Export/Mysql.php
index f6e3207..1eea651 100644
--- a/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Export/Mysql.php
+++ b/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Export/Mysql.php
@@ -777,8 +777,8 @@ class Doctrine_Export_Mysql extends Doctrine_Export
public function dropForeignKey($table, $name)
{
$table

$pathInfo
= $this->conn->quoteIdentifier($table); '';
- $name
$pathArray
= $this->conn->quoteIdentifier($name);
+ $name
$this->getPathInfoArray();

// simulate PATH_INFO if needed
$sf_path_info_key
= $this->conn->quoteIdentifier($this->conn->formatter->getForeignKeyName($name));

return $this->conn->exec('ALTER TABLE ' . $table . ' DROP FOREIGN KEY ' . $name);
}
$this->options['path_info_key'];
-}
\ No newline at end of file
+}
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
239,246 ----
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
***************
*** 261,274 ****
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'))
{
$pathInfo = substr($pathInfo, $pos + 4);
}

+ --- 261,274 ----
else
{
$pathInfo = $pathArray[$sf_path_info_key];
!
if ($isIis && $relativeUrlRoot = $this->getRelativeUrlRoot())
{
$pathInfo = preg_replace('/^'.str_replace('/', '\\/', $relativeUrlRoot).'\//', '', $pathInfo);
}
}

// for IIS
! if ($isIis &&
$pos = stripos($pathInfo, '.php'))

{

$pathInfo = substr($pathInfo, $pos + 4);

}
</pre>

Back