Hallo , filedepot remains at the "Please wait..." screen when trying to open a folder. JSON is enabled and the scripts mentioned in the readme are loaded. I think there is a code-related error. The attached screenshot shows that somehow mysql queries are used instead of postgresql specific ones. Can someone give a hint where I can change the query? Thx in advance

Comments

de_chris’s picture

Priority: Major » Critical

Hello I'm afraid filedepot is NOT supposed to deal with Postgresql, right?
I found the usage of the mysql specific "LIMIT" clause in several php-files, e.g. lib-theme.php, lib-ajaxserver.php, ajaxserver.php. Can anyone give a statement if postgresql was considered in filedepot? Since Drupal is also desinged for Postgresql I think this should be stated somewhere.

jaypark’s picture

Thought POSTGRESQL supported LIMIT clause... anyway, just ran into the LIMIT clause issue when installing filedepot on drupal site running with sql server, which definitely doesn't support LIMIT (uses TOP instead). This was surprising as I'd seen several articles at nextide about drupal on WISP.

LIMIT statements should be abstracted to db_query_range()

http://api.drupal.org/api/drupal/includes%21database%21database.inc/func...

_timpatrick’s picture

Assigned: Unassigned » _timpatrick
rocketeerbkw’s picture

Status: Active » Needs review
StatusFileSize
new1.79 KB

It looks like filedepot was in fact developed with postgresql in mind but the API changed in Drupal 7 that determines which database is being used.

Instead of $GLOBALS['db_type'] there is a db_driver() function.

Here is a patch that fixes this in lib-ajaxserver.php. This was the only file that came up in a "find all" search.

_timpatrick’s picture

Status: Needs review » Fixed

Thanks :) Tested and committed to dev

Status: Fixed » Closed (fixed)

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