From 99f904adcc37d93c90defcd8ce898598e25be212 Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Wed, 11 Mar 2015 16:55:04 +0100 Subject: Lot of plugins --- db_config/CHANGELOG | 19 ++++++++ db_config/LICENSE | 71 +++++++++++++++++++++++++++ db_config/README | 8 +++ db_config/SQL/mssql.20131110.sql | 2 + db_config/SQL/mssql.20141115.sql | 2 + db_config/SQL/mssql.initial.sql | 12 +++++ db_config/SQL/mysql.20131110.sql | 2 + db_config/SQL/mysql.20141115.sql | 4 ++ db_config/SQL/mysql.initial.sql | 15 ++++++ db_config/SQL/pgsql.20131110.sql | 1 + db_config/SQL/pgsql.20141115.sql | 1 + db_config/SQL/pgsql.initial.sql | 13 +++++ db_config/SQL/sqlite.20131110.sql | 1 + db_config/SQL/sqlite.20141115.sql | 1 + db_config/SQL/sqlite.initial.sql | 13 +++++ db_config/config.inc.php.dist | 86 +++++++++++++++++++++++++++++++++ db_config/db_config.php | 15 ++++++ db_config/localization/cs_CZ.inc | 15 ++++++ db_config/localization/da_DK.inc | 15 ++++++ db_config/localization/de_DE.inc | 15 ++++++ db_config/localization/en_US.inc | 15 ++++++ db_config/localization/es_ES.inc | 15 ++++++ db_config/localization/fi_FI.inc | 15 ++++++ db_config/localization/fr_FR.inc | 15 ++++++ db_config/localization/revision.inc.php | 11 +++++ db_config/localization/tr_TR.inc | 15 ++++++ db_config/package.xml | 22 +++++++++ 27 files changed, 419 insertions(+) create mode 100644 db_config/CHANGELOG create mode 100644 db_config/LICENSE create mode 100644 db_config/README create mode 100644 db_config/SQL/mssql.20131110.sql create mode 100644 db_config/SQL/mssql.20141115.sql create mode 100644 db_config/SQL/mssql.initial.sql create mode 100644 db_config/SQL/mysql.20131110.sql create mode 100644 db_config/SQL/mysql.20141115.sql create mode 100644 db_config/SQL/mysql.initial.sql create mode 100644 db_config/SQL/pgsql.20131110.sql create mode 100644 db_config/SQL/pgsql.20141115.sql create mode 100644 db_config/SQL/pgsql.initial.sql create mode 100644 db_config/SQL/sqlite.20131110.sql create mode 100644 db_config/SQL/sqlite.20141115.sql create mode 100644 db_config/SQL/sqlite.initial.sql create mode 100644 db_config/config.inc.php.dist create mode 100644 db_config/db_config.php create mode 100644 db_config/localization/cs_CZ.inc create mode 100644 db_config/localization/da_DK.inc create mode 100644 db_config/localization/de_DE.inc create mode 100644 db_config/localization/en_US.inc create mode 100644 db_config/localization/es_ES.inc create mode 100644 db_config/localization/fi_FI.inc create mode 100644 db_config/localization/fr_FR.inc create mode 100644 db_config/localization/revision.inc.php create mode 100644 db_config/localization/tr_TR.inc create mode 100644 db_config/package.xml (limited to 'db_config') diff --git a/db_config/CHANGELOG b/db_config/CHANGELOG new file mode 100644 index 0000000..73178d9 --- /dev/null +++ b/db_config/CHANGELOG @@ -0,0 +1,19 @@ +VERSION COMMENT +----------------------------------------------------------------------------------------------------------------- +1.0 - Initial release +1.1 - Be ready for Roundcube 1.0 +1.1.1 - Skip plugins where config is loaded in plugin's init method +1.1.2 - 1.1.4 - Added sort order for Account administration section +1.1.5 - Database collation utf8_general_ci +1.1.6 - Skip companyaddressbook (see 1.1.1) +1.1.7 - Implemented mysqladmin +1.1.8 - Roundcube 1.0 compatibility +1.1.9 - 1.1.10 - Code cleanup +1.1.11 - Skip 'idle_timeout' plugin (config is loaded directly there) +1.1.12 - Revert 1.1.11 +1.1.13 - Added MSSQL support (third party contribution (https://asphostpage.com/) +1.1.14 - Implement rcube_db::limitquery +1.1.15 - 1.1.17 - Make sure that MySQL database fields collation is UTF-8 + https://code.google.com/p/myroundcube/issues/detail?id=747 +1.1.18 - Load calendar configuration in calendar plugin +1.1.19 - Revert 1.1.18 \ No newline at end of file diff --git a/db_config/LICENSE b/db_config/LICENSE new file mode 100644 index 0000000..e0d8242 --- /dev/null +++ b/db_config/LICENSE @@ -0,0 +1,71 @@ +TERMS AND CONDITIONS +-------------------- + +User Agreement + +MyRoundcube Developers provides MyRoundcube Plugins (code) shall provide ("MyRoundcube Plugins") to +you ("User") under the terms and conditions of this User Agreement ("the Agreement"). USER UNDERSTANDS +AND ACKNOWLEDGES THAT USER IS ENTERING INTO AN AGREEMENT WITH MyRoundcube Developers AND NOT THE WEB +SITE WITH WHOM ANYTHING HAS ASSOCIATED TO BRING YOU THIS CODE. BY USING ("MyRoundcube Plugins") OR ANY +PART OF ITS CODE YOU ARE AGREEING TO BECOME A PARTY TO THIS AGREEMENT WITH MyRoundcube Developers AND +TO THE TERMS AND CONDITIONS HEREIN AND ACKNOWLEDGE THAT YOU HAVE READ AND UNDERSTAND ANY APPLICABLE +ASSOCIATE STATEMENT IN THIS DOCUMENT. ALL MyRoundcube Developers SERVICES ARE PROVIDED ONLINE. PERSONS +UNDER 13 MAY NOT BE ELEGIBLE TO ENTERING INTO AN AGREEMENT WITH MyRoundcube Developers OR PURCHASE OUR +SERVICES AND CODE DOWNLOADS. + +Acceptable Use Policy + +The following policy governs the use of the MyRoundcube Developers code. User will comply with the terms +and spirit of the Agreement. + +(a) User shall not use MyRoundcube Plugins (code) in a manner that violates any city, state, national +or international law or regulation, or which fails to comply with accepted Internet protocol. User +shall not attempt to interfere in any way with MyRoundcube Plugins networks or network security, or +attempt to use the MyRoundcube Plugins code to gain unauthorized access to any other computer system. +(b) User shall at all times provide MyRoundcube Developers with accurate information. User shall not +interfere in any way with another User's use of, or MyRoundcube Developers provision of the MyRoundcube +Plugins. User shall not resell, rent, lease, grant a security interest in, or make commercial use of +the MyRoundcube Plugins without the express written consent of MyRoundcube Developers. +(c) User agrees not to transfer MyRoundcube Plugins (code) for gain or otherwise. Transfer of such code +will result in termination of contract with end user. + +Limitation of Liability + +UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, TORT, CONTRACT, OR OTHERWISE, SHALL MyRoundcube +Developers OR ITS LICENSORS OR RESELLERS BE LIABLE TO USER OR ANY OTHER PERSON FOR ANY INDIRECT, SPECIAL, +INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES RESULTING +FROM THE USE OF OR THE INABILITY TO USE THE MyRoundcube Plugins (code), THE PERFORMANCE OF MyRoundcube +Plugins (code) SERVICE, OR DAMAGES FOR LOSS OF GOODWILL, BUSINESS PROFIT, BUSINESS STOPPAGE, LOSS OF +DATA OR BUSINESS INFORMATION, COMPUTER DAMAGE, OR DAMAGES RESULTING FROM UNAUTHORIZED ACCESS TO OR +CHANGES MADE TO USER'S TRANSMISSIONS OR DATA, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES. +IN NO EVENT WILL MyRoundcube Developers BE LIABLE FOR ANY DAMAGES IN EXCESS OF WHAT ANYTHING MyRoundcube +Developers RECEIVED FROM USER FOR THE MyRoundcube Plugins (code). + +Terms + +You (the User) are permitted to use the code on unlimited servers you may own, rented or leased, as +long as you own, rent or lease the server in which MyRoundcube plugins code is hosted. +Exclusive: You (the User) agree to use the code in one server at a time. Multiple server deployments +(multiserver setup), clusters or any other form of deployment that simultaneously executes MyRoundcube +plugins in a live environment must purchase a separate download per server or installation thereof. + +Warranties + +Our code is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +Terms Modifications + +We reserve the right to change or modify our Terms and Conditions at any time without prior notice. +For questions, please contact our team at dev-team [at] myroundcube [dot] com. + +Copyright (c) 2012 - 2015 +MyRoundcube.com - A Division of Informative Computing Consultants, LLC. +All rights reserved + +Informative Computing Consultants, LLC. +21741 NW 8th CT +Pembroke Pines +Florida, 33029 +dev-team [at] myroundcube [dot] com +http://myroundcube.com diff --git a/db_config/README b/db_config/README new file mode 100644 index 0000000..cecda6b --- /dev/null +++ b/db_config/README @@ -0,0 +1,8 @@ +db_config +--------- +Documentation: +http://myroundcube.com/myroundcube-plugins/db_config-plugin + + +MyRoundcube Dev Team +www.myroundcube.com \ No newline at end of file diff --git a/db_config/SQL/mssql.20131110.sql b/db_config/SQL/mssql.20131110.sql new file mode 100644 index 0000000..eb35e62 --- /dev/null +++ b/db_config/SQL/mssql.20131110.sql @@ -0,0 +1,2 @@ +UPDATE [system] SET [value]='initial|20131110' WHERE [name]='myrc_db_config' +GO diff --git a/db_config/SQL/mssql.20141115.sql b/db_config/SQL/mssql.20141115.sql new file mode 100644 index 0000000..0819c6e --- /dev/null +++ b/db_config/SQL/mssql.20141115.sql @@ -0,0 +1,2 @@ +UPDATE [system] SET [value]='initial|20131110|20141115' WHERE [name]='myrc_db_config' +GO diff --git a/db_config/SQL/mssql.initial.sql b/db_config/SQL/mssql.initial.sql new file mode 100644 index 0000000..1e806b0 --- /dev/null +++ b/db_config/SQL/mssql.initial.sql @@ -0,0 +1,12 @@ +IF NOT EXISTS (SELECT * FROM sysobjects WHERE id = object_id(N'[dbo].[db_config]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1) +CREATE TABLE [db_config] ( + [id] int NOT NULL IDENTITY(1,1), + [env] nvarchar(255) NOT NULL, + [conf] nvarchar(MAX) NOT NULL, + [admin] nvarchar(128) NOT NULL, + PRIMARY KEY ([id]) +) +GO + +INSERT INTO [system] (name, value) VALUES ('myrc_db_config', 'initial') +GO diff --git a/db_config/SQL/mysql.20131110.sql b/db_config/SQL/mysql.20131110.sql new file mode 100644 index 0000000..e0a4247 --- /dev/null +++ b/db_config/SQL/mysql.20131110.sql @@ -0,0 +1,2 @@ +ALTER TABLE `db_config` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; +UPDATE `system` SET `value`='initial|20131110' WHERE `name`='myrc_db_config'; \ No newline at end of file diff --git a/db_config/SQL/mysql.20141115.sql b/db_config/SQL/mysql.20141115.sql new file mode 100644 index 0000000..57e1605 --- /dev/null +++ b/db_config/SQL/mysql.20141115.sql @@ -0,0 +1,4 @@ +ALTER TABLE `db_config` CHANGE `env` `env` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL; +ALTER TABLE `db_config` CHANGE `conf` `conf` LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL; +ALTER TABLE `db_config` CHANGE `admin` `admin` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL; +UPDATE `system` SET `value`='initial|20131110|20141115' WHERE `name`='myrc_db_config'; \ No newline at end of file diff --git a/db_config/SQL/mysql.initial.sql b/db_config/SQL/mysql.initial.sql new file mode 100644 index 0000000..6d02e7c --- /dev/null +++ b/db_config/SQL/mysql.initial.sql @@ -0,0 +1,15 @@ +CREATE TABLE IF NOT EXISTS `db_config` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `env` varchar(255) NOT NULL, + `conf` longtext NOT NULL, + `admin` varchar(128) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; + +CREATE TABLE IF NOT EXISTS `system` ( + `name` varchar(64) NOT NULL, + `value` mediumtext, + PRIMARY KEY(`name`) +); + +INSERT INTO `system` (name, value) VALUES ('myrc_db_config', 'initial'); \ No newline at end of file diff --git a/db_config/SQL/pgsql.20131110.sql b/db_config/SQL/pgsql.20131110.sql new file mode 100644 index 0000000..e5d0335 --- /dev/null +++ b/db_config/SQL/pgsql.20131110.sql @@ -0,0 +1 @@ +UPDATE "system" SET value='initial|20131110' WHERE name='myrc_db_config'; \ No newline at end of file diff --git a/db_config/SQL/pgsql.20141115.sql b/db_config/SQL/pgsql.20141115.sql new file mode 100644 index 0000000..d3df0b4 --- /dev/null +++ b/db_config/SQL/pgsql.20141115.sql @@ -0,0 +1 @@ +UPDATE "system" SET value='initial|20131110|20141115' WHERE name='myrc_db_config'; \ No newline at end of file diff --git a/db_config/SQL/pgsql.initial.sql b/db_config/SQL/pgsql.initial.sql new file mode 100644 index 0000000..e6f53fa --- /dev/null +++ b/db_config/SQL/pgsql.initial.sql @@ -0,0 +1,13 @@ +CREATE TABLE IF NOT EXISTS db_config ( + id serial PRIMARY KEY, + env varchar(255) DEFAULT NULL, + conf text, + admin varchar(128) NOT NULL +); + +CREATE TABLE IF NOT EXISTS "system" ( + name varchar(64) NOT NULL PRIMARY KEY, + value text +); + +INSERT INTO "system" (name, value) VALUES ('myrc_db_config', 'initial'); \ No newline at end of file diff --git a/db_config/SQL/sqlite.20131110.sql b/db_config/SQL/sqlite.20131110.sql new file mode 100644 index 0000000..f4c349d --- /dev/null +++ b/db_config/SQL/sqlite.20131110.sql @@ -0,0 +1 @@ +UPDATE 'system' SET value='initial|20131110' WHERE name='myrc_db_config'; \ No newline at end of file diff --git a/db_config/SQL/sqlite.20141115.sql b/db_config/SQL/sqlite.20141115.sql new file mode 100644 index 0000000..6d13072 --- /dev/null +++ b/db_config/SQL/sqlite.20141115.sql @@ -0,0 +1 @@ +UPDATE 'system' SET value='initial|20131110|20141115' WHERE name='myrc_db_config'; \ No newline at end of file diff --git a/db_config/SQL/sqlite.initial.sql b/db_config/SQL/sqlite.initial.sql new file mode 100644 index 0000000..d1d81ec --- /dev/null +++ b/db_config/SQL/sqlite.initial.sql @@ -0,0 +1,13 @@ +CREATE TABLE IF NOT EXISTS 'db_config' ( + 'id' INTEGER NOT NULL PRIMARY KEY ASC, + 'env' varchar(255) NOT NULL, + 'conf' text NOT NULL, + 'admin' varchar(128) NOT NULL +); + +CREATE TABLE IF NOT EXISTS 'system' ( + name varchar(64) NOT NULL PRIMARY KEY, + value text NOT NULL +); + +INSERT INTO system (name, value) VALUES ('myrc_db_config', 'initial'); \ No newline at end of file diff --git a/db_config/config.inc.php.dist b/db_config/config.inc.php.dist new file mode 100644 index 0000000..7173105 --- /dev/null +++ b/db_config/config.inc.php.dist @@ -0,0 +1,86 @@ + currently not used + 'label' => label for the plugin name + 'descr' => label for the plugin description + 'href' => navigation into settings edit iFrame + 'onclick' => javascript code to be executed on click event +*/ +$config['settingsnav']['summary'] = array( + 'part' => '', + 'label' => 'accountsummary', + 'href' => '#', + 'onclick' => 'parent.location.href="./?_task=mail&_action=plugin.summary"', 'descr' => 'summary' +); +$config['settingsnav']['moreuserinfo'] = array( + 'part' => '', + 'label' => 'accountinformation', + 'href' => './?_task=settings&_action=plugin.moreuserinfo&_framed=1', + 'onclick' => '', + 'descr' => + 'moreuserinfo' +); +$config['settingsnav']['hmail_pop3'] = array( + 'part' => '', + 'label' => 'externalaccounts', + 'href' => './?_task=settings&_action=plugin.hmail_pop3&_framed=1', + 'onclick' => '', + 'descr' => 'hmail_pop3' +); +$config['settingsnav']['hmail_autoresponder'] = array( + 'part' => '', + 'label' => 'autoresponder', + 'href' => './?_task=settings&_action=plugin.hmail_autoresponder&_framed=1', + 'onclick' => '', + 'descr' => 'hmail_autoresponder' +); +$config['settingsnav']['hmail_forwarding'] = array( + 'part' => '', + 'label' => 'forwarding', + 'href' => './?_task=settings&_action=plugin.hmail_forwarding&_framed=1', + 'onclick' => '', + 'descr' => + 'hmail_forwarding' +); +$config['settingsnav']['hmail_signature'] = array( + 'part' => '', + 'label' => 'signature', + 'href' => './?_task=settings&_action=plugin.hmail_signature&_framed=1', + 'onclick' => '', + 'descr' => 'hmail_signature' +); +$config['settingsnav']['hmail_spamfilter'] = array( + 'part' => '', + 'label' => 'spamfilter', + 'href' => './?_task=settings&_action=plugin.hmail_spamfilter&_framed=1', + 'onclick' => '', + 'descr' => 'hmail_spamfilter' +); +$config['settingsnav']['hmail_rules'] = array( + 'part' => '', + 'label' => 'rules', + 'href' => './?_task=settings&_action=plugin.hmail_rules&_framed=1', + 'onclick' => '', + 'descr' => 'hmail_rules' +); +$config['settingsnav']['hmail_password'] = array( + 'part' => '', + 'label' => 'changepasswd', + 'href' => './?_task=settings&_action=plugin.hmail_password&_framed=1', + 'onclick' => '', + 'descr' => 'hmail_password' +); +$config['settingsnav']['pwtools'] = array( + 'part' => '', + 'label' => 'pwreminder', + 'href' => './?_task=settings&_action=plugin.pwtools&_framed=1', + 'onclick' => '', + 'descr' => 'pwtools' +); + +?> \ No newline at end of file diff --git a/db_config/db_config.php b/db_config/db_config.php new file mode 100644 index 0000000..a2275be --- /dev/null +++ b/db_config/db_config.php @@ -0,0 +1,15 @@ +Documentation';static private$version='1.1.19';static private$date='30-12-2014';static private$licence='All Rights reserved';static private$requirements=array('Roundcube'=>'1.0','PHP'=>'5.3','required_plugins'=>array('plugin_manager'=>'require_plugin','db_version'=>'require_plugin',),);static private$sqladmin=array('db_dsnw','db_config');static private$prefs=null;static private$tables=array('db_config',);static private$db_version=array('initial','20131110','20141115',);function init(){$rcmail=rcmail::get_instance();if(!in_array('global_config',$rcmail->config->get('plugins'))){$this->load_config();}if(is_dir(INSTALL_PATH.'plugins/db_version')){$this->require_plugin('db_version');if(!$load=db_version::exec(self::$plugin,self::$tables,self::$db_version)){return;}}if(!empty($rcmail->user->ID)){$sql='SELECT * FROM '.get_table_name('users').' WHERE user_id=?';$res=$rcmail->db->limitquery($sql,0,1,$rcmail->user->ID);$user=$rcmail->db->fetch_assoc($res);$user=(array)unserialize($user['preferences']);}else{$user=array();}foreach($this->skip as$key=>$plugin){$this->skip[$key]=$rcmail->db->quote($plugin);}$append=implode(' AND env <> ',$this->skip);$sql='SELECT * FROM '.get_table_name('db_config').' WHERE env <> '.$append;$res=$rcmail->db->query($sql);while($conf=$rcmail->db->fetch_assoc($res)){$config=array();$rcmail_config=array();if(eval($conf['conf'])===null){$config=array_merge($rcmail_config,$config);foreach($config as$key=>$val){if(!isset($user[$key])||in_array($key,$rcmail->config->get('dont_override',array()))){$rcmail->config->set($key,$val);}}}else{write_log('db_config',$conf);}}}static function about($keys=false){$requirements=self::$requirements;foreach(array('required_','recommended_')as$prefix){if(is_array($requirements[$prefix.'plugins'])){foreach($requirements[$prefix.'plugins']as$plugin=>$method){if(class_exists($plugin)&&method_exists($plugin,'about')){$class=new$plugin(false);$requirements[$prefix.'plugins'][$plugin]=array('method'=>$method,'plugin'=>$class->about($keys),);}else{$requirements[$prefix.'plugins'][$plugin]=array('method'=>$method,'plugin'=>$plugin,);}}}}return array('plugin'=>self::$plugin,'version'=>self::$version,'db_version'=>self::$db_version,'date'=>self::$date,'author'=>self::$author,'comments'=>self::$authors_comments,'licence'=>self::$licence,'sqladmin'=>self::$sqladmin,'requirements'=>$requirements);}} \ No newline at end of file diff --git a/db_config/localization/cs_CZ.inc b/db_config/localization/cs_CZ.inc new file mode 100644 index 0000000..5d1ab05 --- /dev/null +++ b/db_config/localization/cs_CZ.inc @@ -0,0 +1,15 @@ + 'Yoni', + 'language ' => 'es_ES', + 'date' => '01/15/2015 14:15:36' + ) +); + +?> \ No newline at end of file diff --git a/db_config/localization/tr_TR.inc b/db_config/localization/tr_TR.inc new file mode 100644 index 0000000..7d0eea9 --- /dev/null +++ b/db_config/localization/tr_TR.inc @@ -0,0 +1,15 @@ + + + db_config + + Myroundcube Dev Team + rosali + dev-team@myroundcube.com + yes + 2014-12-30 + + 1.1.19 + 1.1.19 + + + stable + stable + + All Rights reserved + -- cgit v1.2.3