Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 883a5485

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

  • ID 883a5485970d83d429baeba7735c19e75327f1c4
  • Vorgänger ebdc6e13
  • Nachfolger 74e345d0

fu strict

Unterschiede anzeigen:

bin/mozilla/fu.pl
5 5

  
6 6
require "bin/mozilla/reportgenerator.pl";
7 7

  
8
use strict;
9

  
8 10
sub _collect_links {
9
  $lxdebug->enter_sub();
11
  $main::lxdebug->enter_sub();
10 12

  
11 13
  my $dest = shift;
12 14

  
15
  my $form     = $main::form;
16

  
13 17
  $dest->{LINKS} = [];
14 18

  
15 19
  foreach my $i (1 .. $form->{trans_rowcount}) {
......
18 22
    push @{ $dest->{LINKS} }, { map { +"trans_$_" => $form->{"trans_${_}_$i"} } qw(id type info) };
19 23
  }
20 24

  
21
  $lxdebug->leave_sub();
25
  $main::lxdebug->leave_sub();
22 26
}
23 27

  
24 28
sub add {
25
  $lxdebug->enter_sub();
29
  $main::lxdebug->enter_sub();
30

  
31
  my $form     = $main::form;
32
  my %myconfig = %main::myconfig;
33
  my $locale   = $main::locale;
26 34

  
27 35
  _collect_links($form);
28 36

  
......
43 51

  
44 52
  display_form();
45 53

  
46
  $lxdebug->leave_sub();
54
  $main::lxdebug->leave_sub();
47 55
}
48 56

  
49 57
sub edit {
50
  $lxdebug->enter_sub();
58
  $main::lxdebug->enter_sub();
59

  
60
  my $form     = $main::form;
61
  my $locale   = $main::locale;
51 62

  
52 63
  my $ref = FU->retrieve('id' => $form->{id});
53 64

  
......
65 76

  
66 77
  display_form();
67 78

  
68
  $lxdebug->leave_sub();
79
  $main::lxdebug->leave_sub();
69 80
}
70 81

  
71 82
sub display_form {
72
  $lxdebug->enter_sub();
83
  $main::lxdebug->enter_sub();
84

  
85
  my $form     = $main::form;
73 86

  
74 87
  $form->get_lists("employees" => "EMPLOYEES");
75 88

  
......
83 96
  $form->header();
84 97
  print $form->parse_html_template('fu/add_edit');
85 98

  
86
  $lxdebug->leave_sub();
99
  $main::lxdebug->leave_sub();
87 100
}
88 101

  
89 102
sub save_follow_up {
90
  $lxdebug->enter_sub();
103
  $main::lxdebug->enter_sub();
104

  
105
  my $form     = $main::form;
106
  my $locale   = $main::locale;
91 107

  
92 108
  $form->isblank('created_for_user', $locale->text('You must chose a user.'));
93 109
  $form->isblank('follow_up_date',   $locale->text('The follow-up date is missing.'));
......
117 133

  
118 134
  report();
119 135

  
120
  $lxdebug->leave_sub();
136
  $main::lxdebug->leave_sub();
121 137
}
122 138

  
123 139
sub finish {
124
  $lxdebug->enter_sub();
140
  $main::lxdebug->enter_sub();
141

  
142
  my $form     = $main::form;
143
  my $locale   = $main::locale;
125 144

  
126 145
  if ($form->{id}) {
127 146
    my $ref = FU->retrieve('id' => $form->{id});
......
150 169

  
151 170
  report();
152 171

  
153
  $lxdebug->leave_sub();
172
  $main::lxdebug->leave_sub();
154 173
}
155 174

  
156 175
sub delete {
157
  $lxdebug->enter_sub();
176
  $main::lxdebug->enter_sub();
177

  
178
  my $form     = $main::form;
179
  my $locale   = $main::locale;
158 180

  
159 181
  if ($form->{id}) {
160 182
    my $ref = FU->retrieve('id' => $form->{id});
......
183 205

  
184 206
  report();
185 207

  
186
  $lxdebug->leave_sub();
208
  $main::lxdebug->leave_sub();
187 209
}
188 210

  
189 211
sub search {
190
  $lxdebug->enter_sub();
212
  $main::lxdebug->enter_sub();
213

  
214
  my $form     = $main::form;
215
  my $locale   = $main::locale;
191 216

  
192 217
  $form->get_lists("employees" => "EMPLOYEES");
193 218

  
......
197 222
  $form->header();
198 223
  print $form->parse_html_template('fu/search');
199 224

  
200
  $lxdebug->leave_sub();
225
  $main::lxdebug->leave_sub();
201 226
}
202 227

  
203 228
sub report {
204
  $lxdebug->enter_sub();
229
  $main::lxdebug->enter_sub();
230

  
231
  my $form     = $main::form;
232
  my %myconfig = %main::myconfig;
233
  my $locale   = $main::locale;
234
  my $cgi      = $main::cgi;
205 235

  
206 236
  my @report_params = qw(created_for subject body reference follow_up_date_from follow_up_date_to itime_from itime_to due_only all_users done not_done);
207 237

  
......
303 333

  
304 334
  $report->generate_with_headers();
305 335

  
306
  $lxdebug->leave_sub();
336
  $main::lxdebug->leave_sub();
307 337
}
308 338

  
309 339
sub report_for_todo_list {
310
  $lxdebug->enter_sub();
340
  $main::lxdebug->enter_sub();
341

  
342
  my $form     = $main::form;
311 343

  
312 344
  my @report_params = qw(created_for subject body reference follow_up_date_from follow_up_date_to itime_from itime_to due_only all_users done not_done);
313 345

  
......
338 370
                                                                       'edit_url'   => $edit_url, });
339 371
  }
340 372

  
341
  $lxdebug->leave_sub();
373
  $main::lxdebug->leave_sub();
342 374

  
343 375
  return $content;
344 376
}
345 377

  
346 378
sub edit_access_rights {
347
  $lxdebug->enter_sub();
379
  $main::lxdebug->enter_sub();
380

  
381
  my $form     = $main::form;
382
  my $locale   = $main::locale;
348 383

  
349 384
  my $access = FU->retrieve_access_rights();
350 385

  
......
357 392
  $form->header();
358 393
  print $form->parse_html_template('fu/edit_access_rights');
359 394

  
360
  $lxdebug->leave_sub();
395
  $main::lxdebug->leave_sub();
361 396
}
362 397

  
363 398
sub save_access_rights {
364
  $lxdebug->enter_sub();
399
  $main::lxdebug->enter_sub();
400

  
401
  my $form     = $main::form;
402
  my $locale   = $main::locale;
365 403

  
366 404
  my %access;
367 405

  
......
376 414
  $form->{SAVED_MESSAGE} = $locale->text('The access rights have been saved.');
377 415
  edit_access_rights();
378 416

  
379
  $lxdebug->leave_sub();
417
  $main::lxdebug->leave_sub();
380 418
}
381 419

  
382 420
sub update {
383
  call_sub($form->{nextsub});
421
  call_sub($main::form->{nextsub});
384 422
}
385 423

  
386 424
sub continue {
387
  call_sub($form->{nextsub});
425
  call_sub($main::form->{nextsub});
388 426
}
389 427

  
390 428
sub save {
391
  if ($form->{save_nextsub}) {
392
    call_sub($form->{save_nextsub});
429
  if ($main::form->{save_nextsub}) {
430
    call_sub($main::form->{save_nextsub});
393 431
  } else {
394 432
    save_follow_up();
395 433
  }
396 434
}
397 435

  
398 436
sub dispatcher {
437
  $main::lxdebug->enter_sub();
438

  
439
  my $form     = $main::form;
440
  my $locale   = $main::locale;
441

  
399 442
  foreach my $action (qw(finish save delete)) {
400 443
    if ($form->{"action_${action}"}) {
401 444
      call_sub($action);

Auch abrufbar als: Unified diff