Removing unnecessary require_once lines (autoload!)

This commit is contained in:
Mikael Nordfeldth 2013-09-09 23:05:33 +02:00
parent 747fe9d59b
commit a9c4bcd71f
57 changed files with 4 additions and 122 deletions

View File

@ -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.

View File

@ -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

View File

@ -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.

View File

@ -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.

View File

@ -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;

View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -34,8 +34,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apiauth.php';
/**
* Show a stream of notices in a particular conversation
*

View File

@ -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
*

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -33,8 +33,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apibareauth.php';
/**
* Outputs detailed information about the relationship between two users
*

View File

@ -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.
*

View File

@ -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.
*

View File

@ -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
*

View File

@ -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
*

View File

@ -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.
*

View File

@ -31,8 +31,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apiauth.php';
/**
* API analog to the group edit page
*

View File

@ -30,8 +30,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apibareauth.php';
class ApiListAction extends ApiBareAuthAction
{
/**

View File

@ -30,8 +30,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apibareauth.php';
/**
* Action handler for Twitter list_memeber methods
*

View File

@ -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)

View File

@ -30,8 +30,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apibareauth.php';
/**
* Action handler for Twitter list_memeber methods
*

View File

@ -29,8 +29,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apiauth.php';
class ApiListSubscriberAction extends ApiBareAuthAction
{
var $list = null;

View File

@ -31,8 +31,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apibareauth.php';
class ApiListSubscriptionsAction extends ApiBareAuthAction
{
var $lists = array();

View File

@ -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.

View File

@ -38,8 +38,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apiauth.php';
/**
* Deletes one of the authenticating user's statuses (notices).
*

View File

@ -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
*

View File

@ -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
*

View File

@ -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).
*

View File

@ -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

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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)
*

View File

@ -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
*

View File

@ -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
*

View File

@ -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
*

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -34,8 +34,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apiauth.php';
/**
* Feed of ActivityStreams 'favorite' actions
*

View File

@ -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
*

View File

@ -34,8 +34,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apiauth.php';
/**
* Show a single favorite in Atom Activity Streams format.
*

View File

@ -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
*

View File

@ -34,8 +34,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apiauth.php';
/**
* Show a single subscription
*

View File

@ -34,8 +34,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apiauth.php';
/**
* Subscription feed class for AtomPub
*

View File

@ -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
*

View File

@ -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

View File

@ -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

View File

@ -29,8 +29,6 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/apibareauth.php';
class ApiListUsersAction extends ApiBareAuthAction
{
var $list = null;

View File

@ -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
*

View File

@ -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

View File

@ -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.