Every time I update Salesforce via drush it moves the old module directory to a backup area and deploys a fresh new version. The side effect of this is that the PHP Toolkit 'soapclient' library goes missing.

A number of others modules are now favouring installing 3rd party libraries under /sites/all/libraries/ to keep it out of the module directory all together.

Whats the chances of moving to this style of file organisation?

CommentFileSizeAuthor
#3 salesforce-libraries.patch1.01 KBaaronbauman

Comments

13rac1’s picture

kmonty’s picture

+1

aaronbauman’s picture

Title: Move installation location of soapclient » Move installation location of soapclient and WSDL
StatusFileSize
new1.01 KB

The WSDL should probably be moved out of the distributed code too.

I think this should be as simple as

--- salesforce_api.module	14 Jul 2010 14:52:13 -0000	1.2.2.50
+++ salesforce_api.module	27 Sep 2010 14:23:01 -0000
@@ -9,9 +9,9 @@
 
 // Define default directory paths for the Toolkit and WSDL files.
 define('SALESFORCE_DIR', drupal_get_path('module', 'salesforce_api'));
-define('SALESFORCE_DIR_TOOLKIT', SALESFORCE_DIR .'/toolkit');
+define('SALESFORCE_DIR_TOOLKIT', function_exists('libraries_get_path') ? libraries_get_path('salesforce') : SALESFORCE_DIR .'/toolkit');
 define('SALESFORCE_DIR_SOAPCLIENT', SALESFORCE_DIR_TOOLKIT .'/soapclient');
-define('SALESFORCE_DIR_WSDL', SALESFORCE_DIR .'/wsdl');
+define('SALESFORCE_DIR_WSDL', SALESFORCE_DIR_TOOLKIT .'/wsdl');
 
 
 // Define Drupal paths for various parts of the Salesforce UI.

Does that look right?
Swapping in a conditionally defined constant will eliminate the need for a hard dependency on Libraries API

aaronbauman’s picture

Status: Active » Needs review
EvanDonovan’s picture

Isn't the WSDL already supposed to be outside of the website's DocumentRoot, though? (i.e., not in sites/all/libraries)

EvanDonovan’s picture

I think this is "needs work", since the WSDL is already outside the DocumentRoot, but Libraries API would be good for the soapclient.

aaronbauman’s picture

Status: Needs review » Fixed

This is in latest 2.x-dev

Evan, you're right - only the soap client location needed to change.

Also updated README instructions

EvanDonovan’s picture

Just tested this. Great!

Status: Fixed » Closed (fixed)
Issue tags: -Libraries

Automatically closed -- issue fixed for 2 weeks with no activity.