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

Changeset 9942


Ignore:
Timestamp:
Jan 6, 2009, 11:52:13 AM (14 years ago)
Author:
ebihara
Message:

changed member/config allows no categoryName

Location:
OpenPNE3/trunk/apps/pc_frontend/modules/member
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE3/trunk/apps/pc_frontend/modules/member/actions/actions.class.php

    r9880 r9942  
    8787  {
    8888    $this->categories = sfConfig::get('openpne_member_category');
    89     $this->categoryName = $request->getParameter('category', 'general');
    90     $this->forward404Unless(array_key_exists($this->categoryName, $this->categories), 'Undefined category');
    91 
    92     $formClass = 'MemberConfig'.ucfirst($this->categoryName).'Form';
    93     $this->form = new $formClass($this->getUser()->getMember());
     89    $this->categoryName = $request->getParameter('category', null);
     90    if ($this->categoryName)
     91    {
     92      $this->forward404Unless(array_key_exists($this->categoryName, $this->categories), 'Undefined category');
     93      $formClass = 'MemberConfig'.ucfirst($this->categoryName).'Form';
     94      $this->form = new $formClass($this->getUser()->getMember());
     95    }
    9496
    9597    if ($request->isMethod('post'))
  • OpenPNE3/trunk/apps/pc_frontend/modules/member/templates/configSuccess.php

    r9502 r9942  
    44foreach ($categories as $key => $value)
    55{
    6   $list[$key] = link_to($key, 'member/config?category='.$key);
     6  if (count($value))
     7  {
     8    $list[$key] = link_to($key, 'member/config?category='.$key);
     9  }
    710}
    811include_parts('pageNav', 'pagenavi', array('list' => $list, 'current' => $categoryName));
     
    1013<?php end_slot(); ?>
    1114
    12 <?php if (count($form)) : ?>
     15<?php if ($categoryName) : ?>
    1316<?php include_box('form'.$categoryName, $categoryName, '', array(
    1417  'form' => array($form),
    1518  'url' => 'member/config?category='.$categoryName)
    1619) ?>
     20<?php else: ?>
     21<?php include_box('configInformation', __('設定変更'), __('メニューから設定したい項目を選択してください。')); ?>
    1722<?php endif; ?>
Note: See TracChangeset for help on using the changeset viewer.