Ignore:
Timestamp:
Dec 21, 2009, 1:58:00 PM (14 years ago)
Author:
patdenice
Message:

[Plugin] [PWG_Stuffs]
Add edit link (if Comment Editor is installed) on LastComs module.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/PWG_Stuffs/modules/LastComs/main.inc.php

    r3609 r4539  
    22
    33if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
     4global $user, $conf;
    45
    56// +-----------------------------------------------------------------------+
     
    164165      }
    165166    }
     167
     168    // Show comment editor link
     169    if (defined('CE_PATH') and ((!is_a_guest() and ($user[$conf['user_fields']['username']] == $author)) or is_admin()))
     170    {
     171      load_language('plugin.lang', CE_PATH);
     172      $tpl_comment['U_EDIT'] = add_url_params(get_root_url() . 'index.php', array(
     173            CE_ACTION => CE_ACTION_EDIT,
     174            CE_ID => $comment['comment_id']));
     175    }
    166176    array_push($block['comments'], $tpl_comment);
    167177  }
Note: See TracChangeset for help on using the changeset viewer.