|
|
|
@ -2565,6 +2565,22 @@ function api_is_anonymous($user_id = null, $db_check = false) { |
|
|
|
return isset($_user['is_anonymous']) && $_user['is_anonymous'] === true; |
|
|
|
return isset($_user['is_anonymous']) && $_user['is_anonymous'] === true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
|
|
|
* Returns a not found page |
|
|
|
|
|
|
|
* @todo use smarty to customize the not found page |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
function api_not_found($print_headers = false) { |
|
|
|
|
|
|
|
$origin = isset($_GET['origin']) ? $_GET['origin'] : ''; |
|
|
|
|
|
|
|
$show_headers = 0; |
|
|
|
|
|
|
|
if ((!headers_sent() || $print_headers) && $origin != 'learnpath') { |
|
|
|
|
|
|
|
$show_headers = 1; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
$tpl = new Template(null, $show_headers, $show_headers); |
|
|
|
|
|
|
|
$msg = get_lang('NotFound'); |
|
|
|
|
|
|
|
$tpl->assign('content', $msg); |
|
|
|
|
|
|
|
$tpl->display_one_col_template(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Displays message "You are not allowed here..." and exits the entire script. |
|
|
|
* Displays message "You are not allowed here..." and exits the entire script. |
|
|
|
* @param bool Whether or not to print headers (default = false -> does not print them) |
|
|
|
* @param bool Whether or not to print headers (default = false -> does not print them) |
|
|
|
|