Force modified contributor role to be re-approved on edit?

you can use 'wp_insert_post_data' hook to check if the user is not an admin, and if the post status is allready “published” change it to “pending”:

add_filter('wp_insert_post_data','re_aprove');
function re_aprove($data , $postarr){
    global $current_user;
    get_currentuserinfo();
    //check if current user is not admin
    if (!current_user_can('manage_options')){ 
        if ($data['post_status'] = "publish"){
            $data['post_status'] = "pending";
        }
    }
    return $data;
}

error code: 523