git.gnu.io has moved to IP address 209.51.188.249 -- please double check where you are logging in.

Commit a9c4bcd7 authored by mmn's avatar mmn

Removing unnecessary require_once lines (autoload!)

parent 747fe9d5
......@@ -35,8 +35,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apibareauth.php';
/**
* We don't have a rate limit, but some clients check this method.
* It always returns the same thing: 150 hits left.
......
......@@ -32,8 +32,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apiauth.php';
/**
* Sets which channel (device) StatusNet delivers updates to for
* the authenticating user. Sending none as the device parameter
......
......@@ -31,8 +31,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apiauth.php';
/**
* API analog to the profile settings page
* Only the parameters specified will be updated.
......
......@@ -31,8 +31,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apiauth.php';
/**
* Updates the authenticating user's profile image. Note that this API method
* expects raw multipart data, not a URL to an image.
......
......@@ -33,8 +33,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apiauth.php';
/**
* Check a user's credentials. Returns an HTTP 200 OK response code and a
* representation of the requesting user if authentication was successful;
......
......@@ -27,7 +27,9 @@
* @link http://status.net/
*/
require_once INSTALLDIR.'/lib/apibareauth.php';
if (!defined('STATUSNET')) {
exit(1);
}
/**
* Shows an AtomPub service document for a user
......
......@@ -32,8 +32,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apiauth.php';
/**
* Blocks the user specified in the ID parameter as the authenticating user.
* Destroys a friendship to the blocked user if it exists. Returns the
......
......@@ -32,8 +32,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apiauth.php';
/**
* Un-blocks the user specified in the ID parameter for the authenticating user.
* Returns the un-blocked user in the requested format when successful.
......
......@@ -34,8 +34,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apiauth.php';
/**
* Show a stream of notices in a particular conversation
*
......
......@@ -34,8 +34,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apiauth.php';
/**
* Show a list of direct messages from or to the authenticating user
*
......
......@@ -34,8 +34,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apiauth.php';
/**
* Creates a new direct message from the authenticating user to
* the user specified by id.
......
......@@ -34,8 +34,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apiauth.php';
/**
* Favorites the status specified in the ID parameter as the authenticating user.
* Returns the favorite status when successful.
......
......@@ -34,8 +34,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apiauth.php';
/**
* Un-favorites the status specified in the ID parameter as the authenticating user.
* Returns the un-favorited status in the requested format when successful.
......
......@@ -33,8 +33,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apiauth.php';
/**
* Allows the authenticating users to follow (subscribe) the user specified in
* the ID parameter. Returns the befriended user in the requested format when
......
......@@ -33,8 +33,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apiauth.php';
/**
* Allows the authenticating users to unfollow (unsubscribe) the user specified in
* the ID parameter. Returns the unfollowed user in the requested format when
......
......@@ -33,8 +33,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apibareauth.php';
/**
* Outputs detailed information about the relationship between two users
*
......
......@@ -35,8 +35,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apiauth.php';
/**
* Make a new group. Sets the authenticated user as the administrator of the group.
*
......
......@@ -35,8 +35,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apibareauth.php';
/**
* Returns whether a user is a member of a specified group.
*
......
......@@ -35,8 +35,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apiauth.php';
/**
* Joins the authenticated user to the group speicified by ID
*
......
......@@ -35,8 +35,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apiauth.php';
/**
* Removes the authenticated user from the group specified by ID
*
......
......@@ -35,8 +35,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apibareauth.php';
/**
* Returns whether a user is a member of a specified group.
*
......
......@@ -31,8 +31,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apiauth.php';
/**
* API analog to the group edit page
*
......
......@@ -30,8 +30,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apibareauth.php';
class ApiListAction extends ApiBareAuthAction
{
/**
......
......@@ -30,8 +30,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apibareauth.php';
/**
* Action handler for Twitter list_memeber methods
*
......
......@@ -30,8 +30,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apibareauth.php';
/**
* Action handler for API method to list lists a user belongs to.
* (people tags for a user)
......
......@@ -30,8 +30,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apibareauth.php';
/**
* Action handler for Twitter list_memeber methods
*
......
......@@ -29,8 +29,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apiauth.php';
class ApiListSubscriberAction extends ApiBareAuthAction
{
var $list = null;
......
......@@ -31,8 +31,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apibareauth.php';
class ApiListSubscriptionsAction extends ApiBareAuthAction
{
var $lists = array();
......
......@@ -30,9 +30,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apiauth.php';
require_once INSTALLDIR . '/lib/mediafile.php';
/**
* Upload an image via the API. Returns a shortened URL for the image
* to the user.
......
......@@ -38,8 +38,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apiauth.php';
/**
* Deletes one of the authenticating user's statuses (notices).
*
......
......@@ -31,9 +31,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apiauth.php';
require_once INSTALLDIR . '/lib/mediafile.php';
/**
* Repeat a notice through the API
*
......
......@@ -31,9 +31,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apiauth.php';
require_once INSTALLDIR . '/lib/mediafile.php';
/**
* Show up to 100 repeats of a notice
*
......
......@@ -129,9 +129,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apiauth.php';
require_once INSTALLDIR . '/lib/mediafile.php';
/**
* Updates the authenticating user's status (posts a notice).
*
......
......@@ -33,8 +33,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apibareauth.php';
/**
* This class outputs a list of profiles as Twitter-style user and status objects.
* It is used by the API methods /api/statuses/(friends|followers). To support the
......
......@@ -34,8 +34,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR.'/lib/apibareauth.php';
/**
* Returns the 20 most recent favorite notices for the authenticating user or user
* specified by the ID parameter in the requested format.
......
......@@ -133,8 +133,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apibareauth.php';
/**
* Returns the most recent notices (default 20) posted by the target user.
* This is the equivalent of 'You and friends' page accessed via Web.
......
......@@ -38,8 +38,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apibareauth.php';
/**
* Returns the most recent notices (default 20) posted by the target user.
* This is the equivalent of 'You and friends' page accessed via Web.
......
......@@ -38,8 +38,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apibareauth.php';
/**
* Returns the most recent (default 20) mentions (status containing @nickname)
*
......
......@@ -31,9 +31,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apiauth.php';
require_once INSTALLDIR . '/lib/mediafile.php';
/**
* Show authenticating user's most recent repeats
*
......
......@@ -31,8 +31,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apiauth.php';
/**
* Show most recent notices that are repeats in user's inbox
*
......
......@@ -31,9 +31,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apiauth.php';
require_once INSTALLDIR . '/lib/mediafile.php';
/**
* Show authenticating user's most recent notices that have been repeated
*
......
......@@ -38,8 +38,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apibareauth.php';
/**
* Returns the most recent notices (default 20) posted by the authenticating
* user. Another user's timeline can be requested via the id parameter. This
......
......@@ -33,8 +33,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apibareauth.php';
/**
* Ouputs the authenticating user's followers (subscribers), each with
* current Twitter-style status inline. They are ordered by the order
......
......@@ -33,8 +33,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apibareauth.php';
/**
* Ouputs the authenticating user's friends (subscriptions), each with
* current Twitter-style status inline. They are ordered by the date
......
......@@ -34,8 +34,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apiauth.php';
/**
* Feed of ActivityStreams 'favorite' actions
*
......
......@@ -34,8 +34,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apiauth.php';
/**
* Feed of group memberships for a user, in ActivityStreams format
*
......
......@@ -34,8 +34,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apiauth.php';
/**
* Show a single favorite in Atom Activity Streams format.
*
......
......@@ -34,8 +34,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apiauth.php';
/**
* Show (or delete) a single membership event as an ActivityStreams entry
*
......
......@@ -34,8 +34,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apiauth.php';
/**
* Show a single subscription
*
......
......@@ -34,8 +34,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apiauth.php';
/**
* Subscription feed class for AtomPub
*
......
......@@ -34,9 +34,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/noticelist.php';
require_once INSTALLDIR . '/lib/mediafile.php';
/**
* Action for posting new notices
*
......
......@@ -104,11 +104,7 @@ class ApiAuthAction extends ApiAction
}
// NOTE: Make sure we're scoped properly based on the auths!
if (isset($this->auth_user) && !empty($this->auth_user)) {
$this->scoped = $this->auth_user->getProfile();
} else {
$this->scoped = null;
}
$this->scoped = $this->auth_user->getProfile();
// Reject API calls with the wrong access level
......
......@@ -41,8 +41,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR.'/lib/apiauth.php';
/**
* Actions extending this class will require auth unless a target
* user ID has been specified
......
......@@ -29,8 +29,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apibareauth.php';
class ApiListUsersAction extends ApiBareAuthAction
{
var $list = null;
......
......@@ -40,8 +40,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR.'/lib/apiauth.php';
/**
* Actions extending this class will require auth only if a site is private
*
......
......@@ -18,7 +18,6 @@
*/
require_once(INSTALLDIR . '/lib/mail.php');
require_once(INSTALLDIR . '/lib/mediafile.php');
require_once('Mail/mimeDecode.php');
// @todo FIXME: we use both Mail_mimeDecode and mailparse
......
......@@ -34,8 +34,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR.'/lib/apibareauth.php';
/**
* Returns the 20 most recent favorite notices for the authenticating user or user
* specified by the ID parameter in the requested format.
......
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