Changeset 2154


Ignore:
Timestamp:
Oct 30, 2007, 12:10:31 AM (17 years ago)
Author:
rvelices
Message:
  • send status code 403 when attempt to enter a comment, but comments are disabled
  • added trigger wether we should increment hit count
Location:
branches/branch-1_7
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/branch-1_7/include/picture_comment.inc.php

    r2031 r2154  
    5656
    5757  include_once(PHPWG_ROOT_PATH.'include/functions_comment.inc.php');
    58  
     58
    5959  $comment_action = insert_user_comment($comm, @$_POST['key'], $infos );
    6060
     
    6666      array_push( $infos, $lang['comment_added']);
    6767      break;
    68     case 'reject': 
     68    case 'reject':
    6969      set_status_header(403);
    7070      array_push($infos, l10n('comment_not_added') );
     
    8787    );
    8888}
    89 
     89elseif ( isset($_POST['content']) )
     90{
     91  set_status_header(403);
     92  die('ugly spammer');
     93}
    9094
    9195if ($page['show_comments'])
     
    137141        'comments.comment',
    138142        array(
    139           'COMMENT_AUTHOR' => trigger_event('render_comment_author', 
     143          'COMMENT_AUTHOR' => trigger_event('render_comment_author',
    140144            empty($row['author'])
    141145            ? $lang['guest']
  • branches/branch-1_7/picture.php

    r2078 r2154  
    245245
    246246// incrementation of the number of hits, we do this only if no action
    247 $query = '
     247if (trigger_event('allow_increment_element_hit_count', !isset($_POST['content']) ) )
     248{
     249  $query = '
    248250UPDATE
    249251  '.IMAGES_TABLE.'
     
    251253  WHERE id = '.$page['image_id'].'
    252254;';
    253 pwg_query($query);
     255  pwg_query($query);
     256}
    254257
    255258//---------------------------------------------------------- related categories
Note: See TracChangeset for help on using the changeset viewer.