fixing deletion issue in request refactoring, starting work on API read

refactoring
This commit is contained in:
El RIDO
2015-10-15 22:04:57 +02:00
parent 5d61b90d6b
commit 2e3bacb699
3 changed files with 40 additions and 3 deletions

View File

@@ -89,7 +89,11 @@ class request
default:
$this->_params = $_GET;
}
if (array_key_exists('QUERY_STRING', $_SERVER) && !empty($_SERVER['QUERY_STRING']))
if (
!array_key_exists('pasteid', $this->_params) &&
array_key_exists('QUERY_STRING', $_SERVER) &&
!empty($_SERVER['QUERY_STRING'])
)
{
$this->_params['pasteid'] = $_SERVER['QUERY_STRING'];
}
@@ -112,7 +116,6 @@ class request
{
$this->_operation = 'read';
}
}
}