Permalink
Browse files

Merge branch 'develop'

  • Loading branch information...
2 parents 832b2ed + 2dd470f commit f36064ef9007e354d49594fc7967b87ba1ed42dc @vmichnowicz committed May 9, 2012
View
@@ -16,6 +16,10 @@ I provide the following support options:
* [Personal contact form](http://www.vmichnowicz.com/contact)
* [Twitter](http://twitter.com/vmichnowicz)
+## Video Tutorial (Installation and Configuration)
+
+A quick video tutorial detailing the installation and configuration of VWM Polls (version 0.4.2) on ExpressionEngine 2.4 can be found on [Vimeo](http://vimeo.com/vmichnowicz/vwm-polls-installation-and-configuration)
+
## Example Code
Please visit the [wiki](https://github.com/vmichnowicz/vwm_polls/wiki) for the latest installation instructions and example code.
@@ -26,6 +30,10 @@ A quick video tutorial detailing the installation and configuration of VWM Polls
## Change Log
+### 0.5.2
+
+* Fixed poll expiration logic
+
### 0.5.1
* Added default values for MySQL poll options table
@@ -18,7 +18,7 @@ class Vwm_polls_ft extends EE_Fieldtype {
public $info = array(
'name' => 'VWM Polls',
- 'version' => '0.5.1'
+ 'version' => '0.5.2'
);
public $valid_options = array(
@@ -296,11 +296,15 @@ private function can_vote()
return FALSE;
}
- // Has this entry expired?
- if (time() < $row->expiration_date)
+ // If we have an expiration date
+ if ( ! empty($row->expiration_date) )
{
- $this->errors[] = sprintf($this->EE->lang->line('poll_expired'), date('Y-m-d', $row->expiration_date));
- return FALSE;
+ // Has this entry expired?
+ if (time() > $row->expiration_date)
+ {
+ $this->errors[] = sprintf($this->EE->lang->line('poll_expired'), date('Y-m-d', $row->expiration_date));
+ return FALSE;
+ }
}
// If this poll is not open to any member groups
@@ -16,7 +16,7 @@
class Vwm_polls_upd {
- public $version = '0.5.1';
+ public $version = '0.5.2';
/**
* Constructor

0 comments on commit f36064e

Please sign in to comment.