Changeset 1071

Show
Ignore:
Timestamp:
05/10/08 18:24:58 (7 months ago)
Author:
_ck_
Message:

allow negative points (deductions) by admin (no version bump)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • bb-reputation/trunk/bb-reputation.php

    r1042 r1071  
    4545$bb_reputation['points_from_balance']=true;     // when awarding points, should they come from their own balance? 
    4646$bb_reputation['variable_points']=true;         // can members chose how many points to award or use fixed numbers above 
     47 
     48$bb_reputation['deduct_role']='administrate';   // members can deduct points at what role level (participate/moderate/administrate) 
    4749 
    4850$bb_reputation['reason_length']=80;             // how long can their description for the award reason be? 
     
    121123        bb_update_meta( $from_id, "bb_reputation", $deduct, 'user' ); 
    122124} 
    123 if ($points>0) { 
     125if ($points>0 || bb_current_user_can($bb_reputation['deduct_role'])) { 
    124126        $add=intval($user->bb_reputation)+$points;               
    125127        bb_update_meta( $user_id, "bb_reputation", $add, 'user' );