Changeset 152 for trunk/lib/Upload.inc.php
- Timestamp:
- Jun 7, 2006 5:35:16 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Upload.inc.php
r146 r152 63 63 if (isset($params['upload_path'])) { 64 64 $params['upload_path'] = realpath($params['upload_path']); 65 // Must be directory.65 // Source must be directory. 66 66 if (!is_dir($params['upload_path'])) { 67 67 $app->logMsg(sprintf('Attempting to auto-create upload directory: %s', $params['upload_path']), LOG_NOTICE, __FILE__, __LINE__); 68 mkdir($params['upload_path'], $this->getParam('dest_dir_perms')); 68 if (phpversion() > '5') { 69 // Recursive. 70 mkdir($params['upload_path'], isset($params['dest_dir_perms']) ? $params['dest_dir_perms'] : $this->getParam('dest_dir_perms'), true); 71 } else { 72 mkdir($params['upload_path'], isset($params['dest_dir_perms']) ? $params['dest_dir_perms'] : $this->getParam('dest_dir_perms')); 73 } 69 74 if (!is_dir($params['upload_path'])) { 70 75 $app->logMsg(sprintf('Upload directory invalid: %s', $params['upload_path']), LOG_ERR, __FILE__, __LINE__); … … 72 77 } 73 78 } 74 // Must be writable.79 // Source must be writable. 75 80 if (!is_writable($params['upload_path'])) { 76 81 $app->logMsg(sprintf('Upload directory not writable: %s', $params['upload_path']), LOG_ERR, __FILE__, __LINE__);
Note: See TracChangeset
for help on using the changeset viewer.