function profiles_post(&$a) {
if(! local_user()) {
- $_SESSION['sysmsg'] .= "Unauthorised." . EOL;
+ notice( "Permission denied." . EOL);
return;
}
if(($a->argc > 1) && ($a->argv[1] != "new") && intval($a->argv[1])) {
}
-
-
-
if(intval($a->argv[1])) {
$r = q("SELECT * FROM `profile` WHERE `id` = %d AND `uid` = %d LIMIT 1",
intval($a->argv[1]),
}
require_once('mod/profile.php');
- profile_load($a,$_SESSION['uid'],$r[0]['id']);
+ profile_load($a,$a->user['nickname'],$r[0]['id']);
require_once('view/profile_selectors.php');
$is_default = (($r[0]['is-default']) ? 1 : 0);
$tpl = file_get_contents("view/profile_edit.tpl");
$o .= replace_macros($tpl,array(
+ '$disabled' => (($is_default) ? 'onclick="return false;" style="color: #BBBBFF;"' : ''),
'$baseurl' => $a->get_baseurl(),
'$profile_id' => $r[0]['id'],
'$profile_name' => $r[0]['profile-name'],