Some E_ALL fixes.
git-svn-id: http://svn.automattic.com/wordpress/trunk@1235 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d2a76674e1
commit
b4a0d174d8
|
@ -499,10 +499,10 @@ if ($posts) {
|
||||||
$mval = $metarow['meta_value'];
|
$mval = $metarow['meta_value'];
|
||||||
|
|
||||||
// Force subkeys to be array type:
|
// 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();
|
$post_meta_cache[$mpid] = array();
|
||||||
if (!is_array($post_meta_cache[$mpid][$mkey]))
|
if (!isset($post_meta_cache[$mpid]["$mkey"]) || !is_array($post_meta_cache[$mpid]["$mkey"]))
|
||||||
$post_meta_cache[$mpid][$mkey] = array();
|
$post_meta_cache[$mpid]["$mkey"] = array();
|
||||||
|
|
||||||
// Add a value to the current pid/key:
|
// Add a value to the current pid/key:
|
||||||
$post_meta_cache[$mpid][$mkey][] = $mval;
|
$post_meta_cache[$mpid][$mkey][] = $mval;
|
||||||
|
|
|
@ -163,6 +163,8 @@ function user_pass_ok($user_login,$user_pass) {
|
||||||
function get_currentuserinfo() { // a bit like get_userdata(), on steroids
|
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;
|
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
|
// *** retrieving user's data from cookies and db - no spoofing
|
||||||
|
|
||||||
|
if (isset($_COOKIE['wordpressuser_' . $cookiehash]))
|
||||||
$user_login = $_COOKIE['wordpressuser_' . $cookiehash];
|
$user_login = $_COOKIE['wordpressuser_' . $cookiehash];
|
||||||
$userdata = get_userdatabylogin($user_login);
|
$userdata = get_userdatabylogin($user_login);
|
||||||
$user_level = $userdata->user_level;
|
$user_level = $userdata->user_level;
|
||||||
|
|
|
@ -123,6 +123,8 @@ function get_links($category = -1, $before = '', $after = '<br />',
|
||||||
}
|
}
|
||||||
if (get_settings('links_recently_updated_time')) {
|
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 ";
|
$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) {
|
if ($show_updated) {
|
||||||
$get_updated = ", UNIX_TIMESTAMP(link_updated) AS link_updated_f ";
|
$get_updated = ", UNIX_TIMESTAMP(link_updated) AS link_updated_f ";
|
||||||
|
@ -167,6 +169,7 @@ function get_links($category = -1, $before = '', $after = '<br />',
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
foreach ($results as $row) {
|
foreach ($results as $row) {
|
||||||
|
if (!isset($row->recently_updated)) $row->recently_updated = false;
|
||||||
echo($before);
|
echo($before);
|
||||||
if ($show_updated && $row->recently_updated) {
|
if ($show_updated && $row->recently_updated) {
|
||||||
echo get_settings('links_recently_updated_prepend');
|
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':
|
// if 'name' wasn't specified, assume 'id':
|
||||||
$cat_order = ('name' == $order) ? 'cat_name' : 'cat_id';
|
$cat_order = ('name' == $order) ? 'cat_name' : 'cat_id';
|
||||||
|
|
||||||
|
if (!isset($direction)) $direction = '';
|
||||||
// Fetch the link category data as an array of hashes
|
// Fetch the link category data as an array of hashesa
|
||||||
$cats = $wpdb->get_results("
|
$cats = $wpdb->get_results("
|
||||||
SELECT DISTINCT link_category, cat_name, show_images,
|
SELECT DISTINCT link_category, cat_name, show_images,
|
||||||
show_description, show_rating, show_updated, sort_order,
|
show_description, show_rating, show_updated, sort_order,
|
||||||
|
|
|
@ -264,8 +264,8 @@ function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_orde
|
||||||
$file = get_settings('home') . '/' . get_settings('blogfilename');
|
$file = get_settings('home') . '/' . get_settings('blogfilename');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$exclusions = '';
|
||||||
if (!empty($exclude)) {
|
if (!empty($exclude)) {
|
||||||
$exclusions = ''; // initialize for safety
|
|
||||||
$excats = preg_split('/[\s,]+/',$exclude);
|
$excats = preg_split('/[\s,]+/',$exclude);
|
||||||
if (count($excats)) {
|
if (count($excats)) {
|
||||||
foreach ($excats as $excat) {
|
foreach ($excats as $excat) {
|
||||||
|
@ -326,7 +326,7 @@ function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_orde
|
||||||
$thelist = "";
|
$thelist = "";
|
||||||
|
|
||||||
foreach ($categories as $category) {
|
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++;
|
$num_found++;
|
||||||
$link = '<a href="'.get_category_link(0, $category->cat_ID, $category->category_nicename).'" ';
|
$link = '<a href="'.get_category_link(0, $category->cat_ID, $category->category_nicename).'" ';
|
||||||
if ($use_desc_for_title == 0 || empty($category->category_description)) {
|
if ($use_desc_for_title == 0 || empty($category->category_description)) {
|
||||||
|
@ -395,6 +395,8 @@ function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_orde
|
||||||
if ($list && $child_of && $num_found && $recurse) {
|
if ($list && $child_of && $num_found && $recurse) {
|
||||||
$pre = "\t\t<ul class='children'>";
|
$pre = "\t\t<ul class='children'>";
|
||||||
$post = "\t\t</ul>\n";
|
$post = "\t\t</ul>\n";
|
||||||
|
} else {
|
||||||
|
$pre = $post = '';
|
||||||
}
|
}
|
||||||
$thelist = $pre . $thelist . $post;
|
$thelist = $pre . $thelist . $post;
|
||||||
if ($recurse) {
|
if ($recurse) {
|
||||||
|
|
|
@ -441,7 +441,7 @@ function get_calendar($daylength = 1) {
|
||||||
$ak_titles_for_day['day_'.$ak_post_title->dom] = '';
|
$ak_titles_for_day['day_'.$ak_post_title->dom] = '';
|
||||||
}
|
}
|
||||||
if (empty($ak_titles_for_day["$ak_post_title->dom"])) { // first one
|
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 {
|
} else {
|
||||||
$ak_titles_for_day["$ak_post_title->dom"] .= $ak_title_separator . htmlspecialchars(stripslashes($ak_post_title->post_title));
|
$ak_titles_for_day["$ak_post_title->dom"] .= $ak_title_separator . htmlspecialchars(stripslashes($ak_post_title->post_title));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
if (! $feed) {
|
if (!isset($feed)) {
|
||||||
$blog = 1;
|
$blog = 1;
|
||||||
$doing_rss = 1;
|
$doing_rss = 1;
|
||||||
require('wp-blog-header.php');
|
require('wp-blog-header.php');
|
||||||
|
|
Loading…
Reference in New Issue