Installed the module on fairly stock drupal 6 rc3 on Postgres. The following errors are what I get when I enable the module.

* warning: pg_query() [function.pg-query]: Query failed: ERROR: argument of WHERE must be type boolean, not type integer in C:\wamp\www\WxPortal\includes\database.pgsql.inc on line 138.
* user warning: query: SELECT path, location FROM filebrowser WHERE 1 in C:\wamp\www\WxPortal\modules\filebrowser\filebrowser.module on line 8.

I have seen other modules have issues because of postgres SQL being different from expected.

Comments

Susurrus’s picture

Have you tried changing the query in line 8 to read "SELECT path, location FROM filebrowser WHERE true"?

Also, to improve readability throw code and error message into <code> tags.

spydmobile’s picture

No I didnt. I was just providing feedback. - I will use code tags henceforth :)

Susurrus’s picture

Status: Active » Needs review

Could you try changing that line I specified? I don't have PgSQL and don't have the resources or skills to thoroughly test this on that DB.

spydmobile’s picture

changed existing code from:
$qry = db_query('SELECT path, location FROM {filebrowser} WHERE 1');
to:
$qry = db_query('SELECT path, location FROM filebrowser WHERE true');
then enabled the module in D6.1 and got the no errors, but when I copnfigured the module at:
admin/settings/filebrowser
I got:

* warning: pg_query() [function.pg-query]: Query failed: ERROR: argument of WHERE must be type boolean, not type integer in C:\ms4w\Apache\htdocs\itportal\includes\database.pgsql.inc on line 138.
    * user warning: query: SELECT path, location, can_explore FROM filebrowser WHERE 1 in C:\ms4w\Apache\htdocs\itportal\modules\filebrowser\filebrowser.module on line 113.

Changed the 1 to a true on line 113 (112 in original file) and error was gone.
Tried to configure with my directories and got:

    * warning: pg_query() [function.pg-query]: Query failed: ERROR: column "c:\\ms4w\\Apache\\htdocs\\itportal" does not exist at character 68 in C:\ms4w\Apache\htdocs\itportal\includes\database.pgsql.inc on line 138.
    * user warning: query: SELECT COUNT(1) FROM menu_router mr, menu_links ml WHERE mr.path = "c:\\ms4w\\Apache\\htdocs\\itportal" OR ml.link_path = "c:\\ms4w\\Apache\\htdocs\\itportal" in C:\ms4w\Apache\htdocs\itportal\modules\filebrowser\filebrowser.module on line 193.
    * You must specify a valid directory.

The directories are valid windows directories.

Susurrus’s picture

The last set of errors looks like the insert SQL statement failed, not that the directory was invalid. I'll see if I can look into that statement later.

spydmobile’s picture

ok cool, FYI the line numbers in the error are one line higher than in your file because I put a comment in the file to note my changes.

spydmobile’s picture

bump?

Susurrus’s picture

Status: Needs review » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

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