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

Changeset 9400


Ignore:
Timestamp:
Nov 27, 2008, 3:21:18 PM (11 years ago)
Author:
ebihara
Message:

#3156:fixed MemberConfig::savePre() is inserting not only to pc_address_pre but also to pc_address

File:
1 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE3/trunk/lib/model/MemberConfig.php

    r9391 r9400  
    1212  public function savePre()
    1313  {
     14    $this->getMember()->clearMemberConfigs();
     15
    1416    $name = $this->getName();
    15     if (strrpos($name, '_pre') === false) {
     17    if (strrpos($name, '_pre') === false)
     18    {
    1619      $name = $name.'_pre';
    1720    }
    1821
    1922    $pre = MemberConfigPeer::retrieveByNameAndMemberId($name, $this->getMemberId());
    20     if (!$pre) {
     23    if (!$pre)
     24    {
    2125      $pre = new self();
    2226      $pre->setName($name);
     
    3034  public function saveToken()
    3135  {
     36    $this->getMember()->clearMemberConfigs();
     37
    3238    $baseName = $this->getName();
    33     if (strrpos($baseName, '_pre')) {
     39    if (strrpos($baseName, '_pre'))
     40    {
    3441      $tokenName = str_replace('_pre', '_token', $baseName);
    35     } else {
     42    }
     43    else
     44    {
    3645      $tokenName = $baseName.'_token';
    3746    }
    3847
    3948    $pre = MemberConfigPeer::retrieveByNameAndMemberId($tokenName, $this->getMemberId());
    40     if (!$pre) {
     49    if (!$pre)
     50    {
    4151      $pre = new self();
    4252      $pre->setName($tokenName);
    4353      $pre->setMember($this->getMember());
    44     } else {
     54    }
     55    else
     56    {
    4557      $pre = MemberConfigPeer::retrieveByNameAndMemberId($tokenName, $this->getMemberId());
    4658    }
Note: See TracChangeset for help on using the changeset viewer.