airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scnakand...@apache.org
Subject [12/50] [abbrv] airavata-php-gateway git commit: Fix for notices not having expiry date
Date Thu, 07 Jul 2016 19:27:16 GMT
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/master
Commit: c345b0d243ed756033a0392da1026cad69cbc2fa
Parents: a84b53a
Author: Nipurn Doshi <nipunhere@gmail.com>
Authored: Tue May 3 15:28:40 2016 -0400
Committer: Nipurn Doshi <nipunhere@gmail.com>
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";


Mime
View raw message