Repository: airavata-php-gateway
Updated Branches:
  refs/heads/develop a84b53a98 -> c345b0d24


Fix for notices not having expiry date


Project: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/commit/c345b0d2
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/c345b0d2
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/c345b0d2

Branch: refs/heads/develop
Commit: c345b0d243ed756033a0392da1026cad69cbc2fa
Parents: a84b53a
Author: Nipurn Doshi <[email protected]>
Authored: Tue May 3 15:28:40 2016 -0400
Committer: Nipurn Doshi <[email protected]>
Committed: Tue May 3 15:28:40 2016 -0400

----------------------------------------------------------------------
 app/libraries/CommonUtilities.php | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/c345b0d2/app/libraries/CommonUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/CommonUtilities.php 
b/app/libraries/CommonUtilities.php
index 3c7e248..98894e1 100644
--- a/app/libraries/CommonUtilities.php
+++ b/app/libraries/CommonUtilities.php
@@ -236,7 +236,10 @@ class CommonUtilities
         $currentTime = floatval( time()*1000);
         $noticesUI = "";
         foreach( $notices as $notice){
-            if( $currentTime >= $notice->publishedTime && $currentTime <= 
$notice->expirationTime)
+            $endTime = $notice->expirationTime;
+            if( $endTime == null)
+                $endTime = $currentTime;
+            if( $currentTime >= $notice->publishedTime && $currentTime <= 
$endTime)
             {
                 $publishedNoticesCount++;
                 $textColor = "text-info";

Reply via email to