These same params are used in most API actions; moved to base API class

This commit is contained in:
Zach Copley
2009-10-09 17:32:53 -07:00
parent 57dfad64be
commit b08d16ef2b
13 changed files with 18 additions and 109 deletions

View File

@@ -43,8 +43,14 @@ if (!defined('STATUSNET')) {
class ApiAction extends Action
{
var $format = null;
var $format = null;
var $user = null;
var $page = null;
var $count = null;
var $max_id = null;
var $since_id = null;
var $since = null;
/**
* Initialization.
*
@@ -56,7 +62,14 @@ class ApiAction extends Action
function prepare($args)
{
parent::prepare($args);
$this->format = $this->arg('format');
$this->page = (int)$this->arg('page', 1);
$this->count = (int)$this->arg('count', 20);
$this->max_id = (int)$this->arg('max_id', 0);
$this->since_id = (int)$this->arg('since_id', 0);
$this->since = $this->arg('since');
return true;
}