プロジェクト

全般

プロフィール

Backport(バックポート) #2781

Yuya Watanabe約12年前に更新

h3. 概要

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

#1026 「Add option not to recreate DB to openpne:install (openpne:install 時に DB を作り直さないオプションを追加する)」
commit:c65b9aa68adeefe685535abb1d116fd08fb8c70e

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

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

チケット: #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
$ vim t2781.patch
$
patch -p1 < t2781.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
index c1e4ef7..02c6e81 100644
--- 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
@@ -148,7 +148,7 @@ class Doctrine_Export extends Doctrine_Connection_Module
*/
public function dropForeignKey($table, $name)
{
- 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 = $this->conn->quoteIdentifier($table);
- $name = $this->conn->quoteIdentifier($name);
+ $name = $this->conn->quoteIdentifier($this->conn->formatter->getForeignKeyName($name));

return $this->conn->exec('ALTER TABLE ' . $table . ' DROP FOREIGN KEY ' . $name);
}
-}
\ 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
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);
}
</pre>

戻る