]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/noticewrapper.php
ah, turns out each() stuff is called as a method
[quix0rs-gnu-social.git] / lib / noticewrapper.php
index 0d65f1da028c6344af9fd5121a5b695f31dc30f1..f8c0aa38199400ec926a4283fb7ab9b17d350536 100644 (file)
@@ -19,7 +19,9 @@
 
 if (!defined('LACONICA')) { exit(1); }
 
-class NoticeWrapper {
+require_once(INSTALLDIR.'/classes/Notice.php');
+
+class NoticeWrapper extends Notice {
 
     public $id;                              // int(4)  primary_key not_null
     public $profile_id;                      // int(4)   not_null
@@ -44,10 +46,10 @@ class NoticeWrapper {
                static $fields = array('id', 'profile_id', 'uri', 'content', 'rendered',
                                                           'url', 'created', 'modified', 'reply_to', 'is_local', 'source');
                $this->i++;
-               if ($this->i >= count($notices)) {
+               if ($this->i >= count($this->notices)) {
                        return false;
                } else {
-                       $n = $notices[$this->i];
+                       $n = $this->notices[$this->i];
                        foreach ($fields as $f) {
                                $this->$f = $n->$f;
                        }