From 96d2531821c13a5962b09a5b130d93c8d8b8a987 Mon Sep 17 00:00:00 2001 From: donncha Date: Mon, 29 Aug 2005 12:10:12 +0000 Subject: Removed Smarty stuff git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@249 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- .../smarty-plugins/function.lastposts.php | 66 ---------------------- 1 file changed, 66 deletions(-) delete mode 100644 wp-inst/wp-content/smarty-plugins/function.lastposts.php (limited to 'wp-inst/wp-content/smarty-plugins/function.lastposts.php') diff --git a/wp-inst/wp-content/smarty-plugins/function.lastposts.php b/wp-inst/wp-content/smarty-plugins/function.lastposts.php deleted file mode 100644 index 60da376..0000000 --- a/wp-inst/wp-content/smarty-plugins/function.lastposts.php +++ /dev/null @@ -1,66 +0,0 @@ -posts." - WHERE unix_timestamp( post_date ) < unix_timestamp( NOW() ) - AND post_status = 'publish' - ORDER BY `post_date` DESC LIMIT 0, ".intval( $posts ); - $result = $wpdb->get_results( $query ); - if( $result ) - { - foreach( $result as $details ) - { - $postdata[ $details->ID ] = stripslashes( strip_tags( $details->post_title ) ); - } - - return $postdata; - } - else - { - return false; - } -} - -function smarty_function_lastposts($params, &$smarty) -{ - - global $wpblog; - - $posts = 10; - extract($params); - - if( $posts > 40 ) - $posts = 40; - - if( @include_once( "Cache/Function.php" ) ) - { - $cache = new Cache_Function( 'file', array('cache_dir' => ABSPATH . "/wp-content/smarty-cache", 'filename_prefix' => 'lastposts_cache_' ), 600 ); - $lastposts = $cache->call( "getposts", $wpblog, $posts ); - } - else - { - $lastposts = getposts( $wpblog, $posts ); - } - - $smarty->assign( "lastposts", $lastposts ); -} - -/* vim: set expandtab: */ - -?> -- cgit