PEAK XOOPS - Found 1 Coming Events Bug in englishin japanese

Found 1 Coming Events Bug

  • You cannot open a new topic into this forum
  • Guests cannot post into this forum
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
Previous post - Next post | Parent - Children.1 | Posted on 2004/2/8 19:08
GIJOE  ÀèǤ·³Áâ   Posts: 4110
Chado さんこんにちは。

調査とご報告ありがとうございました。

ちょっと今、本当に忙しくて、とても調べている時間がないのですが、必ず後で調べます。

(英語で書くのも辛いので、いきなり日本語で失礼します)
Votes:4 Average:5.00
Previous post - Next post | Parent - No child | Posted on 2004/2/9 1:01
chado  °ìÅùʼ   Posts: 14
Hello GiJoe,

No problem! Please take your time.

無理をしないで下さい!!

チャド
Votes:0 Average:0.00
Previous post - Next post | Parent - No child | Posted on 2004/2/9 18:08
GIJOE  ÀèǤ·³Áâ   Posts: 4110
hi Chado.

This patch is correct.
Since this function is also called by another blocks,
I don't apply your codes as is.
But your suggestion is indeed useful for me.

Thank you!
Votes:0 Average:0.00

  Advanced search


Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!