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

Changeset 10259


Ignore:
Timestamp:
Jan 20, 2009, 7:03:56 PM (11 years ago)
Author:
nagasawa
Message:

#3285:fixed can't blank of blog url, and changed input form size

Location:
OpenPNE3/plugins/opBlogPlugin/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE3/plugins/opBlogPlugin/trunk/config/member_config.yml

    r10229 r10259  
    77    FormType:   "input"
    88    ValueType:  "blog_url"
    9     IsRegist:   true
     9    IsRegist:   false
    1010    IsConfig:   true
    1111    IsUnique:   false
  • OpenPNE3/plugins/opBlogPlugin/trunk/lib/form/MemberConfigForm/MemberConfigBlogUrlForm.class.php

    r10229 r10259  
    2626    if ($name === 'blog_url')
    2727    {
     28      $this->widgetSchema['blog_url']->setAttributes(array('size' => 69));
    2829      $this->mergePostValidator(new sfValidatorCallback(array(
    2930        'callback'  => array($this, 'validate'),
     
    3637  public function validate($validator, $value)
    3738  {
    38     $root = BlogPeer::getXmlByUrl($value['blog_url']);
    39     if (!BlogPeer::getFeedType($root))
     39    if ($value['blog_url'] !== "")
    4040    {
    41       throw new sfValidatorError($validator, 'URL is invalid');
     41      $root = BlogPeer::getXmlByUrl($value['blog_url']);
     42      if (!BlogPeer::getFeedType($root))
     43      {
     44        throw new sfValidatorError($validator, 'URL is invalid');
     45      }
    4246    }
    4347    return $value;
Note: See TracChangeset for help on using the changeset viewer.