never use profile_load outside of a module's _init() function
This commit is contained in:
+10
-2
@@ -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'];
|
||||
|
||||
Reference in New Issue
Block a user