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

Changeset 9165


Ignore:
Timestamp:
Nov 15, 2008, 9:07:38 PM (11 years ago)
Author:
ebihara
Message:

#3155:changed some models for symfony1.2

Location:
OpenPNE3/branches/goto_1.2/lib
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE3/branches/goto_1.2/lib/form/SnsConfigForm.class.php

    r8770 r9165  
    1717    $defaults = array();
    1818
    19     foreach (OpenPNEConfig::loadConfigYaml() as $key => $value) {
     19    foreach (sfConfig::get('openpne_sns_config') as $key => $value) {
    2020      $default = $value['default'];
    2121      $config = SnsConfigPeer::retrieveByName($key);
     
    7272  public function save()
    7373  {
    74     $config = OpenPNEConfig::loadConfigYaml();
     74    $config = sfConfig::get('openpne_sns_config');
    7575    foreach ($this->getValues() as $key => $value) {
    7676      $snsConfig = SnsConfigPeer::retrieveByName($key);
  • OpenPNE3/branches/goto_1.2/lib/model/MemberProfile.php

    r8131 r9165  
    3232  }
    3333
    34   public function hydrateProfiles($rs)
     34  public function hydrateProfiles($row)
    3535  {
    3636    try {
    37       $col = parent::hydrate($rs);
    38       $this->name = $rs->getString($col+0);
    39       $this->caption = $rs->getString($col+1);
     37      $col = parent::hydrate($row);
     38      $this->name = $row[$col+0];
     39      $this->caption = $row[$col+1];
    4040    } catch (Exception $e) {
    4141      throw new PropelException("Error populating MemberProfile object", $e);
  • OpenPNE3/branches/goto_1.2/lib/model/MemberProfilePeer.php

    r8130 r9165  
    2626    $c->addAscendingOrderByColumn(ProfilePeer::SORT_ORDER);
    2727
    28     $rs = self::doSelectRS($c);
    29 
    30     while ($rs->next()) {
     28    $stmt = self::doSelectStmt($c);
     29    while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
    3130      $obj = new MemberProfile();
    32       $obj->hydrateProfiles($rs);
     31      $obj->hydrateProfiles($row);
    3332      $profiles[] = $obj;
    3433    }
  • OpenPNE3/branches/goto_1.2/lib/model/NaviPeer.php

    r8121 r9165  
    3434    $c->addGroupByColumn(self::TYPE);
    3535    $c->addAscendingOrderByColumn(self::ID);
    36     $rs = self::doSelectRS($c);
    37     while ($rs->next()) {
    38       $result[] = $rs->get(1);
     36    $stmt = self::doSelectStmt($c);
     37    while ($res = $stmt->fetchColumn(1)) {
     38      $result[] = $res;
    3939    }
    4040
  • OpenPNE3/branches/goto_1.2/lib/model/Profile.php

    r9161 r9165  
    1010class Profile extends BaseProfile
    1111{
    12 /*
    13   public function hydrate(ResultSet $rs, $startcol = 1)
     12        public function hydrate($row, $startcol = 0, $rehydrate = false)
    1413  {
    1514    $this->setCulture(sfContext::getInstance()->getUser()->getCulture());
    16     return parent::hydrate($rs, $startcol);
     15    return parent::hydrate($row, $startcol, $rehydrate);
    1716  }
    18 */
    1917}
Note: See TracChangeset for help on using the changeset viewer.