Merge branch 'ent-6353-se-pueden-crear-noticias-del-sistema-sin-añadirle-asunto' into 'develop'
requiered subject on create news See merge request artica/pandorafms!3526
This commit is contained in:
commit
0b3f9fd5bd
|
@ -55,7 +55,11 @@ if (isset($_POST['create'])) {
|
|||
'expire_timestamp' => $expire_timestamp,
|
||||
];
|
||||
|
||||
$id_link = db_process_sql_insert('tnews', $values);
|
||||
if ($subject === '') {
|
||||
$id_link = false;
|
||||
} else {
|
||||
$id_link = db_process_sql_insert('tnews', $values);
|
||||
}
|
||||
|
||||
ui_print_result_message(
|
||||
$id_link,
|
||||
|
@ -92,7 +96,11 @@ if (isset($_POST['update'])) {
|
|||
'expire_timestamp' => $expire_timestamp,
|
||||
];
|
||||
|
||||
$result = db_process_sql_update('tnews', $values, ['id_news' => $id_news]);
|
||||
if ($subject === '') {
|
||||
$result = false;
|
||||
} else {
|
||||
$result = db_process_sql_update('tnews', $values, ['id_news' => $id_news]);
|
||||
}
|
||||
|
||||
ui_print_result_message(
|
||||
$result,
|
||||
|
@ -173,7 +181,7 @@ if ((isset($_GET['form_add'])) || (isset($_GET['form_edit']))) {
|
|||
|
||||
$data = [];
|
||||
$data[0] = __('Subject').'<br>';
|
||||
$data[0] .= '<input type="text" name="subject" size="35" value="'.$subject.'">';
|
||||
$data[0] .= '<input type="text" name="subject" size="35" value="'.$subject.'" >';
|
||||
|
||||
$data[1] = __('Group').'<br>';
|
||||
$data[1] .= '<div class="w250px">';
|
||||
|
|
Loading…
Reference in New Issue