Changeset 634 for trunk/app/controllers/users_controller.php
- Timestamp:
- 07/09/08 13:23:48 (5 months ago)
- Files:
-
- 1 modified
-
trunk/app/controllers/users_controller.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/app/controllers/users_controller.php
r633 r634 66 66 public function entry($username, $entry_id) 67 67 { 68 if ($entry_id == null) 69 { 68 if ($entry_id == null): 70 69 $this->redirect('/blog/'.$username); 71 exit;72 }70 return false; 71 endif; 73 72 74 73 $this->pageTitle = $username . '\'s Blog'; … … 76 75 $user_id = $this->User->field("id", array("username"=>$username)); 77 76 78 if ($username == null || $user_id == null) 79 { 77 if ($username == null || $user_id == null): 80 78 $this->redirect("/"); 81 }79 endif; 82 80 83 81 $this->Entry = new Entry; … … 87 85 $fields = array("Entry.title", "Entry.body", "Entry.created", "Entry.user_id", "Entry.discution", "Entry.subject_id", "Entry.id", "User.username", "Subject.title", "Subject.id"); 88 86 89 if ( $entry_id != null && is_numeric( $entry_id ) ): // show only one new87 if ( $entry_id != null && is_numeric( $entry_id ) ): // show only one new 90 88 $conditions = array("Entry.user_id"=>$user_id, "Entry.id"=>$entry_id); 91 89 endif;
