- Timestamp:
- Nov 14, 2020 4:50:42 PM (3 years ago)
- Location:
- trunk/lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/ImageThumb.inc.php
r648 r737 386 386 387 387 // Destination filename uses the extension defined by dest_file_extension. 388 if ('/' == $spec['dest_dir'] {0}) {388 if ('/' == $spec['dest_dir'][0]) { 389 389 // Absolute path. 390 390 $dest_file = sprintf('%s/%s.%s', $spec['dest_dir'], mb_substr($file_name, 0, mb_strrpos($file_name, '.')), $spec['dest_file_extension']); … … 675 675 foreach ($this->_image_specs as $spec) { 676 676 // Get base directory depending on if the spec's dest_dir is an absolute path or not. 677 $dest_dir = '/' == $spec['dest_dir'] {0}? $spec['dest_dir'] : sprintf('%s/%s', $this->getParam('source_dir'), $spec['dest_dir']);677 $dest_dir = '/' == $spec['dest_dir'][0] ? $spec['dest_dir'] : sprintf('%s/%s', $this->getParam('source_dir'), $spec['dest_dir']); 678 678 if ($use_glob) { 679 679 $dest_file = realpath(sprintf('%s/%s', $dest_dir, $this->_glob($file_name, $dest_dir))); … … 789 789 } else { 790 790 // Get base directory depending on if the spec's dest_dir is an absolute path or not. 791 $dest_dir = '/' == $spec['dest_dir'] {0}? $spec['dest_dir'] : sprintf('%s/%s', $this->getParam('source_dir'), $spec['dest_dir']);791 $dest_dir = '/' == $spec['dest_dir'][0] ? $spec['dest_dir'] : sprintf('%s/%s', $this->getParam('source_dir'), $spec['dest_dir']); 792 792 } 793 793 if (!file_exists($dest_dir)) { -
trunk/lib/Validator.inc.php
r724 r737 340 340 // The part after the @. 341 341 // If domain is an IP [XXX.XXX.XXX.XXX] strip off the brackets. 342 $domain = $e_parts[3] {0}== '[' ? mb_substr($e_parts[3], 1, -1) : $e_parts[3];342 $domain = $e_parts[3][0] == '[' ? mb_substr($e_parts[3], 1, -1) : $e_parts[3]; 343 343 344 344 // Test length.
Note: See TracChangeset
for help on using the changeset viewer.