Changeset 3409 for trunk/picture.php


Ignore:
Timestamp:
Jun 10, 2009, 10:11:28 PM (15 years ago)
Author:
nikrou
Message:

feature 1028 : Allow admin to validate comment from picture page

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/picture.php

    r3282 r3409  
    323323      redirect($url_self);
    324324    }
     325    case 'validate_comment' :
     326    {
     327      if (isset($_GET['comment_to_validate'])
     328          and is_numeric($_GET['comment_to_validate'])
     329          and is_admin() and !is_adviser() )
     330      {
     331        $query = '
     332UPDATE '.COMMENTS_TABLE.'
     333  SET validated = \'true\'
     334  , validation_date = NOW()
     335  WHERE id='.$_GET['comment_to_validate'].'
     336;';
     337        pwg_query( $query );
     338      }
     339      redirect($url_self);
     340    }
     341
    325342  }
    326343}
Note: See TracChangeset for help on using the changeset viewer.