Changeset 20336 for events/phpframework/plain_php/trunk/core/Action.php
- Timestamp:
- 10/01/08 07:39:26 (3 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
events/phpframework/plain_php/trunk/core/Action.php
r20040 r20336 13 13 $this->context = $c; 14 14 $this->baseUrl = $c->baseUrl; 15 if (in_array($req->REQUEST_METHOD, array('POST', 'GET'))) 16 return $this->{$req->REQUEST_METHOD}(); 15 if (in_array($req->REQUEST_METHOD, array('POST', 'GET'))) { 16 $_ = $this->{'before' . $req->REQUEST_METHOD}() 17 or $_ = $this->{$req->REQUEST_METHOD}(); 18 $this->{'after' . $req->REQUEST_METHOD}(); 19 return $_; 20 } 17 21 throw new Exception; 18 22 } 23 function beforePOST() { } 24 function beforeGET() { } 25 26 function afterGET() { } 27 function afterPOST() { } 28 19 29 function POST() 20 30 { … … 45 55 protected function hasExternalReferer() 46 56 { 47 return 48 strpos($this->req->HTTP_REFERER, $this->baseUrl . '/') !== 0 || 49 $this->req->HTTP_REFERER === $this->baseUrl; 57 if ($this->req->HTTP_REFERER === $this->baseUrl) return false; 58 return strpos($this->req->HTTP_REFERER, $this->baseUrl . '/') !== 0; 50 59 } 51 60
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)