fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [17617]


From: nelson . guerra
Subject: [Fmsystem-commits] [17617]
Date: Wed, 17 Jan 2018 18:35:43 -0500 (EST)

Revision: 17617
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=17617
Author:   nelson224
Date:     2018-01-17 18:35:43 -0500 (Wed, 17 Jan 2018)
Log Message:
-----------


Modified Paths:
--------------
    branches/dev-syncromind/addressbook/inc/hook_notifywindow.inc.php

Modified: branches/dev-syncromind/addressbook/inc/hook_notifywindow.inc.php
===================================================================
--- branches/dev-syncromind/addressbook/inc/hook_notifywindow.inc.php   
2018-01-17 23:22:45 UTC (rev 17616)
+++ branches/dev-syncromind/addressbook/inc/hook_notifywindow.inc.php   
2018-01-17 23:35:43 UTC (rev 17617)
@@ -41,13 +41,17 @@
                //$bdays = 
$c->read(0,15,$qfields,$today,'tid=n','','',$GLOBALS['phpgw_info']['user']['account_id']);
                $criteria = array('per_birthday' => $today);
                $bdays = $c->get_persons($qfields, 15, 0, '', '', $criteria);
-               while(list($key,$val) = @each($bdays))
-               {
+               //while(list($key,$val) = @each($bdays))
+                if (is_array($bdays))
+                {
+                    foreach($bdays as $key => $val)
+                    {
                        $tmp = '<a href="'
                                . $GLOBALS['phpgw']->link('/index.php', 
array('menuaction' => 'addressbook.uiaddressbook.view_person', 'ab_id' => 
$val['contact_id'])) . '">'
                                . $val['per_first_name'] . ' ' . 
$val['per_last_name'] . '</a>';
                        echo '<tr><td align="left">' . lang("Today is %1's 
birthday!", $tmp) . "</td></tr>\n";
-               }
+                    }
+                }
 
                $tomorrow = $GLOBALS['phpgw']->common->show_date($now + 
86400,'n/d/');
 //             echo $tomorrow."\n";
@@ -56,13 +60,17 @@
                $bdays = $c->get_persons($qfields, 15, 0, '', '', $criteria);
                //$bdays = 
$c->read(0,15,$qfields,$tomorrow,'tid=n','','',$GLOBALS['phpgw_info']['user']['account_id']);
 
-               while(list($key,$val) = @each($bdays))
-               {
+               //while(list($key,$val) = @each($bdays))
+                if (is_array($bdays))
+                {
+                    foreach($bdays as $key => $val)
+                    {
                        $tmp = '<a href="'
                                . $GLOBALS['phpgw']->link('/index.php', 
array('menuaction' => 'addressbook.uiaddressbook.view_person', 'ab_id' => 
$val['contact_id'])) . '">'
                                . $val['per_first_name'] . ' ' . 
$val['per_last_name'] . '</a>';
                        echo '<tr><td align="left">' . lang("Tomorrow is %1's 
birthday.", $tmp) . "</td></tr>\n";
-               }
+                    }
+                }
                echo "\n<!-- Birthday info -->\n";
        }
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]