プロジェクト

全般

プロフィール

Bug(バグ) #2850

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

Yuya Watanabe約12年前に追加. 約12年前に更新.

ステータス:
Fixed(完了)
優先度:
Normal(通常)
担当者:
対象バージョン:
開始日:
2012-02-28
期日:
進捗率:

100%

3.6 で発生するか:
Yes (はい)
[QA]バグ通知済:
いいえ
3.8 で発生するか:
Unknown (未調査)

説明

概要

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

原因

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

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

lib/opMessagePluginObserver.class.php

 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     }

修正案

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']);

関連するチケット

関連している OpenPNE 3 - Bug(バグ) #550: Typo in community config: "policy" is misspelled "poricy" (コミュニティ設定で policy を poricy と間違っている箇所がある) Fixed(完了) 2010-01-31

関係しているリビジョン

リビジョン dd3328a0 (差分)
Maki Takahashi約12年前に追加

(fixes #2850) fixed typo that changed "register poricy" to "register policy"

履歴

#1 Yuya Watanabe約12年前に更新

  • 説明 を更新 (diff)

#2 Maki Takahashi約12年前に更新

  • ステータスNew(新規) から Accepted(着手) に変更
  • 担当者Maki Takahashi にセット

#3 Maki Takahashi約12年前に更新

  • ステータスAccepted(着手) から Pending Review(レビュー待ち) に変更
  • 進捗率0 から 50 に変更

更新履歴 dd3328a0ec25cb4351efe2b9a279394a1f906a80 で適用されました。

#4 Yuya Watanabe約12年前に更新

  • ステータスPending Review(レビュー待ち) から Pending Testing(テスト待ち) に変更
  • 進捗率50 から 70 に変更

レビューOKです.

#5 Yuma Sakata約12年前に更新

  • ステータスPending Testing(テスト待ち) から Fixed(完了) に変更
  • 進捗率70 から 100 に変更

テストOKです。

他の形式にエクスポート: Atom PDF