Fix for weekly archive mode. Picks up correct month.
require -> require_once b2config.php -> wp-config.php git-svn-id: https://develop.svn.wordpress.org/trunk@213 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
5a0234aeda
commit
782855ea59
@ -51,16 +51,23 @@ $calendaremptycellcontent = ' ';
|
||||
/* stop customizing (unless you really know what you're doing) */
|
||||
|
||||
|
||||
require('b2config.php');
|
||||
require_once('wp-config.php');
|
||||
require_once($abspath.$b2inc.'/b2template.functions.php');
|
||||
require_once($abspath.$b2inc.'/b2functions.php');
|
||||
require_once($abspath.$b2inc.'/b2vars.php');
|
||||
|
||||
$w = $HTTP_GET_VARS['w'];
|
||||
|
||||
if (isset($calendar) && ($calendar != '')) {
|
||||
$thisyear = substr($calendar,0,4);
|
||||
$thismonth = substr($calendar,4,2);
|
||||
} else {
|
||||
if (isset($m) && ($m != '')) {
|
||||
if (isset($w) && ($w != '')) {
|
||||
$thisyear = substr($m,0,4);
|
||||
$w = ''.intval($w);
|
||||
$d = (($w - 1) * 7) + 6; //it seems mysqls weeks disagree with php's
|
||||
$thismonth = $wpdb->get_var("SELECT DATE_FORMAT((DATE_ADD('${thisyear}0101', INTERVAL $d DAY) ), '%m')");
|
||||
} else if (isset($m) && ($m != '')) {
|
||||
$calendar = substr($m,0,6);
|
||||
$thisyear = substr($m,0,4);
|
||||
if (strlen($m) < 6) {
|
||||
@ -201,9 +208,11 @@ if ($ak_use_tooltip_titles == 1) {
|
||||
$ak_days_result = $wpdb->get_results("SELECT post_title, post_date FROM $tableposts WHERE YEAR(post_date) = '$thisyear' AND MONTH(post_date) = '$thismonth' AND post_status = 'publish'");
|
||||
|
||||
$ak_day_title_array = array();
|
||||
if ($ak_days_result) {
|
||||
foreach($ak_days_result as $ak_temp) {
|
||||
$ak_day_title_array[] = $ak_temp;
|
||||
}
|
||||
}
|
||||
if (strstr($HTTP_SERVER_VARS["HTTP_USER_AGENT"], "MSIE")) {
|
||||
$ak_title_separator = "\n";
|
||||
$ak_trim = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user