diff options
author | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-10-30 22:23:45 +0000 |
---|---|---|
committer | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-10-30 22:23:45 +0000 |
commit | bb1f45eb02bac603d67ac08cb674c4050a245c28 (patch) | |
tree | 239c6afba40d3160be53c22984e3b7ba1b7442ec /mod/messages/views/default | |
parent | b5c5261077640d2390f4e3c44cc51bfe4bed2e4c (diff) | |
download | elgg-bb1f45eb02bac603d67ac08cb674c4050a245c28.tar.gz elgg-bb1f45eb02bac603d67ac08cb674c4050a245c28.tar.bz2 |
Refs #2598: Converted most $vars['url'] to elgg_get_site_url()
git-svn-id: http://code.elgg.org/elgg/trunk@7149 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/messages/views/default')
-rw-r--r-- | mod/messages/views/default/messages/css.php | 8 | ||||
-rw-r--r-- | mod/messages/views/default/messages/forms/reply.php | 2 | ||||
-rw-r--r-- | mod/messages/views/default/messages/forms/send.php | 4 | ||||
-rw-r--r-- | mod/messages/views/default/messages/forms/view.php | 2 | ||||
-rw-r--r-- | mod/messages/views/default/messages/menu.php | 2 | ||||
-rw-r--r-- | mod/messages/views/default/messages/messages.php | 12 | ||||
-rw-r--r-- | mod/messages/views/default/messages/topbar.php | 4 | ||||
-rw-r--r-- | mod/messages/views/default/messages/view.php | 4 |
8 files changed, 19 insertions, 19 deletions
diff --git a/mod/messages/views/default/messages/css.php b/mod/messages/views/default/messages/css.php index 36871e22e..95bcba108 100644 --- a/mod/messages/views/default/messages/css.php +++ b/mod/messages/views/default/messages/css.php @@ -8,24 +8,24 @@ /* messages/new messages icon & counter in elgg_topbar */ a.privatemessages { - background:transparent url(<?php echo $vars['url']; ?>mod/messages/graphics/toolbar_messages_icon.gif) no-repeat left 2px; + background:transparent url(<?php echo elgg_get_site_url(); ?>mod/messages/graphics/toolbar_messages_icon.gif) no-repeat left 2px; padding-left:16px; margin:4px 15px 0 5px; cursor:pointer; } a.privatemessages:hover { text-decoration: none; - background:transparent url(<?php echo $vars['url']; ?>mod/messages/graphics/toolbar_messages_icon.gif) no-repeat left -36px; + background:transparent url(<?php echo elgg_get_site_url(); ?>mod/messages/graphics/toolbar_messages_icon.gif) no-repeat left -36px; } a.privatemessages.new { - background:transparent url(<?php echo $vars['url']; ?>mod/messages/graphics/toolbar_messages_icon.gif) no-repeat left 2px; + background:transparent url(<?php echo elgg_get_site_url(); ?>mod/messages/graphics/toolbar_messages_icon.gif) no-repeat left 2px; padding-left:18px; margin:4px 15px 0 5px; color:white; } a.privatemessages.new:hover { text-decoration: none; - background:transparent url(<?php echo $vars['url']; ?>mod/messages/graphics/toolbar_messages_icon.gif) no-repeat left -36px; + background:transparent url(<?php echo elgg_get_site_url(); ?>mod/messages/graphics/toolbar_messages_icon.gif) no-repeat left -36px; } a.privatemessages.new span { background-color: red; diff --git a/mod/messages/views/default/messages/forms/reply.php b/mod/messages/views/default/messages/forms/reply.php index c717f9b13..998c0071f 100644 --- a/mod/messages/views/default/messages/forms/reply.php +++ b/mod/messages/views/default/messages/forms/reply.php @@ -12,7 +12,7 @@ } ?> -<form class="margin_top" id="messages_reply_form" action="<?php echo $vars['url']; ?>action/messages/send" method="post" name="messageForm"> +<form class="margin_top" id="messages_reply_form" action="<?php echo elgg_get_site_url(); ?>action/messages/send" method="post" name="messageForm"> <?php echo elgg_view('action/securitytoken'); ?> <!-- populate the title space with the orginal message title, inserting re: before it --> diff --git a/mod/messages/views/default/messages/forms/send.php b/mod/messages/views/default/messages/forms/send.php index 7fea03842..a2d373549 100644 --- a/mod/messages/views/default/messages/forms/send.php +++ b/mod/messages/views/default/messages/forms/send.php @@ -22,7 +22,7 @@ unset($_SESSION['msg_to']); unset($_SESSION['msg_title']); unset($_SESSION['msg_contents']); ?> -<form id="messages_send_form" action="<?php echo $vars['url']; ?>action/messages/send" method="post" name="messageForm"> +<form id="messages_send_form" action="<?php echo elgg_get_site_url(); ?>action/messages/send" method="post" name="messageForm"> <?php echo elgg_view('input/securitytoken'); //check to see if the message recipient has already been selected @@ -34,7 +34,7 @@ unset($_SESSION['msg_contents']); echo "<div class='entity_listing messages clearfloat'><div class='entity_listing_icon'>".elgg_view("profile/icon",array('entity' => $user, 'size' => 'tiny'))."</div>"; //draw it - echo "<div class='entity_listing_info'>".elgg_echo("messages:to").": <a href='{$vars['url']}pg/profile/".$user->username."'>".$user->name."</a>"; + echo "<div class='entity_listing_info'>".elgg_echo("messages:to").": <a href='".elgg_get_site_url()."pg/profile/".$user->username."'>".$user->name."</a>"; //set the hidden input field to the recipients guid echo "<input type='hidden' name='send_to' value=\"{$send_to}\" />"; echo "</div></div>"; diff --git a/mod/messages/views/default/messages/forms/view.php b/mod/messages/views/default/messages/forms/view.php index 3d76c56ca..c957e9610 100644 --- a/mod/messages/views/default/messages/forms/view.php +++ b/mod/messages/views/default/messages/forms/view.php @@ -19,4 +19,4 @@ if($vars['page_view'] == "inbox"){ $body .= '<input class="cancel_button" type="button" onclick="javascript:$(\'input[type=checkbox]\').click();" value="'.elgg_echo('messages:toggle').'" />'; $body .= '</div>'; -echo elgg_view('input/form',array('body' => $body, 'action' => $vars['url'] . 'action/messages/delete', 'method' => 'post', 'internalid' => 'messages_list_form'));
\ No newline at end of file +echo elgg_view('input/form',array('body' => $body, 'action' => elgg_get_site_url() . 'action/messages/delete', 'method' => 'post', 'internalid' => 'messages_list_form'));
\ No newline at end of file diff --git a/mod/messages/views/default/messages/menu.php b/mod/messages/views/default/messages/menu.php index 6fbeedd46..566a87179 100644 --- a/mod/messages/views/default/messages/menu.php +++ b/mod/messages/views/default/messages/menu.php @@ -8,5 +8,5 @@ // login check already performed in profile/icon ?> <li class="user_menu_profile"> - <a class="send_message" href="<?php echo $vars['url']; ?>mod/messages/send.php?send_to=<?php echo $vars['entity']->guid; ?>"><?php echo elgg_echo("messages:sendmessage"); ?></a> + <a class="send_message" href="<?php echo elgg_get_site_url(); ?>mod/messages/send.php?send_to=<?php echo $vars['entity']->guid; ?>"><?php echo elgg_echo("messages:sendmessage"); ?></a> </li>
\ No newline at end of file diff --git a/mod/messages/views/default/messages/messages.php b/mod/messages/views/default/messages/messages.php index e2bce0f44..ec94c5f0f 100644 --- a/mod/messages/views/default/messages/messages.php +++ b/mod/messages/views/default/messages/messages.php @@ -12,14 +12,14 @@ // set some variables to use below if(get_input("type") == "sent"){ // send back to the users sentbox - $url = $vars['url'] . "mod/messages/sent.php"; + $url = elgg_get_site_url() . "mod/messages/sent.php"; // set up breadcrumbs context elgg_push_breadcrumb(elgg_echo('messages:sent'), $url); //this is used on the delete link so we know which type of message it is $type = "sent"; } else { //send back to the users inbox - $url = $vars['url'] . "pg/messages/" . get_loggedin_user()->username; + $url = elgg_get_site_url() . "pg/messages/" . get_loggedin_user()->username; // set up breadcrumbs context elgg_push_breadcrumb(elgg_echo('messages:inbox'), $url); //this is used on the delete link so we know which type of message it is @@ -46,7 +46,7 @@ if (isloggedin()) <div class="content_header_options"> <a class="action_button message_reply" onclick="elgg_slide_toggle(this,'#elgg_page_contents','#message_reply_form');"><?php echo elgg_echo('messages:answer'); ?></a> <?php echo elgg_view("output/confirmlink", array( - 'href' => $vars['url'] . "action/messages/delete?message_id=" . $vars['entity']->getGUID() . "&type={$type}&submit=" . elgg_echo('delete'), + 'href' => elgg_get_site_url() . "action/messages/delete?message_id=" . $vars['entity']->getGUID() . "&type={$type}&submit=" . elgg_echo('delete'), 'text' => elgg_echo('delete'), 'confirm' => elgg_echo('deleteconfirm'), 'class' => "action_button disabled" @@ -64,11 +64,11 @@ if (isloggedin()) //get an instance of the user who the message has been sent to so we can access the name and icon $user_object = get_entity($vars['entity']->toId); $message_icon = elgg_view("profile/icon",array('entity' => $user_object, 'size' => 'tiny')); - $message_owner = elgg_echo('messages:to').": <a href='{$vars['url']}pg/profile/".$user_object->username."'>".$user_object->name."</a>"; + $message_owner = elgg_echo('messages:to').": <a href='".elgg_get_site_url()."pg/profile/".$user_object->username."'>".$user_object->name."</a>"; }else{ $user_object = get_entity($vars['entity']->fromId); $message_icon = elgg_view("profile/icon",array('entity' => $user_object, 'size' => 'tiny')); - $message_owner = elgg_echo('messages:from').": <a href='{$vars['url']}pg/profile/".$user_object->username."'>".get_entity($vars['entity']->fromId)->name."</a>"; + $message_owner = elgg_echo('messages:from').": <a href='".elgg_get_site_url()."pg/profile/".$user_object->username."'>".get_entity($vars['entity']->fromId)->name."</a>"; } ?> <div class="entity_listing_icon"><?php echo $message_icon ?></div> @@ -92,7 +92,7 @@ if (isloggedin()) <!-- reply form --> <div id="message_reply_form" class="hidden margin_top"> <h2><?php echo elgg_echo('messages:answer'); ?></h2> - <form action="<?php echo $vars['url']; ?>action/messages/send" method="post" name="messageForm" class="margin_top" id="messages_send_form"> + <form action="<?php echo elgg_get_site_url(); ?>action/messages/send" method="post" name="messageForm" class="margin_top" id="messages_send_form"> <?php echo elgg_view('input/securitytoken'); ?> <p><label><?php echo elgg_echo("messages:title"); ?>: <br /><input type='text' name='title' class="input_text" value='<?php echo $reply_title; ?>' /></label></p> <p class="longtext_inputarea"><label><?php echo elgg_echo("messages:message"); ?>:</label> diff --git a/mod/messages/views/default/messages/topbar.php b/mod/messages/views/default/messages/topbar.php index 4aa23b91a..51ca8a15b 100644 --- a/mod/messages/views/default/messages/topbar.php +++ b/mod/messages/views/default/messages/topbar.php @@ -17,10 +17,10 @@ if($num_messages){ if($num == 0) { ?> - <a href="<?php echo $vars['url']; ?>pg/messages/<?php echo get_loggedin_user()->username; ?>" class="privatemessages" > </a> + <a href="<?php echo elgg_get_site_url(); ?>pg/messages/<?php echo get_loggedin_user()->username; ?>" class="privatemessages" > </a> <?php }else{ ?> - <a href="<?php echo $vars['url']; ?>pg/messages/<?php echo get_loggedin_user()->username; ?>" class="privatemessages new" ><span><?php echo $num; ?></span></a> + <a href="<?php echo elgg_get_site_url(); ?>pg/messages/<?php echo get_loggedin_user()->username; ?>" class="privatemessages new" ><span><?php echo $num; ?></span></a> <?php } diff --git a/mod/messages/views/default/messages/view.php b/mod/messages/views/default/messages/view.php index 41ad11104..7d9e45ad2 100644 --- a/mod/messages/views/default/messages/view.php +++ b/mod/messages/views/default/messages/view.php @@ -41,7 +41,7 @@ if (is_array($vars['entity']) && sizeof($vars['entity']) > 0) { echo "<div class='message_subject'>"; // display delete button echo "<span class='delete_button'>" . elgg_view("output/confirmlink", array( - 'href' => $vars['url'] . "action/messages/delete?message_id=" . $message->getGUID() . "&type=inbox&submit=" . urlencode(elgg_echo('delete')), + 'href' => elgg_get_site_url() . "action/messages/delete?message_id=" . $message->getGUID() . "&type=inbox&submit=" . urlencode(elgg_echo('delete')), 'text' => elgg_echo('delete'), 'confirm' => elgg_echo('deleteconfirm'), )) . "</span>"; @@ -76,7 +76,7 @@ if (is_array($vars['entity']) && sizeof($vars['entity']) > 0) { echo "<div class='message_subject'>"; //display the link to 'delete' echo "<div class='delete_button'>" . elgg_view("output/confirmlink", array( - 'href' => $vars['url'] . "action/messages/delete?message_id=" . $message->getGUID() . "&type=sent&submit=" . urlencode(elgg_echo('delete')), + 'href' => elgg_get_site_url() . "action/messages/delete?message_id=" . $message->getGUID() . "&type=sent&submit=" . urlencode(elgg_echo('delete')), 'text' => elgg_echo('delete'), 'confirm' => elgg_echo('deleteconfirm'), )) . "</div>"; |