mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-05-13 15:16:38 +02:00
merchant_message and some cad fixes
This commit is contained in:
parent
cf476a2154
commit
76afd28578
8 changed files with 47 additions and 26 deletions
|
@ -18,7 +18,7 @@ use Apache2::Const -compile => qw(OK );
|
|||
use JSON;
|
||||
use Scalar::Util qw(looks_like_number);
|
||||
use Config::General;
|
||||
|
||||
use Time::Piece;
|
||||
use Lib::Config;
|
||||
use Mod::DBtank;
|
||||
use Mod::Basework;
|
||||
|
@ -665,7 +665,7 @@ elsif($q->param('request') eq "stations_available"){
|
|||
$user_agent_subversion = $3 if($user_agent =~ /3\.0\.(\d+)/);
|
||||
|
||||
#for tests only contributors with service-tour defined
|
||||
if($user_agent_subversion <= 398 && $authraw->{txt18} && $authraw->{c_id} =~ /$dbt->{copri_conf}->{contributors}/){
|
||||
if(1==2 && $user_agent_subversion <= 398 && $authraw->{txt18} && $authraw->{c_id} =~ /$dbt->{copri_conf}->{contributors}/){
|
||||
my $pref_ctu = {
|
||||
table => "contentuser",
|
||||
fetch => "one",
|
||||
|
@ -675,8 +675,24 @@ elsif($q->param('request') eq "stations_available"){
|
|||
$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} .= "\n\nWill be disabled --> debug contributor App version ($user_agent)";
|
||||
$response->{merchant_message} .= "\n\nWill be disabled --> debug contributor user_device (" . $q->param('user_device') . ")";
|
||||
}
|
||||
#bayern-maintanance-message
|
||||
my $lnow = strftime("%Y-%m-%d %H:%M:%S", localtime(time));
|
||||
my $localtime = Time::Piece->strptime($lnow, "%Y-%m-%d %H:%M:%S");
|
||||
my $epoch_now = $localtime->epoch;
|
||||
my $maintanance_start = Time::Piece->strptime("2023-02-16 21:00:00", "%Y-%m-%d %H:%M:%S");
|
||||
my $maintanance_end = Time::Piece->strptime("2023-02-17 03:00:00", "%Y-%m-%d %H:%M:%S");
|
||||
my $epoch_start = $maintanance_start->epoch;
|
||||
my $epoch_end = $maintanance_end->epoch;
|
||||
if(1==1 && $return_merchant->{merchant_id} eq $dbt->{appsframe}->{LastenradBayern}->{merchant_id} && $epoch_now >= $epoch_start && $epoch_now <= $epoch_end){
|
||||
my $pref_ctu = {
|
||||
table => "contentuser",
|
||||
fetch => "one",
|
||||
ct_name => "bayern-maintanance-message",
|
||||
};
|
||||
my $uadr = { c_id => 0 };
|
||||
$uadr = $dbt->fetch_tablerecord($dbh,$pref_ctu);
|
||||
$response->{merchant_message} = $uadr->{txt01};
|
||||
}
|
||||
|
||||
$response = { %$response, %$auth };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue