Changeset 559
- Timestamp:
- 11/30/2003 12:55:19 AM (21 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/b2-include/b2functions.php
r558 r559 294 294 global $smilies_directory, $use_smilies; 295 295 global $b2_smiliessearch, $b2_smiliesreplace; 296 296 $output = ''; 297 297 if ($use_smilies) { 298 298 // HTML loop taken from texturize function, could possible be consolidated … … 301 301 for ($i = 0; $i < $stop; $i++) { 302 302 $content = $textarr[$i]; 303 if ( '<' != $content{0}) { // If it's not a tag303 if ((strlen($content) > 0) && ('<' != $content{0})) { // If it's not a tag 304 304 $content = str_replace($b2_smiliessearch, $b2_smiliesreplace, $content); 305 305 } … … 1629 1629 if (isset($b2_filter['all'])) { 1630 1630 $b2_filter['all'] = (is_string($b2_filter['all'])) ? array($b2_filter['all']) : $b2_filter['all']; 1631 $b2_filter[$tag] = array_merge($b2_filter['all'], $b2_filter[$tag]); 1631 if (isset($b2_filter[$tag])) 1632 $b2_filter[$tag] = array_merge($b2_filter['all'], $b2_filter[$tag]); 1633 else 1634 $b2_filter[$tag] = array_merge($b2_filter['all'], array()); 1632 1635 $b2_filter[$tag] = array_unique($b2_filter[$tag]); 1633 1636 } -
trunk/b2-include/b2template.functions.php
r558 r559 920 920 } 921 921 if ($cut) { 922 $excerpt = ''; 922 923 $blah = explode(' ', $output); 923 924 if (count($blah) > $cut) { … … 971 972 $use_dotdotdot = 0; 972 973 } 974 $excerpt = ''; 973 975 for ($i=0; $i<$k; $i++) { 974 976 $excerpt .= $blah[$i].' '; … … 1228 1230 $file = "$siteurl/$blogfilename"; 1229 1231 } 1232 if ('http:' != substr($file,0,5)) { 1233 $file = "$siteurl/$file"; 1234 } 1230 1235 $link = $file.$querystring_start.'cat'.$querystring_equal.$cat_ID; 1231 1236 if ($echo) -
trunk/b2comments.php
r558 r559 11 11 } 12 12 13 $comment_author = trim($HTTP_COOKIE_VARS["comment_author_".$cookiehash]);14 $comment_author_email = trim($HTTP_COOKIE_VARS["comment_author_email_".$cookiehash]);15 $comment_author_url = trim($HTTP_COOKIE_VARS["comment_author_url_".$cookiehash]);13 $comment_author = (isset($HTTP_COOKIE_VARS['comment_author_'.$cookiehash])) ? trim($HTTP_COOKIE_VARS['comment_author_'.$cookiehash]) : ''; 14 $comment_author_email = (isset($HTTP_COOKIE_VARS['comment_author_email_'.$cookiehash])) ? trim($HTTP_COOKIE_VARS['comment_author_email_'.$cookiehash]) : ''; 15 $comment_author_url = (isset($HTTP_COOKIE_VARS['comment_author_url_'.$cookiehash])) ? trim($HTTP_COOKIE_VARS['comment_author_url_'.$cookiehash]) : ''; 16 16 17 17 $comments = $wpdb->get_results("SELECT * FROM $tablecomments WHERE comment_post_ID = $id AND comment_approved = '1' ORDER BY comment_date"); -
trunk/blog.header.php
r558 r559 42 42 43 43 /* Getting settings from db */ 44 if ( $doing_rss == 1)44 if (isset($doing_rss) && $doing_rss == 1) 45 45 $posts_per_page=get_settings('posts_per_rss'); 46 if ( $posts_per_page == 0)46 if (!isset($posts_per_page) || $posts_per_page == 0) 47 47 $posts_per_page = get_settings('posts_per_page'); 48 48 $what_to_show = get_settings('what_to_show'); … … 62 62 if ($pagenow != 'wp-post.php') { timer_start(); } 63 63 64 if ( $showposts) {64 if (isset($showposts) && $showposts) { 65 65 $showposts = (int)$showposts; 66 66 $posts_per_page = $showposts; … … 289 289 290 290 // Get private posts 291 if ('' != intval($user_ID)) $where .= " OR post_author = $user_ID AND post_status != 'draft')"; else $where .= ')'; 291 if (isset($user_ID) && ('' != intval($user_ID))) 292 $where .= " OR post_author = $user_ID AND post_status != 'draft')"; 293 else 294 $where .= ')'; 292 295 $request = " SELECT $distinct * FROM $tableposts WHERE 1=1".$where." ORDER BY post_$orderby $limits"; 293 296 -
trunk/wp-rss.php
r558 r559 2 2 In every template you do, you got to copy them before the CafeLog 'loop' */ 3 3 $blog = 1; // enter your blog's ID 4 $doing_rss =1;4 $doing_rss = 1; 5 5 header('Content-type: text/xml',true); 6 6 include('blog.header.php'); … … 9 9 10 10 // Get the time of the most recent article 11 $sql = "SELECT max(post_date) FROM $tableposts"; 12 13 $maxdate = $wpdb->get_var($sql); 11 $maxdate = $wpdb->get_var("SELECT max(post_date) FROM $tableposts"); 14 12 ++$querycount; 15 13 $unixtime = strtotime($maxdate); 16 14 17 15 // format timestamp for Last-Modified header 18 $clast = gmdate("D, d M Y H:i:s \G\M\T", $unixtime);19 $cetag = md5($last);16 $clast = gmdate("D, d M Y H:i:s \G\M\T", $unixtime); 17 $cetag = (isset($last)) ? md5($last) : ''; 20 18 21 $slast = $_SERVER['HTTP_IF_MODIFIED_SINCE'];22 $setag = $_SERVER['HTTP_IF_NONE_MATCH'];19 $slast = (isset($_SERVER['HTTP_IF_MODIFIED_SINCE'])) ? $_SERVER['HTTP_IF_MODIFIED_SINCE'] : '' ; 20 $setag = (isset($_SERVER['HTTP_IF_NONE_MATCH'])) ? $_SERVER['HTTP_IF_NONE_MATCH'] : ''; 23 21 24 22 // send it in a Last-Modified header … … 33 31 // generated values. 34 32 //if (($slast?($slast == $clast):true) && ($setag?($setag == $cetag):true)){ 35 if (($slast && $setag)?(($slast == $clast) && ($setag == $cetag)):(($slast == $clast) || ($setag == $cetag))) { 36 header("HTTP/1.1 304 Not Modified"); 37 echo "\r\n\r\n"; 38 exit; 33 if (($slast != '') && ($setag != '')) { 34 if (($slast == $clast) && ($setag == $cetag)) { 35 header("HTTP/1.1 304 Not Modified"); 36 echo "\r\n\r\n"; 37 exit; 38 } else if (($slast == $clast) 39 || ($setag == $cetag)) { 40 header("HTTP/1.1 304 Not Modified"); 41 echo "\r\n\r\n"; 42 exit; 43 } 39 44 } 40 45 -
trunk/wp-settings.php
r542 r559 5 5 // get_settings() wherever these are needed OR 6 6 // accessing a single global $all_settings var 7 if (! $_wp_installing) {7 if (!isset($_wp_installing) || !$_wp_installing) { 8 8 $siteurl = get_settings('siteurl'); 9 9 // "When trying to design a foolproof system,
Note: See TracChangeset
for help on using the changeset viewer.