Commit c2c4d4f9 authored by Till Brehm's avatar Till Brehm
Browse files

Merge branch 'stable-3.1' into 'stable-3.1'

Stable 3.1



See merge request !423
parents 9e6aa5d0 d1b62a66
......@@ -12,4 +12,5 @@ $wb['answer_to_support_request_txt'] = 'You have got a reply to your support req
$wb['answer_to_support_request_sent_txt'] = 'Your reply to the support request has been sent. Please don\'t reply to this email.';
$wb['support_request_sent_txt'] = 'Your support request has been sent. Please don\'t reply to this email.';
$wb['recipient_or_sender_email_address_not_valid_txt'] = 'The message could not be sent because the recipient and/or the sender email address is not valid.';
$wb['subject_is_empty'] = 'The subject can not be empty.';
?>
......@@ -12,4 +12,5 @@ $wb['answer_to_support_request_txt'] = 'You have got a reply to your support req
$wb['answer_to_support_request_sent_txt'] = 'Your reply to the support request has been sent. Please don\'t reply to this email.';
$wb['support_request_sent_txt'] = 'Your support request has been sent. Please don\'t reply to this email.';
$wb['recipient_or_sender_email_address_not_valid_txt'] = 'The message could not be sent because the recipient and/or the sender email address is not valid.';
$wb['subject_is_empty'] = 'The subject can not be empty.';
?>
......@@ -12,4 +12,5 @@ $wb['answer_to_support_request_txt'] = 'Hai una risposta alla richiesta di suppo
$wb['answer_to_support_request_sent_txt'] = 'La tua richiesta di supporto è stata trasmessa. Non rispondere a questa email.';
$wb['support_request_sent_txt'] = 'La tua richiesta di supporto è stata trasmessa. Non rispondere a questa email.';
$wb['recipient_or_sender_email_address_not_valid_txt'] = 'Impossibile trasmettere il messaggio. Destinatario non valido.';
$wb['subject_is_empty'] = 'The subject can not be empty.';
?>
......@@ -12,4 +12,5 @@ $wb['answer_to_support_request_txt'] = 'You have got a reply to your support req
$wb['answer_to_support_request_sent_txt'] = 'Your reply to the support request has been sent. Please don\'t reply to this email.';
$wb['support_request_sent_txt'] = 'Your support request has been sent. Please don\'t reply to this email.';
$wb['recipient_or_sender_email_address_not_valid_txt'] = 'The message could not be sent because the recipient and/or the sender email address is not valid.';
$wb['subject_is_empty'] = 'The subject can not be empty.';
?>
......@@ -12,4 +12,5 @@ $wb['answer_to_support_request_txt'] = 'You have got a reply to your support req
$wb['answer_to_support_request_sent_txt'] = 'Your reply to the support request has been sent. Please don\'t reply to this email.';
$wb['support_request_sent_txt'] = 'Your support request has been sent. Please don\'t reply to this email.';
$wb['recipient_or_sender_email_address_not_valid_txt'] = 'The message could not be sent because the recipient and/or the sender email address is not valid.';
$wb['subject_is_empty'] = 'The subject can not be empty.';
?>
......@@ -12,4 +12,5 @@ $wb['answer_to_support_request_txt'] = 'You have got a reply to your support req
$wb['answer_to_support_request_sent_txt'] = 'Your reply to the support request has been sent. Please don\'t reply to this email.';
$wb['support_request_sent_txt'] = 'Your support request has been sent. Please don\'t reply to this email.';
$wb['recipient_or_sender_email_address_not_valid_txt'] = 'The message could not be sent because the recipient and/or the sender email address is not valid.';
$wb['subject_is_empty'] = 'The subject can not be empty.';
?>
......@@ -12,4 +12,5 @@ $wb['answer_to_support_request_txt'] = 'You have got a reply to your support req
$wb['answer_to_support_request_sent_txt'] = 'Your reply to the support request has been sent. Please don\'t reply to this email.';
$wb['support_request_sent_txt'] = 'Your support request has been sent. Please don\'t reply to this email.';
$wb['recipient_or_sender_email_address_not_valid_txt'] = 'The message could not be sent because the recipient and/or the sender email address is not valid.';
$wb['subject_is_empty'] = 'The subject can not be empty.';
?>
......@@ -12,4 +12,5 @@ $wb['answer_to_support_request_txt'] = 'You have got a reply to your support req
$wb['answer_to_support_request_sent_txt'] = 'Your reply to the support request has been sent. Please don\'t reply to this email.';
$wb['support_request_sent_txt'] = 'Your support request has been sent. Please don\'t reply to this email.';
$wb['recipient_or_sender_email_address_not_valid_txt'] = 'The message could not be sent because the recipient and/or the sender email address is not valid.';
$wb['subject_is_empty'] = 'The subject can not be empty.';
?>
......@@ -12,4 +12,5 @@ $wb['answer_to_support_request_txt'] = 'You have got a reply to your support req
$wb['answer_to_support_request_sent_txt'] = 'Your reply to the support request has been sent. Please don\'t reply to this email.';
$wb['support_request_sent_txt'] = 'Your support request has been sent. Please don\'t reply to this email.';
$wb['recipient_or_sender_email_address_not_valid_txt'] = 'The message could not be sent because the recipient and/or the sender email address is not valid.';
$wb['subject_is_empty'] = 'The subject can not be empty.';
?>
......@@ -12,4 +12,5 @@ $wb['answer_to_support_request_txt'] = 'You have got a reply to your support req
$wb['answer_to_support_request_sent_txt'] = 'Your reply to the support request has been sent. Please don\'t reply to this email.';
$wb['support_request_sent_txt'] = 'Your support request has been sent. Please don\'t reply to this email.';
$wb['recipient_or_sender_email_address_not_valid_txt'] = 'The message could not be sent because the recipient and/or the sender email address is not valid.';
$wb['subject_is_empty'] = 'The subject can not be empty.';
?>
......@@ -12,4 +12,5 @@ $wb['answer_to_support_request_txt'] = 'You have got a reply to your support req
$wb['answer_to_support_request_sent_txt'] = 'Your reply to the support request has been sent. Please don\'t reply to this email.';
$wb['support_request_sent_txt'] = 'Your support request has been sent. Please don\'t reply to this email.';
$wb['recipient_or_sender_email_address_not_valid_txt'] = 'The message could not be sent because the recipient and/or the sender email address is not valid.';
$wb['subject_is_empty'] = 'The subject can not be empty.';
?>
......@@ -12,4 +12,5 @@ $wb['answer_to_support_request_txt'] = 'Destek isteğiniz yanıtlandı. Lütfen
$wb['answer_to_support_request_sent_txt'] = 'Destek isteğinize yazdığınız yanıt gönderildi. Lütfen bu e-potayı yanıtlamayın.';
$wb['support_request_sent_txt'] = 'Destek isteğiniz gönderildi. Lütfen bu e-postayı yanıtlamayın.';
$wb['recipient_or_sender_email_address_not_valid_txt'] = 'Gönderen ya da alıcı adresi geçersiz olduğundan bu ileti gönderilemedi.';
$wb['subject_is_empty'] = 'The subject can not be empty.';
?>
......@@ -12,7 +12,8 @@ $app->auth->check_module_permissions('help');
$app->uses('listform_actions');
//* Optional limit
$app->listform_actions->SQLExtWhere = "support_message.recipient_id = ".$app->functions->intval($_SESSION['s']['user']['userid']);
$userid=$app->functions->intval($_SESSION['s']['user']['userid']);
$app->listform_actions->SQLExtWhere = "support_message.recipient_id = $userid OR support_message.sender_id = $userid";
//* Start the form rendering and action ahndling
$app->listform_actions->onLoad();
......
......@@ -16,13 +16,13 @@
<table class="table">
<thead class="dark form-group-sm">
<tr>
<th data-column="sender_id"><tmpl_var name="sender_id_txt"></th>
<tmpl_if name="is_admin"><th data-column="sender_id"><tmpl_var name="sender_id_txt"></th></tmpl_if>
<th data-column="subject"><tmpl_var name="subject_txt"></th>
<th data-column="date"><tmpl_var name="date_txt"></th>
<th class="small-col text-right">{tmpl_var name='search_limit'}</th>
</tr>
<tr>
<td><select class="form-control" name="search_sender_id">{tmpl_var name='search_sender_id'}</select></td>
<tmpl_if name="is_admin"><td><select class="form-control" name="search_sender_id">{tmpl_var name='search_sender_id'}</select></td></tmpl_if>
<td><input class="form-control" type="text" name="search_subject" value="{tmpl_var name='search_subject'}" /></td>
<td>&nbsp;</td>
<td class="text-right">
......@@ -33,7 +33,7 @@
<tbody>
<tmpl_loop name="records">
<tr>
<td><a href="#" data-load-content="help/support_message_edit.php?id={tmpl_var name='id'}">{tmpl_var name="sender_id"}</a></td>
<tmpl_if name="is_admin"><td><a href="#" data-load-content="help/support_message_edit.php?id={tmpl_var name='id'}">{tmpl_var name="sender_id"}</a></td></tmpl_if>
<td><a href="#" data-load-content="help/support_message_edit.php?id={tmpl_var name='id'}">{tmpl_var name="subject"}</a></td>
<td><a href="#" data-load-content="help/support_message_edit.php?id={tmpl_var name='id'}">{tmpl_var name="tstamp"}</a></td>
<td class="text-right">
......@@ -43,16 +43,16 @@
</tmpl_loop>
<tmpl_unless name="records">
<tr class="tbl_row_noresults tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>">
<td colspan="4">{tmpl_var name='globalsearch_noresults_text_txt'}</td>
<tmpl_if name="is_admin"><td colspan="4"><tmpl_else><td colspan="3"></tmpl_if>{tmpl_var name='globalsearch_noresults_text_txt'}</td>
</tr>
</tmpl_unless>
</tbody>
<tfoot>
<tr>
<td colspan="4"><tmpl_var name="paging"></td>
<tmpl_if name="is_admin"><td colspan="4"><tmpl_else><td colspan="3"></tmpl_if><tmpl_var name="paging"></td>
</tr>
</tfoot>
</table>
</div>
\ No newline at end of file
......@@ -265,6 +265,7 @@ class bind_plugin {
$filename = escapeshellcmd($dns_config['bind_zonefiles_dir'].'/pri.'.str_replace("/", "_", substr($zone['origin'], 0, -1)));
}
$old_zonefile = @file_get_contents($filename);
file_put_contents($filename, $tpl->grab());
chown($filename, escapeshellcmd($dns_config['bind_user']));
chgrp($filename, escapeshellcmd($dns_config['bind_group']));
......@@ -275,12 +276,20 @@ class bind_plugin {
if($return_status === 0) {
$app->log("Writing BIND domain file: ".$filename, LOGLEVEL_DEBUG);
} else {
if($dns_config['disable_bind_log'] === 'y') {
$app->log("Writing BIND domain file failed: ".$filename." ".implode(' ', $out), LOGLEVEL_DEBUG);
$loglevel = @($dns_config['disable_bind_log'] === 'y')?:'LOGLEVEL_DEBUG':'LOGLEVEL_WARN';
$app->log("Writing BIND domain file failed: ".$filename." ".implode(' ', $out), $loglevel);
if(is_array($out) && !empty($out)){
$app->log('Reason for Bind restart failure: '.implode("\n", $out), $loglevel);
$app->dbmaster->datalogError(implode("\n", $out));
}
if ($old_zonefile != '') {
rename($filename, $filename.'.err');
file_put_contents($filename, $old_zonefile);
chown($filename, escapeshellcmd($dns_config['bind_user']));
chgrp($filename, escapeshellcmd($dns_config['bind_group']));
} else {
$app->log("Writing BIND domain file failed: ".$filename." ".implode(' ', $out), LOGLEVEL_WARN);
rename($filename, $filename.'.err');
}
rename($filename, $filename.'.err');
}
unset($tpl);
unset($records);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment