Merge branch 'dev' of https://framagit.org/hubzilla/core into dev
This commit is contained in:
commit
d57cdf645e
@ -263,7 +263,8 @@ class Photos extends \Zotlabs\Web\Controller {
|
|||||||
$fsize = strlen($data);
|
$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),
|
dbescbin($data),
|
||||||
intval($fsize),
|
intval($fsize),
|
||||||
intval($height),
|
intval($height),
|
||||||
@ -278,7 +279,8 @@ class Photos extends \Zotlabs\Web\Controller {
|
|||||||
$width = $ph->getWidth();
|
$width = $ph->getWidth();
|
||||||
$height = $ph->getHeight();
|
$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()),
|
dbescbin($ph->imageString()),
|
||||||
intval($height),
|
intval($height),
|
||||||
intval($width),
|
intval($width),
|
||||||
@ -293,7 +295,8 @@ class Photos extends \Zotlabs\Web\Controller {
|
|||||||
$width = $ph->getWidth();
|
$width = $ph->getWidth();
|
||||||
$height = $ph->getHeight();
|
$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()),
|
dbescbin($ph->imageString()),
|
||||||
intval($height),
|
intval($height),
|
||||||
intval($width),
|
intval($width),
|
||||||
@ -308,7 +311,8 @@ class Photos extends \Zotlabs\Web\Controller {
|
|||||||
$width = $ph->getWidth();
|
$width = $ph->getWidth();
|
||||||
$height = $ph->getHeight();
|
$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()),
|
dbescbin($ph->imageString()),
|
||||||
intval($height),
|
intval($height),
|
||||||
intval($width),
|
intval($width),
|
||||||
|
@ -173,14 +173,14 @@ abstract class dba_driver {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(strlen($server) && ($server !== 'localhost') && ($server !== '127.0.0.1') && (! strpbrk($server,':;'))) {
|
// if(strlen($server) && ($server !== 'localhost') && ($server !== '127.0.0.1') && (! strpbrk($server,':;'))) {
|
||||||
if(! z_dns_check($server)) {
|
// if(! z_dns_check($server)) {
|
||||||
$this->error = sprintf( t('Cannot locate DNS info for database server \'%s\''), $server);
|
// $this->error = sprintf( t('Cannot locate DNS info for database server \'%s\''), $server);
|
||||||
$this->connected = false;
|
// $this->connected = false;
|
||||||
$this->db = null;
|
// $this->db = null;
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -468,7 +468,7 @@ function db_columns($table) {
|
|||||||
if(ACTIVE_DBTYPE === DBTYPE_POSTGRES) {
|
if(ACTIVE_DBTYPE === DBTYPE_POSTGRES) {
|
||||||
$r = q("SELECT column_name as field FROM information_schema.columns WHERE table_schema = 'public' AND table_name = '%s'",
|
$r = q("SELECT column_name as field FROM information_schema.columns WHERE table_schema = 'public' AND table_name = '%s'",
|
||||||
dbesc($table)
|
dbesc($table)
|
||||||
);
|
);
|
||||||
if($r) {
|
if($r) {
|
||||||
return ids_to_array($r,'field');
|
return ids_to_array($r,'field');
|
||||||
}
|
}
|
||||||
|
@ -637,7 +637,7 @@ function import_xchan_photo($photo,$xchan,$thing = false,$force = false) {
|
|||||||
if(is_null($type))
|
if(is_null($type))
|
||||||
$photo_failure = true;
|
$photo_failure = true;
|
||||||
}
|
}
|
||||||
elseif($result['return_code'] === 304) {
|
elseif($result['return_code'] == 304) {
|
||||||
$photo = z_root() . '/photo/' . $hash . '-4';
|
$photo = z_root() . '/photo/' . $hash . '-4';
|
||||||
$thumb = z_root() . '/photo/' . $hash . '-5';
|
$thumb = z_root() . '/photo/' . $hash . '-5';
|
||||||
$micro = z_root() . '/photo/' . $hash . '-6';
|
$micro = z_root() . '/photo/' . $hash . '-6';
|
||||||
|
Reference in New Issue
Block a user