Show
Ignore:
Timestamp:
07/18/08 14:41:50 (4 months ago)
Author:
chrisjdavis
Message:

Forgot to add the closing singlequote for the uniquness check.

Files:
1 modified

Legend:

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

    r681 r682  
    11<?php 
    2  
    3 require 'simplepie.php'; 
    42require 'idna_convert.php'; 
    53 
     
    5553                // need to figure out what schema changes are needed for postgreSQL 
    5654            break;   
    57     } 
    58 } 
     55        } 
     56         
     57        $this->add_template('lifestream_template', dirname(__FILE__) . '/lifestream_template.php'); 
     58         
     59    } 
    5960     
    6061    public function filter_rewrite_rules( $rules ) { 
     
    137138    public function insert( $entries = array() ) { 
    138139        foreach( $entries as $entry) { 
    139             $check= DB::get_results( "SELECT ID FROM " . DB::table( 'l_data' ) . " WHERE link= ". $entry['link'] ); 
     140            $check= DB::get_results( "SELECT ID FROM " . DB::table( 'l_data' ) . " WHERE link= '" . $entry['link'] . '"' ); 
    140141            if( !$check ) { 
    141142                DB::insert( DB::table( 'l_data' ), $entry ); 
     
    212213         
    213214        $offset = $vars['page'] * Options::get('lifestream__perpage'); 
    214          
     215             
    215216        $this->theme->assign( 'lifestream', LifeStream::get_entries($vars['type'], $offset, Options::get('lifestream__perpage')) ); 
    216217        $this->theme->assign( 'title', 'Lifestream - ' . Options::get( 'title' ) ); 
    217218        $this->theme->assign( 'streams', $this->config->stream ); 
    218219        $this->theme->display( 'lifestream' ); 
     220        $this->$theme->fetch( 'lifestream_template' ); 
    219221    } 
    220222     
     
    239241            } 
    240242        } 
    241  
    242243        LifeStream::insert( $this->stream_contents ); 
    243          
    244244        return $this->stream_contents; 
    245245    }