Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id B8D41200B4C for ; Thu, 7 Jul 2016 21:27:07 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id B7C2B160A90; Thu, 7 Jul 2016 19:27:07 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id EA5A6160A88 for ; Thu, 7 Jul 2016 21:27:06 +0200 (CEST) Received: (qmail 54230 invoked by uid 500); 7 Jul 2016 19:27:06 -0000 Mailing-List: contact commits-help@airavata.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airavata.apache.org Delivered-To: mailing list commits@airavata.apache.org Received: (qmail 53494 invoked by uid 99); 7 Jul 2016 19:27:05 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Jul 2016 19:27:05 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 7F37DED317; Thu, 7 Jul 2016 19:27:05 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: scnakandala@apache.org To: commits@airavata.apache.org Date: Thu, 07 Jul 2016 19:27:16 -0000 Message-Id: <2b01ca65ac894e5a86c3f9a8329576d7@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [12/50] [abbrv] airavata-php-gateway git commit: Fix for notices not having expiry date archived-at: Thu, 07 Jul 2016 19:27:07 -0000 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 Authored: Tue May 3 15:28:40 2016 -0400 Committer: Nipurn Doshi 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";