aboutsummaryrefslogtreecommitdiff
path: root/views/default
diff options
context:
space:
mode:
Diffstat (limited to 'views/default')
-rw-r--r--views/default/account/forms/register.php6
-rw-r--r--views/default/friends/picker.php2
-rw-r--r--views/default/output/friendlytitle.php7
3 files changed, 9 insertions, 6 deletions
diff --git a/views/default/account/forms/register.php b/views/default/account/forms/register.php
index b46e9df0b..580922eb7 100644
--- a/views/default/account/forms/register.php
+++ b/views/default/account/forms/register.php
@@ -13,7 +13,9 @@ $email = get_input('e');
$name = get_input('n');
$admin_option = false;
-if (($_SESSION['user']->isAdmin()) && ($vars['show_admin'])) {
+$loggedin_user = get_loggedin_user();
+
+if ($loggedin_user && $loggedin_user->isAdmin() && isset($vars['show_admin'])) {
$admin_option = true;
}
@@ -47,4 +49,4 @@ $form_body .= elgg_view('input/submit', array('internalname' => 'submit', 'value
</div>
<script type="text/javascript">
$(document).ready(function() { $('input[name=name]').focus(); });
-</script> \ No newline at end of file
+</script>
diff --git a/views/default/friends/picker.php b/views/default/friends/picker.php
index bca3e5e89..4b8d10111 100644
--- a/views/default/friends/picker.php
+++ b/views/default/friends/picker.php
@@ -79,7 +79,7 @@ if (is_array($vars['entities']) && sizeof($vars['entities'])) {
if (!isset($users[$letter])) {
$users[$letter] = array();
}
- $users[$letter][$user->name] = $user;
+ $users[$letter][$user->guid] = $user;
}
}
diff --git a/views/default/output/friendlytitle.php b/views/default/output/friendlytitle.php
index a92726f69..fbc4f39de 100644
--- a/views/default/output/friendlytitle.php
+++ b/views/default/output/friendlytitle.php
@@ -8,11 +8,12 @@
$title = $vars['title'];
-
-$title = trim($title);
-$title = strtolower($title);
+
+//$title = iconv('UTF-8', 'ASCII//TRANSLIT', $title);
$title = preg_replace("/[^\w ]/","",$title);
$title = str_replace(" ","-",$title);
$title = str_replace("--","-",$title);
+$title = trim($title);
+$title = strtolower($title);
echo $title;