Compare commits
354 Commits
master
...
release-0.
Author | SHA1 | Date |
---|---|---|
Thomas | 4af76d20ca | 11 years ago |
Aleksander Machniak | 8d5832fe96 | 11 years ago |
Thomas | 9f0bbeb7e7 | 11 years ago |
Aleksander Machniak | 4109bb26ce | 11 years ago |
Aleksander Machniak | f2d4e40f09 | 11 years ago |
Aleksander Machniak | 5aa6f6203d | 11 years ago |
Aleksander Machniak | acbf6eede6 | 11 years ago |
Aleksander Machniak | 571aa9b04e | 11 years ago |
Thomas | 42173df79e | 11 years ago |
Aleksander Machniak | 68f4b54ccf | 11 years ago |
Aleksander Machniak | 57b44d2339 | 11 years ago |
Aleksander Machniak | bdc515d35c | 11 years ago |
Aleksander Machniak | 9919c2e68c | 11 years ago |
Aleksander Machniak | 065fdbaa65 | 11 years ago |
Aleksander Machniak | 62fe7203e6 | 11 years ago |
Aleksander Machniak | 7f1218caea | 11 years ago |
Aleksander Machniak | 256d5b7216 | 11 years ago |
Aleksander Machniak | b8c2554f1f | 11 years ago |
Aleksander Machniak | b403ede321 | 11 years ago |
Aleksander Machniak | e02bfe0831 | 11 years ago |
Aleksander Machniak | 63ec68b026 | 11 years ago |
Aleksander Machniak | 6632d42717 | 11 years ago |
Thomas B. | d499f06613 | 11 years ago |
Aleksander Machniak | 6a76f22759 | 11 years ago |
Thomas Bruederli | 4b125969ae | 11 years ago |
Aleksander Machniak | 93adce7abf | 11 years ago |
Aleksander Machniak | 262f485538 | 11 years ago |
Thomas Bruederli | 183c7ffd32 | 11 years ago |
Thomas Bruederli | d3cceb4882 | 11 years ago |
Aleksander Machniak | 74adada93c | 11 years ago |
Aleksander Machniak | c9e1e386e1 | 11 years ago |
Aleksander Machniak | c1a0b07242 | 11 years ago |
Aleksander Machniak | 5df7179b32 | 11 years ago |
Aleksander Machniak | 4fbbd81b9b | 11 years ago |
Aleksander Machniak | 652577d1fe | 11 years ago |
Aleksander Machniak | 3d0003dbdf | 11 years ago |
Aleksander Machniak | 5fd90b9a6b | 11 years ago |
Aleksander Machniak | 70eac89a5c | 11 years ago |
Aleksander Machniak | eae2a1e684 | 11 years ago |
Aleksander Machniak | e15869a979 | 11 years ago |
Aleksander Machniak | 4db26a430b | 11 years ago |
Aleksander Machniak | 6e14fcf9bf | 11 years ago |
Aleksander Machniak | 06efad1ac8 | 11 years ago |
Aleksander Machniak | e9c5b9f096 | 11 years ago |
Thomas Bruederli | a6f5a68880 | 11 years ago |
Aleksander Machniak | 896aa0d604 | 11 years ago |
Thomas Bruederli | 0e3f0ad9c9 | 11 years ago |
Thomas Bruederli | 5a3eb6fdeb | 11 years ago |
Thomas Bruederli | debd0f8515 | 11 years ago |
Thomas Bruederli | c9192c1c73 | 11 years ago |
Thomas Bruederli | d1c40bbd87 | 11 years ago |
Thomas Bruederli | 680d0ec072 | 11 years ago |
Thomas Bruederli | ed478cf064 | 11 years ago |
Thomas Bruederli | cf89e87eff | 11 years ago |
Thomas Bruederli | 341fa8b9a6 | 11 years ago |
Thomas Bruederli | 96c4b9098b | 11 years ago |
Thomas Bruederli | deacf16bee | 11 years ago |
Aleksander Machniak | f4ba655a41 | 11 years ago |
Aleksander Machniak | 216fdb891a | 11 years ago |
Aleksander Machniak | 17f11330f8 | 11 years ago |
Aleksander Machniak | 6d26369021 | 11 years ago |
Aleksander Machniak | 5591a63d70 | 11 years ago |
Aleksander Machniak | 254af68cd8 | 11 years ago |
Aleksander Machniak | f2d12f4363 | 11 years ago |
Aleksander Machniak | 276ea5fcae | 11 years ago |
Aleksander Machniak | a67ad15d2f | 11 years ago |
Aleksander Machniak | dfaf8c5b8c | 11 years ago |
Aleksander Machniak | addbb83521 | 11 years ago |
Aleksander Machniak | 7adcd62f62 | 11 years ago |
Thomas Bruederli | cd0633cf52 | 11 years ago |
Thomas Bruederli | ccce3cce3a | 11 years ago |
Thomas Bruederli | 08f5bbd26b | 11 years ago |
Thomas Bruederli | 8f14c5e1eb | 11 years ago |
Thomas Bruederli | 7df4db0b4f | 11 years ago |
Thomas Bruederli | 0d1f9ebe6a | 11 years ago |
Thomas Bruederli | 8b31b0b6b4 | 11 years ago |
Aleksander Machniak | fc5ce4758d | 11 years ago |
Aleksander Machniak | 39d14ee22b | 11 years ago |
Aleksander Machniak | 0cf43e310c | 11 years ago |
Aleksander Machniak | 00c2a90f69 | 11 years ago |
Thomas Bruederli | e6a7be8b1f | 11 years ago |
Aleksander Machniak | c3fe8a0b7a | 11 years ago |
Aleksander Machniak | e6b6925b67 | 11 years ago |
Aleksander Machniak | dc33646971 | 11 years ago |
Aleksander Machniak | 88e49b37f7 | 11 years ago |
Thomas Bruederli | 440b58b476 | 11 years ago |
Aleksander Machniak | c78a652746 | 11 years ago |
Aleksander Machniak | 6913c0ae86 | 11 years ago |
Aleksander Machniak | d2fa254d90 | 11 years ago |
Aleksander Machniak | 357dc97228 | 11 years ago |
Aleksander Machniak | daa131395e | 11 years ago |
Aleksander Machniak | 2f98161392 | 11 years ago |
Victor Benincasa | 856ec447fa | 11 years ago |
Aleksander Machniak | e221786bbe | 11 years ago |
Aleksander Machniak | 738c446078 | 11 years ago |
Thomas Bruederli | 6376aaff0c | 11 years ago |
Aleksander Machniak | b96be346de | 11 years ago |
Aleksander Machniak | 2bc814eed5 | 11 years ago |
Aleksander Machniak | 8b81c61396 | 11 years ago |
Aleksander Machniak | dd12eec622 | 11 years ago |
Aleksander Machniak | 85f756737f | 11 years ago |
Thomas Bruederli | 73c702c4d1 | 11 years ago |
Aleksander Machniak | 70ef48c2f3 | 11 years ago |
Aleksander Machniak | 853d0ab2a4 | 11 years ago |
Thomas Bruederli | 1f5557817f | 11 years ago |
Thomas Bruederli | b5c6850732 | 11 years ago |
Thomas Bruederli | 50d0a12933 | 11 years ago |
Thomas Bruederli | 63049afbfe | 11 years ago |
Aleksander Machniak | 36d5e8a7c3 | 11 years ago |
Aleksander Machniak | 35b0a75f72 | 11 years ago |
Aleksander Machniak | 04f841e900 | 11 years ago |
Aleksander Machniak | acb4b71ce5 | 11 years ago |
Aleksander Machniak | b9139f9f98 | 11 years ago |
Aleksander Machniak | 057b9e3e7f | 11 years ago |
Aleksander Machniak | aafc0a3d24 | 11 years ago |
Aleksander Machniak | 55e60c6d85 | 11 years ago |
Aleksander Machniak | 4257444957 | 11 years ago |
Aleksander Machniak | 0a7df4a32e | 11 years ago |
Aleksander Machniak | ab05ee25c1 | 11 years ago |
Aleksander Machniak | 72c8504b99 | 11 years ago |
Aleksander Machniak | 6213c6a6e1 | 11 years ago |
Aleksander Machniak | 1fe7d6ad75 | 11 years ago |
Aleksander Machniak | f5fac810dd | 11 years ago |
Aleksander Machniak | e12ac4e9b5 | 11 years ago |
Aleksander Machniak | ecbc8770c6 | 11 years ago |
Aleksander Machniak | f031cb6c5e | 11 years ago |
Aleksander Machniak | 983308e8b3 | 11 years ago |
Aleksander Machniak | 7b81cdb8e3 | 11 years ago |
Aleksander Machniak | 40d1f99cb2 | 11 years ago |
Aleksander Machniak | 1a9d466ef3 | 11 years ago |
Aleksander Machniak | f1c0c05223 | 11 years ago |
Aleksander Machniak | ace518fa6e | 11 years ago |
Aleksander Machniak | 62766c9665 | 11 years ago |
Aleksander Machniak | 2f39634b0a | 11 years ago |
Aleksander Machniak | e3cbe5dd62 | 11 years ago |
Aleksander Machniak | c79a7b734e | 11 years ago |
Aleksander Machniak | 9312ba2cb6 | 11 years ago |
Aleksander Machniak | 20df06be5d | 11 years ago |
Aleksander Machniak | 656005f056 | 11 years ago |
Aleksander Machniak | d16f90a1e2 | 11 years ago |
Thomas Bruederli | e68942c65b | 11 years ago |
Aleksander Machniak | 193d385f00 | 11 years ago |
Aleksander Machniak | 6b6209b587 | 11 years ago |
Thomas Bruederli | 57323253f7 | 11 years ago |
Thomas Bruederli | cd9801234b | 11 years ago |
Thomas Bruederli | 917f5e9eb1 | 11 years ago |
Aleksander Machniak | 05b5f969d5 | 11 years ago |
Aleksander Machniak | bde85428d6 | 11 years ago |
Aleksander Machniak | 71ec1b6063 | 11 years ago |
Aleksander Machniak | c8f5588c8a | 11 years ago |
Aleksander Machniak | 187cf5e1cd | 11 years ago |
Aleksander Machniak | 78c270c9f2 | 11 years ago |
Aleksander Machniak | e4f288c3fe | 11 years ago |
Aleksander Machniak | ac2df4e658 | 11 years ago |
Zou Guangxian | 13a77deef4 | 11 years ago |
Aleksander Machniak | af4185be64 | 11 years ago |
Aleksander Machniak | 2f5495763b | 11 years ago |
Aleksander Machniak | 56aeedd9cd | 11 years ago |
Aleksander Machniak | c067bb55df | 11 years ago |
Aleksander Machniak | fedbd431c2 | 11 years ago |
Aleksander Machniak | b7770e69fd | 11 years ago |
Thomas Bruederli | 2d6dca4714 | 11 years ago |
Aleksander Machniak | 283ac97852 | 11 years ago |
Aleksander Machniak | 9b82062f5a | 11 years ago |
Aleksander Machniak | 62fe548e08 | 11 years ago |
Aleksander Machniak | 54c6d6a943 | 11 years ago |
Aleksander Machniak | 410a4c663e | 11 years ago |
Aleksander Machniak | 9712d2240a | 11 years ago |
Aleksander Machniak | 6c3e466c74 | 11 years ago |
Thomas Bruederli | 5bc49fa22a | 11 years ago |
Aleksander Machniak | fb2f066370 | 11 years ago |
Aleksander Machniak | af98eb046f | 11 years ago |
Aleksander Machniak | 8eb66e38c9 | 11 years ago |
Aleksander Machniak | 967860765c | 11 years ago |
Aleksander Machniak | cf3f125784 | 11 years ago |
Aleksander Machniak | ecc1b3bd5e | 11 years ago |
Aleksander Machniak | b542f8800e | 11 years ago |
Aleksander Machniak | ae0c133d45 | 11 years ago |
Thomas Bruederli | 23ea51e98d | 11 years ago |
Aleksander Machniak | 4571305398 | 11 years ago |
Aleksander Machniak | 32229952ed | 11 years ago |
Aleksander Machniak | 17fb6ee986 | 11 years ago |
Aleksander Machniak | a2446d9296 | 11 years ago |
Aleksander Machniak | 102b08c6a2 | 11 years ago |
Aleksander Machniak | f55bfe096d | 11 years ago |
Aleksander Machniak | 037f4c27c2 | 11 years ago |
Aleksander Machniak | dbb86df538 | 11 years ago |
Aleksander Machniak | 2bed05d60a | 11 years ago |
Aleksander Machniak | 59997a3030 | 11 years ago |
Aleksander Machniak | 8b8462018a | 11 years ago |
Victor Benincasa | 9824e212cc | 11 years ago |
Aleksander Machniak | 51f52b525b | 11 years ago |
Aleksander Machniak | 7af32a95bb | 11 years ago |
Aleksander Machniak | 82f1c77847 | 11 years ago |
Aleksander Machniak | fa04e19be3 | 11 years ago |
Aleksander Machniak | d8752c9839 | 11 years ago |
Aleksander Machniak | ebaf850afa | 11 years ago |
Thomas Bruederli | a7db8f93ef | 11 years ago |
Aleksander Machniak | d83e12a620 | 11 years ago |
Thomas Bruederli | 8289923552 | 11 years ago |
Thomas Bruederli | a32682f3db | 11 years ago |
Thomas Bruederli | 2741d8eced | 11 years ago |
Thomas Bruederli | 706d3f472f | 11 years ago |
Aleksander Machniak | 6f4b50abea | 11 years ago |
Aleksander Machniak | 9404f4a7a6 | 11 years ago |
Aleksander Machniak | 84243db8c7 | 11 years ago |
Aleksander Machniak | d2d8d498c6 | 11 years ago |
Thomas Bruederli | e152227571 | 11 years ago |
Thomas Bruederli | b2c66d0331 | 11 years ago |
Thomas Bruederli | bd723e565d | 11 years ago |
Thomas Bruederli | 8d7f8c8c79 | 11 years ago |
Thomas Bruederli | d6cbdea04d | 11 years ago |
Aleksander Machniak | ea002b6d76 | 11 years ago |
Aleksander Machniak | 334784a051 | 11 years ago |
Aleksander Machniak | d74b410697 | 11 years ago |
Aleksander Machniak | f3739dc729 | 11 years ago |
Aleksander Machniak | 4dd9bb4671 | 11 years ago |
Aleksander Machniak | d22ef3f480 | 11 years ago |
Aleksander Machniak | 60fd3c8b5f | 11 years ago |
Aleksander Machniak | bb13a88054 | 11 years ago |
Thomas Bruederli | 64808edbc8 | 11 years ago |
Thomas Bruederli | 357485e7e1 | 11 years ago |
Thomas Bruederli | 0032911784 | 11 years ago |
Aleksander Machniak | 285b1ceb1c | 11 years ago |
Aleksander Machniak | e6d376236e | 11 years ago |
Aleksander Machniak | 8320af552c | 11 years ago |
Aleksander Machniak | 099d2b9fd4 | 11 years ago |
Aleksander Machniak | 321d8b06fb | 11 years ago |
Aleksander Machniak | aa30cf8f3c | 11 years ago |
Aleksander Machniak | d608088a64 | 11 years ago |
Aleksander Machniak | ae0821f1dd | 11 years ago |
Aleksander Machniak | 1f8fbf9455 | 11 years ago |
Thomas Bruederli | 73be4b5296 | 11 years ago |
Thomas Bruederli | 551ebd46de | 11 years ago |
Aleksander Machniak | e5a3e61052 | 11 years ago |
Thomas Bruederli | 57d1b12f2e | 11 years ago |
Aleksander Machniak | ad5cefeefc | 11 years ago |
Aleksander Machniak | 73f094ff3c | 11 years ago |
Aleksander Machniak | 71cae613f0 | 11 years ago |
Aleksander Machniak | da595a5027 | 11 years ago |
Thomas Bruederli | ffa0c53236 | 11 years ago |
Aleksander Machniak | 15963b7165 | 11 years ago |
Aleksander Machniak | a15a595158 | 11 years ago |
Aleksander Machniak | 1d719e43fb | 11 years ago |
Aleksander Machniak | ec27006ebe | 11 years ago |
Aleksander Machniak | 2c8afa8ac2 | 11 years ago |
Aleksander Machniak | c60f58f9fd | 11 years ago |
Aleksander Machniak | 4c0c248dd9 | 11 years ago |
Thomas Bruederli | 713259002f | 11 years ago |
Aleksander Machniak | 5b82ed62dc | 11 years ago |
Aleksander Machniak | 58993ffcbb | 11 years ago |
Aleksander Machniak | 097c544d98 | 11 years ago |
Aleksander Machniak | 2bbbca39ff | 11 years ago |
Aleksander Machniak | 5410eff830 | 11 years ago |
Aleksander Machniak | c4ff57c75f | 11 years ago |
Thomas Bruederli | 5aa77efcbe | 11 years ago |
Aleksander Machniak | 527e7d4509 | 11 years ago |
Aleksander Machniak | 91deac7c91 | 11 years ago |
Aleksander Machniak | acced81bba | 11 years ago |
Aleksander Machniak | 6e3f2b4294 | 11 years ago |
Aleksander Machniak | 4999702e1e | 11 years ago |
Aleksander Machniak | 9eb6d9e46a | 11 years ago |
Aleksander Machniak | 0ae20f6b9c | 11 years ago |
Aleksander Machniak | dedf138795 | 11 years ago |
Aleksander Machniak | 7797005999 | 11 years ago |
Aleksander Machniak | fddb9ff383 | 11 years ago |
Aleksander Machniak | ec2453866b | 11 years ago |
Thomas Bruederli | 6c8ea96a56 | 11 years ago |
Aleksander Machniak | f5584cbfeb | 11 years ago |
Thomas Bruederli | 91a4864231 | 11 years ago |
Thomas Bruederli | 22819a3081 | 11 years ago |
Thomas Bruederli | e3eda60a60 | 11 years ago |
Aleksander Machniak | ccc2e358f2 | 11 years ago |
Thomas Bruederli | f5533cf722 | 11 years ago |
Aleksander Machniak | e68d2a15f5 | 11 years ago |
Aleksander Machniak | bdf5656026 | 11 years ago |
Aleksander Machniak | fd777a8627 | 11 years ago |
Aleksander Machniak | 0ffb1a7af3 | 11 years ago |
Aleksander Machniak | 203251838b | 11 years ago |
Aleksander Machniak | 60dabb35ae | 11 years ago |
Aleksander Machniak | a7e1b93109 | 11 years ago |
Aleksander Machniak | ee393929a6 | 11 years ago |
Aleksander Machniak | 8b08ec158b | 11 years ago |
Thomas Bruederli | cbb695a6de | 11 years ago |
Thomas Bruederli | 4279dd18ee | 11 years ago |
Thomas Bruederli | 6b5e31f0af | 11 years ago |
Thomas Bruederli | b2932cb614 | 11 years ago |
Thomas Bruederli | df22967745 | 11 years ago |
Thomas Bruederli | 0016cde2fe | 11 years ago |
Thomas Bruederli | a33717b230 | 11 years ago |
Aleksander Machniak | e55fc1458e | 11 years ago |
Aleksander Machniak | 8514ab48d4 | 11 years ago |
Thomas Bruederli | 24d7cc5dd1 | 11 years ago |
Aleksander Machniak | 334d37eda0 | 11 years ago |
Aleksander Machniak | 4003dbe988 | 11 years ago |
Aleksander Machniak | 0be1804c00 | 11 years ago |
Aleksander Machniak | d3b18e6fc9 | 11 years ago |
Thomas Bruederli | 8c6ef8f05b | 11 years ago |
Aleksander Machniak | f2b4b8f3eb | 11 years ago |
Aleksander Machniak | 43aeb195c1 | 11 years ago |
Aleksander Machniak | 85c972a4f7 | 12 years ago |
Aleksander Machniak | 03ce0e12b8 | 12 years ago |
Aleksander Machniak | 6d5ad417d6 | 12 years ago |
Thomas Bruederli | 6782fe1fd7 | 12 years ago |
Thomas Bruederli | b4a30ac84f | 12 years ago |
Aleksander Machniak | 0f4022d54f | 12 years ago |
Aleksander Machniak | a188a9a305 | 12 years ago |
Aleksander Machniak | b0cc5519d7 | 12 years ago |
Aleksander Machniak | b3bbb28100 | 12 years ago |
Thomas Bruederli | 2a6472b2c2 | 12 years ago |
Thomas Bruederli | a8fd895263 | 12 years ago |
Thomas Bruederli | a2c2cb64e1 | 12 years ago |
Thomas Bruederli | 4901199761 | 12 years ago |
Thomas Bruederli | 5a0875ecb6 | 12 years ago |
Thomas Bruederli | c4a1d3fe5d | 12 years ago |
Aleksander Machniak | 7f693b6565 | 12 years ago |
Aleksander Machniak | cba8df5e1b | 12 years ago |
Aleksander Machniak | ab0eb04f8c | 12 years ago |
Thomas Bruederli | 39bb93d9ae | 12 years ago |
Thomas Bruederli | a7cec740ad | 12 years ago |
Thomas Bruederli | f6404d1288 | 12 years ago |
Thomas Bruederli | f2c0e7a9c0 | 12 years ago |
Aleksander Machniak | 01f1afbccc | 12 years ago |
Thomas Bruederli | aefb924082 | 12 years ago |
Thomas Bruederli | 2b2f34d354 | 12 years ago |
Thomas Bruederli | 6984ab64f7 | 12 years ago |
Aleksander Machniak | a2181ee625 | 12 years ago |
Aleksander Machniak | 68fb9e63f0 | 12 years ago |
Aleksander Machniak | 9deb663f94 | 12 years ago |
Aleksander Machniak | 1aca4cb3ae | 12 years ago |
Thomas Bruederli | 24607ceb80 | 12 years ago |
Thomas Bruederli | 8c293e2f28 | 12 years ago |
Aleksander Machniak | 2c195e0365 | 12 years ago |
Aleksander Machniak | cc2ee75ea4 | 12 years ago |
Aleksander Machniak | 55459c7576 | 12 years ago |
Aleksander Machniak | 5a2453703a | 12 years ago |
Aleksander Machniak | f5c7df4c32 | 12 years ago |
Aleksander Machniak | a03c28a22f | 12 years ago |
Thomas Bruederli | 2080feca93 | 12 years ago |
Thomas Bruederli | ba36369638 | 12 years ago |
Thomas Bruederli | a3e341cb29 | 12 years ago |
Thomas Bruederli | 7cc1d3ae17 | 12 years ago |
Aleksander Machniak | 536d45d3a2 | 12 years ago |
Thomas Bruederli | 9d318f5347 | 12 years ago |
Thomas Bruederli | 25a31031b0 | 12 years ago |
Thomas Bruederli | d9f061b558 | 12 years ago |
Thomas Bruederli | a0eb4aef29 | 12 years ago |
Thomas Bruederli | b33f21867f | 12 years ago |
Thomas Bruederli | 0938f6622b | 12 years ago |
Aleksander Machniak | 941fa51836 | 12 years ago |
Aleksander Machniak | fd88a22eff | 12 years ago |
Aleksander Machniak | 942cbb6581 | 12 years ago |
Thomas Bruederli | 6fdc35e13e | 12 years ago |
Thomas Bruederli | 2c6aea9b8e | 12 years ago |
@ -1,30 +0,0 @@
|
||||
<?php
|
||||
|
||||
$config = array();
|
||||
|
||||
// Database configuration
|
||||
$config['db_dsnw'] = 'sqlite:////tmp/sqlite.db?mode=0646';
|
||||
|
||||
// Test user credentials
|
||||
$config['tests_username'] = 'test';
|
||||
$config['tests_password'] = 'test';
|
||||
|
||||
// GreenMail
|
||||
$config['smtp_port'] = 25;
|
||||
|
||||
// Settings required by the tests
|
||||
|
||||
$config['create_default_folders'] = true;
|
||||
$config['skin'] = 'elastic';
|
||||
$config['support_url'] = 'http://support.url';
|
||||
|
||||
// Plugins with tests
|
||||
|
||||
$config['plugins'] = [
|
||||
'archive',
|
||||
'attachment_reminder',
|
||||
'markasjunk',
|
||||
'zipdownload'
|
||||
];
|
||||
|
||||
$config['archive_mbox'] = 'Archive';
|
@ -1,22 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# The script is intended for use on Travis with Trusty distribution
|
||||
|
||||
DIR=$(dirname $0)
|
||||
|
||||
# Enable xdebug for code coverage
|
||||
if [ "$CODE_COVERAGE" != 1 ]; then phpenv config-rm xdebug.ini || true; fi
|
||||
|
||||
cd $DIR/..
|
||||
|
||||
cp composer.json-dist composer.json
|
||||
|
||||
# Add laravel/dusk for Browser tests
|
||||
if [ "$BROWSER_TESTS" = 1 ]; then composer require "laravel/dusk:~5.9.1" --no-update; fi
|
||||
|
||||
# Remove qr-code as it requires php-gd which is not always available on Travis
|
||||
# and we don't really need it for tests
|
||||
composer remove endroid/qr-code --no-update
|
||||
|
||||
# Install PHP dependencies
|
||||
composer install --prefer-dist
|
@ -1,25 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# The script is intended for use on Travis with Trusty distribution
|
||||
# It executes unit and functional tests
|
||||
|
||||
DIR=$(dirname $0)
|
||||
cd $DIR/..
|
||||
|
||||
if [ "$CODE_COVERAGE" = 1 ]
|
||||
then
|
||||
CODE_COVERAGE_ARGS="--coverage-text"
|
||||
fi
|
||||
|
||||
vendor/bin/phpunit -c tests/phpunit.xml $CODE_COVERAGE_ARGS
|
||||
|
||||
if [ "$BROWSER_TESTS" = 1 ] && [ $? = 0 ]
|
||||
then
|
||||
.ci/setup.sh \
|
||||
&& echo "TESTS_MODE: DESKTOP" \
|
||||
&& TESTS_MODE=desktop vendor/bin/phpunit -c tests/Browser/phpunit.xml \
|
||||
&& echo "TESTS_MODE: PHONE" \
|
||||
&& TESTS_MODE=phone vendor/bin/phpunit -c tests/Browser/phpunit.xml \
|
||||
&& echo "TESTS_MODE: TABLET" \
|
||||
&& TESTS_MODE=tablet vendor/bin/phpunit -c tests/Browser/phpunit.xml
|
||||
fi
|
@ -1,30 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# The script is intended for use on Travis with Trusty distribution
|
||||
# It installs in-browser tests dependencies and prepares Roundcube instance
|
||||
|
||||
GMV=1.5.11
|
||||
CHROMEVERSION=$(google-chrome-stable --version | tr -cd [:digit:]. | cut -d . -f 1)
|
||||
GMARGS="-Dgreenmail.setup.all -Dgreenmail.users=test:test -Dgreenmail.startup.timeout=3000"
|
||||
|
||||
# Roundcube tests and instance configuration
|
||||
cp .ci/config-test.inc.php config/config-test.inc.php
|
||||
|
||||
# Make temp and logs writeable
|
||||
sudo chmod 777 temp logs
|
||||
|
||||
# Install javascript dependencies
|
||||
bin/install-jsdeps.sh
|
||||
|
||||
# Compile Elastic's styles
|
||||
lessc skins/elastic/styles/styles.less > skins/elastic/styles/styles.css
|
||||
lessc skins/elastic/styles/print.less > skins/elastic/styles/print.css
|
||||
lessc skins/elastic/styles/embed.less > skins/elastic/styles/embed.css
|
||||
|
||||
# Install proper WebDriver version for installed Chrome browser
|
||||
php tests/Browser/install.php $CHROMEVERSION
|
||||
|
||||
# GreenMail server download, setup and start
|
||||
wget https://repo1.maven.org/maven2/com/icegreen/greenmail-standalone/$GMV/greenmail-standalone-$GMV.jar \
|
||||
&& (sudo java $GMARGS -jar greenmail-standalone-$GMV.jar &) \
|
||||
&& sleep 5
|
@ -1,37 +0,0 @@
|
||||
language: php
|
||||
|
||||
dist: trusty #
|
||||
sudo: false
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
||||
include:
|
||||
- php: 5.4
|
||||
- php: 5.5
|
||||
- php: 5.6
|
||||
- php: 7.0
|
||||
- php: 7.1
|
||||
env: CODE_COVERAGE=1
|
||||
- php: 7.2
|
||||
- php: 7.3
|
||||
dist: bionic # for proper node-less version
|
||||
env: BROWSER_TESTS=1
|
||||
addons:
|
||||
chrome: stable
|
||||
apt:
|
||||
packages:
|
||||
- node-less
|
||||
- php: 7.4
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.composer
|
||||
|
||||
install:
|
||||
- .ci/install.sh
|
||||
|
||||
script:
|
||||
- .ci/run.sh
|
||||
|
||||
notifications:
|
||||
email: false
|
@ -1,99 +0,0 @@
|
||||
[main]
|
||||
host = https://www.transifex.com
|
||||
lang_map = be: be_BE, sr: sr_CS, fa: fa_AF, lb: lb_LU, fr: fr_FR
|
||||
type = PHP_ALT_ARRAY
|
||||
|
||||
[roundcube-webmail.labels]
|
||||
file_filter = program/localization/<lang>/labels.inc
|
||||
source_file = program/localization/en_US/labels.inc
|
||||
source_lang = en_US
|
||||
|
||||
[roundcube-webmail.messages]
|
||||
file_filter = program/localization/<lang>/messages.inc
|
||||
source_file = program/localization/en_US/messages.inc
|
||||
source_lang = en_US
|
||||
|
||||
[roundcube-webmail.timezones]
|
||||
file_filter = program/localization/<lang>/timezones.inc
|
||||
source_file = program/localization/en_US/timezones.inc
|
||||
source_lang = en_US
|
||||
|
||||
[roundcube-webmail.plugin-acl]
|
||||
file_filter = plugins/acl/localization/<lang>.inc
|
||||
source_file = plugins/acl/localization/en_US.inc
|
||||
source_lang = en_US
|
||||
|
||||
[roundcube-webmail.plugin-archive]
|
||||
file_filter = plugins/archive/localization/<lang>.inc
|
||||
source_file = plugins/archive/localization/en_US.inc
|
||||
source_lang = en_US
|
||||
|
||||
[roundcube-webmail.plugin-attachment_reminder]
|
||||
file_filter = plugins/attachment_reminder/localization/<lang>.inc
|
||||
source_file = plugins/attachment_reminder/localization/en_US.inc
|
||||
source_lang = en_US
|
||||
|
||||
[roundcube-webmail.plugin-emoticons]
|
||||
file_filter = plugins/emoticons/localization/<lang>.inc
|
||||
source_file = plugins/emoticons/localization/en_US.inc
|
||||
source_lang = en_US
|
||||
|
||||
[roundcube-webmail.plugin-enigma]
|
||||
file_filter = plugins/enigma/localization/<lang>.inc
|
||||
source_file = plugins/enigma/localization/en_US.inc
|
||||
source_lang = en_US
|
||||
|
||||
[roundcube-webmail.plugin-help]
|
||||
file_filter = plugins/help/localization/<lang>.inc
|
||||
source_file = plugins/help/localization/en_US.inc
|
||||
source_lang = en_US
|
||||
|
||||
[roundcube-webmail.plugin-hide_blockquote]
|
||||
file_filter = plugins/hide_blockquote/localization/<lang>.inc
|
||||
source_file = plugins/hide_blockquote/localization/en_US.inc
|
||||
source_lang = en_US
|
||||
|
||||
[roundcube-webmail.plugin-managesieve]
|
||||
file_filter = plugins/managesieve/localization/<lang>.inc
|
||||
source_file = plugins/managesieve/localization/en_US.inc
|
||||
source_lang = en_US
|
||||
|
||||
[roundcube-webmail.plugin-markasjunk]
|
||||
file_filter = plugins/markasjunk/localization/<lang>.inc
|
||||
source_file = plugins/markasjunk/localization/en_US.inc
|
||||
source_lang = en_US
|
||||
|
||||
[roundcube-webmail.plugin-new_user_dialog]
|
||||
file_filter = plugins/new_user_dialog/localization/<lang>.inc
|
||||
source_file = plugins/new_user_dialog/localization/en_US.inc
|
||||
source_lang = en_US
|
||||
|
||||
[roundcube-webmail.plugin-newmail_notifier]
|
||||
file_filter = plugins/newmail_notifier/localization/<lang>.inc
|
||||
source_file = plugins/newmail_notifier/localization/en_US.inc
|
||||
source_lang = en_US
|
||||
|
||||
[roundcube-webmail.plugin-password]
|
||||
file_filter = plugins/password/localization/<lang>.inc
|
||||
source_file = plugins/password/localization/en_US.inc
|
||||
source_lang = en_US
|
||||
|
||||
[roundcube-webmail.plugin-subscriptions_option]
|
||||
file_filter = plugins/subscriptions_option/localization/<lang>.inc
|
||||
source_file = plugins/subscriptions_option/localization/en_US.inc
|
||||
source_lang = en_US
|
||||
|
||||
[roundcube-webmail.plugin-userinfo]
|
||||
file_filter = plugins/userinfo/localization/<lang>.inc
|
||||
source_file = plugins/userinfo/localization/en_US.inc
|
||||
source_lang = en_US
|
||||
|
||||
[roundcube-webmail.plugin-vcard_attachments]
|
||||
file_filter = plugins/vcard_attachments/localization/<lang>.inc
|
||||
source_file = plugins/vcard_attachments/localization/en_US.inc
|
||||
source_lang = en_US
|
||||
|
||||
[roundcube-webmail.plugin-zipdownload]
|
||||
file_filter = plugins/zipdownload/localization/<lang>.inc
|
||||
source_file = plugins/zipdownload/localization/en_US.inc
|
||||
source_lang = en_US
|
@ -1 +0,0 @@
|
||||
-- empty
|
@ -1,17 +0,0 @@
|
||||
CREATE TABLE [dbo].[cache_shared] (
|
||||
[cache_key] [varchar] (255) COLLATE Latin1_General_CI_AI NOT NULL ,
|
||||
[created] [datetime] NOT NULL ,
|
||||
[data] [text] COLLATE Latin1_General_CI_AI NOT NULL
|
||||
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[cache_shared] ADD
|
||||
CONSTRAINT [DF_cache_shared_created] DEFAULT (getdate()) FOR [created]
|
||||
GO
|
||||
|
||||
CREATE INDEX [IX_cache_shared_cache_key] ON [dbo].[cache_shared]([cache_key]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE INDEX [IX_cache_shared_created] ON [dbo].[cache_shared]([created]) ON [PRIMARY]
|
||||
GO
|
||||
|
@ -1,44 +0,0 @@
|
||||
ALTER TABLE [dbo].[cache] ADD [expires] [datetime] NULL
|
||||
GO
|
||||
ALTER TABLE [dbo].[cache_shared] ADD [expires] [datetime] NULL
|
||||
GO
|
||||
ALTER TABLE [dbo].[cache_index] ADD [expires] [datetime] NULL
|
||||
GO
|
||||
ALTER TABLE [dbo].[cache_thread] ADD [expires] [datetime] NULL
|
||||
GO
|
||||
ALTER TABLE [dbo].[cache_messages] ADD [expires] [datetime] NULL
|
||||
GO
|
||||
|
||||
UPDATE [dbo].[cache] SET [expires] = DATEADD(second, 604800, [created])
|
||||
GO
|
||||
UPDATE [dbo].[cache_shared] SET [expires] = DATEADD(second, 604800, [created])
|
||||
GO
|
||||
UPDATE [dbo].[cache_index] SET [expires] = DATEADD(second, 604800, [changed])
|
||||
GO
|
||||
UPDATE [dbo].[cache_thread] SET [expires] = DATEADD(second, 604800, [changed])
|
||||
GO
|
||||
UPDATE [dbo].[cache_messages] SET [expires] = DATEADD(second, 604800, [changed])
|
||||
GO
|
||||
|
||||
DROP INDEX [IX_cache_created]
|
||||
GO
|
||||
DROP INDEX [IX_cache_shared_created]
|
||||
GO
|
||||
ALTER TABLE [dbo].[cache_index] DROP COLUMN [changed]
|
||||
GO
|
||||
ALTER TABLE [dbo].[cache_thread] DROP COLUMN [changed]
|
||||
GO
|
||||
ALTER TABLE [dbo].[cache_messages] DROP COLUMN [changed]
|
||||
GO
|
||||
|
||||
CREATE INDEX [IX_cache_expires] ON [dbo].[cache]([expires]) ON [PRIMARY]
|
||||
GO
|
||||
CREATE INDEX [IX_cache_shared_expires] ON [dbo].[cache_shared]([expires]) ON [PRIMARY]
|
||||
GO
|
||||
CREATE INDEX [IX_cache_index_expires] ON [dbo].[cache_index]([expires]) ON [PRIMARY]
|
||||
GO
|
||||
CREATE INDEX [IX_cache_thread_expires] ON [dbo].[cache_thread]([expires]) ON [PRIMARY]
|
||||
GO
|
||||
CREATE INDEX [IX_cache_messages_expires] ON [dbo].[cache_messages]([expires]) ON [PRIMARY]
|
||||
GO
|
||||
|
@ -1 +0,0 @@
|
||||
-- empty
|
@ -1 +0,0 @@
|
||||
-- empty
|
@ -1,4 +0,0 @@
|
||||
ALTER TABLE [dbo].[users] ADD [failed_login] [datetime] NULL
|
||||
GO
|
||||
ALTER TABLE [dbo].[users] ADD [failed_login_counter] [int] NULL
|
||||
GO
|
@ -1,2 +0,0 @@
|
||||
ALTER TABLE [dbo].[session] DROP COLUMN [created]
|
||||
GO
|
@ -1,2 +0,0 @@
|
||||
ALTER TABLE [dbo].[session] ALTER COLUMN [ip] [varchar] (40) COLLATE Latin1_General_CI_AI NOT NULL
|
||||
GO
|
@ -1,36 +0,0 @@
|
||||
DROP TABLE [dbo].[cache]
|
||||
GO
|
||||
DROP TABLE [dbo].[cache_shared]
|
||||
GO
|
||||
|
||||
CREATE TABLE [dbo].[cache] (
|
||||
[user_id] [int] NOT NULL ,
|
||||
[cache_key] [varchar] (128) COLLATE Latin1_General_CI_AI NOT NULL ,
|
||||
[expires] [datetime] NULL ,
|
||||
[data] [text] COLLATE Latin1_General_CI_AI NOT NULL
|
||||
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
|
||||
GO
|
||||
CREATE TABLE [dbo].[cache_shared] (
|
||||
[cache_key] [varchar] (255) COLLATE Latin1_General_CI_AI NOT NULL ,
|
||||
[expires] [datetime] NULL ,
|
||||
[data] [text] COLLATE Latin1_General_CI_AI NOT NULL
|
||||
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
|
||||
GO
|
||||
ALTER TABLE [dbo].[cache] ADD
|
||||
CONSTRAINT [DF_cache_user_id] DEFAULT ('0') FOR [user_id],
|
||||
CONSTRAINT [DF_cache_cache_key] DEFAULT ('') FOR [cache_key],
|
||||
GO
|
||||
CREATE INDEX [IX_cache_expires] ON [dbo].[cache]([expires]) ON [PRIMARY]
|
||||
GO
|
||||
CREATE INDEX [IX_cache_shared_expires] ON [dbo].[cache_shared]([expires]) ON [PRIMARY]
|
||||
GO
|
||||
ALTER TABLE [dbo].[cache] WITH NOCHECK ADD
|
||||
PRIMARY KEY CLUSTERED (
|
||||
[user_id],[cache_key]
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
ALTER TABLE [dbo].[cache_shared] WITH NOCHECK ADD
|
||||
PRIMARY KEY CLUSTERED (
|
||||
[cache_key]
|
||||
) ON [PRIMARY]
|
||||
GO
|
@ -1,24 +0,0 @@
|
||||
CREATE TABLE [dbo].[filestore] (
|
||||
[file_id] [int] IDENTITY (1, 1) NOT NULL ,
|
||||
[user_id] [int] NOT NULL ,
|
||||
[filename] [varchar] (128) COLLATE Latin1_General_CI_AI NOT NULL ,
|
||||
[mtime] [int] NOT NULL ,
|
||||
[data] [text] COLLATE Latin1_General_CI_AI NULL ,
|
||||
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[filestore] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_filestore_file_id] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[file_id]
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE INDEX [IX_filestore_user_id] ON [dbo].[filestore]([user_id]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[filestore] ADD CONSTRAINT [FK_filestore_user_id]
|
||||
FOREIGN KEY ([user_id]) REFERENCES [dbo].[users] ([user_id])
|
||||
ON DELETE CASCADE ON UPDATE CASCADE
|
||||
GO
|
||||
|
@ -1,9 +0,0 @@
|
||||
ALTER TABLE [dbo].[filestore] ADD COLUMN [context] [varchar] (32) COLLATE Latin1_General_CI_AI NOT NULL
|
||||
GO
|
||||
|
||||
UPDATE [dbo].[filestore] SET [dbo].[context] = 'enigma'
|
||||
GO
|
||||
|
||||
CREATE UNIQUE INDEX [IX_filestore_user_id_context_filename] ON [dbo].[filestore]([user_id],[context],[filename]) ON [PRIMARY]
|
||||
GO
|
||||
|
@ -1,18 +0,0 @@
|
||||
ALTER TABLE [dbo].[cache] ALTER COLUMN
|
||||
[cache_key] [varchar] (128) COLLATE Latin1_General_CS_AS NOT NULL
|
||||
GO
|
||||
ALTER TABLE [dbo].[cache_shared] ALTER COLUMN
|
||||
[cache_key] [varchar] (255) COLLATE Latin1_General_CS_AS NOT NULL
|
||||
GO
|
||||
ALTER TABLE [dbo].[cache_index] ALTER COLUMN
|
||||
[mailbox] [varchar] (128) COLLATE Latin1_General_CS_AS NOT NULL
|
||||
GO
|
||||
ALTER TABLE [dbo].[cache_messages] ALTER COLUMN
|
||||
[mailbox] [varchar] (128) COLLATE Latin1_General_CS_AS NOT NULL
|
||||
GO
|
||||
ALTER TABLE [dbo].[cache_thread] ALTER COLUMN
|
||||
[mailbox] [varchar] (128) COLLATE Latin1_General_CS_AS NOT NULL
|
||||
GO
|
||||
ALTER TABLE [dbo].[users] ALTER COLUMN
|
||||
[username] [varchar] (128) COLLATE Latin1_General_CS_AS NOT NULL
|
||||
GO
|
@ -1,4 +0,0 @@
|
||||
ALTER TABLE [dbo].[users] ALTER COLUMN [language] [varchar] (16) COLLATE Latin1_General_CI_AI NULL
|
||||
GO
|
||||
ALTER TABLE [dbo].[dictionary] ALTER COLUMN [language] [varchar] (16) COLLATE Latin1_General_CI_AI NOT NULL
|
||||
GO
|
@ -1 +0,0 @@
|
||||
-- empty
|
@ -1 +0,0 @@
|
||||
-- empty
|
@ -1,7 +0,0 @@
|
||||
CREATE TABLE `cache_shared` (
|
||||
`cache_key` varchar(255) /*!40101 CHARACTER SET ascii COLLATE ascii_general_ci */ NOT NULL,
|
||||
`created` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
|
||||
`data` longtext NOT NULL,
|
||||
INDEX `created_index` (`created`),
|
||||
INDEX `cache_key_index` (`cache_key`)
|
||||
) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */;
|
@ -1,24 +0,0 @@
|
||||
ALTER TABLE `cache` ADD `expires` datetime DEFAULT NULL;
|
||||
ALTER TABLE `cache_shared` ADD `expires` datetime DEFAULT NULL;
|
||||
ALTER TABLE `cache_index` ADD `expires` datetime DEFAULT NULL;
|
||||
ALTER TABLE `cache_thread` ADD `expires` datetime DEFAULT NULL;
|
||||
ALTER TABLE `cache_messages` ADD `expires` datetime DEFAULT NULL;
|
||||
|
||||
-- initialize expires column with created/changed date + 7days
|
||||
UPDATE `cache` SET `expires` = `created` + interval 604800 second;
|
||||
UPDATE `cache_shared` SET `expires` = `created` + interval 604800 second;
|
||||
UPDATE `cache_index` SET `expires` = `changed` + interval 604800 second;
|
||||
UPDATE `cache_thread` SET `expires` = `changed` + interval 604800 second;
|
||||
UPDATE `cache_messages` SET `expires` = `changed` + interval 604800 second;
|
||||
|
||||
ALTER TABLE `cache` DROP INDEX `created_index`;
|
||||
ALTER TABLE `cache_shared` DROP INDEX `created_index`;
|
||||
ALTER TABLE `cache_index` DROP `changed`;
|
||||
ALTER TABLE `cache_thread` DROP `changed`;
|
||||
ALTER TABLE `cache_messages` DROP `changed`;
|
||||
|
||||
ALTER TABLE `cache` ADD INDEX `expires_index` (`expires`);
|
||||
ALTER TABLE `cache_shared` ADD INDEX `expires_index` (`expires`);
|
||||
ALTER TABLE `cache_index` ADD INDEX `expires_index` (`expires`);
|
||||
ALTER TABLE `cache_thread` ADD INDEX `expires_index` (`expires`);
|
||||
ALTER TABLE `cache_messages` ADD INDEX `expires_index` (`expires`);
|
@ -1 +0,0 @@
|
||||
ALTER TABLE `users` CHANGE `preferences` `preferences` longtext;
|
@ -1 +0,0 @@
|
||||
ALTER TABLE `identities` CHANGE `signature` `signature` longtext;
|
@ -1,3 +0,0 @@
|
||||
ALTER TABLE `users`
|
||||
ADD `failed_login` datetime DEFAULT NULL,
|
||||
ADD `failed_login_counter` int(10) UNSIGNED DEFAULT NULL;
|
@ -1 +0,0 @@
|
||||
ALTER TABLE `session` DROP COLUMN `created`;
|
@ -1 +0,0 @@
|
||||
ALTER TABLE `session` MODIFY `ip` varchar(40) NOT NULL;
|
@ -1,24 +0,0 @@
|
||||
ALTER TABLE `dictionary` ADD COLUMN `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST; -- redundant, for compat. with Galera Cluster
|
||||
|
||||
DROP TABLE `cache`;
|
||||
DROP TABLE `cache_shared`;
|
||||
|
||||
CREATE TABLE `cache` (
|
||||
`user_id` int(10) UNSIGNED NOT NULL,
|
||||
`cache_key` varchar(128) /*!40101 CHARACTER SET ascii COLLATE ascii_general_ci */ NOT NULL,
|
||||
`expires` datetime DEFAULT NULL,
|
||||
`data` longtext NOT NULL,
|
||||
PRIMARY KEY (`user_id`, `cache_key`),
|
||||
CONSTRAINT `user_id_fk_cache` FOREIGN KEY (`user_id`)
|
||||
REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
INDEX `expires_index` (`expires`)
|
||||
) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */;
|
||||
|
||||
|
||||
CREATE TABLE `cache_shared` (
|
||||
`cache_key` varchar(255) /*!40101 CHARACTER SET ascii COLLATE ascii_general_ci */ NOT NULL,
|
||||
`expires` datetime DEFAULT NULL,
|
||||
`data` longtext NOT NULL,
|
||||
PRIMARY KEY (`cache_key`),
|
||||
INDEX `expires_index` (`expires`)
|
||||
) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */;
|
@ -1,11 +0,0 @@
|
||||
CREATE TABLE `filestore` (
|
||||
`file_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`user_id` int(10) UNSIGNED NOT NULL,
|
||||
`filename` varchar(128) NOT NULL,
|
||||
`mtime` int(10) NOT NULL,
|
||||
`data` longtext NOT NULL,
|
||||
PRIMARY KEY (`file_id`),
|
||||
CONSTRAINT `user_id_fk_filestore` FOREIGN KEY (`user_id`)
|
||||
REFERENCES `users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
UNIQUE `uniqueness` (`user_id`, `filename`)
|
||||
) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */;
|
@ -1,7 +0,0 @@
|
||||
ALTER TABLE `filestore` ADD COLUMN `context` varchar(32) NOT NULL;
|
||||
UPDATE `filestore` SET `context` = 'enigma';
|
||||
ALTER TABLE `filestore` DROP FOREIGN KEY `user_id_fk_filestore`;
|
||||
ALTER TABLE `filestore` DROP INDEX `uniqueness`;
|
||||
ALTER TABLE `filestore` ADD UNIQUE INDEX `uniqueness` (`user_id`, `context`, `filename`);
|
||||
ALTER TABLE `filestore` ADD CONSTRAINT `user_id_fk_filestore` FOREIGN KEY (`user_id`)
|
||||
REFERENCES `users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
@ -1,2 +0,0 @@
|
||||
ALTER TABLE `cache` CHANGE `cache_key` `cache_key` varchar(128) BINARY NOT NULL;
|
||||
ALTER TABLE `cache_shared` CHANGE `cache_key` `cache_key` varchar(255) BINARY NOT NULL;
|
@ -1,2 +0,0 @@
|
||||
ALTER TABLE `users` MODIFY `language` varchar(16);
|
||||
ALTER TABLE `dictionary` MODIFY `language` varchar(16) NOT NULL;
|
@ -1,21 +0,0 @@
|
||||
ALTER TABLE `session` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
ALTER TABLE `users` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
ALTER TABLE `cache` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
ALTER TABLE `cache_shared` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
ALTER TABLE `cache_index` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
ALTER TABLE `cache_thread` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
ALTER TABLE `cache_messages` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
ALTER TABLE `contacts` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
ALTER TABLE `contactgroups` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
ALTER TABLE `identities` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
ALTER TABLE `dictionary` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
ALTER TABLE `searches` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
ALTER TABLE `filestore` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
ALTER TABLE `system` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
ALTER TABLE `users` CHANGE `username` `username` varchar(128) BINARY NOT NULL;
|
||||
ALTER TABLE `cache` CHANGE `cache_key` `cache_key` varchar(128) BINARY NOT NULL;
|
||||
ALTER TABLE `cache_shared` CHANGE `cache_key` `cache_key` varchar(255) BINARY NOT NULL;
|
||||
ALTER TABLE `cache_index` CHANGE `mailbox` `mailbox` varchar(255) BINARY NOT NULL;
|
||||
ALTER TABLE `cache_thread` CHANGE `mailbox` `mailbox` varchar(255) BINARY NOT NULL;
|
||||
ALTER TABLE `cache_messages` CHANGE `mailbox` `mailbox` varchar(255) BINARY NOT NULL;
|
@ -1,241 +0,0 @@
|
||||
-- Roundcube Webmail initial database structure
|
||||
-- This was tested with Oracle 11g
|
||||
|
||||
CREATE TABLE "users" (
|
||||
"user_id" integer PRIMARY KEY,
|
||||
"username" varchar(128) NOT NULL,
|
||||
"mail_host" varchar(128) NOT NULL,
|
||||
"created" timestamp with time zone DEFAULT current_timestamp NOT NULL,
|
||||
"last_login" timestamp with time zone DEFAULT NULL,
|
||||
"failed_login" timestamp with time zone DEFAULT NULL,
|
||||
"failed_login_counter" integer DEFAULT NULL,
|
||||
"language" varchar(16),
|
||||
"preferences" long DEFAULT NULL,
|
||||
CONSTRAINT "users_username_key" UNIQUE ("username", "mail_host")
|
||||
);
|
||||
|
||||
CREATE SEQUENCE "users_seq"
|
||||
START WITH 1 INCREMENT BY 1 NOMAXVALUE;
|
||||
|
||||
CREATE TRIGGER "users_seq_trig"
|
||||
BEFORE INSERT ON "users" FOR EACH ROW
|
||||
BEGIN
|
||||
:NEW."user_id" := "users_seq".nextval;
|
||||
END;
|
||||
/
|
||||
|
||||
CREATE TABLE "session" (
|
||||
"sess_id" varchar(128) NOT NULL PRIMARY KEY,
|
||||
"changed" timestamp with time zone DEFAULT current_timestamp NOT NULL,
|
||||
"ip" varchar(41) NOT NULL,
|
||||
"vars" long NOT NULL
|
||||
);
|
||||
|
||||
CREATE INDEX "session_changed_idx" ON "session" ("changed");
|
||||
|
||||
|
||||
CREATE TABLE "identities" (
|
||||
"identity_id" integer PRIMARY KEY,
|
||||
"user_id" integer NOT NULL
|
||||
REFERENCES "users" ("user_id") ON DELETE CASCADE,
|
||||
"changed" timestamp with time zone DEFAULT current_timestamp NOT NULL,
|
||||
"del" smallint DEFAULT 0 NOT NULL,
|
||||
"standard" smallint DEFAULT 0 NOT NULL,
|
||||
"name" varchar(128) NOT NULL,
|
||||
"organization" varchar(128),
|
||||
"email" varchar(128) NOT NULL,
|
||||
"reply-to" varchar(128),
|
||||
"bcc" varchar(128),
|
||||
"signature" long,
|
||||
"html_signature" integer DEFAULT 0 NOT NULL
|
||||
);
|
||||
|
||||
CREATE INDEX "identities_user_id_idx" ON "identities" ("user_id", "del");
|
||||
CREATE INDEX "identities_email_idx" ON "identities" ("email", "del");
|
||||
|
||||
CREATE SEQUENCE "identities_seq"
|
||||
START WITH 1 INCREMENT BY 1 NOMAXVALUE;
|
||||
|
||||
CREATE TRIGGER "identities_seq_trig"
|
||||
BEFORE INSERT ON "identities" FOR EACH ROW
|
||||
BEGIN
|
||||
:NEW."identity_id" := "identities_seq".nextval;
|
||||
END;
|
||||
/
|
||||
|
||||
CREATE TABLE "contacts" (
|
||||
"contact_id" integer PRIMARY KEY,
|
||||
"user_id" integer NOT NULL
|
||||
REFERENCES "users" ("user_id") ON DELETE CASCADE,
|
||||
"changed" timestamp with time zone DEFAULT current_timestamp NOT NULL,
|
||||
"del" smallint DEFAULT 0 NOT NULL,
|
||||
"name" varchar(128) DEFAULT NULL,
|
||||
"email" varchar(4000) DEFAULT NULL,
|
||||
"firstname" varchar(128) DEFAULT NULL,
|
||||
"surname" varchar(128) DEFAULT NULL,
|
||||
"vcard" long,
|
||||
"words" varchar(4000)
|
||||
);
|
||||
|
||||
CREATE INDEX "contacts_user_id_idx" ON "contacts" ("user_id", "del");
|
||||
|
||||
CREATE SEQUENCE "contacts_seq"
|
||||
START WITH 1 INCREMENT BY 1 NOMAXVALUE;
|
||||
|
||||
CREATE TRIGGER "contacts_seq_trig"
|
||||
BEFORE INSERT ON "contacts" FOR EACH ROW
|
||||
BEGIN
|
||||
:NEW."contact_id" := "contacts_seq".nextval;
|
||||
END;
|
||||
/
|
||||
|
||||
CREATE TABLE "contactgroups" (
|
||||
"contactgroup_id" integer PRIMARY KEY,
|
||||
"user_id" integer NOT NULL
|
||||
REFERENCES "users" ("user_id") ON DELETE CASCADE,
|
||||
"changed" timestamp with time zone DEFAULT current_timestamp NOT NULL,
|
||||
"del" smallint DEFAULT 0 NOT NULL,
|
||||
"name" varchar(128) NOT NULL
|
||||
);
|
||||
|
||||
CREATE INDEX "contactgroups_user_id_idx" ON "contactgroups" ("user_id", "del");
|
||||
|
||||
CREATE SEQUENCE "contactgroups_seq"
|
||||
START WITH 1 INCREMENT BY 1 NOMAXVALUE;
|
||||
|
||||
CREATE TRIGGER "contactgroups_seq_trig"
|
||||
BEFORE INSERT ON "contactgroups" FOR EACH ROW
|
||||
BEGIN
|
||||
:NEW."contactgroup_id" := "contactgroups_seq".nextval;
|
||||
END;
|
||||
/
|
||||
|
||||
CREATE TABLE "contactgroupmembers" (
|
||||
"contactgroup_id" integer NOT NULL
|
||||
REFERENCES "contactgroups" ("contactgroup_id") ON DELETE CASCADE,
|
||||
"contact_id" integer NOT NULL
|
||||
REFERENCES "contacts" ("contact_id") ON DELETE CASCADE,
|
||||
"created" timestamp with time zone DEFAULT current_timestamp NOT NULL,
|
||||
PRIMARY KEY ("contactgroup_id", "contact_id")
|
||||
);
|
||||
|
||||
CREATE INDEX "contactgroupmembers_idx" ON "contactgroupmembers" ("contact_id");
|
||||
|
||||
|
||||
CREATE TABLE "cache" (
|
||||
"user_id" integer NOT NULL
|
||||
REFERENCES "users" ("user_id") ON DELETE CASCADE,
|
||||
"cache_key" varchar(128) NOT NULL,
|
||||
"expires" timestamp with time zone DEFAULT NULL,
|
||||
"data" long NOT NULL,
|
||||
PRIMARY KEY ("user_id", "cache_key")
|
||||
);
|
||||
|
||||
CREATE INDEX "cache_expires_idx" ON "cache" ("expires");
|
||||
|
||||
|
||||
CREATE TABLE "cache_shared" (
|
||||
"cache_key" varchar(255) NOT NULL,
|
||||
"expires" timestamp with time zone DEFAULT NULL,
|
||||
"data" long NOT NULL,
|
||||
PRIMARY KEY ("cache_key")
|
||||
);
|
||||
|
||||
CREATE INDEX "cache_shared_expires_idx" ON "cache_shared" ("expires");
|
||||
|
||||
|
||||
CREATE TABLE "cache_index" (
|
||||
"user_id" integer NOT NULL
|
||||
REFERENCES "users" ("user_id") ON DELETE CASCADE,
|
||||
"mailbox" varchar(255) NOT NULL,
|
||||
"expires" timestamp with time zone DEFAULT NULL,
|
||||
"valid" smallint DEFAULT 0 NOT NULL,
|
||||
"data" long NOT NULL,
|
||||
PRIMARY KEY ("user_id", "mailbox")
|
||||
);
|
||||
|
||||
CREATE INDEX "cache_index_expires_idx" ON "cache_index" ("expires");
|
||||
|
||||
|
||||
CREATE TABLE "cache_thread" (
|
||||
"user_id" integer NOT NULL
|
||||
REFERENCES "users" ("user_id") ON DELETE CASCADE,
|
||||
"mailbox" varchar(255) NOT NULL,
|
||||
"expires" timestamp with time zone DEFAULT NULL,
|
||||
"data" long NOT NULL,
|
||||
PRIMARY KEY ("user_id", "mailbox")
|
||||
);
|
||||
|
||||
CREATE INDEX "cache_thread_expires_idx" ON "cache_thread" ("expires");
|
||||
|
||||
|
||||
CREATE TABLE "cache_messages" (
|
||||
"user_id" integer NOT NULL
|
||||
REFERENCES "users" ("user_id") ON DELETE CASCADE,
|
||||
"mailbox" varchar(255) NOT NULL,
|
||||
"uid" integer NOT NULL,
|
||||
"expires" timestamp with time zone DEFAULT NULL,
|
||||
"data" long NOT NULL,
|
||||
"flags" integer DEFAULT 0 NOT NULL,
|
||||
PRIMARY KEY ("user_id", "mailbox", "uid")
|
||||
);
|
||||
|
||||
CREATE INDEX "cache_messages_expires_idx" ON "cache_messages" ("expires");
|
||||
|
||||
|
||||
CREATE TABLE "dictionary" (
|
||||
"user_id" integer DEFAULT NULL
|
||||
REFERENCES "users" ("user_id") ON DELETE CASCADE,
|
||||
"language" varchar(16) NOT NULL,
|
||||
"data" long DEFAULT NULL,
|
||||
CONSTRAINT "dictionary_user_id_lang_key" UNIQUE ("user_id", "language")
|
||||
);
|
||||
|
||||
|
||||
CREATE TABLE "searches" (
|
||||
"search_id" integer PRIMARY KEY,
|
||||
"user_id" integer NOT NULL
|
||||
REFERENCES "users" ("user_id") ON DELETE CASCADE,
|
||||
"type" smallint DEFAULT 0 NOT NULL,
|
||||
"name" varchar(128) NOT NULL,
|
||||
"data" long NOT NULL,
|
||||
CONSTRAINT "searches_user_id_key" UNIQUE ("user_id", "type", "name")
|
||||
);
|
||||
|
||||
CREATE SEQUENCE "searches_seq"
|
||||
START WITH 1 INCREMENT BY 1 NOMAXVALUE;
|
||||
|
||||
CREATE TRIGGER "searches_seq_trig"
|
||||
BEFORE INSERT ON "searches" FOR EACH ROW
|
||||
BEGIN
|
||||
:NEW."search_id" := "searches_seq".nextval;
|
||||
END;
|
||||
/
|
||||
|
||||
CREATE TABLE "filestore" (
|
||||
"file_id" integer PRIMARY KEY,
|
||||
"user_id" integer NOT NULL
|
||||
REFERENCES "users" ("user_id") ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
"context" varchar(32) NOT NULL,
|
||||
"filename" varchar(128) NOT NULL,
|
||||
"mtime" integer NOT NULL,
|
||||
"data" long,
|
||||
CONSTRAINT "filestore_user_id_key" UNIQUE ("user_id", "context", "filename")
|
||||
);
|
||||
|
||||
CREATE SEQUENCE "filestore_seq"
|
||||
START WITH 1 INCREMENT BY 1 NOMAXVALUE;
|
||||
|
||||
CREATE TRIGGER "filestore_seq_trig"
|
||||
BEFORE INSERT ON "filestore" FOR EACH ROW
|
||||
BEGIN
|
||||
:NEW."user_id" := "filestore_seq".nextval;
|
||||
END;
|
||||
/
|
||||
|
||||
CREATE TABLE "system" (
|
||||
"name" varchar(64) NOT NULL PRIMARY KEY,
|
||||
"value" long
|
||||
);
|
||||
|
||||
INSERT INTO "system" ("name", "value") VALUES ('roundcube-version', '2020020101');
|
@ -1 +0,0 @@
|
||||
-- empty
|
@ -1,2 +0,0 @@
|
||||
ALTER TABLE "users" ADD "failed_login" timestamp with time zone DEFAULT NULL;
|
||||
ALTER TABLE "users" ADD "failed_login_counter" integer DEFAULT NULL;
|
@ -1 +0,0 @@
|
||||
ALTER TABLE "session" DROP COLUMN "created";
|
@ -1 +0,0 @@
|
||||
ALTER TABLE "session" MODIFY "ip" varchar(41) NOT NULL;
|
@ -1,23 +0,0 @@
|
||||
DROP TABLE "cache";
|
||||
DROP TABLE "cache_shared";
|
||||
|
||||
CREATE TABLE "cache" (
|
||||
"user_id" integer NOT NULL
|
||||
REFERENCES "users" ("user_id") ON DELETE CASCADE,
|
||||
"cache_key" varchar(128) NOT NULL,
|
||||
"expires" timestamp with time zone DEFAULT NULL,
|
||||
"data" long NOT NULL,
|
||||
PRIMARY KEY ("user_id", "cache_key")
|
||||
);
|
||||
|
||||
CREATE INDEX "cache_expires_idx" ON "cache" ("expires");
|
||||
|
||||
|
||||
CREATE TABLE "cache_shared" (
|
||||
"cache_key" varchar(255) NOT NULL,
|
||||
"expires" timestamp with time zone DEFAULT NULL,
|
||||
"data" long NOT NULL,
|
||||
PRIMARY KEY ("cache_key")
|
||||
);
|
||||
|
||||
CREATE INDEX "cache_shared_expires_idx" ON "cache_shared" ("expires");
|
@ -1,19 +0,0 @@
|
||||
CREATE TABLE "filestore" (
|
||||
"file_id" integer PRIMARY KEY,
|
||||
"user_id" integer NOT NULL
|
||||
REFERENCES "users" ("user_id") ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
"filename" varchar(128) NOT NULL,
|
||||
"mtime" integer NOT NULL,
|
||||
"data" long,
|
||||
CONSTRAINT "filestore_user_id_key" UNIQUE ("user_id", "filename")
|
||||
);
|
||||
|
||||
CREATE SEQUENCE "filestore_seq"
|
||||
START WITH 1 INCREMENT BY 1 NOMAXVALUE;
|
||||
|
||||
CREATE TRIGGER "filestore_seq_trig"
|
||||
BEFORE INSERT ON "filestore" FOR EACH ROW
|
||||
BEGIN
|
||||
:NEW."user_id" := "filestore_seq".nextval;
|
||||
END;
|
||||
/
|
@ -1,4 +0,0 @@
|
||||
ALTER TABLE "filestore" ADD COLUMN "context" varchar(32) NOT NULL;
|
||||
UPDATE "filestore" SET "context" = 'enigma';
|
||||
ALTER TABLE "filestore" DROP CONSTRAINT "filestore_user_id_key";
|
||||
ALTER TABLE "filestore" ADD CONSTRAINT "filestore_user_id_key" UNIQUE ("user_id", "context", "filename");
|
@ -1 +0,0 @@
|
||||
-- empty
|
@ -1,2 +0,0 @@
|
||||
ALTER TABLE "users" MODIFY "language" varchar(16) NOT NULL;
|
||||
ALTER TABLE "dictionary" MODIFY "language" varchar(16);
|
@ -1 +0,0 @@
|
||||
-- empty
|
@ -1,14 +0,0 @@
|
||||
ALTER SEQUENCE user_ids RENAME TO users_seq;
|
||||
ALTER TABLE users ALTER COLUMN user_id SET DEFAULT nextval('users_seq'::text);
|
||||
|
||||
ALTER SEQUENCE identity_ids RENAME TO identities_seq;
|
||||
ALTER TABLE identities ALTER COLUMN identity_id SET DEFAULT nextval('identities_seq'::text);
|
||||
|
||||
ALTER SEQUENCE contact_ids RENAME TO contacts_seq;
|
||||
ALTER TABLE contacts ALTER COLUMN contact_id SET DEFAULT nextval('contacts_seq'::text);
|
||||
|
||||
ALTER SEQUENCE contactgroups_ids RENAME TO contactgroups_seq;
|
||||
ALTER TABLE contactgroups ALTER COLUMN contactgroup_id SET DEFAULT nextval('contactgroups_seq'::text);
|
||||
|
||||
ALTER SEQUENCE search_ids RENAME TO searches_seq;
|
||||
ALTER TABLE searches ALTER COLUMN search_id SET DEFAULT nextval('searches_seq'::text);
|
@ -1,8 +0,0 @@
|
||||
CREATE TABLE "cache_shared" (
|
||||
cache_key varchar(255) NOT NULL,
|
||||
created timestamp with time zone DEFAULT now() NOT NULL,
|
||||
data text NOT NULL
|
||||
);
|
||||
|
||||
CREATE INDEX cache_shared_cache_key_idx ON "cache_shared" (cache_key);
|
||||
CREATE INDEX cache_shared_created_idx ON "cache_shared" (created);
|
@ -1,24 +0,0 @@
|
||||
ALTER TABLE "cache" ADD expires timestamp with time zone DEFAULT NULL;
|
||||
ALTER TABLE "cache_shared" ADD expires timestamp with time zone DEFAULT NULL;
|
||||
ALTER TABLE "cache_index" ADD expires timestamp with time zone DEFAULT NULL;
|
||||
ALTER TABLE "cache_thread" ADD expires timestamp with time zone DEFAULT NULL;
|
||||
ALTER TABLE "cache_messages" ADD expires timestamp with time zone DEFAULT NULL;
|
||||
|
||||
-- initialize expires column with created/changed date + 7days
|
||||
UPDATE "cache" SET expires = created + interval '604800 seconds';
|
||||
UPDATE "cache_shared" SET expires = created + interval '604800 seconds';
|
||||
UPDATE "cache_index" SET expires = changed + interval '604800 seconds';
|
||||
UPDATE "cache_thread" SET expires = changed + interval '604800 seconds';
|
||||
UPDATE "cache_messages" SET expires = changed + interval '604800 seconds';
|
||||
|
||||
DROP INDEX cache_created_idx;
|
||||
DROP INDEX cache_shared_created_idx;
|
||||
ALTER TABLE "cache_index" DROP "changed";
|
||||
ALTER TABLE "cache_thread" DROP "changed";
|
||||
ALTER TABLE "cache_messages" DROP "changed";
|
||||
|
||||
CREATE INDEX cache_expires_idx ON "cache" (expires);
|
||||
CREATE INDEX cache_shared_expires_idx ON "cache_shared" (expires);
|
||||
CREATE INDEX cache_index_expires_idx ON "cache_index" (expires);
|
||||
CREATE INDEX cache_thread_expires_idx ON "cache_thread" (expires);
|
||||
CREATE INDEX cache_messages_expires_idx ON "cache_messages" (expires);
|
@ -1 +0,0 @@
|
||||
-- empty
|
@ -1 +0,0 @@
|
||||
-- empty
|
@ -1,2 +0,0 @@
|
||||
ALTER TABLE "users" ADD failed_login timestamp with time zone DEFAULT NULL;
|
||||
ALTER TABLE "users" ADD failed_login_counter integer DEFAULT NULL;
|
@ -1 +0,0 @@
|
||||
ALTER TABLE "session" DROP COLUMN created;
|
@ -1 +0,0 @@
|
||||
ALTER TABLE session ALTER COLUMN ip TYPE character varying(41);
|
@ -1,21 +0,0 @@
|
||||
DROP TABLE "cache";
|
||||
DROP TABLE "cache_shared";
|
||||
|
||||
CREATE TABLE "cache" (
|
||||
user_id integer NOT NULL
|
||||
REFERENCES users (user_id) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
cache_key varchar(128) DEFAULT '' NOT NULL,
|
||||
expires timestamp with time zone DEFAULT NULL,
|
||||
data text NOT NULL,
|
||||
PRIMARY KEY (user_id, cache_key)
|
||||
);
|
||||
|
||||
CREATE INDEX cache_expires_idx ON "cache" (expires);
|
||||
|
||||
CREATE TABLE "cache_shared" (
|
||||
cache_key varchar(255) NOT NULL PRIMARY KEY,
|
||||
expires timestamp with time zone DEFAULT NULL,
|
||||
data text NOT NULL
|
||||
);
|
||||
|
||||
CREATE INDEX cache_shared_expires_idx ON "cache_shared" (expires);
|
@ -1,15 +0,0 @@
|
||||
CREATE SEQUENCE "filestore_seq"
|
||||
INCREMENT BY 1
|
||||
NO MAXVALUE
|
||||
NO MINVALUE
|
||||
CACHE 1;
|
||||
|
||||
CREATE TABLE "filestore" (
|
||||
file_id integer DEFAULT nextval('filestore_seq'::text) PRIMARY KEY,
|
||||
user_id integer NOT NULL
|
||||
REFERENCES users (user_id) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
filename varchar(128) NOT NULL,
|
||||
mtime integer NOT NULL,
|
||||
data text NOT NULL,
|
||||
CONSTRAINT filestore_user_id_filename UNIQUE (user_id, filename)
|
||||
);
|
@ -1,4 +0,0 @@
|
||||
ALTER TABLE "filestore" ADD COLUMN context varchar(32) NOT NULL;
|
||||
UPDATE "filestore" SET context = 'enigma';
|
||||
ALTER TABLE "filestore" DROP CONSTRAINT "filestore_user_id_filename";
|
||||
ALTER TABLE "filestore" ADD CONSTRAINT "filestore_user_id_context_filename" UNIQUE (user_id, context, filename);
|
@ -1 +0,0 @@
|
||||
-- empty
|
@ -1,2 +0,0 @@
|
||||
ALTER TABLE "dictionary" ALTER COLUMN "language" TYPE varchar(16);
|
||||
ALTER TABLE "users" ALTER COLUMN "language" TYPE varchar(16);
|
@ -1 +0,0 @@
|
||||
-- empty
|
@ -1 +0,0 @@
|
||||
-- empty
|
@ -1,8 +0,0 @@
|
||||
CREATE TABLE cache_shared (
|
||||
cache_key varchar(255) NOT NULL,
|
||||
created datetime NOT NULL default '0000-00-00 00:00:00',
|
||||
data text NOT NULL
|
||||
);
|
||||
|
||||
CREATE INDEX ix_cache_shared_cache_key ON cache_shared(cache_key);
|
||||
CREATE INDEX ix_cache_shared_created ON cache_shared(created);
|
@ -1,48 +0,0 @@
|
||||
DROP TABLE cache_index;
|
||||
DROP TABLE cache_thread;
|
||||
DROP TABLE cache_messages;
|
||||
|
||||
ALTER TABLE cache ADD expires datetime DEFAULT NULL;
|
||||
DROP INDEX ix_cache_created;
|
||||
|
||||
ALTER TABLE cache_shared ADD expires datetime DEFAULT NULL;
|
||||
DROP INDEX ix_cache_shared_created;
|
||||
|
||||
UPDATE cache SET expires = datetime(created, '+604800 seconds');
|
||||
UPDATE cache_shared SET expires = datetime(created, '+604800 seconds');
|
||||
|
||||
CREATE INDEX ix_cache_expires ON cache(expires);
|
||||
CREATE INDEX ix_cache_shared_expires ON cache_shared(expires);
|
||||
|
||||
CREATE TABLE cache_index (
|
||||
user_id integer NOT NULL,
|
||||
mailbox varchar(255) NOT NULL,
|
||||
expires datetime DEFAULT NULL,
|
||||
valid smallint NOT NULL DEFAULT '0',
|
||||
data text NOT NULL,
|
||||
PRIMARY KEY (user_id, mailbox)
|
||||
);
|
||||
|
||||
CREATE INDEX ix_cache_index_expires ON cache_index (expires);
|
||||
|
||||
CREATE TABLE cache_thread (
|
||||
user_id integer NOT NULL,
|
||||
mailbox varchar(255) NOT NULL,
|
||||
expires datetime DEFAULT NULL,
|
||||
data text NOT NULL,
|
||||
PRIMARY KEY (user_id, mailbox)
|
||||
);
|
||||
|
||||
CREATE INDEX ix_cache_thread_expires ON cache_thread (expires);
|
||||
|
||||
CREATE TABLE cache_messages (
|
||||
user_id integer NOT NULL,
|
||||
mailbox varchar(255) NOT NULL,
|
||||
uid integer NOT NULL,
|
||||
expires datetime DEFAULT NULL,
|
||||
data text NOT NULL,
|
||||
flags integer NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (user_id, mailbox, uid)
|
||||
);
|
||||
|
||||
CREATE INDEX ix_cache_messages_expires ON cache_messages (expires);
|
@ -1 +0,0 @@
|
||||
-- empty
|
@ -1 +0,0 @@
|
||||
-- empty
|
@ -1,35 +0,0 @@
|
||||
CREATE TABLE tmp_users (
|
||||
user_id integer NOT NULL PRIMARY KEY,
|
||||
username varchar(128) NOT NULL default '',
|
||||
mail_host varchar(128) NOT NULL default '',
|
||||
created datetime NOT NULL default '0000-00-00 00:00:00',
|
||||
last_login datetime DEFAULT NULL,
|
||||
failed_login datetime DEFAULT NULL,
|
||||
failed_login_counter integer DEFAULT NULL,
|
||||
language varchar(5),
|
||||
preferences text NOT NULL default ''
|
||||
);
|
||||
|
||||
INSERT INTO tmp_users (user_id, username, mail_host, created, last_login, language, preferences)
|
||||
SELECT user_id, username, mail_host, created, last_login, language, preferences FROM users;
|
||||
|
||||
DROP TABLE users;
|
||||
|
||||
CREATE TABLE users (
|
||||
user_id integer NOT NULL PRIMARY KEY,
|
||||
username varchar(128) NOT NULL default '',
|
||||
mail_host varchar(128) NOT NULL default '',
|
||||
created datetime NOT NULL default '0000-00-00 00:00:00',
|
||||
last_login datetime DEFAULT NULL,
|
||||
failed_login datetime DEFAULT NULL,
|
||||
failed_login_counter integer DEFAULT NULL,
|
||||
language varchar(5),
|
||||
preferences text NOT NULL default ''
|
||||
);
|
||||
|
||||
INSERT INTO users (user_id, username, mail_host, created, last_login, language, preferences)
|
||||
SELECT user_id, username, mail_host, created, last_login, language, preferences FROM tmp_users;
|
||||
|
||||
CREATE UNIQUE INDEX ix_users_username ON users(username, mail_host);
|
||||
|
||||
DROP TABLE tmp_users;
|
@ -1,9 +0,0 @@
|
||||
DROP TABLE session;
|
||||
CREATE TABLE session (
|
||||
sess_id varchar(128) NOT NULL PRIMARY KEY,
|
||||
changed datetime NOT NULL default '0000-00-00 00:00:00',
|
||||
ip varchar(40) NOT NULL default '',
|
||||
vars text NOT NULL
|
||||
);
|
||||
|
||||
CREATE INDEX ix_session_changed ON session (changed);
|
@ -1,21 +0,0 @@
|
||||
DROP TABLE cache;
|
||||
DROP TABLE cache_shared;
|
||||
|
||||
CREATE TABLE cache (
|
||||
user_id integer NOT NULL default 0,
|
||||
cache_key varchar(128) NOT NULL default '',
|
||||
expires datetime DEFAULT NULL,
|
||||
data text NOT NULL,
|
||||
PRIMARY KEY (user_id, cache_key)
|
||||
);
|
||||
|
||||
CREATE INDEX ix_cache_expires ON cache(expires);
|
||||
|
||||
CREATE TABLE cache_shared (
|
||||
cache_key varchar(255) NOT NULL,
|
||||
expires datetime DEFAULT NULL,
|
||||
data text NOT NULL,
|
||||
PRIMARY KEY (cache_key)
|
||||
);
|
||||
|
||||
CREATE INDEX ix_cache_shared_expires ON cache_shared(expires);
|
@ -1,9 +0,0 @@
|
||||
CREATE TABLE filestore (
|
||||
file_id integer PRIMARY KEY,
|
||||
user_id integer NOT NULL,
|
||||
filename varchar(128) NOT NULL,
|
||||
mtime integer NOT NULL,
|
||||
data text NOT NULL
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX ix_filestore_user_id ON filestore(user_id, filename);
|
@ -1,29 +0,0 @@
|
||||
CREATE TABLE tmp_filestore (
|
||||
file_id integer PRIMARY KEY,
|
||||
user_id integer NOT NULL,
|
||||
filename varchar(128) NOT NULL,
|
||||
mtime integer NOT NULL,
|
||||
data text NOT NULL
|
||||
);
|
||||
|
||||
INSERT INTO tmp_filestore (file_id, user_id, filename, mtime, data)
|
||||
SELECT file_id, user_id, filename, mtime, data FROM filestore;
|
||||
|
||||
DROP TABLE filestore;
|
||||
|
||||
CREATE TABLE filestore (
|
||||
file_id integer NOT NULL PRIMARY KEY,
|
||||
user_id integer NOT NULL,
|
||||
context varchar(32) NOT NULL,
|
||||
filename varchar(128) NOT NULL,
|
||||
mtime integer NOT NULL,
|
||||
data text NOT NULL
|
||||
);
|
||||
|
||||
INSERT INTO filestore (file_id, user_id, filename, mtime, data, context)
|
||||
SELECT file_id, user_id, filename, mtime, data, 'enigma' FROM tmp_filestore;
|
||||
|
||||
CREATE UNIQUE INDEX ix_filestore_user_id ON filestore(user_id, context, filename);
|
||||
|
||||
DROP TABLE tmp_filestore;
|
||||
|
@ -1 +0,0 @@
|
||||
-- empty
|
@ -1,57 +0,0 @@
|
||||
CREATE TABLE tmp_users (
|
||||
user_id integer NOT NULL PRIMARY KEY,
|
||||
username varchar(128) NOT NULL default '',
|
||||
mail_host varchar(128) NOT NULL default '',
|
||||
created datetime NOT NULL default '0000-00-00 00:00:00',
|
||||
last_login datetime DEFAULT NULL,
|
||||
failed_login datetime DEFAULT NULL,
|
||||
failed_login_counter integer DEFAULT NULL,
|
||||
language varchar(16),
|
||||
preferences text NOT NULL default ''
|
||||
);
|
||||
|
||||
INSERT INTO tmp_users (user_id, username, mail_host, created, last_login, failed_login, failed_login_counter, language, preferences)
|
||||
SELECT user_id, username, mail_host, created, last_login, failed_login, failed_login_counter, language, preferences FROM users;
|
||||
|
||||
DROP TABLE users;
|
||||
|
||||
CREATE TABLE users (
|
||||
user_id integer NOT NULL PRIMARY KEY,
|
||||
username varchar(128) NOT NULL default '',
|
||||
mail_host varchar(128) NOT NULL default '',
|
||||
created datetime NOT NULL default '0000-00-00 00:00:00',
|
||||
last_login datetime DEFAULT NULL,
|
||||
failed_login datetime DEFAULT NULL,
|
||||
failed_login_counter integer DEFAULT NULL,
|
||||
language varchar(16),
|
||||
preferences text NOT NULL default ''
|
||||
);
|
||||
|
||||
INSERT INTO users (user_id, username, mail_host, created, last_login, failed_login, failed_login_counter, language, preferences)
|
||||
SELECT user_id, username, mail_host, created, last_login, failed_login, failed_login_counter, language, preferences FROM tmp_users;
|
||||
|
||||
CREATE UNIQUE INDEX ix_users_username ON users(username, mail_host);
|
||||
|
||||
DROP TABLE tmp_users;
|
||||
|
||||
DROP TABLE users;
|
||||
|
||||
CREATE TABLE tmp_dictionary (
|
||||
user_id integer DEFAULT NULL,
|
||||
language varchar(16) NOT NULL,
|
||||
data text NOT NULL
|
||||
);
|
||||
|
||||
INSERT INTO tmp_dictionary (user_id, language, data) SELECT user_id, language, data FROM dictionary;
|
||||
|
||||
CREATE TABLE dictionary (
|
||||
user_id integer DEFAULT NULL,
|
||||
language varchar(16) NOT NULL,
|
||||
data text NOT NULL
|
||||
);
|
||||
|
||||
INSERT INTO dictionary (user_id, language, data) SELECT user_id, language, data FROM tmp_dictionary;
|
||||
|
||||
CREATE UNIQUE INDEX ix_dictionary_user_language ON dictionary (user_id, language);
|
||||
|
||||
DROP TABLE tmp_dictionary;
|
@ -1 +0,0 @@
|
||||
-- empty
|
@ -1,62 +0,0 @@
|
||||
#!/bin/sh
|
||||
PWD=`dirname "$0"`
|
||||
JAR_DIR='/tmp'
|
||||
VERSION='2.4.8'
|
||||
COMPILER_URL="https://github.com/yui/yuicompressor/releases/download/v${VERSION}/yuicompressor-${VERSION}.zip"
|
||||
|
||||
do_shrink() {
|
||||
rm -f "$2"
|
||||
java -jar $JAR_DIR/yuicompressor.jar -v -o "$2" "$1"
|
||||
}
|
||||
|
||||
if [ ! -w "$JAR_DIR" ]; then
|
||||
JAR_DIR=$PWD
|
||||
fi
|
||||
|
||||
if java -version >/dev/null 2>&1; then
|
||||
:
|
||||
else
|
||||
echo "Java not found. Please ensure that the 'java' program is in your PATH."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -r "$JAR_DIR/yuicompressor.jar" ]; then
|
||||
if which wget >/dev/null 2>&1 && which unzip >/dev/null 2>&1; then
|
||||
wget "$COMPILER_URL" -O "/tmp/$$.zip"
|
||||
elif which curl >/dev/null 2>&1 && which unzip >/dev/null 2>&1; then
|
||||
curl -L "$COMPILER_URL" -o "/tmp/$$.zip"
|
||||
else
|
||||
echo "Please download $COMPILER_URL and extract compiler.jar to $JAR_DIR/."
|
||||
exit 1
|
||||
fi
|
||||
(cd $JAR_DIR && unzip "/tmp/$$.zip" && mv "yuicompressor-${VERSION}.jar" "yuicompressor.jar")
|
||||
rm -f "/tmp/$$.zip"
|
||||
fi
|
||||
|
||||
# compress single file from argument
|
||||
if [ $# -gt 0 ]; then
|
||||
CSS_FILE="$1"
|
||||
|
||||
echo "Shrinking $CSS_FILE"
|
||||
minfile=`echo $CSS_FILE | sed -e 's/\.css$/\.min\.css/'`
|
||||
do_shrink "$CSS_FILE" "$minfile"
|
||||
exit
|
||||
fi
|
||||
|
||||
DIRS="$PWD/../skins/* $PWD/../plugins/* $PWD/../plugins/*/skins/*"
|
||||
# default: compress application scripts
|
||||
for dir in $DIRS; do
|
||||
for file in $dir/*.css; do
|
||||
echo "$file" | grep -e '.min.css$' >/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
continue
|
||||
fi
|
||||
if [ ! -f "$file" ]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
echo "Shrinking $file"
|
||||
minfile=`echo $file | sed -e 's/\.css$/\.min\.css/'`
|
||||
do_shrink "$file" "$minfile"
|
||||
done
|
||||
done
|
@ -1,144 +0,0 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
/*
|
||||
+-----------------------------------------------------------------------+
|
||||
| This file is part of the Roundcube Webmail client |
|
||||
| |
|
||||
| Copyright (C) The Roundcube Dev Team |
|
||||
| |
|
||||
| Licensed under the GNU General Public License version 3 or |
|
||||
| any later version with exceptions for skins & plugins. |
|
||||
| See the README file for a full license statement. |
|
||||
| |
|
||||
| PURPOSE: |
|
||||
| Utility script to remove all data related to a certain user |
|
||||
| from the local database. |
|
||||
+-----------------------------------------------------------------------+
|
||||
| Author: Thomas Bruederli <thomas@roundcube.net> |
|
||||
+-----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
define('INSTALL_PATH', realpath(__DIR__ . '/..') . '/' );
|
||||
|
||||
require_once INSTALL_PATH . 'program/include/clisetup.php';
|
||||
|
||||
function print_usage()
|
||||
{
|
||||
print "Usage: deluser.sh [--host=HOST][--age=DAYS][--dry-run] [username]\n";
|
||||
print "--host=HOST The IMAP hostname or IP the given user is related to\n";
|
||||
print "--age=DAYS Delete all users who have not logged in for more than X days\n";
|
||||
print "--dry-run List users but do not delete them (for use with --age)\n";
|
||||
}
|
||||
|
||||
function _die($msg, $usage=false)
|
||||
{
|
||||
fwrite(STDERR, $msg . "\n");
|
||||
if ($usage) print_usage();
|
||||
exit(1);
|
||||
}
|
||||
|
||||
$rcmail = rcube::get_instance();
|
||||
|
||||
// get arguments
|
||||
$args = rcube_utils::get_opt(array('h' => 'host', 'a' => 'age', 'd' => 'dry-run:bool'));
|
||||
|
||||
if (!empty($args['age']) && ($age = intval($args['age']))) {
|
||||
$db = $rcmail->get_dbh();
|
||||
$db->db_connect('r');
|
||||
|
||||
$query = $db->query("SELECT `username`, `mail_host` FROM " . $db->table_name('users', true)
|
||||
. " WHERE `last_login` < " . $db->now($age * -1 * 86400)
|
||||
. ($args['host'] ? " AND `mail_host` = " . $db->quote($args['host']) : '')
|
||||
);
|
||||
|
||||
while ($user = $db->fetch_assoc($query)) {
|
||||
if (!empty($args['dry-run'])) {
|
||||
printf("%s (%s)\n", $user['username'], $user['mail_host']);
|
||||
continue;
|
||||
}
|
||||
system(sprintf("php %s/deluser.sh --host=%s %s", INSTALL_PATH . 'bin', $user['mail_host'], $user['username']));
|
||||
}
|
||||
exit(1);
|
||||
}
|
||||
|
||||
$username = trim($args[0]);
|
||||
if (empty($username)) {
|
||||
_die("Missing required parameters", true);
|
||||
}
|
||||
|
||||
if (empty($args['host'])) {
|
||||
$hosts = $rcmail->config->get('default_host', '');
|
||||
if (is_string($hosts)) {
|
||||
$args['host'] = $hosts;
|
||||
}
|
||||
else if (is_array($hosts) && count($hosts) == 1) {
|
||||
$args['host'] = reset($hosts);
|
||||
}
|
||||
else {
|
||||
_die("Specify a host name", true);
|
||||
}
|
||||
|
||||
// host can be a URL like tls://192.168.12.44
|
||||
$host_url = parse_url($args['host']);
|
||||
if ($host_url['host']) {
|
||||
$args['host'] = $host_url['host'];
|
||||
}
|
||||
}
|
||||
|
||||
// connect to DB
|
||||
$db = $rcmail->get_dbh();
|
||||
$db->db_connect('w');
|
||||
$transaction = false;
|
||||
|
||||
if (!$db->is_connected() || $db->is_error()) {
|
||||
_die("No DB connection\n" . $db->is_error());
|
||||
}
|
||||
|
||||
// find user in local database
|
||||
$user = rcube_user::query($username, $args['host']);
|
||||
|
||||
if (!$user) {
|
||||
die("User not found.\n");
|
||||
}
|
||||
|
||||
// inform plugins about approaching user deletion
|
||||
$plugin = $rcmail->plugins->exec_hook('user_delete_prepare', array('user' => $user, 'username' => $username, 'host' => $args['host']));
|
||||
|
||||
// let plugins cleanup their own user-related data
|
||||
if (!$plugin['abort']) {
|
||||
$transaction = $db->startTransaction();
|
||||
$plugin = $rcmail->plugins->exec_hook('user_delete', $plugin);
|
||||
}
|
||||
|
||||
if ($plugin['abort']) {
|
||||
if ($transaction) {
|
||||
$db->rollbackTransaction();
|
||||
}
|
||||
_die("User deletion aborted by plugin");
|
||||
}
|
||||
|
||||
// deleting the user record should be sufficient due to ON DELETE CASCADE foreign key references
|
||||
// but not all database backends actually support this so let's do it by hand
|
||||
foreach (array('identities','contacts','contactgroups','dictionary','cache','cache_index','cache_messages','cache_thread','searches','users') as $table) {
|
||||
$db->query('DELETE FROM ' . $db->table_name($table, true) . ' WHERE `user_id` = ?', $user->ID);
|
||||
}
|
||||
|
||||
if ($db->is_error()) {
|
||||
$rcmail->plugins->exec_hook('user_delete_rollback', $plugin);
|
||||
_die("DB error occurred: " . $db->is_error());
|
||||
}
|
||||
else {
|
||||
// inform plugins about executed user deletion
|
||||
$plugin = $rcmail->plugins->exec_hook('user_delete_commit', $plugin);
|
||||
|
||||
if ($plugin['abort']) {
|
||||
unset($plugin['abort']);
|
||||
$db->rollbackTransaction();
|
||||
$rcmail->plugins->exec_hook('user_delete_rollback', $plugin);
|
||||
}
|
||||
else {
|
||||
$db->endTransaction();
|
||||
echo "Successfully deleted user $user->ID\n";
|
||||
}
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
/*
|
||||
+-----------------------------------------------------------------------+
|
||||
| This file is part of the Roundcube Webmail client |
|
||||
| |
|
||||
| Copyright (C) The Roundcube Dev Team |
|
||||
| |
|
||||
| Licensed under the GNU General Public License version 3 or |
|
||||
| any later version with exceptions for skins & plugins. |
|
||||
| See the README file for a full license statement. |
|
||||
| |
|
||||
| PURPOSE: |
|
||||
| Trigger garbage collecting routines manually (e.g. via cronjob) |
|
||||
+-----------------------------------------------------------------------+
|
||||
| Author: Thomas Bruederli <roundcube@gmail.com> |
|
||||
+-----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
define('INSTALL_PATH', realpath(__DIR__ . '/..') . '/' );
|
||||
|
||||
require INSTALL_PATH.'program/include/clisetup.php';
|
||||
|
||||
$rcmail = rcube::get_instance();
|
||||
|
||||
$session_driver = $rcmail->config->get('session_storage', 'db');
|
||||
$session_lifetime = $rcmail->config->get('session_lifetime', 0) * 60 * 2;
|
||||
|
||||
// Clean expired SQL sessions
|
||||
if ($session_driver == 'db' && $session_lifetime) {
|
||||
$db = $rcmail->get_dbh();
|
||||
$db->query("DELETE FROM " . $db->table_name('session')
|
||||
. " WHERE changed < " . $db->now(-$session_lifetime));
|
||||
}
|
||||
|
||||
// Clean caches and temp directory
|
||||
$rcmail->gc();
|
@ -1,39 +0,0 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
/*
|
||||
+-----------------------------------------------------------------------+
|
||||
| This file is part of the Roundcube Webmail client |
|
||||
| |
|
||||
| Copyright (C) The Roundcube Dev Team |
|
||||
| Copyright (C) Kolab Systems AG |
|
||||
| |
|
||||
| Licensed under the GNU General Public License version 3 or |
|
||||
| any later version with exceptions for skins & plugins. |
|
||||
| See the README file for a full license statement. |
|
||||
| |
|
||||
| PURPOSE: |
|
||||
| Create database schema |
|
||||
+-----------------------------------------------------------------------+
|
||||
| Author: Aleksander Machniak <alec@alec.pl> |
|
||||
+-----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
define('INSTALL_PATH', realpath(__DIR__ . '/..') . '/' );
|
||||
|
||||
require_once INSTALL_PATH . 'program/include/clisetup.php';
|
||||
|
||||
// get arguments
|
||||
$opts = rcube_utils::get_opt(array(
|
||||
'd' => 'dir',
|
||||
));
|
||||
|
||||
if (empty($opts['dir'])) {
|
||||
rcube::raise_error("Database schema directory not specified (--dir).", false, true);
|
||||
}
|
||||
|
||||
// Check if directory exists
|
||||
if (!file_exists($opts['dir'])) {
|
||||
rcube::raise_error("Specified database schema directory doesn't exist.", false, true);
|
||||
}
|
||||
|
||||
rcmail_utils::db_init($opts['dir']);
|
@ -1,385 +0,0 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
/*
|
||||
+-----------------------------------------------------------------------+
|
||||
| This file is part of the Roundcube Webmail client |
|
||||
| |
|
||||
| Copyright (C) The Roundcube Dev Team |
|
||||
| |
|
||||
| Licensed under the GNU General Public License version 3 or |
|
||||
| any later version with exceptions for skins & plugins. |
|
||||
| See the README file for a full license statement. |
|
||||
| |
|
||||
| PURPOSE: |
|
||||
| Utility script to fetch and install all 3rd party javascript |
|
||||
| libraries used in Roundcube from source. |
|
||||
+-----------------------------------------------------------------------+
|
||||
| Author: Thomas Bruederli <thomas@roundcube.net> |
|
||||
+-----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
define('INSTALL_PATH', realpath(__DIR__ . '/..') . '/' );
|
||||
|
||||
require_once INSTALL_PATH . 'program/include/clisetup.php';
|
||||
|
||||
if (!function_exists('exec')) {
|
||||
rcube::raise_error("PHP exec() function is required. Check disable_functions in php.ini.", false, true);
|
||||
}
|
||||
|
||||
$cfgfile = INSTALL_PATH . 'jsdeps.json';
|
||||
$SOURCES = json_decode(file_get_contents($cfgfile), true);
|
||||
|
||||
if (empty($SOURCES['dependencies'])) {
|
||||
rcube::raise_error("Failed to read dependencies list from $cfgfile", false, true);
|
||||
}
|
||||
|
||||
$CURL = trim(`which curl`);
|
||||
$WGET = trim(`which wget`);
|
||||
$UNZIP = trim(`which unzip`);
|
||||
|
||||
if (($CACHEDIR = getenv("CACHEDIR")) && is_writeable($CACHEDIR)) {
|
||||
// use $CACHEDIR
|
||||
}
|
||||
else if (is_writeable(INSTALL_PATH . 'temp/js_cache') || @mkdir(INSTALL_PATH . 'temp/js_cache', 0774, true)) {
|
||||
$CACHEDIR = INSTALL_PATH . 'temp/js_cache';
|
||||
}
|
||||
else {
|
||||
$CACHEDIR = sys_get_temp_dir();
|
||||
}
|
||||
|
||||
|
||||
//////////////// License definitions
|
||||
|
||||
$LICENSES = array();
|
||||
$LICENSES['MIT'] = <<<EOM
|
||||
* Licensed under the MIT licenses
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
EOM;
|
||||
|
||||
$LICENSES['GPLv3'] = <<<EOG
|
||||
* The JavaScript code in this page is free software: you can
|
||||
* redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License (GNU GPL) as published by the Free Software
|
||||
* Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version. The code is distributed WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU GPL for more details.
|
||||
*
|
||||
* As additional permission under GNU GPL version 3 section 7, you
|
||||
* may distribute non-source (e.g., minimized or compacted) forms of
|
||||
* that code without the copy of the GNU GPL normally required by
|
||||
* section 4, provided you include this license notice and a URL
|
||||
* through which recipients can access the Corresponding Source.
|
||||
|
||||
EOG;
|
||||
|
||||
$LICENSES['LGPL'] = <<<EOL
|
||||
* The JavaScript code in this page is free software: you can
|
||||
* redistribute it and/or modify it under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
|
||||
EOL;
|
||||
|
||||
|
||||
//////////////// Functions
|
||||
|
||||
/**
|
||||
* Fetch package file from source
|
||||
*/
|
||||
function fetch_from_source($package, $useCache = true, &$filetype = null)
|
||||
{
|
||||
global $CURL, $WGET;
|
||||
|
||||
$cache_file = extract_filetype($package, $filetype);
|
||||
|
||||
if (!is_readable($cache_file) || !$useCache) {
|
||||
if (empty($CURL) && empty($WGET)) {
|
||||
rcube::raise_error("Required 'wget' or 'curl' program not found.", false, true);
|
||||
}
|
||||
|
||||
$url = str_replace('$v', $package['version'], $package['url']);
|
||||
|
||||
echo "Fetching $url\n";
|
||||
|
||||
if ($CURL)
|
||||
exec(sprintf('%s -L -s %s -o %s', $CURL, escapeshellarg($url), $cache_file), $out, $retval);
|
||||
else
|
||||
exec(sprintf('%s -q %s -O %s', $WGET, escapeshellarg($url), $cache_file), $out, $retval);
|
||||
|
||||
// Try Github API as a fallback (#6248)
|
||||
if ($retval !== 0 && $package['api_url']) {
|
||||
$url = str_replace('$v', $package['version'], $package['api_url']);
|
||||
$header = 'Accept:application/vnd.github.v3.raw';
|
||||
|
||||
rcube::raise_error("Fetching failed. Using Github API on $url");
|
||||
|
||||
if ($CURL)
|
||||
exec(sprintf('%s -L -H %s -s %s -o %s', $CURL, escapeshellarg($header), escapeshellarg($url), $cache_file), $out, $retval);
|
||||
else
|
||||
exec(sprintf('%s --header %s -q %s -O %s', $WGET, escapeshellarg($header), escapeshellarg($url), $cache_file), $out, $retval);
|
||||
}
|
||||
|
||||
if ($retval !== 0) {
|
||||
rcube::raise_error("Failed to download source file from $url", false, true);
|
||||
}
|
||||
}
|
||||
|
||||
return $cache_file;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns package source file location and type
|
||||
*/
|
||||
function extract_filetype($package, &$filetype = null)
|
||||
{
|
||||
global $CACHEDIR;
|
||||
|
||||
$filetype = pathinfo($package['url'], PATHINFO_EXTENSION) ?: 'tmp';
|
||||
$cache_file = $CACHEDIR . '/' . $package['lib'] . '-' . $package['version'] . '.' . $filetype;
|
||||
|
||||
// Make sure it is a zip file
|
||||
if (file_exists($cache_file)) {
|
||||
$magic = file_get_contents($cache_file, false, null, 0, 4);
|
||||
if ($magic === "PK\003\004") {
|
||||
$filetype = 'zip';
|
||||
}
|
||||
}
|
||||
|
||||
return $cache_file;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a destination javascript file with copyright and license header
|
||||
*/
|
||||
function compose_destfile($package, $srcfile)
|
||||
{
|
||||
global $LICENSES;
|
||||
|
||||
$header = sprintf("/**\n * %s - v%s\n *\n", $package['name'], $package['version']);
|
||||
|
||||
if (!empty($package['source'])) {
|
||||
$header .= " * @source " . str_replace('$v', $package['version'], $package['source']) . "\n";
|
||||
$header .= " *\n";
|
||||
}
|
||||
|
||||
if (!empty($package['license']) && isset($LICENSES[$package['license']])) {
|
||||
$header .= " * @licstart The following is the entire license notice for the\n";
|
||||
$header .= " * JavaScript code in this file.\n";
|
||||
$header .= " *\n";
|
||||
if (!empty($package['copyright'])) {
|
||||
$header .= " * " . $package['copyright'] . "\n";
|
||||
$header .= " *\n";
|
||||
}
|
||||
|
||||
$header .= $LICENSES[$package['license']];
|
||||
$header .= " *\n";
|
||||
$header .= " * @licend The above is the entire license notice\n";
|
||||
$header .= " * for the JavaScript code in this file.\n";
|
||||
}
|
||||
|
||||
$header .= " */\n";
|
||||
|
||||
if (file_put_contents(INSTALL_PATH . $package['dest'], $header . file_get_contents($srcfile))) {
|
||||
echo "Wrote file " . INSTALL_PATH . $package['dest'] . "\n";
|
||||
}
|
||||
else {
|
||||
rcube::raise_error("Failed to write destination file " . INSTALL_PATH . $package['dest'], false, true);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Extract a Zip archive into the destination specified by the package config
|
||||
*/
|
||||
function extract_zipfile($package, $srcfile)
|
||||
{
|
||||
global $UNZIP, $CACHEDIR;
|
||||
|
||||
if (empty($UNZIP)) {
|
||||
rcube::raise_error("Required 'unzip' program not found.", false, true);
|
||||
}
|
||||
|
||||
$destdir = INSTALL_PATH . $package['dest'];
|
||||
if (!is_dir($destdir)) {
|
||||
mkdir($destdir, 0775, true);
|
||||
}
|
||||
|
||||
if (!is_writeable($destdir)) {
|
||||
rcube::raise_error("Cannot write to destination directory: $destdir", false, true);
|
||||
}
|
||||
|
||||
// pick files from zip archive
|
||||
if (!empty($package['pick'])) {
|
||||
foreach ($package['pick'] as $pattern) {
|
||||
echo "Extracting files $pattern into $destdir\n";
|
||||
exec(sprintf('%s -o %s %s -d %s', $UNZIP, escapeshellarg($srcfile), escapeshellarg($pattern), $destdir), $out, $retval);
|
||||
if ($retval !== 0) {
|
||||
rcube::raise_error("Failed to unpack $pattern; " . implode('; ' . $out));
|
||||
}
|
||||
}
|
||||
}
|
||||
// unzip the archive and map source to dest files/directories
|
||||
else if (!empty($package['map'])) {
|
||||
$extract = $CACHEDIR . '/' . $package['lib'] . '-extract';
|
||||
if (!is_dir($extract)) {
|
||||
mkdir($extract, 0774, true);
|
||||
}
|
||||
|
||||
$zip_command = '%s -' . ($package['flat'] ? 'j' : 'o') . ' %s -d %s';
|
||||
exec(sprintf($zip_command, $UNZIP, escapeshellarg($srcfile), $extract), $out, $retval);
|
||||
|
||||
// get the root folder of the extracted package
|
||||
$extract_tree = glob("$extract/*", GLOB_ONLYDIR);
|
||||
$sourcedir = count($extract_tree) ? $extract_tree[0] : $extract;
|
||||
|
||||
foreach ($package['map'] as $src => $dest) {
|
||||
echo "Installing $sourcedir/$src into $destdir/$dest\n";
|
||||
|
||||
$dest_file = $destdir . '/' . $dest;
|
||||
$src_file = $sourcedir . '/' . $src;
|
||||
|
||||
// make sure the destination's parent directory exists
|
||||
if (strpos($dest, '/') !== false) {
|
||||
$parentdir = dirname($dest_file);
|
||||
if (!is_dir($parentdir)) {
|
||||
mkdir($parentdir, 0775, true);
|
||||
}
|
||||
}
|
||||
|
||||
// avoid copying source directory as a child into destination
|
||||
if (is_dir($src_file) && is_dir($dest_file)) {
|
||||
exec(sprintf('rm -rf %s', $dest_file));
|
||||
}
|
||||
|
||||
exec(sprintf('mv -f %s %s', $src_file, $dest_file), $out, $retval);
|
||||
if ($retval !== 0) {
|
||||
rcube::raise_error("Failed to move $src into $dest_file; " . implode('; ' . $out));
|
||||
}
|
||||
// Remove sourceMappingURL
|
||||
else if (isset($package['sourcemap']) && $package['sourcemap'] === false) {
|
||||
if ($content = file($dest_file)) {
|
||||
$index = count($content);
|
||||
if (preg_match('|sourceMappingURL=|', $content[$index-1])) {
|
||||
array_pop($content);
|
||||
file_put_contents($dest_file, implode('', $content));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// remove temp extraction dir
|
||||
exec('rm -rf ' . $extract);
|
||||
}
|
||||
// extract the archive into the destination directory
|
||||
else {
|
||||
echo "Extracting zip archive into $destdir\n";
|
||||
exec(sprintf('%s -o %s -d %s', $UNZIP, escapeshellarg($srcfile), $destdir), $out, $retval);
|
||||
if ($retval !== 0) {
|
||||
rcube::raise_error("Failed to unzip $srcfile; " . implode('; ' . $out));
|
||||
}
|
||||
}
|
||||
|
||||
// remove some files from the destination
|
||||
if (!empty($package['omit'])) {
|
||||
foreach ((array)$package['omit'] as $glob) {
|
||||
exec(sprintf('rm -rf %s/%s', $destdir, escapeshellarg($glob)));
|
||||
}
|
||||
}
|
||||
|
||||
// prepend license header to extracted files
|
||||
if (!empty($package['addlicense'])) {
|
||||
foreach ((array)$package['addlicense'] as $filename) {
|
||||
$pkg = $package;
|
||||
$pkg['dest'] = $package['dest'] . '/' . $filename;
|
||||
compose_destfile($pkg, $destdir . '/' . $filename);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete the package destination file/dir
|
||||
*/
|
||||
function delete_destfile($package)
|
||||
{
|
||||
$destdir = INSTALL_PATH . ($package['rm'] ?: $package['dest']);
|
||||
|
||||
if (file_exists($destdir)) {
|
||||
if (PHP_OS === 'Windows') {
|
||||
exec(sprintf("rd /s /q %s", escapeshellarg($destdir)));
|
||||
}
|
||||
else {
|
||||
exec(sprintf("rm -rf %s", escapeshellarg($destdir)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//////////////// Execution
|
||||
|
||||
$args = rcube_utils::get_opt(array('f' => 'force:bool', 'd' => 'delete:bool', 'g' => 'get:bool', 'e' => 'extract:bool'))
|
||||
+ array('force' => false, 'delete' => false, 'get' => false, 'extract' => false);
|
||||
$WHAT = $args[0];
|
||||
$useCache = !$args['force'] && !$args['get'];
|
||||
|
||||
if (!$args['get'] && !$args['extract'] && !$args['delete']) {
|
||||
$args['get'] = $args['extract'] = 1;
|
||||
}
|
||||
|
||||
foreach ($SOURCES['dependencies'] as $package) {
|
||||
if (!isset($package['name'])) {
|
||||
$package['name'] = $package['lib'];
|
||||
}
|
||||
|
||||
if ($WHAT && $package['lib'] !== $WHAT) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($args['delete']) {
|
||||
delete_destfile($package);
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($args['get']) {
|
||||
$srcfile = fetch_from_source($package, $useCache, $filetype);
|
||||
}
|
||||
else {
|
||||
$srcfile = extract_filetype($package, $filetype);
|
||||
}
|
||||
|
||||
if (!empty($package['sha1']) && ($sum = sha1_file($srcfile)) !== $package['sha1']) {
|
||||
rcube::raise_error("Incorrect sha1 sum of $srcfile. Expected: {$package['sha1']}, got: $sum", false, true);
|
||||
}
|
||||
|
||||
if ($args['extract']) {
|
||||
echo "Installing {$package['name']}...\n";
|
||||
|
||||
if ($filetype === 'zip') {
|
||||
extract_zipfile($package, $srcfile);
|
||||
}
|
||||
else {
|
||||
compose_destfile($package, $srcfile);
|
||||
}
|
||||
|
||||
echo "Done.\n";
|
||||
}
|
||||
}
|
@ -1,75 +1,67 @@
|
||||
#!/bin/sh
|
||||
PWD=`dirname "$0"`
|
||||
JS_DIR="$PWD/../program/js"
|
||||
JS_DIR=`dirname "$0"`/../program/js
|
||||
JAR_DIR='/tmp'
|
||||
LANG_IN='ECMASCRIPT5'
|
||||
CLOSURE_COMPILER_URL='http://dl.google.com/closure-compiler/compiler-latest.zip'
|
||||
LANG_IN='ECMASCRIPT3'
|
||||
CLOSURE_COMPILER_URL='http://closure-compiler.googlecode.com/files/compiler-latest.zip'
|
||||
|
||||
do_shrink() {
|
||||
rm -f "$2"
|
||||
# copy the first comment block with license information for LibreJS
|
||||
grep -q '@lic' $1 && sed -n '/\/\*/,/\*\// { p; /\*\//q; }' $1 > $2
|
||||
java -jar $JAR_DIR/compiler.jar --compilation_level=SIMPLE_OPTIMIZATIONS --js="$1" --language_in="$3" >> $2
|
||||
rm -f "$2"
|
||||
java -jar $JAR_DIR/compiler.jar --compilation_level=SIMPLE_OPTIMIZATIONS --js="$1" --js_output_file="$2" --language_in="$3"
|
||||
}
|
||||
|
||||
if [ ! -d "$JS_DIR" ]; then
|
||||
echo "Directory $JS_DIR not found."
|
||||
exit 1
|
||||
echo "Directory $JS_DIR not found."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -w "$JAR_DIR" ]; then
|
||||
JAR_DIR=$PWD
|
||||
JAR_DIR=`dirname "$0"`
|
||||
fi
|
||||
|
||||
if java -version >/dev/null 2>&1; then
|
||||
:
|
||||
:
|
||||
else
|
||||
echo "Java not found. Please ensure that the 'java' program is in your PATH."
|
||||
exit 1
|
||||
echo "Java not found. Please ensure that the 'java' program is in your PATH."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -r "$JAR_DIR/compiler.jar" ]; then
|
||||
if which wget >/dev/null 2>&1 && which unzip >/dev/null 2>&1; then
|
||||
wget "$CLOSURE_COMPILER_URL" -O "/tmp/$$.zip"
|
||||
elif which curl >/dev/null 2>&1 && which unzip >/dev/null 2>&1; then
|
||||
curl "$CLOSURE_COMPILER_URL" -o "/tmp/$$.zip"
|
||||
else
|
||||
echo "Please download $CLOSURE_COMPILER_URL and extract compiler.jar to $JAR_DIR/."
|
||||
exit 1
|
||||
fi
|
||||
unzip -p "/tmp/$$.zip" "*.jar" > "$JAR_DIR/compiler.jar"
|
||||
rm -f "/tmp/$$.zip"
|
||||
if which wget >/dev/null 2>&1 && which unzip >/dev/null 2>&1; then
|
||||
wget "$CLOSURE_COMPILER_URL" -O "/tmp/$$.zip"
|
||||
elif which curl >/dev/null 2>&1 && which unzip >/dev/null 2>&1; then
|
||||
curl "$CLOSURE_COMPILER_URL" -o "/tmp/$$.zip"
|
||||
else
|
||||
echo "Please download $CLOSURE_COMPILER_URL and extract compiler.jar to $JAR_DIR/."
|
||||
exit 1
|
||||
fi
|
||||
(cd $JAR_DIR && unzip "/tmp/$$.zip" "compiler.jar")
|
||||
rm -f "/tmp/$$.zip"
|
||||
fi
|
||||
|
||||
# compress single file from argument
|
||||
if [ $# -gt 0 ]; then
|
||||
JS_DIR=`dirname "$1"`
|
||||
JS_FILE="$1"
|
||||
JS_DIR=`dirname "$1"`
|
||||
JS_FILE="$1"
|
||||
|
||||
if [ $# -gt 1 ]; then
|
||||
LANG_IN="$2"
|
||||
fi
|
||||
if [ $# -gt 1 ]; then
|
||||
LANG_IN="$2"
|
||||
fi
|
||||
|
||||
echo "Shrinking $JS_FILE"
|
||||
minfile=`echo $JS_FILE | sed -e 's/\.js$/\.min\.js/'`
|
||||
do_shrink "$JS_FILE" "$minfile" "$LANG_IN"
|
||||
exit
|
||||
if [ ! -r "${JS_FILE}.src" ]; then
|
||||
mv "$JS_FILE" "${JS_FILE}.src"
|
||||
fi
|
||||
echo "Shrinking $JS_FILE"
|
||||
do_shrink "${JS_FILE}.src" "$JS_FILE" "$LANG_IN"
|
||||
exit
|
||||
fi
|
||||
|
||||
DIRS="$PWD/../program/js $PWD/../skins/* $PWD/../plugins/* $PWD/../plugins/*/skins/* $PWD/../plugins/managesieve/codemirror/lib"
|
||||
# default: compress application scripts
|
||||
for dir in $DIRS; do
|
||||
for file in $dir/*.js; do
|
||||
echo "$file" | grep -e '.min.js$' >/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
continue
|
||||
fi
|
||||
if [ ! -f "$file" ]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
echo "Shrinking $file"
|
||||
minfile=`echo $file | sed -e 's/\.js$/\.min\.js/'`
|
||||
do_shrink "$file" "$minfile" "$LANG_IN"
|
||||
done
|
||||
for fn in app common googiespell list; do
|
||||
if [ -r "$JS_DIR/${fn}.js.src" ]; then
|
||||
echo "$JS_DIR/${fn}.js.src already exists, not overwriting"
|
||||
else
|
||||
mv "$JS_DIR/${fn}.js" "$JS_DIR/${fn}.js.src"
|
||||
fi
|
||||
echo "Shrinking $JS_DIR/${fn}.js"
|
||||
do_shrink "$JS_DIR/${fn}.js.src" "$JS_DIR/${fn}.js" "$LANG_IN"
|
||||
done
|
||||
|
@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
JS_DIR=`dirname "$0"`/../program/js
|
||||
|
||||
if [ ! -d "$JS_DIR" ]; then
|
||||
echo "Directory $JS_DIR not found."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
for fn in app common googiespell list; do
|
||||
if [ -r "$JS_DIR/${fn}.js.src" ]; then
|
||||
mv "$JS_DIR/${fn}.js.src" "$JS_DIR/${fn}.js"
|
||||
echo "Reverted $JS_DIR/${fn}.js"
|
||||
fi
|
||||
done
|
@ -1,23 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
TITLE="Roundcube Webmail"
|
||||
PACKAGES="Webmail"
|
||||
|
||||
INSTALL_PATH="`dirname $0`/.."
|
||||
PATH_PROJECT=$INSTALL_PATH/program/include
|
||||
PATH_FRAMEWORK=$INSTALL_PATH/program/lib/Roundcube
|
||||
PATH_DOCS=$INSTALL_PATH/doc/phpdoc
|
||||
BIN_PHPDOC="`/usr/bin/which phpdoc`"
|
||||
|
||||
if [ ! -x "$BIN_PHPDOC" ]
|
||||
then
|
||||
echo "phpdoc not found: $BIN_PHPDOC"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
OUTPUTFORMAT=HTML
|
||||
TEMPLATE=responsive-twig
|
||||
|
||||
# make documentation
|
||||
$BIN_PHPDOC -d $PATH_PROJECT,$PATH_FRAMEWORK -t $PATH_DOCS --title "$TITLE" \
|
||||
--defaultpackagename $PACKAGES --template=$TEMPLATE
|
@ -1,106 +0,0 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
/*
|
||||
+-----------------------------------------------------------------------+
|
||||
| This file is part of the Roundcube Webmail client |
|
||||
| |
|
||||
| Copyright (C) The Roundcube Dev Team |
|
||||
| |
|
||||
| Licensed under the GNU General Public License version 3 or |
|
||||
| any later version with exceptions for skins & plugins. |
|
||||
| See the README file for a full license statement. |
|
||||
| |
|
||||
| PURPOSE: |
|
||||
| Convert a plugin's package.xml file into a composer.json description |
|
||||
+-----------------------------------------------------------------------+
|
||||
| Author: Thomas Bruederli <thomas@roundcube.net> |
|
||||
+-----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
ini_set('error_reporting', E_ALL & ~E_NOTICE);
|
||||
|
||||
list(, $filename, $vendor) = $_SERVER['argv'];
|
||||
|
||||
if (!$filename || !is_readable($filename)) {
|
||||
die("Invalid input file name!\nUsage: " . $_SERVER['argv'][0] . " XMLFILE VENDOR\n");
|
||||
}
|
||||
|
||||
if (!$vendor) {
|
||||
$vendor = 'anonymous';
|
||||
}
|
||||
|
||||
$package = new SimpleXMLElement(file_get_contents($filename));
|
||||
|
||||
$data = array(
|
||||
'name' => $vendor . '/' . strval($package->name),
|
||||
'type' => 'roundcube-plugin',
|
||||
'description' => trim(strval($package->description), '- ') ? trim(strval($package->description)) : trim(strval($package->summary)),
|
||||
'homepage' => strval($package->uri),
|
||||
'license' => 'GPLv3+',
|
||||
'version' => strval($package->version->release),
|
||||
'authors' => array(),
|
||||
'repositories' => array(
|
||||
array('type' => 'composer', 'url' => 'https://plugins.roundcube.net'),
|
||||
),
|
||||
'require' => array(
|
||||
'php' => '>=5.3.0',
|
||||
'roundcube/plugin-installer' => '>=0.1.3',
|
||||
),
|
||||
);
|
||||
|
||||
if ($package->license) {
|
||||
$data['license'] = strval($package->license);
|
||||
}
|
||||
|
||||
if ($package->lead) {
|
||||
foreach ($package->lead as $lead) {
|
||||
if (strval($lead->active) == 'no') {
|
||||
continue;
|
||||
}
|
||||
$data['authors'][] = array(
|
||||
'name' => strval($lead->name),
|
||||
'email' => strval($lead->email),
|
||||
'role' => 'Lead',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if ($devs = $package->developer) {
|
||||
foreach ($package->developer as $dev) {
|
||||
$data['authors'][] = array(
|
||||
'name' => strval($dev->name),
|
||||
'email' => strval($dev->email),
|
||||
'role' => 'Developer',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if ($package->dependencies->required->extension) {
|
||||
foreach ($package->dependencies->required->extension as $ext) {
|
||||
$data['require']['ext-' . strval($ext->name)] = '*';
|
||||
}
|
||||
}
|
||||
|
||||
// remove empty values
|
||||
$data = array_filter($data);
|
||||
|
||||
// use the JSON encoder from the Composer package
|
||||
if (is_file('composer.phar')) {
|
||||
include 'phar://composer.phar/src/Composer/Json/JsonFile.php';
|
||||
echo \Composer\Json\JsonFile::encode($data);
|
||||
}
|
||||
// PHP 5.4's json_encode() does the job, too
|
||||
else if (defined('JSON_PRETTY_PRINT')) {
|
||||
$flags = defined('JSON_PRETTY_PRINT') ? JSON_PRETTY_PRINT & JSON_UNESCAPED_SLASHES : 0;
|
||||
echo json_encode($data, $flags);
|
||||
}
|
||||
else {
|
||||
fwrite(STDERR,
|
||||
"FAILED! composer.phar not found in current directory.
|
||||
|
||||
Please download it from http://getcomposer.org/download/ or with
|
||||
curl -s http://getcomposer.org/installer | php
|
||||
");
|
||||
}
|
||||
|
||||
echo "\n";
|
@ -1,44 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# In 'translator' mode files will contain empty translated texts
|
||||
# where translation is not available, we'll remove these later
|
||||
|
||||
# Note: there's a bug in txclib, so if the command below doesn't
|
||||
# work see https://github.com/transifex/transifex-client/commit/a80320735973dd608b48520bf3b89ad53e2b088b
|
||||
|
||||
tx --debug pull -a -f --mode translator
|
||||
|
||||
PWD=`dirname "$0"`
|
||||
|
||||
do_clean()
|
||||
{
|
||||
# do not cleanup en_US files
|
||||
echo "$1" | grep -v en_US > /dev/null || return
|
||||
|
||||
echo "Cleaning $1"
|
||||
|
||||
# remove untranslated/empty texts
|
||||
perl -pi -e "s/^\\\$(labels|messages)\[[^]]+\]\s+=\s+'';\n//" $1
|
||||
perl -pi -e "s/^\\\$(labels|messages)\[[^]]+\]\s+=\s+\"\";\n//" $1
|
||||
# remove variable initialization
|
||||
perl -pi -e "s/^\\\$(labels|messages)\s*=\s*array\(\);\n//" $1
|
||||
# remove (one-line) comments
|
||||
perl -pi -e "s/^\\/\\/.*//" $1
|
||||
# remove empty lines (but not in file header)
|
||||
perl -ne 'print if ($. < 18 || length($_) > 1)' $1 > $1.tmp
|
||||
mv $1.tmp $1
|
||||
}
|
||||
|
||||
# clean up translation files
|
||||
for file in $PWD/../program/localization/*/*.inc; do
|
||||
do_clean $file
|
||||
done
|
||||
for file in $PWD/../plugins/*/localization/*.inc; do
|
||||
do_clean $file
|
||||
done
|
||||
|
||||
# remove empty localization files
|
||||
for file in $PWD/../program/localization/*/labels.inc; do grep -q -E '\$labels' $file || rm $file; done
|
||||
for file in $PWD/../program/localization/*/timezones.inc; do grep -q -E '\$labels' $file || rm $file; done
|
||||
for file in $PWD/../program/localization/*/messages.inc; do grep -q -E '\$messages' $file || rm $file; done
|
||||
for file in $PWD/../plugins/*/localization/*.inc; do grep -q -E '\$(labels|messages)' $file || rm $file; done
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue