Skip to content

Commit 34ad949

Browse files
author
David Schunke
committed
renamed visible text from indoor-tour to katalog-tour, added separate method is_indoor to tour
1 parent 0f82e77 commit 34ad949

4 files changed

Lines changed: 9 additions & 12 deletions

File tree

controllers/mapstops_controller.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public static function new() {
3636
$mapstop = new Mapstop();
3737
$mapstop->tour_id = $tour->id;
3838

39-
if ($tour->type === 'indoor-tour') {
39+
if ($tour->is_indoor()) {
4040
$places = Places::instance()->list_by_area($tour->area_id);
4141
} else {
4242
$places = Mapstops::instance()->get_possible_places($mapstop);
@@ -104,7 +104,7 @@ public static function edit() {
104104
if(is_null($error_view)) {
105105
$available_posts = UserService::instance()->get_available_posts();
106106
$posts = UserService::instance()->get_posts($mapstop->post_ids);
107-
if ($tour->type === 'indoor-tour') {
107+
if ($tour->is_indoor()) {
108108
$places = Places::instance()->list_by_area($tour->area_id);
109109
} else {
110110
$places = Mapstops::instance()->get_possible_places($mapstop);

controllers/tours_controller.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public static function edit_track() {
132132
$id = RouteParams::get_id_value();
133133
$tour = Tours::instance()->get($id, true, true, true);
134134

135-
if ($tour->type === 'indoor-tour') {
135+
if ($tour->is_indoor()) {
136136
$view = self::determine_edit_view($tour, 'edit_track_indoor');
137137
} else {
138138
$view = self::determine_edit_view($tour, 'edit_track');
@@ -149,7 +149,7 @@ public static function edit_stops() {
149149
$id = RouteParams::get_id_value();
150150
$tour = Tours::instance()->get($id, true, true, true);
151151

152-
if ($tour->type === 'indoor-tour') {
152+
if ($tour->is_indoor()) {
153153
$view = self::determine_edit_view($tour, 'edit_stops_indoor');
154154
} else {
155155
$view = self::determine_edit_view($tour, 'edit_stops');

models/tour.php

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class Tour extends AbstractModel {
1212
'round-tour' => 'Rundgang',
1313
'public-transport-tour' => 'ÖPNV-Tour',
1414
'bike-tour' => 'Fahrrad-Tour',
15-
'indoor-tour' => 'Indoor-Tour'
15+
'indoor-tour' => 'Katalog-Tour'
1616
);
1717

1818
const DATETIME_FORMATS = array(
@@ -318,10 +318,7 @@ private function datetime_from_julian_date($julian_date) {
318318
return $dt;
319319
}
320320

321+
public function is_indoor() {
322+
return $this->type === 'indoor-tour';
323+
}
321324
}
322-
323-
324-
325-
326-
327-
?>

publishing_check.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public static function run($tour) {
115115
$failures[] = $failure;
116116
}
117117

118-
if ($tour->type === 'indoor-tour') {
118+
if ($tour->is_indoor()) {
119119
$messages = self::check_tour_scenes($tour->scenes);
120120
if (!empty($messages)) {
121121
$failure = new PublishingCheckFailure($messages);

0 commit comments

Comments
 (0)