rplessl / roundcube-vacation-plugin

vacation / out-of-office plugin for RoundCube
GNU General Public License v3.0
6 stars 39 forks source link

No activefrom/activeuntil checkbox in User Interface #14

Closed shinobi31337 closed 4 years ago

shinobi31337 commented 6 years ago

Have installed roundcube 1.4 from git and the latest vacation plugin with php 7.2. it doesnt have active from/activeuntil checkbox in UI. Also, there are some differences in database structure, like cache column that is absent in old version of plugin. Can you share a new scheme in extra/postgresqlinit.sql dump please ?

yuusou commented 6 years ago

I've forked and written some added features for postfixadmin, which include activefrom and activeuntil. Perhaps it'll work for you.

tbsky commented 6 years ago

I've forked and written some added features for postfixadmin, which include activefrom and activeuntil. Perhaps it'll work for you.

Hi I just tried you fork. may I ask what database are you using? I have tried it with postfixadmin 3.2 and mysql. data for the "alias" table was written correctly. but data for the "vacation" table was not. some orders of the columns are wrong.

yuusou commented 6 years ago

Sorry there was a mistake in the insert, I'm guessing you had issues with a new user. I've fixed it now.

tbsky commented 6 years ago

Sorry there was a mistake in the insert, I'm guessing you had issues with a new user. I've fixed it now.

Hi: you are correct. only the inserted record was infected. now everything works fine except one thing:

my database use utf-8 encoding. if I use non-english characters in the message, it saved wrong encoded message to the database.(although the plugin shows the characters correctly in the web page) and the email auto-respond also send out the wrong encoded message.

I don't know if this is a general problem. thanks a lot for your hard work!!

yuusou commented 6 years ago

I haven't tested this, but try the following steps:

tbsky commented 6 years ago

I haven't tested this, but try the following steps:

* Set the default charset to utf-8 in php.ini;

* Put `$rcmail_config['default_charset'] = 'UTF-8';` in your roundcube config.

Hi: thanks for the hint. I have tried them but they don't work. so I dig further and find there is some sql handling in "rcube_db_mysql.php", but the plugin didn't use it.

if I emulate "rcube_db_mysql.php" and add one line to virtual.class.php the utf8 is fine:

  $this->db->query("SET NAMES 'utf8'");

however I found this is not enough. there are more problems besides utf8. for example with the default postfixadmin text sample: "I will be away from <> until <>.". when pressing save the "<>" characters will be ignored. there seems some sql escape/quoting problems. I believe roundcube have method/functions to handle sql correctly like utf8 or special characters, but I don't know what they are and how to fix the code.

tbsky commented 6 years ago

Hi: the "<>" characters seems not ignored by sql. but ignored by former html form apply. hope someone can figured out how to fix the code.

tbsky commented 5 years ago

hi: I found a way to keep the special characters. modify vacationdriver.class.php append the "true" parameter to function "rcube_utils::get_input_value" although it seems working fine, I don't know if there are any bad side effect.

yuusou commented 5 years ago

Just that one change? Or including all the others?

tbsky commented 5 years ago

Just that one change? Or including all the others?

Hi: yes. just change two lines for subject and body for special characters. I didn't dig further so I don't know if there are bad side effect.

rplessl commented 4 years ago

I will not fix it (this project fork will be archived)