Merge branch 'pu/2013.10-icsimport'
authorPhilipp Schüle <p.schuele@metaways.de>
Thu, 11 Sep 2014 10:07:54 +0000 (12:07 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Thu, 11 Sep 2014 10:07:54 +0000 (12:07 +0200)
729 files changed:
bin/tn.php
docs/ext-doc.xml
scripts/packaging/Univention/debian/changelog
scripts/packaging/Univention/debian/etc/apache.conf
scripts/packaging/Univention/debian/patches/01_database_settings.diff [new file with mode: 0644]
scripts/packaging/Univention/debian/patches/02_setupuser_settings.diff [new file with mode: 0644]
scripts/packaging/Univention/debian/patches/03_caching_settings.diff [new file with mode: 0644]
scripts/packaging/Univention/debian/patches/04_logger_settings.diff [new file with mode: 0644]
scripts/packaging/Univention/debian/patches/05_path_settings.diff [new file with mode: 0644]
scripts/packaging/Univention/debian/patches/config.inc.php.dist.diff [deleted file]
scripts/packaging/Univention/debian/patches/series
scripts/packaging/Univention/debian/tine20-tinebase.install
scripts/packaging/build-tine20-packages.sh
scripts/packaging/debian/changelog
scripts/packaging/debian/etc/apache.conf
scripts/packaging/debian/patches/01_database_settings.diff [new file with mode: 0644]
scripts/packaging/debian/patches/02_setupuser_settings.diff [new file with mode: 0644]
scripts/packaging/debian/patches/03_caching_settings.diff [new file with mode: 0644]
scripts/packaging/debian/patches/04_logger_settings.diff [new file with mode: 0644]
scripts/packaging/debian/patches/05_path_settings.diff [new file with mode: 0644]
scripts/packaging/debian/patches/config.inc.php.dist.diff [deleted file]
scripts/packaging/debian/patches/series
scripts/packaging/debian/tine20-tinebase.install
scripts/packaging/fedora/SOURCES/tine20-httpd.conf
scripts/packaging/fedora/SPECS/tine20.spec
tests/tine20/ActiveSync/Controller/CalendarTests.php
tests/tine20/Addressbook/Export/definitions/adb_tagmatrix_ods.xml [new file with mode: 0644]
tests/tine20/Addressbook/Frontend/CardDAVTest.php
tests/tine20/Addressbook/JsonTest.php
tests/tine20/Admin/CliTest.php
tests/tine20/Admin/JsonTest.php
tests/tine20/Admin/files/import_groups.csv [new file with mode: 0644]
tests/tine20/Admin/files/import_groups_update.csv [new file with mode: 0644]
tests/tine20/AllTests.php
tests/tine20/Calendar/Backend/SqlTest.php
tests/tine20/Calendar/Controller/EventGrantsTests.php
tests/tine20/Calendar/Controller/EventNotificationsTests.php
tests/tine20/Calendar/Controller/EventTests.php
tests/tine20/Calendar/Controller/MSEventFacadeTest.php
tests/tine20/Calendar/Controller/RecurTest.php
tests/tine20/Calendar/Controller/ResourceTest.php
tests/tine20/Calendar/Export/ICalTest.php
tests/tine20/Calendar/Frontend/WebDAV/ContainerTest.php
tests/tine20/Calendar/Frontend/WebDAV/EventTest.php
tests/tine20/Calendar/Frontend/iMIPTest.php
tests/tine20/Calendar/Import/ICalTest.php
tests/tine20/Calendar/JsonTests.php
tests/tine20/Calendar/Model/AttenderFilterTests.php
tests/tine20/Calendar/TestCase.php
tests/tine20/Courses/JsonTest.php
tests/tine20/Crm/Acl/RolesTest.php [new file with mode: 0644]
tests/tine20/Crm/AllTests.php
tests/tine20/Crm/Export/CsvTest.php
tests/tine20/Crm/Export/XlsTest.php
tests/tine20/Crm/JsonTest.php
tests/tine20/ExampleApplication/AllTests.php [new file with mode: 0644]
tests/tine20/ExampleApplication/JsonTest.php [new file with mode: 0644]
tests/tine20/ExampleApplication/TestCase.php [new file with mode: 0644]
tests/tine20/Felamimail/Controller/AccountTest.php
tests/tine20/Felamimail/Frontend/JsonTest.php
tests/tine20/Felamimail/Frontend/WebDAVTest.php
tests/tine20/Filemanager/AllTests.php
tests/tine20/Filemanager/Controller/DownloadLinkTests.php [new file with mode: 0644]
tests/tine20/Filemanager/Frontend/JsonTests.php
tests/tine20/HumanResources/AllTests.php
tests/tine20/HumanResources/CliTests.php
tests/tine20/HumanResources/ControllerTests.php
tests/tine20/HumanResources/JsonTests.php
tests/tine20/HumanResources/ModelConfigurationTest.php [new file with mode: 0644]
tests/tine20/HumanResources/TestCase.php
tests/tine20/Inventory/Import/CsvTest.php
tests/tine20/Inventory/JsonTest.php
tests/tine20/Phone/JsonTest.php
tests/tine20/Projects/JsonTest.php
tests/tine20/Sales/AllTests.php
tests/tine20/Sales/Backend/ContractTest.php
tests/tine20/Sales/Backend/NumberTest.php
tests/tine20/Sales/ControllerTest.php
tests/tine20/Sales/CustomFieldTest.php [new file with mode: 0644]
tests/tine20/Sales/JsonTest.php
tests/tine20/Tasks/Convert/Task/VCalendar/EMClientTest.php
tests/tine20/TestCase.php
tests/tine20/Timetracker/AbstractTest.php
tests/tine20/Timetracker/ExportTest.php
tests/tine20/Timetracker/JsonTest.php
tests/tine20/Tinebase/Acl/RolesTest.php
tests/tine20/Tinebase/AllTests.php
tests/tine20/Tinebase/CustomFieldTest.php
tests/tine20/Tinebase/Frontend/Json/PersistentFilterTest.php
tests/tine20/Tinebase/Frontend/JsonTest.php
tests/tine20/Tinebase/MailTest.php [new file with mode: 0644]
tests/tine20/Tinebase/ModelConfigurationTest.php
tests/tine20/Tinebase/PersistentFilterTest.php [new file with mode: 0644]
tests/tine20/Tinebase/Pluggable/ConcreteTest.php [new file with mode: 0644]
tests/tine20/Tinebase/Pluggable/DummyBackend.php [new file with mode: 0644]
tests/tine20/Tinebase/Pluggable/DummyController.php [new file with mode: 0644]
tests/tine20/Tinebase/Pluggable/DummyFrontend.php [new file with mode: 0644]
tests/tine20/Tinebase/Pluggable/Plugin/DummyPlugin.php [new file with mode: 0644]
tests/tine20/Tinebase/PreferenceTest.php
tests/tine20/Tinebase/Relation/RelationTest.php
tests/tine20/Tinebase/TagsTest.php
tine20/ActiveSync/Setup/setup.xml
tine20/ActiveSync/translations/da.po
tine20/ActiveSync/translations/de.po
tine20/ActiveSync/translations/el_GR.po
tine20/ActiveSync/translations/en.po
tine20/ActiveSync/translations/es.po
tine20/ActiveSync/translations/fi.po
tine20/ActiveSync/translations/fr.po
tine20/ActiveSync/translations/it.po
tine20/ActiveSync/translations/ru.po
tine20/ActiveSync/translations/sq.po
tine20/ActiveSync/translations/sv_SE.po
tine20/ActiveSync/translations/template.pot
tine20/ActiveSync/translations/vi.po
tine20/ActiveSync/translations/zh_CN.po
tine20/Addressbook/Convert/Contact/Json.php
tine20/Addressbook/Export/Doc.php [new file with mode: 0644]
tine20/Addressbook/Export/definitions/adb_by_company_xls.xml [new file with mode: 0644]
tine20/Addressbook/Export/definitions/adb_default_doc.xml [new file with mode: 0644]
tine20/Addressbook/Export/templates/addressbook_contact_letter.docx [new file with mode: 0644]
tine20/Addressbook/Import/definitions/adb_tine_import_csv.xml
tine20/Addressbook/Model/Contact.php
tine20/Addressbook/Setup/Initialize.php
tine20/Addressbook/Setup/Update/Release3.php
tine20/Addressbook/Setup/Update/Release8.php [new file with mode: 0644]
tine20/Addressbook/Setup/setup.xml
tine20/Addressbook/css/Addressbook.css
tine20/Addressbook/js/ContactGrid.js
tine20/Addressbook/translations/da.po
tine20/Addressbook/translations/de.po
tine20/Addressbook/translations/en.po
tine20/Addressbook/translations/es.po
tine20/Addressbook/translations/fa_IR.po
tine20/Addressbook/translations/fi.po
tine20/Addressbook/translations/fr.po
tine20/Addressbook/translations/it.po
tine20/Addressbook/translations/nl_NL.po
tine20/Addressbook/translations/pt_BR.po
tine20/Addressbook/translations/ru.po
tine20/Addressbook/translations/sq.po
tine20/Addressbook/translations/sv_SE.po
tine20/Addressbook/translations/template.pot
tine20/Addressbook/translations/vi.po
tine20/Admin/Controller/User.php
tine20/Admin/Frontend/Cli.php
tine20/Admin/Frontend/Json.php
tine20/Admin/Import/Group/Csv.php [new file with mode: 0644]
tine20/Admin/Import/User/Csv.php [moved from tine20/Admin/Import/Csv.php with 97% similarity]
tine20/Admin/Import/definitions/admin_group_import_csv.xml [new file with mode: 0644]
tine20/Admin/Import/definitions/admin_user_import_csv.xml
tine20/Admin/Import/definitions/admin_user_import_csv_for_emailuser.xml
tine20/Admin/Setup/DemoData.php
tine20/Admin/css/Admin.css
tine20/Admin/translations/de.po
tine20/Admin/translations/en.po
tine20/Admin/translations/es.po
tine20/Admin/translations/fi.po
tine20/Admin/translations/fr.po
tine20/Admin/translations/it.po
tine20/Admin/translations/ko_KR.po
tine20/Admin/translations/lt.po
tine20/Admin/translations/nl_NL.po
tine20/Admin/translations/ru.po
tine20/Admin/translations/sq.po
tine20/Admin/translations/sv_SE.po
tine20/Admin/translations/template.pot
tine20/Admin/translations/th.po
tine20/Admin/translations/vi.po
tine20/Calendar/Backend/Sql.php
tine20/Calendar/Config.php
tine20/Calendar/Controller/Event.php
tine20/Calendar/Convert/Event/Json.php
tine20/Calendar/Convert/Event/VCalendar/Abstract.php
tine20/Calendar/Convert/Event/VCalendar/KDE.php [changed mode: 0644->0755]
tine20/Calendar/Frontend/CalDAV/Cli.php
tine20/Calendar/Frontend/WebDAV/Container.php
tine20/Calendar/Frontend/iMIP.php
tine20/Calendar/Model/Attender.php
tine20/Calendar/Model/AttenderFilter.php
tine20/Calendar/Model/Event.php
tine20/Calendar/Model/Rrule.php
tine20/Calendar/Setup/Initialize.php
tine20/Calendar/Setup/Update/Release3.php
tine20/Calendar/Setup/Update/Release8.php
tine20/Calendar/Setup/setup.xml
tine20/Calendar/css/Calendar.css
tine20/Calendar/css/daysviewpanel.css
tine20/Calendar/css/monthviewpanel.css
tine20/Calendar/css/print.css
tine20/Calendar/js/EventEditDialog.js
tine20/Calendar/js/EventUI.js
tine20/Calendar/js/MainScreenCenterPanel.js
tine20/Calendar/js/Model.js
tine20/Calendar/js/MonthView.js
tine20/Calendar/js/TreePanel.js
tine20/Calendar/js/iMIPDetailsPanel.js
tine20/Calendar/translations/da.po
tine20/Calendar/translations/de.po
tine20/Calendar/translations/el_GR.po
tine20/Calendar/translations/en.po
tine20/Calendar/translations/es.po
tine20/Calendar/translations/fi.po
tine20/Calendar/translations/fr.po
tine20/Calendar/translations/it.po
tine20/Calendar/translations/nl_NL.po
tine20/Calendar/translations/pl.po
tine20/Calendar/translations/pt_BR.po
tine20/Calendar/translations/ru.po
tine20/Calendar/translations/sq.po
tine20/Calendar/translations/sv_SE.po
tine20/Calendar/translations/template.pot
tine20/Calendar/translations/vi.po
tine20/Calendar/translations/zh_CN.po
tine20/Courses/Acl/Rights.php
tine20/Courses/Controller/Course.php
tine20/Courses/Setup/Initialize.php
tine20/Courses/Setup/Update/Release5.php
tine20/Courses/translations/de.po
tine20/Courses/translations/en.po
tine20/Courses/translations/es.po
tine20/Courses/translations/fi.po
tine20/Courses/translations/fr.po
tine20/Courses/translations/it.po
tine20/Courses/translations/nl_NL.po
tine20/Courses/translations/ru.po
tine20/Courses/translations/sq.po
tine20/Courses/translations/sv_SE.po
tine20/Courses/translations/template.pot
tine20/Courses/translations/vi.po
tine20/Crm/Controller/Lead.php
tine20/Crm/Frontend/Json.php
tine20/Crm/Model/Lead.php
tine20/Crm/Model/LeadFilter.php
tine20/Crm/Setup/Initialize.php
tine20/Crm/Setup/Update/Release3.php
tine20/Crm/Setup/Update/Release5.php
tine20/Crm/Setup/Update/Release8.php [new file with mode: 0644]
tine20/Crm/Setup/setup.xml
tine20/Crm/css/Crm.css
tine20/Crm/js/Crm.js
tine20/Crm/js/LeadEditDialog.js
tine20/Crm/js/LeadGridPanel.js
tine20/Crm/js/Model.js
tine20/Crm/js/Task.js
tine20/Crm/translations/de.po
tine20/Crm/translations/en.po
tine20/Crm/translations/es.po
tine20/Crm/translations/fi.po
tine20/Crm/translations/fr.po
tine20/Crm/translations/it.po
tine20/Crm/translations/ko_KR.po
tine20/Crm/translations/pl.po
tine20/Crm/translations/pt_BR.po
tine20/Crm/translations/ru.po
tine20/Crm/translations/sq.po
tine20/Crm/translations/sv_SE.po
tine20/Crm/translations/template.pot
tine20/Crm/translations/vi.po
tine20/Crm/translations/zh_CN.po
tine20/ExampleApplication/Controller/ExampleRecord.php
tine20/ExampleApplication/ExampleApplication.jsb2
tine20/ExampleApplication/Frontend/Json.php
tine20/ExampleApplication/Model/ExampleRecord.php
tine20/ExampleApplication/Model/ExampleRecordFilter.php
tine20/ExampleApplication/js/Example.js [new file with mode: 0644]
tine20/ExampleApplication/js/ExampleDetailsPanel.js [moved from tine20/Tool/Application/templates/js/ExampleRecordDetailsPanel.js with 92% similarity]
tine20/ExampleApplication/js/ExampleGridPanel.js [moved from tine20/ExampleApplication/js/ExampleRecordGridPanel.js with 65% similarity]
tine20/ExampleApplication/js/ExampleRecordDetailsPanel.js [deleted file]
tine20/ExampleApplication/js/ExampleRecordEditDialog.js
tine20/ExampleApplication/translations/de.po
tine20/ExampleApplication/translations/en.po
tine20/ExampleApplication/translations/template.pot
tine20/Felamimail/Controller.php
tine20/Felamimail/Controller/Account.php
tine20/Felamimail/Controller/Message.php
tine20/Felamimail/Preference.php
tine20/Felamimail/Setup/Initialize.php
tine20/Felamimail/Setup/Update/Release3.php
tine20/Felamimail/css/Felamimail.css
tine20/Felamimail/js/sieve/RuleEditDialog.js
tine20/Felamimail/translations/de.po
tine20/Felamimail/translations/en.po
tine20/Felamimail/translations/es.po
tine20/Felamimail/translations/fi.po
tine20/Felamimail/translations/fr.po
tine20/Felamimail/translations/it.po
tine20/Felamimail/translations/pl.po
tine20/Felamimail/translations/pt_BR.po
tine20/Felamimail/translations/ru.po
tine20/Felamimail/translations/sv_SE.po
tine20/Felamimail/translations/template.pot
tine20/Felamimail/translations/vi.po
tine20/Filemanager/Acl/Rights.php
tine20/Filemanager/Controller/DownloadLink.php [new file with mode: 0644]
tine20/Filemanager/Filemanager.jsb2
tine20/Filemanager/Frontend/Download.php [new file with mode: 0644]
tine20/Filemanager/Frontend/Json.php
tine20/Filemanager/Model/DownloadLink.php [new file with mode: 0644]
tine20/Filemanager/Model/DownloadLinkFilter.php [new file with mode: 0644]
tine20/Filemanager/Setup/Update/Release8.php [moved from tine20/Tool/Application/templates/Setup/setup.xml with 57% similarity]
tine20/Filemanager/Setup/setup.xml
tine20/Filemanager/css/Filemanager.css
tine20/Filemanager/js/DownloadLinkDialog.js [new file with mode: 0644]
tine20/Filemanager/js/DownloadLinkGridPanel.js [new file with mode: 0644]
tine20/Filemanager/js/GridContextMenu.js
tine20/Filemanager/js/Model.js
tine20/Filemanager/js/NodeEditDialog.js
tine20/Filemanager/js/NodeGridPanel.js
tine20/Filemanager/js/NodeTreePanel.js
tine20/Filemanager/translations/da.po
tine20/Filemanager/translations/de.po
tine20/Filemanager/translations/el_GR.po
tine20/Filemanager/translations/en.po
tine20/Filemanager/translations/es.po
tine20/Filemanager/translations/fi.po
tine20/Filemanager/translations/fr.po
tine20/Filemanager/translations/it.po
tine20/Filemanager/translations/nl_NL.po
tine20/Filemanager/translations/ru.po
tine20/Filemanager/translations/sq.po
tine20/Filemanager/translations/sv_SE.po
tine20/Filemanager/translations/template.pot
tine20/Filemanager/translations/vi.po
tine20/Filemanager/translations/zh_CN.po
tine20/Filemanager/views/file.phtml [new file with mode: 0644]
tine20/Filemanager/views/folder.phtml [new file with mode: 0644]
tine20/Filemanager/views/notfound.phtml [new file with mode: 0644]
tine20/HumanResources/Config.php
tine20/HumanResources/Exception/ContractNotEditable.php
tine20/HumanResources/Frontend/Json.php
tine20/HumanResources/Frontend/WebDAV.php [new file with mode: 0644]
tine20/HumanResources/Frontend/WebDAV/Container.php [new file with mode: 0644]
tine20/HumanResources/Frontend/WebDAV/Directory.php [new file with mode: 0644]
tine20/HumanResources/Frontend/WebDAV/File.php [new file with mode: 0644]
tine20/HumanResources/Model/Account.php
tine20/HumanResources/Model/Employee.php
tine20/HumanResources/Setup/DemoData.php
tine20/HumanResources/Setup/Initialize.php
tine20/HumanResources/Setup/Update/Release6.php
tine20/HumanResources/Setup/Update/Release7.php
tine20/HumanResources/Setup/Update/Release8.php
tine20/HumanResources/Setup/setup.xml
tine20/HumanResources/js/AccountEditDialog.js
tine20/HumanResources/js/DatePicker.js
tine20/HumanResources/js/EmployeeEditDialog.js
tine20/HumanResources/js/ExceptionHandler.js
tine20/HumanResources/js/FreeTimeGridPanel.js
tine20/HumanResources/translations/de.po
tine20/HumanResources/translations/en.po
tine20/HumanResources/translations/es.po
tine20/HumanResources/translations/fi.po
tine20/HumanResources/translations/fr.po
tine20/HumanResources/translations/it.po
tine20/HumanResources/translations/pl.po
tine20/HumanResources/translations/ru.po
tine20/HumanResources/translations/sq.po
tine20/HumanResources/translations/sv_SE.po
tine20/HumanResources/translations/template.pot
tine20/HumanResources/translations/vi.po
tine20/HumanResources/translations/zh_CN.po
tine20/Inventory/Frontend/Json.php
tine20/Inventory/Model/InventoryItem.php
tine20/Inventory/Setup/Initialize.php
tine20/Inventory/Setup/Update/Release7.php
tine20/Inventory/translations/de.po
tine20/Inventory/translations/en.po
tine20/Inventory/translations/en_AU.po
tine20/Inventory/translations/es.po
tine20/Inventory/translations/fr.po
tine20/Inventory/translations/it.po
tine20/Inventory/translations/pl.po
tine20/Inventory/translations/ru.po
tine20/Inventory/translations/sq.po
tine20/Inventory/translations/sv_SE.po
tine20/Inventory/translations/template.pot
tine20/Inventory/translations/vi.po
tine20/Phone/Setup/Initialize.php
tine20/Phone/Setup/Update/Release7.php
tine20/Phone/Setup/setup.xml
tine20/Phone/translations/de.po
tine20/Phone/translations/en.po
tine20/Phone/translations/es.po
tine20/Phone/translations/fi.po
tine20/Phone/translations/fr.po
tine20/Phone/translations/it.po
tine20/Phone/translations/nl_NL.po
tine20/Phone/translations/ru.po
tine20/Phone/translations/sq.po
tine20/Phone/translations/template.pot
tine20/Phone/translations/vi.po
tine20/Phone/translations/zh_CN.po
tine20/Phone/translations/zh_TW.po
tine20/Projects/Model/Project.php
tine20/Projects/Setup/Initialize.php
tine20/Projects/Setup/Update/Release1.php
tine20/Projects/translations/de.po
tine20/Projects/translations/en.po
tine20/Projects/translations/es.po
tine20/Projects/translations/fi.po
tine20/Projects/translations/fr.po
tine20/Projects/translations/it.po
tine20/Projects/translations/nl_NL.po
tine20/Projects/translations/ru.po
tine20/Projects/translations/sq.po
tine20/Projects/translations/sv_SE.po
tine20/Projects/translations/template.pot
tine20/Projects/translations/vi.po
tine20/RequestTracker/css/RequestTracker.css
tine20/RequestTracker/translations/de.po
tine20/RequestTracker/translations/en.po
tine20/RequestTracker/translations/template.pot
tine20/Sales/Acl/Rights.php
tine20/Sales/Backend/CostCenter.php
tine20/Sales/Backend/Division.php
tine20/Sales/Backend/Number.php
tine20/Sales/Backend/Product.php [moved from tine20/Tool/Application/templates/Backend/ExampleRecord.php with 50% similarity]
tine20/Sales/Config.php
tine20/Sales/Controller/Contract.php
tine20/Sales/Controller/CostCenter.php
tine20/Sales/Controller/Division.php
tine20/Sales/Controller/NumberableAbstract.php [new file with mode: 0644]
tine20/Sales/Exception.php
tine20/Sales/Export/Ods/Abstract.php [new file with mode: 0644]
tine20/Sales/Frontend/Json.php
tine20/Sales/Model/Contract.php
tine20/Sales/Model/ContractFilter.php
tine20/Sales/Model/CostCenter.php
tine20/Sales/Model/CostCenterFilter.php
tine20/Sales/Model/Division.php
tine20/Sales/Model/DivisionFilter.php
tine20/Sales/Model/Number.php
tine20/Sales/Model/Product.php
tine20/Sales/Model/ProductFilter.php
tine20/Sales/Sales.jsb2
tine20/Sales/Setup/Initialize.php
tine20/Sales/Setup/Update/Release5.php
tine20/Sales/Setup/Update/Release8.php
tine20/Sales/Setup/setup.xml
tine20/Sales/css/Sales.css
tine20/Sales/js/ContractCostCenterFilterModel.js
tine20/Sales/js/ContractEditDialog.js
tine20/Sales/js/ContractGridPanel.js
tine20/Sales/js/CostCenterEditDialog.js [new file with mode: 0644]
tine20/Sales/js/DivisionEditDialog.js [new file with mode: 0644]
tine20/Sales/js/Models.js [deleted file]
tine20/Sales/js/ProductEditDialog.js
tine20/Sales/js/ProductGridPanel.js
tine20/Sales/js/Sales.js
tine20/Sales/translations/de.po
tine20/Sales/translations/el_GR.po
tine20/Sales/translations/en.po
tine20/Sales/translations/es.po
tine20/Sales/translations/fi.po
tine20/Sales/translations/fr.po
tine20/Sales/translations/it.po
tine20/Sales/translations/ru.po
tine20/Sales/translations/sq.po
tine20/Sales/translations/template.pot
tine20/Sales/translations/vi.po
tine20/Setup/Exception.php
tine20/Setup/Exception/PromptUser.php [new file with mode: 0644]
tine20/Setup/Update/Abstract.php
tine20/Setup/js/ApplicationGridPanel.js
tine20/Setup/js/AuthenticationPanel.js
tine20/Setup/translations/de.po
tine20/Setup/translations/el_GR.po
tine20/Setup/translations/en.po
tine20/Setup/translations/es.po
tine20/Setup/translations/fi.po
tine20/Setup/translations/fr.po
tine20/Setup/translations/it.po
tine20/Setup/translations/pl.po
tine20/Setup/translations/pt_BR.po
tine20/Setup/translations/ru.po
tine20/Setup/translations/sq.po
tine20/Setup/translations/sv_SE.po
tine20/Setup/translations/template.pot
tine20/Setup/translations/vi.po
tine20/SimpleFAQ/Model/Faq.php
tine20/SimpleFAQ/Setup/Initialize.php
tine20/SimpleFAQ/translations/de.po
tine20/SimpleFAQ/translations/en.po
tine20/SimpleFAQ/translations/es.po
tine20/SimpleFAQ/translations/fi.po
tine20/SimpleFAQ/translations/fr.po
tine20/SimpleFAQ/translations/it.po
tine20/SimpleFAQ/translations/nl_NL.po
tine20/SimpleFAQ/translations/ru.po
tine20/SimpleFAQ/translations/sq.po
tine20/SimpleFAQ/translations/template.pot
tine20/SimpleFAQ/translations/vi.po
tine20/Sipgate/Controller/Account.php
tine20/Sipgate/Controller/Connection.php
tine20/Sipgate/Controller/Line.php
tine20/Sipgate/Model/Line.php
tine20/Sipgate/js/CallStateWindow.js
tine20/Sipgate/translations/de.po
tine20/Sipgate/translations/en.po
tine20/Sipgate/translations/es.po
tine20/Sipgate/translations/fi.po
tine20/Sipgate/translations/fr.po
tine20/Sipgate/translations/ru.po
tine20/Sipgate/translations/sq.po
tine20/Sipgate/translations/sv_SE.po
tine20/Sipgate/translations/template.pot
tine20/Sipgate/translations/vi.po
tine20/Tasks/Convert/Task/VCalendar/EMClient.php
tine20/Tasks/Convert/Task/VCalendar/KDE.php [changed mode: 0644->0755]
tine20/Tasks/Frontend/WebDAV/Container.php
tine20/Tasks/Setup/Initialize.php
tine20/Tasks/Setup/Update/Release3.php
tine20/Tasks/css/Tasks.css
tine20/Tasks/translations/de.po
tine20/Tasks/translations/en.po
tine20/Tasks/translations/es.po
tine20/Tasks/translations/fi.po
tine20/Tasks/translations/fr.po
tine20/Tasks/translations/it.po
tine20/Tasks/translations/nl_NL.po
tine20/Tasks/translations/ru.po
tine20/Tasks/translations/sq.po
tine20/Tasks/translations/sv_SE.po
tine20/Tasks/translations/template.pot
tine20/Tasks/translations/vi.po
tine20/Timetracker/Controller/Timeaccount.php
tine20/Timetracker/Controller/Timesheet.php
tine20/Timetracker/Setup/Initialize.php
tine20/Timetracker/Setup/Update/Release3.php
tine20/Timetracker/Setup/Update/Release5.php
tine20/Timetracker/Setup/setup.xml
tine20/Timetracker/translations/de.po
tine20/Timetracker/translations/en.po
tine20/Timetracker/translations/fi.po
tine20/Timetracker/translations/fr.po
tine20/Timetracker/translations/it.po
tine20/Timetracker/translations/ru.po
tine20/Timetracker/translations/sq.po
tine20/Timetracker/translations/sv_SE.po
tine20/Timetracker/translations/template.pot
tine20/Timetracker/translations/vi.po
tine20/Tinebase/Acl/Roles.php
tine20/Tinebase/Backend/Abstract.php
tine20/Tinebase/Backend/Sql/Abstract.php
tine20/Tinebase/Backend/Sql/Command/Interface.php
tine20/Tinebase/Backend/Sql/Command/Mysql.php
tine20/Tinebase/Backend/Sql/Command/Oracle.php
tine20/Tinebase/Backend/Sql/Command/Pgsql.php
tine20/Tinebase/Backend/Sql/Filter/GroupSelect.php
tine20/Tinebase/Backend/Sql/Grants.php [new file with mode: 0644]
tine20/Tinebase/Config.php
tine20/Tinebase/Container.php
tine20/Tinebase/Controller.php
tine20/Tinebase/Controller/Abstract.php
tine20/Tinebase/Controller/Record/Abstract.php
tine20/Tinebase/Controller/Record/Grants.php [new file with mode: 0644]
tine20/Tinebase/Convert/ImportExportDefinition/Json.php
tine20/Tinebase/Convert/Json.php
tine20/Tinebase/Core.php
tine20/Tinebase/CustomField/Config.php
tine20/Tinebase/DateTime.php
tine20/Tinebase/Department.php
tine20/Tinebase/EmailUser/Sql.php
tine20/Tinebase/Exception/InvalidRelationConstraints.php [new file with mode: 0644]
tine20/Tinebase/Exception/MonthFormat.php [new file with mode: 0644]
tine20/Tinebase/Export.php
tine20/Tinebase/Export/Abstract.php
tine20/Tinebase/Export/Richtext/Doc.php [new file with mode: 0644]
tine20/Tinebase/Export/Spreadsheet/Abstract.php
tine20/Tinebase/Export/Spreadsheet/Ods.php
tine20/Tinebase/Export/Spreadsheet/Xls.php
tine20/Tinebase/Frontend/Abstract.php
tine20/Tinebase/Frontend/Cli/Abstract.php
tine20/Tinebase/Frontend/Http.php
tine20/Tinebase/Frontend/Http/Abstract.php
tine20/Tinebase/Frontend/Json.php
tine20/Tinebase/Frontend/Json/Abstract.php
tine20/Tinebase/Frontend/Json/PersistentFilter.php
tine20/Tinebase/Import/Abstract.php
tine20/Tinebase/Import/Csv/Abstract.php
tine20/Tinebase/ImportExportDefinition.php
tine20/Tinebase/Mail.php
tine20/Tinebase/Model/CustomField/ConfigFilter.php
tine20/Tinebase/Model/Filter/Date.php
tine20/Tinebase/Model/Filter/GrantsFilterGroup.php [new file with mode: 0644]
tine20/Tinebase/Model/Filter/Month.php
tine20/Tinebase/Model/Grants.php
tine20/Tinebase/Model/GrantsFilter.php [new file with mode: 0644]
tine20/Tinebase/Model/ImportExportDefinition.php
tine20/Tinebase/Model/PersistentFilter.php
tine20/Tinebase/Model/PersistentFilterFilter.php
tine20/Tinebase/Model/PersistentFilterGrant.php [new file with mode: 0644]
tine20/Tinebase/Model/Tag.php
tine20/Tinebase/Model/TagFilter.php
tine20/Tinebase/Model/Tree/Node.php
tine20/Tinebase/Model/User.php
tine20/Tinebase/ModelConfiguration.php
tine20/Tinebase/PersistentFilter.php
tine20/Tinebase/Pluggable/Abstract.php [new file with mode: 0644]
tine20/Tinebase/Record/Abstract.php
tine20/Tinebase/Record/RecordSet.php
tine20/Tinebase/Relation/Backend/Sql.php
tine20/Tinebase/Relations.php
tine20/Tinebase/Server/Http.php
tine20/Tinebase/Server/Json.php
tine20/Tinebase/Setup/Initialize.php
tine20/Tinebase/Setup/Update/Release8.php
tine20/Tinebase/Setup/setup.xml
tine20/Tinebase/Tags.php
tine20/Tinebase/Tinebase.jsb2
tine20/Tinebase/User.php
tine20/Tinebase/User/Sql.php
tine20/Tinebase/css/SmallForms.css
tine20/Tinebase/css/Tinebase.css
tine20/Tinebase/css/ux/ArrowCollapse.css
tine20/Tinebase/css/ux/DatePickerWeekPlugin.css
tine20/Tinebase/css/ux/SubFormPanel.css
tine20/Tinebase/css/ux/display/DisplayPanel.css
tine20/Tinebase/css/ux/form/HtmlEditor.css
tine20/Tinebase/css/ux/form/Spinner.css
tine20/Tinebase/css/ux/grid/ActionColumnPlugin.css [new file with mode: 0644]
tine20/Tinebase/css/widgets/EditRecord.css
tine20/Tinebase/css/widgets/FilterToolbar.css
tine20/Tinebase/css/widgets/TagsPanel.css
tine20/Tinebase/js/ApplicationStarter.js
tine20/Tinebase/js/ExceptionHandler.js
tine20/Tinebase/js/MainMenu.js
tine20/Tinebase/js/Models.js
tine20/Tinebase/js/data/Clipboard.js [new file with mode: 0644]
tine20/Tinebase/js/data/MemoryBackend.js
tine20/Tinebase/js/data/Record.js
tine20/Tinebase/js/data/TitleRendererManager.js [new file with mode: 0644]
tine20/Tinebase/js/ux/Printer/print.css
tine20/Tinebase/js/ux/grid/ActionColumnPlugin.js [new file with mode: 0644]
tine20/Tinebase/js/ux/grid/GroupingGridPlugin.js [new file with mode: 0644]
tine20/Tinebase/js/widgets/account/ChangeAccountAction.js [new file with mode: 0644]
tine20/Tinebase/js/widgets/container/TreePanel.js
tine20/Tinebase/js/widgets/dialog/ExceptionHandlerDialog.js
tine20/Tinebase/js/widgets/dialog/MultipleEditDialogPlugin.js
tine20/Tinebase/js/widgets/form/AutoCompleteField.js
tine20/Tinebase/js/widgets/grid/FileUploadGrid.js
tine20/Tinebase/js/widgets/grid/GridPanel.js
tine20/Tinebase/js/widgets/persistentfilter/EditPersistentFilterPanel.js
tine20/Tinebase/js/widgets/persistentfilter/Model.js
tine20/Tinebase/js/widgets/persistentfilter/PickerPanel.js
tine20/Tinebase/js/widgets/relation/GenericPickerGridPanel.js
tine20/Tinebase/js/widgets/relation/PickerCombo.js
tine20/Tinebase/js/widgets/tree/ContextMenu.js
tine20/Tinebase/js/widgets/tree/FilterPlugin.js
tine20/Tinebase/js/widgets/tree/Loader.js
tine20/Tinebase/translations/da.po
tine20/Tinebase/translations/de.po
tine20/Tinebase/translations/en.po
tine20/Tinebase/translations/es.po
tine20/Tinebase/translations/fi.po
tine20/Tinebase/translations/fr.po
tine20/Tinebase/translations/it.po
tine20/Tinebase/translations/nl_NL.po
tine20/Tinebase/translations/pt_BR.po
tine20/Tinebase/translations/ru.po
tine20/Tinebase/translations/sq.po
tine20/Tinebase/translations/sv_SE.po
tine20/Tinebase/translations/template.pot
tine20/Tinebase/translations/vi.po
tine20/Tinebase/translations/zh_CN.po
tine20/Tinebase/views/deactivationNotification.php [new file with mode: 0644]
tine20/Tool/Application/templates/Config.php [deleted file]
tine20/Tool/Application/templates/Controller.php [deleted file]
tine20/Tool/Application/templates/Controller/ExampleRecord.php [deleted file]
tine20/Tool/Application/templates/ExampleApplication.jsb2 [deleted file]
tine20/Tool/Application/templates/Exception.php [deleted file]
tine20/Tool/Application/templates/Frontend/Cli.php [deleted file]
tine20/Tool/Application/templates/Frontend/Http.php [deleted file]
tine20/Tool/Application/templates/Frontend/Json.php [deleted file]
tine20/Tool/Application/templates/Model/ExampleRecord.php [deleted file]
tine20/Tool/Application/templates/Model/ExampleRecordFilter.php [deleted file]
tine20/Tool/Application/templates/Model/Status.php [deleted file]
tine20/Tool/Application/templates/Preference.php [deleted file]
tine20/Tool/Application/templates/Setup/Initialize.php [deleted file]
tine20/Tool/Application/templates/css/ExampleApplication.css [deleted file]
tine20/Tool/Application/templates/js/ExampleRecordEditDialog.js [deleted file]
tine20/Tool/Application/templates/js/ExampleRecordGridPanel.js [deleted file]
tine20/Tool/Application/templates/translations/bg.po [deleted file]
tine20/Tool/Application/templates/translations/ca.po [deleted file]
tine20/Tool/Application/templates/translations/cs.po [deleted file]
tine20/Tool/Application/templates/translations/de.po [deleted file]
tine20/Tool/Application/templates/translations/en.po [deleted file]
tine20/Tool/Application/templates/translations/es.po [deleted file]
tine20/Tool/Application/templates/translations/fr.po [deleted file]
tine20/Tool/Application/templates/translations/hu.po [deleted file]
tine20/Tool/Application/templates/translations/it.po [deleted file]
tine20/Tool/Application/templates/translations/ja.po [deleted file]
tine20/Tool/Application/templates/translations/nb.po [deleted file]
tine20/Tool/Application/templates/translations/pl.po [deleted file]
tine20/Tool/Application/templates/translations/ru.po [deleted file]
tine20/Tool/Application/templates/translations/template.pot [deleted file]
tine20/Tool/Application/templates/translations/zh_CN.po [deleted file]
tine20/Tool/Application/templates/translations/zh_TW.po [deleted file]
tine20/Tool/CodeGenerator/Application.php
tine20/Voipmanager/Setup/setup.xml
tine20/Voipmanager/translations/de.po
tine20/Voipmanager/translations/en.po
tine20/Voipmanager/translations/es.po
tine20/Voipmanager/translations/fr.po
tine20/Voipmanager/translations/ru.po
tine20/Voipmanager/translations/sq.po
tine20/Voipmanager/translations/template.pot
tine20/Voipmanager/translations/vi.po
tine20/Voipmanager/translations/zh_CN.po
tine20/Zend/Auth/Adapter/ModSsl/Certificate/X509.php
tine20/Zend/Db/Adapter/Pdo/Pgsql.php [new file with mode: 0644]
tine20/bootstrap.php
tine20/build.xml
tine20/composer.json
tine20/composer.lock
tine20/config.inc.php.dist
tine20/docs/htaccess
tine20/images/oxygen/16x16/actions/edit-cut-break.png [new file with mode: 0644]
tine20/images/oxygen/22x22/actions/edit-cut-break.png [new file with mode: 0644]
tine20/images/oxygen/32x32/actions/edit-cut-break.png [new file with mode: 0644]
tine20/images/scalable/call-forward.svg
tine20/images/scalable/call-incoming.svg
tine20/images/scalable/call-missed.svg
tine20/images/scalable/call-outgoing.svg
tine20/init_plugins.php [new file with mode: 0644]
tine20/library/jsb2tk/tests/core/core.jsb2
tine20/library/jsb2tk/tests/modul/modul.jsb2
tine20/themes/tine20/resources/css/layout.css
tine20/themes/tine20/resources/css/tine20.css

index b03c5c5..9afe891 100644 (file)
@@ -5,7 +5,7 @@
  * @package     Tine_Tool
  * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
  * @author      Flávio Gomes da Silva Lisboa <flavio.lisboa@serpro.gov.br>
- * @copyright   Copyright (c) 2013 Metaways Infosystems GmbH (http://www.metaways.de)
+ * @copyright   Copyright (c) 2014 Metaways Infosystems GmbH (http://www.metaways.de)
  * @version     $Id$ 
  */
 
@@ -15,28 +15,27 @@ main();
 
 function main()
 {
-       prepareEnvironment();
-       
-       try {
-               $opts = new Zend_Console_Getopt(array(
-                               'create application|a=s'=>'create application option with required string parameter',
-                               'help'=>'help option with no required parameter'
-               )
-               );
-               $opts->parse();
-       } catch (Zend_Console_Getopt_Exception $e) {
-               echo $e->getUsageMessage();
-               exit;
-       }
+    prepareEnvironment();
 
-       if ($applicationName = $opts->getOption('a'))
-       {
-               create(APPLICATION, array($applicationName));
-               echo "Application $applicationName was created successfully into tine20 folder! \n";
-               exit;
-       }
-       echo $e->getUsageMessage();
-       exit;
+    try {
+        $opts = new Zend_Console_Getopt(array(
+                'create application|a=s'=>'create application option with required string parameter',
+                'help'=>'help option with no required parameter'
+        )
+        );
+        $opts->parse();
+    } catch (Zend_Console_Getopt_Exception $e) {
+        echo $e->getUsageMessage();
+        exit;
+    }
+
+    if ($applicationName = $opts->getOption('a'))
+    {
+        echo create(APPLICATION, array($applicationName));
+        exit;
+    }
+    echo "UNEXPECTED ERROR: missing argument. Type tn -help to see parameters \n";
+    exit;
 }
 
 /**
@@ -44,29 +43,29 @@ function main()
  */
 function prepareEnvironment()
 {
-       $paths = array(
-                       realpath(dirname(__FILE__) . '/../tine20'),
-                       realpath(dirname(__FILE__) . '/../tine20/library'),
-                       get_include_path()
-       );
-       set_include_path(implode(PATH_SEPARATOR, $paths));
+    $paths = array(
+            realpath(__DIR__ . '/../tine20'),
+            realpath(__DIR__ . '/../tine20/library'),
+            get_include_path()
+    );
+    set_include_path(implode(PATH_SEPARATOR, $paths));
 
-       require_once 'Zend/Loader/Autoloader.php';
-       $autoloader = Zend_Loader_Autoloader::getInstance();
-       $autoloader->setFallbackAutoloader(true);
-       Tinebase_Autoloader::initialize($autoloader);
+    require_once realpath(__DIR__ . '/../tine20') . '/bootstrap.php';
 }
 
 /**
  * Creates an instance of a class that knows how to build the requested structure
+ * Command can executed from everywhere, because the path is determined by __DIR__
  * @param string $builder
+ * @param array $args
+ * @return string message
  */
 function create($builder, array $args)
-{      
-       // last argument is path of Tine 2.0
-       $args[] = realpath(dirname(__FILE__) . '/../tine20');
+{
+    // last argument is path of Tine 2.0
+    $args[] = realpath(__DIR__ . '/../tine20');
 
-       $className = 'Tool_CodeGenerator_' . $builder;
-       $tcg = new $className();
-       $tcg->build($args);
-}
\ No newline at end of file
+    $className = 'Tool_CodeGenerator_' . $builder;
+    $tcg = new $className();
+    return $tcg->build($args);
+}
index 8f70a4d..a3003ae 100644 (file)
@@ -1,48 +1,46 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<doc>\r
-    <sources>\r
-        <!-- <source src="../tine20/library/ExtJS/src" match="*.js"/> -->\r
-\r
-\r
-               <source src="../tine20/Tinebase/js/" match="*.js"/>\r
-\r
-\r
-        <source src="../tine20/Addressbook/js/ContactGrid.js"/>\r
-        <source src="../tine20/Addressbook/js/SearchCombo.js"/>\r
-        <!-- <source src="../tine20/Admin/js/UserEditDialog.js"/> -->\r
-        <!-- <source src="../tine20/Calendar/js" match="*.js"/> -->\r
-        <source src="../tine20/Calendar/js/AttendeeGridPanel.js"/>\r
-        <source src="../tine20/Calendar/js/Calendar.js"/>\r
-        <source src="../tine20/Calendar/js/CalendarPanel.js"/>\r
-        <source src="../tine20/Calendar/js/CalendarSelectWidget.js"/>\r
-        <source src="../tine20/Calendar/js/ColorManager.js"/>\r
-        <source src="../tine20/Calendar/js/DaysView.js"/>\r
-        <source src="../tine20/Calendar/js/EventEditDialog.js"/> \r
-        <!-- <source src="../tine20/Calendar/js/EventSelectionModel.js"/> \r
-        <source src="../tine20/Calendar/js/EventUI.js"/> \r
-        <source src="../tine20/Calendar/js/MainScreenCenterPanel.js"/> -->\r
-        <source src="../tine20/Calendar/js/Model.js"/>\r
-        <!-- <source src="../tine20/Calendar/js/MonthView.js"/> \r
-        <source src="../tine20/Calendar/js/PagingToolbar.js"/> \r
-        <source src="../tine20/Calendar/js/ParallelEventsRegistry.js"/> \r
-        <source src="../tine20/Calendar/js/RrulePanel.js"/> -->\r
-        <source src="../tine20/Crm/js" match="*.js"/>\r
-        <source src="../tine20/ExampleApplication/js/ExampleRecordGridPanel.js"/>\r
-        <source src="../tine20/ExampleApplication/js/ExampleRecordEditDialog.js"/>\r
-        <source src="../tine20/Felamimail/js" match="*.js"/>\r
-        <source src="../tine20/Sales/js" match="*.js"/>\r
-               <!-- <source src="../tine20/Setup/js" match="*.js"/> -->\r
-        <!-- <source src="../tine20/Tasks/js/EditDialog.js"/> -->\r
-        <source src="../tine20/Tasks/js/GridPanel.js"/>\r
-        <source src="../tine20/Timetracker/js/TimesheetGridPanel.js"/>\r
-        <source src="../tine20/Timetracker/js/TimeaccountGridPanel.js"/>\r
-    </sources>\r
-    <tags>\r
-        <tag name="author" title="Author"/>\r
-        <tag name="copyright" title="Copyright"/>\r
-        <tag name="license" title="License"/>\r
-        <tag name="version" title="Version"/>\r
-        <tag name="note" format="&lt;i&gt;NOTE: {0}&lt;/i&gt;"/>\r
-        <tag name="demo" title="Demo" format="&lt;a href=&quot;{0}&quot;&gt;{0}&lt;/a&gt;" />   \r
-       </tags>\r
-</doc>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<doc>
+    <sources>
+        <!-- <source src="../tine20/library/ExtJS/src" match="*.js"/> -->
+
+        <source src="../tine20/Tinebase/js/" match="*.js"/>
+
+        <source src="../tine20/Addressbook/js/ContactGrid.js"/>
+        <source src="../tine20/Addressbook/js/SearchCombo.js"/>
+        <!-- <source src="../tine20/Admin/js/UserEditDialog.js"/> -->
+        <!-- <source src="../tine20/Calendar/js" match="*.js"/> -->
+        <source src="../tine20/Calendar/js/AttendeeGridPanel.js"/>
+        <source src="../tine20/Calendar/js/Calendar.js"/>
+        <source src="../tine20/Calendar/js/CalendarPanel.js"/>
+        <source src="../tine20/Calendar/js/CalendarSelectWidget.js"/>
+        <source src="../tine20/Calendar/js/ColorManager.js"/>
+        <source src="../tine20/Calendar/js/DaysView.js"/>
+        <source src="../tine20/Calendar/js/EventEditDialog.js"/> 
+        <!-- <source src="../tine20/Calendar/js/EventSelectionModel.js"/> 
+        <source src="../tine20/Calendar/js/EventUI.js"/> 
+        <source src="../tine20/Calendar/js/MainScreenCenterPanel.js"/> -->
+        <source src="../tine20/Calendar/js/Model.js"/>
+        <!-- <source src="../tine20/Calendar/js/MonthView.js"/> 
+        <source src="../tine20/Calendar/js/PagingToolbar.js"/> 
+        <source src="../tine20/Calendar/js/ParallelEventsRegistry.js"/> 
+        <source src="../tine20/Calendar/js/RrulePanel.js"/> -->
+        <source src="../tine20/Crm/js" match="*.js"/>
+        <source src="../tine20/ExampleApplication/js/ExampleRecordGridPanel.js"/>
+        <source src="../tine20/ExampleApplication/js/ExampleRecordEditDialog.js"/>
+        <source src="../tine20/Felamimail/js" match="*.js"/>
+        <source src="../tine20/Sales/js" match="*.js"/>
+        <!-- <source src="../tine20/Setup/js" match="*.js"/> -->
+        <!-- <source src="../tine20/Tasks/js/EditDialog.js"/> -->
+        <source src="../tine20/Tasks/js/GridPanel.js"/>
+        <source src="../tine20/Timetracker/js/TimesheetGridPanel.js"/>
+        <source src="../tine20/Timetracker/js/TimeaccountGridPanel.js"/>
+    </sources>
+    <tags>
+        <tag name="author" title="Author"/>
+        <tag name="copyright" title="Copyright"/>
+        <tag name="license" title="License"/>
+        <tag name="version" title="Version"/>
+        <tag name="note" format="&lt;i&gt;NOTE: {0}&lt;/i&gt;"/>
+        <tag name="demo" title="Demo" format="&lt;a href=&quot;{0}&quot;&gt;{0}&lt;/a&gt;" />   
+    </tags>
+</doc>
index 1936373..e791085 100644 (file)
@@ -1,3 +1,9 @@
+tine20 (2014.09.0~preview1-0) natty; urgency=low
+
+  * New upstream release "Koriander" Preview 1
+
+ -- Philipp Schüle <p.schuele@metaways.de>  Thu, 04 Sep 2014 14:51:30 +0200
+
 tine20 (2013.10.6-0) natty; urgency=low
 
   * New upstream release "Collin" Service Release 5
index 2f1dd2b..8dc88a7 100644 (file)
@@ -59,6 +59,10 @@ Alias /Microsoft-Server-ActiveSync /usr/share/tine20/Microsoft-Server-ActiveSync
         RewriteRule ^webdav                      index.php?frontend=webdav             [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
         RewriteRule ^principals                  index.php?frontend=webdav             [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
         RewriteRule ^remote.php                  index.php?frontend=webdav             [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
+        
+        # Anonymous downloads
+        RewriteRule ^download/get/(.*)           index.php?method=Download.downloadNode&path=$1 [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
+        RewriteRule ^download/show/(.*)          index.php?method=Download.displayNode&path=$1  [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
     </IfModule>
 
     <IfModule mod_expires.c>
diff --git a/scripts/packaging/Univention/debian/patches/01_database_settings.diff b/scripts/packaging/Univention/debian/patches/01_database_settings.diff
new file mode 100644 (file)
index 0000000..278e52d
--- /dev/null
@@ -0,0 +1,17 @@
+--- a/config.inc.php.dist
++++ b/config.inc.php.dist
+@@ -9,10 +9,10 @@
+     // set 'count' equal zero to disable captcha, or set to number of invalid logins before request captcha.
+     'captcha' => array('count'=>0), 
+     'database' => array(
+-        'host'          => 'ENTER DATABASE HOSTNAME',
+-        'dbname'        => 'ENTER DATABASE NAME',
+-        'username'      => 'ENTER DATABASE USERNAME',
+-        'password'      => 'ENTER DATABASE PASSWORD',
++        'host'          => '_DBC_DBSERVER_',
++        'dbname'        => '_DBC_DBNAME_',
++        'username'      => '_DBC_DBUSER_',
++        'password'      => '_DBC_DBPASS_',
+         'adapter'       => 'pdo_mysql',
+         'tableprefix'   => 'tine20_',
+     ),
diff --git a/scripts/packaging/Univention/debian/patches/02_setupuser_settings.diff b/scripts/packaging/Univention/debian/patches/02_setupuser_settings.diff
new file mode 100644 (file)
index 0000000..4ea58c8
--- /dev/null
@@ -0,0 +1,13 @@
+--- a/config.inc.php.dist
++++ b/config.inc.php.dist
+@@ -17,8 +17,8 @@
+         'tableprefix'   => 'tine20_',
+     ),
+     'setupuser' => array(
+-        'username'      => 'SETUP USERNAME',
+-        'password'      => 'SETUP PASSWORD' 
++        'username'      => '_SETUPUSERNAME_',
++        'password'      => '_SETUPPASSWORD_' 
+     ),
+     /* // optional cache (recommended)
diff --git a/scripts/packaging/Univention/debian/patches/03_caching_settings.diff b/scripts/packaging/Univention/debian/patches/03_caching_settings.diff
new file mode 100644 (file)
index 0000000..ef1c698
--- /dev/null
@@ -0,0 +1,17 @@
+--- a/config.inc.php.dist
++++ b/config.inc.php.dist
+@@ -21,13 +21,11 @@
+         'password'      => '_SETUPPASSWORD_' 
+     ),
+-    /* // optional cache (recommended)
+     'caching' => array (
+         'active' => true,
+-        'path' => 'PATH TO CACHE (NEEDS TO BE WRITEABLE BY WEBSERVER)',
++        'path' => '/var/lib/tine20/cache',
+         'lifetime' => 3600,
+     ),
+-    */
+     /* // optional logger
+     'logger' => array (
diff --git a/scripts/packaging/Univention/debian/patches/04_logger_settings.diff b/scripts/packaging/Univention/debian/patches/04_logger_settings.diff
new file mode 100644 (file)
index 0000000..e0b8ec1
--- /dev/null
@@ -0,0 +1,17 @@
+--- a/config.inc.php.dist
++++ b/config.inc.php.dist
+@@ -27,12 +27,10 @@
+         'lifetime' => 3600,
+     ),
+-    /* // optional logger
+     'logger' => array (
+         'active' => true,
+-        'filename' => 'LOG FILE (NEEDS TO BE WRITEABLE BY WEBSERVER)',
+-        'priority' => '7',
++        'filename' => '/var/log/tine20/tine20.log',
++        'priority' => '3',
+     ),
+-    */
+ );
diff --git a/scripts/packaging/Univention/debian/patches/05_path_settings.diff b/scripts/packaging/Univention/debian/patches/05_path_settings.diff
new file mode 100644 (file)
index 0000000..ce88b67
--- /dev/null
@@ -0,0 +1,12 @@
+--- a/config.inc.php.dist
++++ b/config.inc.php.dist
+@@ -32,5 +32,9 @@
+         'filename' => '/var/log/tine20/tine20.log',
+         'priority' => '3',
+     ),
++    'tmpdir'     => '/var/lib/tine20/tmp',
++    'sessiondir' => '/var/lib/tine20/sessions',
++    'filesdir'   => '/var/lib/tine20/files',
++    'mapPanel'   => 1
+ );
diff --git a/scripts/packaging/Univention/debian/patches/config.inc.php.dist.diff b/scripts/packaging/Univention/debian/patches/config.inc.php.dist.diff
deleted file mode 100644 (file)
index 089b706..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
---- a/config.inc.php.dist
-+++ b/config.inc.php.dist
-@@ -9,32 +9,29 @@
-     // set 'count' equal zero to disable captcha, or set to number of invalid logins before request captcha.
-     'captcha' => array('count'=>0), 
-     'database' => array(
--        'host'          => 'ENTER DATABASE HOSTNAME',
--        'dbname'          => 'ENTER DATABASE NAME',
--        'username'      => 'ENTER DATABASE USERNAME',
--        'password'      => 'ENTER DATABASE PASSWORD',
-+        'host'          => '_DBC_DBSERVER_',
-+        'dbname'          => '_DBC_DBNAME_',
-+        'username'      => '_DBC_DBUSER_',
-+        'password'      => '_DBC_DBPASS_',
-         'adapter'       => 'pdo_mysql',
-         'tableprefix'   => 'tine20_',
-     ),
-     'setupuser' => array(
--        'username'      => 'SETUP USERNAME',
--        'password'      => 'SETUP PASSWORD' 
-+        'username'      => '_SETUPUSERNAME_',
-+        'password'      => '_SETUPPASSWORD_' 
-     ),
--    
--    /* // optional cache (recommended)
-     'caching' => array (
-         'active' => true,
--        'path' => 'PATH TO CACHE (NEEDS TO BE WRITEABLE BY WEBSERVER)',
-+        'path' => '/var/lib/tine20/cache',
-         'lifetime' => 3600,
-     ),
--    */
--    
--    /* // optional logger
-     'logger' => array (
-         'active' => true,
--        'filename' => 'LOG FILE (NEEDS TO BE WRITEABLE BY WEBSERVER)',
--        'priority' => '7',
-+        'filename' => '/var/log/tine20/tine20.log',
-+        'priority' => '3',
-     ),
--    */
-+    'tmpdir'     => '/var/lib/tine20/tmp',
-+    'sessiondir' => '/var/lib/tine20/sessions',
-+    'filesdir'   => '/var/lib/tine20/files',
-+    'mapPanel'   => 1
- );
--
index a50e7f2..4b0d280 100644 (file)
@@ -1 +1,5 @@
-config.inc.php.dist.diff
+01_database_settings.diff
+02_setupuser_settings.diff
+03_caching_settings.diff
+04_logger_settings.diff
+05_path_settings.diff
index 1f884be..a9b8aa1 100644 (file)
@@ -15,4 +15,5 @@ setup.php                /usr/share/tine20
 status.php               /usr/share/tine20
 themes                   /usr/share/tine20
 tine20.php               /usr/share/tine20
+init_plugins.php         /usr/share/tine20
 debian/etc/php5.ini      /etc/tine20
index f76f576..2a34f5a 100755 (executable)
@@ -11,11 +11,12 @@ BASEDIR=`readlink -f ./tine20build`
 TEMPDIR="$BASEDIR/temp"
 MISCPACKAGESDIR="$BASEDIR/packages/misc"
 
-CODENAME="Collin"
+CODENAME="Koriander"
 GITURL="http://git.tine20.org/git/tine20"
 
 RELEASE=""
-GITBRANCH=""
+GITBRANCH="master"
+#GITBRANCH="2014.09"
 PACKAGEDIR=""
 
 PATH=$MISCPACKAGESDIR:$TEMPDIR/tine20/vendor/bin:$PATH
@@ -250,7 +251,7 @@ function createArchives()
                     echo -n "building "
                     local FILES="Addressbook Admin Setup Tinebase Zend images library vendor docs fonts themes" 
                     local FILES="$FILES config.inc.php.dist index.php langHelper.php setup.php tine20.php bootstrap.php worker.php status.php"
-                    local FILES="$FILES CREDITS LICENSE PRIVACY README RELEASENOTES chrome_web_app.json"
+                    local FILES="$FILES CREDITS LICENSE PRIVACY README RELEASENOTES init_plugins.php chrome_web_app.json"
                     
                     (cd $TEMPDIR/tine20; tar cjf ../../packages/tine20/$RELEASE/tine20-${UCFILE}_$RELEASE.tar.bz2 $FILES)
                     (cd $TEMPDIR/tine20; zip -qr ../../packages/tine20/$RELEASE/tine20-${UCFILE}_$RELEASE.zip     $FILES)
index 1936373..e791085 100644 (file)
@@ -1,3 +1,9 @@
+tine20 (2014.09.0~preview1-0) natty; urgency=low
+
+  * New upstream release "Koriander" Preview 1
+
+ -- Philipp Schüle <p.schuele@metaways.de>  Thu, 04 Sep 2014 14:51:30 +0200
+
 tine20 (2013.10.6-0) natty; urgency=low
 
   * New upstream release "Collin" Service Release 5
index e070a1d..2562380 100644 (file)
@@ -59,6 +59,10 @@ Alias /Microsoft-Server-ActiveSync /usr/share/tine20/Microsoft-Server-ActiveSync
         RewriteRule ^webdav                      index.php?frontend=webdav             [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
         RewriteRule ^principals                  index.php?frontend=webdav             [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
         RewriteRule ^remote.php                  index.php?frontend=webdav             [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
+        
+        # Anonymous downloads
+        RewriteRule ^download/get/(.*)           index.php?method=Download.downloadNode&path=$1 [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
+        RewriteRule ^download/show/(.*)          index.php?method=Download.displayNode&path=$1  [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
     </IfModule>
 
     <IfModule mod_expires.c>
diff --git a/scripts/packaging/debian/patches/01_database_settings.diff b/scripts/packaging/debian/patches/01_database_settings.diff
new file mode 100644 (file)
index 0000000..278e52d
--- /dev/null
@@ -0,0 +1,17 @@
+--- a/config.inc.php.dist
++++ b/config.inc.php.dist
+@@ -9,10 +9,10 @@
+     // set 'count' equal zero to disable captcha, or set to number of invalid logins before request captcha.
+     'captcha' => array('count'=>0), 
+     'database' => array(
+-        'host'          => 'ENTER DATABASE HOSTNAME',
+-        'dbname'        => 'ENTER DATABASE NAME',
+-        'username'      => 'ENTER DATABASE USERNAME',
+-        'password'      => 'ENTER DATABASE PASSWORD',
++        'host'          => '_DBC_DBSERVER_',
++        'dbname'        => '_DBC_DBNAME_',
++        'username'      => '_DBC_DBUSER_',
++        'password'      => '_DBC_DBPASS_',
+         'adapter'       => 'pdo_mysql',
+         'tableprefix'   => 'tine20_',
+     ),
diff --git a/scripts/packaging/debian/patches/02_setupuser_settings.diff b/scripts/packaging/debian/patches/02_setupuser_settings.diff
new file mode 100644 (file)
index 0000000..4ea58c8
--- /dev/null
@@ -0,0 +1,13 @@
+--- a/config.inc.php.dist
++++ b/config.inc.php.dist
+@@ -17,8 +17,8 @@
+         'tableprefix'   => 'tine20_',
+     ),
+     'setupuser' => array(
+-        'username'      => 'SETUP USERNAME',
+-        'password'      => 'SETUP PASSWORD' 
++        'username'      => '_SETUPUSERNAME_',
++        'password'      => '_SETUPPASSWORD_' 
+     ),
+     /* // optional cache (recommended)
diff --git a/scripts/packaging/debian/patches/03_caching_settings.diff b/scripts/packaging/debian/patches/03_caching_settings.diff
new file mode 100644 (file)
index 0000000..ef1c698
--- /dev/null
@@ -0,0 +1,17 @@
+--- a/config.inc.php.dist
++++ b/config.inc.php.dist
+@@ -21,13 +21,11 @@
+         'password'      => '_SETUPPASSWORD_' 
+     ),
+-    /* // optional cache (recommended)
+     'caching' => array (
+         'active' => true,
+-        'path' => 'PATH TO CACHE (NEEDS TO BE WRITEABLE BY WEBSERVER)',
++        'path' => '/var/lib/tine20/cache',
+         'lifetime' => 3600,
+     ),
+-    */
+     /* // optional logger
+     'logger' => array (
diff --git a/scripts/packaging/debian/patches/04_logger_settings.diff b/scripts/packaging/debian/patches/04_logger_settings.diff
new file mode 100644 (file)
index 0000000..e0b8ec1
--- /dev/null
@@ -0,0 +1,17 @@
+--- a/config.inc.php.dist
++++ b/config.inc.php.dist
+@@ -27,12 +27,10 @@
+         'lifetime' => 3600,
+     ),
+-    /* // optional logger
+     'logger' => array (
+         'active' => true,
+-        'filename' => 'LOG FILE (NEEDS TO BE WRITEABLE BY WEBSERVER)',
+-        'priority' => '7',
++        'filename' => '/var/log/tine20/tine20.log',
++        'priority' => '3',
+     ),
+-    */
+ );
diff --git a/scripts/packaging/debian/patches/05_path_settings.diff b/scripts/packaging/debian/patches/05_path_settings.diff
new file mode 100644 (file)
index 0000000..ce88b67
--- /dev/null
@@ -0,0 +1,12 @@
+--- a/config.inc.php.dist
++++ b/config.inc.php.dist
+@@ -32,5 +32,9 @@
+         'filename' => '/var/log/tine20/tine20.log',
+         'priority' => '3',
+     ),
++    'tmpdir'     => '/var/lib/tine20/tmp',
++    'sessiondir' => '/var/lib/tine20/sessions',
++    'filesdir'   => '/var/lib/tine20/files',
++    'mapPanel'   => 1
+ );
diff --git a/scripts/packaging/debian/patches/config.inc.php.dist.diff b/scripts/packaging/debian/patches/config.inc.php.dist.diff
deleted file mode 100644 (file)
index 089b706..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
---- a/config.inc.php.dist
-+++ b/config.inc.php.dist
-@@ -9,32 +9,29 @@
-     // set 'count' equal zero to disable captcha, or set to number of invalid logins before request captcha.
-     'captcha' => array('count'=>0), 
-     'database' => array(
--        'host'          => 'ENTER DATABASE HOSTNAME',
--        'dbname'          => 'ENTER DATABASE NAME',
--        'username'      => 'ENTER DATABASE USERNAME',
--        'password'      => 'ENTER DATABASE PASSWORD',
-+        'host'          => '_DBC_DBSERVER_',
-+        'dbname'          => '_DBC_DBNAME_',
-+        'username'      => '_DBC_DBUSER_',
-+        'password'      => '_DBC_DBPASS_',
-         'adapter'       => 'pdo_mysql',
-         'tableprefix'   => 'tine20_',
-     ),
-     'setupuser' => array(
--        'username'      => 'SETUP USERNAME',
--        'password'      => 'SETUP PASSWORD' 
-+        'username'      => '_SETUPUSERNAME_',
-+        'password'      => '_SETUPPASSWORD_' 
-     ),
--    
--    /* // optional cache (recommended)
-     'caching' => array (
-         'active' => true,
--        'path' => 'PATH TO CACHE (NEEDS TO BE WRITEABLE BY WEBSERVER)',
-+        'path' => '/var/lib/tine20/cache',
-         'lifetime' => 3600,
-     ),
--    */
--    
--    /* // optional logger
-     'logger' => array (
-         'active' => true,
--        'filename' => 'LOG FILE (NEEDS TO BE WRITEABLE BY WEBSERVER)',
--        'priority' => '7',
-+        'filename' => '/var/log/tine20/tine20.log',
-+        'priority' => '3',
-     ),
--    */
-+    'tmpdir'     => '/var/lib/tine20/tmp',
-+    'sessiondir' => '/var/lib/tine20/sessions',
-+    'filesdir'   => '/var/lib/tine20/files',
-+    'mapPanel'   => 1
- );
--
index a50e7f2..4b0d280 100644 (file)
@@ -1 +1,5 @@
-config.inc.php.dist.diff
+01_database_settings.diff
+02_setupuser_settings.diff
+03_caching_settings.diff
+04_logger_settings.diff
+05_path_settings.diff
index 1f884be..a9b8aa1 100644 (file)
@@ -15,4 +15,5 @@ setup.php                /usr/share/tine20
 status.php               /usr/share/tine20
 themes                   /usr/share/tine20
 tine20.php               /usr/share/tine20
+init_plugins.php         /usr/share/tine20
 debian/etc/php5.ini      /etc/tine20
index 2fffcde..65626f6 100644 (file)
@@ -59,6 +59,10 @@ Alias /Microsoft-Server-ActiveSync /usr/share/tine20/Microsoft-Server-ActiveSync
         RewriteRule ^webdav                      index.php?frontend=webdav             [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
         RewriteRule ^principals                  index.php?frontend=webdav             [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
         RewriteRule ^remote.php                  index.php?frontend=webdav             [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
+        
+        # Anonymous downloads
+        RewriteRule ^download/get/(.*)           index.php?method=Download.downloadNode&path=$1 [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
+        RewriteRule ^download/show/(.*)          index.php?method=Download.displayNode&path=$1  [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
     </IfModule>
 
     <IfModule mod_expires.c>
index 7fd9245..e1b46d6 100644 (file)
@@ -270,6 +270,7 @@ fi
 %{_datadir}/%{name}/setup.php
 %{_datadir}/%{name}/status.php
 %{_datadir}/%{name}/%{name}.php
+%{_datadir}/%{name}/init_plugins.php
 %{_datadir}/%{name}/themes
 
 %dir %{_sysconfdir}/%{name}/
index 4f8d5c7..0e5ae89 100644 (file)
@@ -508,6 +508,8 @@ Zeile 3</AirSyncBase:Data>
     {
         parent::setUp();
         
+        Calendar_Controller_Event::getInstance()->doContainerACLChecks(true);
+        
         // replace email to make current user organizer and attendee
         $testConfig = Zend_Registry::get('testConfig');
         $email = ($testConfig->email) ? $testConfig->email : Tinebase_Core::getUser()->accountEmailAddress;
diff --git a/tests/tine20/Addressbook/Export/definitions/adb_tagmatrix_ods.xml b/tests/tine20/Addressbook/Export/definitions/adb_tagmatrix_ods.xml
new file mode 100644 (file)
index 0000000..22c1fd9
--- /dev/null
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<config>
+    <model>Addressbook_Model_Contact</model>
+    <name>adb_tagmatrix_ods</name>
+    <type>export</type>
+    <plugin>Addressbook_Export_Ods</plugin>
+    <description>default ods contact export definition</description>
+    <header>1</header>
+    <headers>
+        <header>{date}</header>
+        <header>{user}</header>
+    </headers>
+    <columns>
+        <!--column>
+            <identifier>account_id</identifier>
+        </column-->
+        <column>
+            <identifier>id</identifier>
+        </column>
+        <column>
+            <identifier>tags</identifier>
+            <type>tags</type>
+            <separateColumns>1</separateColumns>
+        </column>
+    </columns>
+</config>
index 02be157..2256ef9 100644 (file)
@@ -32,7 +32,7 @@ class Addressbook_Frontend_CardDAVTest extends TestCase
     {
         $collection = new Addressbook_Frontend_WebDAV(\Sabre\CardDAV\Plugin::ADDRESSBOOK_ROOT . '/' . Tinebase_Core::getUser()->contact_id, true);
         
-        $child = $collection->getChild($this->_getTestContainer()->getId());
+        $child = $collection->getChild($this->_getTestContainer('Addressbook')->getId());
         
         $this->assertTrue($child instanceof Addressbook_Frontend_WebDAV_Container);
     }
@@ -87,21 +87,4 @@ class Addressbook_Frontend_CardDAVTest extends TestCase
     
         $this->assertGreaterThanOrEqual(2, count($children), 'there should be more than one container');
     }
-    
-    /**
-     * create test container
-     * 
-     * @return Tinebase_Model_Container
-     */
-    protected function _getTestContainer()
-    {
-        $container = Tinebase_Container::getInstance()->addContainer(new Tinebase_Model_Container(array(
-            'name'              => Tinebase_Record_Abstract::generateUID(),
-            'type'              => Tinebase_Model_Container::TYPE_PERSONAL,
-            'backend'           => 'Sql',
-            'application_id'    => Tinebase_Application::getInstance()->getApplicationByName('Addressbook')->getId(),
-        )));
-        
-        return $container;
-    }
 }
index 199d7bc..2e43685 100644 (file)
@@ -18,7 +18,7 @@ require_once dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'TestHelper.php'
 /**
  * Test class for Addressbook_Frontend_Json
  */
-class Addressbook_JsonTest extends PHPUnit_Framework_TestCase
+class Addressbook_JsonTest extends TestCase
 {
     /**
      * set geodata for contacts
@@ -150,7 +150,12 @@ class Addressbook_JsonTest extends PHPUnit_Framework_TestCase
         }
         
         if (! empty($this->objects['createdTagIds'])) {
-            Tinebase_Tags::getInstance()->deleteTags($this->objects['createdTagIds']);
+            try {
+                Tinebase_Tags::getInstance()->deleteTags($this->objects['createdTagIds'], TRUE);
+                $this->objects['createdTagIds'] = array();
+            } catch (Tinebase_Exception_AccessDenied $e) {
+                $this->objects['createdTagIds'] = array();
+            }
         }
     }
 
@@ -667,33 +672,6 @@ class Addressbook_JsonTest extends PHPUnit_Framework_TestCase
     }
     
     /**
-     * get tag
-     * 
-     * @param string $tagType
-     * @param string $tagName
-     * @return Tinebase_Model_Tag
-     */
-    protected function _getTag($tagType = Tinebase_Model_Tag::TYPE_SHARED, $tagName = NULL)
-    {
-        if ($tagName) {
-            try {
-                $tag = Tinebase_Tags::getInstance()->getTagByName($tagName);
-                return $tag;
-            } catch (Tinebase_Exception_NotFound $tenf) {
-            }
-        } else {
-            $tagName = Tinebase_Record_Abstract::generateUID();
-        }
-        
-        return new Tinebase_Model_Tag(array(
-            'type'          => $tagType,
-            'name'          => $tagName,
-            'description'   => 'testTagDescription',
-            'color'         => '#009B31',
-        ));
-    }
-
-    /**
      * testExportXlsWithCustomfield
      * 
      * @see 0006634: custom fields missing in XLS export
@@ -726,6 +704,84 @@ class Addressbook_JsonTest extends PHPUnit_Framework_TestCase
     }
     
     /**
+     * each tag should have an own column
+     */
+    public function testExportOdsWithTagMatrix()
+    {
+        $filter = new Tinebase_Model_TagFilter(array());
+        try {
+            $allTags = Tinebase_Tags::getInstance()->searchTags($filter);
+            if ($allTags->count()) {
+                Tinebase_Tags::getInstance()->deleteTags($allTags->getId(), TRUE);
+            }
+        } catch (Tinebase_Exception_AccessDenied $e) {
+            $this->markTestSkipped('This fails each 2nd time.');
+        }
+        
+        $controller = Addressbook_Controller_Contact::getInstance();
+        
+        $t1 = $this->_getTag(Tinebase_Model_Tag::TYPE_SHARED, 'tag1');
+        $this->objects['createdTagIds'][] = $t1->getId();
+        
+        $c1 = new Addressbook_Model_Contact(array(
+            'n_given'           => 'ali',
+            'n_family'          => 'PHPUNIT',
+            'org_name'          => 'test',
+            'container_id'      => $this->container->id,
+            'tags' => array($t1)
+        ));
+        
+        $c1 = $controller->create($c1);
+        $this->_contactIdsToDelete[] = $c1->getId();
+        
+        $t2 = $this->_getTag(Tinebase_Model_Tag::TYPE_SHARED, 'tag2');
+        $this->objects['createdTagIds'][] = $t2->getId();
+        
+        // this tag should not occur, this is the addressbook application
+        $crmAppId = Tinebase_Application::getInstance()->getApplicationByName('Crm')->getId();
+        $t3 = $this->_getTag(Tinebase_Model_Tag::TYPE_SHARED, 'tag3', array($crmAppId));
+        $this->objects['createdTagIds'][] = $t3->getId();
+        
+        $c2 = new Addressbook_Model_Contact(array(
+            'n_given'           => 'alisabeth',
+            'n_family'          => 'PHPUNIT',
+            'org_name'          => 'test',
+            'container_id'      => $this->container->id,
+            'tags' => array($t2)
+        ));
+        
+        $c2 = $controller->create($c2);
+        $this->_contactIdsToDelete[] = $c2->getId();
+        
+        $this->assertNotEmpty($c1->tags);
+        $this->assertNotEmpty($c2->tags);
+        
+        $filter = new Addressbook_Model_ContactFilter(array(array(
+            'field'    => 'n_family',
+            'operator' => 'equals',
+            'value'    =>  'PHPUNIT'
+        )));
+        
+        $definition = dirname(__FILE__) . '/Export/definitions/adb_tagmatrix_ods.xml';
+        $exporter = new Addressbook_Export_Ods($filter, Addressbook_Controller_Contact::getInstance(), array('definitionFilename' => $definition));
+        $doc = $exporter->generate();
+        
+        $xml = $this->_getContentXML($doc);
+        
+        $ns = $xml->getNamespaces(true);
+        $spreadsheetXml = $xml->children($ns['office'])->{'body'}->{'spreadsheet'};
+        
+        $headerRowXml = $spreadsheetXml->children($ns['table'])->{'table'}->{'table-row'}->{1};
+        
+        // the tags should exist in the header row
+        $this->assertEquals('tag1', (string) $headerRowXml->children($ns['table'])->{'table-cell'}->{1}->children($ns['text'])->{0});
+        $this->assertEquals('tag2', (string) $headerRowXml->children($ns['table'])->{'table-cell'}->{2}->children($ns['text'])->{0});
+        
+        // if there is no more header column, tag3 is not shown
+        $this->assertEquals(3, (string) $headerRowXml->children($ns['table'])->{'table-cell'}->count());
+    }
+    
+    /**
      * test import
      * 
      * @see 0006226: Data truncated for column 'adr_two_lon'
@@ -1542,6 +1598,7 @@ Steuernummer 33/111/32212";
             'description'   => 'hidden group',
             'visibility'    => Tinebase_Model_Group::VISIBILITY_HIDDEN
         ));
+        
         try {
             $hiddenGroup = Admin_Controller_Group::getInstance()->create($hiddenGroup);
         } catch (Exception $e) {
@@ -1556,6 +1613,7 @@ Steuernummer 33/111/32212";
             'operator' => 'equals',
             'value'    => 'hiddengroup'
         ));
+        
         $result = $this->_instance->searchLists($filter, array());
         $this->assertEquals(0, $result['totalcount'], 'should not find hidden list: ' . print_r($result, TRUE));
     }
index 4e10540..acfd1d4 100644 (file)
@@ -129,7 +129,7 @@ class Admin_CliTest extends TestCase
         $this->objects['configSemicolon'] = '<?xml version="1.0" encoding="UTF-8"?>
         <config>
             <model>Tinebase_Model_FullUser</model>
-            <plugin>Admin_Import_Csv</plugin>
+            <plugin>Admin_Import_User_Csv</plugin>
             <type>import</type>
             <headline>1</headline>
             <dryrun>0</dryrun>
@@ -161,7 +161,7 @@ class Admin_CliTest extends TestCase
         $this->objects['configEmailuser'] = '<?xml version="1.0" encoding="UTF-8"?>
         <config>
             <model>Tinebase_Model_FullUser</model>
-            <plugin>Admin_Import_Csv</plugin>
+            <plugin>Admin_Import_User_Csv</plugin>
             <type>import</type>
             <headline>1</headline>
             <dryrun>0</dryrun>
@@ -303,7 +303,7 @@ class Admin_CliTest extends TestCase
                 'name'              => $_definition,
                 'type'              => 'import',
                 'model'             => 'Tinebase_Model_FullUser',
-                'plugin'            => 'Admin_Import_Csv',
+                'plugin'            => 'Admin_Import_User_Csv',
                 'plugin_options'    => $_config
             )));
         }
@@ -444,4 +444,44 @@ class Admin_CliTest extends TestCase
         }
         unlink("test2.csv");
     }
+    
+    /**
+     * tests if import with members from csv works correctly
+     */
+    public function testImportGroups()
+    {
+        $opts = new Zend_Console_Getopt('abp:');
+        $opts->setArguments(array(dirname(__FILE__) . '/files/import_groups.csv', 'definition=admin_group_import_csv'));
+        
+        // start import (dry run)
+        ob_start();
+        $this->_cli->importGroups($opts);
+        $out = ob_get_clean();
+        $this->assertStringStartsWith('Imported 4 records.', $out);
+        
+        $expected = array('men' => 3, 'women' => 2, 'highperformers' => 2, 'lowperformers' => 3);
+        $this->_testImportGroupsHelper($expected);
+        
+        $opts->setArguments(array(dirname(__FILE__) . '/files/import_groups_update.csv', 'definition=admin_group_import_csv'));
+        ob_start();
+        $this->_cli->importGroups($opts);
+        $out = ob_get_clean();
+        $this->assertStringStartsWith('Imported 0 records.', $out);
+        
+        $expected = array('men' => 3, 'women' => 2,  'lowperformers' => 2, 'highperformers' => 3);
+        $this->_testImportGroupsHelper($expected);
+    }
+    
+    protected function _testImportGroupsHelper($expected)
+    {
+        $be = new Tinebase_Group_Sql();
+        
+        foreach($expected as $name => $count) {
+            $group = $be->getGroupByName($name);
+            $members = $be->getGroupMembers($group);
+        
+            $this->assertEquals($count, count($members), 'Group ' . $name . ' should have ' . $count . ' members!');
+            $this->assertEquals('displayed', $group->visibility, 'Group ' . $name . ' should be visible!');
+        }
+    }
 }
index 5aea9a8..d0c600b 100644 (file)
@@ -334,6 +334,39 @@ class Admin_JsonTest extends TestCase
         
         $this->assertEquals('disabled', $account->accountStatus);
     }
+
+    /**
+     * test send deactivation notification
+     * 
+     * @see 0009956: send mail on account deactivation
+     */
+    public function testAccountDeactivationNotification()
+    {
+        $smtpConfig = Tinebase_Config::getInstance()->get(Tinebase_Config::SMTP);
+        if (! isset($smtpConfig->from) && ! isset($smtpConfig->primarydomain)) {
+            $this->markTestSkipped('no notification service address configured.');
+        }
+        
+        Tinebase_Config::getInstance()->set(Tinebase_Config::ACCOUNT_DEACTIVATION_NOTIFICATION, true);
+        
+        $userArray = $this->testSaveAccount();
+        
+        self::flushMailer();
+        
+        $this->_json->setAccountState(array($userArray['accountId']), 'disabled');
+        
+        $messages = self::getMessages();
+        
+        $this->assertEquals(1, count($messages), 'did not get notification message');
+        
+        $message = $messages[0];
+        $bodyText = $message->getBodyText(/* textOnly = */ true);
+        
+        $translate = Tinebase_Translation::getTranslation('Tinebase');
+        $this->assertEquals($translate->_('Your Tine 2.0 account has been deactivated'), $message->getSubject());
+        $this->assertContains($userArray['accountLoginName'], $bodyText);
+        $this->assertContains(Tinebase_Core::getHostname(), $bodyText);
+    }
     
     /**
      * try to reset password
diff --git a/tests/tine20/Admin/files/import_groups.csv b/tests/tine20/Admin/files/import_groups.csv
new file mode 100644 (file)
index 0000000..d971c61
--- /dev/null
@@ -0,0 +1,4 @@
+"women";"Women in our Company";"rwright sclever"
+"men";"Men in our Company";"pwulf jsmith jmcblack"
+"highperformers";"High Performers in our company";"rwright sclever"
+"lowperformers";"Low Performers in our company";"pwulf jsmith jmcblack"
\ No newline at end of file
diff --git a/tests/tine20/Admin/files/import_groups_update.csv b/tests/tine20/Admin/files/import_groups_update.csv
new file mode 100644 (file)
index 0000000..7f571be
--- /dev/null
@@ -0,0 +1,4 @@
+"women";"Women in our Company";"rwright sclever"
+"men";"Men in our Company";"pwulf jsmith jmcblack"
+"highperformers";"High Performers in our company";"rwright sclever pwulf"
+"lowperformers";"Low Performers in our company";"jsmith jmcblack"
index 4df6319..5fba8bf 100644 (file)
@@ -40,6 +40,7 @@ class AllTests
         $suite->addTest(Projects_AllTests::suite());
         $suite->addTest(HumanResources_AllTests::suite());
         $suite->addTest(Inventory_AllTests::suite());
+        $suite->addTest(ExampleApplication_AllTests::suite());
         $suite->addTest(Sipgate_AllTests::suite());
         $suite->addTest(SimpleFAQ_AllTests::suite());
         $suite->addTest(Zend_AllTests::suite());
index 7884d66..5574bef 100644 (file)
@@ -4,16 +4,11 @@
  * 
  * @package     Calendar
  * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
- * @copyright   Copyright (c) 2009-2013 Metaways Infosystems GmbH (http://www.metaways.de)
+ * @copyright   Copyright (c) 2009-2014 Metaways Infosystems GmbH (http://www.metaways.de)
  * @author      Cornelius Weiss <c.weiss@metaways.de>
  */
 
 /**
- * Test helper
- */
-require_once dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . 'TestHelper.php';
-
-/**
  * Test class for Calendar_Backend_Sql
  * 
  * @package     Calendar
@@ -91,6 +86,9 @@ class Calendar_Backend_SqlTest extends Calendar_TestCase
         
     }
     
+    /**
+     * test search events
+     */
     public function testSearchEvents()
     {
         $from = '2009-04-03 00:00:00';
@@ -102,17 +100,17 @@ class Calendar_Backend_SqlTest extends Calendar_TestCase
                 'dtend'        => '2009-04-02 23:59:59',
                 'summary'      => 'non recur event ending before search period => should _not_ be found',
                 'attendee'     => $this->_getAttendee(),
-                'container_id' => $this->_testCalendar->getId(),
+                'container_id' => $this->_getTestCalendar()->getId(),
                 'organizer'    => Tinebase_Core::getUser()->getId(),
                 'uid'          => Calendar_Model_Event::generateUID(),
-                Tinebase_Model_Grants::GRANT_READ    => true
+                Tinebase_Model_Grants::GRANT_READ    => true,
             ),
             array(
                 'dtstart'      => '2009-04-02 23:30:00',
                 'dtend'        => '2009-04-03 00:30:00',
                 'summary'      => 'non recur event ending within search period => should be found',
                 'attendee'     => $this->_getAttendee(),
-                'container_id' => $this->_testCalendar->getId(),
+                'container_id' => $this->_getTestCalendar()->getId(),
                 'organizer'    => Tinebase_Core::getUser()->getId(),
                 'uid'          => Calendar_Model_Event::generateUID(),
                 Tinebase_Model_Grants::GRANT_READ    => true
@@ -122,7 +120,7 @@ class Calendar_Backend_SqlTest extends Calendar_TestCase
                 'dtend'        => '2009-04-07 12:00:00',
                 'summary'      => 'non recur event completly within search period => should be found',
                 'attendee'     => $this->_getAttendee(),
-                'container_id' => $this->_testCalendar->getId(),
+                'container_id' => $this->_getTestCalendar()->getId(),
                 'organizer'    => Tinebase_Core::getUser()->getId(),
                 'uid'          => Calendar_Model_Event::generateUID(),
                 Tinebase_Model_Grants::GRANT_READ    => true
@@ -132,7 +130,7 @@ class Calendar_Backend_SqlTest extends Calendar_TestCase
                 'dtend'        => '2009-04-11 00:30:00',
                 'summary'      => 'non recur event starting within search period => should be found',
                 'attendee'     => $this->_getAttendee(),
-                'container_id' => $this->_testCalendar->getId(),
+                'container_id' => $this->_getTestCalendar()->getId(),
                 'organizer'    => Tinebase_Core::getUser()->getId(),
                 'uid'          => Calendar_Model_Event::generateUID(),
                 Tinebase_Model_Grants::GRANT_READ    => true
@@ -142,7 +140,7 @@ class Calendar_Backend_SqlTest extends Calendar_TestCase
                 'dtend'        => '2009-04-11 02:00:00',
                 'summary'      => 'non recur event starting after search period => should _not_ be found',
                 'attendee'     => $this->_getAttendee(),
-                'container_id' => $this->_testCalendar->getId(),
+                'container_id' => $this->_getTestCalendar()->getId(),
                 'organizer'    => Tinebase_Core::getUser()->getId(),
                 'uid'          => Calendar_Model_Event::generateUID(),
                 Tinebase_Model_Grants::GRANT_READ    => true
@@ -153,11 +151,12 @@ class Calendar_Backend_SqlTest extends Calendar_TestCase
                 'rrule'        => 'FREQ=DAILY;INTERVAL=1;UNTIL=2009-04-02 23:59:59',
                 'summary'      => 'recur event ending before search period => should _not_ be found',
                 'attendee'     => $this->_getAttendee(),
-                'container_id' => $this->_testCalendar->getId(),
+                'container_id' => $this->_getTestCalendar()->getId(),
                 'organizer'    => Tinebase_Core::getUser()->getId(),
                 'uid'          => Calendar_Model_Event::generateUID(),
                 'rrule_until'  => '2009-04-02 23:59:59',
-                Tinebase_Model_Grants::GRANT_READ    => true
+                Tinebase_Model_Grants::GRANT_READ    => true,
+                'originator_tz' => Tinebase_Core::get(Tinebase_Core::USERTIMEZONE)
             ),
             array(
                 'dtstart'      => '2009-03-27 22:00:00',
@@ -165,11 +164,12 @@ class Calendar_Backend_SqlTest extends Calendar_TestCase
                 'rrule'        => 'FREQ=DAILY;INTERVAL=1;UNTIL=2009-04-05 23:59:59',
                 'summary'      => 'recur event ending within search period => should be found',
                 'attendee'     => $this->_getAttendee(),
-                'container_id' => $this->_testCalendar->getId(),
+                'container_id' => $this->_getTestCalendar()->getId(),
                 'organizer'    => Tinebase_Core::getUser()->getId(),
                 'uid'          => Calendar_Model_Event::generateUID(),
                 'rrule_until'  => '2009-04-05 23:59:59',
-                Tinebase_Model_Grants::GRANT_READ    => true
+                Tinebase_Model_Grants::GRANT_READ    => true,
+                'originator_tz' => Tinebase_Core::get(Tinebase_Core::USERTIMEZONE)
             ),
             array(
                 'dtstart'      => '2009-04-03 22:00:00',
@@ -177,11 +177,12 @@ class Calendar_Backend_SqlTest extends Calendar_TestCase
                 'rrule'        => 'FREQ=DAILY;INTERVAL=1;UNTIL=2009-04-06 23:59:59',
                 'summary'      => 'recur event completly within search period => should be found',
                 'attendee'     => $this->_getAttendee(),
-                'container_id' => $this->_testCalendar->getId(),
+                'container_id' => $this->_getTestCalendar()->getId(),
                 'organizer'    => Tinebase_Core::getUser()->getId(),
                 'uid'          => Calendar_Model_Event::generateUID(),
                 'rrule_until'  => '2009-04-06 23:59:59',
-                Tinebase_Model_Grants::GRANT_READ    => true
+                Tinebase_Model_Grants::GRANT_READ    => true,
+                'originator_tz' => Tinebase_Core::get(Tinebase_Core::USERTIMEZONE)
             ),
             array(
                 'dtstart'      => '2009-04-03 22:00:00',
@@ -189,11 +190,12 @@ class Calendar_Backend_SqlTest extends Calendar_TestCase
                 'rrule'        => 'FREQ=DAILY;INTERVAL=1;UNTIL=2009-04-12 23:59:59',
                 'summary'      => 'recur event starting within search period => should be found',
                 'attendee'     => $this->_getAttendee(),
-                'container_id' => $this->_testCalendar->getId(),
+                'container_id' => $this->_getTestCalendar()->getId(),
                 'organizer'    => Tinebase_Core::getUser()->getId(),
                 'uid'          => Calendar_Model_Event::generateUID(),
                 'rrule_until'  => '2009-04-12 23:59:59',
-                Tinebase_Model_Grants::GRANT_READ    => true
+                Tinebase_Model_Grants::GRANT_READ    => true,
+                'originator_tz' => Tinebase_Core::get(Tinebase_Core::USERTIMEZONE)
             ),
             array(
                 'dtstart'      => '2009-04-11 00:00:00',
@@ -201,11 +203,12 @@ class Calendar_Backend_SqlTest extends Calendar_TestCase
                 'rrule'        => 'FREQ=DAILY;INTERVAL=1;UNTIL=2009-04-15 02:00:00',
                 'summary'      => 'recur event starting after search period => should _not_ be found',
                 'attendee'     => $this->_getAttendee(),
-                'container_id' => $this->_testCalendar->getId(),
+                'container_id' => $this->_getTestCalendar()->getId(),
                 'organizer'    => Tinebase_Core::getUser()->getId(),
                 'uid'          => Calendar_Model_Event::generateUID(),
                 'rrule_until'  => '2009-04-15 02:00:00',
-                Tinebase_Model_Grants::GRANT_READ    => true
+                Tinebase_Model_Grants::GRANT_READ    => true,
+                'originator_tz' => Tinebase_Core::get(Tinebase_Core::USERTIMEZONE)
             )
         ));
         
@@ -218,7 +221,7 @@ class Calendar_Backend_SqlTest extends Calendar_TestCase
         }
         
         $filter = new Calendar_Model_EventFilter(array(
-            array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_testCalendar->getId()),
+            array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_getTestCalendar()->getId()),
             array('field' => 'period'      , 'operator' => 'within', 'value' => array(
                 'from'  => $from,
                 'until' => $until
index 8527c2f..0bb4061 100644 (file)
@@ -45,6 +45,7 @@ class Calendar_Controller_EventGrantsTests extends Calendar_TestCase
         $this->_setupTestCalendars();
         
         $this->_uit = Calendar_Controller_Event::getInstance();
+        $this->_uit->doContainerACLChecks(true);
     }
     
     public function tearDown()
@@ -61,7 +62,7 @@ class Calendar_Controller_EventGrantsTests extends Calendar_TestCase
      */
     public function testAddPersonalCalendarGrants()
     {
-        $grants = Tinebase_Container::getInstance()->getGrantsOfContainer($this->_testCalendar->getId(), TRUE);
+        $grants = Tinebase_Container::getInstance()->getGrantsOfContainer($this->_getTestCalendar()->getId(), TRUE);
         $anyoneIdx = array_search(Tinebase_Acl_Rights::ACCOUNT_TYPE_ANYONE, $grants->account_type);
         $this->assertTrue($anyoneIdx !== false, 'anyone has no grant entry');
         $this->assertTrue($grants[$anyoneIdx]->{Tinebase_Model_Grants::GRANT_FREEBUSY}, 'anyone has not freebusy grant');
@@ -185,7 +186,7 @@ class Calendar_Controller_EventGrantsTests extends Calendar_TestCase
         $persistentEvent = $this->_createEventInPersonasCalendar('rwright', 'rwright', 'sclever');
         
         $loadedEvent = $this->_uit->search(new Calendar_Model_EventFilter(array(
-            array('field' => 'container_id', 'operator' => 'equals', 'value' => "/personal/{$this->_personas['sclever']->getId()}"),
+            array('field' => 'container_id', 'operator' => 'equals', 'value' => "/personal/{$this->_getPersona('sclever')->getId()}"),
             array('field' => 'id', 'operator' => 'equals', 'value' => $persistentEvent->getId())
         )))->getFirstRecord();
         
@@ -341,8 +342,8 @@ class Calendar_Controller_EventGrantsTests extends Calendar_TestCase
     public function testFreeBusyViaAttendee()
     {
         // whipe grants from jmcblack
-        Tinebase_Container::getInstance()->setGrants($this->_personasDefaultCals['jmcblack'], new Tinebase_Record_RecordSet('Tinebase_Model_Grants', array(array(
-            'account_id'    => $this->_personas['jmcblack']->getId(),
+        Tinebase_Container::getInstance()->setGrants($this->_getPersonasDefaultCals('jmcblack'), new Tinebase_Record_RecordSet('Tinebase_Model_Grants', array(array(
+            'account_id'    => $this->_getPersona('jmcblack')->getId(),
             'account_type'  => 'user',
             Tinebase_Model_Grants::GRANT_READ     => true,
             Tinebase_Model_Grants::GRANT_ADD      => true,
@@ -362,7 +363,7 @@ class Calendar_Controller_EventGrantsTests extends Calendar_TestCase
                         array('field' => 'id', 'operator' => 'equals', 'value' => $persistentEvent->getId()),
                         array('field' => 'attender', 'operator' => 'in', 'value' => array(array(
                             'user_type' => 'user',
-                            'user_id'   => $this->_personas['rwright']->contact_id,
+                            'user_id'   => $this->_getPersona('rwright')->contact_id,
                         ))),
                     )
                 )
@@ -386,7 +387,7 @@ class Calendar_Controller_EventGrantsTests extends Calendar_TestCase
 //            array('field' => 'attender', 'operator' => 'in', 'value' => array(
 //                array(
 //                    'user_type' => Calendar_Model_Attender::USERTYPE_USER,
-//                    'user_id'   => $this->_personasContacts['rwright']->getId()
+//                    'user_id'   => $this->_getPersonasContacts('rwright')->getId()
 //                )
 //            ))
 //        )), NULL, FALSE, FALSE);
@@ -425,7 +426,7 @@ class Calendar_Controller_EventGrantsTests extends Calendar_TestCase
         $persistentEvent = $this->_createEventInPersonasCalendar('rwright', 'rwright');
         
         // for shure, this is esoteric, but it enshures that record GRANTS are in charge
-        Tinebase_Container::getInstance()->setGrants($this->_testCalendar, new Tinebase_Record_RecordSet('Tinebase_Model_Grants', array(array(
+        Tinebase_Container::getInstance()->setGrants($this->_getTestCalendar(), new Tinebase_Record_RecordSet('Tinebase_Model_Grants', array(array(
             'account_id'    => Tinebase_Core::getUser()->getId(),
             'account_type'  => 'user',
             Tinebase_Model_Grants::GRANT_FREEBUSY => FALSE,
@@ -470,8 +471,8 @@ class Calendar_Controller_EventGrantsTests extends Calendar_TestCase
         $this->markTestIncomplete('temporarily disabled until fixed');
         
         // set testuser to have editgrant for sclever
-        Tinebase_Container::getInstance()->setGrants($this->_personasDefaultCals['sclever'], new Tinebase_Record_RecordSet('Tinebase_Model_Grants', array(array(
-            'account_id'    => $this->_personas['sclever']->getId(),
+        Tinebase_Container::getInstance()->setGrants($this->_getPersonasDefaultCals('sclever'), new Tinebase_Record_RecordSet('Tinebase_Model_Grants', array(array(
+            'account_id'    => $this->_getPersona('sclever')->getId(),
             'account_type'  => 'user',
             Tinebase_Model_Grants::GRANT_READ     => true,
             Tinebase_Model_Grants::GRANT_ADD      => true,
@@ -514,9 +515,9 @@ class Calendar_Controller_EventGrantsTests extends Calendar_TestCase
     
     protected function _createEventInPersonasCalendar($_calendarPersona, $_organizerPersona = NULL, $_attenderPersona = NULL, $_classification = Calendar_Model_Event::CLASS_PUBLIC)
     {
-        $calendarId  = $this->_personasDefaultCals[$_calendarPersona]->getId();
-        $organizerId = $_organizerPersona ? $this->_personasContacts[$_organizerPersona]->getId() : $this->_testUserContact->getId();
-        $attenderId  = $_attenderPersona ? $this->_personasContacts[$_attenderPersona]->getId() : $this->_testUserContact->getId();
+        $calendarId  = $this->_getPersonasDefaultCals($_calendarPersona)->getId();
+        $organizerId = $_organizerPersona ? $this->_getPersonasContacts($_organizerPersona)->getId() : $this->_getTestUserContact()->getId();
+        $attenderId  = $_attenderPersona ? $this->_getPersonasContacts($_attenderPersona)->getId() : $this->_getTestUserContact()->getId();
         
         $event = $this->_getEvent();
         $event->class = $_classification;
@@ -549,8 +550,8 @@ class Calendar_Controller_EventGrantsTests extends Calendar_TestCase
     protected function _setupTestCalendars()
     {
         // jsmith:     anyone freebusyGrant, readGrant, addGrant, editGrant, deleteGrant
-        Tinebase_Container::getInstance()->setGrants($this->_personasDefaultCals['jsmith'], new Tinebase_Record_RecordSet('Tinebase_Model_Grants', array(array(
-            'account_id'    => $this->_personas['jsmith']->getId(),
+        Tinebase_Container::getInstance()->setGrants($this->_getPersonasDefaultCals('jsmith'), new Tinebase_Record_RecordSet('Tinebase_Model_Grants', array(array(
+            'account_id'    => $this->_getPersona('jsmith')->getId(),
             'account_type'  => 'user',
             Tinebase_Model_Grants::GRANT_READ     => true,
             Tinebase_Model_Grants::GRANT_ADD      => true,
@@ -571,8 +572,8 @@ class Calendar_Controller_EventGrantsTests extends Calendar_TestCase
         ))), true);
         
         // pwulf:      anyone readGrant, sclever addGrant, readGrant, editGrant, deleteGrant, privateGrant
-        Tinebase_Container::getInstance()->setGrants($this->_personasDefaultCals['pwulf'], new Tinebase_Record_RecordSet('Tinebase_Model_Grants', array(array(
-            'account_id'    => $this->_personas['pwulf']->getId(),
+        Tinebase_Container::getInstance()->setGrants($this->_getPersonasDefaultCals('pwulf'), new Tinebase_Record_RecordSet('Tinebase_Model_Grants', array(array(
+            'account_id'    => $this->_getPersona('pwulf')->getId(),
             'account_type'  => 'user',
             Tinebase_Model_Grants::GRANT_READ     => true,
             Tinebase_Model_Grants::GRANT_ADD      => true,
@@ -590,7 +591,7 @@ class Calendar_Controller_EventGrantsTests extends Calendar_TestCase
             Tinebase_Model_Grants::GRANT_DELETE   => false,
             Tinebase_Model_Grants::GRANT_ADMIN    => false,
         ), array(
-            'account_id'    => $this->_personas['sclever']->getId(),
+            'account_id'    => $this->_getPersona('sclever')->getId(),
             'account_type'  => 'user',
             Tinebase_Model_Grants::GRANT_READ     => true,
             Tinebase_Model_Grants::GRANT_ADD      => true,
@@ -601,8 +602,8 @@ class Calendar_Controller_EventGrantsTests extends Calendar_TestCase
         ))), true);
         
         // sclever:   testuser addGrant, readGrant, editGrant, deleteGrant, privateGrant
-        Tinebase_Container::getInstance()->setGrants($this->_personasDefaultCals['sclever'], new Tinebase_Record_RecordSet('Tinebase_Model_Grants', array(array(
-            'account_id'    => $this->_personas['sclever']->getId(),
+        Tinebase_Container::getInstance()->setGrants($this->_getPersonasDefaultCals('sclever'), new Tinebase_Record_RecordSet('Tinebase_Model_Grants', array(array(
+            'account_id'    => $this->_getPersona('sclever')->getId(),
             'account_type'  => 'user',
             Tinebase_Model_Grants::GRANT_READ     => true,
             Tinebase_Model_Grants::GRANT_ADD      => true,
@@ -623,8 +624,8 @@ class Calendar_Controller_EventGrantsTests extends Calendar_TestCase
         ))), true);
         
         // jmacblack: prim group of testuser readGrant, testuser privateGrant
-        Tinebase_Container::getInstance()->setGrants($this->_personasDefaultCals['jmcblack'], new Tinebase_Record_RecordSet('Tinebase_Model_Grants', array(array(
-            'account_id'    => $this->_personas['jmcblack']->getId(),
+        Tinebase_Container::getInstance()->setGrants($this->_getPersonasDefaultCals('jmcblack'), new Tinebase_Record_RecordSet('Tinebase_Model_Grants', array(array(
+            'account_id'    => $this->_getPersona('jmcblack')->getId(),
             'account_type'  => 'user',
             Tinebase_Model_Grants::GRANT_READ     => true,
             Tinebase_Model_Grants::GRANT_ADD      => true,
@@ -653,8 +654,8 @@ class Calendar_Controller_EventGrantsTests extends Calendar_TestCase
         ))), true);
         
         // rwright:   testuser freebusyGrant, sclever has readGrant and editGrant
-        Tinebase_Container::getInstance()->setGrants($this->_personasDefaultCals['rwright'], new Tinebase_Record_RecordSet('Tinebase_Model_Grants', array(array(
-            'account_id'    => $this->_personas['rwright']->getId(),
+        Tinebase_Container::getInstance()->setGrants($this->_getPersonasDefaultCals('rwright'), new Tinebase_Record_RecordSet('Tinebase_Model_Grants', array(array(
+            'account_id'    => $this->_getPersona('rwright')->getId(),
             'account_type'  => 'user',
             Tinebase_Model_Grants::GRANT_READ     => true,
             Tinebase_Model_Grants::GRANT_ADD      => true,
@@ -674,7 +675,7 @@ class Calendar_Controller_EventGrantsTests extends Calendar_TestCase
             Tinebase_Model_Grants::GRANT_ADMIN    => false,
             Tinebase_Model_Grants::GRANT_FREEBUSY => true,
         ), array(
-            'account_id'    => $this->_personas['sclever']->getId(),
+            'account_id'    => $this->_getPersona('sclever')->getId(),
             'account_type'  => 'user',
             Tinebase_Model_Grants::GRANT_READ     => true,
             Tinebase_Model_Grants::GRANT_ADD      => false,
@@ -689,9 +690,9 @@ class Calendar_Controller_EventGrantsTests extends Calendar_TestCase
      */
     protected function cleanupTestCalendars()
     {
-        foreach ($this->_personasDefaultCals as $loginName => $calendar) {
+        foreach ($this->_getAllPersonasDefaultCals() as $loginName => $calendar) {
             Tinebase_Container::getInstance()->setGrants($calendar, new Tinebase_Record_RecordSet('Tinebase_Model_Grants', array(array(
-                'account_id'    => $this->_personas[$loginName]->getId(),
+                'account_id'    => $this->_getPersona($loginName)->getId(),
                 'account_type'  => 'user',
                 Tinebase_Model_Grants::GRANT_READ     => true,
                 Tinebase_Model_Grants::GRANT_ADD      => true,
index 28ca194..120c856 100644 (file)
@@ -25,11 +25,6 @@ class Calendar_Controller_EventNotificationsTests extends Calendar_TestCase
      */
     protected $_notificationController;
     
-    /**
-     * @var Tinebase_Model_Container
-     */
-    protected $_testCalendar;
-    
    /**
     * email test class
     *
@@ -91,12 +86,28 @@ class Calendar_Controller_EventNotificationsTests extends Calendar_TestCase
         $this->_assertMail('pwulf, sclever, jmcblack, rwright', 'invit');
         
         self::flushMailer();
-        $persistentEvent = $this->_eventController->delete($persistentEvent);
+       
+        $persistentEvent = $this->_eventController->delete($persistentEvent); 
         $this->_assertMail('jsmith', NULL);
         $this->_assertMail('pwulf, sclever, jmcblack, rwright', 'cancel');
     }
 
     /**
+     * Test event creation with muted invitation
+     */
+    public function testMuteToogle()
+    {
+        $event = $this->_getEvent(false, /* $mute = */ 1);
+        $event->attendee = $this->_getPersonaAttendee('jsmith, pwulf, sclever, jmcblack, rwright');
+
+        self::flushMailer();
+        $persistentEvent = $this->_eventController->create($event);
+        $this->_assertMail('jsmith, pwulf, sclever, jmcblack, rwright', NULL);
+
+        $this->assertEquals($event->mute, 1);
+    }
+
+    /**
      * testInvitationWithAttachment
      * 
      * @see 0008592: append event file attachments to invitation mail
@@ -158,11 +169,11 @@ class Calendar_Controller_EventNotificationsTests extends Calendar_TestCase
         
         $persistentEvent->attendee->merge($this->_getPersonaAttendee('jsmith, sclever'));
         $persistentEvent->attendee->removeRecord(
-            $persistentEvent->attendee->find('user_id', $this->_personasContacts['pwulf']->getId())
+            $persistentEvent->attendee->find('user_id', $this->_getPersonasContacts('pwulf')->getId())
         );
-        $persistentEvent->attendee->find('user_id', $this->_personasContacts['rwright']->getId())->status =
+        $persistentEvent->attendee->find('user_id', $this->_getPersonasContacts('rwright')->getId())->status =
             Calendar_Model_Attender::STATUS_ACCEPTED;
-        $persistentEvent->attendee->find('user_id', $this->_personasContacts['jmcblack']->getId())->status =
+        $persistentEvent->attendee->find('user_id', $this->_getPersonasContacts('jmcblack')->getId())->status =
             Calendar_Model_Attender::STATUS_DECLINED;
             
         self::flushMailer();
@@ -235,7 +246,7 @@ class Calendar_Controller_EventNotificationsTests extends Calendar_TestCase
     {
         $event = $this->_getEvent();
         $event->attendee = $this->_getPersonaAttendee('jsmith, pwulf');
-        $event->organizer = $this->_personasContacts['jsmith']->getId();
+        $event->organizer = $this->_getPersonasContacts('jsmith')->getId();
         $persistentEvent = $this->_eventController->create($event);
         
         $persistentEvent->attendee[1]->status = Calendar_Model_Attender::STATUS_DECLINED;
@@ -252,7 +263,7 @@ class Calendar_Controller_EventNotificationsTests extends Calendar_TestCase
     {
         $event = $this->_getEvent(TRUE);
         $event->attendee = $this->_getPersonaAttendee('jsmith, pwulf');
-        $event->organizer = $this->_personasContacts['pwulf']->getId();
+        $event->organizer = $this->_getPersonasContacts('pwulf')->getId();
         $persistentEvent = $this->_eventController->create($event);
         
         $persistentEvent->attendee[1]->status = Calendar_Model_Attender::STATUS_DECLINED;
@@ -270,7 +281,7 @@ class Calendar_Controller_EventNotificationsTests extends Calendar_TestCase
     {
         $event = $this->_getEvent(TRUE);
         $event->attendee = $this->_getPersonaAttendee('pwulf');
-        $event->organizer = $this->_personasContacts['pwulf']->getId();
+        $event->organizer = $this->_getPersonasContacts('pwulf')->getId();
         
         // add nonaccount attender
         $nonAccountEmail = 'externer@example.org';
@@ -320,7 +331,7 @@ class Calendar_Controller_EventNotificationsTests extends Calendar_TestCase
                 'dtstart'       => '2012-03-14 09:00:00',
                 'dtend'         => '2012-03-14 10:00:00',
                 'rrule'         => 'FREQ=DAILY;INTERVAL=1',
-                'container_id'  => $this->_testCalendar->getId(),
+                'container_id'  => $this->_getTestCalendar()->getId(),
                 'attendee'      => $this->_getPersonaAttendee('jmcblack'),
         ));
         
@@ -375,7 +386,7 @@ class Calendar_Controller_EventNotificationsTests extends Calendar_TestCase
     {
         $event = $this->_getEvent();
         $event->attendee = $this->_getPersonaAttendee('sclever, pwulf');
-        $event->organizer = $this->_personasContacts['sclever']->getId();
+        $event->organizer = $this->_getPersonasContacts('sclever')->getId();
         
         $event->dtstart = Tinebase_DateTime::now()->addMinute(25);
         $event->dtend = clone $event->dtstart;
@@ -390,7 +401,7 @@ class Calendar_Controller_EventNotificationsTests extends Calendar_TestCase
         $event->alarms->setOption('skip', array(
             array(
                 'user_type' => Calendar_Model_Attender::USERTYPE_USER,
-                'user_id'   => $this->_personasContacts['pwulf']->getId(),
+                'user_id'   => $this->_getPersonasContacts('pwulf')->getId(),
             )
         ));
         
@@ -407,7 +418,7 @@ class Calendar_Controller_EventNotificationsTests extends Calendar_TestCase
     {
         $event = $this->_getEvent();
         $event->attendee = $this->_getPersonaAttendee('sclever, pwulf');
-        $event->organizer = $this->_personasContacts['sclever']->getId();
+        $event->organizer = $this->_getPersonasContacts('sclever')->getId();
         
         $event->dtstart = Tinebase_DateTime::now()->addMinute(25);
         $event->dtend = clone $event->dtstart;
@@ -419,7 +430,7 @@ class Calendar_Controller_EventNotificationsTests extends Calendar_TestCase
         ));
         $event->alarms->setOption('attendee', array(
             'user_type' => Calendar_Model_Attender::USERTYPE_USER,
-            'user_id'   => $this->_personasContacts['pwulf']->getId()
+            'user_id'   => $this->_getPersonasContacts('pwulf')->getId()
         ));
         
         Tinebase_Alarm::getInstance()->sendPendingAlarms("Tinebase_Event_Async_Minutely");
@@ -551,7 +562,7 @@ class Calendar_Controller_EventNotificationsTests extends Calendar_TestCase
     {
         $event = $this->_getEvent();
         $event->attendee = $this->_getPersonaAttendee('pwulf');
-        $event->organizer = $this->_personasContacts['pwulf']->getId();
+        $event->organizer = $this->_getPersonasContacts('pwulf')->getId();
         
         // lets flush mailer so next flushing ist faster!
         Tinebase_Alarm::getInstance()->sendPendingAlarms("Tinebase_Event_Async_Minutely");
@@ -601,7 +612,7 @@ class Calendar_Controller_EventNotificationsTests extends Calendar_TestCase
     {
         $event = $this->_getEvent();
         $event->attendee = $this->_getPersonaAttendee('pwulf');
-        $event->organizer = $this->_personasContacts['pwulf']->getId();
+        $event->organizer = $this->_getPersonasContacts('pwulf')->getId();
         
         $event->dtstart = Tinebase_DateTime::now()->subDay(1)->addMinute(15);
         $event->dtend = clone $event->dtstart;
@@ -653,7 +664,7 @@ class Calendar_Controller_EventNotificationsTests extends Calendar_TestCase
     {
         $event = $this->_getEvent();
         $event->attendee = $this->_getPersonaAttendee('pwulf');
-        $event->organizer = $this->_personasContacts['pwulf']->getId();
+        $event->organizer = $this->_getPersonasContacts('pwulf')->getId();
         
         $event->dtstart = Tinebase_DateTime::now()->addWeek(1)->addMinute(15);
         $event->dtend = clone $event->dtstart;
@@ -725,7 +736,7 @@ class Calendar_Controller_EventNotificationsTests extends Calendar_TestCase
             'summary'      => 'Cleanup',
             'dtstart'      => '2012-01-31 07:30:00',
             'dtend'        => '2012-01-31 10:30:00',
-            'container_id' => $this->_testCalendar->getId(),
+            'container_id' => $this->_getTestCalendar()->getId(),
             'uid'          => Calendar_Model_Event::generateUID(),
             'rrule'        => 'FREQ=WEEKLY;INTERVAL=1;WKST=MO;BYDAY=TU',
             'originator_tz'=> 'Europe/Berlin',
@@ -747,7 +758,7 @@ class Calendar_Controller_EventNotificationsTests extends Calendar_TestCase
     {
         $event = $this->_getEvent();
         $event->attendee = $this->_getPersonaAttendee('sclever, pwulf');
-        $event->organizer = $this->_personasContacts['sclever']->getId();
+        $event->organizer = $this->_getPersonasContacts('sclever')->getId();
         
         $event->dtstart = Tinebase_DateTime::now()->addMinute(25);
         $event->dtend = clone $event->dtstart;
@@ -1031,7 +1042,7 @@ class Calendar_Controller_EventNotificationsTests extends Calendar_TestCase
         self::flushMailer();
         $vcalendar = Calendar_Frontend_WebDAV_EventTest::getVCalendar(dirname(__FILE__) . '/../Import/files/apple_ical_remind_part1.ics');
         $id = Tinebase_Record_Abstract::generateUID();
-        $event = Calendar_Frontend_WebDAV_Event::create($this->_testCalendar, "$id.ics", $vcalendar);
+        $event = Calendar_Frontend_WebDAV_Event::create($this->_getTestCalendar(), "$id.ics", $vcalendar);
         
         return $event;
     }
@@ -1132,7 +1143,7 @@ class Calendar_Controller_EventNotificationsTests extends Calendar_TestCase
             $otherRecipients = array();
             $personaEmail = strstr($personaName, '@') ? 
                 $personaName : 
-                $this->_personas[trim($personaName)]->accountEmailAddress;
+                $this->_getPersona(trim($personaName))->accountEmailAddress;
             
             foreach ($messages as $message) {
                 if (array_value(0, $message->getRecipients()) == $personaEmail) {
@@ -1193,7 +1204,7 @@ class Calendar_Controller_EventNotificationsTests extends Calendar_TestCase
     {
         $attendee = new Tinebase_Record_RecordSet('Calendar_Model_Attender');
         foreach (explode(',', $_personas) as $personaName) {
-            $attendee->addRecord($this->_createAttender($this->_personasContacts[trim($personaName)]->getId()));
+            $attendee->addRecord($this->_createAttender($this->_getPersonasContacts(trim($personaName))->getId()));
         }
         
         return $attendee;
@@ -1217,32 +1228,32 @@ class Calendar_Controller_EventNotificationsTests extends Calendar_TestCase
         $calPreferences->setValueForUser(
             Calendar_Preference::NOTIFICATION_LEVEL, 
             Calendar_Controller_EventNotifications::NOTIFICATION_LEVEL_NONE,
-            $this->_personas['jsmith']->getId(), TRUE
+            $this->_getPersona('jsmith')->getId(), TRUE
         );
         $calPreferences->setValueForUser(
             Calendar_Preference::NOTIFICATION_LEVEL, 
             Calendar_Controller_EventNotifications::NOTIFICATION_LEVEL_INVITE_CANCEL,
-            $this->_personas['pwulf']->getId(), TRUE
+            $this->_getPersona('pwulf')->getId(), TRUE
         );
         $calPreferences->setValueForUser(
             Calendar_Preference::NOTIFICATION_LEVEL, 
             Calendar_Controller_EventNotifications::NOTIFICATION_LEVEL_EVENT_RESCHEDULE,
-            $this->_personas['sclever']->getId(), TRUE
+            $this->_getPersona('sclever')->getId(), TRUE
         );
         $calPreferences->setValueForUser(
             Calendar_Preference::NOTIFICATION_LEVEL, 
             Calendar_Controller_EventNotifications::NOTIFICATION_LEVEL_EVENT_UPDATE,
-            $this->_personas['jmcblack']->getId(), TRUE
+            $this->_getPersona('jmcblack')->getId(), TRUE
         );
         $calPreferences->setValueForUser(
             Calendar_Preference::NOTIFICATION_LEVEL, 
             Calendar_Controller_EventNotifications::NOTIFICATION_LEVEL_ATTENDEE_STATUS_UPDATE,
-            $this->_personas['rwright']->getId(), TRUE
+            $this->_getPersona('rwright')->getId(), TRUE
         );
         
         // set all languages to en
         $preferences = Tinebase_Core::getPreference('Tinebase');
-        foreach ($this->_personas as $name => $account) {
+        foreach ($this->_getPersonas() as $name => $account) {
             $preferences->setValueForUser(Tinebase_Preference::LOCALE, 'en', $account->getId(), TRUE);
         }
     }
index 70797df..163b385 100644 (file)
@@ -26,11 +26,6 @@ class Calendar_Controller_EventTests extends Calendar_TestCase
     protected $_controller;
     
     /**
-     * @var Tinebase_Model_Container
-     */
-    protected $_testCalendar;
-    
-    /**
      * (non-PHPdoc)
      * @see Calendar_TestCase::setUp()
      */
@@ -150,7 +145,7 @@ class Calendar_Controller_EventTests extends Calendar_TestCase
         $event->attendee = $this->_getAttendee();
         $event->attendee[1] = new Calendar_Model_Attender(array(
             'user_type' => Calendar_Model_Attender::USERTYPE_USER,
-            'user_id'   => $this->_personasContacts['pwulf']->getId(),
+            'user_id'   => $this->_getPersonasContacts('pwulf')->getId(),
         ));
         
         $persistentEvent = $this->_controller->create($event);
@@ -178,7 +173,7 @@ class Calendar_Controller_EventTests extends Calendar_TestCase
             
         $pwulf = $updatedEvent->attendee
             ->filter('user_type', Calendar_Model_Attender::USERTYPE_USER)
-            ->filter('user_id', $this->_personasContacts['pwulf']->getId())
+            ->filter('user_id', $this->_getPersonasContacts('pwulf')->getId())
             ->getFirstRecord();
 
         $this->assertEquals(Calendar_Model_Attender::STATUS_DECLINED, $currentUser->status, 'current users status must not be touched');
@@ -209,7 +204,7 @@ class Calendar_Controller_EventTests extends Calendar_TestCase
         $event->attendee = $this->_getAttendee();
         $event->attendee[1] = new Calendar_Model_Attender(array(
             'user_type' => Calendar_Model_Attender::USERTYPE_USER,
-            'user_id'   => $this->_personasContacts['pwulf']->getId()
+            'user_id'   => $this->_getPersonasContacts('pwulf')->getId()
         ));
         
         $persistendEvent = $this->_controller->create($event);
@@ -233,30 +228,30 @@ class Calendar_Controller_EventTests extends Calendar_TestCase
         $event1 = $this->_getEvent();
         $event1->attendee = new Tinebase_Record_RecordSet('Calendar_Model_Attender', array(
             array('user_id' => Tinebase_Core::getUser()->contact_id),
-            array('user_id' => $this->_personasContacts['pwulf']->getId())
+            array('user_id' => $this->_getPersonasContacts('pwulf')->getId())
         ));
         $persistentEvent1 = $this->_controller->create($event1);
         
         $event2 = $this->_getEvent();
         $event2->attendee = new Tinebase_Record_RecordSet('Calendar_Model_Attender', array(
             array('user_id' => Tinebase_Core::getUser()->contact_id),
-            array('user_id' => $this->_personasContacts['sclever']->getId()),
+            array('user_id' => $this->_getPersonasContacts('sclever')->getId()),
         ));
         $persistentEvent2 = $this->_controller->create($event2);
         
         $event3 = $this->_getEvent();
         $event3->attendee = new Tinebase_Record_RecordSet('Calendar_Model_Attender', array(
             array('user_id' => Tinebase_Core::getUser()->contact_id),
-            array('user_id' => $this->_personasContacts['sclever']->getId()),
+            array('user_id' => $this->_getPersonasContacts('sclever')->getId()),
         ));
         $persistentEvent3 = $this->_controller->create($event3);
         
         // test sclever
         $filter = new Calendar_Model_EventFilter(array(
-            array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_testCalendar->getId()),
+            array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_getTestCalendar()->getId()),
             array('field' => 'attender'    , 'operator' => 'equals', 'value' => array(
                 'user_type' => Calendar_Model_Attender::USERTYPE_USER,
-                'user_id'   => $this->_personasContacts['sclever']->getId()
+                'user_id'   => $this->_getPersonasContacts('sclever')->getId()
             )),
         ));
         $eventsFound = $this->_controller->search($filter, new Tinebase_Model_Pagination());
@@ -264,10 +259,10 @@ class Calendar_Controller_EventTests extends Calendar_TestCase
         
         // test pwulf
         $filter = new Calendar_Model_EventFilter(array(
-            array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_testCalendar->getId()),
+            array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_getTestCalendar()->getId()),
             array('field' => 'attender'    , 'operator' => 'equals', 'value' => array(
                 'user_type' => Calendar_Model_Attender::USERTYPE_USER,
-                'user_id'   => $this->_personasContacts['pwulf']->getId()
+                'user_id'   => $this->_getPersonasContacts('pwulf')->getId()
             )),
         ));
         $eventsFound = $this->_controller->search($filter, new Tinebase_Model_Pagination());
@@ -275,15 +270,15 @@ class Calendar_Controller_EventTests extends Calendar_TestCase
         
         // test sclever OR pwulf
         $filter = new Calendar_Model_EventFilter(array(
-            array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_testCalendar->getId()),
+            array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_getTestCalendar()->getId()),
             array('field' => 'attender'    , 'operator' => 'in',     'value' => array(
                 array(
                     'user_type' => Calendar_Model_Attender::USERTYPE_USER,
-                    'user_id'   => $this->_personasContacts['sclever']->getId()
+                    'user_id'   => $this->_getPersonasContacts('sclever')->getId()
                 ),
                 array (
                     'user_type' => Calendar_Model_Attender::USERTYPE_USER,
-                    'user_id'   => $this->_personasContacts['pwulf']->getId()
+                    'user_id'   => $this->_getPersonasContacts('pwulf')->getId()
                 )
             )),
         ));
@@ -296,29 +291,56 @@ class Calendar_Controller_EventTests extends Calendar_TestCase
         $event = $this->_getEvent();
         $event->attendee = new Tinebase_Record_RecordSet('Calendar_Model_Attender', array(
             array('user_id' => Tinebase_Core::getUser()->contact_id),
-            array('user_id' => $this->_personasContacts['sclever']->getId())
+            array('user_id' => $this->_getPersonasContacts('sclever')->getId())
         ));
         $persistentEvent = $this->_controller->create($event);
         
         $filter = new Calendar_Model_EventFilter(array(
-            array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_testCalendar->getId()),
+            array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_getTestCalendar()->getId()),
             array('field' => 'attender'    , 'operator' => 'in',     'value' => array(
                 array(
                     'user_type' => Calendar_Model_AttenderFilter::USERTYPE_MEMBEROF,
-                    'user_id'   => $this->_personas['sclever']->accountPrimaryGroup
+                    'user_id'   => $this->_getPersona('sclever')->accountPrimaryGroup
                 )
             )),
         ));
         $eventsFound = $this->_controller->search($filter, new Tinebase_Model_Pagination());
         $this->assertEquals(1, count($eventsFound), 'sclever is groupmember');
     }
-        
+    
+    public function testAttendeeNotInFilter()
+    {
+        foreach(array(Tinebase_Core::getUser()->contact_id, $this->_personasContacts['sclever']->getId()) as $attId) {
+            $event = $this->_getEvent();
+            $event->attendee = new Tinebase_Record_RecordSet('Calendar_Model_Attender', array(
+                    array('user_id' => $attId),
+            ));
+            $persistentEvent = $this->_controller->create($event);
+        }
+    
+        $filter = new Calendar_Model_EventFilter(array(
+                array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_testCalendar->getId()),
+                array('field' => 'attender'    , 'operator' => 'notin',  'value' => array(
+                        array(
+                                'user_type' => Calendar_Model_Attender::USERTYPE_USER,
+                                'user_id'   => $this->_personasContacts['sclever']->getId()
+                        )
+                )),
+        ));
+        $eventsFound = $this->_controller->search($filter, new Tinebase_Model_Pagination());
+        $this->assertEquals(1, count($eventsFound), 'should be one event only');
+        $this->assertEquals(
+                Tinebase_Core::getUser()->contact_id, 
+                $eventsFound->getFirstRecord()->attendee->getFirstRecord()->user_id,
+                'sclevers event should not be found');
+    }
+    
     public function testGetFreeBusyInfo()
     {
         $event = $this->_getEvent();
         $event->attendee = new Tinebase_Record_RecordSet('Calendar_Model_Attender', array(
-            array('user_id' => $this->_personasContacts['sclever']->getId()),
-            array('user_id' => $this->_personasContacts['pwulf']->getId())
+            array('user_id' => $this->_getPersonasContacts('sclever')->getId()),
+            array('user_id' => $this->_getPersonasContacts('pwulf')->getId())
         ));
         $persistentEvent = $this->_controller->create($event);
         
@@ -347,7 +369,7 @@ class Calendar_Controller_EventTests extends Calendar_TestCase
             'application_id' => Tinebase_Application::getInstance()->getApplicationByName('Calendar')->getId()
         ), true));
         
-        $this->_testCalendars->addRecord($testCal);
+        $this->_getTestCalendars()->addRecord($testCal);
         
         // create event in testcal
         $event = $this->_getEvent();
@@ -362,7 +384,7 @@ class Calendar_Controller_EventTests extends Calendar_TestCase
         $events = $this->_controller->search(new Calendar_Model_EventFilter(array(
             array('field' => 'attender', 'operator' => 'equals', 'value' => array(
                 'user_type' => Calendar_Model_Attender::USERTYPE_USER,
-                'user_id'   => $this->_testUserContact->getId()
+                'user_id'   => $this->_getTestUserContact()->getId()
             ))
         )), NULL, FALSE, FALSE);
         
@@ -375,15 +397,15 @@ class Calendar_Controller_EventTests extends Calendar_TestCase
         
         $event = $this->_getEvent();
         $event->attendee = new Tinebase_Record_RecordSet('Calendar_Model_Attender', array(
-            array('user_type' => Calendar_Model_Attender::USERTYPE_USER, 'user_id' => $this->_personasContacts['sclever']->getId()),
-            array('user_type' => Calendar_Model_Attender::USERTYPE_USER, 'user_id' => $this->_personasContacts['pwulf']->getId())
+            array('user_type' => Calendar_Model_Attender::USERTYPE_USER, 'user_id' => $this->_getPersonasContacts('sclever')->getId()),
+            array('user_type' => Calendar_Model_Attender::USERTYPE_USER, 'user_id' => $this->_getPersonasContacts('pwulf')->getId())
         ));
         $persistentEvent = $this->_controller->create($event);
         
         $conflictEvent = $this->_getEvent();
         $conflictEvent->attendee = new Tinebase_Record_RecordSet('Calendar_Model_Attender', array(
-            array('user_type' => Calendar_Model_Attender::USERTYPE_USER, 'user_id' => $this->_personasContacts['sclever']->getId()),
-            array('user_type' => Calendar_Model_Attender::USERTYPE_USER, 'user_id' => $this->_personasContacts['pwulf']->getId())
+            array('user_type' => Calendar_Model_Attender::USERTYPE_USER, 'user_id' => $this->_getPersonasContacts('sclever')->getId()),
+            array('user_type' => Calendar_Model_Attender::USERTYPE_USER, 'user_id' => $this->_getPersonasContacts('pwulf')->getId())
         ));
         
         try {
@@ -410,8 +432,8 @@ class Calendar_Controller_EventTests extends Calendar_TestCase
         
         $conflictEvent = $this->_getEvent();
         $conflictEvent->attendee = new Tinebase_Record_RecordSet('Calendar_Model_Attender', array(
-            array('user_type' => Calendar_Model_Attender::USERTYPE_USER, 'user_id' => $this->_personasContacts['sclever']->getId()),
-            array('user_type' => Calendar_Model_Attender::USERTYPE_USER, 'user_id' => $this->_personasContacts['pwulf']->getId())
+            array('user_type' => Calendar_Model_Attender::USERTYPE_USER, 'user_id' => $this->_getPersonasContacts('sclever')->getId()),
+            array('user_type' => Calendar_Model_Attender::USERTYPE_USER, 'user_id' => $this->_getPersonasContacts('pwulf')->getId())
         ));
         
         try {
@@ -435,8 +457,8 @@ class Calendar_Controller_EventTests extends Calendar_TestCase
         $nonConflictEvent = $this->_getEvent();
         $nonConflictEvent->transp = Calendar_Model_Event::TRANSP_TRANSP;
         $nonConflictEvent->attendee = new Tinebase_Record_RecordSet('Calendar_Model_Attender', array(
-            array('user_type' => Calendar_Model_Attender::USERTYPE_USER, 'user_id' => $this->_personasContacts['sclever']->getId()),
-            array('user_type' => Calendar_Model_Attender::USERTYPE_USER, 'user_id' => $this->_personasContacts['pwulf']->getId())
+            array('user_type' => Calendar_Model_Attender::USERTYPE_USER, 'user_id' => $this->_getPersonasContacts('sclever')->getId()),
+            array('user_type' => Calendar_Model_Attender::USERTYPE_USER, 'user_id' => $this->_getPersonasContacts('pwulf')->getId())
         ));
         
         $this->_controller->create($nonConflictEvent, TRUE);
@@ -451,8 +473,8 @@ class Calendar_Controller_EventTests extends Calendar_TestCase
         
         $nonConflictEvent = $this->_getEvent();
         $nonConflictEvent->attendee = new Tinebase_Record_RecordSet('Calendar_Model_Attender', array(
-            array('user_type' => Calendar_Model_Attender::USERTYPE_USER, 'user_id' => $this->_personasContacts['sclever']->getId()),
-            array('user_type' => Calendar_Model_Attender::USERTYPE_USER, 'user_id' => $this->_personasContacts['pwulf']->getId())
+            array('user_type' => Calendar_Model_Attender::USERTYPE_USER, 'user_id' => $this->_getPersonasContacts('sclever')->getId()),
+            array('user_type' => Calendar_Model_Attender::USERTYPE_USER, 'user_id' => $this->_getPersonasContacts('pwulf')->getId())
         ));
         
         $this->_controller->create($nonConflictEvent, TRUE);
@@ -648,10 +670,10 @@ class Calendar_Controller_EventTests extends Calendar_TestCase
         // assert test condition
         $pwulf = $persistentEvent->attendee
             ->filter('user_type', Calendar_Model_Attender::USERTYPE_GROUPMEMBER)
-            ->filter('user_id', $this->_personasContacts['pwulf']->getId());
+            ->filter('user_id', $this->_getPersonasContacts('pwulf')->getId());
         $this->assertEquals(0, count($pwulf), 'invalid test condition, pwulf should not be member or admin group');
         
-        Admin_Controller_Group::getInstance()->addGroupMember($defaultAdminGroup->getId(), $this->_personasContacts['pwulf']->account_id);
+        Admin_Controller_Group::getInstance()->addGroupMember($defaultAdminGroup->getId(), $this->_getPersonasContacts('pwulf')->account_id);
         if (isset(Tinebase_Core::getConfig()->actionqueue)) {
             Tinebase_ActionQueue::getInstance()->processQueue(10000);
         }
@@ -660,11 +682,11 @@ class Calendar_Controller_EventTests extends Calendar_TestCase
         // assert pwulf is in
         $pwulf = $loadedEvent->attendee
             ->filter('user_type', Calendar_Model_Attender::USERTYPE_GROUPMEMBER)
-            ->filter('user_id', $this->_personasContacts['pwulf']->getId());
+            ->filter('user_id', $this->_getPersonasContacts('pwulf')->getId());
         $this->assertEquals(1, count($pwulf), 'pwulf is not attender of event, but should be');
         
         
-        Admin_Controller_Group::getInstance()->removeGroupMember($defaultAdminGroup->getId(), $this->_personasContacts['pwulf']->account_id);
+        Admin_Controller_Group::getInstance()->removeGroupMember($defaultAdminGroup->getId(), $this->_getPersonasContacts('pwulf')->account_id);
         if (isset(Tinebase_Core::getConfig()->actionqueue)) {
             Tinebase_ActionQueue::getInstance()->processQueue(10000);
         }
@@ -673,7 +695,7 @@ class Calendar_Controller_EventTests extends Calendar_TestCase
         // assert pwulf is missing
         $pwulf = $loadedEvent->attendee
             ->filter('user_type', Calendar_Model_Attender::USERTYPE_GROUPMEMBER)
-            ->filter('user_id', $this->_personasContacts['pwulf']->getId());
+            ->filter('user_id', $this->_getPersonasContacts('pwulf')->getId());
         $this->assertEquals(0, count($pwulf), 'pwulf is attender of event, but not should be');
         
         // Test the same with update
@@ -688,7 +710,7 @@ class Calendar_Controller_EventTests extends Calendar_TestCase
         $loadedEvent = $this->_controller->get($persistentEvent->getId());
         $pwulf = $loadedEvent->attendee
             ->filter('user_type', Calendar_Model_Attender::USERTYPE_GROUPMEMBER)
-            ->filter('user_id', $this->_personasContacts['pwulf']->getId());
+            ->filter('user_id', $this->_getPersonasContacts('pwulf')->getId());
         $this->assertEquals(1, count($pwulf), 'pwulf is not attender of event, but should be (via update)');
         
         $group->members = array_diff(Admin_Controller_Group::getInstance()->getGroupMembers($defaultAdminGroup->getId()), array(array_value('pwulf', Zend_Registry::get('personas'))->getId()));
@@ -700,7 +722,7 @@ class Calendar_Controller_EventTests extends Calendar_TestCase
         $loadedEvent = $this->_controller->get($persistentEvent->getId());
         $pwulf = $loadedEvent->attendee
             ->filter('user_type', Calendar_Model_Attender::USERTYPE_GROUPMEMBER)
-            ->filter('user_id', $this->_personasContacts['pwulf']->getId());
+            ->filter('user_id', $this->_getPersonasContacts('pwulf')->getId());
         $this->assertEquals(0, count($pwulf), 'pwulf is attender of event, but not should be');
     }
     
@@ -814,7 +836,7 @@ class Calendar_Controller_EventTests extends Calendar_TestCase
         }
         
         $events = $this->_backend->search(new Calendar_Model_EventFilter(array(
-            array('field' => 'container_id', 'operator' => 'in', 'value' => $this->_testCalendars->getId()),
+            array('field' => 'container_id', 'operator' => 'in', 'value' => $this->_getTestCalendars()->getId()),
         )), new Tinebase_Model_Pagination(array()));
         
         $oldSeries = $events->filter('rrule_until', '/.+/', TRUE)->getFirstRecord();
@@ -839,7 +861,7 @@ class Calendar_Controller_EventTests extends Calendar_TestCase
         }
         
         $events = $this->_backend->search(new Calendar_Model_EventFilter(array(
-            array('field' => 'container_id', 'operator' => 'in', 'value' => $this->_testCalendars->getId()),
+            array('field' => 'container_id', 'operator' => 'in', 'value' => $this->_getTestCalendars()->getId()),
         )), new Tinebase_Model_Pagination(array()));
         
         $newSeries = $events->filter('rrule_until', '/^$/', TRUE)->getFirstRecord();
@@ -918,7 +940,7 @@ class Calendar_Controller_EventTests extends Calendar_TestCase
             'originator_tz' => 'Europe/Berlin',
             'rrule'         => 'FREQ=DAILY;INTERVAL=1;UNTIL=2009-04-02 21:59:59',
             'exdate'        => '2009-03-27 18:00:00,2009-03-31 17:00:00',
-            'container_id'  => $this->_testCalendar->getId(),
+            'container_id'  => $this->_getTestCalendar()->getId(),
             Tinebase_Model_Grants::GRANT_EDIT     => true,
         ));
         
@@ -997,7 +1019,7 @@ class Calendar_Controller_EventTests extends Calendar_TestCase
         
         $this->_controller->delete($persistentEvent->getId());
         
-        $contentSeq = Tinebase_Container::getInstance()->getContentSequence($this->_testCalendar);
+        $contentSeq = Tinebase_Container::getInstance()->getContentSequence($this->_getTestCalendar());
         $this->assertEquals(2, $contentSeq, 'container content seq should be increased 2 times!');
         
         $this->setExpectedException('Tinebase_Exception_NotFound');
@@ -1251,7 +1273,7 @@ class Calendar_Controller_EventTests extends Calendar_TestCase
         $persistentEvent = $this->testCreateEvent();
         
         $events = $this->_controller->search(new Calendar_Model_EventFilter(array(
-            array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_testCalendar->getId()),
+            array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_getTestCalendar()->getId()),
             array('field' => 'period', 'operator' => 'within', 'value' => array(
                 'from'  => '2009-04-07',
                 'until' => '2010-04-07'
@@ -1265,8 +1287,11 @@ class Calendar_Controller_EventTests extends Calendar_TestCase
      * returns a simple event
      *
      * @return Calendar_Model_Event
+     * @param bool $_now
+     * @param bool $mute
+     * @todo replace with TestCase::_getEvent
      */
-    protected function _getEvent($_now=FALSE)
+    protected function _getEvent($_now = FALSE, $mute = NULL)
     {
         $event = new Calendar_Model_Event(array(
             'summary'     => 'Mittagspause',
@@ -1274,7 +1299,7 @@ class Calendar_Controller_EventTests extends Calendar_TestCase
             'dtend'       => '2009-04-06 13:30:00',
             'description' => 'Wieslaw Brudzinski: Das Gesetz garantiert zwar die Mittagspause, aber nicht das Mittagessen...',
         
-            'container_id' => $this->_testCalendar->getId(),
+            'container_id' => $this->_getTestCalendar()->getId(),
             Tinebase_Model_Grants::GRANT_EDIT    => true,
         ));
         
@@ -1341,7 +1366,7 @@ class Calendar_Controller_EventTests extends Calendar_TestCase
             'dtend'       => '2014-04-06 19:00:00',
             'description' => 'Guten Appetit',
             
-            'container_id' => $this->_testCalendar->getId(),
+            'container_id' => $this->_getTestCalendar()->getId(),
             Tinebase_Model_Grants::GRANT_EDIT    => true,
             'customfields' => array('unittest' => 'Hello')
         ));
index bbc67ed..8271250 100644 (file)
@@ -24,6 +24,8 @@ class Calendar_Controller_MSEventFacadeTest extends Calendar_TestCase
     {
         parent::setUp();
         
+        Calendar_Controller_Event::getInstance()->doContainerACLChecks(true);
+        
         $this->_uit = Calendar_Controller_MSEventFacade::getInstance();
         $this->_uit->setEventFilter(new Calendar_Model_EventFilter(array(
             array('field' => 'attender', 'operator' => 'equals', 'value' => array(
@@ -53,22 +55,22 @@ class Calendar_Controller_MSEventFacadeTest extends Calendar_TestCase
         ), TRUE);
         $event->alarms[0]->setOption('skip', array(array(
             'user_type' => Calendar_Model_Attender::USERTYPE_USER,
-            'user_id'   => $this->_testUserContact->getId(),
+            'user_id'   => $this->_getTestUserContact()->getId(),
             'organizer' => Tinebase_Core::getUser()->contact_id
         )));
         $event->alarms[1]->setOption('attendee', array(
             'user_type' => Calendar_Model_Attender::USERTYPE_USER,
-            'user_id'   => $this->_testUserContact->getId(),
+            'user_id'   => $this->_getTestUserContact()->getId(),
             'organizer' => Tinebase_Core::getUser()->contact_id
         ));
         $event->alarms[2]->setOption('skip', array(array(
             'user_type' => Calendar_Model_Attender::USERTYPE_USER,
-            'user_id'   => $this->_personasContacts['sclever']->getId(),
+            'user_id'   => $this->_getPersonasContacts('sclever')->getId(),
             'organizer' => Tinebase_Core::getUser()->contact_id
         )));
         $event->alarms[3]->setOption('attendee', array(
             'user_type' => Calendar_Model_Attender::USERTYPE_USER,
-            'user_id'   => $this->_personasContacts['sclever']->getId(),
+            'user_id'   => $this->_getPersonasContacts('sclever')->getId(),
             'organizer' => Tinebase_Core::getUser()->contact_id
         ));
         
@@ -125,7 +127,7 @@ class Calendar_Controller_MSEventFacadeTest extends Calendar_TestCase
         $this->testCreate();
         
         $events = $this->_uit->search(new Calendar_Model_EventFilter(array(
-            array('field' => 'container_id', 'operator' => 'in', 'value' => $this->_testCalendars->getId()),
+            array('field' => 'container_id', 'operator' => 'in', 'value' => $this->_getTestCalendars()->getId()),
         )));
         
         $this->assertEquals(1, $events->count());
@@ -141,7 +143,7 @@ class Calendar_Controller_MSEventFacadeTest extends Calendar_TestCase
         $cbe->delete($event->getId());
         
         $events = $this->_uit->search(new Calendar_Model_EventFilter(array(
-            array('field' => 'container_id', 'operator' => 'in', 'value' => $this->_testCalendars->getId()),
+            array('field' => 'container_id', 'operator' => 'in', 'value' => $this->_getTestCalendars()->getId()),
         )));
         
         $this->assertEquals(1, $events->count());
@@ -167,7 +169,7 @@ class Calendar_Controller_MSEventFacadeTest extends Calendar_TestCase
         $this->_assertTestEvent($event);
         
         $sclever = new Calendar_Model_Attender(array(
-            'user_id'        => $this->_personasContacts['sclever']->getId(),
+            'user_id'        => $this->_getPersonasContacts('sclever')->getId(),
             'user_type'      => Calendar_Model_Attender::USERTYPE_USER,
         ));
         
@@ -200,7 +202,7 @@ class Calendar_Controller_MSEventFacadeTest extends Calendar_TestCase
         $event = $this->testCreate();
         
         $sclever = new Calendar_Model_Attender(array(
-            'user_id'        => $this->_personasContacts['sclever']->getId(),
+            'user_id'        => $this->_getPersonasContacts('sclever')->getId(),
             'user_type'      => Calendar_Model_Attender::USERTYPE_USER,
         ));
         $currUser = $this->_uit->setCalendarUser($sclever);
@@ -420,7 +422,7 @@ class Calendar_Controller_MSEventFacadeTest extends Calendar_TestCase
         $this->_uit->setEventFilter(new Calendar_Model_EventFilter(array(
             array('field' => 'attender', 'operator' => 'equals', 'value' => array(
                 'user_type'    => Calendar_Model_Attender::USERTYPE_USER,
-                'user_id'      => $this->_personasContacts['sclever']->getId(),
+                'user_id'      => $this->_getPersonasContacts('sclever')->getId(),
             )),
             array(
                 'field' => 'attender_status', 'operator' => 'notin', 'value' => array(
index 9a83f0a..ed6806c 100644 (file)
@@ -4,16 +4,11 @@
  * 
  * @package     Calendar
  * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
- * @copyright   Copyright (c) 2010-2013 Metaways Infosystems GmbH (http://www.metaways.de)
+ * @copyright   Copyright (c) 2010-2014 Metaways Infosystems GmbH (http://www.metaways.de)
  * @author      Goekmen Ciyiltepe <g.ciyiltepe@metaways.de>
  */
 
 /**
- * Test helper
- */
-require_once dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . 'TestHelper.php';
-
-/**
  * Test class for Calendar_Controller_Event
  * 
  * @package     Calendar
@@ -40,7 +35,7 @@ class Calendar_Controller_RecurTest extends Calendar_TestCase
             'dtend'         => '2012-06-01 18:30:00',
             'originator_tz' => 'Europe/Berlin',
             'rrule'         => 'FREQ=DAILY;INTERVAL=1;UNTIL=2011-05-31 17:30:00',
-            'container_id'  => $this->_testCalendar->getId(),
+            'container_id'  => $this->_getTestCalendar()->getId(),
         ));
         
         $this->setExpectedException('Tinebase_Exception_Record_Validation');
@@ -90,7 +85,7 @@ class Calendar_Controller_RecurTest extends Calendar_TestCase
             'dtend'         => '2011-04-20 15:30:00',
             'originator_tz' => 'Europe/Berlin',
             'rrule'         => 'FREQ=WEEKLY;INTERVAL=3;WKST=SU;BYDAY=TU,TH',
-            'container_id'  => $this->_testCalendar->getId(),
+            'container_id'  => $this->_getTestCalendar()->getId(),
             Tinebase_Model_Grants::GRANT_EDIT     => true,
         ));
         
@@ -103,7 +98,7 @@ class Calendar_Controller_RecurTest extends Calendar_TestCase
         $persistentEventException = $this->_controller->createRecurException($eventException);
         
         $weekviewEvents = $this->_controller->search(new Calendar_Model_EventFilter(array(
-            array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_testCalendar->getId()),
+            array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_getTestCalendar()->getId()),
         )));
         
         Calendar_Model_Rrule::mergeRecurrenceSet($weekviewEvents, $from, $until);
@@ -174,14 +169,14 @@ class Calendar_Controller_RecurTest extends Calendar_TestCase
                 'dtend'         => '2012-02-22 15:30:00',
                 'originator_tz' => 'Europe/Berlin',
                 'rrule'         => 'FREQ=DAILY;COUNT=3',
-                'container_id'  => $this->_testCalendar->getId(),
+                'container_id'  => $this->_getTestCalendar()->getId(),
         ));
         
         $persistentEvent = $this->_controller->create($event);
         
         // create exception
         $weekviewEvents = $this->_controller->search(new Calendar_Model_EventFilter(array(
-            array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_testCalendar->getId()),
+            array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_getTestCalendar()->getId()),
         )));
         Calendar_Model_Rrule::mergeRecurrenceSet($weekviewEvents, $from, $until);
         $weekviewEvents[2]->dtstart->subHour(5);
@@ -190,7 +185,7 @@ class Calendar_Controller_RecurTest extends Calendar_TestCase
         
         // load series
         $weekviewEvents = $this->_controller->search(new Calendar_Model_EventFilter(array(
-            array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_testCalendar->getId()),
+            array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_getTestCalendar()->getId()),
         )));
         Calendar_Model_Rrule::mergeRecurrenceSet($weekviewEvents, $from, $until);
         $weekviewEvents->sort('dtstart', 'ASC');
@@ -215,14 +210,14 @@ class Calendar_Controller_RecurTest extends Calendar_TestCase
             'is_all_day_event'  => true,
             'originator_tz' => 'Europe/Berlin',
             'rrule'         => 'FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH',
-            'container_id'  => $this->_testCalendar->getId(),
+            'container_id'  => $this->_getTestCalendar()->getId(),
             Tinebase_Model_Grants::GRANT_EDIT     => true,
         ));
         
         $persistentEvent = $this->_controller->create($event);
         
         $weekviewEvents = $this->_controller->search(new Calendar_Model_EventFilter(array(
-            array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_testCalendar->getId()),
+            array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_getTestCalendar()->getId()),
         )));
         
         Calendar_Model_Rrule::mergeRecurrenceSet($weekviewEvents, $from, $until);
@@ -233,7 +228,7 @@ class Calendar_Controller_RecurTest extends Calendar_TestCase
         $persistentEventException = $this->_controller->createRecurException($exception, TRUE);
         
         $weekviewEvents = $this->_controller->search(new Calendar_Model_EventFilter(array(
-            array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_testCalendar->getId()),
+            array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_getTestCalendar()->getId()),
         )));
         
         Calendar_Model_Rrule::mergeRecurrenceSet($weekviewEvents, $from, $until);
@@ -254,7 +249,7 @@ class Calendar_Controller_RecurTest extends Calendar_TestCase
             'originator_tz' => 'Europe/Berlin',
             'rrule'         => 'FREQ=DAILY;INTERVAL=1;UNTIL=2009-03-31 17:30:00',
             'exdate'        => '2009-03-27 18:00:00,2009-03-29 17:00:00',
-            'container_id'  => $this->_testCalendar->getId(),
+            'container_id'  => $this->_getTestCalendar()->getId(),
             Tinebase_Model_Grants::GRANT_EDIT     => true,
         ));
         $event->attendee = $this->_getAttendee();
@@ -297,7 +292,7 @@ class Calendar_Controller_RecurTest extends Calendar_TestCase
             'dtend'         => '2011-04-20 15:30:00',
             'originator_tz' => 'Europe/Berlin',
             'rrule'         => 'FREQ=WEEKLY;INTERVAL=3;WKST=SU;BYDAY=TU,TH',
-            'container_id'  => $this->_testCalendar->getId(),
+            'container_id'  => $this->_getTestCalendar()->getId(),
             Tinebase_Model_Grants::GRANT_EDIT     => true,
         ));
         $event->attendee = $this->_getAttendee();
@@ -310,7 +305,7 @@ class Calendar_Controller_RecurTest extends Calendar_TestCase
         $this->_controller->attenderStatusCreateRecurException(clone $persistentEvent, $attendee, $attendee->status_authkey);
         
         $weekviewEvents = $this->_controller->search(new Calendar_Model_EventFilter(array(
-            array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_testCalendar->getId()),
+            array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_getTestCalendar()->getId()),
         )));
         
         Calendar_Model_Rrule::mergeRecurrenceSet($weekviewEvents, $from, $until);
@@ -328,15 +323,15 @@ class Calendar_Controller_RecurTest extends Calendar_TestCase
         $event->dtstart = '2010-05-20 06:00:00';
         $event->dtend = '2010-05-20 06:15:00';
         $event->attendee = new Tinebase_Record_RecordSet('Calendar_Model_Attender', array(
-            array('user_type' => Calendar_Model_Attender::USERTYPE_USER, 'user_id' => $this->_personasContacts['sclever']->getId()),
-            array('user_type' => Calendar_Model_Attender::USERTYPE_USER, 'user_id' => $this->_personasContacts['pwulf']->getId())
+            array('user_type' => Calendar_Model_Attender::USERTYPE_USER, 'user_id' => $this->_getPersonasContacts('sclever')->getId()),
+            array('user_type' => Calendar_Model_Attender::USERTYPE_USER, 'user_id' => $this->_getPersonasContacts('pwulf')->getId())
         ));
         $this->_controller->create($event);
 
         $event1 = $this->_getRecurEvent();
         $event1->attendee = new Tinebase_Record_RecordSet('Calendar_Model_Attender', array(
-            array('user_type' => Calendar_Model_Attender::USERTYPE_USER, 'user_id' => $this->_personasContacts['sclever']->getId()),
-            array('user_type' => Calendar_Model_Attender::USERTYPE_USER, 'user_id' => $this->_personasContacts['pwulf']->getId())
+            array('user_type' => Calendar_Model_Attender::USERTYPE_USER, 'user_id' => $this->_getPersonasContacts('sclever')->getId()),
+            array('user_type' => Calendar_Model_Attender::USERTYPE_USER, 'user_id' => $this->_getPersonasContacts('pwulf')->getId())
         ));
         
         $this->setExpectedException('Calendar_Exception_AttendeeBusy');
@@ -352,15 +347,15 @@ class Calendar_Controller_RecurTest extends Calendar_TestCase
         $event->dtstart = '2010-05-20 06:00:00';
         $event->dtend = '2010-05-20 06:15:00';
         $event->attendee = new Tinebase_Record_RecordSet('Calendar_Model_Attender', array(
-            array('user_type' => Calendar_Model_Attender::USERTYPE_USER, 'user_id' => $this->_personasContacts['sclever']->getId()),
-            array('user_type' => Calendar_Model_Attender::USERTYPE_USER, 'user_id' => $this->_personasContacts['pwulf']->getId())
+            array('user_type' => Calendar_Model_Attender::USERTYPE_USER, 'user_id' => $this->_getPersonasContacts('sclever')->getId()),
+            array('user_type' => Calendar_Model_Attender::USERTYPE_USER, 'user_id' => $this->_getPersonasContacts('pwulf')->getId())
         ));
         $this->_controller->create($event);
 
         $event1 = $this->_getRecurEvent();
         $event1->attendee = new Tinebase_Record_RecordSet('Calendar_Model_Attender', array(
-            array('user_type' => Calendar_Model_Attender::USERTYPE_USER, 'user_id' => $this->_personasContacts['sclever']->getId()),
-            array('user_type' => Calendar_Model_Attender::USERTYPE_USER, 'user_id' => $this->_personasContacts['pwulf']->getId())
+            array('user_type' => Calendar_Model_Attender::USERTYPE_USER, 'user_id' => $this->_getPersonasContacts('sclever')->getId()),
+            array('user_type' => Calendar_Model_Attender::USERTYPE_USER, 'user_id' => $this->_getPersonasContacts('pwulf')->getId())
         ));
         
         $event1 = $this->_controller->create($event1);
@@ -382,8 +377,8 @@ class Calendar_Controller_RecurTest extends Calendar_TestCase
         $event = $this->_getRecurEvent();
         $event->rrule = "FREQ=MONTHLY;INTERVAL=1;BYDAY=3TH";
         $event->attendee = new Tinebase_Record_RecordSet('Calendar_Model_Attender', array(
-            array('user_type' => Calendar_Model_Attender::USERTYPE_USER, 'user_id' => $this->_personasContacts['sclever']->getId()),
-            array('user_type' => Calendar_Model_Attender::USERTYPE_USER, 'user_id' => $this->_personasContacts['pwulf']->getId())
+            array('user_type' => Calendar_Model_Attender::USERTYPE_USER, 'user_id' => $this->_getPersonasContacts('sclever')->getId()),
+            array('user_type' => Calendar_Model_Attender::USERTYPE_USER, 'user_id' => $this->_getPersonasContacts('pwulf')->getId())
         ));
         
         $persistentRecurEvent = $this->_controller->create($event);
@@ -411,7 +406,9 @@ class Calendar_Controller_RecurTest extends Calendar_TestCase
         Calendar_Model_Rrule::mergeRecurrenceSet($weekviewEvents, $from, $until);
         
         // make sure the 17.6. is not in the set
-        $this->assertEquals(1, count($weekviewEvents), '17.6. is an exception date and must not be part of this weekview');
+        $this->assertEquals(0, count($weekviewEvents),
+                '17.6. is an exception date and must not be part of this weekview: '
+                . print_r($weekviewEvents->toArray(), true));
     }
     
     public function testCreateRecurExceptionPreserveAttendeeStatus()
@@ -424,7 +421,7 @@ class Calendar_Controller_RecurTest extends Calendar_TestCase
                 'dtstart'       => '2012-03-13 09:00:00',
                 'dtend'         => '2012-03-13 10:00:00',
                 'rrule'         => 'FREQ=DAILY;INTERVAL=1',
-                'container_id'  => $this->_testCalendar->getId(),
+                'container_id'  => $this->_getTestCalendar()->getId(),
                 'attendee'      => $this->_getAttendee(),
         ));
         
@@ -470,7 +467,7 @@ class Calendar_Controller_RecurTest extends Calendar_TestCase
             'dtend'         => '2011-04-21 12:00:00',
             'originator_tz' => 'Europe/Berlin',
             'rrule'         => 'FREQ=DAILY;INTERVAL=1;UNTIL=2011-04-27 21:59:59',
-            'container_id'  => $this->_testCalendar->getId()
+            'container_id'  => $this->_getTestCalendar()->getId()
         ));
         
         $persistentEvent = $this->_controller->create($event);
@@ -507,7 +504,7 @@ class Calendar_Controller_RecurTest extends Calendar_TestCase
         $newBaseEvent = $this->_controller->createRecurException($recurSet[3], FALSE, TRUE);
         
         $events = $this->_controller->search(new Calendar_Model_EventFilter(array(
-            array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_testCalendar->getId()),
+            array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_getTestCalendar()->getId()),
             array('field' => 'period', 'operator' => 'within', 'value' => array('from' => $from, 'until' => $until),
         ))));
         
@@ -566,7 +563,7 @@ class Calendar_Controller_RecurTest extends Calendar_TestCase
             'dtstart'       => '2012-02-03 09:00:00',
             'dtend'         => '2012-02-03 10:00:00',
             'rrule'         => 'FREQ=DAILY;INTERVAL=1',
-            'container_id'  => $this->_testCalendar->getId(),
+            'container_id'  => $this->_getTestCalendar()->getId(),
             'attendee'      => $this->_getAttendee(),
         ));
         
@@ -604,7 +601,7 @@ class Calendar_Controller_RecurTest extends Calendar_TestCase
             'dtend'         => '2012-06-01 12:00:00',
             'originator_tz' => 'Europe/Berlin',
             'rrule'         => 'FREQ=WEEKLY;INTERVAL=1',
-            'container_id'  => $this->_testCalendar->getId()
+            'container_id'  => $this->_getTestCalendar()->getId()
         ));
         
         $persistentEvent = $this->_controller->create($event);
@@ -637,7 +634,7 @@ class Calendar_Controller_RecurTest extends Calendar_TestCase
             'dtstart'       => '2012-02-03 09:00:00',
             'dtend'         => '2012-02-03 10:00:00',
             'rrule'         => 'FREQ=DAILY;INTERVAL=1',
-            'container_id'  => $this->_testCalendar->getId(),
+            'container_id'  => $this->_getTestCalendar()->getId(),
             'attendee'      => $this->_getAttendee(),
         ));
         
@@ -653,7 +650,7 @@ class Calendar_Controller_RecurTest extends Calendar_TestCase
         $this->_controller->attenderStatusCreateRecurException($start, $sclever, $sclever->status_authkey, TRUE);
         
         $events = $this->_controller->search(new Calendar_Model_EventFilter(array(
-            array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_testCalendar->getId())
+            array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_getTestCalendar()->getId())
         )))->sort('dtstart', 'ASC');
         
         // assert two baseEvents
@@ -683,7 +680,7 @@ class Calendar_Controller_RecurTest extends Calendar_TestCase
         
         $recurSet[5]->attendee->addRecord(new Calendar_Model_Attender(array(
             'user_type'   => Calendar_Model_Attender::USERTYPE_USER,
-            'user_id'     => $this->_personasContacts['pwulf']->getId()
+            'user_id'     => $this->_getPersonasContacts('pwulf')->getId()
         )));
         
         $updatedPersistentEvent = $this->_controller->createRecurException($recurSet[5], FALSE, TRUE);
@@ -704,7 +701,7 @@ class Calendar_Controller_RecurTest extends Calendar_TestCase
             'dtstart'       => $dtstart->toString(),
             'dtend'         => $dtstart->addHour(1)->toString(),
             'rrule'         => 'FREQ=DAILY;INTERVAL=1',
-            'container_id'  => $this->_testCalendar->getId(),
+            'container_id'  => $this->_getTestCalendar()->getId(),
             'attendee'      => $this->_getAttendee(),
         ));
         return $this->_controller->create($event);
@@ -725,14 +722,14 @@ class Calendar_Controller_RecurTest extends Calendar_TestCase
             'dtend'         => '2012-02-21 15:30:00',
             'originator_tz' => 'Europe/Berlin',
             'rrule'         => 'FREQ=DAILY;COUNT=5',
-            'container_id'  => $this->_testCalendar->getId(),
+            'container_id'  => $this->_getTestCalendar()->getId(),
         ));
         
         $persistentEvent = $this->_controller->create($event);
         
         // create exception
         $weekviewEvents = $this->_controller->search(new Calendar_Model_EventFilter(array(
-            array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_testCalendar->getId()),
+            array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_getTestCalendar()->getId()),
         )));
         Calendar_Model_Rrule::mergeRecurrenceSet($weekviewEvents, $from, $until);
         $weekviewEvents[2]->dtstart->subHour(5);
@@ -741,7 +738,7 @@ class Calendar_Controller_RecurTest extends Calendar_TestCase
         
         // load events
         $weekviewEvents = $this->_controller->search(new Calendar_Model_EventFilter(array(
-            array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_testCalendar->getId()),
+            array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_getTestCalendar()->getId()),
         )));
         Calendar_Model_Rrule::mergeRecurrenceSet($weekviewEvents, $from, $until);
         $weekviewEvents->sort('dtstart', 'ASC');
@@ -792,7 +789,7 @@ class Calendar_Controller_RecurTest extends Calendar_TestCase
             'dtend'       => '2010-05-20 06:15:00',
             'description' => 'Breakfast',
             'rrule'       => 'FREQ=DAILY;INTERVAL=1',    
-            'container_id' => $this->_testCalendar->getId(),
+            'container_id' => $this->_getTestCalendar()->getId(),
             Tinebase_Model_Grants::GRANT_EDIT    => true,
         ));
     }
index 342338b..e3a2a43 100644 (file)
@@ -94,8 +94,8 @@ class Calendar_Controller_ResourceTest extends Calendar_TestCase
         $persistentEvent = Calendar_Controller_Event::getInstance()->create($event);
         
         // we need to adopt conainer through backend, to bypass rights control
-        $persistentEvent->container_id = $this->_personasDefaultCals['rwright']->getId();
-        $persistentEvent->organizer = $this->_personasContacts['rwright']->getId();
+        $persistentEvent->container_id = $this->_getPersonasDefaultCals('rwright')->getId();
+        $persistentEvent->organizer = $this->_getPersonasContacts('rwright')->getId();
         $this->_backend->update($persistentEvent);
 
         
index 0c739e2..ecb73ce 100644 (file)
@@ -191,7 +191,7 @@ class Calendar_Export_ICalTest extends Calendar_TestCase
         
         $this->_testNeedsTransaction();
         $cmd = realpath(__DIR__ . "/../../../../tine20/tine20.php") . ' --method Calendar.exportICS ' .
-            $this->_testCalendar->getId() ;
+            $this->_getTestCalendar()->getId() ;
         
         $cmd = TestServer::assembleCliCommand($cmd, TRUE);
         exec($cmd, $output);
@@ -209,7 +209,7 @@ class Calendar_Export_ICalTest extends Calendar_TestCase
     {
         $cli = new Calendar_Frontend_Cli();
         try {
-            $cli->exportICS(new Zend_Console_Getopt('abp:', array($this->_testCalendar->getId())));
+            $cli->exportICS(new Zend_Console_Getopt('abp:', array($this->_getTestCalendar()->getId())));
             $this->fail('Expected tinbase exception.');
         } catch (Tinebase_Exception $e){
             $this->assertTrue(true);
index f42b61e..ad2de2c 100644 (file)
@@ -67,6 +67,7 @@ class Calendar_Frontend_WebDAV_ContainerTest extends PHPUnit_Framework_TestCase
     protected function tearDown()
     {
         Tinebase_TransactionManager::getInstance()->rollBack();
+        Calendar_Config::getInstance()->set(Calendar_Config::SKIP_DOUBLE_EVENTS, '');
     }
     
     /**
@@ -185,7 +186,7 @@ class Calendar_Frontend_WebDAV_ContainerTest extends PHPUnit_Framework_TestCase
      * test getChildren
      * 
      */
-    public function testGetChildren()
+    public function testGetChildren($skipAssertions = true)
     {
         $event = $this->testCreateFile()->getRecord();
         
@@ -198,8 +199,23 @@ class Calendar_Frontend_WebDAV_ContainerTest extends PHPUnit_Framework_TestCase
         
         $children = $container->getChildren();
         
-        $this->assertEquals(1, count($children));
-        $this->assertTrue($children[0] instanceof Calendar_Frontend_WebDAV_Event);
+        if (! $skipAssertions) {
+            $this->assertEquals(1, count($children));
+            $this->assertTrue($children[0] instanceof Calendar_Frontend_WebDAV_Event);
+        }
+        
+        return $children;
+    }
+    
+    public function testGetChildrenSkipDoubleEvents()
+    {
+        Calendar_Config::getInstance()->set(Calendar_Config::SKIP_DOUBLE_EVENTS, 'personal');
+        $children = $this->testGetChildren(true);
+        $this->assertEquals(0, count($children));
+        
+        Calendar_Config::getInstance()->set(Calendar_Config::SKIP_DOUBLE_EVENTS, 'shared');
+        $children = $this->testGetChildren(true);
+        $this->assertEquals(2, count($children));
     }
     
     /**
index 914e9a6..79d0c36 100644 (file)
@@ -248,10 +248,10 @@ class Calendar_Frontend_WebDAV_EventTest extends Calendar_TestCase
         $event = Calendar_Frontend_WebDAV_Event::create($this->objects['initialContainer'], "$id.ics", $vcalendar);
         
         $event = Calendar_Controller_Event::getInstance()->get($id);
-        $pwulf = $event->attendee->filter('user_id', $this->_personasContacts['pwulf']->getId())->getFirstRecord();
+        $pwulf = $event->attendee->filter('user_id', $this->_getPersonasContacts('pwulf')->getId())->getFirstRecord();
         
         $this->assertTrue($pwulf !== null, 'could not find pwulf in attendee: ' . print_r($event->attendee->toArray(), true));
-        $this->assertEquals($this->_personasDefaultCals['pwulf']->getId(), $pwulf->displaycontainer_id, 'event not in pwulfs personal calendar');
+        $this->assertEquals($this->_getPersonasDefaultCals('pwulf')->getId(), $pwulf->displaycontainer_id, 'event not in pwulfs personal calendar');
     }
     
     /**
@@ -328,10 +328,10 @@ class Calendar_Frontend_WebDAV_EventTest extends Calendar_TestCase
         $egt = new Calendar_Controller_EventGrantsTests();
         $egt->setup();
         
-        $pwulfPersonalCal = $this->_personasDefaultCals['sclever'];
+        $pwulfPersonalCal = $this->_getPersonasDefaultCals('sclever');
         $pwulf = new Calendar_Model_Attender(array(
             'user_type'    => Calendar_Model_Attender::USERTYPE_USER,
-            'user_id'      => $this->_personasContacts['sclever']->getId(),
+            'user_id'      => $this->_getPersonasContacts('sclever')->getId(),
         ));
         
         $this->_testEventMissingAttendee($pwulfPersonalCal, $pwulf);
@@ -657,7 +657,7 @@ class Calendar_Frontend_WebDAV_EventTest extends Calendar_TestCase
         $egt = new Calendar_Controller_EventGrantsTests();
         $egt->setup();
         
-        $pwulfPersonalCal = $this->_personasDefaultCals['sclever'];
+        $pwulfPersonalCal = $this->_getPersonasDefaultCals('sclever');
         $id = Tinebase_Record_Abstract::generateUID();
         $event = Calendar_Frontend_WebDAV_Event::create($pwulfPersonalCal, "$id.ics", $vcalendar);
         
@@ -860,7 +860,7 @@ class Calendar_Frontend_WebDAV_EventTest extends Calendar_TestCase
         $exception = Calendar_Model_Rrule::computeNextOccurrence($persistentEvent, $exceptions, new Tinebase_DateTime('20131017T140000'));
         $exception->attendee->addRecord(new Calendar_Model_Attender(array(
             'user_type' => Calendar_Model_Attender::USERTYPE_USER,
-            'user_id'   => $this->_personasContacts['pwulf']->getId(),
+            'user_id'   => $this->_getPersonasContacts('pwulf')->getId(),
         )));
         $persistentException = Calendar_Controller_Event::getInstance()->createRecurException($exception);
         $persistentEvent = Calendar_Controller_Event::getInstance()->get($persistentEvent->getId());
index 02048fe..db395cc 100644 (file)
@@ -230,11 +230,14 @@ class Calendar_Frontend_iMIPTest extends TestCase
     }
     
     /**
-    * returns a simple event
-    *
-    * @return Calendar_Model_Event
-    */
-    protected function _getEvent()
+     * returns a simple event
+     *
+     * @return Calendar_Model_Event
+     * @param bool $_now
+     * @param bool $mute
+     * @todo replace with TestCase::_getEvent
+     */
+    protected function _getEvent($now = FALSE, $mute = NULL)
     {
         return new Calendar_Model_Event(array(
             'summary'     => 'Sleep very long',
@@ -307,12 +310,16 @@ class Calendar_Frontend_iMIPTest extends TestCase
         $this->assertEquals(Calendar_Model_Attender::STATUS_ACCEPTED, $ownAttendee->status, 'must be ACCEPTED');
         
         // assert REPLY message to organizer only
-        $messages = Calendar_Controller_EventNotificationsTests::getMessages();
-        $this->assertEquals(1, count($messages), 'exactly one mail should be send');
-        $this->assertTrue(in_array('l.kneschke@caldav.org', $messages[0]->getRecipients()), 'organizer is not a receipient');
-        $this->assertContains('accepted', $messages[0]->getSubject(), 'wrong subject');
-        $this->assertContains('METHOD:REPLY', var_export($messages[0], TRUE), 'method missing');
-        $this->assertContains('SEQUENCE:0', var_export($messages[0], TRUE), 'external sequence has not been keepted');
+        $smtpConfig = Tinebase_Config::getInstance()->get(Tinebase_Config::SMTP);
+        $mailer = Calendar_Controller_EventNotificationsTests::getMailer();
+        if ($mailer instanceof Zend_Mail_Transport_Array || (isset($smtpConfig->from) && ! empty($smtpConfig->from))) {
+            $messages = Calendar_Controller_EventNotificationsTests::getMessages();
+            $this->assertEquals(1, count($messages), 'exactly one mail should be send');
+            $this->assertTrue(in_array('l.kneschke@caldav.org', $messages[0]->getRecipients()), 'organizer is not a receipient');
+            $this->assertContains('accepted', $messages[0]->getSubject(), 'wrong subject');
+            $this->assertContains('METHOD:REPLY', var_export($messages[0], TRUE), 'method missing');
+            $this->assertContains('SEQUENCE:0', var_export($messages[0], TRUE), 'external sequence has not been keepted');
+        }
     }
     
     /**
index c806881..2d80893 100644 (file)
@@ -27,7 +27,7 @@ class Calendar_Import_ICalTest extends Calendar_TestCase
         $importer->importData($icalData);
         
         $events = Calendar_Controller_Event::getInstance()->search(new Calendar_Model_EventFilter(array(
-            array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_testCalendar->getId())
+            array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_getTestCalendar()->getId())
         )), NULL);
         
         $this->assertEquals(6, $events->count(), 'events was not imported');
@@ -45,7 +45,7 @@ class Calendar_Import_ICalTest extends Calendar_TestCase
         
         $importer->importFile(dirname(__FILE__) . '/files/simple.ics');
         $events = Calendar_Controller_Event::getInstance()->search(new Calendar_Model_EventFilter(array(
-            array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_testCalendar->getId())
+            array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_getTestCalendar()->getId())
         )), NULL);
         
         $this->assertEquals(6, $events->count(), 'events where not imported');
@@ -64,7 +64,7 @@ class Calendar_Import_ICalTest extends Calendar_TestCase
         $importer->importFile(dirname(__FILE__) . '/files/XMAS_DE.ics');
         
         $events = Calendar_Controller_Event::getInstance()->search(new Calendar_Model_EventFilter(array(
-            array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_testCalendar->getId()),
+            array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_getTestCalendar()->getId()),
             array('field' => 'period', 'operator' => 'within', 'value' => array(
                 'from'  => '2015-12-23 22:00:00',
                 'until' => '2015-12-26 22:00:00'
@@ -93,7 +93,7 @@ class Calendar_Import_ICalTest extends Calendar_TestCase
     protected function _checkImport($failMessage = '', $assertNumber = 1)
     {
         $events = Calendar_Controller_Event::getInstance()->search(new Calendar_Model_EventFilter(array(
-            array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_testCalendar->getId())
+            array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_getTestCalendar()->getId())
         )), NULL);
         
         $this->assertEquals($assertNumber, $events->count(), 'events where not imported ' . $failMessage);
@@ -124,7 +124,7 @@ class Calendar_Import_ICalTest extends Calendar_TestCase
         
         $importer->importFile(dirname(__FILE__) . '/files/outlook12.ics');
         $events = Calendar_Controller_Event::getInstance()->search(new Calendar_Model_EventFilter(array(
-            array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_testCalendar->getId())
+            array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_getTestCalendar()->getId())
         )), NULL);
         
         $this->assertEquals(1, $events->count(), 'events where not imported');
@@ -210,7 +210,7 @@ class Calendar_Import_ICalTest extends Calendar_TestCase
         $from = new Tinebase_DateTime('2014-04-23 22:00:00');
         $until = new Tinebase_DateTime('2014-05-23 22:00:00');
         $events = Calendar_Controller_Event::getInstance()->search(new Calendar_Model_EventFilter(array(
-            array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_testCalendar->getId()),
+            array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_getTestCalendar()->getId()),
             array('field' => 'period', 'operator' => 'within', 'value' => array(
                 'from'  => $from->toString(),
                 'until' => $until->toString()
index b1bc51f..365e2a0 100644 (file)
@@ -29,6 +29,9 @@ class Calendar_JsonTests extends Calendar_TestCase
     public function setUp()
     {
         parent::setUp();
+        
+        Calendar_Controller_Event::getInstance()->doContainerACLChecks(true);
+        
         $this->_uit = new Calendar_Frontend_Json();
     }
     
@@ -49,7 +52,7 @@ class Calendar_JsonTests extends Calendar_TestCase
      */
     public function testCreateEvent($now = FALSE)
     {
-        $scleverDisplayContainerId = Tinebase_Core::getPreference('Calendar')->getValueForUser(Calendar_Preference::DEFAULTCALENDAR, $this->_personas['sclever']->getId());
+        $scleverDisplayContainerId = Tinebase_Core::getPreference('Calendar')->getValueForUser(Calendar_Preference::DEFAULTCALENDAR, $this->_getPersona('sclever')->getId());
         $contentSeqBefore = Tinebase_Container::getInstance()->getContentSequence($scleverDisplayContainerId);
         
         $eventData = $this->_getEvent($now)->toArray();
@@ -185,7 +188,7 @@ class Calendar_JsonTests extends Calendar_TestCase
         
         $eventData = $event->toArray();
         foreach ($eventData['attendee'] as $key => $attenderData) {
-            if ($eventData['attendee'][$key]['user_id'] != $this->_testUserContact->getId()) {
+            if ($eventData['attendee'][$key]['user_id'] != $this->_getTestUserContact()->getId()) {
                 unset($eventData['attendee'][$key]);
             }
         }
@@ -234,7 +237,7 @@ class Calendar_JsonTests extends Calendar_TestCase
      */
     protected function _getEventFilterArray($containerId = NULL)
     {
-        $containerId = ($containerId) ? $containerId : $this->_testCalendar->getId();
+        $containerId = ($containerId) ? $containerId : $this->_getTestCalendar()->getId();
         return array(
             array('field' => 'container_id', 'operator' => 'equals', 'value' => $containerId),
             array('field' => 'period', 'operator' => 'within', 'value' =>
@@ -258,10 +261,12 @@ class Calendar_JsonTests extends Calendar_TestCase
                 'from'  => '2009-03-25 00:00:00',
                 'until' => '2009-03-25 23:59:59',
             )),
-            array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_testCalendar->getId()),
+            array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_getTestCalendar()->getId()),
         );
         
         $searchResultData = $this->_uit->searchEvents($filter, array());
+        
+        $this->assertTrue(isset($searchResultData['results'][0]), 'event not found in result: ' . print_r($searchResultData['results'], true));
         $resultEventData = $searchResultData['results'][0];
         
         $this->_assertJsonEvent($eventData, $resultEventData, 'failed to search event');
@@ -277,7 +282,7 @@ class Calendar_JsonTests extends Calendar_TestCase
     public function testSearchEventsWithOutPeriodFilter()
     {
         $eventData = $this->testCreateRecurEvent();
-        $filter = array(array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_testCalendar->getId()));
+        $filter = array(array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_getTestCalendar()->getId()));
         
         $searchResultData = $this->_uit->searchEvents($filter, array());
         $returnedFilter = $searchResultData['filter'];
@@ -294,7 +299,7 @@ class Calendar_JsonTests extends Calendar_TestCase
     {
         Calendar_Config::getInstance()->set(Calendar_Config::MAX_JSON_DEFAULT_FILTER_PERIOD_FROM, 12);
         
-        $filter = array(array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_testCalendar->getId()));
+        $filter = array(array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_getTestCalendar()->getId()));
         $searchResultData = $this->_uit->searchEvents($filter, array());
         
         $now = Tinebase_DateTime::now()->setTime(0,0,0);
@@ -352,7 +357,7 @@ class Calendar_JsonTests extends Calendar_TestCase
         $eventData = $this->testCreateEvent();
         $numAttendee = count($eventData['attendee']);
         $eventData['attende