index.php

Summary
index.php
Entry PointMain postActiv entry point
Helper functionsFunctions used to help bootstrap the application.
getPathReturns the path we are operating postActiv under.
handleErrorLogs and then displays error messages
formatBacktraceLineFormat a backtrace line for debug output roughly like debug_print_backtrace() does.
setupRWSets up read/write access to the underlying database
Entry points
isLoginActionReturns true of the index is being accessed as part of a login action, false if not
mainMain entry point for the server application

Entry Point

Main postActiv entry point

postActiv

the micro-blogging software

Copyright

Copyright © 2016-2017, Maiyannah Bishop

Derived from code copyright various sources

  • GNU Social © 2013-2016, Free Software Foundation, Inc
  • StatusNet © 2008-2012, StatusNet, Inc

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program.  If not, see http://www.gnu.org/licenses/.

https://www.gnu.org/licenses/agpl.html

About

Main postActiv entry point

Please note that the software will not execute if the install code is present on a live install.

Defines

  • INSTALLDIR - root directory of the install where index.php is running from
  • POSTACTIV - security constant
  • GNUSOCIAL - legacy security constant
  • STATUSNET - legacy security constant

PHP version

Tested with PHP 5.6, PHP 7

File Authors

Web

Summary
Helper functionsFunctions used to help bootstrap the application.
getPathReturns the path we are operating postActiv under.
handleErrorLogs and then displays error messages
formatBacktraceLineFormat a backtrace line for debug output roughly like debug_print_backtrace() does.
setupRWSets up read/write access to the underlying database
Entry points
isLoginActionReturns true of the index is being accessed as part of a login action, false if not
mainMain entry point for the server application

Helper functions

Functions used to help bootstrap the application.

getPath

function getPath($req)

Returns the path we are operating postActiv under.

Parameters

$req

Returns

string

handleError

function handleError($error)

Logs and then displays error messages

Parameters

$errorexception

Return

void

formatBacktraceLine

function formatBacktraceLine($n,
$line)

Format a backtrace line for debug output roughly like debug_print_backtrace() does.  Exceptions already have this built in, but PEAR error objects just give us the array.

Parameters

  • $n - int line number
  • $line - per-frame array item from debug_backtrace()

Returns

string

setupRW

function setupRW()

Sets up read/write access to the underlying database

Parameters

None

Returns

Void

Entry points

isLoginAction

function isLoginAction($action)

Returns true of the index is being accessed as part of a login action, false if not

Parameters

$action

Returns boolean

main

function main()

Main entry point for the server application

Parameters

None

Returns

Void

function getPath($req)
Returns the path we are operating postActiv under.
function handleError($error)
Logs and then displays error messages
function formatBacktraceLine($n,
$line)
Format a backtrace line for debug output roughly like debug_print_backtrace() does.
function setupRW()
Sets up read/write access to the underlying database
function isLoginAction($action)
Returns true of the index is being accessed as part of a login action, false if not
function main()
Main entry point for the server application