当前位置: 首页>>代码示例>>PHP>>正文


PHP Comment::getId方法代码示例

本文整理汇总了PHP中Comment::getId方法的典型用法代码示例。如果您正苦于以下问题:PHP Comment::getId方法的具体用法?PHP Comment::getId怎么用?PHP Comment::getId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Comment的用法示例。


在下文中一共展示了Comment::getId方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: date

 function fyi_read()
 {
     $link = mysql_connect(DB_HOST, DB_USER, DB_PASS);
     mysql_select_db(DB_NAME);
     $ts = date('Y-m-d H:i:s');
     $query = "update healingcrystals_assignments_action_request set is_fyi='R', last_modified='" . $ts . "', fyi_marked_read_on='" . $ts . "' where is_fyi='1' and user_id='" . $this->logged_user->getId() . "' and comment_id='" . $this->active_comment->getId() . "'";
     mysql_query($query);
     mysql_close($link);
     // $this->redirectToUrl(assemble_url('goto_home_tab'));
 }
开发者ID:NaszvadiG,项目名称:activecollab_loc,代码行数:10,代码来源:CommentsController.class.php

示例2: renderComment

 public function renderComment(Comment $comm, $template)
 {
     $vars = array('id' => $comm->getId(), 'username' => $comm->getUsername(), 'text' => $comm->getText(), 'date' => date('j.m.Y H:i', $comm->getDate()), 'ip' => $comm->getIpAddress());
     $user = FrontController::getUser();
     $config = FrontController::$config;
     if (in_array($this->_user->user_group, $config['moder_groups']) || in_array($this->_user->user_id, $config['moders']) || ($user->user_id == $comm->getUserId() && $comm->getUserId() || $user->ip_address == $comm->getIpAddress() && $comm->getDate() > time() - $config['owner_comment_del_time'])) {
         $blocks['perm_del'] = true;
     }
     return $this->render($template, $vars, $blocks);
 }
开发者ID:dautushenka,项目名称:DLE-Statement,代码行数:10,代码来源:Views.php

示例3: addInstanceToPool

 /**
  * Adds an object to the instance pool.
  *
  * Propel keeps cached copies of objects in an instance pool when they are retrieved
  * from the database.  In some cases -- especially when you override doSelect*()
  * methods in your stub classes -- you may need to explicitly add objects
  * to the cache in order to ensure that the same objects are always returned by doSelect*()
  * and retrieveByPK*() calls.
  *
  * @param      Comment $value A Comment object.
  * @param      string $key (optional) key to use for instance map (for performance boost if key was already calculated externally).
  */
 public static function addInstanceToPool(Comment $obj, $key = null)
 {
     if (Propel::isInstancePoolingEnabled()) {
         if ($key === null) {
             $key = (string) $obj->getId();
         }
         // if key === null
         self::$instances[$key] = $obj;
     }
 }
开发者ID:alexspark21,项目名称:symfony_bisM,代码行数:22,代码来源:BaseCommentPeer.php

示例4: prune

 /**
  * Exclude object from result
  *
  * @param     Comment $comment Object to remove from the list of results
  *
  * @return    CommentQuery The current query, for fluid interface
  */
 public function prune($comment = null)
 {
     if ($comment) {
         $this->addUsingAlias(CommentPeer::ID, $comment->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
开发者ID:ratibus,项目名称:Crew,代码行数:14,代码来源:BaseCommentQuery.php

示例5:

                if ($comment->getAuthor() == $uid) {
                    $permEdit = true;
                }
                $blog_user = Database::get()->querySingle("SELECT user_id FROM blog_post WHERE id = ?d", $comment->getRid());
                if ($blog_user->user_id == $uid) {
                    $permEdit = true;
                }
                if (isset($is_admin) && $is_admin) {
                    $permEdit = true;
                }
            }
            if ($permEdit) {
                if ($comment->edit($_POST['commentText'])) {
                    $response[0] = 'OK';
                    $response[1] = "<div class='alert alert-success'>".$langCommentsSaveSuccess."</div>";
                    $response[2] = '<div id="comment_content-'.$comment->getId().'">'.q($comment->getContent()).'</div>';
                } else {
                    $response[0] = 'ERROR';
                    $response[1] = "<div class='alert alert-warning'>".$langCommentsSaveFail."</div>";
                }
            } else {
                $response[0] = 'ERROR';
                $response[1] = "<div class='alert alert-warning'>".$langCommentsEditNoPerm."</div>";
            }
        } else {
            $response[0] = 'ERROR';
            $response[1] = "<div class='alert alert-warning'>".$langCommentsLoadFail."</div>";
        }
        echo json_encode($response);
    }
}
开发者ID:nikosv,项目名称:openeclass,代码行数:31,代码来源:comments_perso_blog.php

示例6: getAssignedActionRequestContent

 function getAssignedActionRequestContent($user_id = '', $tickets_due_flag = '')
 {
     require_once SMARTY_PATH . '/plugins/modifier.html_excerpt.php';
     if (empty($user_id)) {
         $user_id = $this->getId();
     }
     $status_str = '';
     if ($_POST['status'] == 'complete') {
         $status_str = "and a.is_action_request != '1'";
     } elseif ($_POST['status'] == 'incomplete') {
         $status_str = "and a.is_action_request = '1'";
     }
     if ($_POST['sort'] == 'name') {
         $order_by = " order by first_name ASC, date_added DESC";
     } else {
         $order_by = " order by date_added DESC";
     }
     $assigned_ar_content = '<table width="250" border="1" cellspacing="2" cellpadding="2"> <form action="' . assemble_url('assigned_action_request') . '" method="post" name="sortForm">             
            <tr><td valign="top"><b>Sort:</b><br/><input style="width:10px;" type="radio" name="sort" value="date" onclick="" ' . ($_POST['sort'] != 'name' ? 'checked="checked"' : '') . '/> Date<br/><input style="width:10px;" type="radio" name="sort" value="name" onclick="" ' . ($_POST['sort'] == 'name' ? 'checked="checked"' : '') . '/> Assigned To</td></tr>
            <tr><td valign="top"><b>Status:</b><br/><input style="width:10px;" type="radio" name="status" value="" onclick="" ' . ($_POST['status'] == '' ? 'checked="checked"' : '') . '/> All Action Requests<br/><input style="width:10px;" type="radio" name="status" value="incomplete" onclick="" ' . ($_POST['status'] == 'incomplete' ? 'checked="checked"' : '') . '/> Incomplete Action Requests<br/><input style="width:10px;" type="radio" name="status" value="complete" onclick="" ' . ($_POST['status'] == 'complete' ? 'checked="checked"' : '') . '/> Completed Action Requests</td></tr>
            <tr><td><input style="cursor:pointer;" type="button" onclick="document.sortForm.submit();" name="Filter" value="Filter"/></td></tr>
            <tr><td><br/><br/></td></tr>
     </form> </table>';
     $assigned_ar_content .= '<table width="100%" cellspacing="2" cellpadding="2"><tr><td align="center"><b>Date</b></td><td><b>Ticket Name</b></td><td><b>Assigned To</b></td></tr>';
     $query = "select *\n                 from healingcrystals_assignments_action_request a, healingcrystals_users u\n                 where a.selected_by_user_id = '" . $user_id . "' and a.user_id = u.id " . $status_str . $order_by;
     $link = mysql_connect(DB_HOST, DB_USER, DB_PASS);
     mysql_select_db(DB_NAME, $link);
     $result = mysql_query($query);
     while ($array = mysql_fetch_assoc($result)) {
         $comment = new Comment($array['comment_id']);
         $parent = $comment->getParent();
         if (instance_of($parent, 'ProjectObject')) {
             $assigned_ar_content .= '<tr><td valign="top" align="center" style="vertical-align:top;">' . date('m-d-Y', strtotime($comment->getCreatedOn())) . '<br/>' . date('(H:i)', strtotime($comment->getCreatedOn())) . '</td><td valign="top" style="vertical-align:top;"><a href="' . $comment->getViewUrl() . '">' . $parent->getName() . '</a>&nbsp;&nbsp;<span style="cursor:pointer; font-weight:bold" onclick="$(this).text() == \'[+]\' ? $(this).text(\'[-]\') :$(this).text(\'[+]\');$(\'#ticketResp_' . $comment->getId() . '\').toggle()">[+]</span></td><td valign="top" style="vertical-align:top;">' . $array['first_name'] . ' ' . $array['last_name'] . '</td></tr><tr style="display:none;" id="ticketResp_' . $comment->getId() . '"><td colspan="3"><table width="100%" border="0" cellspacing="0" cellpadding="0">';
             //$assigned_user = new User($array['user_id']);
             $assigned_ar_content .= '<tr><td valign="top">Priority:</td><td valign="top">' . $comment->getPriorityName() . '</td></tr>';
             $assigned_ar_content .= '<tr><td valign="top">Status:</td><td valign="top">' . ($array['is_action_request'] != '1' ? 'Complete' : 'Incomplete') . '</td></tr>';
             $assigned_ar_content .= '<tr><td valign="top">Comment:</td><td valign="top">' . $comment->getBody() . '</td></tr></table></td></tr><tr><td><br/></td></tr>';
         }
         //$assigned_ar_content .= '<tr><td colspan="3"><br/><br/></td></tr>';
     }
     mysql_close($link);
     $assigned_ar_content .= '</table>';
     return $assigned_ar_content;
 }
开发者ID:NaszvadiG,项目名称:activecollab_loc,代码行数:44,代码来源:User.class.php

示例7: getHomeTabContent

 function getHomeTabContent($user_id = '', $tickets_due_flag = '')
 {
     require_once SMARTY_PATH . '/plugins/modifier.html_excerpt.php';
     if (empty($user_id)) {
         $user_id = $this->getId();
     }
     $link = mysql_connect(DB_HOST, DB_USER, DB_PASS);
     mysql_select_db(DB_NAME, $link);
     $query = "select setting_value from healingcrystals_user_settings where user_id='" . $user_id . "' and setting_type='HOMETAB_LAYOUT'";
     $result = mysql_query($query);
     if (mysql_num_rows($result)) {
         $info = mysql_fetch_assoc($result);
         $layout_type = $info['setting_value'];
     } else {
         $layout_type = 'summary';
     }
     //possible values for tickets_due_flag: 'due' or 'all'
     if (empty($tickets_due_flag)) {
         $tickets_due_flag = 'due';
     }
     $query = '';
     if ($tickets_due_flag == 'due') {
         $query = "SELECT distinct a.id, a.type, b.user_id, c.reminder_date, IF(c.reminder_date is null, a.due_on, IF(a.due_on<=c.reminder_date, a.due_on, c.reminder_date)) as old_date\n                      FROM healingcrystals_project_objects a\n                      inner join healingcrystals_assignments b on a.id=b.object_id\n                      left outer join healingcrystals_project_object_misc c on (a.id=c.object_id)\n                      where a.state='" . STATE_VISIBLE . "' and b.user_id='" . $user_id . "' and b.is_owner='1' and\n                      (a.type='Task' or a.type='Ticket') and (a.completed_on is null or a.completed_on='') and\n                      ((c.reminder_date is not null and c.reminder_date<>'0000-00-00' and c.reminder_date<=now()) or (a.due_on is not null and a.due_on<=now()) )\n                       order by b.user_id, IFNULL(a.priority, '0') desc, old_date";
     } elseif ($tickets_due_flag == 'all') {
         $query = "SELECT distinct a.id, a.type, b.user_id\n                      FROM healingcrystals_project_objects a\n                      inner join healingcrystals_assignments b on a.id=b.object_id\n                      left outer join healingcrystals_project_object_misc c on (a.id=c.object_id)\n                      where a.state='" . STATE_VISIBLE . "' and b.user_id='" . $user_id . "' and b.is_owner='1' and\n                      (a.type='Task' or a.type='Ticket') and (a.completed_on is null or a.completed_on='') and\n                      a.due_on is not null\n                      order by b.user_id, IFNULL(a.priority, '0') desc";
     }
     if (!empty($query)) {
         $result = mysql_query($query, $link);
         $tickets_due_info = array();
         if (mysql_num_rows($result)) {
             while ($entry = mysql_fetch_assoc($result)) {
                 $tickets_due_info[] = array('type' => $entry['type'], 'id' => $entry['id'], 'reminder' => $entry['reminder_date']);
             }
         }
     }
     //BOF:mod 20111103 #462
     /*
     //EOF:mod 20111103 #462
     	$query = "(select b.id, d.id as parent_ref , a.date_added as date_value, e.priority as prio, c.name as project_name
     		 from healingcrystals_assignments_action_request a
     		 inner join healingcrystals_project_objects b on a.comment_id=b.id
     		 inner join healingcrystals_project_objects d on b.parent_id=d.id
     		 left outer join healingcrystals_project_objects e on d.milestone_id=e.id
     		 inner join healingcrystals_projects c on b.project_id=c.id
     		 where b.state='" . STATE_VISIBLE . "' and a.user_id='" . $user_id . "' and a.is_action_request='1'
              and d.state='" . STATE_VISIBLE . "' and (d.completed_on is null or d.completed_on='') )
              union
              (select '' as id, a.object_id as parent_ref, b.created_on as date_value, e.priority as prio, c.name as project_name
              from healingcrystals_assignments_flag_fyi_actionrequest a
              inner join healingcrystals_project_objects b on a.object_id=b.id
              left outer join healingcrystals_project_objects e on b.milestone_id=e.id
              inner join healingcrystals_projects c on b.project_id=c.id
              where a.user_id='" . $user_id . "' and flag_actionrequest='1' and b.state='" . STATE_VISIBLE . "'
              and (b.completed_on is null or b.completed_on=''))
     		 order by prio desc, project_name, date_value desc";
     //BOF:mod 20111103 #462
     */
     $query = "(select b.id, d.id as parent_ref , a.date_added as date_value, e.priority as prio, c.name as project_name\n\t\t from healingcrystals_assignments_action_request a\n\t\t inner join healingcrystals_project_objects b on a.comment_id=b.id\n\t\t inner join healingcrystals_project_objects d on b.parent_id=d.id\n\t\t left outer join healingcrystals_project_objects e on d.milestone_id=e.id\n\t\t inner join healingcrystals_projects c on b.project_id=c.id\n\t\t where b.state='" . STATE_VISIBLE . "' and a.user_id='" . $user_id . "' and a.is_action_request='1'\n                 and d.state='" . STATE_VISIBLE . "'  )\n                 union\n                 (select '' as id, a.object_id as parent_ref, b.created_on as date_value, e.priority as prio, c.name as project_name\n                 from healingcrystals_assignments_flag_fyi_actionrequest a\n                 inner join healingcrystals_project_objects b on a.object_id=b.id\n                 left outer join healingcrystals_project_objects e on b.milestone_id=e.id\n                 inner join healingcrystals_projects c on b.project_id=c.id\n                 where a.user_id='" . $user_id . "' and flag_actionrequest='1' and b.state='" . STATE_VISIBLE . "'\n                  )\n\t\t order by prio desc, project_name, date_value desc";
     //EOF:mod 20111103 #462
     $result = mysql_query($query, $link);
     $action_request_info = array();
     if (mysql_num_rows($result)) {
         while ($entry = mysql_fetch_assoc($result)) {
             if ($layout_type == 'summary') {
                 if (!array_key_exists((string) $entry['parent_ref'], $action_request_info)) {
                     $action_request_info[(string) $entry['parent_ref']] = array();
                 }
                 $action_request_info[(string) $entry['parent_ref']][] = $entry['id'];
             } else {
                 //BOF:mod 20111019 #448
                 if (empty($entry['id'])) {
                     $action_request_info[] = $entry['parent_ref'];
                 } else {
                     //EOF:mod 20111019 #448
                     $action_request_info[] = $entry['id'];
                     //BOF:mod 20111019
                 }
                 //EOF:Mod 20111019
             }
         }
     }
     //BOF:mod 20111103 #462
     /*
     //EOF:mod 20111103 #462
     	$query = "(select b.id, d.id as parent_ref , a.date_added as date_value, e.priority as prio, c.name as project_name
     		 from healingcrystals_assignments_action_request a
     		 inner join healingcrystals_project_objects b on a.comment_id=b.id
     		 inner join healingcrystals_project_objects d on b.parent_id=d.id
     		 left outer join healingcrystals_project_objects e on d.milestone_id=e.id
     		 inner join healingcrystals_projects c on b.project_id=c.id
     		 where b.state='" . STATE_VISIBLE . "' and a.user_id='" . $user_id . "' and a.is_fyi='1'
              and d.state='" . STATE_VISIBLE . "' and (d.completed_on is null or d.completed_on='') )
              union
              (select '' as id, a.object_id as parent_ref, b.created_on as date_value, e.priority as prio, c.name as project_name
              from healingcrystals_assignments_flag_fyi_actionrequest a
              inner join healingcrystals_project_objects b on a.object_id=b.id
              left outer join healingcrystals_project_objects e on b.milestone_id=e.id
              inner join healingcrystals_projects c on b.project_id=c.id
              where a.user_id='" . $user_id . "' and flag_fyi='1' and b.state='" . STATE_VISIBLE . "'
              and (b.completed_on is null or b.completed_on=''))
//.........这里部分代码省略.........
开发者ID:NaszvadiG,项目名称:activecollab_loc,代码行数:101,代码来源:User16April2012.class.php

示例8: executeCommentCreate

 /**
  * Executes commentCreate action
  *
  * @param sfRequest $request A request object
  */
 public function executeCommentCreate(sfWebRequest $request)
 {
     $this->forward404Unless($request->isXmlHttpRequest());
     $paragraphId = $this->getRoute()->getObject()->getId();
     $comment = new Comment();
     $comment->setIdParagraph($paragraphId);
     $comment->save();
     if (!$comment->getId()) {
         // action on error
         exit;
     }
     $this->form = new ArticleCommentForm($comment);
     $this->setTemplate('comment');
 }
开发者ID:rollmax,项目名称:read2read,代码行数:19,代码来源:actions.class.php

示例9: getCommentNum

 /**
  * Return # of specific object
  *
  * @param Comment $comment
  * @return integer
  */
 function getCommentNum(Comment $comment)
 {
     $comments = $this->getComments();
     if (is_array($comments)) {
         $counter = 0;
         foreach ($comments as $object_comment) {
             $counter++;
             if ($comment->getId() == $object_comment->getId()) {
                 return $counter;
             }
             // if
         }
         // foreach
     }
     // if
     return 0;
 }
开发者ID:469306621,项目名称:Languages,代码行数:23,代码来源:ProjectDataObject.class.php

示例10: commentEdited

 /**
  * Summary of commentEdited
  * @param Comment $comment
  */
 public static function commentEdited(Comment $comment)
 {
     self::send("Comment {$comment->getId()} on request {$comment->getRequest()} ({$comment->getRequestObject()->getName()}) edited by " . User::getCurrent()->getUsername());
 }
开发者ID:Austin503,项目名称:waca,代码行数:8,代码来源:Notification.php

示例11: onDeleteComment

 /**
  * This event is triggered when comment that belongs to this object is deleted
  *
  * @param Comment $comment
  * @return boolean
  */
 function onDeleteComment(Comment $comment)
 {
     if ($this->isSearchable()) {
         SearchableObjects::dropContentByObjectColumn($this, 'comment' . $comment->getId());
     }
 }
开发者ID:rorteg,项目名称:fengoffice,代码行数:12,代码来源:ContentDataObject.class.php

示例12: ProjectObject

 function render_comments()
 {
     $response = '<table width="100%" style="border:5px solid #dddddd;">';
     $user_id = $this->request->get('user_id');
     if (empty($user_id)) {
         $user_id = $this->request->post('user_id');
         if (empty($user_id)) {
             $user_id = $this->logged_user->getId();
         }
     }
     $action_type = $_GET['action_type'];
     $parent_id = $_GET['parent_id'];
     $temp_obj = new ProjectObject($parent_id);
     $parenttype = $temp_obj->getType();
     $parentobj = new $parenttype($parent_id);
     $projectobj = new Project($parentobj->getProjectId());
     $milestone_id = $parentobj->getMilestoneId();
     if (!empty($milestone_id)) {
         $milestoneobj = new Milestone($milestone_id);
     }
     $assigneesstring = '';
     list($assignees, $owner_id) = $parentobj->getAssignmentData();
     foreach ($assignees as $assignee) {
         $assigneeobj = new User($assignee);
         $assigneesstring .= '<a target="_blank" href="' . $assigneeobj->getViewUrl() . '">' . $assigneeobj->getName() . '</a>, ';
         unset($assigneeobj);
     }
     if (!empty($assigneesstring)) {
         $assigneesstring = substr($assigneesstring, 0, -2);
     }
     $dueon = date('F d, Y', strtotime($parentobj->getDueOn()));
     if ($dueon == 'January 01, 1970') {
         $dueon = '--';
     }
     if ($milestoneobj) {
         $priority = $milestoneobj->getPriority();
         if (!empty($priority) || $priority == '0') {
             $priority = $milestoneobj->getFormattedPriority();
         } else {
             $priority = '--';
         }
     } else {
         $priority = '--';
     }
     $response .= '
             <tr><td colspan="2" style="height:20px;">&nbsp;</td></tr>
                 <tr>
                     <td style="width:25%;" valign="top">' . $parenttype . '</td>
                     <td valign="top">
                         <a target="_blank" href="' . $parentobj->getViewUrl() . '"><span class="homepageobject">' . $parentobj->getName() . '</span></a>
                     </td>
                 </tr>
                 <tr>
                     <td valign="top">Team &raquo; Project</td>
                     <td valign="top">
                         <a target="_blank" href="' . $projectobj->getOverviewUrl() . '"><span class="homepageobject">' . $projectobj->getName() . '</span></a> &raquo; ' . ($milestoneobj ? '<a target="_blank" href="' . $milestoneobj->getViewUrl() . '"><span class="homepageobject">' . $milestoneobj->getName() . '</a></span>' : '--') . '</td>
                 </tr>
                 <tr>
                     <td vlaign="top">Project Priority</td>
                     <td valign="top">' . $priority . '</td>
                 </tr>
                 <tr>
                     <td valign="top">Due on</td>
                     <td valign="top">' . $dueon . '</td>
                 </tr>
                 <tr>
                     <td valign="top">Assignees</td>
                     <td valign="top">' . $assigneesstring . '</td>
                 </tr>
                 <tr><td colspan="2" style="height:20px;">&nbsp;</td></tr>';
     $link = mysql_connect(DB_HOST, DB_USER, DB_PASS);
     mysql_select_db(DB_NAME, $link);
     if ($action_type == 'actionrequest') {
         $query = "(select b.id, d.id as parent_ref , a.date_added as date_value, e.priority as prio, c.name as project_name\n                     from healingcrystals_assignments_action_request a\n                     inner join healingcrystals_project_objects b on a.comment_id=b.id\n                     inner join healingcrystals_project_objects d on b.parent_id=d.id\n                     left outer join healingcrystals_project_objects e on d.milestone_id=e.id\n                     inner join healingcrystals_projects c on b.project_id=c.id\n                     where d.id='" . $parent_id . "' and b.state='" . STATE_VISIBLE . "' and a.user_id='" . $user_id . "' and a.is_action_request='1'\n                     and d.state='" . STATE_VISIBLE . "'  )\n                     union\n                     (select '' as id, a.object_id as parent_ref, b.created_on as date_value, e.priority as prio, c.name as project_name\n                     from healingcrystals_assignments_flag_fyi_actionrequest a\n                     inner join healingcrystals_project_objects b on a.object_id=b.id\n                     left outer join healingcrystals_project_objects e on b.milestone_id=e.id\n                     inner join healingcrystals_projects c on b.project_id=c.id\n                     where a.user_id='" . $user_id . "' and a.object_id='" . $parent_id . "' and flag_actionrequest='1' and b.state='" . STATE_VISIBLE . "'\n                      )\n                     order by prio desc, project_name, date_value desc";
     } elseif ($action_type == 'fyi') {
         $query = "(select b.id, d.id as parent_ref , a.date_added as date_value, e.priority as prio, c.name as project_name\n                     from healingcrystals_assignments_action_request a\n                     inner join healingcrystals_project_objects b on a.comment_id=b.id\n                     inner join healingcrystals_project_objects d on b.parent_id=d.id\n                     left outer join healingcrystals_project_objects e on d.milestone_id=e.id\n                     inner join healingcrystals_projects c on b.project_id=c.id\n                     where d.id='" . $parent_id . "' and b.state='" . STATE_VISIBLE . "' and a.user_id='" . $user_id . "' and a.is_fyi='1'\n                     and d.state='" . STATE_VISIBLE . "' )\n                     union\n                     (select '' as id, a.object_id as parent_ref, b.created_on as date_value, e.priority as prio, c.name as project_name\n                     from healingcrystals_assignments_flag_fyi_actionrequest a\n                     inner join healingcrystals_project_objects b on a.object_id=b.id\n                     left outer join healingcrystals_project_objects e on b.milestone_id=e.id\n                     inner join healingcrystals_projects c on b.project_id=c.id\n                     where a.user_id='" . $user_id . "' and a.object_id='" . $parent_id . "' and flag_fyi='1' and b.state='" . STATE_VISIBLE . "'\n                      )\n                     order by prio desc, project_name, date_value desc";
     }
     $result = mysql_query($query);
     $count = 0;
     while ($entry = mysql_fetch_assoc($result)) {
         $count++;
         if (!empty($entry['id'])) {
             $temp_obj = new Comment($entry['id']);
             $created_by_id = $temp_obj->getCreatedById();
             $created_by_user = new User($created_by_id);
             $created_on = strtotime($temp_obj->getCreatedOn());
             $created_on = date('m-d-y', $created_on);
             $temp = $temp_obj->getFormattedBody(true, true);
             $comment_body = $temp;
             $response .= '
                     <tr>
                         <td valign="top" style="vertical-align:top;">
                             Comment by<br/>' . (!empty($created_by_id) ? '<a target="_blank" href="' . $created_by_user->getViewUrl() . '">' . $created_by_user->getName() . '</a>' : $temp_obj->getCreatedByName()) . '<br/><br/><br/>
                             <a target="_blank" href="' . $temp_obj->getViewUrl() . '">[view comment]</a><br/>&nbsp;&nbsp;&nbsp;' . $created_on . '<br/><br/><br/>' . ($action_type == 'actionrequest' ? '<a class="mark_as_complete" count="' . $count . '" href="' . assemble_url('project_comment_action_request_completed', array('project_id' => $temp_obj->getProjectId(), 'comment_id' => $temp_obj->getId())) . '">Mark Action Request Complete</a>' : '') . ($action_type == 'fyi' ? '<a class="mark_as_read" count="' . $count . '" href="' . assemble_url('project_comment_fyi_read', array('project_id' => $temp_obj->getProjectId(), 'comment_id' => $temp_obj->getId())) . '">Mark this Notification<br/>as Read</a>' : '') . '</td>
                         <td valign="top" style="vertical-align:top;">
                             <div style="width:600px;overflow:auto;">' . $comment_body . '</div>' . ($show_read_link ? '<a target="_blank" href="' . $temp_obj->getViewUrl() . '">Click here to read the rest of this Comment</a>' : '') . '</td>
                     </tr>
                     <tr><td colspan="2" style="height:20px;">&nbsp;</td></tr>';
         } else {
             $response .= '
//.........这里部分代码省略.........
开发者ID:NaszvadiG,项目名称:activecollab_loc,代码行数:101,代码来源:DashboardController.class.php

示例13: commentEdited

 /**
  * Summary of commentEdited
  * @param Comment $comment
  */
 public static function commentEdited(Comment $comment)
 {
     $req = $comment->getRequestObject();
     $username = User::getCurrent()->getUsername();
     self::send("Comment {$comment->getId()} on request {$req->getId()} ({$req->getName()}) edited by {$username}");
 }
开发者ID:FastLizard4,项目名称:waca,代码行数:10,代码来源:Notification.php


注:本文中的Comment::getId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。