mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-05-13 15:16:38 +02:00
operator standalone fix and adding example db.sql
This commit is contained in:
parent
5b32d2b7f5
commit
941f8a04aa
17 changed files with 44 additions and 96 deletions
0
copri4/main/src/Mod/APIshareeio.pm
Normal file → Executable file
0
copri4/main/src/Mod/APIshareeio.pm
Normal file → Executable file
|
@ -123,11 +123,10 @@ sub update_operatorsloop {
|
|||
c_id => "$adrc_id",
|
||||
};
|
||||
my $dbh_primary = $self->dbconnect_extern($self->{primary}->{sharee_primary}->{database}->{dbname});
|
||||
my $source_primary = $dbh_primary->get_info( $GetInfoType{SQL_DATABASE_NAME} );
|
||||
my $record_primary = { c_id => 0 };
|
||||
$record_primary = $self->fetch_record($dbh_primary,$authref) if($adrc_id && $adrc_id > 0);
|
||||
|
||||
$bw->log("update_operatorsloop by copri_instance-dbname: $dbname | owner: $record_primary->{owner} | get_info-dbname: $source_primary","","");
|
||||
$bw->log("update_operatorsloop by copri_instance-dbname: $dbname | owner: $record_primary->{owner}","","");
|
||||
|
||||
my $rows = 0;
|
||||
if($record_primary->{c_id}){
|
||||
|
@ -165,7 +164,7 @@ sub update_operatorsloop {
|
|||
%$record_primary,
|
||||
table => "contentadr",
|
||||
};
|
||||
$bw->log("--> save_account update_operatorsloop $sharee_operator by $source_primary",$update->{c_id},"");
|
||||
$bw->log("--> save_account update_operatorsloop $sharee_operator",$update->{c_id},"");
|
||||
|
||||
$bw->log("UPDATE adr from record_primary to operator on loop $sharee_operator",$record_primary->{c_id},"");
|
||||
$rows = $self->update_record($dbh_operator,$update,$record_primary);
|
||||
|
@ -385,12 +384,24 @@ sub collect_node {
|
|||
return ($nodes,$rows);
|
||||
}
|
||||
|
||||
#
|
||||
#only used by dead_relation
|
||||
sub collect_relation {
|
||||
my $self = shift;
|
||||
my $dbh = shift || $dbh_intern;
|
||||
my $main_id = shift || "";
|
||||
my $sth = $dbh->prepare("SELECT * FROM relation");
|
||||
my $where = shift || "1=1";
|
||||
|
||||
my $sth = $dbh->prepare("SELECT * FROM relation where $where");
|
||||
my $rc = $sth->execute();
|
||||
my $rel = $sth->fetchall_hashref("rel_id");
|
||||
return $rel;
|
||||
}
|
||||
|
||||
#not used
|
||||
sub collect_relct {
|
||||
my $self = shift;
|
||||
my $dbh = shift || $dbh_intern;
|
||||
my $ref = shift;
|
||||
my $sth = $dbh->prepare("SELECT * FROM relation rel, $ref->{table} c where rel.content_id > 0 and rel.template_id=224 and rel.content_id=c.c_id order by rel.content_id");
|
||||
my $rc = $sth->execute();
|
||||
my $rel = $sth->fetchall_hashref("rel_id");
|
||||
return $rel;
|
||||
|
|
|
@ -56,7 +56,7 @@ sub managemandate_main {
|
|||
my $ctt = shift || "";
|
||||
my $owner = shift || 0;
|
||||
my $payoneret = "";
|
||||
my $payone_conf = $dbt->{operator}->{$varenv->{dbname}}->{payone_conf} || $dbt->{payone_conf};
|
||||
my $payone_conf = $dbt->{operator}->{$varenv->{dbname}}->{payone_conf} || {};
|
||||
|
||||
if($ctadr->{c_id}){
|
||||
my $lastname = $ctadr->{txt01};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue