// Check for duplicate comments. Note that we have to use the
// validated/filtered data to perform such check.
$duplicate=db_result(db_query("SELECT COUNT(cid) FROM {comments} WHERE pid = %d AND nid = %d AND subject = '%s' AND comment = '%s'",$edit['pid'],$edit['nid'],$edit['subject'],$edit['comment']),0);
// Clear the cache so an anonymous user can see his comment being added.
...
...
@@ -845,9 +845,8 @@ function comment_save($edit) {
}
}
else{
$txt=t('Comment: unauthorized comment submitted or comment submitted to a closed node %subject.',array('%subject'=>$edit['subject']));
watchdog('content',$txt,WATCHDOG_WARNING);
drupal_set_message($txt,'error');
watchdog('content','Comment: unauthorized comment submitted or comment submitted to a closed node %subject.',array('%subject'=>$edit['subject']),WATCHDOG_WARNING);
drupal_set_message(t('Comment: unauthorized comment submitted or comment submitted to a closed node %subject.',array('%subject'=>$edit['subject'])),'error');
returnFALSE;
}
}
...
...
@@ -1250,7 +1249,7 @@ function comment_admin_overview_submit($form_id, $form_values) {
// Allow modules to respond to the updating of a comment.
@@ -310,11 +310,11 @@ function taxonomy_form_vocabulary_submit($form_id, $form_values) {
switch(taxonomy_save_vocabulary($form_values)){
caseSAVED_NEW:
drupal_set_message(t('Created new vocabulary %name.',array('%name'=>$form_values['name'])));
watchdog('taxonomy',t('Created new vocabulary %name.',array('%name'=>$form_values['name'])),WATCHDOG_NOTICE,l(t('edit'),'admin/content/taxonomy/edit/vocabulary/'.$form_values['vid']));
watchdog('taxonomy','Created new vocabulary %name.',array('%name'=>$form_values['name']),WATCHDOG_NOTICE,l(t('edit'),'admin/content/taxonomy/edit/vocabulary/'.$form_values['vid']));
@@ -480,11 +480,11 @@ function taxonomy_form_term_submit($form_id, $form_values) {
switch(taxonomy_save_term($form_values)){
caseSAVED_NEW:
drupal_set_message(t('Created new term %term.',array('%term'=>$form_values['name'])));
watchdog('taxonomy',t('Created new term %term.',array('%term'=>$form_values['name'])),WATCHDOG_NOTICE,l(t('edit'),'admin/content/taxonomy/edit/term/'.$form_values['tid']));
watchdog('taxonomy','Created new term %term.',array('%term'=>$form_values['name']),WATCHDOG_NOTICE,l(t('edit'),'admin/content/taxonomy/edit/term/'.$form_values['tid']));
break;
caseSAVED_UPDATED:
drupal_set_message(t('Updated term %term.',array('%term'=>$form_values['name'])));
watchdog('taxonomy',t('Updated term %term.',array('%term'=>$form_values['name'])),WATCHDOG_NOTICE,l(t('edit'),'admin/content/taxonomy/edit/term/'.$form_values['tid']));
watchdog('taxonomy','Updated term %term.',array('%term'=>$form_values['name']),WATCHDOG_NOTICE,l(t('edit'),'admin/content/taxonomy/edit/term/'.$form_values['tid']));
break;
}
return'admin/content/taxonomy';
...
...
@@ -626,7 +626,7 @@ function taxonomy_term_confirm_delete($tid) {