Changeset 1367

Show
Ignore:
Timestamp:
11/27/08 03:00:14 (6 weeks ago)
Author:
MattRead
Message:

defensio: update for User stuff. UPDATE NOW IF YOU ARE USING HABARI SVN HEAD

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • plugins/defensio/trunk/defensio.plugin.php

    r1296 r1367  
    9999        $this->defensio = new DefensioAPI( Options::get( 'defensio__api_key' ), Site::get_url( 'habari' ) ); 
    100100        $this->load_text_domain( 'defensio' ); 
    101         $this->add_template( 'defensio', dirname(__FILE__) . '/moderate.php' ); 
    102     } 
    103  
    104     function action_admin_theme_get_spam( $handler, $theme ) 
    105     { 
    106         $handler->fetch_comments( array( 'status' => 2, 'limit' => 60 ) ); 
    107         $theme->display( 'defensio' ); 
    108         exit; 
    109     } 
    110  
    111     function action_admin_theme_post_spam( $handler, $theme ) 
    112     { 
    113         $this->action_admin_theme_get_spam( $handler, $theme ); 
    114101    } 
    115102 
     
    169156        ); 
    170157        if ( $user instanceof User ) { 
    171             $params['user-logged-in'] = $user instanceof User; 
    172             // test for administrator, editor, etc. as well 
    173             $params['trusted-user'] = $user instanceof User; 
     158            $params['user-logged-in'] = $user->loggedin; 
     159            // @todo test for administrator, editor, etc. as well 
     160            $params['trusted-user'] = $user->loggedin; 
    174161            if ( $user->info->openid_url ) { 
    175162                $params['openid'] = $user->info->openid_url;