aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-22 16:56:55 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-22 16:56:55 +0000
commit1d33c3fd07fbfa41359af0e99079f57f022e7124 (patch)
tree7c8a11ab79801d4545aa8ca6ec8be1f231b2b287 /mod
parenta140ef9c53edb2e249eab2eafccc6eb8c0952dab (diff)
downloadelgg-1d33c3fd07fbfa41359af0e99079f57f022e7124.tar.gz
elgg-1d33c3fd07fbfa41359af0e99079f57f022e7124.tar.bz2
Merged 1.7 bugfixes back into core. (5376:HEAD).
git-svn-id: http://code.elgg.org/elgg/trunk@5471 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod')
-rw-r--r--mod/bookmarks/views/default/bookmarks/form.php3
-rw-r--r--mod/custom_index/languages/en.php2
-rw-r--r--mod/externalpages/actions/add.php17
-rw-r--r--mod/externalpages/views/default/expages/forms/edit.php10
-rw-r--r--mod/groups/actions/groupskillinvitation.php2
-rw-r--r--mod/groups/all.php3
-rw-r--r--mod/groups/languages/en.php8
-rw-r--r--mod/groups/views/default/groups/find.php6
-rw-r--r--mod/groups/views/default/groups/invitationrequests.php2
-rw-r--r--mod/groups/views/rss/groups/profileitems.php2
-rw-r--r--mod/groups/views/rss/object/groupforumtopic.php34
-rw-r--r--mod/messages/index.php3
-rw-r--r--mod/messages/sent.php5
-rw-r--r--mod/search/views/rss/search/layout.php5
-rw-r--r--mod/thewire/start.php1
-rw-r--r--mod/tinymce/views/default/input/longtext.php5
16 files changed, 67 insertions, 41 deletions
diff --git a/mod/bookmarks/views/default/bookmarks/form.php b/mod/bookmarks/views/default/bookmarks/form.php
index 9372dc7cb..b72863841 100644
--- a/mod/bookmarks/views/default/bookmarks/form.php
+++ b/mod/bookmarks/views/default/bookmarks/form.php
@@ -22,6 +22,7 @@ if(isset($vars['entity'])){
//set some variables
$guid = '';
$title = get_input('title',"");
+ $title = stripslashes($title); // strip slashes from URL encoded apostrophes
$address = get_input('address',"");
$notes = '';
if ($address == "previous")
@@ -108,4 +109,4 @@ if(isset($vars['entity'])){
<input type="hidden" value="<?php echo $guid; ?>" name="guid" />
<input type="submit" onfocus="blur()" value="<?php echo elgg_echo('save'); ?>" />
</p>
-</form> \ No newline at end of file
+</form>
diff --git a/mod/custom_index/languages/en.php b/mod/custom_index/languages/en.php
index 452bcf2e5..091297297 100644
--- a/mod/custom_index/languages/en.php
+++ b/mod/custom_index/languages/en.php
@@ -8,7 +8,7 @@
'custom:blogs' => "Latest blog posts",
'custom:members' => "Newest members",
'custom:nofiles' => "There are no files yet",
- 'custom:nogroups' => "There are no files yet",
+ 'custom:nogroups' => "There are no groups yet",
);
diff --git a/mod/externalpages/actions/add.php b/mod/externalpages/actions/add.php
index f8746312c..79f16bad5 100644
--- a/mod/externalpages/actions/add.php
+++ b/mod/externalpages/actions/add.php
@@ -16,17 +16,12 @@
// Get input data
$contents = get_input('expagescontent', '', false);
$type = get_input('content_type');
- $tags = get_input('expagestags');
$previous_guid = get_input('expage_guid');
// Cache to the session
$_SESSION['expages_content'] = $contents;
$_SESSION['expagestype'] = $type;
- $_SESSION['expagestags'] = $tags;
-
- // Convert string of tags into a preformatted array
- $tagarray = string_to_tag_array($tags);
-
+
// Make sure the content exists
if (empty($contents)) {
register_error(elgg_echo("expages:blank"));
@@ -47,7 +42,7 @@
// Set its owner to the current user
$expages->owner_guid = $_SESSION['user']->getGUID();
// For now, set its access to public
- $expages->access_id = 2;
+ $expages->access_id = ACCESS_PUBLIC;
// Set its title and description appropriately
$expages->title = $type;
$expages->description = $contents;
@@ -56,17 +51,13 @@
register_error(elgg_echo("expages:error"));
forward("mod/expages/add.php");
}
- // Now let's add tags. We can pass an array directly to the object property! Easy.
- if (is_array($tagarray)) {
- $expages->tags = $tagarray;
- }
// Success message
system_message(elgg_echo("expages:posted"));
// add to river
add_to_river('river/expages/create','create',$_SESSION['user']->guid,$expages->guid);
// Remove the cache
- unset($_SESSION['expages_content']); unset($_SESSION['expagestitle']); unset($_SESSION['expagestags']);
+ unset($_SESSION['expages_content']); unset($_SESSION['expagestitle']);
// Forward back to the page
@@ -74,4 +65,4 @@
}
-?>
+?> \ No newline at end of file
diff --git a/mod/externalpages/views/default/expages/forms/edit.php b/mod/externalpages/views/default/expages/forms/edit.php
index 2f638d549..154b621fc 100644
--- a/mod/externalpages/views/default/expages/forms/edit.php
+++ b/mod/externalpages/views/default/expages/forms/edit.php
@@ -23,21 +23,17 @@
if($page_contents){
foreach($page_contents as $pc){
$description = $pc->description;
- $tags = $pc->tags;
$guid = $pc->guid;
}
}else {
- $tags = "";
$description = "";
}
// set the required form variables
$input_area = elgg_view('input/longtext', array('internalname' => 'expagescontent', 'value' => $description));
- $tag_input = elgg_view('input/tags', array('internalname' => 'expagestags', 'value' => $tags));
$submit_input = elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('save')));
$hidden_value = elgg_view('input/hidden', array('internalname' => 'content_type', 'value' => $type));
$hidden_guid = elgg_view('input/hidden', array('internalname' => 'expage_guid', 'value' => $guid));
- $tag_label = elgg_echo('tags') . "<br/>";
//type
$type = $vars['type'];
@@ -61,10 +57,6 @@
<h3 class='settings'>$external_page_title</h3>
<p class='longtext_editarea'>$input_area</p>
- <p>
- $tag_label
- $tag_input
- </p>
$hidden_value
$hidden_guid
<br />
@@ -83,10 +75,12 @@ EOT;
<a name="preview"></a>
<h2>Preview</h2>
<?php
+/*
if($description)
echo $description;
else
echo elgg_echo('expages:nopreview');
+*/
?>
</div>
--> \ No newline at end of file
diff --git a/mod/groups/actions/groupskillinvitation.php b/mod/groups/actions/groupskillinvitation.php
index 78c920df0..df265475e 100644
--- a/mod/groups/actions/groupskillinvitation.php
+++ b/mod/groups/actions/groupskillinvitation.php
@@ -24,7 +24,7 @@
if (check_entity_relationship($group->guid, 'invited', $user->guid))
{
remove_entity_relationship($group->guid, 'invited', $user->guid);
- system_message(elgg_echo("groups:joinrequestkilled"));
+ system_message(elgg_echo("groups:invitekilled"));
}
forward($_SERVER['HTTP_REFERER']);
diff --git a/mod/groups/all.php b/mod/groups/all.php
index c4347c1e4..d397abe2f 100644
--- a/mod/groups/all.php
+++ b/mod/groups/all.php
@@ -26,8 +26,9 @@
set_context('search');
if ($tag != "") {
+ $filter = 'search';
// groups plugin saves tags as "interests" - see groups_fields_setup() in start.php
- $objects = list_entities_from_metadata('interests',$tag,'group',"","", $limit, false);
+ $objects = list_entities_from_metadata('interests',$tag,'group',"","", $limit, false, false, true, false);
} else {
switch($filter){
case "newest":
diff --git a/mod/groups/languages/en.php b/mod/groups/languages/en.php
index 25e917dcb..e681e1294 100644
--- a/mod/groups/languages/en.php
+++ b/mod/groups/languages/en.php
@@ -150,9 +150,10 @@
'groups:invite:subject' => "%s you have been invited to join %s!",
'groups:started' => "Started by",
'groups:joinrequest:remove:check' => 'Are you sure you want to remove this join request?',
+ 'groups:invite:remove:check' => 'Are you sure you want to remove this invite?',
'groups:invite:body' => "Hi %s,
-%s invited you to join the '%s' group, click below to confirm:
+%s invited you to join the '%s' group. Click below to view your invitations:
%s",
@@ -166,11 +167,11 @@ You are now a member of the '%s' group! Click below to begin posting!
'groups:request:subject' => "%s has requested to join %s",
'groups:request:body' => "Hi %s,
-%s has requested to join the '%s' group, click below to view their profile:
+%s has requested to join the '%s' group. Click below to view their profile:
%s
-or click below to confirm request:
+or click below to view the group's join requests:
%s",
@@ -221,6 +222,7 @@ or click below to confirm request:
'grouppost:nopost' => 'Empty post',
'groups:deletewarning' => "Are you sure you want to delete this group? There is no undo!",
+ 'groups:invitekilled' => 'The invite has been deleted.',
'groups:joinrequestkilled' => 'The join request has been deleted.',
);
diff --git a/mod/groups/views/default/groups/find.php b/mod/groups/views/default/groups/find.php
index 5032a74fb..534469052 100644
--- a/mod/groups/views/default/groups/find.php
+++ b/mod/groups/views/default/groups/find.php
@@ -8,11 +8,7 @@ $tag_string = elgg_echo('groups:search:tags');
?>
<h3><?php echo elgg_echo('groups:searchtag'); ?></h3>
-<form id="groupsearchform" action="<?php echo $vars['url']; ?>pg/search/" method="get">
+<form id="groupsearchform" action="<?php echo $vars['url']; ?>pg/groups/world/" method="get">
<input type="text" name="tag" value="<?php echo $tag_string; ?>" onclick="if (this.value=='<?php echo $tag_string; ?>') { this.value='' }" class="search_input" />
- <input type="hidden" name="entity_type" value="group" />
- <input type="hidden" name="subtype" value="" />
- <input type="hidden" name="tagtype" value="" />
- <input type="hidden" name="owner_guid" value="0" />
<input type="submit" value="<?php echo elgg_echo('go'); ?>" />
</form> \ No newline at end of file
diff --git a/mod/groups/views/default/groups/invitationrequests.php b/mod/groups/views/default/groups/invitationrequests.php
index ddc8a057a..135bf1940 100644
--- a/mod/groups/views/default/groups/invitationrequests.php
+++ b/mod/groups/views/default/groups/invitationrequests.php
@@ -22,7 +22,7 @@ if (!empty($vars['invitations']) && is_array($vars['invitations'])) {
<?php
echo str_replace('<a', '<a class="action_button disabled" ', elgg_view('output/confirmlink',array(
'href' => $vars['url'] . "action/groups/killinvitation?user_guid={$user->getGUID()}&group_guid={$group->getGUID()}",
- 'confirm' => elgg_echo('groups:joinrequest:remove:check'),
+ 'confirm' => elgg_echo('groups:invite:remove:check'),
'text' => elgg_echo('delete'),
)));
diff --git a/mod/groups/views/rss/groups/profileitems.php b/mod/groups/views/rss/groups/profileitems.php
index 8ae4db971..1f6688d68 100644
--- a/mod/groups/views/rss/groups/profileitems.php
+++ b/mod/groups/views/rss/groups/profileitems.php
@@ -11,7 +11,7 @@
*/
//right column
- if ($forae = elgg_get_entities(array('types' => 'object', 'owner_guid' => $vars['entity']->guid))) {
+ if ($forae = elgg_get_entities(array('types' => 'object', 'container_guid' => $vars['entity']->guid))) {
foreach($forae as $forum)
echo elgg_view_entity($forum);
}
diff --git a/mod/groups/views/rss/object/groupforumtopic.php b/mod/groups/views/rss/object/groupforumtopic.php
new file mode 100644
index 000000000..765d315ee
--- /dev/null
+++ b/mod/groups/views/rss/object/groupforumtopic.php
@@ -0,0 +1,34 @@
+<?php
+/**
+ * Elgg groupforumtopic view
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
+
+$title = $vars['entity']->title;
+
+$body = '';
+$annotation = $vars['entity']->getAnnotations('group_topic_post', 1, 0, "asc");
+if (count($annotation == 1)) {
+ $body = $annotation[0]->value;
+}
+?>
+
+<item>
+<guid isPermaLink='true'><?php echo htmlspecialchars($vars['entity']->getURL()); ?></guid>
+<pubDate><?php echo date("r",$vars['entity']->time_created) ?></pubDate>
+<link><?php echo htmlspecialchars($vars['entity']->getURL()); ?></link>
+<title><![CDATA[<?php echo $title; ?>]]></title>
+<description><![CDATA[<?php echo (autop($body)); ?>]]></description>
+<?php
+ $owner = $vars['entity']->getOwnerEntity();
+ if ($owner) {
+?>
+<dc:creator><?php echo $owner->name; ?></dc:creator>
+<?php
+ }
+?>
+</item> \ No newline at end of file
diff --git a/mod/messages/index.php b/mod/messages/index.php
index 97c1cfff4..28a874635 100644
--- a/mod/messages/index.php
+++ b/mod/messages/index.php
@@ -22,6 +22,7 @@ $page_owner = get_loggedin_user();
set_page_owner($page_owner->getGUID());
// Get the user's inbox, this will be all messages where the 'toId' field matches their guid
+// @todo - fix hack where limit + 1 messages are requested
$messages = elgg_get_entities_from_metadata(array(
'type' => 'object',
'subtype' => 'messages',
@@ -49,4 +50,4 @@ $body = elgg_view_layout("one_column_with_sidebar", $area2);
// Draw page
-page_draw(sprintf(elgg_echo('messages:user'),$page_owner->name),$body); \ No newline at end of file
+page_draw(sprintf(elgg_echo('messages:user'),$page_owner->name),$body);
diff --git a/mod/messages/sent.php b/mod/messages/sent.php
index 4f432b47f..6aea2e561 100644
--- a/mod/messages/sent.php
+++ b/mod/messages/sent.php
@@ -25,7 +25,8 @@ $offset = get_input('offset',0);
$limit = 10;
// Display all the messages a user owns, these will make up the sentbox
-$messages = elgg_get_entities_from_metadata(array('metadata_name' => 'fromId', 'metadata_value' => $_SESSION['user']->guid, 'types' => 'object', 'subtypes' => 'messages', 'owner_guid' => $page_owner->guid, 'limit' => $limit, 'offset' => $offset));
+// @todo - fix hack where limit + 1 is passed
+$messages = elgg_get_entities_from_metadata(array('metadata_name' => 'fromId', 'metadata_value' => $_SESSION['user']->guid, 'types' => 'object', 'subtypes' => 'messages', 'owner_guid' => $page_owner->guid, 'limit' => $limit + 1, 'offset' => $offset));
// Set the page title
@@ -40,4 +41,4 @@ $area2 .= elgg_view("messages/forms/view",array('entity' => $messages, 'page_vie
$body = elgg_view_layout("one_column_with_sidebar", $area2);
// Draw page
-page_draw(sprintf(elgg_echo('messages:sentMessages'),$page_owner->name),$body); \ No newline at end of file
+page_draw(sprintf(elgg_echo('messages:sentMessages'),$page_owner->name),$body);
diff --git a/mod/search/views/rss/search/layout.php b/mod/search/views/rss/search/layout.php
new file mode 100644
index 000000000..d722ccaeb
--- /dev/null
+++ b/mod/search/views/rss/search/layout.php
@@ -0,0 +1,5 @@
+<?php
+
+echo $vars['body'];
+
+?> \ No newline at end of file
diff --git a/mod/thewire/start.php b/mod/thewire/start.php
index f4a29c47e..ef6564678 100644
--- a/mod/thewire/start.php
+++ b/mod/thewire/start.php
@@ -33,7 +33,6 @@
elgg_extend_view('css','thewire/css');
//extend views
- elgg_extend_view('activity/thewire', 'thewire/activity_view');
elgg_extend_view('profile/status', 'thewire/profile_status');
// Register a page handler, so we can have nice URLs
diff --git a/mod/tinymce/views/default/input/longtext.php b/mod/tinymce/views/default/input/longtext.php
index af9c3e998..0c912d32e 100644
--- a/mod/tinymce/views/default/input/longtext.php
+++ b/mod/tinymce/views/default/input/longtext.php
@@ -34,7 +34,8 @@
<!-- intialise tinymce, you can find other configurations here http://wiki.moxiecode.com/examples/tinymce/installation_example_01.php -->
<script language="javascript" type="text/javascript">
tinyMCE.init({
- mode : "textareas",
+ mode : "specific_textareas",
+ editor_selector : "mceEditor",
theme : "advanced",
plugins : "safari,spellchecker,autosave,fullscreen,preview,paste",
relative_urls : false,
@@ -86,7 +87,7 @@ else
?>
<!-- show the textarea -->
-<textarea class="input_textarea" name="<?php echo $vars['internalname']; ?>" <?php echo $vars['js']; ?>><?php echo htmlentities($vars['value'], null, 'UTF-8'); ?></textarea>
+<textarea class="input_textarea mceEditor" name="<?php echo $vars['internalname']; ?>" <?php echo $vars['js']; ?>><?php echo htmlentities($vars['value'], null, 'UTF-8'); ?></textarea>
<div class="toggle_editor_container"><a class="toggle_editor small link" href="javascript:toggleEditor('<?php echo $vars['internalname']; ?>');"><?php echo elgg_echo('tinymce:remove'); ?></a></div>
<script type="text/javascript">