diff --git a/app/controllers/DmailController.php b/app/controllers/DmailController.php index 441788f..0d4b59a 100755 --- a/app/controllers/DmailController.php +++ b/app/controllers/DmailController.php @@ -73,7 +73,6 @@ class DmailController extends ApplicationController public function markAllRead() { - vpe('a'); if ($this->params()->commit == "Yes") { foreach (Dmail::where("to_id = ? and has_seen = false", $this->current_user->id)->take() as $dmail) $dmail->updateAttribute('has_seen', true); diff --git a/app/models/Dmail.php b/app/models/Dmail.php index 1e378e6..a10d2e9 100755 --- a/app/models/Dmail.php +++ b/app/models/Dmail.php @@ -71,17 +71,17 @@ class Dmail extends Rails\ActiveRecord\Base } } - protected function setToName($name) + public function setToName($name) { if (!$user = User::where(['name' => $name])->first()) return; $this->to_id = $user->id; } - protected function setFromName($name) + public function setFromName($name) { if (!$user = User::where(['name' => $name])->first()) return; $this->from_id = $user->id; } -} \ No newline at end of file +}