AtomPub-related actions are only read-only on GET

This commit is contained in:
Evan Prodromou 2010-11-15 14:14:09 -05:00
parent 8a21b13ee9
commit d038d0fa46
2 changed files with 12 additions and 2 deletions

View File

@ -171,9 +171,14 @@ class ApiStatusesShowAction extends ApiPrivateAuthAction
* *
* @return boolean true * @return boolean true
*/ */
function isReadOnly($args) function isReadOnly($args)
{ {
if ($_SERVER['REQUEST_METHOD'] == 'GET') {
return true; return true;
} else {
return false;
}
} }
/** /**

View File

@ -241,9 +241,14 @@ class ApiTimelineUserAction extends ApiBareAuthAction
* *
* @return boolean true * @return boolean true
*/ */
function isReadOnly($args) function isReadOnly($args)
{ {
if ($_SERVER['REQUEST_METHOD'] == 'GET') {
return true; return true;
} else {
return false;
}
} }
/** /**