]> git.mxchange.org Git - friendica.git/blobdiff - include/datetime.php
Merge pull request #4005 from zeroadam/Features-#3878
[friendica.git] / include / datetime.php
index f525f1234d4b8094cf029aa1e488126c402185c7..cb27799798b0c3c5a269eae3e8df8b882bd45125 100644 (file)
@@ -6,6 +6,7 @@
 
 use Friendica\Core\Config;
 use Friendica\Core\PConfig;
+use Friendica\Database\DBM;
 
 /**
  * @brief Two-level sort for timezones.
@@ -280,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 = PConfig::get(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);
 
@@ -592,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']);
@@ -614,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;
                        }