Update prepare() method on Action subclasses.

Fixes handle()-related strict warnings such as "Strict Standards:
Declaration of AdminPanelAction::prepare() should be compatible with
Action::prepare(array $args = Array)

Ref. #190
This commit is contained in:
Chimo 2016-06-01 02:21:50 +00:00
parent ba2975aac8
commit 9de79f0a36
91 changed files with 91 additions and 91 deletions

View File

@ -65,7 +65,7 @@ class AddpeopletagAction extends Action
*
* @return boolean success flag
*/
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);

View File

@ -54,7 +54,7 @@ class ApiAccountUpdateDeliveryDeviceAction extends ApiAuthAction
*
* @return boolean success flag
*/
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);

View File

@ -51,7 +51,7 @@ class ApiAtomServiceAction extends ApiBareAuthAction
* @return boolean success flag
*
*/
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);
$this->user = $this->getTargetUser($this->arg('id'));

View File

@ -58,7 +58,7 @@ class ApiGroupListAllAction extends ApiPrivateAuthAction
*
* @return boolean success flag
*/
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);

View File

@ -33,7 +33,7 @@ class ApiListSubscriberAction extends ApiBareAuthAction
{
var $list = null;
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);

View File

@ -60,7 +60,7 @@ class ApiOAuthAuthorizeAction extends ApiOAuthAction
return false;
}
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);

View File

@ -49,7 +49,7 @@ class ApiOAuthRequestTokenAction extends ApiOAuthAction
*
* @return boolean success flag
*/
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);

View File

@ -88,7 +88,7 @@ class ApiSearchAtomAction extends ApiPrivateAuthAction
*
* @return boolean success
*/
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);

View File

@ -57,7 +57,7 @@ class ApiSearchJSONAction extends ApiPrivateAuthAction
*
* @return boolean true if nothing goes wrong
*/
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);

View File

@ -53,7 +53,7 @@ class ApiTrendsAction extends ApiPrivateAuthAction
*
* @return boolean false if user doesn't exist
*/
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);
return true;

View File

@ -50,7 +50,7 @@ class ApprovegroupAction extends Action
/**
* Prepare to run
*/
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);

View File

@ -50,7 +50,7 @@ class ApprovesubAction extends Action
/**
* Prepare to run
*/
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);

View File

@ -53,7 +53,7 @@ class BlockAction extends ProfileFormAction
*
* @return boolean success flag
*/
function prepare($args)
function prepare(array $args = array())
{
if (!parent::prepare($args)) {
return false;

View File

@ -50,7 +50,7 @@ class CancelgroupAction extends Action
/**
* Prepare to run
*/
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);

View File

@ -51,7 +51,7 @@ class DeleteapplicationAction extends Action
*
* @return boolean success flag
*/
function prepare($args)
function prepare(array $args = array())
{
if (!parent::prepare($args)) {
return false;

View File

@ -55,7 +55,7 @@ class DeletegroupAction extends RedirectingAction
* @fixme merge common setup code with other group actions
* @fixme allow group admins to delete their own groups
*/
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);

View File

@ -57,7 +57,7 @@ class EditApplicationAction extends Action
/**
* Prepare to run
*/
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);

View File

@ -60,7 +60,7 @@ class EditpeopletagAction extends Action
* Prepare to run
*/
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);

View File

@ -54,7 +54,7 @@ class FeaturedAction extends Action
return true;
}
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);
$this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;

View File

@ -35,7 +35,7 @@ class FoafGroupAction extends Action
return true;
}
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);

View File

@ -47,7 +47,7 @@ class GeocodeAction extends Action
var $lon = null;
var $location = null;
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);
$token = $this->trimmed('token');

View File

@ -49,7 +49,7 @@ class GrantRoleAction extends ProfileFormAction
*
* @return boolean success flag
*/
function prepare($args)
function prepare(array $args = array())
{
if (!parent::prepare($args)) {
return false;

View File

@ -52,7 +52,7 @@ class GroupblockAction extends RedirectingAction
*
* @return boolean success flag
*/
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);
if (!common_logged_in()) {

View File

@ -67,7 +67,7 @@ class GroupsAction extends Action
}
}
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);
$this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;

View File

@ -52,7 +52,7 @@ class GroupunblockAction extends Action
*
* @return boolean success flag
*/
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);
if (!common_logged_in()) {

View File

@ -54,7 +54,7 @@ class MakeadminAction extends RedirectingAction
* @return boolean success flag
*/
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);
if (!common_logged_in()) {

View File

@ -50,7 +50,7 @@ class NoticesearchAction extends SearchAction
{
protected $q = null;
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);

View File

@ -53,7 +53,7 @@ class OtpAction extends Action
var $returnto;
var $lt;
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);

View File

@ -62,7 +62,7 @@ class PeopletagAction extends Action
}
}
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);
$this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;

View File

@ -44,7 +44,7 @@ class PeopletagautocompleteAction extends Action
*
* @return boolean success flag
*/
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);

View File

@ -53,7 +53,7 @@ class PeopletaggedAction extends Action
return true;
}
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);
$this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;

View File

@ -68,7 +68,7 @@ class PeopletagsbyuserAction extends Action
}
}
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);

View File

@ -54,7 +54,7 @@ class PeopletagsforuserAction extends Action
}
}
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);

View File

@ -53,7 +53,7 @@ class PeopletagsubscribersAction extends Action
return true;
}
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);
$this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;

View File

@ -56,7 +56,7 @@ class PeopletagsubscriptionsAction extends Action
}
}
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);

View File

@ -64,7 +64,7 @@ class PluginEnableAction extends Action
*
* @return boolean success flag
*/
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);

View File

@ -68,7 +68,7 @@ class ProfilecompletionAction extends Action
*
* @return boolean success flag
*/
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);

View File

@ -45,7 +45,7 @@ class ProfiletagbyidAction extends Action
return true;
}
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);

View File

@ -66,7 +66,7 @@ class RemovepeopletagAction extends Action
*
* @return boolean success flag
*/
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);

View File

@ -49,7 +49,7 @@ class RevokeRoleAction extends ProfileFormAction
*
* @return boolean success flag
*/
function prepare($args)
function prepare(array $args = array())
{
if (!parent::prepare($args)) {
return false;

View File

@ -85,7 +85,7 @@ class RsdAction extends Action
*
* @return boolean success flag
*/
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);

View File

@ -49,7 +49,7 @@ class SandboxAction extends ProfileFormAction
*
* @return boolean success flag
*/
function prepare($args)
function prepare(array $args = array())
{
if (!parent::prepare($args)) {
return false;

View File

@ -65,7 +65,7 @@ class ShowApplicationAction extends Action
*
* @return success flag
*/
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);

View File

@ -24,7 +24,7 @@ class SubeditAction extends Action
{
var $profile = null;
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);

View File

@ -64,7 +64,7 @@ class SubscribeAction extends Action
*
* @return boolean success flag
*/
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);

View File

@ -50,7 +50,7 @@ class SubscribepeopletagAction extends Action
/**
* Prepare to run
*/
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);

View File

@ -44,7 +44,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
*/
class UnblockAction extends ProfileFormAction
{
function prepare($args)
function prepare(array $args = array())
{
if (!parent::prepare($args)) {
return false;

View File

@ -49,7 +49,7 @@ class UnsandboxAction extends ProfileFormAction
*
* @return boolean success flag
*/
function prepare($args)
function prepare(array $args = array())
{
if (!parent::prepare($args)) {
return false;

View File

@ -51,7 +51,7 @@ class UnsubscribepeopletagAction extends Action
* Prepare to run
*/
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);

View File

@ -60,7 +60,7 @@ class AdminPanelAction extends Action
*
* @return boolean success flag
*/
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);

View File

@ -51,7 +51,7 @@ class ProfileFormAction extends RedirectingAction
*
* @return boolean success flag
*/
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);

View File

@ -57,7 +57,7 @@ class ApiTimelineBookmarksAction extends ApiBareAuthAction
*
* @return boolean success flag
*/
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);

View File

@ -59,7 +59,7 @@ class BookmarkforurlAction extends Action
*
* @return boolean true
*/
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);

View File

@ -60,7 +60,7 @@ class BookmarksAction extends Action
*
* @return boolean success flag
*/
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);

View File

@ -45,7 +45,7 @@ class ShortenAction extends Action
{
private $text;
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);
$this->groups=array();

View File

@ -62,7 +62,7 @@ class ShowmessageAction extends Action
*
* @return success flag
*/
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);

View File

@ -46,7 +46,7 @@ class MailboxAction extends Action
{
var $page = null;
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);

View File

@ -57,7 +57,7 @@ class GlobalApiAction extends Action
* @return boolean continuation flag
*/
function prepare($args)
function prepare(array $args = array())
{
GNUsocial::setApi(true); // reduce exception reports to aid in debugging

View File

@ -42,7 +42,7 @@ class TimelistAction extends Action {
*
* @return boolean true
*/
function prepare($args) {
function prepare(array $args = array()) {
parent::prepare($args);
$this->start = $this->arg('start');
$this->duration = $this->boolean('duration', false);

View File

@ -43,7 +43,7 @@ class UserautocompleteAction extends Action
*
* @return boolean true if nothing goes wrong
*/
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);
$this->query = $this->trimmed('term');

View File

@ -48,7 +48,7 @@ class FacebookdeauthorizeAction extends Action
*
* @return boolean true
*/
function prepare($args)
function prepare(array $args = array())
{
$this->facebook = Facebookclient::getFacebook();

View File

@ -37,7 +37,7 @@ class FacebookfinishloginAction extends Action
private $fbuser = null; // Facebook user object (JSON)
private $accessToken = null; // Access token provided by Facebook JS API
function prepare($args) {
function prepare(array $args = array()) {
parent::prepare($args);
// Check cookie for a valid access_token

View File

@ -57,7 +57,7 @@ class ApiFavoriteDestroyAction extends ApiAuthAction
*
* @return boolean success flag
*/
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);

View File

@ -95,7 +95,7 @@ class FavoritedAction extends Action
*
* @todo move queries from showContent() to here
*/
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);
$this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;

View File

@ -33,7 +33,7 @@ class NewphotoAction extends Action
{
var $user = null;
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);
$this->user = common_current_user();

View File

@ -36,7 +36,7 @@ class EditphotoAction extends Action
{
var $user = null;
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);
$args = $this->returnToArgs();

View File

@ -38,7 +38,7 @@ class PhotosAction extends Action
{
var $user = null;
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);

View File

@ -36,7 +36,7 @@ class PhotouploadAction extends Action
{
var $user = null;
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);
$this->user = common_current_user();

View File

@ -38,7 +38,7 @@ class BioAction extends Action
{
var $user = null;
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);

View File

@ -34,7 +34,7 @@ class PostvideoAction extends Action {
var $user = null;
var $url = null;
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);
$this->user = common_current_user();

View File

@ -34,7 +34,7 @@ class ShowvideoAction extends ShownoticeAction
protected $id = null;
protected $vid = null;
function prepare($args)
function prepare(array $args = array())
{
OwnerDesignAction::prepare($args);
$this->id = $this->trimmed('id');

View File

@ -42,7 +42,7 @@ if (!defined('GNUSOCIAL')) { exit(1); }
*/
class AllmapAction extends MapAction
{
function prepare($args)
function prepare(array $args = array())
{
if (parent::prepare($args)) {
$stream = new InboxNoticeStream($this->user->getProfile(), $this->scoped);

View File

@ -48,7 +48,7 @@ class MapAction extends Action
var $page = null;
var $notices = null;
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);

View File

@ -44,7 +44,7 @@ if (!defined('STATUSNET')) {
*/
class UsermapAction extends MapAction
{
function prepare($args)
function prepare(array $args = array())
{
if(parent::prepare($args)) {
$this->notice = empty($this->tag)

View File

@ -31,7 +31,7 @@ class OStatusTagAction extends OStatusInitAction
var $profile;
var $err;
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);

View File

@ -50,7 +50,7 @@ class OpenidserverAction extends Action
{
var $oserver;
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);
$this->oserver = oid_server();

View File

@ -51,7 +51,7 @@ class OpenidtrustAction extends Action
return _m('OpenID Identity Verification');
}
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);
common_ensure_session();

View File

@ -57,7 +57,7 @@ class LoggingAggregatorAction extends Action
*
* @return boolean false if user doesn't exist
*/
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);

View File

@ -50,7 +50,7 @@ class RSSCloudRequestNotifyAction extends Action
*
* @return boolean false if user doesn't exist
*/
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);

View File

@ -66,7 +66,7 @@ class HelloAction extends Action
*
* @return boolean success flag
*/
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);

View File

@ -63,7 +63,7 @@ class SearchsubAction extends Action
*
* @return boolean success flag
*/
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);
if ($this->boolean('ajax')) {

View File

@ -54,7 +54,7 @@ class ApiStatusesRetweetsAction extends ApiAuthAction
*
* @return boolean success flag
*/
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);

View File

@ -60,7 +60,7 @@ class ApiTimelineRetweetedByMeAction extends ApiAuthAction
* @return boolean success flag
*
*/
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);

View File

@ -59,7 +59,7 @@ class ApiTimelineRetweetsOfMeAction extends ApiAuthAction
*
* @return boolean success flag
*/
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);

View File

@ -45,7 +45,7 @@ class NoticesitemapAction extends SitemapAction
var $notices = null;
var $j = 0;
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);

View File

@ -45,7 +45,7 @@ class UsersitemapAction extends SitemapAction
var $users = null;
var $j = 0;
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);

View File

@ -45,7 +45,7 @@ class FavoritedSliceAction extends FavoritedAction
*
* @todo move queries from showContent() to here
*/
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);

View File

@ -63,7 +63,7 @@ class TagsubAction extends Action
*
* @return boolean success flag
*/
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);
if ($this->boolean('ajax')) {

View File

@ -52,7 +52,7 @@ class AdminprofileflagAction extends Action
*
* @return boolean success flag
*/
function prepare($args)
function prepare(array $args = array())
{
parent::prepare($args);

View File

@ -49,7 +49,7 @@ class ClearflagAction extends ProfileFormAction
*
* @return boolean success flag
*/
function prepare($args)
function prepare(array $args = array())
{
if (!parent::prepare($args)) {
return false;

View File

@ -49,7 +49,7 @@ class FlagprofileAction extends ProfileFormAction
*
* @return boolean success flag
*/
function prepare($args)
function prepare(array $args = array())
{
if (!parent::prepare($args)) {
return false;