Trick or Treat!

Lilith タスクリスト

filter_api.php

2008年08月18日 03時34分14秒 | 雑記
filter_api.phpに
$row で呼び出されている filter_get_bug_rowsがいる。

function filter_get_bug_rows( &$p_page_number, &$p_per_page, &$p_page_count, &$p_bug_count, $p_custom_filter = null, $p_project_id = null, $p_user_id = null, $p_show_sticky = null ) {
log_event( LOG_FILTERING, 'FILTERING: START NEW FILTER QUERY' );

この中では1140行らへんの # custom field filters 以降に処理が書かれているので
ここではなさそう。

さっきの$rowsを見くらべると
$rows =
filter_get_bug_rows ( $f_page_number, $t_per_page, $t_page_count, $t_bug_count, $c_filter[$t_box_title] );

function
filter_get_bug_rows( &$p_page_number, &$p_per_page, &$p_page_count, &$p_bug_count, $p_custom_filter = null, $p_project_id = null, $p_user_id = null, $p_show_sticky = null )

やはり、$c_filter[$t_box_title] );と$p_custom_filter = nullとで、ごにょってそうだ。

この辺を追いかければよいのかもしれない。
って追いかけてみると、

if ( $p_custom_filter === null ) {
# Prefer current_user_get_bug_filter() over user_get_filter() when applicable since it supports
# cookies set by previous version of the code.
if ( $t_user_id == $t_current_user_id ) {
$t_filter = current_user_get_bug_filter();
} else {
$t_filter = user_get_bug_filter( $t_user_id, $t_project_id );
}
} else {
$t_filter = $p_custom_filter;
}

どうやら、$t_filter = $p_custom_filter;に回されたようだ。
でもって、すぐその下にこの処理がある。

$t_filter = filter_ensure_valid_filter( $t_filter );

こいつを追いかけねばならぬ模様。

行き着いたのは3000行付近。
見事になんかやってるっぽい。

# Make sure that our filters are entirely correct and complete (it is possible that they are not).
# We need to do this to cover cases where we don't have complete control over the filters given.
function filter_ensure_valid_filter( $p_filter_arr ) {
# extend current filter to add information passed via POST

んでもって、処理を追いかけると

$t_custom_fields = custom_field_get_ids(); # @@@ (thraxisp) This should really be the linked ids, but we don't know the project
$f_custom_fields_data = array();
if ( is_array( $t_custom_fields ) && ( sizeof( $t_custom_fields ) > 0 ) ) {
foreach( $t_custom_fields as $t_cfid ) {
if ( is_array( gpc_get( 'custom_field_' . $t_cfid, null ) ) ) {
$f_custom_fields_data[$t_cfid] = gpc_get_string_array( 'custom_field_' . $t_cfid, META_FILTER_ANY );
} else {
$f_custom_fields_data[$t_cfid] = gpc_get_string( 'custom_field_' . $t_cfid, META_FILTER_ANY );
$f_custom_fields_data[$t_cfid] = array( $f_custom_fields_data[$t_cfid] );
}
}
}

ん?、どうやら、この辺が怪しそうだが…。
わけわからん


最新の画像もっと見る

コメントを投稿