Commit f746993c authored by Zach Copley's avatar Zach Copley

$format is used by every API action. Set it in the base class.

parent bb08611d
......@@ -46,8 +46,6 @@ require_once INSTALLDIR.'/lib/apibareauth.php';
class ApiAccountRateLimitStatusAction extends ApiBareAuthAction
{
var $format = null;
/**
* Take arguments for running
*
......@@ -67,7 +65,6 @@ class ApiAccountRateLimitStatusAction extends ApiBareAuthAction
}
}
$this->format = $this->arg('format');
return true;
}
......
......@@ -47,8 +47,6 @@ require_once INSTALLDIR.'/lib/apiauth.php';
class ApiAccountVerifyCredentialsAction extends ApiAuthAction
{
var $format = null;
/**
* Take arguments for running
*
......@@ -68,7 +66,6 @@ class ApiAccountVerifyCredentialsAction extends ApiAuthAction
}
}
$this->format = $this->arg('format');
return true;
}
......
......@@ -47,7 +47,6 @@ require_once INSTALLDIR . '/lib/apiauth.php';
class ApiBlockCreateAction extends ApiAuthAction
{
var $format = null;
var $user = null;
var $other = null;
......@@ -72,7 +71,6 @@ class ApiBlockCreateAction extends ApiAuthAction
$this->user = $this->auth_user;
$this->other = $this->getTargetUser($this->arg('id'));
$this->format = $this->arg('format');
return true;
}
......
......@@ -46,7 +46,6 @@ require_once INSTALLDIR . '/lib/apiauth.php';
class ApiBlockDestroyAction extends ApiAuthAction
{
var $format = null;
var $user = null;
var $other = null;
......@@ -71,7 +70,6 @@ class ApiBlockDestroyAction extends ApiAuthAction
$this->user = $this->auth_user;
$this->other = $this->getTargetUser($this->arg('id'));
$this->format = $this->arg('format');
return true;
}
......
......@@ -45,7 +45,6 @@ require_once INSTALLDIR.'/lib/apiauth.php';
class ApiDirectMessageAction extends ApiAuthAction
{
var $format = null;
var $messages = null;
var $page = null;
var $count = null;
......@@ -122,8 +121,6 @@ class ApiDirectMessageAction extends ApiAuthAction
$this->id = "tag:$taguribase:DirectMessages:" . $this->user->id;
}
$this->format = $this->arg('format');
$this->messages = $this->getMessages();
return true;
......
......@@ -46,7 +46,6 @@ require_once INSTALLDIR.'/lib/apiauth.php';
class ApiDirectMessageNewAction extends ApiAuthAction
{
var $format = null;
var $source = null;
var $user = null;
var $other = null;
......@@ -97,8 +96,6 @@ class ApiDirectMessageNewAction extends ApiAuthAction
$this->other = $this->getTargetUser($user_param);
}
$this->format = $this->arg('format');
return true;
}
......
......@@ -46,8 +46,6 @@ require_once INSTALLDIR.'/lib/apiauth.php';
class ApiFavoriteCreateAction extends ApiAuthAction
{
var $format = null;
var $user = null;
var $notice = null;
......@@ -70,7 +68,6 @@ class ApiFavoriteCreateAction extends ApiAuthAction
}
}
$this->format = $this->arg('format');
$this->user = $this->auth_user;
$this->notice = Notice::staticGet($this->arg('id'));
......
......@@ -47,9 +47,9 @@ require_once INSTALLDIR.'/lib/apiauth.php';
class ApiFavoriteDestroyAction extends ApiAuthAction
{
var $format = null;
var $user = null;
var $notice = null;
/**
* Take arguments for running
*
......@@ -69,7 +69,6 @@ class ApiFavoriteDestroyAction extends ApiAuthAction
}
}
$this->format = $this->arg('format');
$this->user = $this->auth_user;
$this->notice = Notice::staticGet($this->arg('id'));
......
......@@ -47,8 +47,6 @@ require_once INSTALLDIR.'/lib/apiauth.php';
class ApiFriendshipsCreateAction extends ApiAuthAction
{
var $format = null;
var $user = null;
var $other = null;
......@@ -71,7 +69,6 @@ class ApiFriendshipsCreateAction extends ApiAuthAction
}
}
$this->format = $this->arg('format');
$this->user = $this->auth_user;
$this->other = $this->getTargetUser($id);
......
......@@ -47,8 +47,6 @@ require_once INSTALLDIR.'/lib/apiauth.php';
class ApiFriendshipsDestroyAction extends ApiAuthAction
{
var $format = null;
var $user = null;
var $other = null;
......@@ -71,7 +69,6 @@ class ApiFriendshipsDestroyAction extends ApiAuthAction
}
}
$this->format = $this->arg('format');
$this->user = $this->auth_user;
$this->other = $this->getTargetUser($id);
......
......@@ -46,8 +46,6 @@ require_once INSTALLDIR.'/lib/api.php';
class ApiFriendshipsExistsAction extends TwitterApiAction
{
var $format = null;
var $user_a = null;
var $user_b = null;
......@@ -64,8 +62,6 @@ class ApiFriendshipsExistsAction extends TwitterApiAction
{
parent::prepare($args);
$this->format = $this->arg('format');
$user_a_id = $this->trimmed('user_a');
$user_b_id = $this->trimmed('user_b');
......
......@@ -45,8 +45,6 @@ require_once INSTALLDIR.'/lib/apibareauth.php';
class ApiFriendshipsShowAction extends ApiBareAuthAction
{
var $format = null;
var $user = null;
var $source = null;
var $target = null;
......@@ -70,8 +68,6 @@ class ApiFriendshipsShowAction extends ApiBareAuthAction
}
}
$this->format = $this->arg('format');
$source_id = (int)$this->trimmed('source_id');
$source_screen_name = $this->trimmed('source_screen_name');
$target_id = (int)$this->trimmed('target_id');
......
......@@ -45,7 +45,6 @@ require_once INSTALLDIR.'/lib/api.php';
class ApiGroupShowAction extends TwitterApiAction
{
var $format = null;
var $group = null;
/**
......@@ -61,7 +60,6 @@ class ApiGroupShowAction extends TwitterApiAction
{
parent::prepare($args);
$this->format = $this->arg('format');
$this->group = $this->getTargetGroup($this->arg('id'));
return true;
......
......@@ -45,7 +45,6 @@ require_once INSTALLDIR . '/lib/api.php';
class ApiHelpTestAction extends TwitterApiAction
{
var $format = null;
/**
* Take arguments for running
......@@ -59,7 +58,6 @@ class ApiHelpTestAction extends TwitterApiAction
function prepare($args)
{
parent::prepare($args);
$this->format = $this->arg('format');
return true;
}
......
......@@ -49,8 +49,6 @@ require_once INSTALLDIR . '/lib/api.php';
class ApiStatusnetConfigAction extends TwitterApiAction
{
var $format = null;
var $keys = array(
'site' => array('name', 'server', 'theme', 'path', 'fancy', 'language',
'email', 'broughtby', 'broughtbyurl', 'closed',
......@@ -73,7 +71,6 @@ class ApiStatusnetConfigAction extends TwitterApiAction
function prepare($args)
{
parent::prepare($args);
$this->format = $this->arg('format');
return true;
}
......
......@@ -48,8 +48,6 @@ require_once INSTALLDIR . '/lib/api.php';
class ApiStatusnetVersionAction extends TwitterApiAction
{
var $format = null;
/**
* Take arguments for running
*
......@@ -62,7 +60,6 @@ class ApiStatusnetVersionAction extends TwitterApiAction
function prepare($args)
{
parent::prepare($args);
$this->format = $this->arg('format');
return true;
}
......
......@@ -46,8 +46,6 @@ require_once INSTALLDIR.'/lib/api.php';
class ApiUserShowAction extends TwitterApiAction
{
var $format = null;
var $user = null;
/**
......@@ -63,8 +61,6 @@ class ApiUserShowAction extends TwitterApiAction
{
parent::prepare($args);
$this->format = $this->arg('format');
$email = $this->arg('email');
// XXX: email field deprecated in Twitter's API
......
......@@ -43,6 +43,7 @@ if (!defined('STATUSNET')) {
class ApiAction extends Action
{
var $format = null;
/**
* Initialization.
......@@ -55,6 +56,7 @@ class ApiAction extends Action
function prepare($args)
{
parent::prepare($args);
$this->format = $this->arg('format');
return true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment