Skip to content

Commit 7053db0

Browse files
committed
Merge branch 'hotfix-1.0.3-beta1' into develop
2 parents 44ce541 + 169a600 commit 7053db0

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

os2web_cp_service.module

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ function os2web_gf_service_handler($file_id) {
130130
}
131131
else {
132132

133-
// Show a polite message if the file cant be downloaded.
133+
// Show a polite message if the file isnt allowed for download.
134134
// If the message isnt set in config, deliver a access denied page.
135135
if ($error_message = variable_get('os2web_cp_service_access_denied_message')) {
136136
$markup = '<div class="messages error"><ul><li>';
@@ -143,26 +143,28 @@ function os2web_gf_service_handler($file_id) {
143143
);
144144
return $page;
145145
}
146-
else {
147-
drupal_access_denied();
148-
}
149146
}
150147
}
151-
else {
152-
error_log(basename(__FILE__) . ':' . __LINE__ . ' HTTP header recieved = ' . print_r($header, 1));
153-
drupal_not_found();
154-
}
155148
}
156149
else {
157150
error_log(basename(__FILE__) . ':' . __LINE__ . ' Settings are wrong.');
158-
drupal_not_found();
159151
}
160152

161153
}
162154
else {
163155
error_log(basename(__FILE__) . ':' . __LINE__ . ' No URL found in variable DB');
164-
drupal_not_found();
165156
}
157+
158+
// If we come to this line, show an error.
159+
$markup = '<div class="messages error"><ul><li>';
160+
$markup .= t('Det ønskede dokument kunne ikke hentes, hvilket kan skyldes opdatering af løsningen. Prøv venligst igen senere.');
161+
$markup .= '</li></ul></div>';
162+
163+
$page['region'] = array(
164+
'#type' => 'markup',
165+
'#markup' => $markup,
166+
);
167+
return $page;
166168
}
167169

168170
/**

0 commit comments

Comments
 (0)