web/lib/Zend/Feed/Writer/Deleted.php
changeset 807 877f952ae2bd
parent 207 621fa6caec0c
child 1230 68c69c656a2c
--- a/web/lib/Zend/Feed/Writer/Deleted.php	Thu Mar 21 17:31:31 2013 +0100
+++ b/web/lib/Zend/Feed/Writer/Deleted.php	Thu Mar 21 19:50:53 2013 +0100
@@ -14,17 +14,17 @@
  *
  * @category   Zend
  * @package    Zend_Feed_Writer
- * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
- * @version    $Id: Deleted.php 22662 2010-07-24 17:37:36Z mabe $
+ * @version    $Id: Deleted.php 25160 2012-12-18 15:17:16Z matthew $
  */
 
 require_once 'Zend/Feed/Writer/Feed/FeedAbstract.php';
- 
+
  /**
  * @category   Zend
  * @package    Zend_Feed_Writer
- * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  */
 class Zend_Feed_Writer_Deleted
@@ -36,7 +36,7 @@
      * @var array
      */
     protected $_data = array();
-    
+
     /**
      * Holds the value "atom" or "rss" depending on the feed type set when
      * when last exported.
@@ -44,7 +44,7 @@
      * @var string
      */
     protected $_type = null;
-    
+
     /**
      * Set the feed character encoding
      *
@@ -71,7 +71,7 @@
         }
         return $this->_data['encoding'];
     }
-    
+
     /**
      * Unset a specific data point
      *
@@ -83,7 +83,7 @@
             unset($this->_data[$name]);
         }
     }
-    
+
     /**
      * Set the current feed type being exported to "rss" or "atom". This allows
      * other objects to gracefully choose whether to execute or not, depending
@@ -95,7 +95,7 @@
     {
         $this->_type = $type;
     }
-    
+
     /**
      * Retrieve the current or last feed type exported.
      *
@@ -105,7 +105,7 @@
     {
         return $this->_type;
     }
-    
+
     public function setReference($reference)
     {
         if (empty($reference) || !is_string($reference)) {
@@ -114,7 +114,7 @@
         }
         $this->_data['reference'] = $reference;
     }
-    
+
     public function getReference()
     {
         if (!array_key_exists('reference', $this->_data)) {
@@ -122,23 +122,23 @@
         }
         return $this->_data['reference'];
     }
-    
+
     public function setWhen($date = null)
     {
         $zdate = null;
         if ($date === null) {
             $zdate = new Zend_Date;
-        } elseif (ctype_digit($date) && strlen($date) == 10) {
-            $zdate = new Zend_Date($date, Zend_Date::TIMESTAMP);
         } elseif ($date instanceof Zend_Date) {
             $zdate = $date;
+        } elseif (ctype_digit((string)$date)) {
+            $zdate = new Zend_Date($date, Zend_Date::TIMESTAMP);
         } else {
             require_once 'Zend/Feed/Exception.php';
             throw new Zend_Feed_Exception('Invalid Zend_Date object or UNIX Timestamp passed as parameter');
         }
         $this->_data['when'] = $zdate;
     }
-    
+
     public function getWhen()
     {
         if (!array_key_exists('when', $this->_data)) {
@@ -146,12 +146,12 @@
         }
         return $this->_data['when'];
     }
-    
+
     public function setBy(array $by)
     {
         $author = array();
-        if (!array_key_exists('name', $by) 
-            || empty($by['name']) 
+        if (!array_key_exists('name', $by)
+            || empty($by['name'])
             || !is_string($by['name'])
         ) {
             require_once 'Zend/Feed/Exception.php';
@@ -166,8 +166,8 @@
             $author['email'] = $by['email'];
         }
         if (isset($by['uri'])) {
-            if (empty($by['uri']) 
-                || !is_string($by['uri']) 
+            if (empty($by['uri'])
+                || !is_string($by['uri'])
                 || !Zend_Uri::check($by['uri'])
             ) {
                 require_once 'Zend/Feed/Exception.php';
@@ -177,7 +177,7 @@
         }
         $this->_data['by'] = $author;
     }
-    
+
     public function getBy()
     {
         if (!array_key_exists('by', $this->_data)) {
@@ -185,12 +185,12 @@
         }
         return $this->_data['by'];
     }
-    
+
     public function setComment($comment)
     {
         $this->_data['comment'] = $comment;
     }
-    
+
     public function getComment()
     {
         if (!array_key_exists('comment', $this->_data)) {