]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/jsonsearchresultslist.php
change controlyourself.ca to status.net
[quix0rs-gnu-social.git] / lib / jsonsearchresultslist.php
index 0cdcf0c51642bfec6081c7e8ed8a5d16313c29bc..f17db334b6abb8cb7291d9e13a5cbdc08e4ec516 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * Laconica, the distributed open-source microblogging tool
+ * StatusNet, the distributed open-source microblogging tool
  *
  * widget for displaying a list of notices
  *
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  * @category  Search
- * @package   Laconica
- * @author    Zach Copley <zach@controlyourself.ca>
- * @copyright 2009 Control Yourself, Inc.
+ * @package   StatusNet
+ * @author    Zach Copley <zach@status.net>
+ * @copyright 2009 StatusNet, Inc.
  * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
- * @link      http://laconi.ca/
+ * @link      http://status.net/
  */
 
 if (!defined('LACONICA')) {
@@ -35,10 +35,10 @@ if (!defined('LACONICA')) {
  * widget-like class for showing JSON search results
  *
  * @category Search
- * @package  Laconica
- * @author   Zach Copley <zach@controlyourself.ca>
+ * @package  StatusNet
+ * @author   Zach Copley <zach@status.net>
  * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
- * @link     http://laconi.ca/
+ * @link     http://status.net/
  *
  */
 
@@ -89,6 +89,7 @@ class JSONSearchResultsList
     function show()
     {
         $cnt = 0;
+        $this->max_id = 0;
 
         $time_start = microtime(true);
 
@@ -146,10 +147,10 @@ class JSONSearchResultsList
  * widget for displaying a single JSON search result
  *
  * @category UI
- * @package  Laconica
- * @author   Zach Copley <zach@controlyourself.ca>
+ * @package  StatusNet
+ * @author   Zach Copley <zach@status.net>
  * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
- * @link     http://laconi.ca/
+ * @link     http://status.net/
  * @see      JSONSearchResultsList
  */
 
@@ -206,7 +207,7 @@ class ResultItem
         $replier_profile = null;
 
         if ($this->notice->reply_to) {
-            $reply = Notice::staticGet(intval($notice->reply_to));
+            $reply = Notice::staticGet(intval($this->notice->reply_to));
             if ($reply) {
                 $replier_profile = $reply->getProfile();
             }
@@ -223,7 +224,7 @@ class ResultItem
 
         $user = User::staticGet('id', $this->profile->id);
 
-        $this->iso_language_code = $this->user->language;
+        $this->iso_language_code = $user->language;
 
         $this->source = $this->getSourceLink($this->notice->source);
 
@@ -232,7 +233,7 @@ class ResultItem
         $this->profile_image_url = ($avatar) ?
             $avatar->displayUrl() : Avatar::defaultImage(AVATAR_STREAM_SIZE);
 
-        $this->created_at = date('r', $this->notice->created);
+        $this->created_at = common_date_rfc2822($this->notice->created);
     }
 
     /**