Dotclear


Ignore:
Timestamp:
09/29/13 14:14:48 (12 years ago)
Author:
Denis Jean-Chirstian <contact@…>
Branch:
dcRepo
Message:

Put actions on modules lists helper (and some stuff)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inc/core/class.dc.repository.php

    r2148 r2149  
    9191               # Increment matches count 
    9292               $sorter[$id] += $nb; 
     93               $result[$id]['accuracy'] = $sorter[$id]; 
    9394          } 
    9495          # Sort response by matches count 
     
    101102     public function process($url, $dest) 
    102103     { 
     104          $this->download($url, $dest); 
     105          return $this->install($dest); 
     106     } 
     107 
     108     public function download($url, $dest) 
     109     { 
    103110          try { 
    104111               $client = netHttp::initClient($url, $path); 
     
    108115               $client->setOutput($dest); 
    109116               $client->get($path); 
     117               unset($client); 
    110118          } 
    111119          catch (Exception $e) { 
     120               unset($client); 
    112121               throw new Exception(__('An error occurred while downloading the file.')); 
    113122          } 
     123     } 
    114124 
    115           unset($client); 
    116           $ret_code = dcModules::installPackage($dest, $this->modules); 
    117  
    118           return $ret_code; 
     125     public function install($path) 
     126     { 
     127          return dcModules::installPackage($path, $this->modules); 
    119128     } 
    120129 
Note: See TracChangeset for help on using the changeset viewer.

Sites map