Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Q
question2answer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
outils
question2answer
Commits
3f1a0af4
Commit
3f1a0af4
authored
Feb 09, 2016
by
Scott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add qa_is_http_get
parent
cb812352
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
4 deletions
+15
-4
qa-base.php
qa-include/qa-base.php
+15
-4
No files found.
qa-include/qa-base.php
View file @
3f1a0af4
...
...
@@ -1112,14 +1112,25 @@
}
/**
* Whether we are responding to an HTTP GET request
* @return bool True if the request is GET
*/
function
qa_is_http_get
()
{
if
(
qa_to_override
(
__FUNCTION__
))
{
$args
=
func_get_args
();
return
qa_call_override
(
__FUNCTION__
,
$args
);
}
return
$_SERVER
[
'REQUEST_METHOD'
]
===
'GET'
;
}
/**
* Return true if we are responding to an HTTP POST request
*/
function
qa_is_http_post
()
/*
Return true if we are responding to an HTTP POST request
*/
{
if
(
qa_to_override
(
__FUNCTION__
))
{
$args
=
func_get_args
();
return
qa_call_override
(
__FUNCTION__
,
$args
);
}
return
(
$_SERVER
[
'REQUEST_METHOD'
]
==
'POST'
)
||
!
empty
(
$_POST
);
return
$_SERVER
[
'REQUEST_METHOD'
]
===
'POST'
||
!
empty
(
$_POST
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment