Documentation

ErrorLog
in package
implements ActionInterface uses ActionTrait

Shows a list of all errors that were logged on the forum, and allows filtering and deleting them.

Table of Contents

Interfaces

ActionInterface
Interface for all action classes.

Properties

$filter  : array<string|int, mixed>
$filters  : array<string|int, mixed>
$obj  : static

Methods

call()  : void
Convenience method to load() and execute() an instance of this class.
canBeLogged()  : bool
Determines whether this action can be logged in the online log.
canShowDebuggingInfo()  : bool
Determines whether debugging info should be shown.
canShowInMaintenanceMode()  : bool
Determines whether this action allows access in maintenance mode.
execute()  : void
Dispatcher to whichever method is necessary.
getOutputType()  : OutputTypeInterface
Gets the output type for this action.
isAgreementAction()  : bool
Determines whether this action can be accessed without accepting the registration agreement and privacy policy.
isRestrictedGuestAccessAllowed()  : bool
Determines whether this action allows access if guest access is restricted.
isSimpleAction()  : bool
Determines whether this is a simple action.
load()  : static
Static wrapper for constructor.
view()  : void
View the forum's error log.
viewBacktrace()  : void
View a backtrace specified in $_REQUEST['backtrace'], with PHP highlighting.
viewFile()  : void
View a file specified in $_REQUEST['file'], with PHP highlighting.
__construct()  : mixed
Constructor. Protected to force instantiation via self::load().
deleteErrors()  : void
Delete all or some of the errors in the error log.

Properties

$filter

public array<string|int, mixed> $filter

Info about the currently applied filter.

$filters

public array<string|int, mixed> $filters = ['id_member' => ['txt' => 'username', 'operator' => '=', 'datatype' => 'int'], 'ip' => ['txt' => 'ip_address', 'operator' => '=', 'datatype' => 'inet'], 'session' => ['txt' => 'session', 'operator' => 'LIKE', 'datatype' => 'string'], 'url' => ['txt' => 'error_url', 'operator' => 'LIKE', 'datatype' => 'string'], 'message' => ['txt' => 'error_message', 'operator' => 'LIKE', 'datatype' => 'string'], 'error_type' => ['txt' => 'error_type', 'operator' => 'LIKE', 'datatype' => 'string'], 'file' => ['txt' => 'file', 'operator' => 'LIKE', 'datatype' => 'string'], 'line' => ['txt' => 'line', 'operator' => '=', 'datatype' => 'int']]

Basic info about the available filters.

$obj

protected static static $obj

An instance of this class. This is used by the load() method to prevent multiple instantiations.

Methods

call()

Convenience method to load() and execute() an instance of this class.

public static call() : void

canBeLogged()

Determines whether this action can be logged in the online log.

public canBeLogged() : bool
Return values
bool

canShowDebuggingInfo()

Determines whether debugging info should be shown.

public canShowDebuggingInfo() : bool
Return values
bool

canShowInMaintenanceMode()

Determines whether this action allows access in maintenance mode.

public canShowInMaintenanceMode() : bool
Return values
bool

True if access is allowed, false otherwise.

execute()

Dispatcher to whichever method is necessary.

public execute() : void

isAgreementAction()

Determines whether this action can be accessed without accepting the registration agreement and privacy policy.

public isAgreementAction() : bool
Return values
bool

isRestrictedGuestAccessAllowed()

Determines whether this action allows access if guest access is restricted.

public isRestrictedGuestAccessAllowed() : bool
Return values
bool

True if access is allowed, false otherwise.

isSimpleAction()

Determines whether this is a simple action.

public isSimpleAction() : bool
Return values
bool

load()

Static wrapper for constructor.

public static load() : static
Return values
static

An instance of this class.

view()

View the forum's error log.

public view() : void

This function sets all the context up to show the error log for maintenance. It requires the maintain_forum permission. It is accessed from ?action=admin;area=logs;sa=errorlog.

viewBacktrace()

View a backtrace specified in $_REQUEST['backtrace'], with PHP highlighting.

public viewBacktrace() : void

Preconditions:

  • user must have admin_forum permission.

viewFile()

View a file specified in $_REQUEST['file'], with PHP highlighting.

public viewFile() : void

Preconditions:

  • file must be readable,
  • full file path must be base64 encoded,
  • user must have admin_forum permission.

The line number number is specified by $_REQUEST['line']... This method will try to get the 20 lines before and after the specified line.

__construct()

Constructor. Protected to force instantiation via self::load().

protected __construct() : mixed

deleteErrors()

Delete all or some of the errors in the error log.

protected deleteErrors() : void

It applies any necessary filters to deletion. It attempts to TRUNCATE the table to reset the auto_increment. Redirects back to the error log when done.


        
On this page

Search results