Fixing message when sending a feedback with out content see #2248

skala
Julio Montoya 14 years ago
parent cc10ae592a
commit 9a0f56dd6e
  1. 4
      main/dropbox/dropbox_functions.inc.php
  2. 2
      main/dropbox/index.php

@ -1005,11 +1005,11 @@ function store_feedback() {
return get_lang('FeedbackError'); return get_lang('FeedbackError');
} }
if ($_POST['feedback'] == '') { if (empty($_POST['feedback'])) {
return get_lang('PleaseTypeText'); return get_lang('PleaseTypeText');
} else { } else {
$sql="INSERT INTO ".$dropbox_cnf['tbl_feedback']." (file_id, author_user_id, feedback, feedback_date) VALUES $sql="INSERT INTO ".$dropbox_cnf['tbl_feedback']." (file_id, author_user_id, feedback, feedback_date) VALUES
('".Database::escape_string($_GET['id'])."','".api_get_user_id()."','".Database::escape_string($_POST['feedback'])."', '".api_get_utc_datetime()."')"; ('".intval($_GET['id'])."','".api_get_user_id()."','".Database::escape_string($_POST['feedback'])."', '".api_get_utc_datetime()."')";
Database::query($sql); Database::query($sql);
return get_lang('DropboxFeedbackStored'); return get_lang('DropboxFeedbackStored');
} }

@ -220,7 +220,7 @@ if (!isset($_POST['feedback']) && (strstr($_POST['action'], 'move_received') OR
// Store Feedback // Store Feedback
if ($_POST['feedback']) { if (isset($_POST['feedback'])) {
if (api_get_session_id() != 0 && !api_is_allowed_to_session_edit(false, true)) { if (api_get_session_id() != 0 && !api_is_allowed_to_session_edit(false, true)) {
api_not_allowed(); api_not_allowed();
} }

Loading…
Cancel
Save