aboutsummaryrefslogtreecommitdiff
path: root/views/default
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-08-22 23:42:26 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-08-22 23:42:26 +0000
commitdf4226866779f75eacab7f62da36b22dc21d5e44 (patch)
treee6c58d3d77187050fb4b966cc78a69766369c52c /views/default
parent60c1387a16ea4944674b0c9da2273158d1fbf0b4 (diff)
downloadelgg-df4226866779f75eacab7f62da36b22dc21d5e44.tar.gz
elgg-df4226866779f75eacab7f62da36b22dc21d5e44.tar.bz2
Merged r6812:6837 from 1.7 branch to trunk (skipping some changes to plugins like groups and wire)
git-svn-id: http://code.elgg.org/elgg/trunk@6851 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default')
-rw-r--r--views/default/messages/errors/error.php6
-rw-r--r--views/default/messages/messages/message.php5
-rw-r--r--views/default/output/longtext.php18
3 files changed, 23 insertions, 6 deletions
diff --git a/views/default/messages/errors/error.php b/views/default/messages/errors/error.php
index 3175521d4..e681b090b 100644
--- a/views/default/messages/errors/error.php
+++ b/views/default/messages/errors/error.php
@@ -10,4 +10,8 @@
*
* @uses $vars['object'] An error message (string)
*/
-echo elgg_view('output/longtext', array('value' => $vars['object']));
+
+echo elgg_view('output/longtext', array(
+ 'value' => $vars['object'],
+ 'parse_urls' => FALSE)
+);
diff --git a/views/default/messages/messages/message.php b/views/default/messages/messages/message.php
index 58777a3cc..499165a90 100644
--- a/views/default/messages/messages/message.php
+++ b/views/default/messages/messages/message.php
@@ -11,4 +11,7 @@
* @uses $vars['object'] A system message (string)
*/
-echo elgg_view('output/longtext', array('value' => $vars['object']));
+echo elgg_view('output/longtext', array(
+ 'value' => $vars['object'],
+ 'parse_urls' => FALSE)
+);
diff --git a/views/default/output/longtext.php b/views/default/output/longtext.php
index a8540913f..1c57375de 100644
--- a/views/default/output/longtext.php
+++ b/views/default/output/longtext.php
@@ -8,10 +8,20 @@
* @author Curverider Ltd
* @link http://elgg.org/
*
- * @uses $vars['text'] The text to display
- *
+ * @uses $vars['value'] The text to display
+ * @uses $vars['parse_urls'] Whether to turn urls into links. Default is true.
*/
-global $CONFIG;
+$parse_urls = isset($vars['parse_urls']) ? $vars['parse_urls'] : TRUE;
+
+$text = $vars['value'];
+
+$text = filter_tags($text);
+
+if ($parse_urls) {
+ $text = parse_urls($text);
+}
+
+$text = autop($text);
-echo autop(parse_urls(filter_tags($vars['value']))); \ No newline at end of file
+echo $text;