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

Ignore:
Timestamp:
Jan 7, 2009, 9:10:00 PM (12 years ago)
Author:
ebihara
Message:

#3388:changed the opConfig class implements ArrayAccess? now, and it allows accessing like array from templates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE3/trunk/lib/form/SnsConfigForm.class.php

    r10020 r10025  
    2525    $defaults = array();
    2626
    27     foreach (sfConfig::get('openpne_sns_config') as $key => $value) {
    28       $default = $value['default'];
    29       $config = SnsConfigPeer::retrieveByName($key);
    30       if ($config) {
    31         $default = $config->getValue();
    32       }
    33 
     27    foreach (sfConfig::get('openpne_sns_config') as $key => $value)
     28    {
    3429      $widgets[$key] = $this->generateWidget($value);
    3530      $validators[$key] = $this->generateValidator($value);
    3631      $labels[$key] = $value['caption'];
    37       $defaults[$key] = opConfig::get($key, 'sns', $default);
     32      $defaults[$key] = opConfig::get($key);
    3833    }
    3934
Note: See TracChangeset for help on using the changeset viewer.