Mercurial > defr > drupal > core
comparison modules/upload/upload.module @ 11:589fb7c02327 6.5
Drupal 6.5
author | Franck Deroche <webmaster@defr.org> |
---|---|
date | Tue, 23 Dec 2008 14:32:19 +0100 |
parents | acef7ccb09b5 |
children | 3edae6ecd6c6 |
comparison
equal
deleted
inserted
replaced
10:6f15c9d74937 | 11:589fb7c02327 |
---|---|
1 <?php | 1 <?php |
2 // $Id: upload.module,v 1.197.2.2 2008/08/13 23:59:14 drumm Exp $ | 2 // $Id: upload.module,v 1.197.2.3 2008/10/08 20:12:18 goba Exp $ |
3 | 3 |
4 /** | 4 /** |
5 * @file | 5 * @file |
6 * File-handling and attaching files to nodes. | 6 * File-handling and attaching files to nodes. |
7 * | 7 * |
176 'file_validate_image_resolution' => array($limits['resolution']), | 176 'file_validate_image_resolution' => array($limits['resolution']), |
177 'file_validate_size' => array($limits['file_size'], $limits['user_size']), | 177 'file_validate_size' => array($limits['file_size'], $limits['user_size']), |
178 ); | 178 ); |
179 | 179 |
180 // Save new file uploads. | 180 // Save new file uploads. |
181 if (($user->uid != 1 || user_access('upload files')) && ($file = file_save_upload('upload', $validators, file_directory_path()))) { | 181 if (user_access('upload files') && ($file = file_save_upload('upload', $validators, file_directory_path()))) { |
182 $file->list = variable_get('upload_list_default', 1); | 182 $file->list = variable_get('upload_list_default', 1); |
183 $file->description = $file->filename; | 183 $file->description = $file->filename; |
184 $file->weight = 0; | 184 $file->weight = 0; |
185 $file->new = TRUE; | 185 $file->new = TRUE; |
186 $form['#node']->files[$file->fid] = $file; | 186 $form['#node']->files[$file->fid] = $file; |