Révision 41cc1b08
Ajouté par Assos Assos il y a presque 9 ans
drupal7/sites/all/modules/feeds/plugins/FeedsFileFetcher.inc | ||
---|---|---|
29 | 29 |
* Overrides parent::getFilePath(). |
30 | 30 |
*/ |
31 | 31 |
public function getFilePath() { |
32 |
if (!file_exists($this->file_path)) {
|
|
32 |
if (!is_readable($this->file_path)) {
|
|
33 | 33 |
throw new Exception(t('File @filepath is not accessible.', array('@filepath' => $this->file_path))); |
34 | 34 |
} |
35 | 35 |
return $this->sanitizeFile($this->file_path); |
... | ... | |
109 | 109 |
'#type' => 'file', |
110 | 110 |
'#title' => empty($this->config['direct']) ? t('File') : NULL, |
111 | 111 |
'#description' => empty($source_config['source']) ? t('Select a file from your local system.') : t('Select a different file from your local system.'), |
112 |
'#theme' => 'feeds_upload',
|
|
112 |
'#theme_wrappers' => array('feeds_upload'),
|
|
113 | 113 |
'#file_info' => empty($source_config['fid']) ? NULL : file_load($source_config['fid']), |
114 | 114 |
'#size' => 10, |
115 | 115 |
); |
... | ... | |
164 | 164 |
if (!$scheme || !in_array($scheme, $this->config['allowed_schemes'])) { |
165 | 165 |
form_set_error('feeds][FeedsFileFetcher][source', t("The file needs to reside within the site's files directory, its path needs to start with scheme://. Available schemes: @schemes.", array('@schemes' => implode(', ', $this->config['allowed_schemes'])))); |
166 | 166 |
} |
167 |
// Check wether the given path exists.
|
|
168 |
elseif (!file_exists($values['source'])) {
|
|
167 |
// Check whether the given path is readable.
|
|
168 |
elseif (!is_readable($values['source'])) {
|
|
169 | 169 |
form_set_error('feeds][FeedsFileFetcher][source', t('The specified file or directory does not exist.')); |
170 | 170 |
} |
171 | 171 |
} |
Formats disponibles : Unified diff
Update feeds 7.x-2.0-alpha9 -> 7.x-2.0-beta1
Install lib simplepie 1.3.1