forked from GNUsocial/gnu-social
		
	Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x
This commit is contained in:
		| @@ -68,6 +68,7 @@ class AllrssAction extends Rss10Action | ||||
|             $this->clientError(_('No such user.')); | ||||
|             return false; | ||||
|         } else { | ||||
|             $this->notices = $this->getNotices($this->limit); | ||||
|             return true; | ||||
|         } | ||||
|     } | ||||
|   | ||||
| @@ -50,11 +50,11 @@ require_once INSTALLDIR.'/lib/rssaction.php'; | ||||
|  */ | ||||
| class FavoritesrssAction extends Rss10Action | ||||
| { | ||||
|      | ||||
|  | ||||
|     /** The user whose favorites to display */ | ||||
|      | ||||
|  | ||||
|     var $user = null; | ||||
|          | ||||
|  | ||||
|     /** | ||||
|      * Find the user to display by supplied nickname | ||||
|      * | ||||
| @@ -66,7 +66,7 @@ class FavoritesrssAction extends Rss10Action | ||||
|     function prepare($args) | ||||
|     { | ||||
|         parent::prepare($args); | ||||
|          | ||||
|  | ||||
|         $nickname   = $this->trimmed('nickname'); | ||||
|         $this->user = User::staticGet('nickname', $nickname); | ||||
|  | ||||
| @@ -74,10 +74,11 @@ class FavoritesrssAction extends Rss10Action | ||||
|             $this->clientError(_('No such user.')); | ||||
|             return false; | ||||
|         } else { | ||||
|             $this->notices = $this->getNotices($this->limit); | ||||
|             return true; | ||||
|         } | ||||
|     } | ||||
|      | ||||
|  | ||||
|     /** | ||||
|      * Get notices | ||||
|      * | ||||
|   | ||||
| @@ -104,6 +104,7 @@ class groupRssAction extends Rss10Action | ||||
|             return false; | ||||
|         } | ||||
|  | ||||
|         $this->notices = $this->getNotices($this->limit); | ||||
|         return true; | ||||
|     } | ||||
|  | ||||
|   | ||||
| @@ -49,9 +49,23 @@ require_once INSTALLDIR.'/lib/rssaction.php'; | ||||
|  */ | ||||
| class PublicrssAction extends Rss10Action | ||||
| { | ||||
|     /** | ||||
|      * Read arguments and initialize members | ||||
|      * | ||||
|      * @param array $args Arguments from $_REQUEST | ||||
|      * @return boolean success | ||||
|      */ | ||||
|  | ||||
|     function prepare($args) | ||||
|     { | ||||
|         parent::prepare($args); | ||||
|         $this->notices = $this->getNotices($this->limit); | ||||
|         return true; | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * Initialization. | ||||
|      *  | ||||
|      * | ||||
|      * @return boolean true | ||||
|      */ | ||||
|     function init() | ||||
| @@ -73,7 +87,7 @@ class PublicrssAction extends Rss10Action | ||||
|         while ($notice->fetch()) { | ||||
|             $notices[] = clone($notice); | ||||
|         } | ||||
|          | ||||
|  | ||||
|         return $notices; | ||||
|     } | ||||
|  | ||||
|   | ||||
| @@ -38,6 +38,7 @@ class RepliesrssAction extends Rss10Action | ||||
|             $this->clientError(_('No such user.')); | ||||
|             return false; | ||||
|         } else { | ||||
|             $this->notices = $this->getNotices($this->limit); | ||||
|             return true; | ||||
|         } | ||||
|     } | ||||
|   | ||||
| @@ -25,7 +25,6 @@ require_once(INSTALLDIR.'/lib/rssaction.php'); | ||||
|  | ||||
| class UserrssAction extends Rss10Action | ||||
| { | ||||
|     var $user = null; | ||||
|     var $tag  = null; | ||||
|  | ||||
|     function prepare($args) | ||||
| @@ -39,6 +38,7 @@ class UserrssAction extends Rss10Action | ||||
|             $this->clientError(_('No such user.')); | ||||
|             return false; | ||||
|         } else { | ||||
|             $this->notices = $this->getNotices($this->limit); | ||||
|             return true; | ||||
|         } | ||||
|     } | ||||
| @@ -64,9 +64,8 @@ class UserrssAction extends Rss10Action | ||||
|  | ||||
|     function getNotices($limit=0) | ||||
|     { | ||||
|  | ||||
|         $user = $this->user; | ||||
|  | ||||
|          | ||||
|         if (is_null($user)) { | ||||
|             return null; | ||||
|         } | ||||
|   | ||||
| @@ -78,25 +78,12 @@ class Rss10Action extends Action | ||||
|     function prepare($args) | ||||
|     { | ||||
|         parent::prepare($args); | ||||
|  | ||||
|         $this->limit = (int) $this->trimmed('limit'); | ||||
|  | ||||
|         if ($this->limit == 0) { | ||||
|             $this->limit = DEFAULT_RSS_LIMIT; | ||||
|         } | ||||
|         return true; | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * Handle a request | ||||
|      * | ||||
|      * @param array $args Arguments from $_REQUEST | ||||
|      * | ||||
|      * @return void | ||||
|      */ | ||||
|  | ||||
|     function handle($args) | ||||
|     { | ||||
|         // Parent handling, including cache check | ||||
|         parent::handle($args); | ||||
|  | ||||
|         if (common_config('site', 'private')) { | ||||
|             if (!isset($_SERVER['PHP_AUTH_USER'])) { | ||||
| @@ -122,8 +109,21 @@ class Rss10Action extends Action | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         // Get the list of notices | ||||
|         $this->notices = $this->getNotices($this->limit); | ||||
|         return true; | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * Handle a request | ||||
|      * | ||||
|      * @param array $args Arguments from $_REQUEST | ||||
|      * | ||||
|      * @return void | ||||
|      */ | ||||
|  | ||||
|     function handle($args) | ||||
|     { | ||||
|         // Parent handling, including cache check | ||||
|         parent::handle($args); | ||||
|         $this->showRss(); | ||||
|     } | ||||
|  | ||||
| @@ -140,7 +140,7 @@ class Rss10Action extends Action | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * Get the notices to output in this stream | ||||
|      * Get the notices to output in this stream. | ||||
|      * | ||||
|      * @return array an array of Notice objects sorted in reverse chron | ||||
|      */ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user