/[drupal]/contributions/modules/facebook_status/facebook_status_views_handler_field_repost.inc
ViewVC logotype

Contents of /contributions/modules/facebook_status/facebook_status_views_handler_field_repost.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download) (as text)
Sun Oct 11 17:33:51 2009 UTC (6 weeks, 3 days ago) by icecreamyou
Branch: MAIN
CVS Tags: DRUPAL-6--2-0, HEAD
Branch point for: DRUPAL-6--2
File MIME type: text/x-php
Added "re-post" links for others' self messages
Fixed double quotes are removed from default text in status update form
Fixed minor bug where "reply" links would sometimes appear when they shouldn't
1 <?php
2 // $Id$
3
4 /**
5 * @file
6 * Views handler for a "re-post" link.
7 */
8
9 /**
10 * Formats the "re-post" link.
11 */
12 class facebook_status_views_handler_field_repost extends views_handler_field {
13 function render($values) {
14 $pid = $values->facebook_status_pid;
15 if (!$pid) {
16 $status = facebook_status_load($values->facebook_status_sid);
17 $pid = $status->pid;
18 }
19 if ((user_access('edit own status') || user_access('edit all statuses')) && $pid != $GLOBALS['user']->uid) {
20 drupal_add_css(drupal_get_path('module', 'facebook_status') .'/facebook_status.css');
21 $options = array(
22 'attributes' => array('class' => 'facebook_status_conversation_link'),
23 'query' => array('sid' => $values->facebook_status_sid, 'destination' => $_GET['q'])
24 );
25 return l(t('Re-post'), 'share-status', $options);
26 }
27 }
28 }

  ViewVC Help
Powered by ViewVC 1.1.2