Closed (fixed)
Project:
Services
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
11 Aug 2011 at 08:16 UTC
Updated:
9 Nov 2011 at 02:00 UTC
Jump to comment: Most recent file
There is code is services.runtime.inc that changes current directory:
$server_root = getcwd();
$drupal_path = services_get_server_info('drupal_path');
if (isset($drupal_path) && $drupal_path) {
chdir($drupal_path);
}
But we set 'drupal_path' as current earlier in services.module:
services_set_server_info_from_array(array(
'module' => $server,
'endpoint' => $endpoint_name,
'endpoint_path' => $endpoint->path,
'debug' => $endpoint->debug,
'drupal_path' => getcwd(),
));
So we actually don't change anything here.
Also minor remove global $user as it has been declared earlier in the same function.
I propose to remove this code completely.
Comments
Comment #1
marcingy commentedComment #2
ygerasimov commentedRerolled patch attached
Comment #3
ygerasimov commentedOh, #2 is wrong patch.
Here is proper one.
Comment #4
marcingy commentedRan some tests locally and tests still work that I tried (nodes).