Skip to content

Commit 599e8ef

Browse files
committed
update
1 parent c200113 commit 599e8ef

File tree

5 files changed

+2
-37
lines changed

5 files changed

+2
-37
lines changed

app/code/core/Mage/Adminhtml/controllers/Sales/Order/ShipmentController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -702,6 +702,7 @@ protected function _combineLabelsPdf(array $labelsContent)
702702
*
703703
* @param string $imageString
704704
* @return Zend_Pdf_Page|bool
705+
* @throws Exception
705706
*/
706707
protected function _createPdfPageFromImageString($imageString)
707708
{
@@ -716,7 +717,7 @@ protected function _createPdfPageFromImageString($imageString)
716717

717718
imageinterlace($image, 0);
718719
$tmpFileName = sys_get_temp_dir() . DS . 'shipping_labels_'
719-
. uniqid(mt_rand()) . Date::toTimestamp(true) . '.png';
720+
. uniqid(random_int(0, mt_getrandmax()) . Date::toTimestamp(true) . '.png');
720721
imagepng($image, $tmpFileName);
721722
$pdfImage = Zend_Pdf_Image::imageWithPath($tmpFileName);
722723
$page->drawImage($pdfImage, 0, 0, $xSize, $ySize);

lib/Varien/File/Uploader.php

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -32,23 +32,20 @@ class Varien_File_Uploader
3232
* Uploaded file handle (copy of $_FILES[] element)
3333
*
3434
* @var array
35-
* @access protected
3635
*/
3736
protected $_file;
3837

3938
/**
4039
* Uploaded file mime type
4140
*
4241
* @var string
43-
* @access protected
4442
*/
4543
protected $_fileMimeType;
4644

4745
/**
4846
* Upload type. Used to right handle $_FILES array.
4947
*
5048
* @var int Varien_File_Uploader::SINGLE_STYLE|Varien_File_Uploader::MULTIPLE_STYLE
51-
* @access protected
5249
*/
5350
protected $_uploadType;
5451

@@ -57,15 +54,13 @@ class Varien_File_Uploader
5754
* we will change file name, this variable will be changed too.
5855
*
5956
* @var string
60-
* @access protected
6157
*/
6258
protected $_uploadedFileName;
6359

6460
/**
6561
* The name of destination directory
6662
*
6763
* @var string
68-
* @access protected
6964
*/
7065
protected $_uploadedFileDir;
7166

@@ -74,7 +69,6 @@ class Varien_File_Uploader
7469
* non-existent directories.
7570
*
7671
* @var bool
77-
* @access protected
7872
*/
7973
protected $_allowCreateFolders = true;
8074

@@ -83,15 +77,13 @@ class Varien_File_Uploader
8377
* name already exists in the destination directory (if enabled).
8478
*
8579
* @var bool
86-
* @access protected
8780
*/
8881
protected $_allowRenameFiles = false;
8982

9083
/**
9184
* If this variable is set to TRUE, files despersion will be supported.
9285
*
9386
* @var bool
94-
* @access protected
9587
*/
9688
protected $_enableFilesDispersion = false;
9789

@@ -101,13 +93,11 @@ class Varien_File_Uploader
10193
* (e.g. NTFS->ext or ext->NTFS)
10294
*
10395
* @var bool
104-
* @access protected
10596
*/
10697
protected $_caseInsensitiveFilenames = true;
10798

10899
/**
109100
* @var string
110-
* @access protected
111101
*/
112102
protected $_dispretionPath = null;
113103

@@ -126,7 +116,6 @@ class Varien_File_Uploader
126116
* Validate callbacks storage
127117
*
128118
* @var array
129-
* @access protected
130119
*/
131120
protected $_validateCallbacks = [];
132121

@@ -176,7 +165,6 @@ protected function _afterSave($result)
176165
*
177166
* @param string $destinationFolder
178167
* @param string $newFileName
179-
* @access public
180168
* @return array|false
181169
*/
182170
public function save($destinationFolder, $newFileName = null)
@@ -248,7 +236,6 @@ protected function _moveFile($tmpPath, $destPath)
248236
/**
249237
* Validate file before save
250238
*
251-
* @access public
252239
*/
253240
protected function _validateFile()
254241
{
@@ -308,7 +295,6 @@ public function addValidateCallback($callbackName, $callbackObject, $callbackMet
308295
* Delete validation callback model for us in self::_validateFile()
309296
*
310297
* @param string $callbackName
311-
* @access public
312298
* @return Varien_File_Uploader
313299
*/
314300
public function removeValidateCallback($callbackName)
@@ -362,7 +348,6 @@ protected static function _addDirSeparator($dir)
362348
* Used to check if uploaded file mime type is valid or not
363349
*
364350
* @param array $validTypes
365-
* @access public
366351
* @return bool
367352
*/
368353
public function checkMimeType($validTypes = [])
@@ -381,7 +366,6 @@ public function checkMimeType($validTypes = [])
381366
/**
382367
* Returns a name of uploaded file
383368
*
384-
* @access public
385369
* @return string
386370
*/
387371
public function getUploadedFileName()
@@ -393,7 +377,6 @@ public function getUploadedFileName()
393377
* Used to set {@link _allowCreateFolders} value
394378
*
395379
* @param mixed $flag
396-
* @access public
397380
* @return Varien_File_Uploader
398381
*/
399382
public function setAllowCreateFolders($flag)
@@ -406,7 +389,6 @@ public function setAllowCreateFolders($flag)
406389
* Used to set {@link _allowRenameFiles} value
407390
*
408391
* @param mixed $flag
409-
* @access public
410392
* @return Varien_File_Uploader
411393
*/
412394
public function setAllowRenameFiles($flag)
@@ -419,7 +401,6 @@ public function setAllowRenameFiles($flag)
419401
* Used to set {@link _enableFilesDispersion} value
420402
*
421403
* @param mixed $flag
422-
* @access public
423404
* @return Varien_File_Uploader
424405
*/
425406
public function setFilesDispersion($flag)

lib/Varien/File/Uploader/Image.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ public function rotate($degrees = null)
6565
*
6666
* Default value is h (flip horizontally)
6767
*
68-
* @access public
6968
* @param string $type
7069
*/
7170
public function flip($type = 'h')

lib/Varien/Image.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ public function __destruct()
5757
/**
5858
* Opens an image and creates image handle
5959
*
60-
* @access public
6160
* @return void
6261
*/
6362
public function open()
@@ -74,7 +73,6 @@ public function open()
7473
/**
7574
* Display handled image in your browser
7675
*
77-
* @access public
7876
* @return void
7977
*/
8078
public function display()
@@ -87,7 +85,6 @@ public function display()
8785
*
8886
* @param string $destination. Default value is NULL
8987
* @param string $newFileName. Default value is NULL
90-
* @access public
9188
* @return void
9289
*/
9390
public function save($destination = null, $newFileName = null)
@@ -99,7 +96,6 @@ public function save($destination = null, $newFileName = null)
9996
* Rotate an image.
10097
*
10198
* @param int $angle
102-
* @access public
10399
* @return void
104100
*/
105101
public function rotate($angle)
@@ -114,7 +110,6 @@ public function rotate($angle)
114110
* @param int $left. Default value is 0
115111
* @param int $right. Default value is 0
116112
* @param int $bottom. Default value is 0
117-
* @access public
118113
* @return void
119114
*/
120115
public function crop($top = 0, $left = 0, $right = 0, $bottom = 0)
@@ -127,7 +122,6 @@ public function crop($top = 0, $left = 0, $right = 0, $bottom = 0)
127122
*
128123
* @param int $width
129124
* @param int $height
130-
* @access public
131125
* @return void
132126
*/
133127
public function resize($width, $height = null)
@@ -179,7 +173,6 @@ public function quality($value)
179173
* @param int $positionY. Watermark Y position.
180174
* @param int $watermarkImageOpacity. Watermark image opacity.
181175
* @param bool $repeat. Enable or disable watermark brick.
182-
* @access public
183176
* @return void
184177
*/
185178
public function watermark($watermarkImage, $positionX = 0, $positionY = 0, $watermarkImageOpacity = 30, $repeat = false)
@@ -193,7 +186,6 @@ public function watermark($watermarkImage, $positionX = 0, $positionY = 0, $wate
193186
/**
194187
* Get mime type of handled image
195188
*
196-
* @access public
197189
* @return string
198190
*/
199191
public function getMimeType()
@@ -204,15 +196,13 @@ public function getMimeType()
204196
/**
205197
* process
206198
*
207-
* @access public
208199
* @return void
209200
*/
210201
public function process() {}
211202

212203
/**
213204
* instruction
214205
*
215-
* @access public
216206
* @return void
217207
*/
218208
public function instruction() {}
@@ -221,7 +211,6 @@ public function instruction() {}
221211
* Set image background color
222212
*
223213
* @param int $color
224-
* @access public
225214
* @return void
226215
*/
227216
public function setImageBackgroundColor($color)

lib/Varien/Io/File.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ class Varien_Io_File extends Varien_Io_Abstract
4949
* non-existent directories.
5050
*
5151
* @var bool
52-
* @access protected
5352
*/
5453
protected $_allowCreateFolders = false;
5554

@@ -314,7 +313,6 @@ public function open(array $args = [])
314313
* Used to set {@link _allowCreateFolders} value
315314
*
316315
* @param bool $flag
317-
* @access public
318316
* @return $this
319317
*/
320318
public function setAllowCreateFolders($flag)
@@ -771,7 +769,6 @@ public function chmod($filename, $mode)
771769
* - LS_ALL = 3
772770
*
773771
* @param Varien_Io_File $grep const
774-
* @access public
775772
* @return array
776773
*/
777774
public function ls($grep = null)
@@ -846,7 +843,6 @@ public function ls($grep = null)
846843
* Convert integer permissions format into human readable
847844
*
848845
* @param integer $mode
849-
* @access protected
850846
* @return string
851847
*/
852848
protected function _parsePermissions($mode)
@@ -902,7 +898,6 @@ protected function _parsePermissions($mode)
902898
* Get file owner
903899
*
904900
* @param string $filename
905-
* @access protected
906901
* @return string
907902
*/
908903
protected function _getFileOwner($filename)

0 commit comments

Comments
 (0)