ここの情報は古いです。ご理解頂いた上でお取り扱いください。

Changeset 10604


Ignore:
Timestamp:
Feb 3, 2009, 1:04:06 PM (11 years ago)
Author:
ebihara
Message:

#3488:fixed SNS configuration doesn't complete successfully when a category is not selected

Location:
OpenPNE3/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE3/trunk/apps/pc_backend/modules/sns/actions/actions.class.php

    r10141 r10604  
    1515 * @subpackage sns
    1616 * @author     Kousuke Ebihara <ebihara@tejimaya.com>
    17  * @version    SVN: $Id: actions.class.php 9301 2008-05-27 01:08:46Z dwhittle $
    1817 */
    1918class snsActions extends sfActions
     
    2423  * @param sfRequest $request A request object
    2524  */
    26   public function executeConfig($request)
     25  public function executeConfig(sfWebRequest $request)
    2726  {
    28     $category = $request->getParameter('category', 'general');
    29     $this->form = new SnsConfigForm(array(), array('category' => $category));
     27    $this->category = $request->getParameter('category', 'general');
     28    $this->form = new SnsConfigForm(array(), array('category' => $this->category));
    3029    if ($request->isMethod('post'))
    3130    {
     
    3433      {
    3534        $this->form->save();
     35        $this->redirect('sns/config?category='.$this->category);
    3636      }
    3737    }
  • OpenPNE3/trunk/apps/pc_backend/modules/sns/templates/configSuccess.php

    r10043 r10604  
    33<?php end_slot() ?>
    44
    5 <h2><?php echo __('SNS設定') ?> (<?php echo $sf_request->getParameter('category', 'general') ?>)</h2>
     5<h2><?php echo __('SNS設定') ?> (<?php echo $category ?>)</h2>
    66
    77<p><?php echo __('※「設定変更」ボタンを押すと設定が反映されます。') ?></p>
    88
    9 <?php if ($sf_params->get('category') === 'authentication') : ?>
     9<?php if ($category === 'authentication') : ?>
    1010<p><?php echo __('※認証に関する個別の設定は、「プラグイン設定」からおこなってください。') ?></p>
    1111<?php endif; ?>
    1212
    13 <form action="<?php echo url_for('sns/config?category='.$sf_params->get('category')) ?>" method="post">
     13<form action="<?php echo url_for('sns/config?category='.$category) ?>" method="post">
    1414<table>
    1515<?php echo $form ?>
  • OpenPNE3/trunk/test/functional/pc_backend/snsActionsTest.php

    r10603 r10604  
    1818  ->info('A category is not selected, admin user can change the general configuration.')
    1919  ->get('/sns/config')
    20   ->click('設定変更', array('sns_config' => array(
    21     'sns_name'           => 'Super MySNS',
    22     'sns_title'          => 'Super MySNS - Come on join us! -',
    23     'admin_mail_address' => 'admin@example.com',
    24     'enable_pc'          => 1,
    25     'enable_mobile'      => 1,
    26   )))
     20  ->click('設定変更')
    2721  ->isStatusCode(302)
    2822
    2923  ->info('A general category is selected, admin user can change the general configuration.')
    3024  ->get('/sns/config/category/general')
    31   ->click('設定変更', array('sns_config' => array(
    32     'sns_name'           => 'Super MySNS',
    33     'sns_title'          => 'Super MySNS - Come on join us! -',
    34     'admin_mail_address' => 'admin@example.com',
    35     'enable_pc'          => 1,
    36     'enable_mobile'      => 1,
    37   )))
     25  ->click('設定変更')
     26  ->isStatusCode(302)
     27
     28  ->info('An authentication category is selected, admin user can change the authentication configuration.')
     29  ->get('/sns/config/category/authentication')
     30  ->click('設定変更')
     31  ->isStatusCode(302)
     32
     33  ->info('A mobile category is selected, admin user can change the mobile configuration.')
     34  ->get('/sns/config/category/mobile')
     35  ->click('設定変更')
     36  ->isStatusCode(302)
     37
     38  ->info('A policy category is selected, admin user can change the policy configuration.')
     39  ->get('/sns/config/category/policy')
     40  ->click('設定変更')
    3841  ->isStatusCode(302)
    3942;
Note: See TracChangeset for help on using the changeset viewer.