Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

6.x 3.x #10

Open
wants to merge 2 commits into
base: 6.x-3.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions resources/node_resource.inc
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ function _node_resource_definition() {
* Returns the results of a node_load() for the specified node.
*
* This returned node may optionally take content_permissions settings into
* account, based on a configuration setting.
* account, based on a configuration setting.
*
* @param $nid
* NID of the node we want to return.
Expand Down Expand Up @@ -262,14 +262,14 @@ function _node_resource_delete($nid) {
* @param $page
* Page number of results to return (in pages of 20).
* @param $fields
* The fields you want returned.
* The fields you want returned.
* @param $parameters
* An array of fields and values used to build a sql WHERE clause indicating
* what items should be deleted.
* @return
* An array of node objects.
*
* @todo
* @todo
* Evaluate the functionality here in general. Particularly around
* - Do we need fields at all? Should this just return full nodes?
* - Is there an easier syntax we can define which can make the urls
Expand All @@ -284,10 +284,10 @@ function _node_resource_index($page = 0, $fields = '*', $parameters = array()) {

// Limit to published nodes if user doesn't have 'administer nodes'
// permissions.
if (!user_access('administer nodes')) {
if (!user_access('administer nodes')) {
$parameters['status'] = 1;
}

// Build an array of fields with the appropriate placeholders for use in
// db_query().
foreach ($parameters as $field => $value) {
Expand Down
16 changes: 8 additions & 8 deletions services.module
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function services_perm() {
'save file information',
// System resource permissions
'get a system variable',
'set a system varaible',
'set a system variable',
);
}

Expand Down Expand Up @@ -148,10 +148,10 @@ function services_menu() {
}

/**
* Access callback that always returns TRUE.
* Access callback that always returns TRUE.
*
* This callback is necessary for services like login and logout that should
* always be wide open and accessible.
* This callback is necessary for services like login and logout that should
* always be wide open and accessible.
*
* *** USE THIS WITH GREAT CAUTION ***
*
Expand Down Expand Up @@ -422,8 +422,8 @@ function services_controllers_list($endpoint) {
$controllers[] = $resource_name . '.' . $op;
}
}
// Handle extended operatios

// Handle extended operations
foreach ($ops as $op) {
if (isset($res[$op])) {
foreach ($res[$op] as $name => $def) {
Expand Down Expand Up @@ -452,10 +452,10 @@ function services_controller_get($name, $endpoint) {

if (isset($resources[$resource_name])) {
$res = $resources[$resource_name];

if (isset($res[$method])) {
return $res[$method];
}
}
else {
// Handle extended operatios
foreach ($ops as $op) {
Expand Down
15 changes: 8 additions & 7 deletions services.services.api.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* ways Services can be seen as an abstraction layer on top of hook_menu().
*
* @return
* An associative array which defines available resources.
* An associative array which defines available resources.
*
* The associative array which defines services has six possible top
* level keys:
Expand All @@ -30,14 +30,14 @@
*
* The first four (the CRUD functions) define the indvidual service
* callbacks for each function. However 'actions' and 'targeted actions'
* can contain multiple callbacks.
* can contain multiple callbacks.
*
* For those familiar with Services 2.x, these callbacks are created
* For those familiar with Services 2.x, these callbacks are created
* similarly, but the keys have changed around a bit. The following keys
* are used to describe a callback.
*
* - help: Text describing what this callback does.
* - callback: The name of a function to call when this resource is
* - callback: The name of a function to call when this resource is
* requested.
* - access callback: The name of a function to call to check whether
* the requesting user has permission to access this resource. If not
Expand All @@ -56,8 +56,8 @@
* - description: Text describing this argument's usage.
* - optional: A boolean indicating whether or not this argument is optional.
* - source: Where this argument should be retrieved from. This can be
* 'data' (indicating the POST data), 'params' (indicating the query
* string) or 'path' (indicating the url path). In the case of path,
* 'data' (indicating the POST data), 'params' (indicating the query
* string) or 'path' (indicating the url path). In the case of path,
* an additional parameter must be passed indicating the index to be used.
*/
function hook_services_resources() {
Expand Down Expand Up @@ -111,5 +111,6 @@ function hook_services_resources() {
),
),
),
);
),
);
}