Changeset 675

Show
Ignore:
Timestamp:
2008-07-15 13:51:43 (8 weeks ago)
Author:
arthus
Message:

Plugin:lifestream Added check for type to time/date

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • plugins/lifestream/trunk/lifestream.plugin.php

    r674 r675  
    145145        $query.= 'SELECT * FROM ' . DB::table('l_data'); 
    146146         
    147         if($type != 'any') { 
     147        if($type != 'any' && $start == null && $end == null) { 
    148148            $query.= " WHERE name= '$type'"; 
    149149        } 
     
    151151        if($start != null && $end != null) { 
    152152            $query.= " WHERE date BETWEEN $start AND $end"; 
    153         } 
     153            if($type != 'any') { 
     154                $query.= " AND name= '$type'"; 
     155            } 
     156        } 
     157         
     158        Utils::debug($query); 
    154159         
    155160        $query.= ' ORDER BY date DESC';