Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision f141166b

Von Sven Schöling vor fast 15 Jahren hinzugefügt

  • ID f141166b1c9f6134c6898369da898f53e579f161
  • Vorgänger 27309ff1
  • Nachfolger bc3eec3a

amtemplates strict

Unterschiede anzeigen:

bin/mozilla/amtemplates.pl
36 36

  
37 37
use Data::Dumper;
38 38

  
39
use strict;
40

  
39 41
1;
40 42

  
41 43
require "bin/mozilla/common.pl";
......
43 45
# end of main
44 46

  
45 47
sub display {
46
  call_sub($form->{display_nextsub});
48
  call_sub($main::form->{display_nextsub});
47 49
}
48 50

  
49 51
sub save {
50
  call_sub($form->{save_nextsub});
52
  call_sub($main::form->{save_nextsub});
51 53
}
52 54

  
53 55
sub edit {
54
  call_sub($form->{edit_nextsub});
56
  call_sub($main::form->{edit_nextsub});
55 57
}
56 58

  
57 59
sub display_template {
58
  $lxdebug->enter_sub();
60
  $main::lxdebug->enter_sub();
61

  
62
  my $form     = $main::form;
59 63

  
60
  $auth->assert('config');
64
  $main::auth->assert('config');
61 65

  
62 66
  $form->{edit} = 0;
63 67
  display_template_form();
64 68

  
65
  $lxdebug->leave_sub();
69
  $main::lxdebug->leave_sub();
66 70
}
67 71

  
68 72
sub edit_template {
69
  $lxdebug->enter_sub();
73
  $main::lxdebug->enter_sub();
74

  
75
  my $form     = $main::form;
70 76

  
71
  $auth->assert('config');
77
  $main::auth->assert('config');
72 78

  
73 79
  $form->{edit} = 1;
74 80
  display_template_form();
75 81

  
76
  $lxdebug->leave_sub();
82
  $main::lxdebug->leave_sub();
77 83
}
78 84

  
79 85
sub save_template {
80
  $lxdebug->enter_sub();
86
  $main::lxdebug->enter_sub();
81 87

  
82
  $auth->assert('config');
88
  my $form     = $main::form;
89
  my %myconfig = %main::myconfig;
90
  my $locale   = $main::locale;
91

  
92
  $main::auth->assert('config');
83 93

  
84 94
  $form->isblank("formname", $locale->text("You're not editing a file.")) unless ($form->{type} eq "stylesheet");
85 95

  
......
91 101
  $form->{edit} = 0;
92 102
  display_template_form();
93 103

  
94
  $lxdebug->leave_sub();
104
  $main::lxdebug->leave_sub();
95 105
}
96 106

  
97 107
sub display_template_form {
98
  $lxdebug->enter_sub();
108
  $main::lxdebug->enter_sub();
109

  
110
  my $form     = $main::form;
111
  my %myconfig = %main::myconfig;
112
  my $locale   = $main::locale;
99 113

  
100
  $auth->assert('config');
114
  $main::auth->assert('config');
101 115

  
102 116
  $form->{"formname"} =~ s|.*/||;
103 117
  my $format = $form->{"format"} eq "html" ? "html" : "tex";
......
233 247
  $form->header;
234 248
  print($form->parse_html_template("am/edit_templates", \%options));
235 249

  
236
  $lxdebug->leave_sub();
250
  $main::lxdebug->leave_sub();
237 251
}
238 252

  
239 253
1;

Auch abrufbar als: Unified diff