drupal_set_message(t('The selected file %file could not be uploaded, because the destination %directory is not properly configured.',array('%file'=>$source,'%directory'=>$dest)),'error');
watchdog('file system','The selected file %file could not be uploaded, because the destination %directory could not be found, or because its permissions do not allow the file to be written.',array('%file'=>$source,'%directory'=>$dest),WATCHDOG_ERROR);
drupal_set_message(t('The selected file %file could not be copied, because no file by that name exists. Please check that you supplied the correct filename.',array('%file'=>$source)),'error');
return0;
returnFALSE;
}
// If the destination file is not specified then use the filename of the source file.
drupal_set_message(t('The file %file could not be saved, because it exceeds %maxsize, the maximum allowed size for uploads.',array('%file'=>$source,'%maxsize'=>format_size(file_upload_max_size()))),'error');
return0;
returnFALSE;
caseUPLOAD_ERR_PARTIAL:
caseUPLOAD_ERR_NO_FILE:
drupal_set_message(t('The file %file could not be saved, because the upload did not complete.',array('%file'=>$source)),'error');
return0;
returnFALSE;
// Unknown error
default:
drupal_set_message(t('The file %file could not be saved. An unknown error has occurred.',array('%file'=>$source)),'error');
form_set_error($source,t('File upload error. Could not move uploaded file.'));
watchdog('file','Upload error. Could not move uploaded file %file to destination %destination.',array('%file'=>$file->filename,'%destination'=>$file->filepath));
return0;
returnFALSE;
}
// If we made it this far it's safe to record this file in the database.
@@ -680,7 +680,7 @@ function aggregator_parse_w3cdtf($date_str) {
* @param $feed
* An associative array describing the feed to be parsed.
* @return
* 0 on error, 1 otherwise.
* FALSE on error, TRUE otherwise.
*/
functionaggregator_parse_feed(&$data,$feed){
global$items,$image,$channel;
...
...
@@ -699,7 +699,7 @@ function aggregator_parse_feed(&$data, $feed) {
if(!xml_parse($xml_parser,$data,1)){
watchdog('aggregator','The feed from %site seems to be broken, due to an error "%error" on line %line.',array('%site'=>$feed['title'],'%error'=>xml_error_string(xml_get_error_code($xml_parser)),'%line'=>xml_get_current_line_number($xml_parser)),WATCHDOG_WARNING);
drupal_set_message(t('The feed from %site seems to be broken, because of error "%error" on line %line.',array('%site'=>$feed['title'],'%error'=>xml_error_string(xml_get_error_code($xml_parser)),'%line'=>xml_get_current_line_number($xml_parser))),'error');
return0;
returnFALSE;
}
xml_parser_free($xml_parser);
...
...
@@ -801,7 +801,7 @@ function aggregator_parse_feed(&$data, $feed) {
db_query('DELETE FROM {aggregator_item} WHERE fid = %d AND timestamp < %d',$feed['fid'],$age);