private function update_thread($data) { if ($this->user['SiteRank'] >= 4) { if (isset($data['cat']) && isset($data['thread'])) { $thread = thread::get($data['thread']); if ($thread != null && $data['title'] != '' && $data['title'] != ' ' && $this->user['SiteRank'] >= 4) { $result = thread::update($data); //Build event details to log // $logEventID = '132'; // $logDetails = 'Forum post id:'.$post_id.' in thread id:'.$thread.' for category id:'.$category.' deleted!'; // $logEventAuthor = $this->user['Username']; //Write to admin log. // $this->eventLog($logEventID, $logDetails, $logEventAuthor); json::resp(array('success' => true)); } else { self::errorJSON('Error updating thread!'); } } } }