We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit febe9ec1 authored by tobyink's avatar tobyink

Try this.

parent d7ae7fd7
......@@ -26,10 +26,10 @@ require_once('data/TagCloud.php');
# This function tends to be quite useful. Might move it somewhere else so
# that it can be included and reused in other files.
function ifsetor (&$value, $fallback)
function getPostVar ($postvar, $fallback)
{
if (isset($value))
return $value;
if (isset($_POST[$postvar]))
return $_POST[$postvar];
return $fallback;
}
......@@ -110,13 +110,13 @@ if(isset($user->name))
$smarty->assign('email', $user->email);
# This is what we're going to let them change.
$smarty->assign("id", ifsetor($_POST['id'], $user->id));
$smarty->assign('fullname', ifsetor($_POST['fullname'], $user->fullname));
$smarty->assign('bio', ifsetor($_POST['bio'], $user->bio));
$smarty->assign('homepage', ifsetor($_POST['homepage'], $user->homepage));
$smarty->assign('location', ifsetor($_POST['location'], $user->location));
$smarty->assign('location_uri', ifsetor($_POST['location_uri'], $user->location_uri));
$smarty->assign('avatar_uri', ifsetor($_POST['avatar_uri'], $user->avatar_uri));
$smarty->assign("id", getPostVar('id', $user->id));
$smarty->assign('fullname', getPostVar('fullname', $user->fullname));
$smarty->assign('bio', getPostVar('bio', $user->bio));
$smarty->assign('homepage', getPostVar('homepage', $user->homepage));
$smarty->assign('location', getPostVar('location', $user->location));
$smarty->assign('location_uri', getPostVar('location_uri', $user->location_uri));
$smarty->assign('avatar_uri', getPostVar('avatar_uri', $user->avatar_uri));
# And display the page.
$smarty->assign('errors', $errors);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment