Changeset 22763

Show
Ignore:
Timestamp:
07/02/09 11:21:48 (1 year ago)
Author:
xfade
Message:

Add checks to see if the queue is available for this repo.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/ragnaroek/midcom/org.maemo.packages/handler/repository/list.php

    r22762 r22763  
    5454        $qb->set_limit(1); 
    5555        $repository = $qb->execute(); 
     56        if (!$repository) 
     57        { 
     58            $_MIDCOM->generate_error(MIDCOM_NOTFOUD,'This repository can not be found'); 
     59        } 
     60 
     61        if (  $handler_id == 'repository_package_qa_list' 
     62            || $handler_id == 'repository_package_qa_all_list') 
     63        { 
     64            if (   $repository[0]->qascore < 1 
     65                || $repository[0]->promotiondirect) 
     66            { 
     67                $_MIDCOM->generate_error(MIDCOM_ERRCRIT,'This repository does not have a QA list.'); 
     68            } 
     69        } 
    5670 
    5771        $this->_repository = new org_maemo_packages_repository_dba($repository[0]->guid); 
     
    98112 
    99113        $this->_request_data['name']  = "org.maemo.packages"; 
    100          
     114 
    101115        $qb = $this->_prepare_list_qb($handler_id, $args); 
    102116 
    103117        $this->_package_instance = $qb->execute(); 
    104          
     118 
    105119        $this->_update_breadcrumb_line($handler_id, $args); 
    106120        $this->_prepare_request_data(); 
    107          
     121 
    108122        $this->_request_data['handler_id'] = $handler_id; 
    109123