Hi everybody.
I have almost resolved all dashboard-related warnings for the current svn
version on postgresql.
In my local copy, I have commented out the following line in
system/schema/pgsql.php
# $this->pdo->setAttribute( PDO::ATTR_EMULATE_PREPARES, true );
introduced a few days ago by Chris, as as the pgsql driver does not support
it
Instead, I have kept my original edit of changing the two prepare statements
in system/classes/databaseconnection.php to include the emulate prepares
attribute
prepare( $query, array(PDO::ATTR_EMULATE_PREPARES => true)
which works fine.
The AND (1) issue comes from $master_perm_where in posts.php and
comments.php when you are logged-in as admin. Because I am not very familiar
with the code, I have introduced a replace such as
$master_perm_where = preg_replace('/\(1\)/m', '(1=1)', $master_perm_where);
after line 287 in comments.php and 473 in posts.php. Another class of error
messages has miraculously disappeared
there's only one error left, this one comes from the SQL constructed in
ACL::get_user_token_access
2009-04-21 12:34:10 UTC ERROR: invalid input syntax for integer: ""
2009-04-21 12:34:10 UTC STATEMENT: SELECT access_mask
FROM habari__user_token_permissions
WHERE user_id = '1'
AND token_id = ''
UNION ALL
SELECT gp.access_mask
FROM habari__users_groups ug
INNER JOIN habari__group_token_permissions gp
ON ((ug.group_id = gp.group_id
AND ug.user_id = '1')
)
AND gp.token_id = ''
ORDER BY access_mask ASC
I've had a look an the relevant table expects integers, but the
SQL-producing code seems to be producing strings (e.g. '1', '' etc.), which
is why postgresql complains. Any ideas?
We could always try and cast these strings to ints, if this is unavoidable
pdo behaviour. How would MySQL and sqlite cope with things like '1'::int?
regards, Michael
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at http://groups.google.com/group/habari-dev
-~----------~----~----~----~------~----~------~--~---