Ignore:
Timestamp:
02/10/10 14:56:13 (10 years ago)
Author:
sander
Message:

Link teh requested output formats to individual jobs, not the request as a whole

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/server/www/app/controllers/requests_controller.php

    r294 r295  
    3131 
    3232        /** @var array Add Request and Worker model */ 
    33         public $uses = array('Request', 'Worker', 'Mimetype', 'User'); 
     33        public $uses = array('Request', 'Worker', 'Mimetype', 'User', 'Format'); 
    3434 
    3535        /** @var array Set default sort order for paginate */ 
     
    7272                 
    7373                $this->Request->contain(array( 
    74                         'Format', 
    7574                        'Mimetype', 
    7675                        'Mimetype.Doctype', 
     
    222221                        // Add the jobs to the request 
    223222                        $jobs = array(); 
     223                        $format_id = $this->data['Request']['format_id']; 
    224224                        foreach ($this->data['Request']['App'] as $app) { 
    225225                                list($platform_id, $doctype_code, $application_id, $version) = explode('_', $app); 
    226                                 $jobs[] = compact('platform_id', 'application_id', 'version'); 
     226                                $jobs[] = compact('platform_id', 'application_id', 'version', 'format_id'); 
    227227                        } 
    228228 
     
    263263                $platforms = $this->Worker->Factory->Operatingsystem->Platform->find('all'); 
    264264                $doctypes = $this->Worker->Application->Doctype->find('all'); 
    265                 $formats = $this->Request->Format->find('list'); 
     265                $formats = $this->Format->find('list'); 
    266266                $mimetypes = $this->Mimetype->find('all'); 
    267267 
     
    409409                $users = $this->Request->User->find('list'); 
    410410                $mimetypes = $this->Request->Mimetype->find('list'); 
    411                 $formats = $this->Request->Format->find('list'); 
    412411                $this->set(compact('users','mimetypes','formats')); 
    413412        } 
     
    442441                $users = $this->Request->User->find('list'); 
    443442                $mimetypes = $this->Request->Mimetype->find('list'); 
    444                 $formats = $this->Request->Format->find('list'); 
    445443                $this->set(compact('users','mimetypes','formats')); 
    446444        } 
Note: See TracChangeset for help on using the changeset viewer.