Browse files

Merge pull request #5 from mehlah/refactoring

cleanup
  • Loading branch information...
2 parents 7062bfb + fc21f31 commit da8d41cfb9dc56af9b7c2bff09da8faa878271f2 @pointlessjon committed Dec 21, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 models/Post.php
View
4 models/Post.php
@@ -100,7 +100,6 @@ public static function __init(array $options = array()) {
&& $user = $classes['session']::read('user', array('name' => 'li3_user'))
) {
$params['entity']->user_id = $user['_id'];
- $params['entity']->user_id = $user['_id'];
}
}
@@ -142,8 +141,9 @@ public function comment($record, $params = array()) {
$comment = $comment::create($data);
if (empty($record->_id) || !$comment->save()) {
- return null;
+ return false;
}
+
$data = $comment->data();
$comments = !empty($record->comments) ? $record->comments->data() : array();

0 comments on commit da8d41c

Please sign in to comment.