Refactor datetime_convert into Temporal::convert

- Changed parameter order to save space
- Refactor select_timezone into Temporal::getTimezoneSelect
- Refactor field_timezone into Temporal::getTimezoneField
This commit is contained in:
Hypolite Petovan 2018-01-24 21:08:45 -05:00
parent d478ef6c6d
commit dc366bf1f7
62 changed files with 512 additions and 432 deletions

View file

@ -2,11 +2,13 @@
/**
* @file mod/wall_attach.php
*/
use Friendica\App;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Database\DBM;
use Friendica\Util\Mimetype;
use Friendica\Util\Temporal;
require_once 'include/datetime.php';
@ -122,7 +124,7 @@ function wall_attach_post(App $a) {
$filedata = @file_get_contents($src);
$mimetype = Mimetype::getContentType($filename);
$hash = get_guid(64);
$created = datetime_convert();
$created = Temporal::convert();
$fields = ['uid' => $page_owner_uid, 'hash' => $hash, 'filename' => $filename, 'filetype' => $mimetype,
'filesize' => $filesize, 'data' => $filedata, 'created' => $created, 'edited' => $created,