Some E_ALL fixes.

git-svn-id: http://svn.automattic.com/wordpress/trunk@1235 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2004-05-05 21:29:23 +00:00
parent d2a76674e1
commit b4a0d174d8
6 changed files with 20 additions and 13 deletions

View File

@ -499,10 +499,10 @@ if ($posts) {
$mval = $metarow['meta_value'];
// Force subkeys to be array type:
if (!is_array($post_meta_cache[$mpid]))
if (!isset($post_meta_cache[$mpid]) || !is_array($post_meta_cache[$mpid]))
$post_meta_cache[$mpid] = array();
if (!is_array($post_meta_cache[$mpid][$mkey]))
$post_meta_cache[$mpid][$mkey] = array();
if (!isset($post_meta_cache[$mpid]["$mkey"]) || !is_array($post_meta_cache[$mpid]["$mkey"]))
$post_meta_cache[$mpid]["$mkey"] = array();
// Add a value to the current pid/key:
$post_meta_cache[$mpid][$mkey][] = $mval;

View File

@ -163,7 +163,9 @@ function user_pass_ok($user_login,$user_pass) {
function get_currentuserinfo() { // a bit like get_userdata(), on steroids
global $user_login, $userdata, $user_level, $user_ID, $user_nickname, $user_email, $user_url, $user_pass_md5, $cookiehash;
// *** retrieving user's data from cookies and db - no spoofing
$user_login = $_COOKIE['wordpressuser_' . $cookiehash];
if (isset($_COOKIE['wordpressuser_' . $cookiehash]))
$user_login = $_COOKIE['wordpressuser_' . $cookiehash];
$userdata = get_userdatabylogin($user_login);
$user_level = $userdata->user_level;
$user_ID = $userdata->ID;

View File

@ -123,7 +123,9 @@ function get_links($category = -1, $before = '', $after = '<br />',
}
if (get_settings('links_recently_updated_time')) {
$recently_updated_test = ", IF (DATE_ADD(link_updated, INTERVAL ".get_settings('links_recently_updated_time')." MINUTE) >= NOW(), 1,0) as recently_updated ";
}
} else {
$recently_updated_test = '';
}
if ($show_updated) {
$get_updated = ", UNIX_TIMESTAMP(link_updated) AS link_updated_f ";
}
@ -167,6 +169,7 @@ function get_links($category = -1, $before = '', $after = '<br />',
return;
}
foreach ($results as $row) {
if (!isset($row->recently_updated)) $row->recently_updated = false;
echo($before);
if ($show_updated && $row->recently_updated) {
echo get_settings('links_recently_updated_prepend');
@ -533,8 +536,8 @@ function get_links_list($order = 'name', $hide_if_empty = 'obsolete') {
// if 'name' wasn't specified, assume 'id':
$cat_order = ('name' == $order) ? 'cat_name' : 'cat_id';
// Fetch the link category data as an array of hashes
if (!isset($direction)) $direction = '';
// Fetch the link category data as an array of hashesa
$cats = $wpdb->get_results("
SELECT DISTINCT link_category, cat_name, show_images,
show_description, show_rating, show_updated, sort_order,

View File

@ -264,8 +264,8 @@ function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_orde
$file = get_settings('home') . '/' . get_settings('blogfilename');
}
$exclusions = '';
if (!empty($exclude)) {
$exclusions = ''; // initialize for safety
$excats = preg_split('/[\s,]+/',$exclude);
if (count($excats)) {
foreach ($excats as $excat) {
@ -326,7 +326,7 @@ function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_orde
$thelist = "";
foreach ($categories as $category) {
if ((intval($hide_empty) == 0 || $category_posts["$category->cat_ID"] > 0) && (!$children || $category->category_parent == $child_of)) {
if ((intval($hide_empty) == 0 || isset($category_posts["$category->cat_ID"])) && (!$children || $category->category_parent == $child_of)) {
$num_found++;
$link = '<a href="'.get_category_link(0, $category->cat_ID, $category->category_nicename).'" ';
if ($use_desc_for_title == 0 || empty($category->category_description)) {
@ -395,8 +395,10 @@ function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_orde
if ($list && $child_of && $num_found && $recurse) {
$pre = "\t\t<ul class='children'>";
$post = "\t\t</ul>\n";
}
$thelist=$pre.$thelist.$post;
} else {
$pre = $post = '';
}
$thelist = $pre . $thelist . $post;
if ($recurse) {
return $thelist;
}

View File

@ -441,7 +441,7 @@ function get_calendar($daylength = 1) {
$ak_titles_for_day['day_'.$ak_post_title->dom] = '';
}
if (empty($ak_titles_for_day["$ak_post_title->dom"])) { // first one
$ak_titles_for_day["$ak_post_title->dom"] .= htmlspecialchars(stripslashes($ak_post_title->post_title));
$ak_titles_for_day["$ak_post_title->dom"] = htmlspecialchars(stripslashes($ak_post_title->post_title));
} else {
$ak_titles_for_day["$ak_post_title->dom"] .= $ak_title_separator . htmlspecialchars(stripslashes($ak_post_title->post_title));
}

View File

@ -1,5 +1,5 @@
<?php
if (! $feed) {
if (!isset($feed)) {
$blog = 1;
$doing_rss = 1;
require('wp-blog-header.php');