This commit is contained in:
friendica 2012-10-10 15:59:05 -07:00
commit 8a1f9d32ab
3 changed files with 43 additions and 33 deletions

View file

@ -129,6 +129,7 @@ class Photo {
$this->image->setCompressionQuality($quality); $this->image->setCompressionQuality($quality);
} }
// The 'width' and 'height' properties are only used by non-Imagick routines.
$this->width = $this->image->getImageWidth(); $this->width = $this->image->getImageWidth();
$this->height = $this->image->getImageHeight(); $this->height = $this->image->getImageHeight();
$this->valid = true; $this->valid = true;
@ -205,8 +206,8 @@ class Photo {
if(!$this->is_valid()) if(!$this->is_valid())
return FALSE; return FALSE;
$width = $this->width; $width = $this->getWidth();
$height = $this->height; $height = $this->getHeight();
$dest_width = $dest_height = 0; $dest_width = $dest_height = 0;
@ -277,8 +278,9 @@ class Photo {
$this->image->scaleImage($dest_width, $dest_height); $this->image->scaleImage($dest_width, $dest_height);
} while ($this->image->nextImage()); } while ($this->image->nextImage());
// FIXME - also we need to copy the new dimensions to $this->height, $this->width as other functions // These may not be necessary any more
// may rely on it. $this->width = $this->image->getImageWidth();
$this->height = $this->image->getImageHeight();
return; return;
} }
@ -402,8 +404,8 @@ class Photo {
return FALSE; return FALSE;
$width = $this->width; $width = $this->getWidth();
$height = $this->height; $height = $this->getHeight();
$dest_width = $dest_height = 0; $dest_width = $dest_height = 0;

View file

@ -24,8 +24,13 @@ function lockview_content(&$a) {
if(! count($r)) if(! count($r))
killme(); killme();
$item = $r[0]; $item = $r[0];
if($item['uid'] != local_user())
call_hooks('lockview_content', $item);
if($item['uid'] != local_user()) {
echo t('Remote privacy information not available.') . '<br />';
killme(); killme();
}
if(($item['private'] == 1) && (! strlen($item['allow_cid'])) && (! strlen($item['allow_gid'])) if(($item['private'] == 1) && (! strlen($item['allow_cid'])) && (! strlen($item['allow_gid']))

View file

@ -75,7 +75,10 @@ function manage_post(&$a) {
if($limited_id) if($limited_id)
$_SESSION['submanage'] = $original_id; $_SESSION['submanage'] = $original_id;
goaway($a->get_baseurl(true) . '/profile/' . $a->user['nickname']); $ret = array();
call_hooks('home_init',$ret);
goaway( $a->get_baseurl() . "/profile/" . $a->user['nickname'] );
// NOTREACHED // NOTREACHED
} }