Bug(バグ) #2780
Yuya Watanabe さんがほぼ13年前に更新
h3. 概要 以下のチケット及びコミットが巻き戻ってしまっている. #1565 「管理画面のSNS設定にアクセスできない(特定のモジュールのページにアクセスできない)」の修正が巻き戻ってしまっている. #1026 「Add option not to recreate DB to openpne:install (openpne:install 時に DB を作り直さないオプションを追加する)」 commit:c65b9aa68adeefe685535abb1d116fd08fb8c70e 具体的には以下のコミットがなくなってしまっている. #1565 「管理画面のSNS設定にアクセスできない(特定のモジュールのページにアクセスできない)」 commit:f30b06229f8dbffc3a3a663f881df3776378c67d commit:10a1e4f16ae0532478db6495b2e87f9dcfee316f 巻き戻った原因のチケット及びコミットは以下のものである. チケット: #2316 「update symfony to 1.4.13 (同梱のsymfonyのバージョンを1.4.13へ上げる) 」 commit:64a72113b7cc6eaf39a21ac66efcfc8289354e0c h3. 修正案 OpenPNE 内での lib/vendor 以下にあるライブラリのアップデート方法や独自パッチの管理方法を検討する必要がある. とりあえず以下のパッチを利用することで本チケットの問題は解決できる. <pre> $ git diff 901694eda4a4aaebc0c32353c4cdc0e763ca0813...10a1e4f16ae0532478db6495b2e87f9dcfee316f lib/vendor/symfony/ > t2780.patch $ patch -p1 -p0 -d . < t2780.patch </pre> t2780.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>