/[drupal]/contributions/modules/flag_content/flag_content.module
ViewVC logotype

Diff of /contributions/modules/flag_content/flag_content.module

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

revision 1.6.2.12.2.3, Sun Jun 1 04:50:24 2008 UTC revision 1.6.2.12.2.4, Thu Jun 19 18:38:11 2008 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: flag_content.module,v 1.6.2.12.2.2 2008/05/03 14:46:42 kbahey Exp $  // $Id: flag_content.module,v 1.6.2.12.2.3 2008/06/01 04:50:24 kbahey Exp $
3    
4  // Copyright 2006-2007 Khalid Baheyeldin http://2bits.com  // Copyright 2006-2007 Khalid Baheyeldin http://2bits.com
5    
# Line 491  function _flag_content_check($eid, $type Line 491  function _flag_content_check($eid, $type
491  }  }
492    
493  function theme_flag_content_mail($entry = NULL, $type = FLAG_CONTENT_TYPE_NODE, $name, $mail, $reason) {  function theme_flag_content_mail($entry = NULL, $type = FLAG_CONTENT_TYPE_NODE, $name, $mail, $reason) {
494    global $user, $base_url;    global $user;
495    switch ($type) {    switch ($type) {
496      case FLAG_CONTENT_TYPE_NODE:      case FLAG_CONTENT_TYPE_NODE:
497        $title = $entry->title;        $title = $entry->title;
498        $eid = $entry->nid;        $eid = $entry->nid;
499        $path = "$type/$eid";        $path = url("$type/$eid", NULL, NULL, 1);
500        break;        break;
501      case FLAG_CONTENT_TYPE_USER:      case FLAG_CONTENT_TYPE_USER:
502        $title = $entry->name;        $title = $entry->name;
503        $eid = $entry->uid;        $eid = $entry->uid;
504        $path = "$type/$eid";        $path = url("$type/$eid", NULL, NULL, 1);
505        break;        break;
506      case FLAG_CONTENT_TYPE_COMMENT:      case FLAG_CONTENT_TYPE_COMMENT:
507        $title = $entry->subject;        $title = $entry->subject;
508        $eid = $entry->cid;        $eid = $entry->cid;
509        $path = url('node/' . $entry->nid, NULL, NULL, 0) . "#comment-" . $entry->cid;        $path = url('node/' . $entry->nid, NULL, NULL, 1) . "#comment-" . $entry->cid;
510        break;        break;
511    }    }
512    
513    if ($user->uid) {    if ($user->uid) {
514      $user_url = $base_url . base_path() . "user/$user->uid";      $user_url = url("user/$user->uid", NULL, NULL, 1);
515    }    }
516    else {    else {
517      $user_url = t('n/a');      $user_url = t('n/a');
# Line 525  function theme_flag_content_mail($entry Line 525  function theme_flag_content_mail($entry
525      ));      ));
526    $body .= t("\nItem: @title (@entry_url)", array(    $body .= t("\nItem: @title (@entry_url)", array(
527      '@title'     => $title,      '@title'     => $title,
528      '@entry_url' => $base_url . base_path() . $path,      '@entry_url' => $path,
529      ));      ));
530    $body .= t("\nReason: @reason", array(    $body .= t("\nReason: @reason", array(
531      '@reason' => $reason,      '@reason' => $reason,
532      ));      ));
533    $body .= t("\n\nManage the flagged items list at @manage", array(    $body .= t("\n\nManage the flagged items list at @manage", array(
534      '@manage' => $base_url . base_path() . 'admin/content/flag_content',      '@manage' => url('admin/content/flag_content', NULL, NULL, 1),
535      ));      ));
536    
537    $to = check_plain($to);    $to = check_plain($to);

Legend:
Removed from v.1.6.2.12.2.3  
changed lines
  Added in v.1.6.2.12.2.4

  ViewVC Help
Powered by ViewVC 1.1.2