X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fdatetime.php;h=cb27799798b0c3c5a269eae3e8df8b882bd45125;hb=755f6e8cc1ceb5fab0c0f63deb3ca7048d1ea48d;hp=3578698240053115ea3c5f9738ee98deb082bdd0;hpb=8f253f6c1288534c50fac34f05afb1a2c07c9335;p=friendica.git diff --git a/include/datetime.php b/include/datetime.php index 3578698240..cb27799798 100644 --- a/include/datetime.php +++ b/include/datetime.php @@ -5,6 +5,8 @@ */ use Friendica\Core\Config; +use Friendica\Core\PConfig; +use Friendica\Database\DBM; /** * @brief Two-level sort for timezones. @@ -178,7 +180,7 @@ function datetime_convert($from = 'UTC', $to = 'UTC', $s = 'now', $fmt = "Y-m-d function dob($dob) { list($year,$month,$day) = sscanf($dob,'%4d-%2d-%2d'); - $f = get_config('system', 'birthday_input_format'); + $f = Config::get('system', 'birthday_input_format'); if (! $f) { $f = 'ymd'; } @@ -279,10 +281,7 @@ function timesel($format, $h, $m, $id = 'timepicker') { function datetimesel($format, $min, $max, $default, $label, $id = 'datetimepicker', $pickdate = true, $picktime = true, $minfrom = '', $maxfrom = '', $required = false) { // First day of the week (0 = Sunday) - $firstDay = get_pconfig(local_user(), 'system', 'first_day_of_week'); - if ($firstDay === false) { - $firstDay=0; - } + $firstDay = PConfig::get(local_user(), 'system', 'first_day_of_week', 0); $lang = substr(get_browser_language(), 0, 2); @@ -591,7 +590,7 @@ function update_contact_birthdays() { // In-network birthdays are handled within local_delivery $r = q("SELECT * FROM `contact` WHERE `bd` != '' AND `bd` > '0001-01-01' AND SUBSTRING(`bd`, 1, 4) != `bdyear` "); - if (dbm::is_result($r)) { + if (DBM::is_result($r)) { foreach ($r as $rr) { logger('update_contact_birthday: ' . $rr['bd']); @@ -613,7 +612,7 @@ function update_contact_birthdays() { dbesc(datetime_convert('UTC','UTC', $nextbd)), dbesc('birthday')); - if (dbm::is_result($s)) { + if (DBM::is_result($s)) { continue; }