Пример #1
0
 public function canEdit($userId = null)
 {
     if (empty($userId)) {
         $userId = CMA::getPostingUserId();
     }
     if ($this->getAuthorId() == $userId) {
         $thread = CMA_Thread::getInstance($this->getThreadId());
         if (!$thread->isResolved() or CMA_Thread::canEditResolved()) {
             return CMA_Thread::checkEditMode(strtotime($this->getDate()));
         }
     }
     return false;
 }