Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision eb07117b

Von Kivitendo Admin vor fast 10 Jahren hinzugefügt

  • ID eb07117b26f569d689835471cab6665e510e123e
  • Vorgänger cce8be29
  • Nachfolger 2f70c04b

Unnötige use und require in Pickern entfernt

nach Hinweis von Sven etwas aufgeräumt.

Unterschiede anzeigen:

SL/Controller/Chart.pm
6 6
use Clone qw(clone);
7 7
use SL::DB::Chart;
8 8
use SL::Controller::Helper::GetModels;
9
use SL::DB::Helper::Paginated;
10 9
use SL::Locale::String qw(t8);
11 10
use SL::JSON;
12 11

  
......
74 73
    if (!$self->chart) {
75 74
      # TODO error
76 75
    } else {
77
      require Rose::DB::Object::Helpers;
78
        $chart_hash                     = $self->chart->as_tree;
79
        $chart_hash->{displayable_name} = $self->chart->displayable_name;
76
      $chart_hash                     = $self->chart->as_tree;
77
      $chart_hash->{displayable_name} = $self->chart->displayable_name;
80 78
    }
81 79

  
82 80
    $self->render(\ SL::JSON::to_json($chart_hash), { layout => 0, type => 'json', process => 0 });
SL/Controller/Part.pm
79 79
    if (!$self->part) {
80 80
      # TODO error
81 81
    } else {
82
      require Rose::DB::Object::Helpers;
83
        $part_hash          = $self->part->as_tree;
84
        $part_hash->{cvars} = $self->part->cvar_as_hashref;
82
      $part_hash          = $self->part->as_tree;
83
      $part_hash->{cvars} = $self->part->cvar_as_hashref;
85 84
    }
86 85

  
87 86
    $self->render(\ SL::JSON::to_json($part_hash), { layout => 0, type => 'json', process => 0 });

Auch abrufbar als: Unified diff