PEAK XOOPS - Found 1 Coming Events Bug in englishin japanese

Found 1 Coming Events Bug

List posts in the topic

normal Found 1 Coming Events Bug

msg# 1
depth:
0
Previous post - Next post | Parent - Children.1 .2 | Posted on 2004/2/8 10:35
chado  一等兵   Posts: 14
Hello GiJoe,
As I mentioned in an earlier thread, I have been having problems with the coming events block showing events that have already finished. I solved the problem on my own site. It is in the function get_blockarray_coming_event in piCal_xoops.php file. Basically the $whr_term was set wrong and pulling in old (finished) events. It should be set to $whr_term = "end>'$now'" ;

Here is what I did - I just commented out parts. I don't know if this will cause problems for others, but it solved one of my problems.

function get_blockarray_coming_event( $get_target = '' , $num = 5 , $alt_disp = false )
{
	if( $get_target == '' ) $get_target = $_SERVER[ 'PHP_SELF' ] ;
	$now = $alt_disp ? time() : $this->unixtime ;

	// 時差を計算しつつ、WHERE節の期間に関する条件生成
	$tzoffset = ( $this->user_TZ - $this->server_TZ ) * 3600 ;
	//chad if( $tzoffset == 0 ) {
		// 時差がない場合 (MySQLに負荷をかけさせないため、ここで条件分けしとく)
		$whr_term = "end>'$now'" ;
	//chad } else {
		// 時差がある場合は、alldayによって場合分け
	//chad	$whr_term = "(allday AND end>'$now') OR ( ! allday AND end>'".($now - $tzoffset )."')" ;
	//chad}
Votes:1 Average:0.00

Posts tree

  Advanced search


Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!