From c66831fa5138a277a9729174caf14c7eb323fb07 Mon Sep 17 00:00:00 2001 From: brettp Date: Fri, 16 Oct 2009 20:26:12 +0000 Subject: Standardizing views.` git-svn-id: http://code.elgg.org/elgg/trunk@3555 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/friends/tablelist.php | 90 ++++---- views/default/friends/tablelistcountupdate.php | 27 +-- views/default/graphics/icon.php | 58 +++-- views/default/group/default.php | 18 +- views/default/group/search/finishblurb.php | 24 +- views/default/group/search/startblurb.php | 14 +- views/default/input/access.php | 102 +++++---- views/default/input/autocomplete.php | 123 ++++++----- views/default/input/button.php | 88 +++++--- views/default/input/calendar.php | 66 +++--- views/default/input/captcha.php | 16 +- views/default/input/checkboxes.php | 93 ++++---- views/default/input/email.php | 37 ++-- views/default/input/file.php | 41 ++-- views/default/input/form.php | 74 ++++--- views/default/input/hidden.php | 32 +-- views/default/input/longtext.php | 37 ++-- views/default/input/password.php | 39 ++-- views/default/input/plaintext.php | 39 ++-- views/default/input/pulldown.php | 80 ++++--- views/default/input/radio.php | 73 ++++--- views/default/input/reset.php | 47 ++-- views/default/input/securitytoken.php | 31 ++- views/default/input/submit.php | 49 +++-- views/default/input/tags.php | 78 +++---- views/default/input/text.php | 41 ++-- views/default/input/url.php | 39 ++-- views/default/input/urlshortener.php | 16 +- views/default/input/userpicker.php | 29 ++- views/default/js/initialise_elgg.php | 241 ++++++++++----------- views/default/messages/errors/error.php | 31 ++- views/default/messages/errors/list.php | 53 ++--- views/default/messages/exceptions/exception.php | 67 +++--- views/default/messages/list.php | 39 ++-- views/default/messages/messages/list.php | 56 ++--- views/default/messages/messages/message.php | 31 ++- views/default/navigation/pagination.php | 144 ++++++------ views/default/navigation/topbar_tools.php | 68 +++--- views/default/navigation/viewtype.php | 50 ++--- .../notifications/settings/usersettings.php | 53 +++-- views/default/object/default.php | 112 +++++----- views/default/object/object.php | 20 +- views/default/object/plugin.php | 29 ++- views/default/object/widget.php | 25 +-- views/default/output/calendar.php | 39 ++-- views/default/output/checkboxes.php | 32 ++- views/default/output/confirmlink.php | 67 +++--- views/default/output/date.php | 34 ++- views/default/output/email.php | 34 ++- views/default/output/iframe.php | 22 +- views/default/output/longtext.php | 32 ++- views/default/output/pulldown.php | 32 ++- views/default/output/radio.php | 32 ++- views/default/output/tagcloud.php | 90 ++++---- views/default/output/tags.php | 95 ++++---- views/default/output/text.php | 32 ++- views/default/output/url.php | 58 +++-- 57 files changed, 1518 insertions(+), 1601 deletions(-) (limited to 'views/default') diff --git a/views/default/friends/tablelist.php b/views/default/friends/tablelist.php index af37ff4ed..4581c04f7 100644 --- a/views/default/friends/tablelist.php +++ b/views/default/friends/tablelist.php @@ -1,64 +1,52 @@ - - - - - - +
-
- $entity, 'size' => 'tiny')); ?> -
-
-name; - -?> -
+ + + + + "; $column = 0; } - } - - -?> - - - -"; - echo "
+
+ $entity, 'size' => 'tiny')); ?> +
+
+ name; ?> +
"; } - - if (isset($vars['content'])) echo $vars['content']; -?> \ No newline at end of file +if ($column < 3 && $column != 0) echo ""; + echo ""; +} + +if (isset($vars['content'])) { + echo $vars['content']; +} \ No newline at end of file diff --git a/views/default/friends/tablelistcountupdate.php b/views/default/friends/tablelistcountupdate.php index 4c4e26c80..81a061439 100644 --- a/views/default/friends/tablelistcountupdate.php +++ b/views/default/friends/tablelistcountupdate.php @@ -1,19 +1,16 @@ diff --git a/views/default/graphics/icon.php b/views/default/graphics/icon.php index ca1bc2054..bc7c36e71 100644 --- a/views/default/graphics/icon.php +++ b/views/default/graphics/icon.php @@ -1,30 +1,40 @@
- + /> - +
\ No newline at end of file diff --git a/views/default/group/default.php b/views/default/group/default.php index a3fa96724..92594bf4a 100644 --- a/views/default/group/default.php +++ b/views/default/group/default.php @@ -1,12 +1,12 @@ \ No newline at end of file diff --git a/views/default/group/search/finishblurb.php b/views/default/group/search/finishblurb.php index caee030b7..4164c6713 100644 --- a/views/default/group/search/finishblurb.php +++ b/views/default/group/search/finishblurb.php @@ -1,15 +1,17 @@ $vars['threshold']) { +/** + * @package Elgg + * @subpackage Core + * @author Curverider Ltd + * @link http://elgg.org/ + */ +if ($vars['count'] > $vars['threshold']) { ?> -
+
+ +
\ No newline at end of file +} diff --git a/views/default/group/search/startblurb.php b/views/default/group/search/startblurb.php index c7f3a4e55..3abfe4dc5 100644 --- a/views/default/group/search/startblurb.php +++ b/views/default/group/search/startblurb.php @@ -1,8 +1,14 @@ +
-
\ No newline at end of file diff --git a/views/default/input/access.php b/views/default/input/access.php index 461fbf625..42247af61 100644 --- a/views/default/input/access.php +++ b/views/default/input/access.php @@ -1,55 +1,53 @@ 0) { + ?> + + name="" class=""> - $option) { - if ($key != $vars['value']) { - echo ""; - } else { - echo ""; - } - } - -?> - - - \ No newline at end of file + ?> + + $vars['match_on'], + 'match_owner' => $vars['match_owner'], +)); +$ac_url = $vars['url'] . 'pg/autocomplete?' . $ac_url_params; + +if (!isset($autocomplete_js_loaded)) { + $autocomplete_js_loaded = false; +} - /** - * Displays an autocomplete text input. - * - * @package Elgg - * @subpackage Core - * @author Curverider Ltd - * @link http://elgg.org/ - * - * @TODO: This currently only works for ONE AUTOCOMPLETE TEXT FIELD on a page. - * - * @uses $vars['value'] The current value, if any - * @uses $vars['js'] Any Javascript to enter into the input tag - * @uses $vars['internalname'] The name of the input field - * @uses $vars['match_on'] Array | str What to match on. all|array(group|user|friend|subtype) - * @uses $vars['match_owner'] Bool. Match only entities that are owned by logged in user. - * - */ - - global $autocomplete_js_loaded; - - $internalname = $vars['internalname']; - $value = $vars['value']; - - if(!$value) - $value= ''; - - if($vars['internal_id']) - $id_autocomplete = $vars['internal_id']; - - $ac_url_params = http_build_query(array( - 'match_on' => $vars['match_on'], - 'match_owner' => $vars['match_owner'], - )); - $ac_url = $vars['url'] . 'pg/autocomplete?' . $ac_url_params; - - if (!isset($autocomplete_js_loaded)) $autocomplete_js_loaded = false; - ?> - - - + + + +if (!$autocomplete_js_loaded) { + ?> - - - + + - - - - + + + wwwroot)===false) $src = ""; // blank src if trying to access an offsite image. +if (isset($vars['class'])) { + $class = $vars['class']; +} +if (!$class) { + $class = "submit_button"; +} + +if (isset($vars['type'])) { + $type = strtolower($vars['type']); +} else { + $type = 'submit'; +} + +switch ($type) { + case 'button' : + $type='button'; + break; + case 'reset' : + $type='reset'; + break; + case 'submit': + default: + $type = 'submit'; +} + +$value = htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); +if (isset($vars['internalname'])) { + $name = $vars['internalname']; +} +if (isset($vars['src'])) { + $src = "src=\"{$vars['src']}\""; +} +// blank src if trying to access an offsite image. +if (strpos($src,$CONFIG->wwwroot)===false) { + $src = ""; +} ?> type="" class="" value="" /> \ No newline at end of file diff --git a/views/default/input/calendar.php b/views/default/input/calendar.php index 9dd5b2dc0..12cbf95ec 100644 --- a/views/default/input/calendar.php +++ b/views/default/input/calendar.php @@ -1,44 +1,40 @@ - - + END; - $calendarjs = 1; - } - $strippedname = sanitise_string($vars['internalname']); - $js = "cal" . $strippedname; + $calendarjs = 1; +} +$strippedname = sanitise_string($vars['internalname']); +$js = "cal" . $strippedname; + +if ($vars['value'] > 86400) { + $val = date("F j, Y",$vars['value']); +} else { + $val = $vars['value']; +} - if ($vars['value'] > 86400) { - $val = date("F j, Y",$vars['value']); - } else { - $val = $vars['value']; - } - ?> name="" id="" value="" /> -select \ No newline at end of file +select \ No newline at end of file diff --git a/views/default/input/captcha.php b/views/default/input/captcha.php index f4ebc218a..d1d780e77 100644 --- a/views/default/input/captcha.php +++ b/views/default/input/captcha.php @@ -1,10 +1,10 @@ \ No newline at end of file diff --git a/views/default/input/checkboxes.php b/views/default/input/checkboxes.php index 4e806bbfc..7d03db257 100644 --- a/views/default/input/checkboxes.php +++ b/views/default/input/checkboxes.php @@ -1,52 +1,49 @@ options for the checkbox field + * + */ - /** - * Elgg checkbox input - * Displays a checkbox input field - * - * @package Elgg - * @subpackage Core +$class = $vars['class']; +if (!$class) { + $class = "input-checkboxes"; +} - * @author Curverider Ltd +foreach($vars['options'] as $label => $option) { + //if (!in_array($option,$vars['value'])) { + if (is_array($vars['value'])) { + $valarray = $vars['value']; + $valarray = array_map('strtolower', $valarray); + if (!in_array(strtolower($option),$valarray)) { + $selected = ""; + } else { + $selected = "checked = \"checked\""; + } + } else { + if (strtolower($option) != strtolower($vars['value'])) { + $selected = ""; + } else { + $selected = "checked = \"checked\""; + } + } + $labelint = (int) $label; + if ("{$label}" == "{$labelint}") { + $label = $option; + } - * @link http://elgg.org/ - * - * @uses $vars['value'] The current value, if any - * @uses $vars['js'] Any Javascript to enter into the input tag - * @uses $vars['internalname'] The name of the input field - * @uses $vars['options'] An array of strings representing the label => options for the checkbox field - * - */ - - $class = $vars['class']; - if (!$class) $class = "input-checkboxes"; - - foreach($vars['options'] as $label => $option) { - //if (!in_array($option,$vars['value'])) { - if (is_array($vars['value'])) { - $valarray = $vars['value']; - $valarray = array_map('strtolower', $valarray); - if (!in_array(strtolower($option),$valarray)) { - $selected = ""; - } else { - $selected = "checked = \"checked\""; - } - } else { - if (strtolower($option) != strtolower($vars['value'])) { - $selected = ""; - } else { - $selected = "checked = \"checked\""; - } - } - $labelint = (int) $label; - if ("{$label}" == "{$labelint}") { - $label = $option; - } - - if (isset($vars['internalid'])) $id = "id=\"{$vars['internalid']}\""; - $disabled = ""; - if ($vars['disabled']) $disabled = ' disabled="yes" '; - echo "
"; - } - -?> \ No newline at end of file + if (isset($vars['internalid'])) $id = "id=\"{$vars['internalid']}\""; + $disabled = ""; + if ($vars['disabled']) $disabled = ' disabled="yes" '; + echo "
"; +} \ No newline at end of file diff --git a/views/default/input/email.php b/views/default/input/email.php index e1fb61eab..bd2892e97 100644 --- a/views/default/input/email.php +++ b/views/default/input/email.php @@ -1,24 +1,25 @@ - name="" value="" class=""/> \ No newline at end of file + name="" value="" class=""/> \ No newline at end of file diff --git a/views/default/input/file.php b/views/default/input/file.php index e707e3ee0..15cc011f6 100644 --- a/views/default/input/file.php +++ b/views/default/input/file.php @@ -1,26 +1,25 @@ "; +} - * @author Curverider Ltd - - * @link http://elgg.org/ - * - * @uses $vars['js'] Any Javascript to enter into the input tag - * @uses $vars['internalname'] The name of the input field - * - */ - - if (!empty($vars['value'])) { - echo elgg_echo('fileexists') . "
"; - } - - $class = $vars['class']; - if (!$class) $class = "input-file"; +$class = $vars['class']; +if (!$class) { + $class = "input-file"; +} ?> name="" class="" /> \ No newline at end of file diff --git a/views/default/input/form.php b/views/default/input/form.php index 0a4619ac1..25f140a01 100644 --- a/views/default/input/form.php +++ b/views/default/input/form.php @@ -1,34 +1,50 @@
id="" name="" action="" method="" > diff --git a/views/default/input/hidden.php b/views/default/input/hidden.php index 2338a66bb..e95779367 100644 --- a/views/default/input/hidden.php +++ b/views/default/input/hidden.php @@ -1,18 +1,18 @@ - name="" value="" /> \ No newline at end of file + name="" value="" /> \ No newline at end of file diff --git a/views/default/input/longtext.php b/views/default/input/longtext.php index 86b0f3fc4..f60e29a70 100644 --- a/views/default/input/longtext.php +++ b/views/default/input/longtext.php @@ -1,25 +1,22 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/views/default/input/password.php b/views/default/input/password.php index 8ab0b6935..90ee984d4 100644 --- a/views/default/input/password.php +++ b/views/default/input/password.php @@ -1,24 +1,23 @@ - name="" value="" class="" /> \ No newline at end of file + name="" value="" class="" /> \ No newline at end of file diff --git a/views/default/input/plaintext.php b/views/default/input/plaintext.php index a99084a43..e177f8b3f 100644 --- a/views/default/input/plaintext.php +++ b/views/default/input/plaintext.php @@ -1,25 +1,24 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/views/default/input/pulldown.php b/views/default/input/pulldown.php index 6aa69f428..03143d677 100644 --- a/views/default/input/pulldown.php +++ b/views/default/input/pulldown.php @@ -1,52 +1,46 @@ "option" where "value" is an internal name and "option" is - * the value displayed on the button. Replaces $vars['options'] when defined. - */ - - - $class = $vars['class']; - if (!$class) $class = "input-pulldown"; +/** + * Elgg pulldown input + * Displays a pulldown input field + * + * @package Elgg + * @subpackage Core + * @author Curverider Ltd + * @link http://elgg.org/ + * + * @uses $vars['value'] The current value, if any + * @uses $vars['js'] Any Javascript to enter into the input tag + * @uses $vars['internalname'] The name of the input field + * @uses $vars['options'] An array of strings representing the options for the pulldown field + * @uses $vars['options_values'] An associative array of "value" => "option" where "value" is an internal name and "option" is + * the value displayed on the button. Replaces $vars['options'] when defined. + */ + +$class = $vars['class']; +if (!$class) { + $class = "input-pulldown"; +} ?> - \ No newline at end of file diff --git a/views/default/input/radio.php b/views/default/input/radio.php index 12e40ccdd..c6163b141 100644 --- a/views/default/input/radio.php +++ b/views/default/input/radio.php @@ -1,40 +1,41 @@ option + * + */ - /** - * Elgg radio input - * Displays a radio input field - * - * @package Elgg - * @subpackage Core +$class = $vars['class']; +if (!$class) { + $class = "input-radio"; +} - * @author Curverider Ltd +foreach($vars['options'] as $label => $option) { + if (strtolower($option) != strtolower($vars['value'])) { + $selected = ""; + } else { + $selected = "checked = \"checked\""; + } + $labelint = (int) $label; + if ("{$label}" == "{$labelint}") { + $label = $option; + } - * @link http://elgg.org/ - * - * @uses $vars['value'] The current value, if any - * @uses $vars['js'] Any Javascript to enter into the input tag - * @uses $vars['internalname'] The name of the input field - * @uses $vars['options'] An array of strings representing the options for the radio field as "label" => option - * - */ - - $class = $vars['class']; - if (!$class) $class = "input-radio"; - - foreach($vars['options'] as $label => $option) { - if (strtolower($option) != strtolower($vars['value'])) { - $selected = ""; - } else { - $selected = "checked = \"checked\""; - } - $labelint = (int) $label; - if ("{$label}" == "{$labelint}") { - $label = $option; - } - - if (isset($vars['internalid'])) $id = "id=\"{$vars['internalid']}\""; - if ($vars['disabled']) $disabled = ' disabled="yes" '; - echo "
"; - } - -?> \ No newline at end of file + if (isset($vars['internalid'])) { + $id = "id=\"{$vars['internalid']}\""; + } + if ($vars['disabled']) { + $disabled = ' disabled="yes" '; + } + echo "
"; +} \ No newline at end of file diff --git a/views/default/input/reset.php b/views/default/input/reset.php index 96fc57a4f..bb8d278c3 100644 --- a/views/default/input/reset.php +++ b/views/default/input/reset.php @@ -1,25 +1,26 @@ \ No newline at end of file +$vars['type'] = 'reset'; +$class = $vars['class']; +if (!$class) { + $class = "submit_button"; +} +$vars['class'] = $class; + +echo elgg_view('input/button', $vars); \ No newline at end of file diff --git a/views/default/input/securitytoken.php b/views/default/input/securitytoken.php index fa202548e..a2a4a0e01 100644 --- a/views/default/input/securitytoken.php +++ b/views/default/input/securitytoken.php @@ -1,18 +1,17 @@ '__elgg_token', 'value' => $token)); - echo elgg_view('input/hidden', array('internalname' => '__elgg_ts', 'value' => $ts)); -?> +$ts = time(); +$token = generate_action_token($ts); + +echo elgg_view('input/hidden', array('internalname' => '__elgg_token', 'value' => $token)); +echo elgg_view('input/hidden', array('internalname' => '__elgg_ts', 'value' => $ts)); diff --git a/views/default/input/submit.php b/views/default/input/submit.php index 66e5c543b..b0c72791f 100644 --- a/views/default/input/submit.php +++ b/views/default/input/submit.php @@ -1,25 +1,28 @@ \ No newline at end of file +$vars['type'] = 'submit'; +if (isset($vars['class'])) { + $class = $vars['class']; +} +if (!$class) { + $class = "submit_button"; +} +$vars['class'] = $class; + +echo elgg_view('input/button', $vars); \ No newline at end of file diff --git a/views/default/input/tags.php b/views/default/input/tags.php index 8793756e2..172875004 100644 --- a/views/default/input/tags.php +++ b/views/default/input/tags.php @@ -1,45 +1,45 @@ -value; + } + } + } else { + $tags = $vars['value']; + } +} - $tags = ""; - if (!empty($vars['value'])) { - if (is_array($vars['value'])) { - foreach($vars['value'] as $tag) { - - if (!empty($tags)) { - $tags .= ", "; - } - if (is_string($tag)) { - $tags .= $tag; - } else { - $tags .= $tag->value; - } - - } - } else { - $tags = $vars['value']; - } - } - ?> - name="" value="" class=""/> \ No newline at end of file + name="" value="" class=""/> \ No newline at end of file diff --git a/views/default/input/text.php b/views/default/input/text.php index 2a30ba081..1814e5801 100644 --- a/views/default/input/text.php +++ b/views/default/input/text.php @@ -1,27 +1,28 @@ - name="" value="" class=""/> \ No newline at end of file + name="" value="" class=""/> \ No newline at end of file diff --git a/views/default/input/url.php b/views/default/input/url.php index 82fde938e..6bf19d319 100644 --- a/views/default/input/url.php +++ b/views/default/input/url.php @@ -1,24 +1,23 @@ - name="" value="" class=""/> \ No newline at end of file + name="" value="" class=""/> \ No newline at end of file diff --git a/views/default/input/urlshortener.php b/views/default/input/urlshortener.php index 4707809f5..7a8c2786a 100644 --- a/views/default/input/urlshortener.php +++ b/views/default/input/urlshortener.php @@ -1,10 +1,10 @@ \ No newline at end of file diff --git a/views/default/input/userpicker.php b/views/default/input/userpicker.php index efe83ec14..742554dbd 100644 --- a/views/default/input/userpicker.php +++ b/views/default/input/userpicker.php @@ -1,23 +1,23 @@ -$1"); var desc = info.desc.replace(new RegExp("(" + term + ")", "gi"), "$1"); - + switch (info.type) { case 'user': case 'group': r = info.icon + name + ' - ' + desc; break; - + default: r = name + ' - ' + desc; break; @@ -103,10 +103,10 @@ function userPickerAddUser(event, data, formatted) { var internalName = picker.find('input.internalname').val(); // not sure why formatted isn't. var formatted = userPickerFormatItem(data); - + // add guid as hidden input and to list. var li = formatted + ' X' - + ''; + + ''; $('
  • ').html(li).appendTo(users); $(this).val(''); @@ -137,11 +137,10 @@ $(document).ready(function() { - +
      - diff --git a/views/default/js/initialise_elgg.php b/views/default/js/initialise_elgg.php index e63cd70ef..fbe46824e 100644 --- a/views/default/js/initialise_elgg.php +++ b/views/default/js/initialise_elgg.php @@ -3,19 +3,19 @@ $(document).ready(function () { // COLLAPSABLE WIDGETS (on Dashboard & Profile pages) // toggle widget box contents $('a.toggle_box_contents').bind('click', toggleContent); - + // toggle widget box edit panel $('a.toggle_box_edit_panel').click(function () { $(this.parentNode.parentNode).children(".collapsable_box_editpanel").slideToggle("fast"); return false; }); - + // toggle customise edit panel $('a.toggle_customise_edit_panel').click(function () { $('div#customise_editpanel').slideToggle("fast"); return false; - }); - + }); + // toggle plugin's settings nad more info on admin tools admin $('a.pluginsettings_link').click(function () { $(this.parentNode.parentNode).children(".pluginsettings").slideToggle("fast"); @@ -30,12 +30,12 @@ $(document).ready(function () { $(this.parentNode.parentNode).children(".collapsible_box").slideToggle("fast"); return false; }); - + // WIDGET GALLERY EDIT PANEL // Sortable widgets var els = ['#leftcolumn_widgets', '#middlecolumn_widgets', '#rightcolumn_widgets', '#widget_picker_gallery' ]; var $els = $(els.toString()); - + $els.sortable({ items: '.draggable_widget', handle: '.drag_handle', @@ -47,25 +47,25 @@ $(document).ready(function () { appendTo: 'body', connectWith: els, start:function(e,ui) { - + }, - stop: function(e,ui) { - // refresh list before updating hidden fields with new widget order + stop: function(e,ui) { + // refresh list before updating hidden fields with new widget order $(this).sortable( "refresh" ); - + var widgetNamesLeft = outputWidgetList('#leftcolumn_widgets'); var widgetNamesMiddle = outputWidgetList('#middlecolumn_widgets'); var widgetNamesRight = outputWidgetList('#rightcolumn_widgets'); - + document.getElementById('debugField1').value = widgetNamesLeft; document.getElementById('debugField2').value = widgetNamesMiddle; document.getElementById('debugField3').value = widgetNamesRight; } }); - + // bind more info buttons - called when new widgets are created widget_moreinfo(); - + // set-up hover class for dragged widgets $("#rightcolumn_widgets").droppable({ accept: ".draggable_widget", @@ -85,7 +85,7 @@ $(document).ready(function () { // List active widgets for each page column function outputWidgetList(forElement) { - return( $("input[name='handler'], input[name='guid']", forElement ).makeDelimitedList("value") ); + return( $("input[name='handler'], input[name='guid']", forElement ).makeDelimitedList("value") ); } // Make delimited list @@ -93,7 +93,7 @@ jQuery.fn.makeDelimitedList = function(elementAttribute) { var delimitedListArray = new Array(); var listDelimiter = "::"; - + // Loop over each element in the stack and add the elementAttribute to the array this.each(function(e) { var listElement = $(this); @@ -101,7 +101,7 @@ jQuery.fn.makeDelimitedList = function(elementAttribute) { delimitedListArray[delimitedListArray.length] = listElement.attr(elementAttribute); } ); - + // Return value list by joining the array return(delimitedListArray.join(listDelimiter)); } @@ -117,7 +117,7 @@ function widget_state(forWidget) { $(forWidget).find("div.collapsable_box_content").hide(); $(forWidget).find("a.toggle_box_contents").html('+'); $(forWidget).find("a.toggle_box_edit_panel").fadeOut('medium'); - }; + }; } @@ -128,21 +128,21 @@ var targetContent = $('div.collapsable_box_content', this.parentNode.parentNode) targetContent.slideDown(400); $(this).html('-'); $(this.parentNode).children(".toggle_box_edit_panel").fadeIn('medium'); - + // set cookie for widget panel open-state var thisWidgetName = $(this.parentNode.parentNode.parentNode).attr('id'); $.cookie(thisWidgetName, 'expanded', { expires: 365 }); - + } else { targetContent.slideUp(400); $(this).html('+'); $(this.parentNode).children(".toggle_box_edit_panel").fadeOut('medium'); // make sure edit pane is closed $(this.parentNode.parentNode).children(".collapsable_box_editpanel").hide(); - + // set cookie for widget panel closed-state var thisWidgetName = $(this.parentNode.parentNode.parentNode).attr('id'); - $.cookie(thisWidgetName, 'collapsed', { expires: 365 }); + $.cookie(thisWidgetName, 'collapsed', { expires: 365 }); } return false; }; @@ -150,147 +150,132 @@ var targetContent = $('div.collapsable_box_content', this.parentNode.parentNode) // More info tooltip in widget gallery edit panel function widget_moreinfo() { - $("img.more_info").hover(function(e) { + $("img.more_info").hover(function(e) { var widgetdescription = $("input[name='description']", this.parentNode.parentNode.parentNode ).attr('value'); $("body").append("

      "+ widgetdescription +"

      "); - + if (e.pageX < 900) { $("#widget_moreinfo") .css("top",(e.pageY + 10) + "px") .css("left",(e.pageX + 10) + "px") - .fadeIn("medium"); - } + .fadeIn("medium"); + } else { $("#widget_moreinfo") .css("top",(e.pageY + 10) + "px") .css("left",(e.pageX - 210) + "px") - .fadeIn("medium"); - } + .fadeIn("medium"); + } }, function() { $("#widget_moreinfo").remove(); - }); - + }); + $("img.more_info").mousemove(function(e) { // action on mousemove - }); + }); }; // COOKIES jQuery.cookie = function(name, value, options) { if (typeof value != 'undefined') { // name and value given, set cookie - options = options || {}; - if (value === null) { - value = ''; - options.expires = -1; - } - var expires = ''; - if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) { - var date; - if (typeof options.expires == 'number') { - date = new Date(); - date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000)); - } else { - date = options.expires; - } - expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE - } - // CAUTION: Needed to parenthesize options.path and options.domain - // in the following expressions, otherwise they evaluate to undefined - // in the packed version for some reason. - var path = options.path ? '; path=' + (options.path) : ''; - var domain = options.domain ? '; domain=' + (options.domain) : ''; - var secure = options.secure ? '; secure' : ''; - document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join(''); - + options = options || {}; + if (value === null) { + value = ''; + options.expires = -1; + } + var expires = ''; + if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) { + var date; + if (typeof options.expires == 'number') { + date = new Date(); + date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000)); + } else { + date = options.expires; + } + expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE + } + // CAUTION: Needed to parenthesize options.path and options.domain + // in the following expressions, otherwise they evaluate to undefined + // in the packed version for some reason. + var path = options.path ? '; path=' + (options.path) : ''; + var domain = options.domain ? '; domain=' + (options.domain) : ''; + var secure = options.secure ? '; secure' : ''; + document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join(''); + } else { // only name given, get cookie - var cookieValue = null; - if (document.cookie && document.cookie != '') { - var cookies = document.cookie.split(';'); - for (var i = 0; i < cookies.length; i++) { - var cookie = jQuery.trim(cookies[i]); - // Does this cookie string begin with the name we want? - if (cookie.substring(0, name.length + 1) == (name + '=')) { - cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); - break; - } - } - } - return cookieValue; + var cookieValue = null; + if (document.cookie && document.cookie != '') { + var cookies = document.cookie.split(';'); + for (var i = 0; i < cookies.length; i++) { + var cookie = jQuery.trim(cookies[i]); + // Does this cookie string begin with the name we want? + if (cookie.substring(0, name.length + 1) == (name + '=')) { + cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); + break; + } + } + } + return cookieValue; } }; // ELGG TOOLBAR MENU $.fn.elgg_topbardropdownmenu = function(options) { - - options = $.extend({speed: 350}, options || {}); - - this.each(function() { - - var root = this, zIndex = 5000; - - function getSubnav(ele) { - if (ele.nodeName.toLowerCase() == 'li') { - var subnav = $('> ul', ele); - return subnav.length ? subnav[0] : null; - } else { - - return ele; - } - } - - function getActuator(ele) { - if (ele.nodeName.toLowerCase() == 'ul') { - return $(ele).parents('li')[0]; - } else { - return ele; - } - } - - function hide() { - var subnav = getSubnav(this); - if (!subnav) return; - $.data(subnav, 'cancelHide', false); - setTimeout(function() { - if (!$.data(subnav, 'cancelHide')) { - $(subnav).slideUp(100); - } - }, 250); - } - - function show() { - var subnav = getSubnav(this); - if (!subnav) return; - $.data(subnav, 'cancelHide', true); - $(subnav).css({zIndex: zIndex++}).slideDown(options.speed); - if (this.nodeName.toLowerCase() == 'ul') { - var li = getActuator(this); - $(li).addClass('hover'); - $('> a', li).addClass('hover'); - } - } - - $('ul, li', this).hover(show, hide); - $('li', this).hover( - function() { $(this).addClass('hover'); $('> a', this).addClass('hover'); }, - function() { $(this).removeClass('hover'); $('> a', this).removeClass('hover'); } - ); - - }); - -}; - - - - +options = $.extend({speed: 350}, options || {}); +this.each(function() { + var root = this, zIndex = 5000; + function getSubnav(ele) { + if (ele.nodeName.toLowerCase() == 'li') { + var subnav = $('> ul', ele); + return subnav.length ? subnav[0] : null; + } else { + return ele; + } + } + function getActuator(ele) { + if (ele.nodeName.toLowerCase() == 'ul') { + return $(ele).parents('li')[0]; + } else { + return ele; + } + } + function hide() { + var subnav = getSubnav(this); + if (!subnav) return; + $.data(subnav, 'cancelHide', false); + setTimeout(function() { + if (!$.data(subnav, 'cancelHide')) { + $(subnav).slideUp(100); + } + }, 250); + } + function show() { + var subnav = getSubnav(this); + if (!subnav) return; + $.data(subnav, 'cancelHide', true); + $(subnav).css({zIndex: zIndex++}).slideDown(options.speed); + if (this.nodeName.toLowerCase() == 'ul') { + var li = getActuator(this); + $(li).addClass('hover'); + $('> a', li).addClass('hover'); + } + } + $('ul, li', this).hover(show, hide); + $('li', this).hover( + function() { $(this).addClass('hover'); $('> a', this).addClass('hover'); }, + function() { $(this).removeClass('hover'); $('> a', this).removeClass('hover'); } + ); +}); +}; diff --git a/views/default/messages/errors/error.php b/views/default/messages/errors/error.php index 468505c89..26a24c807 100644 --- a/views/default/messages/errors/error.php +++ b/views/default/messages/errors/error.php @@ -1,20 +1,17 @@ -

      - $vars['object'])); ?> -

      \ No newline at end of file +

      + $vars['object'])); ?> +

      \ No newline at end of file diff --git a/views/default/messages/errors/list.php b/views/default/messages/errors/list.php index e9b9b2ebb..846e22a80 100644 --- a/views/default/messages/errors/list.php +++ b/views/default/messages/errors/list.php @@ -1,57 +1,50 @@
      $error)); - } + foreach($vars['object'] as $error) { + echo elgg_view('messages/errors/error',array('object' => $error)); + } ?>
      \ No newline at end of file +} \ No newline at end of file diff --git a/views/default/messages/exceptions/exception.php b/views/default/messages/exceptions/exception.php index 0b482d845..c93883cbc 100644 --- a/views/default/messages/exceptions/exception.php +++ b/views/default/messages/exceptions/exception.php @@ -1,44 +1,39 @@ $vars['object']->getMessage())); - * @link http://elgg.org/ - * - * @uses $vars['object'] An exception - */ +$body = <<< END +

      + + $message + +

      +END; - global $CONFIG; - - $class = get_class($vars['object']); - $message = elgg_view('output/longtext', array('value' => $vars['object']->getMessage())); - - $body = <<< END -

      - - $message - +if ($CONFIG->debug) { + $details = elgg_view('output/longtext', array('value' => htmlentities(print_r($vars['object'], true), ENT_QUOTES, 'UTF-8'))); + $body .= <<< END +


      +

      + $details

      END; +} - if ($CONFIG->debug) - { - $details = elgg_view('output/longtext', array('value' => htmlentities(print_r($vars['object'], true), ENT_QUOTES, 'UTF-8'))); - $body .= <<< END -
      -

      - $details -

      -END; - } - - $title = $class; - - echo elgg_view_layout("one_column", elgg_view_title($title) . $body); -?> \ No newline at end of file +$title = $class; + +echo elgg_view_layout("one_column", elgg_view_title($title) . $body); \ No newline at end of file diff --git a/views/default/messages/list.php b/views/default/messages/list.php index dd02fdac5..62500882c 100644 --- a/views/default/messages/list.php +++ b/views/default/messages/list.php @@ -1,25 +1,18 @@ 0) { - - foreach($vars['object'] as $register => $list ) { - echo elgg_view("messages/{$register}/list", array('object' => $list)); - } - - } - -?> \ No newline at end of file +if (!empty($vars['object']) && is_array($vars['object']) && sizeof($vars['object']) > 0) { + foreach($vars['object'] as $register => $list ) { + echo elgg_view("messages/{$register}/list", array('object' => $list)); + } +} diff --git a/views/default/messages/messages/list.php b/views/default/messages/messages/list.php index 81f3a45a8..67da01657 100644 --- a/views/default/messages/messages/list.php +++ b/views/default/messages/messages/list.php @@ -1,58 +1,50 @@
      $message)); - } - + foreach($vars['object'] as $message) { + echo elgg_view('messages/messages/message',array('object' => $message)); + } ?>
      - - \ No newline at end of file +} diff --git a/views/default/messages/messages/message.php b/views/default/messages/messages/message.php index bd3514e7a..717fd5e57 100644 --- a/views/default/messages/messages/message.php +++ b/views/default/messages/messages/message.php @@ -1,20 +1,17 @@ -

      - $vars['object'])); ?> -

      \ No newline at end of file +

      + $vars['object'])); ?> +

      \ No newline at end of file diff --git a/views/default/navigation/pagination.php b/views/default/navigation/pagination.php index e141675c8..aec005eaf 100644 --- a/views/default/navigation/pagination.php +++ b/views/default/navigation/pagination.php @@ -1,75 +1,74 @@ $limit || $offset > 0) && get_context() != 'widget') { +$totalpages = ceil($count / $limit); +$currentpage = ceil($offset / $limit) + 1; -?> +$baseurl = preg_replace('/[\&\?]'.$word.'\=[0-9]*/',"",$vars['baseurl']); - + 0) { + $alphamenu = array(); + foreach($menu as $item) { + $alphamenu[$item->name] = $item; + } + ksort($alphamenu); - if (is_array($menu) && sizeof($menu) > 0) { - $alphamenu = array(); - foreach($menu as $item) { - $alphamenu[$item->name] = $item; - } - ksort($alphamenu); - ?> +} \ No newline at end of file diff --git a/views/default/navigation/viewtype.php b/views/default/navigation/viewtype.php index c5f3a80a1..fcea39b61 100644 --- a/views/default/navigation/viewtype.php +++ b/views/default/navigation/viewtype.php @@ -1,34 +1,30 @@ -
      - : - -
      \ No newline at end of file +
      + : + +
      \ No newline at end of file diff --git a/views/default/notifications/settings/usersettings.php b/views/default/notifications/settings/usersettings.php index ff894cd0e..cba5cdef0 100644 --- a/views/default/notifications/settings/usersettings.php +++ b/views/default/notifications/settings/usersettings.php @@ -1,33 +1,30 @@ -

      - -

      - - +

      + +

      + +

      $v) - { + // Loop through options + foreach ($NOTIFICATION_HANDLERS as $k => $v) { ?> - - + + - - +?> + + -
      :
      : + $k) { @@ -37,10 +34,10 @@ } echo elgg_view('input/radio',array('internalname' => "method[{$k}]", 'options' => array(elgg_echo('option:yes') => 'yes',elgg_echo('option:no') => 'no'), 'value' => $val)); -?> -
      \ No newline at end of file + \ No newline at end of file diff --git a/views/default/object/default.php b/views/default/object/default.php index 10ac062d1..3ace73d7f 100644 --- a/views/default/object/default.php +++ b/views/default/object/default.php @@ -1,57 +1,59 @@ $vars['entity'], - 'size' => 'small', - ) - ); - - - $title = $vars['entity']->title; - if (!$title) $title = $vars['entity']->name; - if (!$title) $title = get_class($vars['entity']); - - $controls = ""; - if ($vars['entity']->canEdit()) - { - $controls .= " (guid}\">" . elgg_echo('delete') . ")"; - } - - $info = "

      getUrl() . "\">" . $title . " $controls

      "; - - if (get_input('search_viewtype') == "gallery") { - - $icon = ""; - - } - - $owner = $vars['entity']->getOwnerEntity(); - $ownertxt = elgg_echo('unknown'); - if ($owner) - $ownertxt = "getURL() . "\">" . $owner->name .""; - - $info .= "
      ".sprintf(elgg_echo("entity:default:strapline"), - friendly_time($vars['entity']->time_created), - $ownertxt - ); - - $info .= "
      "; - - $info = "$info"; - $icon = "$icon"; - - echo elgg_view_listing($icon, $info); +/** + * ElggEntity default view. + * + * @package Elgg + * @subpackage Core + * @author Curverider Ltd + * @link http://elgg.org/ + */ + +if ($vars['full']) { + echo elgg_view('export/entity', $vars); +} else { + + $icon = elgg_view( + 'graphics/icon', array( + 'entity' => $vars['entity'], + 'size' => 'small', + ) + ); + + + $title = $vars['entity']->title; + if (!$title) { + $title = $vars['entity']->name; + } + if (!$title) { + $title = get_class($vars['entity']); + } + + $controls = ""; + if ($vars['entity']->canEdit()) { + $controls .= " (guid}\">" . elgg_echo('delete') . ")"; + } + + $info = "

      getUrl() . "\">" . $title . " $controls

      "; + + if (get_input('search_viewtype') == "gallery") { + $icon = ""; + } + + $owner = $vars['entity']->getOwnerEntity(); + $ownertxt = elgg_echo('unknown'); + if ($owner) { + $ownertxt = "getURL() . "\">" . $owner->name .""; } + + $info .= "
      ".sprintf(elgg_echo("entity:default:strapline"), + friendly_time($vars['entity']->time_created), + $ownertxt + ); + + $info .= "
      "; + + $info = "$info"; + $icon = "$icon"; + + echo elgg_view_listing($icon, $info); +} \ No newline at end of file diff --git a/views/default/object/object.php b/views/default/object/object.php index a27a2910f..2be9e1fa1 100644 --- a/views/default/object/object.php +++ b/views/default/object/object.php @@ -1,15 +1,15 @@
      diff --git a/views/default/object/plugin.php b/views/default/object/plugin.php index 5f9c5354c..411a9f8d8 100644 --- a/views/default/object/plugin.php +++ b/views/default/object/plugin.php @@ -1,20 +1,19 @@ " . elgg_view('input/hidden', array('internalname' => 'plugin', 'value' => $plugin)) . elgg_view('input/submit', array('value' => elgg_echo('save'))) . "

      "; - +$entity = $vars['entity']; +$plugin = $vars['plugin']; +$prefix = $vars['prefix']; // Do we want to show admin settings (default) or user settings + +$form_body = elgg_view("{$prefix}settings/{$plugin}/edit", $vars); +$form_body .= "

      " . elgg_view('input/hidden', array('internalname' => 'plugin', 'value' => $plugin)) . elgg_view('input/submit', array('value' => elgg_echo('save'))) . "

      "; ?>
      diff --git a/views/default/object/widget.php b/views/default/object/widget.php index b49120e2e..9dd2999ce 100644 --- a/views/default/object/widget.php +++ b/views/default/object/widget.php @@ -1,16 +1,11 @@ \ No newline at end of file +/** + * Elgg default widget view + * + * @package Elgg + * @subpackage Core + * @author Curverider Ltd + * @link http://elgg.org/ + */ + +echo elgg_view('widgets/wrapper',$vars); diff --git a/views/default/output/calendar.php b/views/default/output/calendar.php index 336129aed..0a21eb74c 100644 --- a/views/default/output/calendar.php +++ b/views/default/output/calendar.php @@ -1,24 +1,19 @@ \ No newline at end of file +if (is_int($vars['value'])) { + echo date("F j, Y", $vars['value']); +} else { + echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); +} \ No newline at end of file diff --git a/views/default/output/checkboxes.php b/views/default/output/checkboxes.php index a93455e28..537d996e0 100644 --- a/views/default/output/checkboxes.php +++ b/views/default/output/checkboxes.php @@ -1,19 +1,15 @@ \ No newline at end of file +/** + * Elgg text output + * Displays some text that was input using a standard text field + * + * @package Elgg + * @subpackage Core + * @author Curverider Ltd + * @link http://elgg.org/ + * + * @uses $vars['text'] The text to display + * + */ + +echo elgg_view('output/tags',$vars); \ No newline at end of file diff --git a/views/default/output/confirmlink.php b/views/default/output/confirmlink.php index bb7e866f2..e0a6f65d7 100644 --- a/views/default/output/confirmlink.php +++ b/views/default/output/confirmlink.php @@ -1,42 +1,39 @@ 0) $sep = "&"; - $link = "$link{$sep}__elgg_token=$token&__elgg_ts=$ts"; - } - - if ($vars['class']) { - $class = 'class="' . $vars['class'] . '"'; - } else { - $class = ''; - } + $sep = "?"; + if (strpos($link, '?')>0) $sep = "&"; + $link = "$link{$sep}__elgg_token=$token&__elgg_ts=$ts"; +} + +if ($vars['class']) { + $class = 'class="' . $vars['class'] . '"'; +} else { + $class = ''; +} ?> onclick="return confirm('');"> \ No newline at end of file diff --git a/views/default/output/date.php b/views/default/output/date.php index d4fba97a0..fdc8e3a1b 100644 --- a/views/default/output/date.php +++ b/views/default/output/date.php @@ -1,21 +1,17 @@ 86400) { - echo date("F j, Y",$vars['value']); - } -?> \ No newline at end of file +if ($vars['value'] > 86400) { + echo date("F j, Y",$vars['value']); +} \ No newline at end of file diff --git a/views/default/output/email.php b/views/default/output/email.php index 2d454213f..e2142b09b 100644 --- a/views/default/output/email.php +++ b/views/default/output/email.php @@ -1,21 +1,17 @@ ". htmlentities($vars['value'], ENT_QUOTES, 'UTF-8') .""; - } -?> \ No newline at end of file +if (!empty($vars['value'])) { + echo "". htmlentities($vars['value'], ENT_QUOTES, 'UTF-8') .""; +} \ No newline at end of file diff --git a/views/default/output/iframe.php b/views/default/output/iframe.php index eb0cea0b4..e1a1e98c4 100644 --- a/views/default/output/iframe.php +++ b/views/default/output/iframe.php @@ -1,15 +1,15 @@ \ No newline at end of file diff --git a/views/default/output/longtext.php b/views/default/output/longtext.php index 3d130359a..a8540913f 100644 --- a/views/default/output/longtext.php +++ b/views/default/output/longtext.php @@ -1,21 +1,17 @@ \ No newline at end of file +echo autop(parse_urls(filter_tags($vars['value']))); \ No newline at end of file diff --git a/views/default/output/pulldown.php b/views/default/output/pulldown.php index 60b365b11..6e48043a9 100644 --- a/views/default/output/pulldown.php +++ b/views/default/output/pulldown.php @@ -1,19 +1,15 @@ \ No newline at end of file +/** + * Elgg pulldown display + * Displays a value that was entered into the system via a pulldown + * + * @package Elgg + * @subpackage Core + * @author Curverider Ltd + * @link http://elgg.org/ + * + * @uses $vars['text'] The text to display + * + */ + +echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); //$vars['value']; \ No newline at end of file diff --git a/views/default/output/radio.php b/views/default/output/radio.php index 78723b555..b454bae71 100644 --- a/views/default/output/radio.php +++ b/views/default/output/radio.php @@ -1,19 +1,15 @@ \ No newline at end of file +/** + * Elgg text output + * Displays some text that was input using a standard text field + * + * @package Elgg + * @subpackage Core + * @author Curverider Ltd + * @link http://elgg.org/ + * + * @uses $vars['text'] The text to display + * + */ + +echo elgg_view('output/text',$vars); \ No newline at end of file diff --git a/views/default/output/tagcloud.php b/views/default/output/tagcloud.php index 27d49b089..a41ec20c3 100644 --- a/views/default/output/tagcloud.php +++ b/views/default/output/tagcloud.php @@ -1,52 +1,50 @@ total > $max) { + $max = $tag->total; + } } - if (!empty($vars['object'])) { - $object = "&object=" . urlencode($vars['object']); - } else { - $object = ""; + foreach($vars['tagcloud'] as $tag) { + if (!empty($cloud)) { + $cloud .= ", "; + } + $size = round((log($tag->total) / log($max)) * 100) + 30; + if ($size < 60) { + $size = 60; + } + $cloud .= "tag)." ({$tag->total})\" style=\"text-decoration:none;\">" . htmlentities($tag->tag, ENT_QUOTES, 'UTF-8') . ""; } - - if (empty($vars['tagcloud']) && !empty($vars['value'])) - $vars['tagcloud'] = $vars['value']; - - if (!empty($vars['tagcloud']) && is_array($vars['tagcloud'])) { - - $counter = 0; - $cloud = ""; - $max = 0; - foreach($vars['tagcloud'] as $tag) { - if ($tag->total > $max) { - $max = $tag->total; - } - } - foreach($vars['tagcloud'] as $tag) { - if (!empty($cloud)) $cloud .= ", "; - $size = round((log($tag->total) / log($max)) * 100) + 30; - if ($size < 60) $size = 60; - $cloud .= "tag)." ({$tag->total})\" style=\"text-decoration:none;\">" . htmlentities($tag->tag, ENT_QUOTES, 'UTF-8') . ""; - } - echo $cloud; - - } - -?> \ No newline at end of file + echo $cloud; +} \ No newline at end of file diff --git a/views/default/output/tags.php b/views/default/output/tags.php index 901fa806b..f394d084f 100644 --- a/views/default/output/tags.php +++ b/views/default/output/tags.php @@ -1,55 +1,52 @@ " . htmlentities($tag, ENT_QUOTES, 'UTF-8') . ""; - } - } - echo $tagstr; - - } -?> \ No newline at end of file + foreach($vars['tags'] as $tag) { + if (!empty($tagstr)) { + $tagstr .= ", "; + } + if (!empty($vars['type'])) { + $type = "&type={$vars['type']}"; + } else { + $type = ""; + } + if (is_string($tag)) { + $tagstr .= "" . htmlentities($tag, ENT_QUOTES, 'UTF-8') . ""; + } + } + echo $tagstr; +} \ No newline at end of file diff --git a/views/default/output/text.php b/views/default/output/text.php index 080b81d68..bcfe33ea0 100644 --- a/views/default/output/text.php +++ b/views/default/output/text.php @@ -1,19 +1,15 @@ \ No newline at end of file +/** + * Elgg text output + * Displays some text that was input using a standard text field + * + * @package Elgg + * @subpackage Core + * @author Curverider Ltd + * @link http://elgg.org/ + * + * @uses $vars['text'] The text to display + * + */ + +echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); // $vars['value']; \ No newline at end of file diff --git a/views/default/output/url.php b/views/default/output/url.php index 7f72f0dce..190b08c21 100644 --- a/views/default/output/url.php +++ b/views/default/output/url.php @@ -1,37 +1,33 @@ 0) $sep = "&"; - $val = "$val{$sep}__elgg_token=$token&__elgg_ts=$ts"; + $sep = "?"; + if (strpos($val, '?')>0) { + $sep = "&"; } - - echo "". htmlentities($val, ENT_QUOTES, 'UTF-8'). ""; - } + $val = "$val{$sep}__elgg_token=$token&__elgg_ts=$ts"; + } -?> \ No newline at end of file + echo "". htmlentities($val, ENT_QUOTES, 'UTF-8'). ""; +} \ No newline at end of file -- cgit v1.2.3