Changeset 1657
- Timestamp:
- 06/10/2007 05:57:27 PM (19 months ago)
- Files:
-
- 1 modified
-
trunk/plugins/CommentCloser.jplug.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/CommentCloser.jplug.php
r1654 r1657 3 3 * @name: CommentCloser <jeenaparadies.net/projects/jlog/> 4 4 * @author: Robert Bienert <robertbienert@gmx.net> 5 * @version: 1. 16 * @date: 2007-0 5-265 * @version: 1.2 6 * @date: 2007-06-10 7 7 * 8 8 * Dieses Plugin schliesst nach einer bestimmten, festzulegenden … … 38 38 $lifeTime = $_POST['commclose_lifetime']; 39 39 $timeUnit = $_POST['commclose_unit']; 40 # TODO Einheiten ueberpruefen 40 // Einheiten pruefen 41 if (! in_array($timeUnit, $this->_units)) 42 $timeUnit = ''; 41 43 42 // keine negative Zeiten43 if ($lifeTime <0)44 // keine (negative) Zeit XXX implicit cast 45 if ($lifeTime + 0 <= 0) 44 46 $lifeTime = 0; 45 47 … … 80 82 $output .= $this->_units[$i]; 81 83 82 if ($this->_units[$i] == COMMENT_CLOSER_TIMEUNIT)84 if ($this->_units[$i] == $timeUnit) 83 85 $output .= '" selected="selected'; 84 86 … … 99 101 // Pruefen auf zu schliessende Beitraege 100 102 function hook_onUpdate($data) { 103 // Kein Schliessen gewuenscht, Plugin nicht konfiguriert 104 // oder ungueltige Werte gesetzt: 101 105 if (!defined('COMMENT_CLOSER_LIFETIME') || 102 COMMENT_CLOSER_LIFETIME == 0 || 103 !defined('COMMENT_CLOSER_TIMEUNIT')) 106 COMMENT_CLOSER_LIFETIME+0 <= 0 || 107 !defined('COMMENT_CLOSER_TIMEUNIT') || 108 !in_array(COMMENT_CLOSER_TIMEUNIT, 109 $this->_units)) 104 110 { 105 111 return $data;
