Show
Ignore:
Timestamp:
05/31/08 19:47:28 (6 months ago)
Author:
hsbt
Message:

change some conditional branch.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • platform/tdiary/plugin/livedoor_weather.rb

    r3325 r12913  
    66# You can redistribute it and/or modify it under GPL2. 
    77# 
     8 
    89require 'open-uri' 
    910require 'timeout' 
     
    7980        cache = "#{@cache_path}/lwws" 
    8081 
    81         if date == nil 
     82        unless date 
    8283                file_name = "#{cache}/#{convert_date( date_status)}.xml" # file_name is YYYYMMDD 
    8384        else 
     
    9798                result << %Q|<div class=\"lwws\">| 
    9899 
    99                 if @conf['lwws.icon.disp'] != "t" || @conf.mobile_agent? then 
     100                if @conf['lwws.icon.disp'] != "t" or @conf.mobile_agent? then 
    100101                        result << %Q|<a href="#{h(detail_url)}">#{telop}</a>| 
    101102                else 
     
    108109                end 
    109110 
    110                 if @conf['lwws.max_temp.disp'] == "t" then 
    111                         unless max_temp == nil 
    112                                 result << %Q| #{@lwws_max_temp_label}:#{h(max_temp)}#{@celsius_label}| 
    113                         end 
    114                 end 
    115                 if @conf['lwws.min_temp.disp'] == "t" then 
    116                         unless min_temp == nil 
    117                                 result << %Q| #{@lwws_min_temp_label}:#{h(min_temp)}#{@celsius_label}| 
    118                         end 
     111                if @conf['lwws.max_temp.disp'] == "t" and not max_temp.nil? then 
     112                        result << %Q| #{@lwws_max_temp_label}:#{h(max_temp)}#{@celsius_label}| 
     113                end 
     114 
     115                if @conf['lwws.min_temp.disp'] == "t" and not min_temp.nil? then 
     116                        result << %Q| #{@lwws_min_temp_label}:#{h(min_temp)}#{@celsius_label}| 
    119117                end 
    120118