プロジェクト

全般

プロフィール

Bug(バグ) #2850

Yuya Watanabe約12年前に更新

h3. 概要

「コミュニティ管理者の承認が必要」な状態でコミュニティ参加申請時(community/join?id=コミュニティID)を開いてもメッセージを記入するフォームが表示されない.

h3. 原因

OpenPNE 本体側での修正 #550 「Typo in community config: "policy" is misspelled "poricy" (コミュニティ設定で policy を poricy と間違っている箇所がある)」
でDBの列名が変更されたはずだが,opMessagePlugin ではまだ修正されていないため.

この修正は OpenPNE 3.5 以降のもののため, BP として 対応する必要はないはず.

lib/opMessagePluginObserver.class.php
<pre>
90 $community = $arguments['actionInstance']->community;
91 if ('close' !== $community->getConfig('register_poricy'))
92 {
93 return false;
94 }
...
111 else
112 {
113 $community = $arguments['actionInstance']->community;
114 if ('close' !== $community->getConfig('register_poricy'))
115 {
116 // Injected message field is not useful in this community
117 unset($arguments['actionInstance']->form['message']);
118 }
119 }
</pre>

h3. 修正案

<pre>
diff --git a/lib/opMessagePluginObserver.class.php b/lib/opMessagePluginObserver.class.php
index 287b680..7c4ef43 100644
--- a/lib/opMessagePluginObserver.class.php
+++ b/lib/opMessagePluginObserver.class.php
@@ -99,7 +99,7 @@ class opMessagePluginObserver
if ($arguments['result'] == sfView::SUCCESS)
{
$community = $arguments['actionInstance']->community;
- if ('close' !== $community->getConfig('register_poricy'))
+ if ('close' !== $community->getConfig('register_policy'))
{
return false;
}
@@ -122,7 +122,7 @@ class opMessagePluginObserver
else
{
$community = $arguments['actionInstance']->community;
- if ('close' !== $community->getConfig('register_poricy'))
+ if ('close' !== $community->getConfig('register_policy'))
{
// Injected message field is not useful in this community
unset($arguments['actionInstance']->form['message']);
</pre>

戻る