Changeset 682 for plugins/lifestream/trunk/lifestream.plugin.php
- Timestamp:
- 07/18/08 14:41:50 (4 months ago)
- Files:
-
- 1 modified
-
plugins/lifestream/trunk/lifestream.plugin.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
plugins/lifestream/trunk/lifestream.plugin.php
r681 r682 1 1 <?php 2 3 require 'simplepie.php';4 2 require 'idna_convert.php'; 5 3 … … 55 53 // need to figure out what schema changes are needed for postgreSQL 56 54 break; 57 } 58 } 55 } 56 57 $this->add_template('lifestream_template', dirname(__FILE__) . '/lifestream_template.php'); 58 59 } 59 60 60 61 public function filter_rewrite_rules( $rules ) { … … 137 138 public function insert( $entries = array() ) { 138 139 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'] . '"' ); 140 141 if( !$check ) { 141 142 DB::insert( DB::table( 'l_data' ), $entry ); … … 212 213 213 214 $offset = $vars['page'] * Options::get('lifestream__perpage'); 214 215 215 216 $this->theme->assign( 'lifestream', LifeStream::get_entries($vars['type'], $offset, Options::get('lifestream__perpage')) ); 216 217 $this->theme->assign( 'title', 'Lifestream - ' . Options::get( 'title' ) ); 217 218 $this->theme->assign( 'streams', $this->config->stream ); 218 219 $this->theme->display( 'lifestream' ); 220 $this->$theme->fetch( 'lifestream_template' ); 219 221 } 220 222 … … 239 241 } 240 242 } 241 242 243 LifeStream::insert( $this->stream_contents ); 243 244 244 return $this->stream_contents; 245 245 }
