Update handle() method on Action subclasses.

Fixes handle()-related strict warnings such as "Strict Standards:
Declaration of AdminPanelAction::handle() should be compatible with
Action::handle()"

Ref. #190
This commit is contained in:
Chimo 2016-06-01 02:05:11 +00:00
parent bd306bdb9f
commit ba2975aac8
103 changed files with 181 additions and 181 deletions

View File

@ -119,7 +119,7 @@ class AddpeopletagAction extends Action
*
* @return void
*/
function handle($args)
function handle()
{
// Throws exception on error
$ptag = Profile_tag::setTag($this->user->id, $this->tagged->id,

View File

@ -73,9 +73,9 @@ class ApiAccountUpdateDeliveryDeviceAction extends ApiAuthAction
*
* @return void
*/
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
if (!in_array($this->format, array('xml', 'json'))) {
$this->clientError(

View File

@ -71,9 +71,9 @@ class ApiAtomServiceAction extends ApiBareAuthAction
*
* @return void
*/
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
header('Content-Type: application/atomsvc+xml');

View File

@ -77,9 +77,9 @@ class ApiGroupListAllAction extends ApiPrivateAuthAction
*
* @return void
*/
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
$sitename = common_config('site', 'name');
// TRANS: Message is used as a title when listing the lastest 20 groups. %s is a site name.

View File

@ -52,9 +52,9 @@ class ApiListSubscriberAction extends ApiBareAuthAction
return true;
}
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
$arr = array('profile_tag_id' => $this->list->id,
'profile_id' => $this->target->id);

View File

@ -52,9 +52,9 @@ class ApiOAuthAccessTokenAction extends ApiOAuthAction
*
* @return void
*/
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
$datastore = new ApiGNUsocialOAuthDataStore();
$server = new OAuthServer($datastore);

View File

@ -88,9 +88,9 @@ class ApiOAuthAuthorizeAction extends ApiOAuthAction
*
* @return void
*/
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
if ($_SERVER['REQUEST_METHOD'] == 'POST') {

View File

@ -69,9 +69,9 @@ class ApiOAuthRequestTokenAction extends ApiOAuthAction
*
* @return void
*/
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
$datastore = new ApiGNUsocialOAuthDataStore();
$server = new OAuthServer($datastore);

View File

@ -128,9 +128,9 @@ class ApiSearchAtomAction extends ApiPrivateAuthAction
*
* @return void
*/
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
common_debug("In apisearchatom handle()");
$this->showAtom();
}

View File

@ -95,9 +95,9 @@ class ApiSearchJSONAction extends ApiPrivateAuthAction
*
* @return void
*/
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
$this->showResults();
}

View File

@ -66,9 +66,9 @@ class ApiTrendsAction extends ApiPrivateAuthAction
*
* @return void
*/
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
$this->showTrends();
}

View File

@ -139,9 +139,9 @@ class ApprovegroupAction extends Action
*
* @return void
*/
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
try {
if ($this->approve) {

View File

@ -97,9 +97,9 @@ class ApprovesubAction extends Action
*
* @return void
*/
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
$cur = common_current_user();
try {

View File

@ -78,7 +78,7 @@ class BlockAction extends ProfileFormAction
*
* @return void
*/
function handle($args)
function handle()
{
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
if ($this->arg('no')) {

View File

@ -127,9 +127,9 @@ class CancelgroupAction extends Action
*
* @return void
*/
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
try {
$this->request->abort();

View File

@ -89,7 +89,7 @@ class DeleteapplicationAction extends Action
*
* @return void
*/
function handle($args)
function handle()
{
if ($_SERVER['REQUEST_METHOD'] == 'POST') {

View File

@ -114,9 +114,9 @@ class DeletegroupAction extends RedirectingAction
*
* @return void
*/
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
if ($this->arg('no')) {
$this->returnToPrevious();

View File

@ -80,7 +80,7 @@ class DeleteuserAction extends ProfileFormAction
*
* @return void
*/
function handle($args)
function handle()
{
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
if ($this->arg('no')) {

View File

@ -94,9 +94,9 @@ class EditApplicationAction extends Action
*
* @return void
*/
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$this->handlePost($args);

View File

@ -135,9 +135,9 @@ class EditpeopletagAction extends Action
*
* @return void
*/
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$this->trySave();
} else {

View File

@ -74,9 +74,9 @@ class FeaturedAction extends Action
}
}
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
$this->showPage();
}

View File

@ -76,9 +76,9 @@ class FoafGroupAction extends Action
return true;
}
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
header('Content-Type: application/rdf+xml');

View File

@ -70,7 +70,7 @@ class GeocodeAction extends Action
* @return nothing
*
*/
function handle($args)
function handle()
{
header('Content-Type: application/json; charset=utf-8');
$location_object = array();

View File

@ -110,9 +110,9 @@ class GroupblockAction extends RedirectingAction
*
* @return void
*/
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
if ($this->arg('no')) {
$this->returnToPrevious();

View File

@ -74,9 +74,9 @@ class GroupsAction extends Action
return true;
}
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
$this->showPage();
}

View File

@ -103,9 +103,9 @@ class GroupunblockAction extends Action
*
* @return void
*/
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$this->unblockProfile();
}

View File

@ -38,9 +38,9 @@ class InviteAction extends Action
return false;
}
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
if (!common_config('invite', 'enabled')) {
// TRANS: Client error displayed when trying to sent invites while they have been disabled.
$this->clientError(_('Invites have been disabled.'));

View File

@ -111,9 +111,9 @@ class MakeadminAction extends RedirectingAction
* @return void
*/
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$this->makeAdmin();
}

View File

@ -55,9 +55,9 @@ class NudgeAction extends Action
*
* @return nothing
*/
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
if (!common_logged_in()) {
// TRANS: Error message displayed when trying to perform an action that requires a logged in user.

View File

@ -53,9 +53,9 @@ class OpensearchAction extends Action
*
* @return boolean false if user doesn't exist
*/
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
$type = $this->trimmed('type');
$short_name = '';
if ($type == 'people') {

View File

@ -110,9 +110,9 @@ class OtpAction extends Action
return true;
}
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
// success!
if (!common_set_user($this->user)) {

View File

@ -84,9 +84,9 @@ class PeopletagAction extends Action
return true;
}
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
$this->showPage();
}

View File

@ -112,7 +112,7 @@ class PeopletagautocompleteAction extends Action
*
* @return void
*/
function handle($args)
function handle()
{
//common_log(LOG_DEBUG, 'Autocomplete data: ' . json_encode($this->tags));
if ($this->tags) {

View File

@ -117,9 +117,9 @@ class PeopletaggedAction extends Action
}
}
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
$this->showPage();
}

View File

@ -135,9 +135,9 @@ class PeopletagsbyuserAction extends Action
return true;
}
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
# Post from the tag dropdown; redirect to a GET

View File

@ -95,9 +95,9 @@ class PeopletagsforuserAction extends Action
return true;
}
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
$this->showPage();
}

View File

@ -117,9 +117,9 @@ class PeopletagsubscribersAction extends Action
}
}
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
$this->showPage();
}

View File

@ -97,9 +97,9 @@ class PeopletagsubscriptionsAction extends Action
return true;
}
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
$this->showPage();
}

View File

@ -121,7 +121,7 @@ class PluginEnableAction extends Action
*
* @return void
*/
function handle($args)
function handle()
{
$key = 'disable-' . $this->plugin;
Config::save('plugins', $key, $this->overrideValue());

View File

@ -120,7 +120,7 @@ class ProfilecompletionAction extends Action
* @return void
*/
function handle($args)
function handle()
{
$this->msg = null;

View File

@ -83,7 +83,7 @@ class ProfiletagbyidAction extends Action
*
* @return void
*/
function handle($args)
function handle()
{
common_redirect($this->peopletag->homeUrl(), 303);
}

View File

@ -92,9 +92,9 @@ class PublictagcloudAction extends Action
$this->elementEnd('div');
}
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
$this->showPage();
}

View File

@ -29,9 +29,9 @@ class RecoverpasswordAction extends Action
var $msg = null;
var $success = null;
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
if (common_logged_in()) {
// TRANS: Client error displayed trying to recover password while already logged in.
$this->clientError(_('You are already logged in!'));

View File

@ -63,7 +63,7 @@ class RedirectAction extends Action
*
* @return nothing
*/
function handle($args)
function handle()
{
common_redirect(common_local_url($this->arg('nextAction'), $this->arg('args')));
}

View File

@ -120,9 +120,9 @@ class RegisterAction extends Action
*
* @return void
*/
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
if (common_config('site', 'closed')) {
// TRANS: Client error displayed when trying to register to a closed site.

View File

@ -120,7 +120,7 @@ class RemovepeopletagAction extends Action
*
* @return void
*/
function handle($args)
function handle()
{
// Throws exception on error

View File

@ -126,7 +126,7 @@ class RsdAction extends Action
*
* @return nothing
*/
function handle($args)
function handle()
{
header('Content-Type: application/rsd+xml');

View File

@ -101,9 +101,9 @@ class ShowApplicationAction extends Action
*
* @return void
*/
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
if ($_SERVER['REQUEST_METHOD'] == 'POST') {

View File

@ -58,9 +58,9 @@ class SubeditAction extends Action
return true;
}
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$cur = common_current_user();

View File

@ -118,7 +118,7 @@ class SubscribeAction extends Action
*
* @return void
*/
function handle($args)
function handle()
{
// Throws exception on error

View File

@ -106,9 +106,9 @@ class SubscribepeopletagAction extends Action
* @return void
*/
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
$cur = common_current_user();

View File

@ -22,9 +22,9 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
// @todo FIXME: documentation needed.
class SupAction extends Action
{
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
$seconds = $this->trimmed('seconds');

View File

@ -44,9 +44,9 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
*/
class UnsubscribeAction extends Action
{
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
if (!common_logged_in()) {
// TRANS: Error message displayed when trying to perform an action that requires a logged in user.
$this->clientError(_('Not logged in.'));

View File

@ -106,9 +106,9 @@ class UnsubscribepeopletagAction extends Action
*
* @return void
*/
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
$cur = common_current_user();

View File

@ -119,7 +119,7 @@ class AdminPanelAction extends Action
*
* @return void
*/
function handle($args)
function handle()
{
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$this->checkSessionToken();

View File

@ -96,9 +96,9 @@ class ProfileFormAction extends RedirectingAction
*
* @return void
*/
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
try {

View File

@ -56,9 +56,9 @@ class SearchAction extends Action
return true;
}
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
$this->showPage();
}

View File

@ -49,9 +49,9 @@ class AccountManagementControlDocumentAction extends Action
*
* @return void
*/
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
header('Content-Type: application/json; charset=utf-8');

View File

@ -49,9 +49,9 @@ class AccountManagementSessionStatusAction extends Action
*
* @return void
*/
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
$cur = common_current_user();
if(empty($cur)) {

View File

@ -106,7 +106,7 @@ class SpamAction extends Action
function handle($argarray=null)
{
parent::handle($args);
parent::handle();
$this->showPage();
}

View File

@ -47,9 +47,9 @@ class AnonDisfavorAction extends RedirectingAction
*
* @return void
*/
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
$profile = AnonymousFavePlugin::getAnonProfile();

View File

@ -47,9 +47,9 @@ class AnonFavorAction extends RedirectingAction
*
* @return void
*/
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
$profile = AnonymousFavePlugin::getAnonProfile();

View File

@ -82,9 +82,9 @@ class ApiTimelineBookmarksAction extends ApiBareAuthAction
*
* @return void
*/
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
$this->showTimeline();
}

View File

@ -107,9 +107,9 @@ class BookmarksAction extends Action
*
* @return void
*/
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
$this->showPage();
}

View File

@ -21,9 +21,9 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
class CasloginAction extends Action
{
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
if (common_is_real_login()) {
// TRANS: Client error displayed when trying to log in while already logged on.
$this->clientError(_m('Already logged in.'));

View File

@ -60,7 +60,7 @@ class ShortenAction extends Action
function handle($args=null)
{
parent::handle($args);
parent::handle();
header('Content-Type: text/plain');
$shortened_text = common_shorten_links($this->text);
print $shortened_text;

View File

@ -89,7 +89,7 @@ class ShowmessageAction extends Action
return true;
}
function handle($args)
function handle()
{
$this->showPage();
}

View File

@ -70,9 +70,9 @@ class MailboxAction extends Action
*
* @return void
*/
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
if (!$this->user) {
// TRANS: Client error displayed when trying to access a mailbox without providing a user.

View File

@ -56,9 +56,9 @@ class TimelistAction extends Action {
*
* @return void
*/
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
if (!common_logged_in()) {
// TRANS: Error message displayed when trying to perform an action that requires a logged in user.

View File

@ -57,9 +57,9 @@ class UserautocompleteAction extends Action
*
* @return void
*/
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
$this->showResults();
}

View File

@ -60,9 +60,9 @@ class FacebookdeauthorizeAction extends Action
*
* @param array $args is ignored since it's now passed in in prepare()
*/
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
$data = $this->facebook->getSignedRequest();

View File

@ -79,9 +79,9 @@ class FacebookfinishloginAction extends Action
return true;
}
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
if (common_is_real_login()) {

View File

@ -34,9 +34,9 @@ if (!defined('STATUSNET')) {
class FacebookloginAction extends Action
{
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
if (common_is_real_login()) {
// TRANS: Client error displayed when trying to login while already logged in.

View File

@ -82,9 +82,9 @@ class ApiFavoriteDestroyAction extends ApiAuthAction
*
* @return void
*/
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
if ($_SERVER['REQUEST_METHOD'] != 'POST') {
$this->clientError(

View File

@ -114,9 +114,9 @@ class FavoritedAction extends Action
*
* @return void
*/
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
$this->showPage();
}

View File

@ -50,9 +50,9 @@ class NewphotoAction extends Action
return true;
}
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
if ($this->isPost()) {
$this->handlePost($args);

View File

@ -46,9 +46,9 @@ class EditphotoAction extends Action
return true;
}
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
if($_SERVER['REQUEST_METHOD'] == 'POST') {
$this->handlePost();
}

View File

@ -53,9 +53,9 @@ class PhotosAction extends Action
return true;
}
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
$this->showPage();
}

View File

@ -43,9 +43,9 @@ class PhotouploadAction extends Action
return true;
}
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
if($_SERVER['REQUEST_METHOD'] == 'POST') {
$this->handlePost();
}

View File

@ -51,9 +51,9 @@ class BioAction extends Action
}
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
$this->showPage();
}

View File

@ -54,9 +54,9 @@ class PostvideoAction extends Action {
return true;
}
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
if ($this->isPost()) {
$this->handlePost($args);

View File

@ -46,7 +46,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
*/
class OembedproxyAction extends OembedAction
{
function handle($args)
function handle()
{
// Trigger short error responses; not a human-readable web page.
GNUsocial::setApi(true);

View File

@ -94,9 +94,9 @@ class MapAction extends Action
return true;
}
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
$this->showPage();
}

View File

@ -58,9 +58,9 @@ class FinishaddopenidAction extends Action
*
* @return void
*/
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
if (!common_logged_in()) {
// TRANS: Error message displayed when trying to perform an action that requires a logged in user.
$this->clientError(_m('Not logged in.'));

View File

@ -29,9 +29,9 @@ class FinishopenidloginAction extends Action
var $username = null;
var $message = null;
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
if (common_is_real_login()) {
// TRANS: Client error message trying to log on with OpenID while already logged on.
$this->clientError(_m('Already logged in.'));

View File

@ -25,9 +25,9 @@ require_once INSTALLDIR.'/plugins/OpenID/openid.php';
class OpenidloginAction extends Action
{
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
if (common_is_real_login()) {
// TRANS: Client error message trying to log on with OpenID while already logged on.
$this->clientError(_m('Already logged in.'));

View File

@ -57,9 +57,9 @@ class OpenidserverAction extends Action
return true;
}
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
$request = $this->oserver->decodeRequest();
if (in_array($request->mode, array('checkid_immediate',
'checkid_setup'))) {

View File

@ -71,9 +71,9 @@ class OpenidtrustAction extends Action
return true;
}
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
if($_SERVER['REQUEST_METHOD'] == 'POST'){
$this->handleSubmit();
}else{

View File

@ -359,9 +359,9 @@ class AutosubmitAction extends Action
var $form_html = null;
var $form_id = null;
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
$this->showPage();
}

View File

@ -77,9 +77,9 @@ class LoggingAggregatorAction extends Action
*
* @return void
*/
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
if (empty($this->url)) {
// TRANS: Form validation error displayed when a URL parameter is missing.

View File

@ -82,9 +82,9 @@ class RSSCloudRequestNotifyAction extends Action
*
* @return void
*/
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
if ($_SERVER['REQUEST_METHOD'] != 'POST') {
// TRANS: Form validation error displayed when POST is not used.

View File

@ -91,9 +91,9 @@ class HelloAction extends Action
*
* @return void
*/
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
$this->showPage();
}

View File

@ -118,7 +118,7 @@ class SearchsubAction extends Action
*
* @return void
*/
function handle($args)
function handle()
{
// Throws exception on error

View File

@ -62,7 +62,7 @@ class SearchunsubAction extends SearchsubAction
*
* @return void
*/
function handle($args)
function handle()
{
// Throws exception on error

View File

@ -89,9 +89,9 @@ class ApiStatusesRetweetsAction extends ApiAuthAction
*
* @return void
*/
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
$strm = $this->original->repeatStream($this->cnt);

View File

@ -83,9 +83,9 @@ class ApiTimelineRetweetsOfMeAction extends ApiAuthAction
*
* @return void
*/
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
$offset = ($this->page-1) * $this->cnt;
$limit = $this->cnt;

View File

@ -49,9 +49,9 @@ class SitemapAction extends Action
*
* @return void
*/
function handle($args)
function handle()
{
parent::handle($args);
parent::handle();
header('Content-Type: text/xml; charset=UTF-8');
$this->startXML();

View File

@ -49,7 +49,7 @@ class SitemapindexAction extends Action
*
* @return void
*/
function handle($args)
function handle()
{
header('Content-Type: text/xml; charset=UTF-8');
$this->startXML();

View File

@ -118,7 +118,7 @@ class TagsubAction extends Action
*
* @return void
*/
function handle($args)
function handle()
{
// Throws exception on error

View File

@ -62,7 +62,7 @@ class TagunsubAction extends TagsubAction
*
* @return void
*/
function handle($args)
function handle()
{
// Throws exception on error

Some files were not shown because too many files have changed in this diff Show More