projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c9fccef
)
DataObjects/Images.php
author
Alan Knowles
<alan@akbkhome.com>
Fri, 8 Apr 2011 11:22:46 +0000
(19:22 +0800)
committer
Alan Knowles
<alan@akbkhome.com>
Fri, 8 Apr 2011 11:22:46 +0000
(19:22 +0800)
DataObjects/Images.php
patch
|
blob
|
history
diff --git
a/DataObjects/Images.php
b/DataObjects/Images.php
index
7edb0f9
..
630fbd4
100644
(file)
--- a/
DataObjects/Images.php
+++ b/
DataObjects/Images.php
@@
-341,13
+341,13
@@
class Pman_Core_DataObjects_Images extends DB_DataObject
$sz = explode('x', $size);
$sx = $sz[0];
//var_dump($sz);
- if (!$this->id || empty($this->width) {
+ if (!$this->id || empty($this->width)
)
{
$this->height = $sx;
$this->width = empty($sz[1]) ? $sx : $sz[1];
$sy = $this->width ;
}
if (empty($sz[1])) {
- $ratio = $this->height/ ($this->width *1.0);
+ $ratio =
empty($this->width) ? 1 :
$this->height/ ($this->width *1.0);
$sy = $ration * $sx;
} else {
$sy = $sz[1];