Fix base url resolution + better order for condition checks in rcube_mdb2 + updated changelog

release-0.6
thomascube 14 years ago
parent 0911facde9
commit 8603bbba2e

@ -1,6 +1,7 @@
CHANGELOG Roundcube Webmail CHANGELOG Roundcube Webmail
=========================== ===========================
- Make alias setting in squirrelmail_usercopy plugin configurable (patch by pommi, #1487007)
- Prevent from saving a non-existing skin path in user prefs (#1486936) - Prevent from saving a non-existing skin path in user prefs (#1486936)
- Improve handling of single-part messages with bogus BODYSTRUCTURE (#1486898) - Improve handling of single-part messages with bogus BODYSTRUCTURE (#1486898)
- Fix path to SQL files when using pgsql/mysqli/sqlsrv drivers (#1486902) - Fix path to SQL files when using pgsql/mysqli/sqlsrv drivers (#1486902)

@ -123,16 +123,16 @@ class rcube_mdb2
{ {
// Already connected // Already connected
if ($this->db_connected) { if ($this->db_connected) {
// connected to read-write db, current connection is ok
if ($this->db_mode == 'w')
return;
// no replication, current connection is ok for read and write // no replication, current connection is ok for read and write
if (empty($this->db_dsnr) || $this->db_dsnw == $this->db_dsnr) { if (empty($this->db_dsnr) || $this->db_dsnw == $this->db_dsnr) {
$this->db_mode = 'w'; $this->db_mode = 'w';
return; return;
} }
// connected to read-write db, current connection is ok
if ($this->db_mode == 'w')
return;
// Same mode, current connection is ok // Same mode, current connection is ok
if ($this->db_mode == $mode) if ($this->db_mode == $mode)
return; return;

@ -227,7 +227,7 @@ function make_absolute_url($path, $base_url)
// cut base_url to the last directory // cut base_url to the last directory
if (strrpos($base_url, '/')>7) if (strrpos($base_url, '/')>7)
{ {
$host_url = substr($base_url, 0, strpos($base_url, '/')); $host_url = substr($base_url, 0, strpos($base_url, '/', 7));
$base_url = substr($base_url, 0, strrpos($base_url, '/')); $base_url = substr($base_url, 0, strrpos($base_url, '/'));
} }

Loading…
Cancel
Save