cvs: pearweb /include/pepr pepr.php

From: Date: Fri, 09 Jul 2004 20:38:47 +0000
Subject: cvs: pearweb /include/pepr pepr.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-cvs+get-21687@lists.php.net to get a copy of this message
danielc Fri Jul 9 16:38:47 2004 EDT Modified files: /pearweb/include/pepr pepr.php Log: * Coding standards in checkTimeline(). Also remove "break"'s there because never reached. http://cvs.php.net/diff.php/pearweb/include/pepr/pepr.php?r1=1.31&r2=1.32&ty=u Index: pearweb/include/pepr/pepr.php diff -u pearweb/include/pepr/pepr.php:1.31 pearweb/include/pepr/pepr.php:1.32 --- pearweb/include/pepr/pepr.php:1.31 Tue Jul 6 01:51:16 2004 +++ pearweb/include/pepr/pepr.php Fri Jul 9 16:38:47 2004 @@ -247,29 +247,35 @@ return false; } - - function checkTimeline( ) { + function checkTimeline() + { switch ($this->status) { - case 'draft': return true; - break; - - case 'proposal': if (($this->proposal_date + PROPOSAL_STATUS_PROPOSAL_TIMELINE) < time()) { + case 'draft': return true; - } - return (int)($this->proposal_date + PROPOSAL_STATUS_PROPOSAL_TIMELINE); - break; - case 'vote': if (!empty($this->longened_date)) { - if (($this->longened_date + PROPOSAL_STATUS_VOTE_TIMELINE) > time()) { - return (int)($this->longened_date + PROPOSAL_STATUS_VOTE_TIMELINE); + case 'proposal': + if (($this->proposal_date + PROPOSAL_STATUS_PROPOSAL_TIMELINE) < + time()) + { + return true; } - } else { - if (($this->vote_date + PROPOSAL_STATUS_VOTE_TIMELINE) > time()) { - return (int)($this->vote_date + PROPOSAL_STATUS_VOTE_TIMELINE); + return (int)($this->proposal_date + PROPOSAL_STATUS_PROPOSAL_TIMELINE); + + case 'vote': + if (!empty($this->longened_date)) { + if (($this->longened_date + PROPOSAL_STATUS_VOTE_TIMELINE) > + time()) + { + return (int)($this->longened_date + PROPOSAL_STATUS_VOTE_TIMELINE); + } + } else { + if (($this->vote_date + PROPOSAL_STATUS_VOTE_TIMELINE) > + time()) + { + return (int)($this->vote_date + PROPOSAL_STATUS_VOTE_TIMELINE); + } } - } return false; - break; } }

« previous php.pear.cvs (#21687) next »