format
This commit is contained in:
		
							parent
							
								
									e88ca1fb05
								
							
						
					
					
						commit
						253d75ae82
					
				| @ -14,22 +14,21 @@ class Biography extends Extension | |||||||
| 
 | 
 | ||||||
|         if ($user->id == $duser->id) { |         if ($user->id == $duser->id) { | ||||||
|             $this->theme->display_composer($page, $bio); |             $this->theme->display_composer($page, $bio); | ||||||
| 		} |         } else { | ||||||
| 		else { |  | ||||||
|             $this->theme->display_biography($page, $bio); |             $this->theme->display_biography($page, $bio); | ||||||
| 		} |         } | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     public function onPageRequest(PageRequestEvent $event) |     public function onPageRequest(PageRequestEvent $event) | ||||||
|     { |     { | ||||||
|         global $cache, $database, $page, $user, $user_config; |         global $cache, $database, $page, $user, $user_config; | ||||||
|         if ($event->page_matches("biography")) { |         if ($event->page_matches("biography")) { | ||||||
| 			if ($user->check_auth_token()) { |             if ($user->check_auth_token()) { | ||||||
|                 $user_config->set_string("biography", $_POST['biography']); |                 $user_config->set_string("biography", $_POST['biography']); | ||||||
| 				$page->flash("Bio Updated"); |                 $page->flash("Bio Updated"); | ||||||
| 				$page->set_mode(PageMode::REDIRECT); |                 $page->set_mode(PageMode::REDIRECT); | ||||||
| 				$page->set_redirect(referer_or(make_link())); |                 $page->set_redirect(referer_or(make_link())); | ||||||
| 			} |             } | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  | |||||||
| @ -3,7 +3,7 @@ class BiographyTest extends ShimmiePHPUnitTestCase | |||||||
| { | { | ||||||
|     public function testBio() |     public function testBio() | ||||||
|     { |     { | ||||||
| 		global $database; |         global $database; | ||||||
|         $this->log_in_as_user(); |         $this->log_in_as_user(); | ||||||
|         $this->post_page("biography", ["biography"=>"My bio goes here"]); |         $this->post_page("biography", ["biography"=>"My bio goes here"]); | ||||||
|         $this->get_page("user/" . self::$user_name); |         $this->get_page("user/" . self::$user_name); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user