How to force pager type in views for Drupal 6

Hello folks.

Today I'd a problem with attached views and the inherit pager feature, because the pager is inherited but not the style and I'd configured a mini pager. So my solution was to force that using the hook_views_pre_execute in a custom function listed below.
 

function YOURMODULE_views_pre_execute(&$view)
{    
    if($view->display[$view->current_display]->display_plugin == 'attachment'){
        $view->pager['use_pager'] = 'mini';
    }
}


Enjoy it.
enzo