mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-05-13 23:26:29 +02:00
Adding station_type, category and text-cms
This commit is contained in:
parent
47bf368903
commit
cc82e0856a
8 changed files with 136 additions and 40 deletions
|
@ -94,6 +94,13 @@ my $response = {
|
|||
}
|
||||
};
|
||||
|
||||
if($varenv{dbname} eq $dbt->{primary}->{sharee_primary}->{database}->{dbname}){
|
||||
$varenv{cms} = $dbt->fetch_cms($dbh,{ lang => $q->escapeHTML($R::lang) });
|
||||
}else{
|
||||
my $dbh_primary = $dbt->dbconnect_extern($dbt->{primary}->{sharee_primary}->{database}->{dbname});
|
||||
$varenv{cms} = $dbt->fetch_cms($dbh_primary,{ lang => $q->escapeHTML($R::lang) });
|
||||
}
|
||||
|
||||
my $aowner = 0;
|
||||
my $coo = $q->param('authcookie') || $q->param('sessionid') || "";
|
||||
if(!$coo && !$q->param('merchant_id')){
|
||||
|
@ -478,7 +485,7 @@ elsif($q->param('request') eq "bikes_available"){
|
|||
my $authraw = {};
|
||||
($auth,$authraw) = $apif->auth_verify($q,"","",1);
|
||||
$response = { %$response, %$auth };
|
||||
#$bw->log("Y bikes_available by c_id $authraw->{c_id}, Tarif:",$authraw->{txt30},"");
|
||||
#$bw->log("Y bikes_available $varenv{dbname} by c_id $authraw->{c_id}, Tarif: $authraw->{txt30}",$authraw->{txt30},"");
|
||||
|
||||
if($varenv{syshost} eq "shareeapp-sx"){
|
||||
($response->{bikes},my $return2copri->{bikes}) = $si->sig_available($q,\%varenv,$authraw);
|
||||
|
@ -683,17 +690,11 @@ elsif($q->param('request') eq "stations_available"){
|
|||
#App update message
|
||||
if($user_agent_subversion <= 348){
|
||||
if($epoch_now >= $epoch_start && $epoch_now <= $epoch_end){
|
||||
my $pref_ctu = {
|
||||
table => "contentuser",
|
||||
fetch => "one",
|
||||
ct_name => "App-update-message",
|
||||
};
|
||||
my $uadr = { c_id => 0 };
|
||||
$uadr = $dbt->fetch_tablerecord($dbh,$pref_ctu);
|
||||
$response->{merchant_message} = $uadr->{txt01};
|
||||
$response->{merchant_message} = $uadr->{txt02} if($q->param('lang') eq "en");
|
||||
$response->{merchant_message} = $varenv{cms}->{'App-update-message'}->{txt};
|
||||
}else{
|
||||
$response->{merchant_message} = $varenv{cms}->{'App-update-message-expired'}->{txt};
|
||||
$apif->authout($q,$coo);
|
||||
$dbt->update_operatorsloop($varenv{dbname},$authraw->{c_id},"update");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -920,6 +921,8 @@ elsif($q->param('request') eq "service_done"){
|
|||
|
||||
($response_work, $node) = $apif->service_work($pos_record,$stations_allraw,"",$node_template);
|
||||
}
|
||||
#should not be mandatory here, maybe only for bike_count
|
||||
#$apif->stations_caching($q,\%varenv,$authraw);
|
||||
|
||||
#inject oprefix
|
||||
my $op_response_work = {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue