Changeset 2149:04a490b510cc for inc/core/class.dc.repository.php
- Timestamp:
- 09/29/13 14:14:48 (12 years ago)
- Branch:
- dcRepo
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inc/core/class.dc.repository.php
r2148 r2149 91 91 # Increment matches count 92 92 $sorter[$id] += $nb; 93 $result[$id]['accuracy'] = $sorter[$id]; 93 94 } 94 95 # Sort response by matches count … … 101 102 public function process($url, $dest) 102 103 { 104 $this->download($url, $dest); 105 return $this->install($dest); 106 } 107 108 public function download($url, $dest) 109 { 103 110 try { 104 111 $client = netHttp::initClient($url, $path); … … 108 115 $client->setOutput($dest); 109 116 $client->get($path); 117 unset($client); 110 118 } 111 119 catch (Exception $e) { 120 unset($client); 112 121 throw new Exception(__('An error occurred while downloading the file.')); 113 122 } 123 } 114 124 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); 119 128 } 120 129
Note: See TracChangeset
for help on using the changeset viewer.