never use profile_load outside of a module's _init() function

This commit is contained in:
Zach Prezkuta 2013-01-03 10:47:45 -07:00
commit fdd142c42e
24 changed files with 214 additions and 164 deletions

View file

@ -1,13 +1,22 @@
<?php
function display_content(&$a, $update = 0) {
function display_init(&$a) {
if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) {
notice( t('Public access denied.') . EOL);
killme();
return;
}
$nick = (($a->argc > 1) ? $a->argv[1] : '');
profile_load($a,$nick);
}
function display_content(&$a, $update = 0) {
require_once("include/bbcode.php");
require_once('include/security.php');
require_once('include/conversation.php');
@ -25,7 +34,6 @@ function display_content(&$a, $update = 0) {
else {
$nick = (($a->argc > 1) ? $a->argv[1] : '');
}
profile_load($a,$nick);
if($update) {
$item_id = $_REQUEST['item_id'];