doxygen gets tripped up by 'if (! function_exists' - but this construct no longer has value anyway.
This commit is contained in:
parent
ea3940c4b0
commit
b1f9c19ef9
103
boot.php
103
boot.php
@ -454,7 +454,7 @@ function startup() {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if(! class_exists('App')) {
|
|
||||||
class App {
|
class App {
|
||||||
|
|
||||||
|
|
||||||
@ -903,17 +903,16 @@ if(! class_exists('App')) {
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// retrieve the App structure
|
// retrieve the App structure
|
||||||
// useful in functions which require it but don't get it passed to them
|
// useful in functions which require it but don't get it passed to them
|
||||||
|
|
||||||
if(! function_exists('get_app')) {
|
function get_app() {
|
||||||
function get_app() {
|
|
||||||
global $a;
|
global $a;
|
||||||
return $a;
|
return $a;
|
||||||
}
|
}
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// Multi-purpose function to check variable state.
|
// Multi-purpose function to check variable state.
|
||||||
@ -922,8 +921,8 @@ if(! function_exists('get_app')) {
|
|||||||
// if variable is set, returns 1 if has 'non-zero' value, otherwise returns 0.
|
// if variable is set, returns 1 if has 'non-zero' value, otherwise returns 0.
|
||||||
// e.g. x('') or x(0) returns 0;
|
// e.g. x('') or x(0) returns 0;
|
||||||
|
|
||||||
if(! function_exists('x')) {
|
|
||||||
function x($s,$k = NULL) {
|
function x($s,$k = NULL) {
|
||||||
if($k != NULL) {
|
if($k != NULL) {
|
||||||
if((is_array($s)) && (array_key_exists($k,$s))) {
|
if((is_array($s)) && (array_key_exists($k,$s))) {
|
||||||
if($s[$k])
|
if($s[$k])
|
||||||
@ -941,21 +940,21 @@ if(! function_exists('x')) {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// called from db initialisation if db is dead.
|
// called from db initialisation if db is dead.
|
||||||
|
|
||||||
if(! function_exists('system_unavailable')) {
|
|
||||||
function system_unavailable() {
|
function system_unavailable() {
|
||||||
include('system_unavailable.php');
|
include('system_unavailable.php');
|
||||||
system_down();
|
system_down();
|
||||||
killme();
|
killme();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function clean_urls() {
|
function clean_urls() {
|
||||||
global $a;
|
global $a;
|
||||||
// if($a->config['system']['clean_urls'])
|
// if($a->config['system']['clean_urls'])
|
||||||
@ -992,7 +991,7 @@ function is_ajax() {
|
|||||||
// $_SERVER variables, and synchronising the state of installed plugins.
|
// $_SERVER variables, and synchronising the state of installed plugins.
|
||||||
|
|
||||||
|
|
||||||
if(! function_exists('check_config')) {
|
|
||||||
function check_config(&$a) {
|
function check_config(&$a) {
|
||||||
|
|
||||||
$build = get_config('system','db_version');
|
$build = get_config('system','db_version');
|
||||||
@ -1135,14 +1134,14 @@ function check_config(&$a) {
|
|||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// wrapper for adding a login box. If $register == true provide a registration
|
// wrapper for adding a login box. If $register == true provide a registration
|
||||||
// link. This will most always depend on the value of $a->config['system']['register_policy'].
|
// link. This will most always depend on the value of $a->config['system']['register_policy'].
|
||||||
// returns the complete html for inserting into the page
|
// returns the complete html for inserting into the page
|
||||||
|
|
||||||
if(! function_exists('login')) {
|
|
||||||
function login($register = false, $form_id = 'main-login', $hiddens=false) {
|
function login($register = false, $form_id = 'main-login', $hiddens=false) {
|
||||||
$a = get_app();
|
$a = get_app();
|
||||||
$o = "";
|
$o = "";
|
||||||
@ -1196,25 +1195,25 @@ if(! function_exists('login')) {
|
|||||||
|
|
||||||
return $o;
|
return $o;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Used to end the current process, after saving session state.
|
// Used to end the current process, after saving session state.
|
||||||
|
|
||||||
if(! function_exists('killme')) {
|
|
||||||
function killme() {
|
function killme() {
|
||||||
session_write_close();
|
session_write_close();
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// redirect to another URL and terminate this process.
|
// redirect to another URL and terminate this process.
|
||||||
|
|
||||||
if(! function_exists('goaway')) {
|
|
||||||
function goaway($s) {
|
function goaway($s) {
|
||||||
header("Location: $s");
|
header("Location: $s");
|
||||||
killme();
|
killme();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
function get_account_id() {
|
function get_account_id() {
|
||||||
if(get_app()->account)
|
if(get_app()->account)
|
||||||
@ -1225,53 +1224,53 @@ function get_account_id() {
|
|||||||
|
|
||||||
// Returns the entity id of locally logged in user or false.
|
// Returns the entity id of locally logged in user or false.
|
||||||
|
|
||||||
if(! function_exists('local_user')) {
|
|
||||||
function local_user() {
|
function local_user() {
|
||||||
if((x($_SESSION,'authenticated')) && (x($_SESSION,'uid')))
|
if((x($_SESSION,'authenticated')) && (x($_SESSION,'uid')))
|
||||||
return intval($_SESSION['uid']);
|
return intval($_SESSION['uid']);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Returns contact id of authenticated site visitor or false
|
// Returns contact id of authenticated site visitor or false
|
||||||
|
|
||||||
if(! function_exists('remote_user')) {
|
|
||||||
function remote_user() {
|
function remote_user() {
|
||||||
if((x($_SESSION,'authenticated')) && (x($_SESSION,'visitor_id')))
|
if((x($_SESSION,'authenticated')) && (x($_SESSION,'visitor_id')))
|
||||||
return $_SESSION['visitor_id'];
|
return $_SESSION['visitor_id'];
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// contents of $s are displayed prominently on the page the next time
|
// contents of $s are displayed prominently on the page the next time
|
||||||
// a page is loaded. Usually used for errors or alerts.
|
// a page is loaded. Usually used for errors or alerts.
|
||||||
|
|
||||||
if(! function_exists('notice')) {
|
|
||||||
function notice($s) {
|
function notice($s) {
|
||||||
$a = get_app();
|
$a = get_app();
|
||||||
if(! x($_SESSION,'sysmsg')) $_SESSION['sysmsg'] = array();
|
if(! x($_SESSION,'sysmsg')) $_SESSION['sysmsg'] = array();
|
||||||
if($a->interactive)
|
if($a->interactive)
|
||||||
$_SESSION['sysmsg'][] = $s;
|
$_SESSION['sysmsg'][] = $s;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if(! function_exists('info')) {
|
|
||||||
function info($s) {
|
function info($s) {
|
||||||
$a = get_app();
|
$a = get_app();
|
||||||
if(! x($_SESSION,'sysmsg_info')) $_SESSION['sysmsg_info'] = array();
|
if(! x($_SESSION,'sysmsg_info')) $_SESSION['sysmsg_info'] = array();
|
||||||
if($a->interactive)
|
if($a->interactive)
|
||||||
$_SESSION['sysmsg_info'][] = $s;
|
$_SESSION['sysmsg_info'][] = $s;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// wrapper around config to limit the text length of an incoming message
|
// wrapper around config to limit the text length of an incoming message
|
||||||
|
|
||||||
if(! function_exists('get_max_import_size')) {
|
|
||||||
function get_max_import_size() {
|
function get_max_import_size() {
|
||||||
global $a;
|
global $a;
|
||||||
return ((x($a->config,'max_import_size')) ? $a->config['max_import_size'] : 0 );
|
return ((x($a->config,'max_import_size')) ? $a->config['max_import_size'] : 0 );
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -1296,7 +1295,7 @@ if(! function_exists('get_max_import_size')) {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if(! function_exists('profile_load')) {
|
|
||||||
function profile_load(&$a, $nickname, $profile = 0) {
|
function profile_load(&$a, $nickname, $profile = 0) {
|
||||||
|
|
||||||
$user = q("select channel_id from channel where channel_address = '%s' limit 1",
|
$user = q("select channel_id from channel where channel_address = '%s' limit 1",
|
||||||
@ -1386,7 +1385,7 @@ function profile_load(&$a, $nickname, $profile = 0) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}}
|
}
|
||||||
|
|
||||||
function profile_create_sidebar(&$a) {
|
function profile_create_sidebar(&$a) {
|
||||||
|
|
||||||
@ -1413,7 +1412,7 @@ function profile_create_sidebar(&$a) {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
if(! function_exists('profile_sidebar')) {
|
|
||||||
function profile_sidebar($profile, $block = 0) {
|
function profile_sidebar($profile, $block = 0) {
|
||||||
|
|
||||||
$a = get_app();
|
$a = get_app();
|
||||||
@ -1528,11 +1527,11 @@ if(! function_exists('profile_sidebar')) {
|
|||||||
|
|
||||||
return $o;
|
return $o;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// FIXME
|
// FIXME
|
||||||
|
|
||||||
if(! function_exists('get_birthdays')) {
|
|
||||||
function get_birthdays() {
|
function get_birthdays() {
|
||||||
|
|
||||||
$a = get_app();
|
$a = get_app();
|
||||||
@ -1607,11 +1606,11 @@ if(! function_exists('get_birthdays')) {
|
|||||||
|
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// FIXME
|
// FIXME
|
||||||
|
|
||||||
if(! function_exists('get_events')) {
|
|
||||||
function get_events() {
|
function get_events() {
|
||||||
|
|
||||||
require_once('include/bbcode.php');
|
require_once('include/bbcode.php');
|
||||||
@ -1678,7 +1677,7 @@ if(! function_exists('get_events')) {
|
|||||||
'$events' => $r,
|
'$events' => $r,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1695,7 +1694,7 @@ if(! function_exists('get_events')) {
|
|||||||
* $cmd and string args are surrounded with ""
|
* $cmd and string args are surrounded with ""
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if(! function_exists('proc_run')) {
|
|
||||||
function proc_run($cmd){
|
function proc_run($cmd){
|
||||||
|
|
||||||
$a = get_app();
|
$a = get_app();
|
||||||
@ -1737,9 +1736,9 @@ if(! function_exists('proc_run')) {
|
|||||||
else
|
else
|
||||||
proc_close(proc_open($cmdline." &",array(),$foo));
|
proc_close(proc_open($cmdline." &",array(),$foo));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if(! function_exists('current_theme')) {
|
|
||||||
|
|
||||||
function current_theme(){
|
function current_theme(){
|
||||||
$app_base_themes = array('redbasic');
|
$app_base_themes = array('redbasic');
|
||||||
|
|
||||||
@ -1780,13 +1779,13 @@ if(! function_exists('current_theme')) {
|
|||||||
return (str_replace('view/theme/','', substr($fallback[0],0,-10)));
|
return (str_replace('view/theme/','', substr($fallback[0],0,-10)));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Return full URL to theme which is currently in effect.
|
* Return full URL to theme which is currently in effect.
|
||||||
* Provide a sane default if nothing is chosen or the specified theme does not exist.
|
* Provide a sane default if nothing is chosen or the specified theme does not exist.
|
||||||
*/
|
*/
|
||||||
if(! function_exists('current_theme_url')) {
|
|
||||||
function current_theme_url() {
|
function current_theme_url() {
|
||||||
global $a;
|
global $a;
|
||||||
$t = current_theme();
|
$t = current_theme();
|
||||||
@ -1794,7 +1793,7 @@ if(! function_exists('current_theme_url')) {
|
|||||||
return('view/theme/' . $t . '/php/style.pcss');
|
return('view/theme/' . $t . '/php/style.pcss');
|
||||||
return('view/theme/' . $t . '/css/style.css');
|
return('view/theme/' . $t . '/css/style.css');
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
function z_birthday($dob,$tz,$format="Y-m-d H:i:s") {
|
function z_birthday($dob,$tz,$format="Y-m-d H:i:s") {
|
||||||
|
|
||||||
@ -1817,7 +1816,7 @@ function z_birthday($dob,$tz,$format="Y-m-d H:i:s") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(! function_exists('feed_birthday')) {
|
|
||||||
function feed_birthday($uid,$tz) {
|
function feed_birthday($uid,$tz) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1863,10 +1862,10 @@ if(! function_exists('feed_birthday')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return $birthday;
|
return $birthday;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(! function_exists('is_site_admin')) {
|
|
||||||
function is_site_admin() {
|
function is_site_admin() {
|
||||||
$a = get_app();
|
$a = get_app();
|
||||||
if((intval($_SESSION['authenticated']))
|
if((intval($_SESSION['authenticated']))
|
||||||
@ -1874,10 +1873,10 @@ function is_site_admin() {
|
|||||||
&& ($a->account['account_roles'] & ACCOUNT_ROLE_ADMIN))
|
&& ($a->account['account_roles'] & ACCOUNT_ROLE_ADMIN))
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
}}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(! function_exists('load_contact_links')) {
|
|
||||||
function load_contact_links($uid) {
|
function load_contact_links($uid) {
|
||||||
|
|
||||||
$a = get_app();
|
$a = get_app();
|
||||||
@ -1903,9 +1902,9 @@ if(! function_exists('load_contact_links')) {
|
|||||||
$a->contacts = $ret;
|
$a->contacts = $ret;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if(! function_exists('profile_tabs')){
|
|
||||||
|
|
||||||
function profile_tabs($a, $is_owner=False, $nickname=Null){
|
function profile_tabs($a, $is_owner=False, $nickname=Null){
|
||||||
//echo "<pre>"; var_dump($a->user); killme();
|
//echo "<pre>"; var_dump($a->user); killme();
|
||||||
|
|
||||||
@ -1962,7 +1961,7 @@ if(! function_exists('profile_tabs')){
|
|||||||
|
|
||||||
return replace_macros($tpl,array('$tabs' => $arr['tabs']));
|
return replace_macros($tpl,array('$tabs' => $arr['tabs']));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
function get_my_url() {
|
function get_my_url() {
|
||||||
if(x($_SESSION,'my_url'))
|
if(x($_SESSION,'my_url'))
|
||||||
|
7
util/Doxyfile
Normal file
7
util/Doxyfile
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
PROJECT_NAME = red
|
||||||
|
INPUT = mod include boot.php
|
||||||
|
OUTPUT_DIRECTORY = docs
|
||||||
|
GENERATE_HTML = YES
|
||||||
|
HTML_OUTPUT = html/
|
||||||
|
HTML_FILE_EXTENSION = .html
|
||||||
|
GENERATE_LATEX = NO
|
Reference in New Issue
Block a user