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

Diff of /contributions/modules/comment_revisions/comment_revisions.module

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

revision 1.1.2.4, Sat Jun 14 08:26:55 2008 UTC revision 1.1.2.5, Sat Jun 14 12:12:52 2008 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: comment_revisions.module,v 1.40 2008/06/14 08:23:43 Raiden Exp $  // $Id: comment_revisions.module,v 1.42 2008/06/14 11:19:06 Raiden Exp $
3  /**  /**
4   *  @file   *  @file
5   *  Complete module for comment_revisions   *  Complete module for comment_revisions
# Line 293  function comment_revisions_link($type, $ Line 293  function comment_revisions_link($type, $
293    
294  /**  /**
295   * creates an overview of revisions for cid   * creates an overview of revisions for cid
  * with permission "view own revisions"  
  */  
 function comment_revisions_overview_own($cid) {  
   global $user;  
   $creator = $user->uid;  
   echo "ELLO";  
   comment_revisions_overview($cid, $creator);  
 }  
 /**  
  * creates an overview of revisions for cid  
296   */   */
297  function comment_revisions_overview($cid) {  function comment_revisions_overview($cid) {
298    global $user;    global $user;
# Line 336  function comment_revisions_overview($cid Line 326  function comment_revisions_overview($cid
326      $row[] = $tempar;      $row[] = $tempar;
327      $rows[] = array_merge($row, $operations);      $rows[] = array_merge($row, $operations);
328    }    }
329    
330    $header = array(t('Revision'), array('data' => t('Operations'), 'colspan' => 2));    $header = array(t('Revision'), array('data' => t('Operations'), 'colspan' => 2));
331    return theme('table', $header, $rows);    /* create back link */
332      $path = "node/" ._comment_revisions_getnid($cid);
333      $pathfragment = "comment-". $cid;
334      $attributes = array();
335      $query = NULL;
336      $output = l(t("Back to comment"), $path , $attributes, $query, $pathfragment);
337      $output .= theme('table', $header, $rows);
338      return $output;
339  }  }
340    
341  /**  /**
# Line 450  function _comment_revisions_load_revisio Line 448  function _comment_revisions_load_revisio
448   */   */
449  function _comment_revision_get_actual_revision($cid) {  function _comment_revision_get_actual_revision($cid) {
450    return db_result(db_query("SELECT vid FROM {comment_revisions_actual} WHERE cid=%d", $cid));    return db_result(db_query("SELECT vid FROM {comment_revisions_actual} WHERE cid=%d", $cid));
451    }
452    
453    /**
454     * returns nid of cid
455     */
456    function _comment_revisions_getnid($cid) {
457      return db_result(db_query("SELECT nid FROM {comments} WHERE cid=%d", $cid));
458  }  }

Legend:
Removed from v.1.1.2.4  
changed lines
  Added in v.1.1.2.5

  ViewVC Help
Powered by ViewVC 1.1.2