Commit 35f5ac9d authored by Stacey Walker's avatar Stacey Walker
Browse files

changed friend request wording from reason to message #2579

Conflicts:

	htdocs/lib/version.php
parent 99efe4ab
......@@ -380,7 +380,7 @@
<FIELD NAME="owner" TYPE="int" LENGTH="10" NOTNULL="true" />
<FIELD NAME="requester" TYPE="int" LENGTH="10" NOTNULL="true" />
<FIELD NAME="ctime" TYPE="datetime" NOTNULL="true" />
<FIELD NAME="reason" TYPE="text" NOTNULL="false" />
<FIELD NAME="message" TYPE="text" NOTNULL="false" />
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="owner,requester" />
......
......@@ -990,6 +990,15 @@ function xmldb_core_upgrade($oldversion=0) {
insert_record('cron', $cron);
}
if ($oldversion < 2008040204) {
if (is_postgres()) {
execute_sql('ALTER TABLE {usr_friend_request} RENAME COLUMN reason TO message');
}
else if (is_mysql()) {
execute_sql('ALTER TABLE {usr_friend_request} CHANGE reason message TEXT');
}
}
return $status;
}
......
......@@ -848,7 +848,7 @@ function get_users_data($userlist) {
NULL AS friend,
NULL AS requestedfriendship,
(SELECT title FROM {artefact} WHERE artefacttype = \'introduction\' AND owner = u.id) AS introduction,
reason
message
FROM {usr} u
JOIN {usr_friend_request} fr ON fr.requester = u.id
WHERE fr.owner = ?
......
......@@ -25,7 +25,7 @@
<div class="pending">
<strong>
{str tag='whymakemeyourfriend' section='group'}
{$user->reason}
{$user->message}
</strong>
</div>
<div>
......
......@@ -44,7 +44,7 @@
</ul>
{if $relationship == 'pending'}
<div class="message">
{str tag='whymakemeyourfriend' section='group'} {$reason}
{str tag='whymakemeyourfriend' section='group'} {$message}
{$requestform}
</div>
{/if}
......
......@@ -48,9 +48,9 @@ $form = pieform(array(
'name' => 'requestfriendship',
'autofocus' => false,
'elements' => array(
'reason' => array(
'message' => array(
'type' => 'textarea',
'title' => get_string('reason'),
'title' => get_string('message'),
'cols' => 50,
'rows' => 4,
),
......@@ -87,11 +87,11 @@ function requestfriendship_submit(Pieform $form, $values) {
$f->owner = $id;
$f->requester = $loggedinid;
$f->reason = $values['reason'];
$f->message = $values['message'];
insert_record('usr_friend_request', $f);
$n->subject = get_string_from_language($lang, 'requestedfriendlistsubject', 'group');
if (isset($values['reason']) && !empty($values['reason'])) {
$n->message = get_string_from_language($lang, 'requestedfriendlistmessagereason', 'group', $displayname) . $values['reason'];
if (isset($values['message']) && !empty($values['message'])) {
$n->message = get_string_from_language($lang, 'requestedfriendlistmessagereason', 'group', $displayname) . $values['message'];
}
else {
$n->message = get_string_from_language($lang, 'requestedfriendlistmessage', 'group', $displayname);
......
......@@ -301,7 +301,7 @@ if ($loggedinid != $userid) {
)
)
));
$smarty->assign('reason', $record->reason);
$smarty->assign('message', $record->message);
$smarty->assign('requestform', $requestform);
}
else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment