aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/output.php25
-rw-r--r--engine/lib/users.php10
-rw-r--r--engine/lib/views.php12
-rw-r--r--engine/lib/widgets.php7
4 files changed, 23 insertions, 31 deletions
diff --git a/engine/lib/output.php b/engine/lib/output.php
index 7a38e5b8c..8c2a3d50d 100644
--- a/engine/lib/output.php
+++ b/engine/lib/output.php
@@ -59,7 +59,7 @@ function autop($pee, $br = 1) {
$pee = preg_replace('!(<' . $allblocks . '[^>]*>)!', "\n$1", $pee);
$pee = preg_replace('!(</' . $allblocks . '>)!', "$1\n\n", $pee);
$pee = str_replace(array("\r\n", "\r"), "\n", $pee); // cross-platform newlines
- if ( strpos($pee, '<object') !== false ) {
+ if (strpos($pee, '<object') !== false) {
$pee = preg_replace('|\s*<param([^>]*)>\s*|', "<param$1>", $pee); // no pee inside object/embed
$pee = preg_replace('|\s*</embed>\s*|', '</embed>', $pee);
}
@@ -238,25 +238,22 @@ function elgg_normalize_url($url) {
// '#target', '?query=string'
if (preg_match("#^(\#|\?|(https?:)?//)#i", $url)) {
return $url;
- }
- // 'javascript:'
- elseif (stripos($url, 'javascript:') === 0) {
+ } elseif (stripos($url, 'javascript:') === 0) {
+ // 'javascript:'
return $url;
- }
- // 'install.php', 'install.php?step=step'
- elseif (preg_match("#^[^/]*\.php(\?.*)?$#i", $url)) {
- return elgg_get_site_url().$url;
- }
+ } elseif (preg_match("#^[^/]*\.php(\?.*)?$#i", $url)) {
+ // 'install.php', 'install.php?step=step'
+ return elgg_get_site_url() . $url;
- // 'example.com', 'example.com/subpage'
- elseif (preg_match("#^[^/]*\.#i", $url)) {
+ } elseif (preg_match("#^[^/]*\.#i", $url)) {
+ // 'example.com', 'example.com/subpage'
return "http://$url";
- }
- // 'page/handler', 'mod/plugin/file.php'
- else {
+ } else {
+ // 'page/handler', 'mod/plugin/file.php'
+
// trim off any leading / because the site URL is stored
// with a trailing /
return elgg_get_site_url() . ltrim($url, '/');
diff --git a/engine/lib/users.php b/engine/lib/users.php
index 6733c9d3e..987762576 100644
--- a/engine/lib/users.php
+++ b/engine/lib/users.php
@@ -1075,14 +1075,6 @@ function collections_submenu_items() {
'text' => elgg_echo('friends:collections'),
'href' => "collections/$user->username",
));
-/*
- elgg_register_menu_item('page', array(
- 'name' => 'friends:collections:add',
- 'text' => elgg_echo('friends:collections:add'),
- 'href' => "collections/add",
- ));
- *
- */
}
/**
@@ -1244,7 +1236,7 @@ function user_create_hook_add_site_relationship($event, $object_type, $object) {
* @param string $hook
* @param string $entity_type
* @param string $returnvalue
- * @param array $params
+ * @param array $params
* @return string
*/
function user_avatar_hook($hook, $entity_type, $returnvalue, $params) {
diff --git a/engine/lib/views.php b/engine/lib/views.php
index ff308171f..d3d790f8b 100644
--- a/engine/lib/views.php
+++ b/engine/lib/views.php
@@ -1216,8 +1216,8 @@ function elgg_view_form($action, $form_vars = array(), $body_vars = array()) {
/**
* View an item in a list
*
- * @param object $item ElggEntity or ElggAnnotation
- * @param array $vars Additional parameters for the rendering
+ * @param object $item ElggEntity or ElggAnnotation
+ * @param array $vars Additional parameters for the rendering
*
* @return string
* @since 1.8.0
@@ -1247,9 +1247,9 @@ function elgg_view_list_item($item, array $vars = array()) {
*
* Shorthand for <span class="elgg-icon elgg-icon-$name"></span>
*
- * @param string $type The specific icon to display
+ * @param string $name The specific icon to display
*
- * @returns string The html for displaying an icon
+ * @return string The html for displaying an icon
*/
function elgg_view_icon($name) {
return "<span class=\"elgg-icon elgg-icon-$name\"></span>";
@@ -1447,12 +1447,14 @@ function elgg_views_register_core_head_elements() {
/**
* Add the rss link to the extras when if needed
+ *
+ * @return void
*/
function elgg_views_add_rss_link() {
global $autofeed;
if (isset($autofeed) && $autofeed == true) {
$url = full_url();
- if (substr_count($url,'?')) {
+ if (substr_count($url, '?')) {
$url .= "&view=rss";
} else {
$url .= "?view=rss";
diff --git a/engine/lib/widgets.php b/engine/lib/widgets.php
index 21fbbcad9..b20f92f74 100644
--- a/engine/lib/widgets.php
+++ b/engine/lib/widgets.php
@@ -52,9 +52,10 @@ function elgg_get_widgets($user_guid, $context) {
/**
* Create a new widget instance
*
- * @param int $entity_guid GUID of entity that owns this widget
- * @param string $handler The handler for this widget
- * @param int $access_id If not specified, it is set to the default access level
+ * @param int $owner_guid GUID of entity that owns this widget
+ * @param string $handler The handler for this widget
+ * @param string $context The context for this widget
+ * @param int $access_id If not specified, it is set to the default access level
*
* @return int|false Widget GUID or false on failure
* @since 1.8.0