exclude pos template on bikes_all

This commit is contained in:
Rainer Gümpelein 2022-03-01 10:25:13 +01:00
parent 39c28a9711
commit f6668094fd
5 changed files with 31 additions and 63 deletions

View file

@ -340,8 +340,14 @@ sub service_select {
fetch => "all",
catch => "content_contentpos",
keyfield => "c_id",
template_id => "$node_template->{template_id}",
};
#Because of different contentpos.template_id in Flot Service we use it only on all others else bikes_all requests
if($q->param('request') ne "bikes_all"){
$pref->{template_id} = "$node_template->{template_id}";
}
if(looks_like_number($q->param('service_id'))){
$pref->{c_id} = "=::" . $q->escapeHTML($q->param('service_id'));
}elsif(looks_like_number($service_id)){
@ -688,7 +694,8 @@ sub service_work {
my $users_map = $dbt->users_map($dbh,"");#get all serviceAPP users (also without service key)
my $channel_map = $dbt->channel_map();
my @tpl_order = split /,/,$node_template->{tpl_order};
my @tpl_order = ();
@tpl_order = split /,/,$node_template->{tpl_order} if(ref($node_template) eq "HASH" && $node_template->{tpl_order});
#because of different templates we need template grouping
#not safe, pos template_id have to be defined before any service has done!
@ -2073,13 +2080,11 @@ sub auth_verify(){
template_id => "202",
txt05 => "like::" . "%" . $q->escapeHTML($cgi_authcookie) . "%",
};
my $auth_primary = { c_id => 0 };
my $auth_operator = { c_id => 0 };
$auth_operator = $dbt->fetch_record($dbh,$authref);
$bw->log("auth_verified on operator $varenv{dbname} anchor 1",$auth_operator->{c_id},"");
my $auth_primary = { c_id => 0 };
my $auth_operator = { c_id => 0 };
#just part of operator-routing (sharee account management)
if($varenv{dbname} ne "sharee_primary"){
#primary select
@ -2096,7 +2101,7 @@ sub auth_verify(){
#first, save operator array which are used
my %operator_hash = ();#local DB
$bw->log("booking_request auth_verified by dbname $varenv{dbname}",$auth_operator->{c_id},"");
$bw->log("booking_request auth_verified by dbname $varenv{dbname}",$auth_primary->{c_id},"");
print FILE "booking_request auth_verified by dbname $varenv{dbname} | pri $auth_primary->{c_id}\n if($debug)";
if($auth_primary->{txt17} && $auth_primary->{txt17} =~ /\w\s\w/){#append DB's
@ -2194,10 +2199,10 @@ sub auth_verify(){
}else{# if($auth_primary->{c_id}) fails
$bw->log("auth_verified on primary anchor 4 FAILS by dbname $varenv{dbname}.",$auth_primary->{c_id},"");
print FILE "auth_verified on primary anchor 4 FAILS by dbname $varenv{dbname} | pri $auth_primary->{c_id}\n" if($debug);
$auth_operator = $dbt->fetch_record($dbh,$authref);
$record = $auth_operator;
$bw->log("auth_verified on operator anchor 9 by dbname $varenv{dbname}.",$auth_operator->{c_id},"");
print FILE "auth_verified on operator anchor 9 by dbname $varenv{dbname} | op $auth_operator->{c_id}\n" if($debug);
#$auth_operator = $dbt->fetch_record($dbh,$authref);
#$record = $auth_operator;
#$bw->log("auth_verified on operator anchor 9 by dbname $varenv{dbname}.",$auth_operator->{c_id},"");
#print FILE "auth_verified on operator anchor 9 by dbname $varenv{dbname} | op $auth_operator->{c_id}\n" if($debug);
}
}else{# if($varenv{dbname} eq "sharee_primary")
$auth_primary = $dbt->fetch_record($dbh,$authref);