protected function download_plugin_zip_file($url, $tofile) {

        if (file_exists($tofile)) {
            $this->debug('Error fetching plugin ZIP: target location exists.');
            return false;
        }

        $status = $this->download_file_content($url, $tofile);

        if (!$status) {
            $this->debug('Error fetching plugin ZIP.');
            @unlink($tofile);
            return false;
        }

        return true;
    }
protected function download_plugin_zip_file($url, $tofile) {

        if (file_exists($tofile)) {
            $this->debug('Error fetching plugin ZIP: target location exists.');
            return false;
        }

        $status = $this->download_file_content($url, $tofile);

        if (!$status) {
            $this->debug('Error fetching plugin ZIP.');
            @unlink($tofile);
            return false;
        }

        return true;
    }
protected function download_plugin_zip_file ( $ url , $ tofile ) { if ( file_exists ( $ tofile ) ) { $ this -> debug ( 'Error fetching plugin ZIP: target location exists.' ) ; return false ; } $ status = $ this -> download_file_content ( $ url , $ tofile ) ; if ( ! $ status ) { $ this -> debug ( 'Error fetching plugin ZIP.' ) ; @ unlink ( $ tofile ) ; return false ; } return true ; }
Download the ZIP file with the plugin package from the given location

@param string $url URL to the file
@param string $tofile full path to where to store the downloaded file
@return bool false on error
Download the ZIP file with the plugin package from the given location