Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 8c7e4493

Von Moritz Bunkus vor mehr als 16 Jahren hinzugefügt

  • ID 8c7e44938a661e035f62840e1e177353240ace5d
  • Vorgänger 3ced230b
  • Nachfolger ce45d060

Umstellung der Benutzerverwaltung von Dateien im Verzeichnis "users" auf die Verwendung einer Authentifizierungsdatenbank.
Es ist erforderlich, die Dateien doc/UPGRADE und doc/INSTALL/index.html zu lesen und die angesprochenen Punkte auszuführen, um nach einem Upgrade weiter arbeiten zu können.

Unterschiede anzeigen:

bin/mozilla/cp.pl
42 42
require "bin/mozilla/arap.pl";
43 43
require "bin/mozilla/common.pl";
44 44

  
45
our ($form, %myconfig, $lxdebug, $locale);
45
our ($form, %myconfig, $lxdebug, $locale, $auth);
46 46

  
47 47
1;
48 48

  
......
51 51
sub payment {
52 52
  $lxdebug->enter_sub();
53 53

  
54
  $auth->assert('cash');
55

  
54 56
  my (@curr);
55 57

  
56 58
  $form->{ARAP} = ($form->{type} eq 'receipt') ? "AR" : "AP";
......
114 116
sub form_header {
115 117
  $lxdebug->enter_sub();
116 118

  
119
  $auth->assert('cash');
120

  
117 121
  my ($vc, $vclabel, $allvc, $arap, $department, $exchangerate);
118 122
  my ($jsscript, $button1, $button2, $onload);
119 123

  
......
218 222
  print qq|
219 223
<body onLoad="$onload">
220 224

  
221
<form method=post action=$form->{script}>
225
<form method=post action=cp.pl>
222 226

  
223 227
<input type=hidden name=defaultcurrency value=$form->{defaultcurrency}>
224 228
<input type=hidden name=closedto value=$form->{closedto}>
......
330 334
sub list_invoices {
331 335
  $lxdebug->enter_sub();
332 336

  
337
  $auth->assert('cash');
338

  
333 339
  my (@column_index, %column_data, $colspan, $invoice);
334 340
  my ($totalamount, $totaldue, $totalpaid);
335 341

  
......
449 455
sub form_footer {
450 456
  $lxdebug->enter_sub();
451 457

  
458
  $auth->assert('cash');
459

  
452 460
  my ($media, $format, $latex_templates);
453 461

  
454 462
  $form->{DF}{ $form->{format} } = "selected";
......
478 486
</table>
479 487
<input type=hidden name=rowcount value=$form->{rowcount}>
480 488

  
481
<input type=hidden name=login value=$form->{login}>
482
<input type=hidden name=password value=$form->{password}>
483

  
484 489
<br>
485 490
<input class=submit type=submit name=action value="|
486 491
    . $locale->text('Update') . qq|">
......
509 514
sub update {
510 515
  $lxdebug->enter_sub();
511 516

  
517
  $auth->assert('cash');
518

  
512 519
  my ($new_name_selected) = @_;
513 520

  
514 521
  my ($buysell, $newvc, $updated, $exchangerate, $amount);
......
656 663
sub post {
657 664
  $lxdebug->enter_sub();
658 665

  
666
  $auth->assert('cash');
667

  
659 668
  &check_form;
660 669

  
661 670
  if ($form->{currency} ne $form->{defaultcurrency}) {
......
681 690
sub print {
682 691
  $lxdebug->enter_sub();
683 692

  
693
  $auth->assert('cash');
694

  
684 695
  my ($whole, $check, %queued, $spool, $filename, $userspath);
685 696

  
686 697
  &check_form;
......
696 707
  $check->init;
697 708
  $form->{text_amount} = $check->num2text($whole);
698 709

  
699
  call_sub("$form->{vc}_details");
710
  if ($form->{vc} eq 'customer') {
711
    IS->customer_details(\%myconfig, $form);
712
  } else {
713
    IR->vendor_details(\%myconfig, $form);
714
  }
700 715

  
701 716
  $form->{callback} = "";
702 717

  
......
739 754
  $form->parse_template(\%myconfig, $userspath);
740 755

  
741 756
  if ($form->{media} ne 'screen') {
742
    $form->{callback} =
743
      "$form->{script}?action=payment&vc=$form->{vc}&login=$form->{login}&password=$form->{password}&all_vc=$form->{all_vc}";
757
    $form->{callback} = "cp.pl?action=payment&vc=$form->{vc}&all_vc=$form->{all_vc}";
744 758

  
745 759
    $form->redirect if (CP->process_payment(\%myconfig, \%$form));
746 760
    $form->error($locale->text('Cannot post payment!'));
......
749 763
  $lxdebug->leave_sub();
750 764
}
751 765

  
752
sub customer_details { IS->customer_details(\%myconfig, \%$form) }
753
sub vendor_details { IR->vendor_details(\%myconfig, \%$form) }
754

  
755 766
sub check_form {
756 767
  $lxdebug->enter_sub();
757 768

  
769
  $auth->assert('cash');
770

  
758 771
  my ($closedto, $datepaid, $amount);
759 772

  
760 773
  &check_name($form->{vc});

Auch abrufbar als: Unified diff