TRUE, 'export'=>TRUE, ); /** * Export plugins must define an export action. */ public function action_export() { if (empty($_POST['plugin'])) $this->request->redirect('affiliate/export'); $sc = sprintf('Export_%s',$_POST['plugin']); if (! class_exists($sc)) throw new Kohana_Exception('Export Class doesnt exist for :plugin',array(':plugin'=>$_POST['plugin'])); else $export = new $sc; // @todo: Need to limit this to affiliate acounts $export->export(); } /** * This is the main call to export, providing a list of items to export and * setting up the page to call the export plugin when submitted. */ public function action_index($daysago) { // @todo this should come from a file list $TBRexportplugins = array('quicken'=>'Export to Quicken'); if (! $daysago) $daysago = 30; // @todo: Need to limit this to affiliate acounts $payments = ORM::factory('payment') ->export($daysago); if (count($payments)) { $output = Form::open(Request::current()->uri(array('action'=>'export'))); $output .= '