Merge branch 'dev' into 'dev'
Preserve photo modification date on edit See merge request hubzilla/core!1389
This commit is contained in:
commit
e47a96bf24
@ -263,7 +263,8 @@ class Photos extends \Zotlabs\Web\Controller {
|
||||
$fsize = strlen($data);
|
||||
}
|
||||
|
||||
$x = q("update photo set content = '%s', filesize = %d, height = %d, width = %d where resource_id = '%s' and uid = %d and imgscale = 0",
|
||||
$x = q("update photo set edited = '%s', content = '%s', filesize = %d, height = %d, width = %d where resource_id = '%s' and uid = %d and imgscale = 0",
|
||||
dbesc(datetime_convert()),
|
||||
dbescbin($data),
|
||||
intval($fsize),
|
||||
intval($height),
|
||||
@ -278,7 +279,8 @@ class Photos extends \Zotlabs\Web\Controller {
|
||||
$width = $ph->getWidth();
|
||||
$height = $ph->getHeight();
|
||||
|
||||
$x = q("update photo set content = '%s', height = %d, width = %d where resource_id = '%s' and uid = %d and imgscale = 1",
|
||||
$x = q("update photo set edited = '%s', content = '%s', height = %d, width = %d where resource_id = '%s' and uid = %d and imgscale = 1",
|
||||
dbesc(datetime_convert()),
|
||||
dbescbin($ph->imageString()),
|
||||
intval($height),
|
||||
intval($width),
|
||||
@ -293,7 +295,8 @@ class Photos extends \Zotlabs\Web\Controller {
|
||||
$width = $ph->getWidth();
|
||||
$height = $ph->getHeight();
|
||||
|
||||
$x = q("update photo set content = '%s', height = %d, width = %d where resource_id = '%s' and uid = %d and imgscale = 2",
|
||||
$x = q("update photo set edited = '%s', content = '%s', height = %d, width = %d where resource_id = '%s' and uid = %d and imgscale = 2",
|
||||
dbesc(datetime_convert()),
|
||||
dbescbin($ph->imageString()),
|
||||
intval($height),
|
||||
intval($width),
|
||||
@ -308,7 +311,8 @@ class Photos extends \Zotlabs\Web\Controller {
|
||||
$width = $ph->getWidth();
|
||||
$height = $ph->getHeight();
|
||||
|
||||
$x = q("update photo set content = '%s', height = %d, width = %d where resource_id = '%s' and uid = %d and imgscale = 3",
|
||||
$x = q("update photo set edited = '%s', content = '%s', height = %d, width = %d where resource_id = '%s' and uid = %d and imgscale = 3",
|
||||
dbesc(datetime_convert()),
|
||||
dbescbin($ph->imageString()),
|
||||
intval($height),
|
||||
intval($width),
|
||||
|
@ -637,7 +637,7 @@ function import_xchan_photo($photo,$xchan,$thing = false,$force = false) {
|
||||
if(is_null($type))
|
||||
$photo_failure = true;
|
||||
}
|
||||
elseif($result['return_code'] === 304) {
|
||||
elseif($result['return_code'] == 304) {
|
||||
$photo = z_root() . '/photo/' . $hash . '-4';
|
||||
$thumb = z_root() . '/photo/' . $hash . '-5';
|
||||
$micro = z_root() . '/photo/' . $hash . '-6';
|
||||
|
Reference in New Issue
Block a user