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
|
<?php
|
||||||
|
|
||||||
|
$use_cache = 1; // No reason not to
|
||||||
|
|
||||||
/* Including config and functions files */
|
/* Including config and functions files */
|
||||||
$curpath = dirname(__FILE__).'/';
|
$curpath = dirname(__FILE__).'/';
|
||||||
|
|
||||||
|
@ -45,7 +47,6 @@ $archive_mode = get_settings('archive_mode');
|
||||||
$dateformat = stripslashes(get_settings('date_format'));
|
$dateformat = stripslashes(get_settings('date_format'));
|
||||||
$timeformat = stripslashes(get_settings('time_format'));
|
$timeformat = stripslashes(get_settings('time_format'));
|
||||||
$time_difference = get_settings('time_difference');
|
$time_difference = get_settings('time_difference');
|
||||||
$use_cache = 1; // No reason not to
|
|
||||||
$use_gzipcompression = get_settings('gzipcompression');
|
$use_gzipcompression = get_settings('gzipcompression');
|
||||||
|
|
||||||
/* First let's clear some variables */
|
/* First let's clear some variables */
|
||||||
|
|
|
@ -553,7 +553,9 @@ function get_settings($setting) {
|
||||||
if (!isset($settings->$setting)) {
|
if (!isset($settings->$setting)) {
|
||||||
error_log("get_settings: Didn't find setting $setting");
|
error_log("get_settings: Didn't find setting $setting");
|
||||||
}
|
}
|
||||||
return $settings->$setting;
|
else {
|
||||||
|
return $settings->$setting;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_alloptions() {
|
function get_alloptions() {
|
||||||
|
|
|
@ -129,9 +129,9 @@ function wp_title($sep = '»', $display = true) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send it out
|
// Send it out
|
||||||
if ($display && $title) {
|
if ($display && isset($title)) {
|
||||||
echo " $sep $title";
|
echo " $sep $title";
|
||||||
} elseif (!$display && $title) {
|
} elseif (!$display && isset($title)) {
|
||||||
return " $sep $title";
|
return " $sep $title";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -304,7 +304,9 @@ function get_calendar($daylength = 1) {
|
||||||
return;
|
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');
|
$time_difference = get_settings('time_difference');
|
||||||
|
|
||||||
// Let's figure out when we are
|
// Let's figure out when we are
|
||||||
|
@ -419,6 +421,7 @@ function get_calendar($daylength = 1) {
|
||||||
);
|
);
|
||||||
if ($ak_post_titles) {
|
if ($ak_post_titles) {
|
||||||
foreach ($ak_post_titles as $ak_post_title) {
|
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
|
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 {
|
||||||
|
@ -434,7 +437,7 @@ function get_calendar($daylength = 1) {
|
||||||
|
|
||||||
$daysinmonth = intval(date('t', $unixmonth));
|
$daysinmonth = intval(date('t', $unixmonth));
|
||||||
for ($day = 1; $day <= $daysinmonth; ++$day) {
|
for ($day = 1; $day <= $daysinmonth; ++$day) {
|
||||||
if ($newrow)
|
if (isset($newrow) && $newrow)
|
||||||
echo "\n\t</tr>\n\t<tr>\n\t\t";
|
echo "\n\t</tr>\n\t<tr>\n\t\t";
|
||||||
$newrow = false;
|
$newrow = false;
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
var $debug_called;
|
var $debug_called;
|
||||||
var $vardump_called;
|
var $vardump_called;
|
||||||
var $show_errors = true;
|
var $show_errors = true;
|
||||||
|
var $querycount;
|
||||||
|
|
||||||
// ==================================================================
|
// ==================================================================
|
||||||
// DB Constructor - connects to the server and selects a database
|
// DB Constructor - connects to the server and selects a database
|
||||||
|
@ -44,6 +45,7 @@
|
||||||
|
|
||||||
|
|
||||||
$this->select($dbname);
|
$this->select($dbname);
|
||||||
|
$this->querycount = 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue