X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fphotos.php;h=8b3dbdc759ae4294fda0bbeab81438e99d210cd4;hb=0454d0a670e051e8519e9a4220606f83d1408214;hp=a9e77c7c39089590f8c00ee179e29d853d4014ac;hpb=7b27dda784f6858fa06b3b23dc3228623d5ad641;p=friendica.git diff --git a/mod/photos.php b/mod/photos.php index a9e77c7c39..8b3dbdc759 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -2,13 +2,14 @@ /** * @file mod/photos.php */ + use Friendica\App; use Friendica\Content\Feature; use Friendica\Content\Nav; use Friendica\Core\Addon; +use Friendica\Core\Config; use Friendica\Core\L10n; use Friendica\Core\System; -use Friendica\Core\Config; use Friendica\Core\Worker; use Friendica\Database\DBM; use Friendica\Model\Contact; @@ -19,6 +20,8 @@ use Friendica\Model\Profile; use Friendica\Network\Probe; use Friendica\Object\Image; use Friendica\Protocol\DFRN; +use Friendica\Util\DateTimeFormat; +use Friendica\Util\Map; require_once 'include/items.php'; require_once 'include/acl_selectors.php'; @@ -288,7 +291,7 @@ function photos_post(App $a) if (DBM::is_result($r)) { foreach ($r as $rr) { q("UPDATE `item` SET `deleted` = 1, `changed` = '%s' WHERE `parent-uri` = '%s' AND `uid` = %d", - dbesc(datetime_convert()), + dbesc(DateTimeFormat::utcNow()), dbesc($rr['parent-uri']), intval($page_owner_uid) ); @@ -361,8 +364,8 @@ function photos_post(App $a) ); if (DBM::is_result($i)) { q("UPDATE `item` SET `deleted` = 1, `edited` = '%s', `changed` = '%s' WHERE `parent-uri` = '%s' AND `uid` = %d", - dbesc(datetime_convert()), - dbesc(datetime_convert()), + dbesc(DateTimeFormat::utcNow()), + dbesc(DateTimeFormat::utcNow()), dbesc($i[0]['uri']), intval($page_owner_uid) ); @@ -399,7 +402,7 @@ function photos_post(App $a) $resource_id = $a->argv[2]; if (!strlen($albname)) { - $albname = datetime_convert('UTC',date_default_timezone_get(),'now', 'Y'); + $albname = DateTimeFormat::localNow('Y'); } if (x($_POST,'rotate') !== false && @@ -646,8 +649,8 @@ function photos_post(App $a) $r = q("UPDATE `item` SET `tag` = '%s', `inform` = '%s', `edited` = '%s', `changed` = '%s' WHERE `id` = %d AND `uid` = %d", dbesc($newtag), dbesc($newinform), - dbesc(datetime_convert()), - dbesc(datetime_convert()), + dbesc(DateTimeFormat::utcNow()), + dbesc(DateTimeFormat::utcNow()), intval($item_id), intval($page_owner_uid) ); @@ -735,7 +738,7 @@ function photos_post(App $a) if (strlen($newalbum)) { $album = $newalbum; } else { - $album = datetime_convert('UTC',date_default_timezone_get(),'now', 'Y'); + $album = DateTimeFormat::localNow('Y'); } } @@ -1358,7 +1361,7 @@ function photos_content(App $a) $photo = [ 'href' => 'photo/' . $hires['resource-id'] . '-' . $hires['scale'] . '.' . $phototypes[$hires['type']], 'title'=> L10n::t('View Full Size'), - 'src' => 'photo/' . $lores['resource-id'] . '-' . $lores['scale'] . '.' . $phototypes[$lores['type']] . '?f=&_u=' . datetime_convert('','','','ymdhis'), + 'src' => 'photo/' . $lores['resource-id'] . '-' . $lores['scale'] . '.' . $phototypes[$lores['type']] . '?f=&_u=' . DateTimeFormat::utcNow('ymdhis'), 'height' => $hires['height'], 'width' => $hires['width'], 'album' => $hires['album'],