suppressing Notice messages and moving the use_cache setting higher in blog-header so that it actually gets used when getting settings
git-svn-id: http://svn.automattic.com/wordpress/trunk@677 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d33dda0bbb
commit
a392bb19d3
|
@ -1,5 +1,7 @@
|
|||
<?php
|
||||
|
||||
$use_cache = 1; // No reason not to
|
||||
|
||||
/* Including config and functions files */
|
||||
$curpath = dirname(__FILE__).'/';
|
||||
|
||||
|
@ -45,7 +47,6 @@ $archive_mode = get_settings('archive_mode');
|
|||
$dateformat = stripslashes(get_settings('date_format'));
|
||||
$timeformat = stripslashes(get_settings('time_format'));
|
||||
$time_difference = get_settings('time_difference');
|
||||
$use_cache = 1; // No reason not to
|
||||
$use_gzipcompression = get_settings('gzipcompression');
|
||||
|
||||
/* First let's clear some variables */
|
||||
|
|
|
@ -553,7 +553,9 @@ function get_settings($setting) {
|
|||
if (!isset($settings->$setting)) {
|
||||
error_log("get_settings: Didn't find setting $setting");
|
||||
}
|
||||
return $settings->$setting;
|
||||
else {
|
||||
return $settings->$setting;
|
||||
}
|
||||
}
|
||||
|
||||
function get_alloptions() {
|
||||
|
|
|
@ -129,9 +129,9 @@ function wp_title($sep = '»', $display = true) {
|
|||
}
|
||||
|
||||
// Send it out
|
||||
if ($display && $title) {
|
||||
if ($display && isset($title)) {
|
||||
echo " $sep $title";
|
||||
} elseif (!$display && $title) {
|
||||
} elseif (!$display && isset($title)) {
|
||||
return " $sep $title";
|
||||
}
|
||||
}
|
||||
|
@ -304,7 +304,9 @@ function get_calendar($daylength = 1) {
|
|||
return;
|
||||
}
|
||||
|
||||
$w = ''.intval($HTTP_GET_VARS['w']);
|
||||
if (isset($HTTP_GET_VARS['w'])) {
|
||||
$w = ''.intval($HTTP_GET_VARS['w']);
|
||||
}
|
||||
$time_difference = get_settings('time_difference');
|
||||
|
||||
// Let's figure out when we are
|
||||
|
@ -419,6 +421,7 @@ function get_calendar($daylength = 1) {
|
|||
);
|
||||
if ($ak_post_titles) {
|
||||
foreach ($ak_post_titles as $ak_post_title) {
|
||||
$ak_titles_for_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));
|
||||
} else {
|
||||
|
@ -434,7 +437,7 @@ function get_calendar($daylength = 1) {
|
|||
|
||||
$daysinmonth = intval(date('t', $unixmonth));
|
||||
for ($day = 1; $day <= $daysinmonth; ++$day) {
|
||||
if ($newrow)
|
||||
if (isset($newrow) && $newrow)
|
||||
echo "\n\t</tr>\n\t<tr>\n\t\t";
|
||||
$newrow = false;
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
var $debug_called;
|
||||
var $vardump_called;
|
||||
var $show_errors = true;
|
||||
var $querycount;
|
||||
|
||||
// ==================================================================
|
||||
// DB Constructor - connects to the server and selects a database
|
||||
|
@ -44,6 +45,7 @@
|
|||
|
||||
|
||||
$this->select($dbname);
|
||||
$this->querycount = 0;
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue