Merge branch 'pu/inventory'
authorPhilipp Schüle <p.schuele@metaways.de>
Thu, 10 Jan 2013 09:29:12 +0000 (10:29 +0100)
committerPhilipp Schüle <p.schuele@metaways.de>
Thu, 10 Jan 2013 09:29:12 +0000 (10:29 +0100)
503 files changed:
scripts/packaging/Univention/debian/changelog
scripts/packaging/Univention/debian/control
scripts/packaging/Univention/debian/tine20-humanresources.install [new file with mode: 0644]
scripts/packaging/Univention/debian/tine20-libraries.install [new file with mode: 0644]
scripts/packaging/Univention/debian/tine20-tinebase.cron.d
scripts/packaging/Univention/debian/tine20-tinebase.install
scripts/packaging/Univention/debian/tine20-webstack.config [new file with mode: 0644]
scripts/packaging/Univention/debian/tine20-webstack.postinst
scripts/packaging/Univention/debian/tine20-webstack.postrm
scripts/packaging/Univention/debian/tine20-webstack.templates [new file with mode: 0644]
scripts/packaging/Univention/debian/tine20.postinst
scripts/packaging/Univention/debian/tine20.postrm
scripts/packaging/Univention/debian/tine20.templates [new file with mode: 0644]
scripts/packaging/build-tine20-packages.sh
scripts/packaging/debian/changelog
scripts/packaging/debian/control
scripts/packaging/debian/etc/apache.conf
scripts/packaging/debian/etc/php5-fpm.conf [new file with mode: 0644]
scripts/packaging/debian/etc/php5.ini
scripts/packaging/debian/tine20-libraries.install [new file with mode: 0644]
scripts/packaging/debian/tine20-tinebase.cron.d
scripts/packaging/debian/tine20-tinebase.install
scripts/packaging/debian/tine20-webstack.postinst
scripts/packaging/debian/tine20-webstack.postrm
scripts/packaging/debian/tine20-webstack.templates
scripts/packaging/fedora/SOURCES/0001-tine20-fix-requirements.patch [new file with mode: 0644]
scripts/packaging/fedora/SOURCES/tine20-README.fedora [new file with mode: 0644]
scripts/packaging/fedora/SOURCES/tine20-config.inc.php [new file with mode: 0644]
scripts/packaging/fedora/SOURCES/tine20-cron [new file with mode: 0644]
scripts/packaging/fedora/SOURCES/tine20-httpd.conf [new file with mode: 0644]
scripts/packaging/fedora/SOURCES/tine20-logrotate.conf [new file with mode: 0644]
scripts/packaging/fedora/SOURCES/tine20-php.ini [new file with mode: 0644]
scripts/packaging/fedora/SPECS/tine20.spec [moved from scripts/packaging/fedora/tine20.spec with 64% similarity]
tests/setup/Setup/Backend/OracleTest.php
tests/setup/Setup/ControllerTest.php
tests/tine20/ActiveSync/Controller/EmailTests.php
tests/tine20/Addressbook/Backend/LdapTest.php
tests/tine20/Addressbook/JsonTest.php
tests/tine20/Admin/JsonTest.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/Convert/Event/VCalendar/GenericTest.php
tests/tine20/Calendar/performanceTests.php
tests/tine20/Courses/JsonTest.php
tests/tine20/Crm/Export/CsvTest.php
tests/tine20/Crm/JsonTest.php
tests/tine20/Felamimail/AllTests.php
tests/tine20/Felamimail/Controller/AccountTest.php
tests/tine20/Felamimail/Controller/MessageTest.php
tests/tine20/Felamimail/JsonTest.php
tests/tine20/Felamimail/Model/AccountTest.php
tests/tine20/Felamimail/files/attachmentUmlaut.eml [new file with mode: 0644]
tests/tine20/Filemanager/Frontend/JsonTests.php
tests/tine20/HumanResources/CliTests.php
tests/tine20/HumanResources/JsonTests.php
tests/tine20/HumanResources/TestCase.php
tests/tine20/Phone/JsonTest.php
tests/tine20/Sales/ControllerTest.php
tests/tine20/Sales/JsonTest.php
tests/tine20/ServerTestHelper.php
tests/tine20/Tasks/Backend/SqlTest.php
tests/tine20/Tasks/ControllerTest.php
tests/tine20/Tasks/JsonTest.php
tests/tine20/Tinebase/ApplicationTest.php
tests/tine20/Tinebase/AuthTest.php
tests/tine20/Tinebase/ContainerTest.php
tests/tine20/Tinebase/ControllerTest.php
tests/tine20/Tinebase/CustomFieldTest.php
tests/tine20/Tinebase/Frontend/CliTest.php
tests/tine20/Tinebase/Frontend/Json/PersistentFilterTest.php
tests/tine20/Tinebase/Frontend/JsonTest.php
tests/tine20/Tinebase/GroupTest.php
tests/tine20/Tinebase/Log/FormatterTest.php
tests/tine20/Tinebase/NotificationTest.php
tests/tine20/Tinebase/Record/RecordTest.php
tests/tine20/Tinebase/Relation/Backend/SqlTest.php
tests/tine20/Tinebase/TagsTest.php
tests/tine20/Tinebase/Timemachine/ModificationLogTest.php
tests/tine20/Tinebase/TransactionManagerTest.php
tests/tine20/Tinebase/User/EmailUser/Imap/CyrusTest.php
tests/tine20/Tinebase/User/EmailUser/Imap/DbmailTest.php
tests/tine20/Tinebase/User/EmailUser/Imap/DovecotTest.php
tests/tine20/Tinebase/User/EmailUser/Imap/LdapDbmailSchemaTest.php
tests/tine20/Tinebase/User/EmailUser/Smtp/LdapDbmailSchemaTest.php
tests/tine20/Tinebase/UserTest.php
tests/tine20/Voipmanager/Backend/Snom/PhoneTest.php
tests/tine20/Voipmanager/ControllerTest.php
tests/tine20/Voipmanager/JsonTest.php
tine20/ActiveSync/Config.php
tine20/ActiveSync/Controller/Email.php
tine20/ActiveSync/Server/Http.php
tine20/ActiveSync/Setup/Update/Release6.php
tine20/ActiveSync/Setup/setup.xml
tine20/ActiveSync/TimezoneConverter.php
tine20/ActiveSync/js/Model.js
tine20/ActiveSync/translations/hr_HR.po
tine20/ActiveSync/translations/it.po
tine20/ActiveSync/translations/nl_NL.po [new file with mode: 0644]
tine20/ActiveSync/translations/template.pot
tine20/Addressbook/Acl/Rights.php
tine20/Addressbook/Controller/Contact.php
tine20/Addressbook/Convert/Contact/String.php
tine20/Addressbook/Model/Contact.php
tine20/Addressbook/Model/ListHiddenFilter.php
tine20/Addressbook/Setup/Initialize.php
tine20/Addressbook/Setup/Update/Release5.php
tine20/Addressbook/Setup/Update/Release6.php
tine20/Addressbook/Setup/Update/Release7.php [new file with mode: 0644]
tine20/Addressbook/Setup/setup.xml
tine20/Addressbook/js/SearchCombo.js
tine20/Addressbook/translations/hr_HR.po
tine20/Addressbook/translations/it.po
tine20/Addressbook/translations/nl_NL.po [new file with mode: 0644]
tine20/Addressbook/translations/pt_BR.po
tine20/Addressbook/translations/template.pot
tine20/Admin/Controller.php
tine20/Admin/Controller/Group.php
tine20/Admin/Frontend/Json.php
tine20/Admin/Setup/Update/Release6.php [new file with mode: 0644]
tine20/Admin/Setup/setup.xml
tine20/Admin/js/Admin.js
tine20/Admin/js/Models.js
tine20/Admin/js/user/EditDialog.js
tine20/Admin/translations/et.po
tine20/Admin/translations/hr_HR.po
tine20/Admin/translations/it.po
tine20/Admin/translations/lt.po
tine20/Admin/translations/nl_NL.po [new file with mode: 0644]
tine20/Admin/translations/template.pot
tine20/CREDITS
tine20/Calendar/Acl/Rights.php
tine20/Calendar/Backend/Sql.php
tine20/Calendar/Controller/Event.php
tine20/Calendar/Controller/MSEventFacade.php
tine20/Calendar/Frontend/Json.php
tine20/Calendar/Frontend/WebDAV/Container.php
tine20/Calendar/Model/Attender.php
tine20/Calendar/Model/Event.php
tine20/Calendar/Model/GrantFilter.php
tine20/Calendar/Model/Rrule.php
tine20/Calendar/Setup/Update/Release6.php
tine20/Calendar/Setup/setup.xml
tine20/Calendar/js/AttendeeFilterModel.js
tine20/Calendar/js/EventEditDialog.js
tine20/Calendar/js/MainScreenCenterPanel.js
tine20/Calendar/js/Model.js
tine20/Calendar/js/iMIPDetailsPanel.js
tine20/Calendar/translations/et.po
tine20/Calendar/translations/fr.po
tine20/Calendar/translations/hr_HR.po
tine20/Calendar/translations/it.po
tine20/Calendar/translations/nl_NL.po [new file with mode: 0644]
tine20/Calendar/translations/pt_BR.po
tine20/Calendar/translations/template.pot
tine20/Courses/Controller/Course.php
tine20/Courses/Frontend/Json.php
tine20/Courses/Model/Course.php
tine20/Courses/Setup/Update/Release6.php
tine20/Courses/Setup/Update/Release7.php [new file with mode: 0644]
tine20/Courses/Setup/setup.xml
tine20/Courses/translations/hr_HR.po
tine20/Courses/translations/it.po
tine20/Courses/translations/nl_NL.po [new file with mode: 0644]
tine20/Courses/translations/template.pot
tine20/Crm/Acl/Rights.php
tine20/Crm/Backend/Lead.php
tine20/Crm/Config.php
tine20/Crm/Controller.php
tine20/Crm/Model/Config.php
tine20/Crm/Model/Lead.php
tine20/Crm/Setup/Update/Release2.php
tine20/Crm/Setup/Update/Release6.php
tine20/Crm/Setup/Update/Release7.php [new file with mode: 0644]
tine20/Crm/Setup/setup.xml
tine20/Crm/js/Model.js
tine20/Crm/translations/et.po
tine20/Crm/translations/it.po
tine20/Crm/translations/nl_NL.po [new file with mode: 0644]
tine20/Crm/translations/pt_BR.po
tine20/Crm/translations/template.pot
tine20/ExampleApplication/Setup/setup.xml
tine20/ExampleApplication/translations/template.pot
tine20/Felamimail/Backend/Cache/Sql/Message.php
tine20/Felamimail/Backend/Folder.php
tine20/Felamimail/Controller/Account.php
tine20/Felamimail/Controller/Cache/Message.php
tine20/Felamimail/Controller/Message.php
tine20/Felamimail/Controller/Message/Send.php
tine20/Felamimail/Controller/Sieve.php
tine20/Felamimail/Frontend/Json.php
tine20/Felamimail/Model/Account.php
tine20/Felamimail/Model/MessageFilter.php
tine20/Felamimail/Setup/Update/Release3.php
tine20/Felamimail/Setup/Update/Release6.php
tine20/Felamimail/Setup/Update/Release7.php [new file with mode: 0644]
tine20/Felamimail/Setup/setup.xml
tine20/Felamimail/js/MessageEditDialog.js
tine20/Felamimail/js/Model.js
tine20/Felamimail/js/RecipientGrid.js
tine20/Felamimail/translations/fr.po
tine20/Felamimail/translations/it.po
tine20/Felamimail/translations/nl_NL.po [new file with mode: 0644]
tine20/Felamimail/translations/template.pot
tine20/Filemanager/Controller/Node.php
tine20/Filemanager/Setup/Update/Release6.php
tine20/Filemanager/Setup/Update/Release7.php [new file with mode: 0644]
tine20/Filemanager/Setup/setup.xml
tine20/Filemanager/js/Model.js
tine20/Filemanager/js/NodeEditDialog.js
tine20/Filemanager/translations/fr.po
tine20/Filemanager/translations/hr_HR.po
tine20/Filemanager/translations/it.po
tine20/Filemanager/translations/nl_NL.po [new file with mode: 0644]
tine20/Filemanager/translations/template.pot
tine20/HumanResources/Backend/CostCenter.php [new file with mode: 0644]
tine20/HumanResources/Config.php
tine20/HumanResources/Controller/Contract.php
tine20/HumanResources/Controller/CostCenter.php [new file with mode: 0644]
tine20/HumanResources/Controller/Employee.php
tine20/HumanResources/Controller/WorkingTime.php
tine20/HumanResources/Frontend/Cli.php
tine20/HumanResources/Frontend/Json.php
tine20/HumanResources/HumanResources.jsb2
tine20/HumanResources/Model/Contract.php
tine20/HumanResources/Model/CostCenter.php [new file with mode: 0644]
tine20/HumanResources/Model/CostCenterFilter.php [new file with mode: 0644]
tine20/HumanResources/Model/Employee.php
tine20/HumanResources/Model/EmployeeEmployedFilter.php [new file with mode: 0644]
tine20/HumanResources/Model/EmployeeFilter.php
tine20/HumanResources/Model/FreeTime.php
tine20/HumanResources/Model/WorkingTime.php
tine20/HumanResources/Model/WorkingTimeFilter.php
tine20/HumanResources/Setup/Initialize.php
tine20/HumanResources/Setup/Update/Release0.php
tine20/HumanResources/Setup/Update/Release6.php
tine20/HumanResources/Setup/Update/Release7.php [new file with mode: 0644]
tine20/HumanResources/Setup/setup.xml
tine20/HumanResources/css/HumanResources.css
tine20/HumanResources/js/ContractGridPanel.js
tine20/HumanResources/js/CostCenterGridPanel.js [new file with mode: 0644]
tine20/HumanResources/js/DatePicker.js
tine20/HumanResources/js/EmployeeEditDialog.js
tine20/HumanResources/js/FreeTimeEditDialog.js
tine20/HumanResources/js/FreeTimeGridPanel.js
tine20/HumanResources/js/Models.js
tine20/HumanResources/js/WorkingTimeEditDialog.js [new file with mode: 0644]
tine20/HumanResources/translations/bg.po
tine20/HumanResources/translations/ca.po
tine20/HumanResources/translations/cs.po
tine20/HumanResources/translations/da.po
tine20/HumanResources/translations/de.po
tine20/HumanResources/translations/en.po
tine20/HumanResources/translations/es.po
tine20/HumanResources/translations/es_MX.po
tine20/HumanResources/translations/et.po
tine20/HumanResources/translations/fa_IR.po
tine20/HumanResources/translations/fr.po
tine20/HumanResources/translations/hr_HR.po
tine20/HumanResources/translations/hu.po
tine20/HumanResources/translations/it.po
tine20/HumanResources/translations/ja.po
tine20/HumanResources/translations/lt.po
tine20/HumanResources/translations/nb.po
tine20/HumanResources/translations/nl_NL.po [new file with mode: 0644]
tine20/HumanResources/translations/pl.po
tine20/HumanResources/translations/pt_BR.po
tine20/HumanResources/translations/ru.po
tine20/HumanResources/translations/sk.po
tine20/HumanResources/translations/sv_SE.po
tine20/HumanResources/translations/template.pot
tine20/HumanResources/translations/tr_TR.po
tine20/HumanResources/translations/zh_CN.po
tine20/HumanResources/translations/zh_TW.po
tine20/Inventory/Setup/Update/Release6.php
tine20/Inventory/Setup/Update/Release7.php [new file with mode: 0644]
tine20/Inventory/Setup/setup.xml
tine20/Inventory/translations/nl_NL.po [new file with mode: 0644]
tine20/Phone/Controller.php
tine20/Phone/Setup/Update/Release6.php [new file with mode: 0644]
tine20/Phone/Setup/setup.xml
tine20/Phone/js/Models.js
tine20/Phone/js/Phone.js
tine20/Phone/translations/hr_HR.po
tine20/Phone/translations/it.po
tine20/Phone/translations/nl_NL.po [new file with mode: 0644]
tine20/Phone/translations/template.pot
tine20/Projects/Acl/Rights.php [new file with mode: 0644]
tine20/Projects/Model/Project.php
tine20/Projects/Setup/Update/Release6.php
tine20/Projects/Setup/Update/Release7.php [new file with mode: 0644]
tine20/Projects/Setup/setup.xml
tine20/Projects/translations/hr_HR.po
tine20/Projects/translations/it.po
tine20/Projects/translations/nl_NL.po [new file with mode: 0644]
tine20/Projects/translations/pt_BR.po
tine20/Projects/translations/template.pot
tine20/RequestTracker/translations/template.pot
tine20/Sales/Config.php
tine20/Sales/Controller.php
tine20/Sales/Controller/Contract.php
tine20/Sales/Model/Contract.php
tine20/Sales/Model/Product.php
tine20/Sales/Setup/Update/Release5.php
tine20/Sales/Setup/Update/Release6.php
tine20/Sales/Setup/Update/Release7.php [new file with mode: 0644]
tine20/Sales/Setup/setup.xml
tine20/Sales/css/Sales.css
tine20/Sales/js/ContractEditDialog.js
tine20/Sales/js/Models.js
tine20/Sales/translations/hr_HR.po
tine20/Sales/translations/it.po
tine20/Sales/translations/nl_NL.po [new file with mode: 0644]
tine20/Sales/translations/template.pot
tine20/Setup/Auth.php
tine20/Setup/Backend/Abstract.php
tine20/Setup/Backend/Factory.php
tine20/Setup/Backend/Interface.php
tine20/Setup/Backend/Mysql.php
tine20/Setup/Backend/Oracle.php
tine20/Setup/Backend/Pgsql.php
tine20/Setup/Controller.php
tine20/Setup/Update/Abstract.php
tine20/Setup/essentials.xml
tine20/Setup/translations/et.po
tine20/Setup/translations/hr_HR.po
tine20/Setup/translations/it.po
tine20/Setup/translations/nl_NL.po [new file with mode: 0644]
tine20/Setup/translations/template.pot
tine20/SimpleFAQ/Config.php [new file with mode: 0644]
tine20/SimpleFAQ/Controller.php
tine20/SimpleFAQ/translations/it.po
tine20/SimpleFAQ/translations/nl_NL.po [new file with mode: 0644]
tine20/SimpleFAQ/translations/template.pot
tine20/Sipgate/Preference.php
tine20/Sipgate/js/Models.js
tine20/Sipgate/translations/cs.po
tine20/Sipgate/translations/da.po
tine20/Sipgate/translations/de.po
tine20/Sipgate/translations/es.po
tine20/Sipgate/translations/es_MX.po
tine20/Sipgate/translations/et.po
tine20/Sipgate/translations/fa_IR.po
tine20/Sipgate/translations/fr.po
tine20/Sipgate/translations/hr_HR.po
tine20/Sipgate/translations/hu.po
tine20/Sipgate/translations/it.po
tine20/Sipgate/translations/lt.po
tine20/Sipgate/translations/nl_NL.po [new file with mode: 0644]
tine20/Sipgate/translations/pl.po
tine20/Sipgate/translations/pt_BR.po
tine20/Sipgate/translations/ru.po
tine20/Sipgate/translations/sk.po
tine20/Sipgate/translations/sv_SE.po
tine20/Sipgate/translations/template.pot
tine20/Sipgate/translations/tr_TR.po
tine20/Sipgate/translations/zh_CN.po
tine20/Tasks/Acl/Rights.php
tine20/Tasks/Backend/Sql.php
tine20/Tasks/Controller/Task.php
tine20/Tasks/Model/Task.php
tine20/Tasks/Setup/Update/Release6.php [new file with mode: 0644]
tine20/Tasks/Setup/Update/Release7.php [new file with mode: 0644]
tine20/Tasks/Setup/setup.xml
tine20/Tasks/translations/et.po
tine20/Tasks/translations/hr_HR.po
tine20/Tasks/translations/it.po
tine20/Tasks/translations/nl_NL.po [new file with mode: 0644]
tine20/Tasks/translations/pt_BR.po
tine20/Tasks/translations/template.pot
tine20/Timetracker/Acl/Rights.php
tine20/Timetracker/Backend/Timesheet.php
tine20/Timetracker/Model/Timeaccount.php
tine20/Timetracker/Model/Timesheet.php
tine20/Timetracker/Setup/Update/Release3.php
tine20/Timetracker/Setup/Update/Release6.php [new file with mode: 0644]
tine20/Timetracker/Setup/Update/Release7.php [new file with mode: 0644]
tine20/Timetracker/Setup/setup.xml
tine20/Timetracker/js/Models.js
tine20/Timetracker/translations/it.po
tine20/Timetracker/translations/nl_NL.po [new file with mode: 0644]
tine20/Timetracker/translations/template.pot
tine20/Tinebase/Acl/Rights/Abstract.php
tine20/Tinebase/Acl/Roles.php
tine20/Tinebase/Application.php
tine20/Tinebase/Auth.php
tine20/Tinebase/Auth/CredentialCache.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/Config.php
tine20/Tinebase/Container.php
tine20/Tinebase/Controller.php
tine20/Tinebase/Controller/Abstract.php
tine20/Tinebase/Controller/Record/Abstract.php
tine20/Tinebase/Core.php
tine20/Tinebase/CustomField.php
tine20/Tinebase/Db/Table.php
tine20/Tinebase/EmailUser.php
tine20/Tinebase/EmailUser/Imap/Cyrus.php
tine20/Tinebase/EmailUser/Imap/Dbmail.php
tine20/Tinebase/EmailUser/Imap/Dovecot.php
tine20/Tinebase/EmailUser/Smtp/Postfix.php
tine20/Tinebase/EmailUser/Sql.php
tine20/Tinebase/FileSystem.php
tine20/Tinebase/Frontend/Cli.php
tine20/Tinebase/Frontend/Http.php
tine20/Tinebase/Frontend/Json.php
tine20/Tinebase/Frontend/Json/Abstract.php
tine20/Tinebase/Group.php
tine20/Tinebase/Group/Interface/SyncAble.php
tine20/Tinebase/Group/Ldap.php
tine20/Tinebase/Group/Sql.php
tine20/Tinebase/Import/Abstract.php
tine20/Tinebase/Model/Container.php
tine20/Tinebase/Model/Department.php
tine20/Tinebase/Model/Filter/ContainerOwner.php
tine20/Tinebase/Model/Filter/CustomField.php
tine20/Tinebase/Model/Filter/Query.php
tine20/Tinebase/Model/ImportExportDefinition.php
tine20/Tinebase/Model/ModificationLog.php
tine20/Tinebase/Model/ModificationLogFilter.php
tine20/Tinebase/Model/Note.php
tine20/Tinebase/Model/PersistentFilter.php
tine20/Tinebase/Model/PersistentObserver.php
tine20/Tinebase/Model/Relation.php
tine20/Tinebase/Model/Tag.php
tine20/Tinebase/Model/Tree/FileObject.php
tine20/Tinebase/Model/Tree/Node.php
tine20/Tinebase/Notes.php
tine20/Tinebase/Notification/Backend/Smtp.php
tine20/Tinebase/PersistentFilter.php
tine20/Tinebase/Record/Abstract.php
tine20/Tinebase/Record/RecordSet.php
tine20/Tinebase/Redis/Queue/Zend/Redis.php
tine20/Tinebase/Relations.php
tine20/Tinebase/Server/Cli.php
tine20/Tinebase/Setup/Update/Release0.php
tine20/Tinebase/Setup/Update/Release1.php
tine20/Tinebase/Setup/Update/Release2.php
tine20/Tinebase/Setup/Update/Release6.php
tine20/Tinebase/Setup/Update/Release7.php [new file with mode: 0644]
tine20/Tinebase/Setup/setup.xml
tine20/Tinebase/Smtp.php
tine20/Tinebase/Tags.php
tine20/Tinebase/Timemachine/ModificationLog.php
tine20/Tinebase/Tree/FileObject.php
tine20/Tinebase/Tree/Node.php
tine20/Tinebase/User.php
tine20/Tinebase/User/Plugin/Abstract.php
tine20/Tinebase/UserProfile.php
tine20/Tinebase/js/ApplicationStarter.js
tine20/Tinebase/js/LoginPanel.js
tine20/Tinebase/js/MainScreen.js
tine20/Tinebase/js/Models.js
tine20/Tinebase/js/common.js
tine20/Tinebase/js/data/Record.js
tine20/Tinebase/js/ux/form/ClearableComboBox.js
tine20/Tinebase/js/widgets/ActionUpdater.js
tine20/Tinebase/js/widgets/ContentTypeTreePanel.js
tine20/Tinebase/js/widgets/MainScreen.js
tine20/Tinebase/js/widgets/container/GrantsGrid.js
tine20/Tinebase/js/widgets/customfields/ConfigManager.js
tine20/Tinebase/js/widgets/dialog/EditDialog.js
tine20/Tinebase/js/widgets/dialog/MultipleEditDialogPlugin.js
tine20/Tinebase/js/widgets/dialog/PreferencesPanel.js
tine20/Tinebase/js/widgets/form/RecordPickerComboBox.js
tine20/Tinebase/js/widgets/grid/GridPanel.js
tine20/Tinebase/js/widgets/grid/PickerFilter.js
tine20/Tinebase/js/widgets/grid/QuickaddGridPanel.js
tine20/Tinebase/js/widgets/grid/RendererManager.js
tine20/Tinebase/js/widgets/mainscreen/WestPanel.js
tine20/Tinebase/js/widgets/persistentfilter/EditPersistentFilterPanel.js
tine20/Tinebase/js/widgets/persistentfilter/PickerPanel.js
tine20/Tinebase/js/widgets/relation/GenericPickerGridPanel.js
tine20/Tinebase/js/widgets/tags/TagCombo.js
tine20/Tinebase/js/widgets/tags/TagsMassAttachAction.js
tine20/Tinebase/js/widgets/tags/TagsPanel.js
tine20/Tinebase/translations/de.po
tine20/Tinebase/translations/fr.po
tine20/Tinebase/translations/hr_HR.po
tine20/Tinebase/translations/it.po
tine20/Tinebase/translations/nl_NL.po [new file with mode: 0644]
tine20/Tinebase/translations/pt_BR.po
tine20/Tinebase/translations/template.pot
tine20/Voipmanager/Backend/Asterisk/SipPeer.php
tine20/Voipmanager/Setup/Update/Release6.php [new file with mode: 0644]
tine20/Voipmanager/Setup/setup.xml
tine20/Voipmanager/js/Models.js
tine20/Voipmanager/translations/it.po
tine20/Voipmanager/translations/nl_NL.po [new file with mode: 0644]
tine20/Voipmanager/translations/template.pot
tine20/Zend/Db/Adapter/Oracle.php
tine20/Zend/Translate/Adapter/GettextPo.php
tine20/library/Syncroton/lib/Syncroton/Command/Options.php
tine20/library/Syncroton/lib/Syncroton/Command/Ping.php
tine20/library/Syncroton/lib/Syncroton/Command/Sync.php
tine20/library/Syncroton/lib/Syncroton/Server.php
tine20/library/Syncroton/lib/Syncroton/Wbxml/Abstract.php

index 79373f4..d50466e 100644 (file)
@@ -1,3 +1,70 @@
+tine20 (2012.10.3-0) natty; urgency=low
+
+  * New upstream release Joey SR 3 (2012.10.3) 
+
+ -- Philipp Schüle <p.schuele@metaways.de>  Fri, 04 Jan 2013 15:16:22 +0200
+
+tine20 (2012.10.2-0) natty; urgency=low
+
+  * New upstream release Joey SR 1 (2012.10.2) 
+
+ -- Philipp Schüle <p.schuele@metaways.de>  Thu, 22 Nov 2012 15:16:22 +0200
+
+tine20 (2012.10.1-1) natty; urgency=low
+
+  * Add missing bootstrap.php
+
+ -- Lars Kneschke <l.kneschke@metaways.de>  Thu, 25 Oct 2012 12:00:21 +0200
+
+tine20 (2012.10.1-0) natty; urgency=low
+
+  * New upstream release Joey (2012.10) 
+
+ -- Philipp Schüle <p.schuele@metaways.de>  Wed, 24 Oct 2012 12:00:21 +0200
+
+tine20 (2012.10.1~rc3-0) natty; urgency=low
+
+  * Third release candidate of Joey (2012.10) 
+
+ -- Philipp Schüle <p.schuele@metaways.de>  Fri, 19 Oct 2012 20:21:20 +0200
+
+tine20 (2012.10.1~rc2-0) natty; urgency=low
+
+  * Second release candidate of Joey (2012.10) 
+
+ -- Philipp Schüle <p.schuele@metaways.de>  Fri, 12 Oct 2012 12:47:19 +0200
+
+tine20 (2012.10.1~rc1-0) natty; urgency=low
+
+  * First release candidate of Joey (2012.10) 
+
+ -- Philipp Schüle <p.schuele@metaways.de>  Fri, 28 Sep 2012 21:46:18 +0200
+
+tine20 (2012.10.1~beta2-0) natty; urgency=low
+
+  * Second beta upstream release of "Joey"
+
+ -- Philipp Schüle <p.schuele@metaways.de>  Fri, 21 Sep 2012 19:43:17 +0200
+
+tine20 (2012.10.1~beta1-0) natty; urgency=low
+
+  * New beta upstream release of "Joey"
+
+ -- Philipp Schüle <p.schuele@metaways.de>  Mon, 13 Sep 2012 14:15:16 +0200
+tine20 (2012.03.7-0) natty; urgency=low
+
+  * New upstream release
+  * Fixes 0007044: Installer (setup.php) fails, when database exists but contains no tables
+
+ -- Philipp Schüle <p.schuele@metaways.de>  Mon, 03 Sep 2012 11:24:15 +0200
+tine20 (2012.03.6-0) natty; urgency=low
+
+  * New upstream release
+
+ -- Philipp Schüle <p.schuele@metaways.de>  Thu, 30 Aug 2012 19:23:14 +0200
 tine20 (2012.03.5-0) natty; urgency=low
 
   * New upstream release
index 851b285..703c570 100644 (file)
@@ -66,15 +66,23 @@ Depends: ${misc:Depends},
  php5-mysql | php5-mysqli, 
  php5-mcrypt, 
  php5-gd,
+ php-apc,
  makepasswd
 Recommends: mysql-client 
-Description: Tine 2.0 integration package for Univention Corporate Server
- Integration package for installation and configuration of the Tine 2.0
- groupware solution on Univention Corporate Server.
+Description: Tine 2.0 webserver integration package
+ This package integrates Tine 2.0 with the webserver, by installing all needed
+ dependencies to make Tine 2.0 available via HTTP(S).
+
+Package: tine20-libraries
+Architecture: all
+Depends: ${misc:Depends}
+Description: Additional libraries needed by Tine 2.0
+ Libraries bundled with upstream Tine 2.0 source package, but developed by other developers.
 
 Package: tine20-tinebase
 Architecture: all
 Depends: ${misc:Depends}, 
+ tine20-libraries (= ${binary:Version}),
  makepasswd,
  php5-cli
 Recommends: php5-ldap
@@ -106,7 +114,7 @@ Description: webbased groupware and crm - courses module
 
 Package: tine20-crm
 Architecture: all
-Depends: tine20-tinebase (= ${binary:Version})
+Depends: tine20-tinebase (= ${binary:Version}), tine20-sales (= ${binary:Version}), tine20-tasks (= ${binary:Version})
 Description: webbased groupware and crm - crm module
  This package contains the CRM module of Tine 2.0. Installing this package
  enables you to manage leads. Typically used by sales people.
@@ -155,3 +163,10 @@ Description: webbased groupware and crm - timetracker module
  This package contains the timetracke module of Tine 2.0. Installing this package
  enables you to keep track of time spent on different projects. You can export
  timesheets for easy reporting in different formats. 
+
+Package: tine20-humanresources
+Architecture: all
+Depends: tine20-tinebase (= ${binary:Version}), tine20-sales (= ${binary:Version})
+Description: webbased groupware and crm - humanresources module
+ This package contains the humanresources module of Tine 2.0. Installing this package
+ enables you to manage personal data about your employees. 
diff --git a/scripts/packaging/Univention/debian/tine20-humanresources.install b/scripts/packaging/Univention/debian/tine20-humanresources.install
new file mode 100644 (file)
index 0000000..feca2b3
--- /dev/null
@@ -0,0 +1 @@
+HumanResources /usr/share/tine20
diff --git a/scripts/packaging/Univention/debian/tine20-libraries.install b/scripts/packaging/Univention/debian/tine20-libraries.install
new file mode 100644 (file)
index 0000000..18ab972
--- /dev/null
@@ -0,0 +1 @@
+library                  /usr/share/tine20
index ac8d9e1..69c0e6e 100644 (file)
@@ -1,4 +1,5 @@
-SHELL=/bin/sh
-PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+MAILTO=root
+SHELL=/bin/bash
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
 
-* * * * *      www-data        /usr/bin/php -f /usr/share/tine20/tine20.php -- --method Tinebase.triggerAsyncEvents
+* * * * *      www-data        /usr/bin/php -f /usr/share/tine20/tine20.php -- --config=/etc/tine20/config.inc.php --method=Tinebase.triggerAsyncEvents
index 284953f..a801282 100644 (file)
@@ -1,15 +1,16 @@
 Addressbook              /usr/share/tine20
 Admin                    /usr/share/tine20
+Setup                    /usr/share/tine20
+Tinebase                 /usr/share/tine20
+Zend                     /usr/share/tine20
+CREDITS                  /usr/share/tine20
+LICENSE                  /usr/share/tine20
+PRIVACY                  /usr/share/tine20
+bootstrap.php            /usr/share/tine20
 images                   /usr/share/tine20
 index.php                /usr/share/tine20
 langHelper.php           /usr/share/tine20
-library                  /usr/share/tine20
-Setup                    /usr/share/tine20
 setup.php                /usr/share/tine20
 styles                   /usr/share/tine20
 tine20.php               /usr/share/tine20
-Tinebase                 /usr/share/tine20
-Zend                     /usr/share/tine20
-LICENSE                  /usr/share/tine20
-PRIVACY                  /usr/share/tine20
 debian/etc/php5.ini      /etc/tine20
diff --git a/scripts/packaging/Univention/debian/tine20-webstack.config b/scripts/packaging/Univention/debian/tine20-webstack.config
new file mode 100644 (file)
index 0000000..f107dee
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/bash 
+
+set -e
+
+# Source debconf library.
+. /usr/share/debconf/confmodule
+db_version 2.0
+
+db_input high tine20/webserver_type || true
+
+db_go || true
+
index 9465957..d6f0559 100644 (file)
@@ -35,56 +35,79 @@ db_version 2.0
 if [ "$1" = "configure" ]; then
 
     # setup webserver
-    webservers="apache2"
+    db_get tine20/webserver_type
+    webserver="$RET"
     
-    if [ "$webservers" != "" ]; then
+    case "$webserver" in
+        apache2)
+            # check if webserver is installed
+            if [ -x /usr/sbin/$webserver ]; then 
 
-        for webserver in $webservers; do
-            webserver=${webserver%,}
+                if [ -d /etc/apache2/mods-enabled ]; then
+                    if [ ! -f /etc/apache2/mods-enabled/rewrite.load -a ! -h /etc/apache2/mods-enabled/rewrite.load ]; then
+                        /usr/sbin/a2enmod rewrite
+                    fi
+                    if [ ! -f /etc/apache2/mods-enabled/expires.load -a ! -h /etc/apache2/mods-enabled/expires.load ]; then
+                        /usr/sbin/a2enmod expires
+                    fi
+                    if [ -f /etc/apache2/mods-available/php5.load ]; then
+                        if [ ! -f /etc/apache2/mods-enabled/php5.load -a ! -h /etc/apache2/mods-enabled/php5.load ]; then
+                            /usr/sbin/a2enmod php5
+                        fi 
+                    fi
+                fi
+    
+                # create vhost configuration links
+                servers="apache2"
+                linkdestination_apache="../../tine20/apache.conf"
+                linkname="tine20"
+    
+                if [ -e /usr/share/wwwconfig-common/confd-link.sh ]; then
+                    . /usr/share/wwwconfig-common/confd-link.sh
+                fi
+                
+                # mark webserver for restart (used by restart.sh)
+                restart="$restart $webserver"
             
+            fi
+            ;;
+            
+        lighttpd)
             # check if webserver is installed
-            test -x /usr/sbin/$webserver || continue
+            if [ -x /usr/sbin/$webserver ]; then 
+
+                # create vhost configuration links
+                servers="$webserver"
+                linkdestination_lighttpd="../../tine20/lighttpd.conf"
+                linkname="15-tine20.conf"
     
-            case "$webserver" in
-                apache2)
-                    if [ -d /etc/apache2/mods-enabled ]; then
-                        if [ ! -f /etc/apache2/mods-enabled/rewrite.load -a ! -h /etc/apache2/mods-enabled/rewrite.load ]; then
-                            /usr/sbin/a2enmod rewrite
-                        fi
-                        if [ ! -f /etc/apache2/mods-enabled/expires.load -a ! -h /etc/apache2/mods-enabled/expires.load ]; then
-                            /usr/sbin/a2enmod expires
-                        fi
-                        if [ -f /etc/apache2/mods-available/php5.load ]; then
-                            if [ ! -f /etc/apache2/mods-enabled/php5.load -a ! -h /etc/apache2/mods-enabled/php5.load ]; then
-                                /usr/sbin/a2enmod php5
-                            fi 
-                        fi
+                if [ -e /usr/share/wwwconfig-common/confd-link.sh ]; then
+                    . /usr/share/wwwconfig-common/confd-link.sh
+                fi
+                
+                if [ -d /etc/$webserver/conf-available ]; then
+                    if [ ! -f /etc/$webserver/conf-enabled/10-expire.conf -a ! -h /etc/$webserver/conf-enabled/10-expire.conf ]; then
+                        /usr/sbin/lighttpd-enable-mod expire
                     fi
-
-                    # create vhost configuration links
-                    servers="apache2"
-                    linkdestination_apache="../../tine20/apache.conf"
-                    linkname="tine20"
-        
-                    if [ -e /usr/share/wwwconfig-common/confd-link.sh ]; then
-                        . /usr/share/wwwconfig-common/confd-link.sh
+    
+                    if [ ! -f /etc/$webserver/conf-enabled/15-tine20.conf -a ! -h /etc/$webserver/conf-enabled/15-tine20.conf ]; then
+                        /usr/sbin/lighttpd-enable-mod tine20
                     fi
-                    
-                    # mark webserver for restart (used by restart.sh)
-                    restart="$restart $webserver"
-                    
-                    ;;
+                fi
                 
-            esac
+                # mark webserver for restart (used by restart.sh)
+                restart="$restart $webserver"
             
-        done
+            fi
+            ;;
         
-        # restart webserver
-        if [ -e /usr/share/wwwconfig-common/restart.sh ]; then
-            . /usr/share/wwwconfig-common/restart.sh
-        fi
+    esac
+    
+    # restart webserver
+    if [ -e /usr/share/wwwconfig-common/restart.sh ]; then
+        . /usr/share/wwwconfig-common/restart.sh
     fi
 
 fi
 
-exit 0
+exit 0
\ No newline at end of file
index f13985c..368ecf1 100644 (file)
@@ -34,32 +34,39 @@ fi
 db_version 2.0
 
 if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then
-    webservers="apache2"
+    db_get tine20/webserver_type
+    webserver="$RET"
 
-    if [ "$webservers" != "" ]; then
+    # check if webserver is installed
+    test -x /usr/sbin/$webserver || continue
 
-        for webserver in $webservers; do
-            webserver=${webserver%,}
+    case "$webserver" in
+        apache2)
+            rm -f /etc/$webserver/conf.d/tine20
+            
+            # mark webserver for restart (used by restart.sh)
+            restart="$restart $webserver"
+            
+            ;;
+            
+        lighttpd)
+            if [ -f /etc/$webserver/conf-enabled/15-tine20.conf ]; then
+                /usr/sbin/lighttpd-disable-mod tine20
+                
+                # mark webserver for restart (used by restart.sh)
+                restart="$restart $webserver"
+            fi
+            
+            rm -f /etc/$webserver/conf-available/15-tine20.conf
+            
+            ;;
+    esac
 
-            # check if webserver is installed
-            test -x /usr/sbin/$webserver || continue
-    
-            case "$webserver" in
-                apache2)
-                    rm -f /etc/$webserver/conf.d/tine20
-                    
-                    # mark webserver for restart (used by restart.sh)
-                    restart="$restart $webserver"
-                    ;;
-            esac
-        done
-    
-        # restart webserver
-        if [ -e /usr/share/wwwconfig-common/restart.sh ]; then
-            . /usr/share/wwwconfig-common/restart.sh
-        fi
-        
+    # restart webserver
+    if [ -e /usr/share/wwwconfig-common/restart.sh ]; then
+        . /usr/share/wwwconfig-common/restart.sh
     fi
+    
 fi
 
 #DEBHELPER#
diff --git a/scripts/packaging/Univention/debian/tine20-webstack.templates b/scripts/packaging/Univention/debian/tine20-webstack.templates
new file mode 100644 (file)
index 0000000..d06a5da
--- /dev/null
@@ -0,0 +1,8 @@
+Template: tine20/webserver_type
+Type: select
+Choices: apache2, lighttpd
+Default: apache2
+_Description: Web server to reconfigure automatically:
+ If you do not select a web server to reconfigure automatically, Tine 2.0
+ will not be usable until you reconfigure your webserver to enable
+ Tine 2.0.
index 2538dc2..c7cd661 100644 (file)
@@ -59,14 +59,16 @@ if [ "$1" = "configure" ]; then
         chmod 0640       "$tine20ConfigFile"
         chown 0:www-data "$tine20ConfigFile"
 
+        setupuser="tine20setup"
+        setuppassword=$(makepasswd --minchars=10 --maxchars=15)
+
         mysqlpassword=$(cat "$mysqlPasswordFile")
+        
         sed -i -e "s/_DBC_DBSERVER_/localhost/g"    "$tine20ConfigFile"
         sed -i -e "s/_DBC_DBNAME_/tine20/g"         "$tine20ConfigFile"
         sed -i -e "s/_DBC_DBUSER_/tine20/g"         "$tine20ConfigFile"
         sed -i -e "s/_DBC_DBPASS_/$mysqlpassword/g" "$tine20ConfigFile"
-
-        setuppassword=$(makepasswd --minchars=10 --maxchars=15)
-        sed -i -e 's/_SETUPUSERNAME_/tine20setup/g'    "$tine20ConfigFile"
+        sed -i -e "s/_SETUPUSERNAME_/$setupuser/g"     "$tine20ConfigFile"
         sed -i -e "s/_SETUPPASSWORD_/$setuppassword/g" "$tine20ConfigFile"
     fi
     
index d01fc19..55563e1 100644 (file)
@@ -44,8 +44,6 @@ if [ "$1" = "purge" ]; then
     fi
  
     rm -rf /etc/tine20
-    rm -rf /var/lib/tine20
-    rm -rf /var/log/tine20
     
 fi
 
diff --git a/scripts/packaging/Univention/debian/tine20.templates b/scripts/packaging/Univention/debian/tine20.templates
new file mode 100644 (file)
index 0000000..a3bfba5
--- /dev/null
@@ -0,0 +1,10 @@
+Template: tine20/setupuser
+Type: string
+Default: tine20setup
+_Description: Tine 2.0 setup username
+ Username used to login into Tine 2.0 setup (setup.php)
+
+Template: tine20/setuppasswd
+Type: password
+_Description: Tine 2.0 setup password
+ Password used to login into Tine 2.0 setup (setup.php)
index 6d66548..bc3730c 100755 (executable)
@@ -26,6 +26,7 @@ function checkout()
     echo "checkout files from git url $1 to $TEMPDIR/tine20 ... "
     rm -rf $TEMPDIR/tine20
     rm -rf $TEMPDIR/debian
+    rm -rf $TEMPDIR/fedora
     rm -rf $TEMPDIR/Univention
     
     rm -rf $TEMPDIR/tine20.git
@@ -66,6 +67,7 @@ function checkout()
 
     mv $TEMPDIR/tine20.git/tine20 $TEMPDIR/tine20
     mv $TEMPDIR/tine20.git/scripts/packaging/debian $TEMPDIR/debian
+    mv $TEMPDIR/tine20.git/scripts/packaging/fedora $TEMPDIR/fedora
     mv $TEMPDIR/tine20.git/scripts/packaging/Univention $TEMPDIR/Univention
     rm -Rf $TEMPDIR/tine20.git
     
@@ -344,8 +346,29 @@ function prepareUniventionPackaging()
     echo "done"
 }
 
+function prepareFedoraPackaging()
+{
+    PACKAGEDIR="$BASEDIR/packages/fedora/$RELEASE"
+    rm -rf $PACKAGEDIR
+    
+    # Replace all matches of - with .
+    RPMVERSION=${RELEASE//-/.}
+
+    mkdir -p "$PACKAGEDIR/tine20-$RPMVERSION"
+    
+    echo -n "preparing fedora packaging directory in $PACKAGEDIR/tine20-$RPMVERSION ... "
+    
+    cp -r $BASEDIR/temp/fedora/* $PACKAGEDIR/tine20-$RPMVERSION/
+    
+    cp $BASEDIR/packages/tine20/$RELEASE/tine20-allinone_$RELEASE.tar.bz2 $PACKAGEDIR/tine20-$RPMVERSION/SOURCES/
+    cp $BASEDIR/packages/tine20/$RELEASE/tine20-courses_$RELEASE.tar.bz2 $PACKAGEDIR/tine20-$RPMVERSION/SOURCES/
+    cp $BASEDIR/packages/tine20/$RELEASE/tine20-humanresources_$RELEASE.tar.bz2 $PACKAGEDIR/tine20-$RPMVERSION/SOURCES/
+
+    echo "done"
+}
+
 getOptions $*
-                 
+
 createDirectories
 checkout "$GITURL" $GITBRANCH
 setupPackageDir
@@ -356,4 +379,5 @@ createSpecialArchives
 packageTranslations
 buildChecksum
 prepareDebianPackaging
+prepareFedoraPackaging
 prepareUniventionPackaging
index c746607..eb9496e 100644 (file)
@@ -1,3 +1,15 @@
+tine20 (2012.10.3-0) natty; urgency=low
+
+  * New upstream release Joey SR 3 (2012.10.3) 
+
+ -- Philipp Schüle <p.schuele@metaways.de>  Fri, 04 Jan 2013 15:16:22 +0200
+
+tine20 (2012.10.2-0) natty; urgency=low
+
+  * New upstream release Joey SR 2 (2012.10.2) 
+
+ -- Philipp Schüle <p.schuele@metaways.de>  Thu, 22 Nov 2012 15:16:22 +0200
+
 tine20 (2012.10.1-1) natty; urgency=low
 
   * Add missing bootstrap.php
index c4401a7..66a860a 100644 (file)
@@ -42,15 +42,25 @@ Depends: ${misc:Depends},
  php5-mysql | php5-mysqli, 
  php5-mcrypt, 
  php5-gd,
+ php-apc,
  makepasswd
 Recommends: mysql-client
-Description: Tine 2.0 integration package for Univention Corporate Server
- Integration package for installation and configuration of the Tine 2.0
- groupware solution on Univention Corporate Server.
+Description: Tine 2.0 webserver integration package
+ This package integrates Tine 2.0 with the webserver, by installing all needed
+ dependencies to make Tine 2.0 available via HTTP(S).
+
+Package: tine20-libraries
+Architecture: all
+Depends: ${misc:Depends}
+Replaces: tine20-tinebase (<< 2012.10.3-0)
+Breaks: tine20-tinebase (<< 2012.10.3-0)
+Description: Additional libraries needed by Tine 2.0
+ Libraries bundled with upstream Tine 2.0 source package, but developed by other developers.
 
 Package: tine20-tinebase
 Architecture: all
-Depends: ${misc:Depends}, 
+Depends: ${misc:Depends},
+ tine20-libraries (= ${binary:Version}),
  makepasswd,
  php5-cli
 Recommends: php5-ldap
index 59be338..c3e81d7 100644 (file)
@@ -1,14 +1,14 @@
 # Apache and PHP configuration for Tine 2.0
 #
 
-Alias /tine20 /usr/share/tine20
+Alias /tine20                      /usr/share/tine20
 Alias /Microsoft-Server-ActiveSync /usr/share/tine20/Microsoft-Server-ActiveSync
 
 # some people prefer a simple URL like http://tine20.example.org
 # in this case you also have to disable to Alias lines above
 #<VirtualHost 1.2.3.4:80>
 #  DocumentRoot /usr/share/tine20
-#  ServerName tine20.example.org
+#  ServerName   tine20.example.org
 #</VirtualHost>
 
 <Directory /usr/share/tine20>
@@ -19,33 +19,23 @@ Alias /Microsoft-Server-ActiveSync /usr/share/tine20/Microsoft-Server-ActiveSync
 
     Options +ExecCGI
 
-    # uncomment this in vhost config for fastcgi
-    #<IfModule mod_fastcgi.c>
-    #    ScriptAlias /fastcgi/ /usr/share/tine20/fastcgi/
-    #    
-    #    # redirect php files to fastcgi server
-    #    Action     php-fastcgi /fastcgi/php5-fastcgi
-    #    AddHandler php-fastcgi .php
-    #    
-    #    # pass headers needed by Tine 2.0
-    #    FastCGIExternalServer /usr/share/tine20/fastcgi/php5-fastcgi -pass-header Authorization -pass-header If-Modified-Since -pass-header If-None-Match -flush -socket /dev/shm/fpm-www.pool
-    #</IfModule>
-    
     <IfModule mod_php5.c>
-        php_admin_value max_input_time 120
-        php_admin_value include_path .:/usr/share/tine20:/usr/share/tine20/library:/etc/tine20
-        php_admin_value open_basedir .:/usr/share/tine20:/var/lib/tine20:/tmp:/usr/share/php:/etc/tine20:/var/log/tine20
+        php_admin_value max_input_time         120
+        php_admin_value include_path           .:/usr/share/tine20:/usr/share/tine20/library:/etc/tine20
+        php_admin_value open_basedir           /usr/share/tine20:/var/lib/tine20:/tmp:/usr/share/php:/etc/tine20:/var/log/tine20
         php_admin_value session.gc_maxlifetime 86400
-        php_admin_value memory_limit 128M
-        php_admin_value upload_max_filesize 20M
-        php_admin_value post_max_size 20M
-        php_admin_value safe_mode off
-        php_admin_flag display_errors off
-        php_admin_flag log_errors on
-        php_admin_flag magic_quotes_gpc off
-        php_admin_flag magic_quotes_runtime off
-        php_admin_flag register_globals off
-        php_value max_execution_time 90
+        php_admin_value memory_limit           128M
+        php_admin_value upload_max_filesize    20M
+        php_admin_value post_max_size          20M
+        
+        php_admin_value safe_mode              off
+        php_admin_flag  display_errors         off
+        php_admin_flag  log_errors             on
+        php_admin_flag  magic_quotes_gpc       off
+        php_admin_flag  magic_quotes_runtime   off
+        php_admin_flag  register_globals       off
+        
+        php_value       max_execution_time     90
     </IfModule>
     
     <IfModule mod_rewrite.c>
@@ -55,7 +45,7 @@ Alias /Microsoft-Server-ActiveSync /usr/share/tine20/Microsoft-Server-ActiveSync
 
         # ActiveSync
         RewriteRule ^Microsoft-Server-ActiveSync index.php?frontend=activesync         [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
-        
+
         # OpenID
         RewriteRule ^users/(.*)                  index.php?frontend=openid&username=$1 [L,QSA]
 
@@ -67,15 +57,14 @@ Alias /Microsoft-Server-ActiveSync /usr/share/tine20/Microsoft-Server-ActiveSync
         RewriteRule ^calendars                   index.php?frontend=webdav             [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
         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]
-        
     </IfModule>
 
     <IfModule mod_expires.c>
         ExpiresActive on
 
-        ExpiresByType image/gif "access plus 1 month 1 days"
+        ExpiresByType image/gif  "access plus 1 month 1 days"
         ExpiresByType image/jpeg "access plus 1 month 1 days"
-        ExpiresByType image/png "access plus 1 month 1 days" 
+        ExpiresByType image/png  "access plus 1 month 1 days"
     </IfModule>
 
 </Directory>
diff --git a/scripts/packaging/debian/etc/php5-fpm.conf b/scripts/packaging/debian/etc/php5-fpm.conf
new file mode 100644 (file)
index 0000000..4ecd9fa
--- /dev/null
@@ -0,0 +1,7 @@
+<IfModule mod_fastcgi.c>
+    AddHandler   php5-fastcgi .php
+    Action       php5-fastcgi /php5-fastcgi
+    ScriptAlias /php5-fastcgi /usr/lib/cgi-bin/php5-fastcgi
+
+    FastCgiExternalServer /usr/lib/cgi-bin/php5-fastcgi -socket /var/run/php5-fpm.sock -pass-header Authorization -pass-header If-Modified-Since -pass-header If-None-Match
+</IfModule>
index 9ab5aa8..ccd2720 100644 (file)
@@ -1,13 +1,15 @@
 [PATH=/usr/share/tine20]
-max_input_time      = 120
-include_path        = .:/usr/share/tine20:/usr/share/tine20/library:/etc/tine20
-display_errors      = off
-log_errors          = on
-magic_quotes_gpc    = off
-magic_quotes_runtime = off
-register_globals    = off
-max_execution_time  = 90
-memory_limit        = 64M
-open_basedir        = /usr/share/tine20:/var/lib/tine20:/etc/tine20:/var/log/tine20
-upload_max_filesize = 20M
-post_max_size       = 20M
+max_input_time         = 120
+include_path           = .:/usr/share/tine20:/usr/share/tine20/library:/etc/tine20
+open_basedir           = /usr/share/tine20:/var/lib/tine20:/tmp:/usr/share/php:/etc/tine20:/var/log/tine20
+session.gc_maxlifetime = 86400
+memory_limit           = 128M
+upload_max_filesize    = 20M
+post_max_size          = 20M
+safe_mode              = off
+display_errors         = off
+log_errors             = on
+magic_quotes_gpc       = off
+magic_quotes_runtime   = off
+register_globals       = off
+max_execution_time     = 90
diff --git a/scripts/packaging/debian/tine20-libraries.install b/scripts/packaging/debian/tine20-libraries.install
new file mode 100644 (file)
index 0000000..18ab972
--- /dev/null
@@ -0,0 +1 @@
+library                  /usr/share/tine20
index ac8d9e1..69c0e6e 100644 (file)
@@ -1,4 +1,5 @@
-SHELL=/bin/sh
-PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+MAILTO=root
+SHELL=/bin/bash
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
 
-* * * * *      www-data        /usr/bin/php -f /usr/share/tine20/tine20.php -- --method Tinebase.triggerAsyncEvents
+* * * * *      www-data        /usr/bin/php -f /usr/share/tine20/tine20.php -- --config=/etc/tine20/config.inc.php --method=Tinebase.triggerAsyncEvents
index fe58c98..a801282 100644 (file)
@@ -1,17 +1,16 @@
 Addressbook              /usr/share/tine20
 Admin                    /usr/share/tine20
-images                   /usr/share/tine20
+Setup                    /usr/share/tine20
+Tinebase                 /usr/share/tine20
+Zend                     /usr/share/tine20
+CREDITS                  /usr/share/tine20
+LICENSE                  /usr/share/tine20
+PRIVACY                  /usr/share/tine20
 bootstrap.php            /usr/share/tine20
+images                   /usr/share/tine20
 index.php                /usr/share/tine20
 langHelper.php           /usr/share/tine20
-library                  /usr/share/tine20
-Setup                    /usr/share/tine20
 setup.php                /usr/share/tine20
 styles                   /usr/share/tine20
 tine20.php               /usr/share/tine20
-Tinebase                 /usr/share/tine20
-Zend                     /usr/share/tine20
-LICENSE                  /usr/share/tine20
-CREDITS                  /usr/share/tine20
-PRIVACY                  /usr/share/tine20
 debian/etc/php5.ini      /etc/tine20
index 37100cf..d6f0559 100644 (file)
@@ -36,80 +36,76 @@ if [ "$1" = "configure" ]; then
 
     # setup webserver
     db_get tine20/webserver_type
-    webservers="$RET"
+    webserver="$RET"
     
-    if [ "$webservers" != "" ]; then
-
-        for webserver in $webservers; do
-            webserver=${webserver%,}
-            
+    case "$webserver" in
+        apache2)
             # check if webserver is installed
-            test -x /usr/sbin/$webserver || continue
-    
-            case "$webserver" in
-                apache2)
-                    if [ -d /etc/apache2/mods-enabled ]; then
-                        if [ ! -f /etc/apache2/mods-enabled/rewrite.load -a ! -h /etc/apache2/mods-enabled/rewrite.load ]; then
-                            /usr/sbin/a2enmod rewrite
-                        fi
-                        if [ ! -f /etc/apache2/mods-enabled/expires.load -a ! -h /etc/apache2/mods-enabled/expires.load ]; then
-                            /usr/sbin/a2enmod expires
-                        fi
-                        if [ -f /etc/apache2/mods-available/php5.load ]; then
-                            if [ ! -f /etc/apache2/mods-enabled/php5.load -a ! -h /etc/apache2/mods-enabled/php5.load ]; then
-                                /usr/sbin/a2enmod php5
-                            fi 
-                        fi
-                    fi
+            if [ -x /usr/sbin/$webserver ]; then 
 
-                    # create vhost configuration links
-                    servers="apache2"
-                    linkdestination_apache="../../tine20/apache.conf"
-                    linkname="tine20"
-        
-                    if [ -e /usr/share/wwwconfig-common/confd-link.sh ]; then
-                        . /usr/share/wwwconfig-common/confd-link.sh
+                if [ -d /etc/apache2/mods-enabled ]; then
+                    if [ ! -f /etc/apache2/mods-enabled/rewrite.load -a ! -h /etc/apache2/mods-enabled/rewrite.load ]; then
+                        /usr/sbin/a2enmod rewrite
                     fi
-                    
-                    # mark webserver for restart (used by restart.sh)
-                    restart="$restart $webserver"
-                    
-                    ;;
-                    
-                lighttpd)
-
-                    # create vhost configuration links
-                    servers="$webserver"
-                    linkdestination_lighttpd="../../tine20/lighttpd.conf"
-                    linkname="15-tine20.conf"
-        
-                    if [ -e /usr/share/wwwconfig-common/confd-link.sh ]; then
-                        . /usr/share/wwwconfig-common/confd-link.sh
+                    if [ ! -f /etc/apache2/mods-enabled/expires.load -a ! -h /etc/apache2/mods-enabled/expires.load ]; then
+                        /usr/sbin/a2enmod expires
+                    fi
+                    if [ -f /etc/apache2/mods-available/php5.load ]; then
+                        if [ ! -f /etc/apache2/mods-enabled/php5.load -a ! -h /etc/apache2/mods-enabled/php5.load ]; then
+                            /usr/sbin/a2enmod php5
+                        fi 
                     fi
-                    
-                    if [ -d /etc/$webserver/conf-available ]; then
-                        if [ ! -f /etc/$webserver/conf-enabled/10-expire.conf -a ! -h /etc/$webserver/conf-enabled/10-expire.conf ]; then
-                            /usr/sbin/lighttpd-enable-mod expire
-                        fi
+                fi
+    
+                # create vhost configuration links
+                servers="apache2"
+                linkdestination_apache="../../tine20/apache.conf"
+                linkname="tine20"
+    
+                if [ -e /usr/share/wwwconfig-common/confd-link.sh ]; then
+                    . /usr/share/wwwconfig-common/confd-link.sh
+                fi
+                
+                # mark webserver for restart (used by restart.sh)
+                restart="$restart $webserver"
+            
+            fi
+            ;;
+            
+        lighttpd)
+            # check if webserver is installed
+            if [ -x /usr/sbin/$webserver ]; then 
 
-                        if [ ! -f /etc/$webserver/conf-enabled/15-tine20.conf -a ! -h /etc/$webserver/conf-enabled/15-tine20.conf ]; then
-                            /usr/sbin/lighttpd-enable-mod tine20
-                        fi
+                # create vhost configuration links
+                servers="$webserver"
+                linkdestination_lighttpd="../../tine20/lighttpd.conf"
+                linkname="15-tine20.conf"
+    
+                if [ -e /usr/share/wwwconfig-common/confd-link.sh ]; then
+                    . /usr/share/wwwconfig-common/confd-link.sh
+                fi
+                
+                if [ -d /etc/$webserver/conf-available ]; then
+                    if [ ! -f /etc/$webserver/conf-enabled/10-expire.conf -a ! -h /etc/$webserver/conf-enabled/10-expire.conf ]; then
+                        /usr/sbin/lighttpd-enable-mod expire
+                    fi
+    
+                    if [ ! -f /etc/$webserver/conf-enabled/15-tine20.conf -a ! -h /etc/$webserver/conf-enabled/15-tine20.conf ]; then
+                        /usr/sbin/lighttpd-enable-mod tine20
                     fi
-                    
-                    # mark webserver for restart (used by restart.sh)
-                    restart="$restart $webserver"
-                    
-                    ;;
+                fi
                 
-            esac
+                # mark webserver for restart (used by restart.sh)
+                restart="$restart $webserver"
             
-        done
+            fi
+            ;;
         
-        # restart webserver
-        if [ -e /usr/share/wwwconfig-common/restart.sh ]; then
-            . /usr/share/wwwconfig-common/restart.sh
-        fi
+    esac
+    
+    # restart webserver
+    if [ -e /usr/share/wwwconfig-common/restart.sh ]; then
+        . /usr/share/wwwconfig-common/restart.sh
     fi
 
 fi
index 6b98bba..368ecf1 100644 (file)
@@ -35,32 +35,38 @@ db_version 2.0
 
 if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then
     db_get tine20/webserver_type
-    webservers="$RET"
+    webserver="$RET"
 
-    if [ "$webservers" != "" ]; then
+    # check if webserver is installed
+    test -x /usr/sbin/$webserver || continue
 
-        for webserver in $webservers; do
-            webserver=${webserver%,}
+    case "$webserver" in
+        apache2)
+            rm -f /etc/$webserver/conf.d/tine20
+            
+            # mark webserver for restart (used by restart.sh)
+            restart="$restart $webserver"
+            
+            ;;
+            
+        lighttpd)
+            if [ -f /etc/$webserver/conf-enabled/15-tine20.conf ]; then
+                /usr/sbin/lighttpd-disable-mod tine20
+                
+                # mark webserver for restart (used by restart.sh)
+                restart="$restart $webserver"
+            fi
+            
+            rm -f /etc/$webserver/conf-available/15-tine20.conf
+            
+            ;;
+    esac
 
-            # check if webserver is installed
-            test -x /usr/sbin/$webserver || continue
-    
-            case "$webserver" in
-                apache2)
-                    rm -f /etc/$webserver/conf.d/tine20
-                    
-                    # mark webserver for restart (used by restart.sh)
-                    restart="$restart $webserver"
-                    ;;
-            esac
-        done
-    
-        # restart webserver
-        if [ -e /usr/share/wwwconfig-common/restart.sh ]; then
-            . /usr/share/wwwconfig-common/restart.sh
-        fi
-        
+    # restart webserver
+    if [ -e /usr/share/wwwconfig-common/restart.sh ]; then
+        . /usr/share/wwwconfig-common/restart.sh
     fi
+    
 fi
 
 #DEBHELPER#
index 4f479b1..d06a5da 100644 (file)
@@ -1,6 +1,7 @@
 Template: tine20/webserver_type
-Type: multiselect
+Type: select
 Choices: apache2, lighttpd
+Default: apache2
 _Description: Web server to reconfigure automatically:
  If you do not select a web server to reconfigure automatically, Tine 2.0
  will not be usable until you reconfigure your webserver to enable
diff --git a/scripts/packaging/fedora/SOURCES/0001-tine20-fix-requirements.patch b/scripts/packaging/fedora/SOURCES/0001-tine20-fix-requirements.patch
new file mode 100644 (file)
index 0000000..a80328e
--- /dev/null
@@ -0,0 +1,10 @@
+--- Setup/essentials.xml       2012-06-27 11:00:42.000000000 +0200
++++ Setup/essentials.xml.fedora        2012-08-02 08:40:56.605780474 +0200
+@@ -13,7 +13,6 @@
+         <extension name="dom" />
+         <extension name="mcrypt" />
+         <extension name="iconv" />
+-        <extension name="zip" />
+         <extension name="xml" />
+     </extensions>
+ </essential>
diff --git a/scripts/packaging/fedora/SOURCES/tine20-README.fedora b/scripts/packaging/fedora/SOURCES/tine20-README.fedora
new file mode 100644 (file)
index 0000000..c6cf0a2
--- /dev/null
@@ -0,0 +1,25 @@
+After installation you will need to do some adjustments to the configuration
+file at /etc/tine20/config.inc.php. At least the database connection has to
+be configured there after you manually configured a database access in your
+MySQL-Server. You are also recommended to adjust the setupuser
+credentials to your needs.
+
+
+You are able to decided whether you use Tine 2.0 via mod_php or FastCGI,
+just disable and enable the corresponding lines in
+/etc/httpd/conf.d/tine20.conf accordingly.
+
+
+Please note that, even if the installation process places the corresponding
+Apache configuration to your /etc/httpd/conf.d/, Apache is not automatically
+triggered to re-read the configuration, this has to be done manually by
+yourself via
+
+       systemctl reload httpd.service
+
+
+Note that this package does not contain the optional VoIP integration,
+if you want to use this feature, you can download and install the according
+tarball at
+
+    http://www.tine20.org/download.html
diff --git a/scripts/packaging/fedora/SOURCES/tine20-config.inc.php b/scripts/packaging/fedora/SOURCES/tine20-config.inc.php
new file mode 100644 (file)
index 0000000..7cba1f9
--- /dev/null
@@ -0,0 +1,35 @@
+<?php
+// NOTE: You can either:
+//  - copy this file to config.inc.php and add change config values
+//  - create an empty config.inc.php, make it writeable to the webserver and edit config via the setup.php interface
+//  - make this directory temporary writeable to the webserver and edit config via the setup.php interface
+
+// minimal configuration
+return array(
+    'database' => array(
+        'host'          => 'ENTER DATABASE HOSTNAME',
+        'dbname'        => 'ENTER DATABASE NAME',
+        'username'      => 'ENTER DATABASE USERNAME',
+        'password'      => 'ENTER DATABASE PASSWORD',
+        'adapter'       => 'pdo_mysql',
+        'tableprefix'   => 'tine20_',
+    ),
+    'setupuser' => array(
+        'username'      => 'tine20setup',
+        'password'      => 'SETUP PASSWORD'
+    ),
+    'caching' => array (
+        'active' => true,
+        'path' => '/var/lib/tine20/cache',
+        'lifetime' => 3600,
+    ),
+    'logger' => array (
+        'active' => true,
+        '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/fedora/SOURCES/tine20-cron b/scripts/packaging/fedora/SOURCES/tine20-cron
new file mode 100644 (file)
index 0000000..69c0e6e
--- /dev/null
@@ -0,0 +1,5 @@
+MAILTO=root
+SHELL=/bin/bash
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+
+* * * * *      www-data        /usr/bin/php -f /usr/share/tine20/tine20.php -- --config=/etc/tine20/config.inc.php --method=Tinebase.triggerAsyncEvents
diff --git a/scripts/packaging/fedora/SOURCES/tine20-httpd.conf b/scripts/packaging/fedora/SOURCES/tine20-httpd.conf
new file mode 100644 (file)
index 0000000..c3e81d7
--- /dev/null
@@ -0,0 +1,72 @@
+# Apache and PHP configuration for Tine 2.0
+#
+
+Alias /tine20                      /usr/share/tine20
+Alias /Microsoft-Server-ActiveSync /usr/share/tine20/Microsoft-Server-ActiveSync
+
+# some people prefer a simple URL like http://tine20.example.org
+# in this case you also have to disable to Alias lines above
+#<VirtualHost 1.2.3.4:80>
+#  DocumentRoot /usr/share/tine20
+#  ServerName   tine20.example.org
+#</VirtualHost>
+
+<Directory /usr/share/tine20>
+    Order Allow,Deny
+    Allow from all
+
+    DirectoryIndex index.php
+
+    Options +ExecCGI
+
+    <IfModule mod_php5.c>
+        php_admin_value max_input_time         120
+        php_admin_value include_path           .:/usr/share/tine20:/usr/share/tine20/library:/etc/tine20
+        php_admin_value open_basedir           /usr/share/tine20:/var/lib/tine20:/tmp:/usr/share/php:/etc/tine20:/var/log/tine20
+        php_admin_value session.gc_maxlifetime 86400
+        php_admin_value memory_limit           128M
+        php_admin_value upload_max_filesize    20M
+        php_admin_value post_max_size          20M
+        
+        php_admin_value safe_mode              off
+        php_admin_flag  display_errors         off
+        php_admin_flag  log_errors             on
+        php_admin_flag  magic_quotes_gpc       off
+        php_admin_flag  magic_quotes_runtime   off
+        php_admin_flag  register_globals       off
+        
+        php_value       max_execution_time     90
+    </IfModule>
+    
+    <IfModule mod_rewrite.c>
+        RewriteEngine on
+
+        RewriteBase /tine20
+
+        # ActiveSync
+        RewriteRule ^Microsoft-Server-ActiveSync index.php?frontend=activesync         [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
+
+        # OpenID
+        RewriteRule ^users/(.*)                  index.php?frontend=openid&username=$1 [L,QSA]
+
+        # WebDAV / CalDAV / CardDAV
+        RewriteCond %{REQUEST_METHOD} !^(GET|POST)$
+        RewriteRule ^$                           index.php?frontend=webdav             [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
+
+        RewriteRule ^addressbooks                index.php?frontend=webdav             [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
+        RewriteRule ^calendars                   index.php?frontend=webdav             [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
+        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]
+    </IfModule>
+
+    <IfModule mod_expires.c>
+        ExpiresActive on
+
+        ExpiresByType image/gif  "access plus 1 month 1 days"
+        ExpiresByType image/jpeg "access plus 1 month 1 days"
+        ExpiresByType image/png  "access plus 1 month 1 days"
+    </IfModule>
+
+</Directory>
+
+
diff --git a/scripts/packaging/fedora/SOURCES/tine20-logrotate.conf b/scripts/packaging/fedora/SOURCES/tine20-logrotate.conf
new file mode 100644 (file)
index 0000000..1b00f7e
--- /dev/null
@@ -0,0 +1,8 @@
+/var/log/tine20/*.log {
+  rotate 12
+  weekly
+  compress
+  delaycompress
+  missingok
+  notifempty
+}
diff --git a/scripts/packaging/fedora/SOURCES/tine20-php.ini b/scripts/packaging/fedora/SOURCES/tine20-php.ini
new file mode 100644 (file)
index 0000000..9ab5aa8
--- /dev/null
@@ -0,0 +1,13 @@
+[PATH=/usr/share/tine20]
+max_input_time      = 120
+include_path        = .:/usr/share/tine20:/usr/share/tine20/library:/etc/tine20
+display_errors      = off
+log_errors          = on
+magic_quotes_gpc    = off
+magic_quotes_runtime = off
+register_globals    = off
+max_execution_time  = 90
+memory_limit        = 64M
+open_basedir        = /usr/share/tine20:/var/lib/tine20:/etc/tine20:/var/log/tine20
+upload_max_filesize = 20M
+post_max_size       = 20M
similarity index 64%
rename from scripts/packaging/fedora/tine20.spec
rename to scripts/packaging/fedora/SPECS/tine20.spec
index 6198017..87fa4fb 100644 (file)
@@ -27,7 +27,7 @@
 
 %global vyear 2012
 %global vmonth 10
-%global vmin 1
+%global vmin 3
 
 Name:           tine20
 Version:        %{vyear}.%{vmonth}.%{vmin}
@@ -36,16 +36,17 @@ Summary:        Open Source Groupware and CRM
 
 License:        AGPLv3, GPLv3, BSD, LGPLv2.1+, LGPLv2.1
 URL:            http://www.tine20.org/
-Source0:        http://www.tine20.org/downloads/%{version}/tine20-allinone_%{version}.tar.bz2
-Source1:        tine20-httpd.conf
-Source2:        tine20-php.ini
-Source3:        tine20-config.inc.php
-Source4:        tine20-logrotate.conf
-Source5:        tine20-README.fedora
-
-# The patch is to make some requirements compatible with packages (not) provided
-# in Fedora and thus, not implemented upstream
-Patch0:         0001-tine20-fix-requirements.patch
+Source0:        http://www.tine20.org/downloads/%{version}/%{name}-allinone_%{version}.tar.bz2
+Source1:        %{name}-httpd.conf
+Source2:        %{name}-php.ini
+Source3:        %{name}-config.inc.php
+Source4:        %{name}-logrotate.conf
+Source5:        %{name}-README.fedora
+Source6:        %{name}-cron
+Source7:        http://www.tine20.org/downloads/%{version}/%{name}-humanresources_%{version}.tar.bz2
+
+Requires:       %{name}-webstack = %{version}
+Requires:       mysql-server
 
 BuildArch:      noarch
 
@@ -70,21 +71,41 @@ pleasure and include:
  * History
  * PDF export
 
-
-%package base
-Summary:        Tine 2.0 base package
+%package webstack
+Summary:        Tine 2.0 webserver integration package
 Requires:       httpd
-Requires:       php >= 5.2.3
-Requires:       php-gd, php-mysqli, php-mcrypt
+Requires:       php >= 5.3.0
+Requires:       php-gd php-mysqli php-mcrypt php-pecl-apc
 Requires:       php-ZendFramework php-ZendFramework-Ldap
+Requires:       %{name}-tinebase %{name}-activesync %{name}-calendar %{name}-crm %{name}-felamimail %{name}-filemanager %{name}-projects %{name}-sales %{name}-tasks %{name}-timetracker
+
+%description webstack
+This package integrates Tine 2.0 with the webserver, by installing all needed
+dependencies to make Tine 2.0 available via HTTP(S).
 
-%description base
+%package tinebase
+Summary:        Tine 2.0 base package
+Requires:       %{name}-libraries = %{version}
+
+%description tinebase
 This package contains the base which at least is necessary to run Tine 2.0.
 
+%package libraries
+Summary:        Additional libraries required by Tine 2.0
+
+%description libraries
+Libraries bundled with upstream Tine 2.0 source package, but developed by other developers.
+
+%package activesync
+Summary:        Tine 2.0 activesync module
+Requires:       %{name}-tinebase = %{version}
+
+%description activesync
+This package contains the activesync module for Tine 2.0.
 
 %package calendar
 Summary:        Tine 2.0 calendar module
-Requires:       tine20-base = %{version}
+Requires:       %{name}-tinebase = %{version}
 
 %description calendar
 This package contains the calendar module for Tine 2.0.
@@ -92,9 +113,9 @@ This package contains the calendar module for Tine 2.0.
 
 %package crm
 Summary:        Tine 2.0 CRM module
-Requires:       tine20-base = %{version}
-Requires:       tine20-sales = %{version}
-Requires:       tine20-tasks = %{version}
+Requires:       %{name}-tinebase = %{version}
+Requires:       %{name}-sales = %{version}
+Requires:       %{name}-tasks = %{version}
 
 %description crm
 This package contains the CRM module for Tine 2.0.
@@ -102,7 +123,7 @@ This package contains the CRM module for Tine 2.0.
 
 %package felamimail
 Summary:        Tine 2.0 mail client module
-Requires:       tine20-base = %{version}
+Requires:       %{name}-tinebase = %{version}
 
 %description felamimail
 This package contains the mail client module for Tine 2.0 called "Felamimail".
@@ -110,15 +131,22 @@ This package contains the mail client module for Tine 2.0 called "Felamimail".
 
 %package filemanager
 Summary:        Tine 2.0 file manager module
-Requires:       tine20-base = %{version}
+Requires:       %{name}-tinebase = %{version}
 
 %description filemanager
 This package contains the file manager module for Tine 2.0.
 
 
+%package projects
+Summary:        Tine 2.0 project module
+Requires:       %{name}-tinebase = %{version}
+
+%description projects
+This package contains the projects module for Tine 2.0.
+
 %package sales
 Summary:        Tine 2.0 sales module
-Requires:       tine20-base = %{version}
+Requires:       %{name}-tinebase = %{version}
 
 %description sales
 This package contains the sales module for Tine 2.0.
@@ -126,7 +154,7 @@ This package contains the sales module for Tine 2.0.
 
 %package tasks
 Summary:        Tine 2.0 tasks module
-Requires:       tine20-base = %{version}
+Requires:       %{name}-tinebase = %{version}
 
 %description tasks
 This package contains the tasks module for Tine 2.0.
@@ -134,7 +162,7 @@ This package contains the tasks module for Tine 2.0.
 
 %package timetracker
 Summary:        Tine 2.0 time tracker module
-Requires:       tine20-base = %{version}
+Requires:       %{name}-tinebase = %{version}
 
 %description timetracker
 This package contains the time tracker module for Tine 2.0.
@@ -142,68 +170,68 @@ This package contains the time tracker module for Tine 2.0.
 
 %prep
 %setup -q -c -n %{name}-%{version}
-cp -a %{SOURCE5} README.fedora
-
-%patch0
+%{__cp} -a %{SOURCE5} README.fedora
 
 
 %build
 # nothing to do here so far..
 
 %install
-rm -rf $RPM_BUILD_ROOT
+%{__rm} -rf $RPM_BUILD_ROOT
 
 
 ## remove the bundled ZendFramework, the Fedora-shipped one is referenced from
 ## tine20-httpd.conf which will be installed as /etc/httpd/conf.d/tine20.conf
-#rm -rf library/Zend/
+#%{__rm} -rf library/Zend/
 
 
 # installation of code to /usr/share/tine20
-install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/
-cp -ad * $RPM_BUILD_ROOT%{_datadir}/%{name}/
-rm -f $RPM_BUILD_ROOT%{_datadir}/%{name}/{[R]*,config.inc.php.dist}
+%{__install} -d $RPM_BUILD_ROOT%{_datadir}/%{name}/
+%{__cp} -ad * $RPM_BUILD_ROOT%{_datadir}/%{name}/
+%{__rm} -f $RPM_BUILD_ROOT%{_datadir}/%{name}/{[R]*,config.inc.php.dist}
 
 # session and other stuff
-install -d $RPM_BUILD_ROOT%{_sharedstatedir}/%{name}/{tmp,sessions,files,cache}
+%{__install} -d $RPM_BUILD_ROOT%{_sharedstatedir}/%{name}/{tmp,sessions,files,cache}
 
 # httpd configuration
-install -d $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/
-install -pm 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/%{name}.conf
+%{__install} -d $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/
+%{__install} -pm 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/%{name}.conf
 
 # php.ini needed if FastCGI is used
-install -d $RPM_BUILD_ROOT%{_sysconfdir}/php.d/
-install -pm 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/php.d/%{name}.ini
+%{__install} -d $RPM_BUILD_ROOT%{_sysconfdir}/php.d/
+%{__install} -pm 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/php.d/%{name}.ini
 
 # Tine 2.0 configuration
-install -d $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/
-install -pm 640 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/config.inc.php
+%{__install} -d $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/
+%{__install} -pm 640 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/config.inc.php
 
 # logging
-install -d $RPM_BUILD_ROOT%{_localstatedir}/log/%{name}
-install -d $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/
-install -pm 644 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{name}
+%{__install} -d $RPM_BUILD_ROOT%{_localstatedir}/log/%{name}
+%{__install} -d $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/
+%{__install} -pm 644 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{name}
 
+# cron
+%{__install} -d $RPM_BUILD_ROOT%{_sysconfdir}/cron.d/
+%{__install} -pm 644 %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/cron.d/%{name}
 
 %post
 if [ "$1" -eq "1" ]; then
-        export NEWPASS=$( dd if=/dev/urandom bs=20 count=1 2>/dev/null \
-                                | sha1sum | awk '{print $1}' )
+    export NEWPASS=$( dd if=/dev/urandom bs=20 count=1 2>/dev/null \
+        | sha1sum | awk '{print $1}' )
     sed -i "s/SETUP PASSWORD/$NEWPASS/" %{_sysconfdir}/%{name}/config.inc.php
 fi
 
+%files
+
 
-%files base
-%doc LICENSE PRIVACY README RELEASENOTES config.inc.php.dist README.fedora
+%files tinebase
+%doc LICENSE PRIVACY README RELEASENOTES config.inc.php.dist README.fedora docs/htaccess
 %dir %{_datadir}/%{name}/
-%{_datadir}/%{name}/ActiveSync/
 %{_datadir}/%{name}/Addressbook/
 %{_datadir}/%{name}/Admin/
 %{_datadir}/%{name}/images/
 %{_datadir}/%{name}/index.php
 %{_datadir}/%{name}/langHelper.php
-%{_datadir}/%{name}/library/
-%{_datadir}/%{name}/Projects/
 %{_datadir}/%{name}/Setup/
 %{_datadir}/%{name}/setup.php
 %{_datadir}/%{name}/styles/
@@ -214,11 +242,13 @@ fi
 %{_datadir}/%{name}/PRIVACY
 %{_datadir}/%{name}/bootstrap.php
 %{_datadir}/%{name}/CREDITS
+%{_datadir}/%{name}/docs/htaccess
 
 %dir %{_sysconfdir}/%{name}/
 %config(noreplace) %attr(0640,root,apache) %{_sysconfdir}/%{name}/config.inc.php
 %config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf
 %config(noreplace) %{_sysconfdir}/php.d/tine20.ini
+%config            %{_sysconfdir}/cron.d/tine20
 
 %dir %{_sharedstatedir}/%{name}/
 %dir %attr(0750,apache,apache) %{_sharedstatedir}/%{name}/tmp
@@ -229,6 +259,12 @@ fi
 %dir %attr(0750,apache,apache) %{_localstatedir}/log/%{name}/
 %config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
 
+%files libraries
+%{_datadir}/%{name}/library/
+
+%files activesync
+%{_datadir}/%{name}/ActiveSync/
+
 
 %files calendar
 %{_datadir}/%{name}/Calendar/
@@ -246,6 +282,10 @@ fi
 %{_datadir}/%{name}/Filemanager/
 
 
+%files projects
+%{_datadir}/%{name}/Projects/
+
+
 %files sales
 %{_datadir}/%{name}/Sales/
 
@@ -258,7 +298,15 @@ fi
 %{_datadir}/%{name}/Timetracker/
 
 
+%files webstack
+
 %changelog
+* Wed Jan 04 2013 Lars Kneschke <l.kneschke@metaways.de> - 2012.10.3-1
+- New upstream release Joey SR 3 (2012.10.3)
+
+* Wed Jan 02 2013 Lars Kneschke <l.kneschke@metaways.de> - 2012.10.2-1
+- new upstream release 2012.10.2
+
 * Mon Nov 05 2012 Dominic Hopf <dmaphy@fedoraproject.org> - 2012.10.1-1
 - new upstream release 2012.10.1
 
index 21fe775..47250fa 100644 (file)
@@ -322,11 +322,5 @@ class Setup_Backend_OracleTest extends Setup_Backend_AbstractTest
         $dbProxy->setNamedParamPrefix($_prefix);
         
         return $dbProxy;
-    }    
-}        
-
-
-                
-if (PHPUnit_MAIN_METHOD == 'Setup_Backend_MysqlTest::main') {
-    Setup_Backend_OracleTest::main();
+    }
 }
index c114c13..c9a1b67 100644 (file)
@@ -125,20 +125,20 @@ class Setup_ControllerTest extends PHPUnit_Framework_TestCase
     public function testSaveAuthenticationRedirectSettings()
     {
         $originalRedirectSettings = array(
-          Tinebase_Config::REDIRECTURL => Tinebase_Config::getInstance()->getConfig(Tinebase_Config::REDIRECTURL, NULL, '')->value,
-          Tinebase_Config::REDIRECTTOREFERRER => Tinebase_Config::getInstance()->getConfig(Tinebase_Config::REDIRECTTOREFERRER, NULL, '')->value
+          Tinebase_Config::REDIRECTURL => Tinebase_Config::getInstance()->get(Tinebase_Config::REDIRECTURL, ''),
+          Tinebase_Config::REDIRECTTOREFERRER => Tinebase_Config::getInstance()->get(Tinebase_Config::REDIRECTTOREFERRER, '')
         );
-        
+         
         $newRedirectSettings = array(
           Tinebase_Config::REDIRECTURL => 'http://tine20.org',
-          Tinebase_Config::REDIRECTTOREFERRER => '1'
+          Tinebase_Config::REDIRECTTOREFERRER => 1
         );
         
         $this->_uit->saveAuthentication(array('redirectSettings' => $newRedirectSettings));
         
         $storedRedirectSettings = array(
-          Tinebase_Config::REDIRECTURL => Tinebase_Config::getInstance()->getConfig(Tinebase_Config::REDIRECTURL, NULL, '')->value,
-          Tinebase_Config::REDIRECTTOREFERRER => Tinebase_Config::getInstance()->getConfig(Tinebase_Config::REDIRECTTOREFERRER, NULL, '')->value
+          Tinebase_Config::REDIRECTURL => Tinebase_Config::getInstance()->get(Tinebase_Config::REDIRECTURL, ''),
+          Tinebase_Config::REDIRECTTOREFERRER => Tinebase_Config::getInstance()->get(Tinebase_Config::REDIRECTTOREFERRER, '')
         );
         
         $this->assertEquals($storedRedirectSettings, $newRedirectSettings);
@@ -147,14 +147,14 @@ class Setup_ControllerTest extends PHPUnit_Framework_TestCase
         //test empty redirectUrl
         $newRedirectSettings = array(
           Tinebase_Config::REDIRECTURL => '',
-          Tinebase_Config::REDIRECTTOREFERRER => '0'
+          Tinebase_Config::REDIRECTTOREFERRER => 0
         );
         
         $this->_uit->saveAuthentication(array('redirectSettings' => $newRedirectSettings));
         
         $storedRedirectSettings = array(
-          Tinebase_Config::REDIRECTURL => Tinebase_Config::getInstance()->getConfig(Tinebase_Config::REDIRECTURL, NULL, '')->value,
-          Tinebase_Config::REDIRECTTOREFERRER => Tinebase_Config::getInstance()->getConfig(Tinebase_Config::REDIRECTTOREFERRER, NULL, '')->value
+          Tinebase_Config::REDIRECTURL => Tinebase_Config::getInstance()->get(Tinebase_Config::REDIRECTURL, ''),
+          Tinebase_Config::REDIRECTTOREFERRER => Tinebase_Config::getInstance()->get(Tinebase_Config::REDIRECTTOREFERRER, '')
         );
         
         $this->assertEquals($storedRedirectSettings, $newRedirectSettings);
index 00bef1c..06e8408 100644 (file)
@@ -74,7 +74,7 @@ class ActiveSync_Controller_EmailTests extends PHPUnit_Framework_TestCase
      */
     protected function setUp()
     {
-        $imapConfig = Tinebase_Config::getInstance()->getConfigAsArray(Tinebase_Config::IMAP);
+        $imapConfig = Tinebase_Config::getInstance()->get(Tinebase_Config::IMAP, new Tinebase_Config_Struct())->toArray();
         if (empty($imapConfig) || !array_key_exists('useSystemAccount', $imapConfig) || $imapConfig['useSystemAccount'] != true) {
             $this->markTestSkipped('IMAP backend not configured');
         }
@@ -118,6 +118,24 @@ class ActiveSync_Controller_EmailTests extends PHPUnit_Framework_TestCase
     }
     
     /**
+     * validate getEntry
+     */
+    public function testGetEntry()
+    {
+        $controller = $this->_getController($this->_getDevice(Syncroton_Model_Device::TYPE_ANDROID_40));
+        
+        $message = $this->_createTestMessage();
+        
+        $syncrotonModelEmail = $controller->getEntry(
+            new Syncroton_Model_SyncCollection(array('collectionId' => 'foobar', 'options' => array('bodyPreferences' => array('2' => array('type' => '2'))))), 
+            $message->getId()
+        );
+        
+        $this->assertEquals('9631', $syncrotonModelEmail->body->estimatedDataSize);
+        #$this->assertEquals(2787, strlen(stream_get_contents($syncrotonFileReference->data)));
+    }
+    
+    /**
      * validate fetching email by filereference(hashid-partid)
      */
     public function testGetFileReference()
@@ -132,18 +150,6 @@ class ActiveSync_Controller_EmailTests extends PHPUnit_Framework_TestCase
         
         $this->assertEquals('text/plain', $syncrotonFileReference->contentType);
         $this->assertEquals(2787, strlen(stream_get_contents($syncrotonFileReference->data)));
-        
-        $imp = new DOMImplementation();
-        
-        // Creates a DOMDocumentType instance
-        $dtd = $imp->createDocumentType('AirSync', "-//AIRSYNC//DTD AirSync//EN", "http://www.microsoft.com/");
-        
-        // Creates a DOMDocument instance
-        $syncDoc = $imp->createDocument('uri:ItemOperations', 'ItemOperations', $dtd);
-        $syncDoc->documentElement->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:Syncroton', 'uri:Syncroton');
-        $syncDoc->documentElement->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:AirSyncBase', 'uri:AirSyncBase');
-        $syncDoc->formatOutput = false;
-        $syncDoc->encoding     = 'utf-8';
     }
     
     /**
@@ -285,6 +291,7 @@ class ActiveSync_Controller_EmailTests extends PHPUnit_Framework_TestCase
      * forward email test
      * 
      * @see 0007328: Answered flags were not synced by activesync
+     * @see 0007456: add mail body on Forward via ActiveSync
      */
     public function testForwardEmail()
     {
@@ -315,6 +322,9 @@ class ActiveSync_Controller_EmailTests extends PHPUnit_Framework_TestCase
         // check forward flag
         $originalMessage = Felamimail_Controller_Message::getInstance()->get($originalMessage->getId());
         $this->assertTrue(in_array(Zend_Mail_Storage::FLAG_PASSED, $originalMessage->flags), 'forward flag missing in original message: ' . print_r($originalMessage->toArray(), TRUE));
+        
+        // check body
+        $this->assertContains("The attached list notes all of the packages that were added or removed", $completeMessage->body);
     }
     
     /**
index f0d89ee..958f1ad 100644 (file)
  */
 require_once dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . 'TestHelper.php';
 
-if (!defined('PHPUnit_MAIN_METHOD')) {
-    define('PHPUnit_MAIN_METHOD', 'Addressbook_Backend_LdapTest::main');
-}
-
 /**
  * Test class for Tinebase_User
  */
@@ -73,10 +69,4 @@ class Addressbook_Backend_LdapTest extends PHPUnit_Framework_TestCase
     {
         $this->_backend->getAll();
     }
-    
-}       
-    
-
-if (PHPUnit_MAIN_METHOD == 'Addressbook_Backend_LdapTest::main') {
-    Addressbook_Backend_LdapTest::main();
 }
index 399f7b4..79fc90e 100644 (file)
@@ -477,7 +477,7 @@ class Addressbook_JsonTest extends PHPUnit_Framework_TestCase
     {
         $contact = $this->testTagsModlog();
         $contact['tags'] = array();
-        sleep(1);
+        sleep(1); // make sure that the second change always gets last when fetching notes
         $result = $this->_instance->saveContact($contact);
         $this->_checkChangedNote($result['id'], array('tags ([{"id":', ' -> {"removed":[{'), 4);
     }
@@ -550,7 +550,7 @@ class Addressbook_JsonTest extends PHPUnit_Framework_TestCase
         $this->assertEquals($contact['id'], $updatedContact['id'], 'updated produced a new contact');
         $this->assertEquals('PHPUNIT UPDATE', $updatedContact['n_family'], 'updating data failed');
 
-        if (Tinebase_Config::getInstance()->getConfig(Tinebase_Config::MAPPANEL, NULL, TRUE)->value) {
+        if (Tinebase_Config::getInstance()->get(Tinebase_Config::MAPPANEL, TRUE)) {
             // check geo data
             $this->assertEquals('9.99489300545466', $updatedContact['adr_one_lon'], 'wrong geodata (lon)');
             $this->assertEquals('53.5444258235736', $updatedContact['adr_one_lat'], 'wrong geodata (lat)');
@@ -603,8 +603,6 @@ class Addressbook_JsonTest extends PHPUnit_Framework_TestCase
             'value'    =>  Tinebase_Core::getUser()->accountDisplayName
         )));
         $sharedTagName = $this->_createAndAttachTag($filter);
-        // need to sleep for 1 second because modlog does not allow to change the same attribute twice in the same second ...
-        sleep(1);
         $personalTagName = $this->_createAndAttachTag($filter, Tinebase_Model_Tag::TYPE_PERSONAL);
 
         // export first and create files array
@@ -868,9 +866,6 @@ class Addressbook_JsonTest extends PHPUnit_Framework_TestCase
             'index'             => 1,
         ));
         
-        // need to sleep for 1 second because modlog does not allow to change the same attribute twice in the same second ...
-        sleep(1);
-        
         $result = $this->_importHelper(array('dryrun' => 0), $clientRecords);
         $this->assertEquals(1, $result['totalcount'], 'Should merge fritz: ' . print_r($result['exceptions'], TRUE));
         $this->assertEquals(2, count($result['results'][0]['tags']), 'Should merge tags');
@@ -1413,7 +1408,6 @@ class Addressbook_JsonTest extends PHPUnit_Framework_TestCase
                     'description' => 'testImport',
                     'color' => '#009B31',
         ));
-        sleep(1);
         $tag = Tinebase_Tags::getInstance()->attachTagToMultipleRecords($filter, $tag);
         $filter = array(array(
             'field'    => 'tag',
index 224e50a..0eb59d2 100644 (file)
@@ -155,12 +155,16 @@ class Admin_JsonTest extends PHPUnit_Framework_TestCase
     
     /**
      * try to save group data
+     * 
+     * @return array
      */
     public function testAddGroup()
     {
         $result = $this->_json->saveGroup($this->objects['initialGroup']->toArray(), array());
         
         $this->assertEquals($this->objects['initialGroup']->description, $result['description']);
+        
+        return $result;
     }
     
     /**
@@ -570,7 +574,7 @@ class Admin_JsonTest extends PHPUnit_Framework_TestCase
         // account to add as role member
         $account = Tinebase_User::getInstance()->getUserById($this->objects['user']->accountId);
         
-        $roledData = $this->objects['role']->toArray();
+        $roleData = $this->objects['role']->toArray();
         $roleMembers = array(
             array(
                 "id"    => $account->getId(),
@@ -585,7 +589,7 @@ class Admin_JsonTest extends PHPUnit_Framework_TestCase
             )
         );
         
-        $result = $this->_json->saveRole($roledData, $roleMembers, $roleRights);
+        $result = $this->_json->saveRole($roleData, $roleMembers, $roleRights);
         
         // get role id from result
         $roleId = $result['id'];
@@ -706,6 +710,30 @@ class Admin_JsonTest extends PHPUnit_Framework_TestCase
     }
     
     /**
+     * testDeleteGroupBelongingToRole
+     * 
+     * @see 0007578: Deleting a group belonging to a role => can not use the role anymore !
+     */
+    public function testDeleteGroupBelongingToRole()
+    {
+        $group = $this->testAddGroup();
+        $roleData = $this->objects['role']->toArray();
+        $roleMembers = array(
+            array(
+                "id"    => $group['id'],
+                "type"  => "group",
+            )
+        );
+        
+        $result = $this->_json->saveRole($roleData, $roleMembers, array());
+        $this->_json->deleteGroups(array($group['id']));
+        
+        $role = $this->_json->getRole($result['id']);
+        
+        $this->assertEquals(0, $role['roleMembers']['totalcount'], 'role members should be empty: ' . print_r($role['roleMembers'], TRUE));
+    }
+    
+    /**
      * try to save tag and update without rights
      */
     public function testSaveTagAndUpdateWithoutRights()
@@ -826,7 +854,7 @@ class Admin_JsonTest extends PHPUnit_Framework_TestCase
     public function testContainerNotification()
     {
         // prepare smtp transport
-        $smtpConfig = Tinebase_Config::getInstance()->getConfigAsArray(Tinebase_Config::SMTP);
+        $smtpConfig = Tinebase_Config::getInstance()->get(Tinebase_Config::SMTP, new Tinebase_Config_Struct())->toArray();
         if (empty($smtpConfig)) {
              $this->markTestSkipped('No SMTP config found: this is needed to send notifications.');
         }
@@ -992,4 +1020,16 @@ class Admin_JsonTest extends PHPUnit_Framework_TestCase
         $containers = Tinebase_Container::getInstance()->getContainerByACL($this->objects['user']->accountId, 'Addressbook', Tinebase_Model_Grants::GRANT_ADD);
         $this->assertTrue(count($containers->filter('name', 'testcontainer')) === 1, 'testcontainer ' . print_r($containerUpdated, TRUE) . ' not found: ' . print_r($containers->toArray(), TRUE));
     }
+    
+    /**
+     * testPhpinfo
+     * 
+     * @see 0007182: add "server info" section to admin
+     */
+    public function testPhpinfo()
+    {
+        $info = $this->_json->getServerInfo();
+        $this->assertContains("phpinfo()", $info['html']);
+        $this->assertContains("PHP Version =>", $info['html']);
+    }
 }
index aaf742d..06ab564 100644 (file)
@@ -163,8 +163,8 @@ class Calendar_Controller_EventGrantsTests extends Calendar_TestCase
         
         $loadedEvent = $this->_uit->get($persistentEvent->getId());
         $this->assertEquals($persistentEvent->summary, $loadedEvent->summary);
-        $this->assertTrue((bool)$loadedEvent->{Tinebase_Model_Grants::GRANT_EDIT});
-        $this->assertFalse((bool)$loadedEvent->{Tinebase_Model_Grants::GRANT_DELETE});
+        $this->assertTrue((bool)$loadedEvent->{Tinebase_Model_Grants::GRANT_EDIT}, Tinebase_Model_Grants::GRANT_EDIT);
+        $this->assertTrue((bool)$loadedEvent->{Tinebase_Model_Grants::GRANT_DELETE}, Tinebase_Model_Grants::GRANT_DELETE);
     }
     
     /**
@@ -178,8 +178,6 @@ class Calendar_Controller_EventGrantsTests extends Calendar_TestCase
         $loadedEvent = $this->_uit->get($persistentEvent->getId());
         
         $this->assertEquals($persistentEvent->summary, $loadedEvent->summary);
-        $this->assertTrue((bool)$loadedEvent->{Tinebase_Model_Grants::GRANT_EDIT});
-        $this->assertFalse((bool)$loadedEvent->{Tinebase_Model_Grants::GRANT_DELETE});
     }
     
     /**
@@ -198,8 +196,6 @@ class Calendar_Controller_EventGrantsTests extends Calendar_TestCase
         $this->assertEquals(1, count($loadedEvent), 'event not found with search action!');
         $this->assertTrue((bool)$loadedEvent->{Tinebase_Model_Grants::GRANT_READ}, 'event not readable');
         $this->assertEquals($persistentEvent->summary, $loadedEvent->summary);
-        $this->assertTrue((bool)$loadedEvent->{Tinebase_Model_Grants::GRANT_EDIT});
-        $this->assertFalse((bool)$loadedEvent->{Tinebase_Model_Grants::GRANT_DELETE});
     }
     
     /**
@@ -218,9 +214,9 @@ class Calendar_Controller_EventGrantsTests extends Calendar_TestCase
         
         $this->assertFalse(empty($event), 'no event found, but freebusy info should be');
         $this->assertTrue(empty($event->summary), 'event with freebusy only is not cleaned up');
-        $this->assertFalse((bool)$event->{Tinebase_Model_Grants::GRANT_READ});
-        $this->assertFalse((bool)$event->{Tinebase_Model_Grants::GRANT_EDIT});
-        $this->assertFalse((bool)$event->{Tinebase_Model_Grants::GRANT_DELETE});
+        $this->assertFalse((bool)$event->{Tinebase_Model_Grants::GRANT_READ}, Tinebase_Model_Grants::GRANT_READ);
+        $this->assertFalse((bool)$event->{Tinebase_Model_Grants::GRANT_EDIT}, Tinebase_Model_Grants::GRANT_EDIT);
+        $this->assertFalse((bool)$event->{Tinebase_Model_Grants::GRANT_DELETE}, Tinebase_Model_Grants::GRANT_DELETE);
         
         // direct get of freebusy only events is not allowed
         $this->setExpectedException('Tinebase_Exception_AccessDenied');
@@ -236,8 +232,8 @@ class Calendar_Controller_EventGrantsTests extends Calendar_TestCase
         $persistentEvent = $this->_createEventInPersonasCalendar('jmcblack', 'jmcblack', 'jmcblack', Calendar_Model_Event::CLASS_PRIVATE);
         $loadedEvent = $this->_uit->get($persistentEvent->getId());
         $this->assertEquals($persistentEvent->summary, $loadedEvent->summary);
-        $this->assertTrue((bool)$loadedEvent->{Tinebase_Model_Grants::GRANT_READ});
-        $this->assertFalse((bool)$loadedEvent->{Tinebase_Model_Grants::GRANT_DELETE});
+        $this->assertTrue((bool)$loadedEvent->{Tinebase_Model_Grants::GRANT_READ}, Tinebase_Model_Grants::GRANT_READ);
+        $this->assertFalse((bool)$loadedEvent->{Tinebase_Model_Grants::GRANT_DELETE}, Tinebase_Model_Grants::GRANT_DELETE);
     }
     
     /**
@@ -274,9 +270,9 @@ class Calendar_Controller_EventGrantsTests extends Calendar_TestCase
         $persistentEvent = $this->_createEventInPersonasCalendar('rwright', NULL, 'rwright', Calendar_Model_Event::CLASS_PRIVATE);
         $loadedEvent = $this->_uit->get($persistentEvent->getId());
         $this->assertEquals($persistentEvent->summary, $loadedEvent->summary);
-        $this->assertTrue((bool)$loadedEvent->{Tinebase_Model_Grants::GRANT_READ});
-        $this->assertTrue((bool)$loadedEvent->{Tinebase_Model_Grants::GRANT_EDIT});
-        $this->assertFalse((bool)$loadedEvent->{Tinebase_Model_Grants::GRANT_DELETE});
+        $this->assertTrue((bool)$loadedEvent->{Tinebase_Model_Grants::GRANT_READ}, Tinebase_Model_Grants::GRANT_READ);
+        $this->assertTrue((bool)$loadedEvent->{Tinebase_Model_Grants::GRANT_EDIT}, Tinebase_Model_Grants::GRANT_EDIT);
+        $this->assertTrue((bool)$loadedEvent->{Tinebase_Model_Grants::GRANT_DELETE}, Tinebase_Model_Grants::GRANT_DELETE);
     }
     
     /**
index a0f6047..6f15026 100644 (file)
@@ -55,7 +55,7 @@ class Calendar_Controller_EventNotificationsTests extends Calendar_TestCase
     {
         parent::setUp();
         
-        $smtpConfig = Tinebase_Config::getInstance()->getConfigAsArray(Tinebase_Config::SMTP);
+        $smtpConfig = Tinebase_Config::getInstance()->get(Tinebase_Config::SMTP, new Tinebase_Config_Struct())->toArray();
         if (empty($smtpConfig)) {
              $this->markTestSkipped('No SMTP config found: this is needed to send notifications.');
         }
@@ -528,16 +528,18 @@ class Calendar_Controller_EventNotificationsTests extends Calendar_TestCase
 
         // check adjusted alarm time
         $loadedEvent = $this->_eventController->get($persistentEvent->getId());
-        
         $recurid = $loadedEvent->alarms->getFirstRecord()->getOption('recurid');
         $nextAlarmEventStart = new Tinebase_DateTime(substr($recurid, -19));
         
         $this->assertTrue($nextAlarmEventStart > Tinebase_DateTime::now()->addDay(1), 'alarmtime is not adjusted');
-        //$orgiginalAlarm = $persistentEvent->alarms->getFirstRecord()->alarm_time;
-        //$adjustedAlarm = $loadedEvent->alarms->getFirstRecord()->alarm_time;
-        //$this->assertTrue($adjustedAlarm->isLater($orgiginalAlarm), 'alarmtime is not adjusted');
-
         $this->assertEquals(Tinebase_Model_Alarm::STATUS_PENDING, $loadedEvent->alarms->getFirstRecord()->sent_status, 'alarmtime is set to pending');
+        
+        // update series @see #7430: Calendar sends too much alarms for recurring events
+        $this->_eventController->update($loadedEvent);
+        $recurid = $loadedEvent->alarms->getFirstRecord()->getOption('recurid');
+        $nextAlarmEventStart = new Tinebase_DateTime(substr($recurid, -19));
+        
+        $this->assertTrue($nextAlarmEventStart > Tinebase_DateTime::now()->addDay(1), 'alarmtime is wrong');
     }
     
     /**
@@ -550,7 +552,7 @@ class Calendar_Controller_EventNotificationsTests extends Calendar_TestCase
         $event->attendee = $this->_getPersonaAttendee('pwulf');
         $event->organizer = $this->_personasContacts['pwulf']->getId();
         
-        $event->dtstart = Tinebase_DateTime::now()->addMinute(15);
+        $event->dtstart = Tinebase_DateTime::now()->subDay(1)->addMinute(15);
         $event->dtend = clone $event->dtstart;
         $event->dtend->addMinute(30);
         $event->rrule = 'FREQ=DAILY;INTERVAL=1';
@@ -562,9 +564,9 @@ class Calendar_Controller_EventNotificationsTests extends Calendar_TestCase
         
         $persistentEvent = $this->_eventController->create($event);
         
-        $exceptionEvent = $this->_eventController->get($persistentEvent->getId());
-        $exceptionEvent->summary = 'first occurance exception';
-        $exceptionEvent = $this->_eventController->createRecurException($exceptionEvent);
+        $exceptions = new Tinebase_Record_RecordSet('Calendar_Model_Event');
+        $recurSet = Calendar_Model_Rrule::computeRecurrenceSet($persistentEvent, $exceptions, $persistentEvent->dtstart, Tinebase_DateTime::now()->addDay(1));
+        $exceptionEvent = $this->_eventController->createRecurException($recurSet->getFirstRecord());
         
         // assert one alarm only
         self::flushMailer();
@@ -572,11 +574,59 @@ class Calendar_Controller_EventNotificationsTests extends Calendar_TestCase
         $assertString = ' at ' . Tinebase_DateTime::now()->format('M j');
         $this->_assertMail('pwulf', $assertString);
         
+        // check series
         $loadedEvent = $this->_eventController->get($persistentEvent->getId());
+        $recurid = $loadedEvent->alarms->getFirstRecord()->getOption('recurid');
+        $nextAlarmEventStart = new Tinebase_DateTime(substr($recurid, -19));
+        
+        $this->assertTrue($nextAlarmEventStart > Tinebase_DateTime::now(), 'alarmtime of series is not adjusted');
+        
+        // check exception
+        $recurid = $exceptionEvent->alarms->getFirstRecord()->getOption('recurid');
+        $nextAlarmEventStart = new Tinebase_DateTime(substr($recurid, -19));
+        
+        $this->assertTrue($nextAlarmEventStart < Tinebase_DateTime::now()->addHour(1), 'alarmtime of exception is not adjusted');
+        
+        // update exception @see #7430: Calendar sends too much alarms for recurring events
+        $exceptionEvent = $this->_eventController->update($exceptionEvent);
+        $recurid = $exceptionEvent->alarms->getFirstRecord()->getOption('recurid');
+        $nextAlarmEventStart = new Tinebase_DateTime(substr($recurid, -19));
+        
+        $this->assertTrue($nextAlarmEventStart < Tinebase_DateTime::now()->addHour(1), 'alarmtime of exception is wrong');
+    }
+    
+    public function testRecuringAlarmCustomDate()
+    {
+        $event = $this->_getEvent();
+        $event->attendee = $this->_getPersonaAttendee('pwulf');
+        $event->organizer = $this->_personasContacts['pwulf']->getId();
+        
+        $event->dtstart = Tinebase_DateTime::now()->addWeek(1)->addMinute(15);
+        $event->dtend = clone $event->dtstart;
+        $event->dtend->addMinute(30);
+        $event->rrule = 'FREQ=YEARLY;INTERVAL=1;BYDAY=2TH;BYMONTH=12';
+        $event->alarms = new Tinebase_Record_RecordSet('Tinebase_Model_Alarm', array(
+            new Tinebase_Model_Alarm(array(
+                'minutes_before' => Tinebase_Model_Alarm::OPTION_CUSTOM,
+                // NOTE: user means one week and 30 mins before
+                'alarm_time'     => Tinebase_DateTime::now()->subMinute(15)
+            ), TRUE)
+        ));
         
+        $persistentEvent = $this->_eventController->create($event);
+        
+        // assert one alarm only
+        self::flushMailer();
+        Tinebase_Alarm::getInstance()->sendPendingAlarms("Tinebase_Event_Async_Minutely");
+        $assertString = ' at ' . Tinebase_DateTime::now()->addWeek(1)->format('M j');
+        $this->_assertMail('pwulf', $assertString);
+        
+        // check adjusted alarm time
+        $loadedEvent = $this->_eventController->get($persistentEvent->getId());
         $recurid = $loadedEvent->alarms->getFirstRecord()->getOption('recurid');
         $nextAlarmEventStart = new Tinebase_DateTime(substr($recurid, -19));
-        $this->assertTrue($nextAlarmEventStart > Tinebase_DateTime::now(), 'alarmtime is not adjusted');
+        
+        $this->assertTrue($nextAlarmEventStart > Tinebase_DateTime::now(), 'alarmtime of series is not adjusted');
     }
     
     /**
index 8f9efd9..faa16b4 100644 (file)
@@ -690,7 +690,7 @@ class Calendar_Controller_EventTests extends Calendar_TestCase
         $user = $loadedEvent->attendee
             ->filter('user_type', Calendar_Model_Attender::USERTYPE_GROUPMEMBER)
             ->filter('user_id', $newUser->contact_id);
-        $this->assertEquals(1, count($user), 'added user is not attender of event, but should be');
+        $this->assertEquals(1, count($user), 'added user is not attender of event, but should be. user: ' . print_r($newUser->toArray(), TRUE));
         
         // cleanup user
         Admin_Controller_User::getInstance()->delete($newUser->getId());
@@ -703,7 +703,7 @@ class Calendar_Controller_EventTests extends Calendar_TestCase
         $user = $loadedEvent->attendee
             ->filter('user_type', Calendar_Model_Attender::USERTYPE_GROUPMEMBER)
             ->filter('user_id', $newUser->contact_id);
-        $this->assertEquals(0, count($user), 'added user is attender of event, but should be');
+        $this->assertEquals(0, count($user), 'added user is attender of event, but should be (after deleting user)');
     }
     
     /**
@@ -832,7 +832,6 @@ class Calendar_Controller_EventTests extends Calendar_TestCase
         $this->assertEquals('2009-04-30 13:30:00', Calendar_Model_Rrule::getRruleFromString($updatedEvent->rrule)->until->get(Tinebase_Record_Abstract::ISO8601LONG), 'until in rrule must not be changed');
         $this->assertEquals('2009-04-30 13:30:00', $updatedEvent->rrule_until->get(Tinebase_Record_Abstract::ISO8601LONG), 'rrule_until must not be changed');
         
-        sleep(1); // wait for modlog
         $updatedEvent->dtstart->subHour(5);
         $updatedEvent->dtend->subHour(5);
         $secondUpdatedEvent = $this->_controller->update($updatedEvent);
index 2e6fa45..372dc63 100644 (file)
@@ -269,6 +269,45 @@ class Calendar_Controller_MSEventFacadeTest extends Calendar_TestCase
         $this->assertEquals('2009-03-26 10:00:00', $updatedPersistentException->dtstart->format(Tinebase_Record_Abstract::ISO8601LONG));
     }
     
+    /**
+     * testUpdatePreserveAlarmProperties
+     * 
+     * @see #7430: Calendar sends too much alarms for recurring events
+     */
+    public function testUpdatePreserveAlarmProperties()
+    {
+        $alarm30 = new Tinebase_Record_RecordSet('Tinebase_Model_Alarm', array(
+            array('minutes_before' => 30),
+        ), TRUE);
+        
+        $event = $this->_getEvent();
+        $event->dtstart = Tinebase_DateTime::now()->subDay(1)->addMinute(15);
+        $event->dtend = clone $event->dtstart;
+        $event->dtend->addHour(2);
+        $event->rrule = 'FREQ=DAILY;INTERVAL=1;COUNT=3';
+        $event->alarms = clone $alarm30;
+        $event = Calendar_Controller_Event::getInstance()->create($event);
+        
+        $exceptions = new Tinebase_Record_RecordSet('Calendar_Model_Event');
+        $recurSet = Calendar_Model_Rrule::computeRecurrenceSet($event, $exceptions, $event->dtstart, Tinebase_DateTime::now()->addDay(1));
+        $exceptionEvent = Calendar_Controller_Event::getInstance()->createRecurException($recurSet->getFirstRecord());
+        
+        Tinebase_Alarm::getInstance()->sendPendingAlarms("Tinebase_Event_Async_Minutely");
+        Calendar_Controller_EventNotificationsTests::flushMailer();
+        
+        $event = $this->_uit->get($event->getId());
+        $persistentAlarm = $event->exdate[0]->alarms->getFirstRecord();
+        $event->alarms = $event->alarms = clone $alarm30;
+        foreach ($event->exdate as $exdate) {
+            $exdate->alarms = clone $alarm30;
+        }
+        $updatedEvent = $this->_uit->update($event);
+        $updatedAlarm = $updatedEvent->exdate[0]->alarms->getFirstRecord();
+        
+        $diff = $persistentAlarm->diff($updatedAlarm);
+        $this->assertTrue(empty($diff));
+    }
+    
     public function testAttendeeStatusUpdate()
     {
         $event = $this->testCreate();
index 63bd020..6af2c56 100644 (file)
@@ -395,7 +395,6 @@ class Calendar_Controller_RecurTest extends Calendar_TestCase
         ));
         
         $persistentEvent = $this->_controller->create($event);
-        sleep(1); // wait for modlog
         
         $exceptions = new Tinebase_Record_RecordSet('Calendar_Model_Event');
         $recurSet = Calendar_Model_Rrule::computeRecurrenceSet($persistentEvent, $exceptions, $from, $until);
index fef0072..7fc9813 100644 (file)
@@ -157,8 +157,7 @@ class Calendar_Convert_Event_VCalendar_GenericTest extends PHPUnit_Framework_Tes
      */
     public function testConvertToTine20ModelWithGroupInvitation()
     {
-        $smtpConfig = Tinebase_Config::getInstance()->getConfigAsArray(Tinebase_Model_Config::SMTP, 'Tinebase');
-        
+        $smtpConfig = Tinebase_Config::getInstance()->get(Tinebase_Model_Config::SMTP, new Tinebase_Config_Struct())->toArray();
         if (!isset($smtpConfig['primarydomain'])) {
             $this->markTestSkipped('no primary smtp domain configured');
         }
@@ -369,7 +368,7 @@ class Calendar_Convert_Event_VCalendar_GenericTest extends PHPUnit_Framework_Tes
         
         $vcalendar = $this->_getVCalendar(dirname(__FILE__) . '/../../../Import/files/lightning.ics');
         // remove alarm part from vcalendar
-        $vcalendar = preg_replace('/BEGIN:VALARM.*END:VALARM\n/s', null, $vcalendar);
+        $vcalendar = preg_replace('/BEGIN:VALARM.*END:VALARM(\n|\r\n)/s', null, $vcalendar);
         
         $event = $converter->toTine20Model($vcalendar, $event);
         
index d929153..5db6ce7 100644 (file)
@@ -39,9 +39,10 @@ class Calendar_performanceTests extends PHPUnit_Framework_TestCase
             return;
         }
         $cache->clean(Zend_Cache::CLEANING_MODE_ALL);
-        
-        Tinebase_Core::getDb()->query("RESET QUERY CACHE;");
-        
+        $_db = Tinebase_Core::getDb();
+        if ($_db instanceof Zend_Db_Adapter_Mysql) {
+            $_db->query("RESET QUERY CACHE;");
+        }
         $this->_json = new Calendar_Frontend_Json();
     }
     
index 104d610..959607f 100644 (file)
@@ -4,7 +4,7 @@
  * 
  * @package     Courses
  * @license     http://www.gnu.org/licenses/agpl.html
- * @copyright   Copyright (c) 2009-2011 Metaways Infosystems GmbH (http://www.metaways.de)
+ * @copyright   Copyright (c) 2009-2012 Metaways Infosystems GmbH (http://www.metaways.de)
  * @author      Philipp Schüle <p.schuele@metaways.de>
  * 
  */
@@ -288,6 +288,17 @@ class Courses_JsonTest extends PHPUnit_Framework_TestCase
     }
 
     /**
+     * testImportWithMissingList
+     * 
+     * @see 0007460: check existence of group/list before user import
+     */
+    public function testImportWithMissingList()
+    {
+        $result = $this->_importHelper(dirname(__FILE__) . '/files/tah2a.txt', $this->_getCourseImportDefinition3('iso-8859-1'), TRUE, TRUE);
+        $this->assertEquals(3, count($result['members']), 'import failed');
+    }
+    
+    /**
      * test internet access on/off/filtered
      * 
      * @todo remove some code duplication
@@ -300,7 +311,6 @@ class Courses_JsonTest extends PHPUnit_Framework_TestCase
         $userId = $courseData['members'][0]['id'];
         $groupMemberships = Tinebase_Group::getInstance()->getGroupMemberships($userId);
         $this->assertTrue(in_array($this->_configGroups[Courses_Config::INTERNET_ACCESS_GROUP_ON]->getId(), $groupMemberships), $userId . ' not member of the internet group ' . print_r($groupMemberships, TRUE));
-        sleep(1); // modlog issue
         
         // filtered internet access
         $courseData['internet'] = 'FILTERED';
@@ -309,7 +319,6 @@ class Courses_JsonTest extends PHPUnit_Framework_TestCase
         $groupMemberships = Tinebase_Group::getInstance()->getGroupMemberships($userId);
         $this->assertTrue(in_array($this->_configGroups[Courses_Config::INTERNET_ACCESS_GROUP_FILTERED]->getId(), $groupMemberships), 'not member of the filtered internet group ' . print_r($groupMemberships, TRUE));
         $this->assertFalse(in_array($this->_configGroups[Courses_Config::INTERNET_ACCESS_GROUP_ON]->getId(), $groupMemberships), 'member of the internet group ' . print_r($groupMemberships, TRUE));
-        sleep(1); // modlog issue
         
         // remove internet access
         $courseData['internet'] = 'OFF';
@@ -451,15 +460,22 @@ class Courses_JsonTest extends PHPUnit_Framework_TestCase
      * 
      * @param string $_filename
      * @param Tinebase_Model_ImportExportDefinition $_definition
+     * @param boolean $_useJsonImportFn
+     * @param boolean $removeGroupList
      * @return array course data
      */
-    protected function _importHelper($_filename, Tinebase_Model_ImportExportDefinition $_definition = NULL, $_useJsonImportFn = FALSE)
+    protected function _importHelper($_filename, Tinebase_Model_ImportExportDefinition $_definition = NULL, $_useJsonImportFn = FALSE, $removeGroupList = FALSE)
     {
         $definition = ($_definition !== NULL) ? $_definition : $this->_getCourseImportDefinition();
         
         $course = $this->_getCourseData();
         $courseData = $this->_json->saveCourse($course);
         
+        if ($removeGroupList) {
+            $group = Admin_Controller_Group::getInstance()->get($courseData['group_id']);
+            Addressbook_Controller_List::getInstance()->delete($group->list_id);
+        }
+        
         $this->_coursesToDelete[] = $courseData['id'];
         
         if ($_useJsonImportFn) {
index 717328c..d41e923 100644 (file)
@@ -87,7 +87,7 @@ class Crm_Export_CsvTest extends Crm_Export_AbstractTest
         
         $defaultContainerId = Tinebase_Container::getInstance()->getDefaultContainer('Crm')->getId();
         $this->assertContains('"lead_name","leadstate_id","Leadstate","leadtype_id","Leadtype","leadsource_id","Leadsource","container_id","start"'
-            . ',"description","end","turnover","probableTurnover","probability","end_scheduled","tags","notes","tags",'
+            . ',"description","end","turnover","probableTurnover","probability","end_scheduled","tags","notes","seq","tags",'
             . '"CUSTOMER-org_name","CUSTOMER-n_family","CUSTOMER-n_given","CUSTOMER-adr_one_street","CUSTOMER-adr_one_postalcode","CUSTOMER-adr_one_locality",'
             . '"CUSTOMER-adr_one_countryname","CUSTOMER-tel_work","CUSTOMER-tel_cell","CUSTOMER-email",'
             . '"PARTNER","RESPONSIBLE","TASK"', $export, 'headline wrong');
index d3775d2..5ac53d3 100644 (file)
@@ -127,15 +127,15 @@ class Crm_JsonTest extends Crm_AbstractTest
             'leadsource' => 'Another Leadsource'
         );
         $anotherResult = $this->_instance->saveSettings($newSettings);
-        $this->assertEquals($anotherResult, $newSettings);
+        $this->assertEquals($newSettings, $anotherResult, 'new settings have not been saved');
         
         // reset original settings
         $result = $this->_instance->saveSettings($oldSettings);
-        $this->assertEquals($oldSettings, $result);
+        $this->assertEquals($result, $oldSettings, 'old settings have not been reset');
         
         // test Crm_Model_Config::getOptionById
         $settings = Crm_Controller::getInstance()->getConfigSettings();
-        $this->assertEquals(array(), $settings->getOptionById(5, 'leadsources'));
+        $this->assertEquals(array(), $settings->getOptionById(5, 'leadsources'), 'Crm_Model_Config::getOptionById failed');
     }
     
     /**
@@ -320,6 +320,7 @@ class Crm_JsonTest extends Crm_AbstractTest
      * testConcurrentRelationSetting
      * 
      * @see 0007108: inspect and solve concurrency conflicts when setting lead relations
+     * @see 0000554: modlog: records can't be updated in less than 1 second intervals
      */
     public function testConcurrentRelationSetting()
     {
@@ -333,7 +334,6 @@ class Crm_JsonTest extends Crm_AbstractTest
                 'type'  => 'TASK',
                 'own_model' => 'Tasks_Model_Task',
                 'own_backend' => 'Sql',
-                //'own_id' => 'c0096f3d78edb82a9670931f0f5f575a76b656f0',
                 'own_degree' => 'sibling',
                 'related_model' => 'Crm_Model_Lead',
                 'related_backend' => 'Sql',
@@ -342,17 +342,15 @@ class Crm_JsonTest extends Crm_AbstractTest
             ),
         );
         $taskData = $taskJson->saveTask($taskData);
-        
-        sleep(1);
         $taskData['description'] = 1;
         $taskData = $taskJson->saveTask($taskData);
-        sleep(1);
         
         $savedLead = $this->_instance->getLead($leadData['id']);
         $savedLead['relations'][0]['related_record']['description'] = '2';
         $savedLead['relations'][0]['related_record']['due'] = '2012-10-18 12:54:33';
-        // client may ommit last_modified time -> this should cause a concurrency conflict
-        $savedLead['relations'][0]['related_record']['last_modified_time'] = '';
+        
+        // client may send wrong seq -> this should cause a concurrency conflict
+        $savedLead['relations'][0]['related_record']['seq'] = 0;
         try {
             $savedLead = $this->_instance->saveLead($savedLead);
             $this->fail('expected concurrency exception');
index ec6a276..646a4e3 100644 (file)
@@ -34,7 +34,7 @@ class Felamimail_AllTests
         $suite = new PHPUnit_Framework_TestSuite('Tine 2.0 Felamimail All Tests');
         
         // only call Felamimail tests if imap is configured in config.inc.php
-        $imapConfig = Tinebase_Config::getInstance()->getConfigAsArray(Tinebase_Config::IMAP);
+        $imapConfig = Tinebase_Config::getInstance()->get(Tinebase_Config::IMAP, new Tinebase_Config_Struct())->toArray();
         if (! empty($imapConfig) && array_key_exists('useSystemAccount', $imapConfig) && $imapConfig['useSystemAccount']) {
             $suite->addTestSuite('Felamimail_Controller_Cache_MessageTest');
             $suite->addTestSuite('Felamimail_JsonTest');
index 60202bd..2dd3f0a 100644 (file)
@@ -70,8 +70,6 @@ class Felamimail_Controller_AccountTest extends PHPUnit_Framework_TestCase
      */
     protected function tearDown()
     {
-        Tinebase_TransactionManager::getInstance()->rollBack();
-        
         foreach ($this->_foldersToDelete as $foldername) {
             try {
                 Felamimail_Controller_Folder::getInstance()->delete($this->_account->getId(), $foldername);
@@ -79,6 +77,8 @@ class Felamimail_Controller_AccountTest extends PHPUnit_Framework_TestCase
                 // do nothing
             }
         }
+        
+        Tinebase_TransactionManager::getInstance()->rollBack();
     }
     
     /**
@@ -152,6 +152,22 @@ class Felamimail_Controller_AccountTest extends PHPUnit_Framework_TestCase
     }
     
     /**
+     * test create trash on the fly
+     */
+    public function testCreateTrashOnTheFly()
+    {
+        // make sure that the delimiter is correct / fetched from server
+        $capabilities = $this->_controller->updateCapabilities($this->_account);\r
+        
+        // set another trash folder
+        $this->_account->trash_folder = 'newtrash';
+        $this->_foldersToDelete[] = 'newtrash';
+        $accountBackend = new Felamimail_Backend_Account();
+        $account = $accountBackend->update($this->_account);
+        $newtrash = $this->_controller->getSystemFolder($account, Felamimail_Model_Folder::FOLDER_TRASH);
+    }
+
+    /**
      * test change pw + credential cache
      */
     public function testChangePasswordAndUpdateCredentialCache()
@@ -162,7 +178,7 @@ class Felamimail_Controller_AccountTest extends PHPUnit_Framework_TestCase
         unset($account->id);
         $account->type = Felamimail_Model_Account::TYPE_USER;
         $account->user = $testConfig->username;
-        $imapConfig = Tinebase_Config::getInstance()->getConfigAsArray(Tinebase_Config::IMAP);
+        $imapConfig = Tinebase_Config::getInstance()->get(Tinebase_Config::IMAP, new Tinebase_Config_Struct())->toArray();
         if (isset($imapConfig['domain']) && ! empty($imapConfig['domain'])) {
             $account->user .= '@' . $imapConfig['domain'];
         }
@@ -189,19 +205,6 @@ class Felamimail_Controller_AccountTest extends PHPUnit_Framework_TestCase
     }
     
     /**
-     * test create trash on the fly
-     */
-    public function testCreateTrashOnTheFly()
-    {
-        // set another trash folder
-        $this->_account->trash_folder = 'newtrash';
-        $this->_foldersToDelete[] = 'newtrash';
-        $accountBackend = new Felamimail_Backend_Account();
-        $account = $accountBackend->update($this->_account);
-        $newtrash = $this->_controller->getSystemFolder($account, Felamimail_Model_Folder::FOLDER_TRASH);
-    }
-    
-    /**
      * testEmptySignature
      * 
      * @see 0006666: Signature delimeter not removed if no Signature is used
index 9bf75ae..d38e2ba 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @package     Felamimail
  * @license     http://www.gnu.org/licenses/agpl.html
- * @copyright   Copyright (c) 2009-2012 Metaways Infosystems GmbH (http://www.metaways.de)
+ * @copyright   Copyright (c) 2009-2013 Metaways Infosystems GmbH (http://www.metaways.de)
  * @author      Philipp Schüle <p.schuele@metaways.de>
  *
  */
@@ -832,8 +832,10 @@ class Felamimail_Controller_MessageTest extends PHPUnit_Framework_TestCase
         $completeForwardedMessage = $this->_controller->getCompleteMessage($forwardedMessage);
         
         $this->assertEquals(Felamimail_Model_Message::CONTENT_TYPE_MESSAGE_RFC822, $forwardedMessage['structure']['parts'][2]['contentType']);
-        $this->assertEquals($cachedMessage->subject . '.eml', $forwardedMessage['structure']['parts'][2]['parameters']['name']);
-        $this->assertEquals($cachedMessage->subject . '.eml', $completeForwardedMessage->attachments[0]['filename']);
+        $this->assertEquals($cachedMessage->subject . '.eml', $forwardedMessage['structure']['parts'][2]['parameters']['name'],
+            'filename mismatch in structure' . print_r($forwardedMessage['structure']['parts'][2], TRUE));
+        $this->assertEquals($cachedMessage->subject . '.eml', $completeForwardedMessage->attachments[0]['filename'],
+            'filename mismatch of attachment' . print_r($completeForwardedMessage->attachments[0], TRUE));
         
         return $forwardedMessage;
     }
@@ -1263,6 +1265,20 @@ class Felamimail_Controller_MessageTest extends PHPUnit_Framework_TestCase
         $this->assertContains('unwahrscheinlichen Fall, dass Probleme auftreten sollten,', $message->body, print_r($message->toArray(), TRUE));
     }
     
+    /**
+     * testUmlautAttachment
+     * 
+     * @see 0007624: losing umlauts in attached filenames
+     */
+    public function testUmlautAttachment()
+    {
+        $cachedMessage = $this->messageTestHelper('attachmentUmlaut.eml');
+        $message = $this->_controller->getCompleteMessage($cachedMessage);
+        
+        $this->assertEquals(1, count($message->attachments));
+        $this->assertEquals('äöppopä.txt', $message->attachments[0]['filename']);
+    }
+    
     /********************************* protected helper funcs *************************************/
     
     /**
index 8fe5872..17ae8ad 100644 (file)
@@ -4,7 +4,7 @@
  * 
  * @package     Felamimail
  * @license     http://www.gnu.org/licenses/agpl.html
- * @copyright   Copyright (c) 2009-2012 Metaways Infosystems GmbH (http://www.metaways.de)
+ * @copyright   Copyright (c) 2009-2013 Metaways Infosystems GmbH (http://www.metaways.de)
  * @author      Philipp Schüle <p.schuele@metaways.de>
  * 
  */
@@ -855,6 +855,8 @@ class Felamimail_JsonTest extends PHPUnit_Framework_TestCase
     
     /**
      * forward message test
+     * 
+     * @see 0007624: losing umlauts in attached filenames
      */
     public function testForwardMessageWithAttachment()
     {
@@ -875,7 +877,7 @@ class Felamimail_JsonTest extends PHPUnit_Framework_TestCase
             'original_id'   => $message['id'],
             'attachments'   => array(new Tinebase_Model_TempFile(array(
                 'type'  => Felamimail_Model_Message::CONTENT_TYPE_MESSAGE_RFC822,
-                'name'  => $subject,
+                'name'  => 'Verbessurüngsvorschlag',
             ), TRUE)),
             'flags'         => Zend_Mail_Storage::FLAG_PASSED,
         );
@@ -884,6 +886,11 @@ class Felamimail_JsonTest extends PHPUnit_Framework_TestCase
         $this->_json->saveMessage($forwardMessageData);
         $forwardMessage = $this->_searchForMessageBySubject($fwdSubject);
         
+        // check attachment name
+        $forwardMessageComplete = $this->_json->getMessage($forwardMessage['id']);
+        $this->assertEquals(1, count($forwardMessageComplete['attachments']));
+        $this->assertEquals('Verbessurüngsvorschlag.eml', $forwardMessageComplete['attachments'][0]['filename'], 'umlaut missing from attachment filename');
+        
         $forwardMessage = $this->_json->getMessage($forwardMessage['id']);
         $this->assertTrue(array_key_exists('structure', $forwardMessage), 'structure should be set when fetching complete message: ' . print_r($forwardMessage, TRUE));
         $this->assertEquals(Felamimail_Model_Message::CONTENT_TYPE_MESSAGE_RFC822, $forwardMessage['structure']['parts'][2]['contentType']);
@@ -1316,7 +1323,6 @@ class Felamimail_JsonTest extends PHPUnit_Framework_TestCase
         $returned = $this->_json->saveMessage($messageToSend);
         $this->_foldersToClear = array('INBOX', $this->_account->sent_folder);
         
-        //sleep(10);
         $result = $this->_getMessages($folderName);
         $message = $this->_getMessageFromSearchResult($result, $messageToSend['subject']);
         
index 8855eff..0a87cf5 100644 (file)
@@ -62,7 +62,7 @@ class Felamimail_Model_AccountTest extends PHPUnit_Framework_TestCase
      */
     public function testGetSmtpConfig()
     {
-        $smtpConfig = Tinebase_Config::getInstance()->getConfigAsArray(Tinebase_Config::SMTP);
+        $smtpConfig = Tinebase_Config::getInstance()->get(Tinebase_Config::SMTP, new Tinebase_Config_Struct())->toArray();
         
         $account = new Felamimail_Model_Account(array(
             'type'      => Felamimail_Model_Account::TYPE_SYSTEM,
diff --git a/tests/tine20/Felamimail/files/attachmentUmlaut.eml b/tests/tine20/Felamimail/files/attachmentUmlaut.eml
new file mode 100644 (file)
index 0000000..7620c77
--- /dev/null
@@ -0,0 +1,55 @@
+Return-Path: <unittest@tine20.org>\r
+Delivered-To: <unittest@tine20.org>\r
+Received: from mail04.metaways.net ([10.129.3.200])\r
+       by mail03.metaways.net (Dovecot) with LMTP id vjczJhDi5lAWCwAA5ANymA\r
+       for <unittest@tine20.org>; Fri, 04 Jan 2013 15:08:35 +0100\r
+Received: from mx04.metaways.net ([127.0.0.1])\r
+       by mail04.metaways.net (Dovecot) with LMTP id 8o00JPPh5lCuEwAAT5mwPQ\r
+       ; Fri, 04 Jan 2013 15:08:35 +0100\r
+Received: from localhost (e176057020.adsl.alicedsl.de [85.176.57.20])\r
+       by mx04.metaways.net (Postfix) with ESMTPSA id 8194FA0A6\r
+       for <unittest@tine20.org>; Fri,  4 Jan 2013 15:08:35 +0100 (CET)\r
+Subject: neueneu\r
+From: "Tine 2.0 Admin Account" <unittest@tine20.org>\r
+To: unittest@tine20.org\r
+User-Agent: Tine 2.0 Email Client (version 7624: 5f0c52c653926683d5fd119fa3268085cdbc0adb (2013-01-04 12:44:58) - none)\r
+Message-Id: <65b1e9b051eea90ab99020446119bcf00602dc42@tine20.org>\r
+X-MailGenerator: Tine 2.0\r
+Date: Fri, 04 Jan 2013 14:08:34 +0000\r
+Content-Type: multipart/mixed; charset=UTF-8;\r
+ boundary="=_c4492e5cf2f9a553e023faf07a5c6553"\r
+X-Tine20TestMessage: attachmentUmlaut.eml\r
+MIME-Version: 1.0\r
+\r
+This is a message in Mime Format.  If you see this, your mail reader does not support this format.\r
+\r
+--=_c4492e5cf2f9a553e023faf07a5c6553\r
+Content-Type: multipart/alternative;\r
+ boundary="=_82785430c2280c268fc58c48d14b08c9"\r
+Content-Transfer-Encoding: 8bit\r
+\r
+\r
+--=_82785430c2280c268fc58c48d14b08c9\r
+Content-Type: text/plain; charset=UTF-8\r
+Content-Transfer-Encoding: quoted-printable\r
+\r
+\r
+\r
+--=_82785430c2280c268fc58c48d14b08c9\r
+Content-Type: text/html; charset=UTF-8\r
+Content-Transfer-Encoding: quoted-printable\r
+\r
+<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; char=\r
+set=3DUTF-8"><title></title><style type=3D"text/css">.felamimail-body-bl=\r
+ockquote {margin: 5px 10px 0 3px;padding-left: 10px;border-left: 2px sol=\r
+id #000088;} </style></head><body></body></html>\r
+\r
+--=_82785430c2280c268fc58c48d14b08c9--\r
+\r
+--=_c4492e5cf2f9a553e023faf07a5c6553\r
+Content-Type: text/plain; name="=?utf-8?Q?=C3=A4=C3=B6ppop=C3=A4.txt?="\r
+Content-Transfer-Encoding: base64\r
+Content-Disposition: attachment\r
+\r
+\r
+--=_c4492e5cf2f9a553e023faf07a5c6553--\r
index 9ac146d..cf7e717 100644 (file)
@@ -4,7 +4,7 @@
  * 
  * @package     Filemanager
  * @license     http://www.gnu.org/licenses/agpl.html
- * @copyright   Copyright (c) 2011-2012 Metaways Infosystems GmbH (http://www.metaways.de)
+ * @copyright   Copyright (c) 2011-2013 Metaways Infosystems GmbH (http://www.metaways.de)
  * @author      Philipp Schüle <p.schuele@metaways.de>
  * 
  */
@@ -239,12 +239,18 @@ class Filemanager_Frontend_JsonTests extends PHPUnit_Framework_TestCase
         
         $this->assertGreaterThanOrEqual(1, $result['totalcount'], 'expected at least one entry');
         if ($_toplevel) {
-            // toplevel containers are resolved
-            $this->assertEquals($_expectedName, $result['results'][0]['name']['name']);
-            if ($_checkAccountGrants) {
-                $this->assertTrue(isset($result['results'][0]['name']['account_grants']));
-                $this->assertEquals(Tinebase_Core::getUser()->getId(), $result['results'][0]['name']['account_grants']['account_id']);
+            $found = FALSE;
+            foreach ($result['results'] as $container) {
+                // toplevel containers are resolved (array structure below [name])
+                if ($_expectedName == $container['name']['name']) {
+                    $found = TRUE;
+                    if ($_checkAccountGrants) {
+                        $this->assertTrue(isset($container['name']['account_grants']));
+                        $this->assertEquals(Tinebase_Core::getUser()->getId(), $container['name']['account_grants']['account_id']);
+                    }
+                }
             }
+            $this->assertTrue($found, 'container not found: ' . print_r($result['results'], TRUE));
         } else {
             $this->assertEquals($_expectedName, $result['results'][0]['name']);
         }
@@ -289,6 +295,8 @@ class Filemanager_Frontend_JsonTests extends PHPUnit_Framework_TestCase
     
     /**
      * search top level containers of user
+     * 
+     * @see 0007400: Newly created directories disappear
      */
     public function testSearchTopLevelContainersOfUser()
     {
@@ -298,6 +306,9 @@ class Filemanager_Frontend_JsonTests extends PHPUnit_Framework_TestCase
             'value'    => '/' . Tinebase_Model_Container::TYPE_PERSONAL . '/' . Tinebase_Core::getUser()->accountLoginName
         ));
         $this->_searchHelper($filter, $this->_personalContainer->name, TRUE);
+        
+        $another = $this->testCreateContainerNodeInPersonalFolder();
+        $this->_searchHelper($filter, $another['name']['name'], TRUE);
     }
 
     /**
@@ -1033,6 +1044,7 @@ class Filemanager_Frontend_JsonTests extends PHPUnit_Framework_TestCase
         
         $adbJson = new Addressbook_Frontend_Json();
         $contact = $adbJson->getContact($node['relations'][0]['related_id']);
+        $this->assertEquals(1, count($contact['relations']), 'relations are missing');
         $this->assertEquals($node['name'], $contact['relations'][0]['related_record']['name']);
     }
     
index 0cfeeba..8ccee61 100644 (file)
@@ -69,7 +69,6 @@ class HumanResources_CliTests extends HumanResources_TestCase
         
         $susan->contracts = HumanResources_Controller_Contract::getInstance()->getContractsByEmployeeId($susan->getId());
         $this->assertEquals(1, count($susan->contracts), 'no contracts found');
-        $this->assertEquals($cc->getId(), $susan->contracts->getFirstRecord()->cost_center_id);
         
         return $susan;
     }
@@ -146,7 +145,6 @@ class HumanResources_CliTests extends HumanResources_TestCase
         $susan = $this->_getSusan();
         $susan->bank_name = 'xyz';
         $susan->contracts = HumanResources_Controller_Contract::getInstance()->getContractsByEmployeeId($susan->getId());
-        $susan->contracts->getFirstRecord()->cost_center_id = NULL;
         $susan->contracts = $susan->contracts->toArray();
         HumanResources_Controller_Employee::getInstance()->update($susan);
         
@@ -159,6 +157,5 @@ class HumanResources_CliTests extends HumanResources_TestCase
         $cc = $this->_getCostCenter(7);
         $susan->contracts = HumanResources_Controller_Contract::getInstance()->getContractsByEmployeeId($susan->getId());
         $this->assertEquals(1, count($susan->contracts), 'no contracts found');
-        $this->assertEquals($cc->getId(), $susan->contracts->getFirstRecord()->cost_center_id);
     }
 }
index 1ebdc87..9e7a2bb 100644 (file)
@@ -48,7 +48,11 @@ class HumanResources_JsonTests extends HumanResources_TestCase
         $savedEmployee = $this->_json->saveEmployee($savedEmployee);
         $this->assertEquals(2, count($savedEmployee['contracts']));
 
-        $this->assertEquals(null, $savedEmployee['contracts'][1]['end_date']);
+        $this->assertEquals(null, $savedEmployee['contracts'][1]['end_date'], 'The end_date should have a null value.');
+        $this->assertEquals('2012-12-12', substr($savedEmployee['costcenters'][0]['start_date'], 0, 10));
+        
+        $this->assertEquals($savedEmployee['contracts'][0]['workingtime_json'], $savedEmployee['contracts'][0]['workingtime_id']['json'], 'The json definition of the contract should be the same as the corresponding wt json');
+        
         $date1 = new Tinebase_DateTime($savedEmployee['contracts'][0]['end_date']);
         $date2 = new Tinebase_DateTime($savedEmployee['contracts'][1]['start_date']);
 
@@ -58,6 +62,21 @@ class HumanResources_JsonTests extends HumanResources_TestCase
 
         $this->assertEquals($savedEmployee['contracts'][0]['id'], $freeTimes['contract']['id']);
     }
+    
+    /**
+     * test working time
+     */
+    public function testWorkingTimeTemplate()
+    {
+        $recordData = array('title' => 'lazy worker', 'type' => 'static', 'json' => '{"days":[1,1,1,1,1,0,0]}', 'working_hours' => 5);
+        $savedWT = $this->_json->saveWorkingTime($recordData);
+        
+        $this->assertEquals($savedWT['title'], 'lazy worker');
+        
+        // test duplicate exception
+        $this->setExpectedException('Tinebase_Exception_Duplicate');
+        $this->_json->saveWorkingTime($recordData);
+    }
 
     /**
      * Tests the duplicate check
@@ -98,7 +117,6 @@ class HumanResources_JsonTests extends HumanResources_TestCase
         );
         $this->assertEquals($r['results'][0]['employee_id']['id'], $savedEmployee['id']);
 
-        $this->assertTrue(is_array($r['results'][0]['cost_center_id']));
         $this->assertTrue(is_array($r['results'][0]['workingtime_id']));
         $this->assertTrue(is_array($r['results'][0]['feast_calendar_id']));
 
index e631169..3828d8a 100644 (file)
@@ -144,8 +144,12 @@ class HumanResources_TestCase extends PHPUnit_Framework_TestCase
             'number' => ($number) ? $number : Tinebase_Record_Abstract::generateUID(),
             'remark' => Tinebase_Record_Abstract::generateUID(),
         ));
+        
         $c = Sales_Controller_CostCenter::getInstance()->create($c);
-        return $c;
+        $startDate = new Tinebase_DateTime('2012-12-12');
+        $hrc = array('cost_center_id' => $c->getId(), 'start_date' => $startDate);
+        
+        return $hrc;
     }
 
     /**
@@ -161,7 +165,6 @@ class HumanResources_TestCase extends PHPUnit_Framework_TestCase
             'start_date' => $sdate,
             'end_date'   => null,
             'employee_id' => null,
-            'cost_center_id' => $this->_getCostCenter(),
             'vacation_days' => 30,
             'feast_calendar_id' => $this->_getFeastCalendar(),
             'workingtime_id' => $this->_getWorkingTime()
@@ -183,7 +186,8 @@ class HumanResources_TestCase extends PHPUnit_Framework_TestCase
             array(
                 'number' => 1,
                 'n_fn' => $c->n_fn,
-                'account_id' => $a->getId()
+                'account_id' => $a->getId(),
+                'costcenters' => array($this->_getCostCenter())
             )
         );
 
index 2c8eaa7..2d46a85 100644 (file)
@@ -57,44 +57,44 @@ class Phone_JsonTest extends PHPUnit_Framework_TestCase
         $this->_json = new Phone_Frontend_Json();
         
         $this->_objects['location'] = new Voipmanager_Model_Snom_Location(array(
-            'id' => 20001,
-            'name' => 'phpunit test location',
+            'id'        => Tinebase_Record_Abstract::generateUID(),
+            'name'      => 'phpunit test location',
             'registrar' => 'registrar'
         ));
 
         $this->_objects['software'] = new Voipmanager_Model_Snom_Software(array(
-            'id' => 20003
+            'id' => Tinebase_Record_Abstract::generateUID()
         ));
         
         $this->_objects['setting'] = new Voipmanager_Model_Snom_Setting(array(
-            'id' => 20004,
-            'name' => 'test setting',
+            'id'          => Tinebase_Record_Abstract::generateUID(),
+            'name'        => 'test setting',
             'description' => 'test setting',
         ));
 
-        $this->_objects['phonesetting'] = new Voipmanager_Model_Snom_PhoneSettings(array(
-            'phone_id'  => 1001,
-            'web_language' => 'English'
-        ));
-        
         $this->_objects['template'] = new Voipmanager_Model_Snom_Template(array(
-            'id' => 20002,
-            'name' => 'phpunit test location',
-            'model' => 'snom320',
+            'id'          => Tinebase_Record_Abstract::generateUID(),
+            'name'        => 'phpunit test location',
+            'model'       => 'snom320',
             'software_id' => $this->_objects['software']->getId(),
-            'setting_id' => $this->_objects['setting']->getId()
+            'setting_id'  => $this->_objects['setting']->getId()
         ));
         
         $this->_objects['phone'] = new Voipmanager_Model_Snom_Phone(array(
-            'id' => 1001,
-            'macaddress' => "1234567890cd",
-            'description' => 'user phone',
-            'location_id' => $this->_objects['location']->getId(),
-            'template_id' => $this->_objects['template']->getId(),
-            'current_model' => 'snom320',
+            'id'             => Tinebase_Record_Abstract::generateUID(),
+            'macaddress'     => "1234567890cd",
+            'description'    => 'user phone',
+            'location_id'    => $this->_objects['location']->getId(),
+            'template_id'    => $this->_objects['template']->getId(),
+            'current_model'  => 'snom320',
             'redirect_event' => 'none'
         ));
         
+        $this->_objects['phonesetting'] = new Voipmanager_Model_Snom_PhoneSettings(array(
+            'phone_id'     => $this->_objects['phone']->getId(),
+            'web_language' => 'English'
+        ));
+        
         $this->_objects['phoneOwner'] = array(
             'account_id' => Zend_Registry::get('currentAccount')->getId(),
             'account_type' => 'user'
@@ -106,23 +106,23 @@ class Phone_JsonTest extends PHPUnit_Framework_TestCase
         
         $this->_objects['phone']->rights = $rights;
         
-        $this->_objects['line'] = new Voipmanager_Model_Snom_Line(array(
-            'id'                => 1001,
-            'snomphone_id'      => $this->_objects['phone']->getId(),
-            'asteriskline_id'   => 1001,
-            'linenumber'        => 1,
-            'lineactive'        => 1
-        ));
-
         $this->_objects['context'] = new Voipmanager_Model_Asterisk_Context(array(
-            'id'                => 1001,
+            'id'                => Tinebase_Record_Abstract::generateUID(),
             'name'              => 'test context',
             'description'       => 'test context',
         ));
         
         $this->_objects['sippeer'] = new Voipmanager_Model_Asterisk_SipPeer(array(
-            'id'                => 1001,
-            'context_id'        => 1001
+            'id'                => Tinebase_Record_Abstract::generateUID(),
+            'context_id'        => $this->_objects['context']->getId()
+        ));
+        
+        $this->_objects['line'] = new Voipmanager_Model_Snom_Line(array(
+            'id'                => Tinebase_Record_Abstract::generateUID(),
+            'snomphone_id'      => $this->_objects['phone']->getId(),
+            'asteriskline_id'   => $this->_objects['sippeer']->getId(),
+            'linenumber'        => 1,
+            'lineactive'        => 1
         ));
         
         // create phone, location, template, rights
@@ -159,7 +159,7 @@ class Phone_JsonTest extends PHPUnit_Framework_TestCase
             'phone_id'              => $this->_objects['phone']->getId(),
             'direction'             => Phone_Model_Call::TYPE_INCOMING,
             'source'                => '26',
-            'destination'           => '0406437435',    
+            'destination'           => '0406437435',
         ));
 
         $this->_objects['call2'] = new Phone_Model_Call(array(
@@ -168,7 +168,7 @@ class Phone_JsonTest extends PHPUnit_Framework_TestCase
             'phone_id'              => $this->_objects['phone']->getId(),
             'direction'             => Phone_Model_Call::TYPE_INCOMING,
             'source'                => '26',
-            'destination'           => '050364354',    
+            'destination'           => '050364354',
         ));
         
         $this->_objects['paging'] = array(
index b2557b1..8176fc7 100644 (file)
@@ -357,7 +357,9 @@ class Sales_ControllerTest extends PHPUnit_Framework_TestCase
             $this->fail('A duplicate exception should have been thrown!');
         } catch (Zend_Db_Statement_Exception $e) {
             $this->assertEquals(0, $e->getCode());
-            $this->assertEquals("SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '" . $this->_costCenterNumber . "' for key 'number'", $e->getMessage());
+            // MySQL: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '217fcc5beddf1744c20d572d7e740a8bf88bf8a1' for key 'number'
+            // PGSQL: SQLSTATE[23505]: Unique violation: 7 ERROR:  duplicate key value violates unique constraint "tine20_sales_cost_centers_number_key"
+            $this->assertContains("SQLSTATE[23", $e->getMessage());
         }
     }
     
index d2cecbe..a514e9d 100644 (file)
@@ -315,7 +315,6 @@ class Sales_JsonTest extends PHPUnit_Framework_TestCase
     public function testNoteConcurrencyManagement()
     {
         $savedProduct = $this->_addProduct(FALSE);
-        sleep(1);
         $savedProduct['notes'][] = array(
             'note' => 'another phpunit test note',
         );
@@ -323,7 +322,6 @@ class Sales_JsonTest extends PHPUnit_Framework_TestCase
         
         $savedProduct['name'] = 'changed name';
         $savedProductNameChanged = $this->_instance->saveProduct($savedProduct);
-        sleep(1);
         
         $savedProductNameChanged['name'] = 'PHPUnit test product';
         $savedProductNameChangedAgain = $this->_instance->saveProduct($savedProductNameChanged);
index 19e874a..38ccba6 100644 (file)
@@ -19,10 +19,12 @@ error_reporting( E_ALL | E_STRICT );
 /*
  * Set include path
  */
-define('PATH_TO_REAL_DIR', dirname(__FILE__). '/../../tine20');
-define('PATH_TO_TINE_LIBRARY', dirname(__FILE__). '/../../tine20/library');
-define('PATH_TO_TEST_DIR', dirname(__FILE__));
+
+if (!defined('PATH_TO_REAL_DIR')) {
+    define('PATH_TO_REAL_DIR', dirname(__FILE__). '/../../tine20');
+    define('PATH_TO_TINE_LIBRARY', dirname(__FILE__). '/../../tine20/library');
+    define('PATH_TO_TEST_DIR', dirname(__FILE__));
+}
 
 /*
  * Set white / black lists
index eee0996..e187384 100644 (file)
@@ -87,7 +87,7 @@ class Tasks_Backend_SqlTest extends PHPUnit_Framework_TestCase
     {
         // NOTE: cascading delete of dependend stuff due to sql schema
         $db = new Tinebase_Db_Table(array('name' => SQL_TABLE_PREFIX . 'tasks'));
-        $db->delete($db->getAdapter()->quoteInto('id = ?', $this->_persistantTestTask1->getId() ));
+        $db->delete($db->getAdapter()->quoteInto($db->getAdapter()->quoteIdentifier('id') .' = ?', $this->_persistantTestTask1->getId() ));
         Tinebase_Timemachine_ModificationLogTest::purgeLogs($this->_persistantTestTask1->getId());
     }
     
index 55f91bb..76bf2da 100644 (file)
@@ -180,7 +180,6 @@ class Tasks_ControllerTest extends PHPUnit_Framework_TestCase //Tinebase_Abstrac
     {
         $utask = $this->testUpdateTask();
         
-        sleep(1);
         $nonConflictTask = clone $utask;
         $nonConflictTask->summary = 'Second Update of test task 1';
         return $this->_controller->update($nonConflictTask);
@@ -193,7 +192,6 @@ class Tasks_ControllerTest extends PHPUnit_Framework_TestCase //Tinebase_Abstrac
     {
         $utask = $this->testUpdateTask();
         
-        sleep(1);
         $resolvableConcurrencyTask = clone $utask;
         $resolvableConcurrencyTask->last_modified_time = Tinebase_DateTime::now()->addHour(-1);
         $resolvableConcurrencyTask->percent = 50;
@@ -209,14 +207,12 @@ class Tasks_ControllerTest extends PHPUnit_Framework_TestCase //Tinebase_Abstrac
     {
         $utask = $this->testUpdateTask();
         
-        sleep(1);
         $resolvableConcurrencyTask = clone $utask;
         $resolvableConcurrencyTask->last_modified_time = Tinebase_DateTime::now()->addHour(-1);
         $resolvableConcurrencyTask->percent = 50;
         $resolvableConcurrencyTask->summary = 'Update of test task 1';
         $this->_controller->update($resolvableConcurrencyTask);
         
-        sleep(1);
         $resolvableConcurrencyTask = clone $utask;
         $resolvableConcurrencyTask->last_modified_time = Tinebase_DateTime::now()->addHour(-1);
         $resolvableConcurrencyTask->description = 'other field';
@@ -235,7 +231,6 @@ class Tasks_ControllerTest extends PHPUnit_Framework_TestCase //Tinebase_Abstrac
         if (Tinebase_Core::isLogLevel(Zend_Log::DEBUG)) Tinebase_Core::getLogger()->debug(__METHOD__ . '::' . __LINE__ . " 1. Update");
         $utask = $this->testUpdateTask();
         
-        sleep(1);
         if (Tinebase_Core::isLogLevel(Zend_Log::DEBUG)) Tinebase_Core::getLogger()->debug(__METHOD__ . '::' . __LINE__ . " 2. Update");
         $resolvableConcurrencyTask = clone $utask;
         $resolvableConcurrencyTask->last_modified_time = Tinebase_DateTime::now()->addHour(-1);
@@ -244,7 +239,6 @@ class Tasks_ControllerTest extends PHPUnit_Framework_TestCase //Tinebase_Abstrac
         $resolvableConcurrencyTask->summary = 'Update of test task 1';
         $this->_controller->update($resolvableConcurrencyTask);
         
-        sleep(1);
         if (Tinebase_Core::isLogLevel(Zend_Log::DEBUG)) Tinebase_Core::getLogger()->debug(__METHOD__ . '::' . __LINE__ . " 3. Update");
         $resolvableConcurrencyTask = clone $utask;
         $resolvableConcurrencyTask->last_modified_time = Tinebase_DateTime::now()->addHour(-1);
@@ -257,14 +251,14 @@ class Tasks_ControllerTest extends PHPUnit_Framework_TestCase //Tinebase_Abstrac
     /**
      * test if non resolvable concurrency problem gets detected
      *
+     *@see 0000554: modlog: records can't be updated in less than 1 second intervals
      */
     public function testConcurrencyFail()
     {
         $utask = $this->testUpdateTask();
         
-        sleep(1);
         $conflictTask = clone $utask;
-        $conflictTask->last_modified_time = Tinebase_DateTime::now()->addHour(-1);
+        $conflictTask->seq = 0;
         $conflictTask->summary = 'Non resolvable conflict';
         $this->setExpectedException('Tinebase_Timemachine_Exception_ConcurrencyConflict');
         $this->_controller->update($conflictTask);
@@ -276,7 +270,6 @@ class Tasks_ControllerTest extends PHPUnit_Framework_TestCase //Tinebase_Abstrac
     public function testConcurrencyFromCreatedTask()
     {
         $utask = $this->testUpdateTask();
-        sleep(1);
         
         $ctask = clone $this->_persistantTestTask1;
         $ctask->description = 'testConcurrencyFromCreatedTask';
@@ -294,7 +287,6 @@ class Tasks_ControllerTest extends PHPUnit_Framework_TestCase //Tinebase_Abstrac
         $utask = $this->_persistantTestTask1;
         $utask->description = 'description' . "\n";
         $utask = $this->_controller->update($utask);
-        sleep(1);
         
         // change linebreak in db to \r\n
         $loggedMods = Tinebase_Timemachine_ModificationLog::getInstance()->getModifications('Tasks', $utask->getId(),
@@ -308,7 +300,6 @@ class Tasks_ControllerTest extends PHPUnit_Framework_TestCase //Tinebase_Abstrac
         $modlog->update($mod, Tinebase_Core::getDb()->quoteInto('id = ?', $mod['id']));
         
         // this should still work as we normalize linebreaks in concurrency check
-        sleep(1);
         $resolvableConcurrencyTask = clone $utask;
         $resolvableConcurrencyTask->last_modified_time = Tinebase_DateTime::now()->addHour(-1);
         $resolvableConcurrencyTask->description = 'description'. "\n";
index da5c720..09263ad 100644 (file)
@@ -66,7 +66,7 @@ class Tasks_JsonTest extends PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $this->_backend = new Tasks_Frontend_Json();
-        $this->_smtpConfig = Tinebase_Config::getInstance()->getConfigAsArray(Tinebase_Config::SMTP);
+        $this->_smtpConfig = Tinebase_Config::getInstance()->get(Tinebase_Config::SMTP, new Tinebase_Config_Struct())->toArray();
         $this->_smtpTransport = Tinebase_Smtp::getDefaultTransport();
     }
 
@@ -81,7 +81,7 @@ class Tasks_JsonTest extends PHPUnit_Framework_TestCase
         parent::tearDown();
         
         if ($this->_smtpConfigChanged) {
-            Tinebase_Config::getInstance()->setConfigForApplication(Tinebase_Config::SMTP, $this->_smtpConfig);
+            Tinebase_Config::getInstance()->set(Tinebase_Config::SMTP, $this->_smtpConfig);
             Tinebase_Smtp::setDefaultTransport($this->_smtpTransport);
         }
     }
@@ -171,13 +171,12 @@ class Tasks_JsonTest extends PHPUnit_Framework_TestCase
         // set wrong smtp user/password
         $wrongCredentialsConfig = $this->_smtpConfig;
         $wrongCredentialsConfig['password'] = 'wrongpw';
-        Tinebase_Config::getInstance()->setConfigForApplication(Tinebase_Config::SMTP, $wrongCredentialsConfig);
+        Tinebase_Config::getInstance()->set(Tinebase_Config::SMTP, $wrongCredentialsConfig);
         $this->_smtpConfigChanged = TRUE;
         Tinebase_Smtp::setDefaultTransport(NULL);
-        
         $this->_sendAlarm();
-
         $loadedTaskData = $this->_backend->getTask($persistentTaskData['id']);
+        
         $this->assertEquals(Tinebase_Model_Alarm::STATUS_FAILURE, $loadedTaskData['alarms'][0]['sent_status']);
         $this->assertContains('535 5.7.8 Error: authentication failed', $loadedTaskData['alarms'][0]['sent_message'], 
             'got: ' . $loadedTaskData['alarms'][0]['sent_message']);
@@ -242,13 +241,12 @@ class Tasks_JsonTest extends PHPUnit_Framework_TestCase
         $task = $this->_getTask();
         
         // set config for automatic alarms
-        Tinebase_Config::getInstance()->setConfigForApplication(
+        Tasks_Config::getInstance()->set(
             Tinebase_Config::AUTOMATICALARM,
-            Zend_Json::encode(array(
+            array(
                 2*24*60,    // 2 days before
                 //0           // 0 minutes before
-            )),
-            'Tasks'
+            )
         );
         
         $persistentTaskData = $this->_backend->saveTask($task->toArray());
@@ -261,13 +259,11 @@ class Tasks_JsonTest extends PHPUnit_Framework_TestCase
         $this->assertTrue(array_key_exists('minutes_before', $loadedTaskData['alarms'][0]), 'minutes_before is missing');
         $this->assertEquals(2*24*60, $loadedTaskData['alarms'][0]['minutes_before']);
 
-        // reset automatic alarms config
-        Tinebase_Config::getInstance()->setConfigForApplication(
+       // reset automatic alarms config
+        Tasks_Config::getInstance()->set(
             Tinebase_Config::AUTOMATICALARM,
-            Zend_Json::encode(array()),
-            'Tasks'
+            array()
         );
-        
         $this->_backend->deleteTasks($persistentTaskData['id']);
     }
     
index 717cd71..cb20757 100644 (file)
@@ -5,7 +5,7 @@
  * @package     Tinebase
  * @subpackage  Application
  * @license     http://www.gnu.org/licenses/agpl.html
- * @copyright   Copyright (c) 2008 Metaways Infosystems GmbH (http://www.metaways.de)
+ * @copyright   Copyright (c) 2008-2012 Metaways Infosystems GmbH (http://www.metaways.de)
  * @author      Philipp Schuele <p.schuele@metaways.de>
  * 
  * @todo        implement more tests!
  */
 require_once dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'TestHelper.php';
 
-if (!defined('PHPUnit_MAIN_METHOD')) {
-    define('PHPUnit_MAIN_METHOD', 'Tinebase_ApplicationTest::main');
-}
-
 /**
  * Test class for Tinebase_Group
  */
@@ -97,4 +93,33 @@ class Tinebase_ApplicationTest extends PHPUnit_Framework_TestCase
         $this->assertTrue($adminById instanceof Tinebase_Model_Application);
         $this->assertEquals($admin, $adminById);
     }
-}        
+
+    /**
+     * Test length name for table name and column name (Oracle Database limitation) 
+     * 
+     * @see 0007452: use json encoded array for saving of policy settings
+     */
+    public function testSetupXML()
+    {
+        $_applications = Tinebase_Application::getInstance()->getApplications();
+        foreach ($_applications->name as $applicationName) {
+            // skip ActiveSync
+            // @todo remove that when #7452 is resolved
+            if ($applicationName === 'ActiveSync') {
+                continue;
+            }
+            
+            $xml = Setup_Controller::getInstance()->getSetupXml($applicationName);
+            if (isset($xml->tables)) {
+                foreach ($xml->tables[0] as $tableXML) {
+                    $table = Setup_Backend_Schema_Table_Factory::factory('Xml', $tableXML);
+                    $currentTable = $table->name;
+                    $this->assertLessThan(29, strlen($currentTable), $applicationName." -> ". $table->name . "  (" . strlen($currentTable).")");
+                    foreach ($table->fields as $field) {
+                        $this->assertLessThan(31, strlen($field->name), $applicationName." -> ". $table->name . "  (" . strlen($field->name).")");
+                    }
+                }
+            }
+        }
+    }
+}
index 8236f9b..a39fa3e 100644 (file)
@@ -56,6 +56,7 @@ class Tinebase_AuthTest extends PHPUnit_Framework_TestCase
      */
     protected function setUp()
     {
+        Tinebase_TransactionManager::getInstance()->startTransaction(Tinebase_Core::getDb());
         $this->_originalBackendConfiguration = Tinebase_Auth::getBackendConfiguration();
         $this->_originalBackendType = Tinebase_Auth::getConfiguredBackend();
     }
@@ -68,11 +69,14 @@ class Tinebase_AuthTest extends PHPUnit_Framework_TestCase
      */
     protected function tearDown()
     {
+        // this needs to be done because Tinebase_Auth & Tinebase_Config use caching mechanisms
         Tinebase_Auth::setBackendType($this->_originalBackendType);
         Tinebase_Auth::deleteBackendConfiguration();
         Tinebase_Auth::setBackendConfiguration($this->_originalBackendConfiguration);
         Tinebase_Auth::saveBackendConfiguration();
         Tinebase_Auth::getInstance()->setBackend();
+        
+        Tinebase_TransactionManager::getInstance()->rollBack();
     }
 
     /**
@@ -82,12 +86,12 @@ class Tinebase_AuthTest extends PHPUnit_Framework_TestCase
     {
         Tinebase_Auth::setBackendType(Tinebase_Auth::LDAP);
      
-        $rawConfigBefore = Tinebase_Config::getInstance()->getConfig(Tinebase_Config::AUTHENTICATIONBACKEND, null, 'null');
+        $rawConfigBefore = Tinebase_Config::getInstance()->get(Tinebase_Config::AUTHENTICATIONBACKEND);
         $key = 'host';
         $testValue = 'phpunit-test-host2';
         Tinebase_Auth::setBackendConfiguration($testValue, $key);
         Tinebase_Auth::saveBackendConfiguration();
-        $rawConfigAfter = Tinebase_Config::getInstance()->getConfig(Tinebase_Config::AUTHENTICATIONBACKEND);
+        $rawConfigAfter = Tinebase_Config::getInstance()->get(Tinebase_Config::AUTHENTICATIONBACKEND);
         $this->assertNotEquals($rawConfigBefore, $rawConfigAfter);
     }
     
@@ -159,7 +163,7 @@ class Tinebase_AuthTest extends PHPUnit_Framework_TestCase
     public function testImapAuth()
     {
         // use imap config for the auth config
-        $imapConfig = Tinebase_Config::getInstance()->getConfigAsArray(Tinebase_Config::IMAP);
+        $imapConfig = Tinebase_Config::getInstance()->get(Tinebase_Config::IMAP, new Tinebase_Config_Struct())->toArray();
         
         if (empty($imapConfig)) {
              $this->markTestSkipped('No IMAP config found.');
@@ -200,6 +204,7 @@ class Tinebase_AuthTest extends PHPUnit_Framework_TestCase
     {
         // add dummy record to credential cache
         $id = Tinebase_Record_Abstract::generateUID();
+        $db = Tinebase_Core::getDb();
         $oneMinuteAgo = Tinebase_DateTime::now()->subMinute(1)->format(Tinebase_Record_Abstract::ISO8601LONG);
         $data = array(
             'id'            => $id,
@@ -212,7 +217,7 @@ class Tinebase_AuthTest extends PHPUnit_Framework_TestCase
         
         Tinebase_Auth_CredentialCache::getInstance()->clearCacheTable();
         
-        $result = Tinebase_Core::getDb()->fetchAll('SELECT * FROM ' . $table . ' WHERE valid_until < ?', Tinebase_DateTime::now()->format(Tinebase_Record_Abstract::ISO8601LONG));
-        $this->assertTrue(count($result) == 0);
+        $result = $db->fetchCol('SELECT id FROM ' . $db->quoteIdentifier($table) . ' WHERE ' . $db->quoteInto($db->quoteIdentifier('valid_until') .' < ?', Tinebase_DateTime::now()->format(Tinebase_Record_Abstract::ISO8601LONG)));
+        $this->assertNotContains($id, $result);
     }
 }
index d60ae7e..6492217 100644 (file)
@@ -347,7 +347,7 @@ class Tinebase_ContainerTest extends PHPUnit_Framework_TestCase
         $this->assertEquals(1, count($grants));
         
         // check num of db rows
-        $stmt = Tinebase_Core::getDb()->query("select * from tine20_container_acl where container_id = ?;", $this->objects['initialContainer']->getId());
+        $stmt = Tinebase_Core::getDb()->query('select * from '.Tinebase_Core::getDb()->quoteIdentifier(SQL_TABLE_PREFIX .'container_acl') . ' where ' . Tinebase_Core::getDb()->quoteInto(Tinebase_Core::getDb()->quoteIdentifier('container_id') . ' = ?', $this->objects['initialContainer']->getId()));
         $rows = $stmt->fetchAll();
         
         $this->assertEquals(1, count($rows));
@@ -364,7 +364,7 @@ class Tinebase_ContainerTest extends PHPUnit_Framework_TestCase
         $this->assertTrue($result);
         
         // check num of db rows
-        $stmt = Tinebase_Core::getDb()->query("select * from tine20_container_acl where container_id = ?;", $this->objects['initialContainer']->getId());
+        $stmt = Tinebase_Core::getDb()->query('select * from '.Tinebase_Core::getDb()->quoteIdentifier(SQL_TABLE_PREFIX .'container_acl') . ' where ' . Tinebase_Core::getDb()->quoteInto(Tinebase_Core::getDb()->quoteIdentifier('container_id') . ' = ?', $this->objects['initialContainer']->getId()));
         $rows = $stmt->fetchAll();
         
         $this->assertEquals(7, count($rows));
index c78c0f6..3824e5e 100644 (file)
@@ -107,6 +107,7 @@ class Tinebase_ControllerTest extends PHPUnit_Framework_TestCase
         
         // check for cache files
         $config = Tinebase_Core::getConfig();
+        
         if ($config->caching && $config->caching->backend == 'File' && $config->caching->path) {
             $cacheFile = $this->_lookForCacheFile($config->caching->path);
             $this->assertEquals(NULL, $cacheFile, 'found cache file: ' . $cacheFile);
index b0414c6..ab9ec98 100644 (file)
@@ -80,7 +80,7 @@ class Tinebase_CustomFieldTest extends PHPUnit_Framework_TestCase
 
         $cf = $this->_instance->addCustomField($cf);
         
-        $record = Addressbook_Controller_Contact::getInstance()->create(new Addressbook_Model_Contact(array('n_family' => 'Clever', 'n_given' => 'Rupert')));
+        $record = Addressbook_Controller_Contact::getInstance()->create(new Addressbook_Model_Contact(array('n_family' => 'Clever', 'n_given' => 'Ben')));
         $cfName = $cf->name;
         $record->customfields = array($cfName => $record->toArray());
         
@@ -107,19 +107,17 @@ class Tinebase_CustomFieldTest extends PHPUnit_Framework_TestCase
         ));
 
         $cf = $this->_instance->addCustomField($cf);
-        
-        $record1 = Addressbook_Controller_Contact::getInstance()->create(new Addressbook_Model_Contact(array('n_family' => 'Clever', 'n_given' => 'Rupert')));
-        $record2 = Addressbook_Controller_Contact::getInstance()->create(new Addressbook_Model_Contact(array('n_family' => 'Clever', 'n_given' => 'Matt')));
+        $c = Addressbook_Controller_Contact::getInstance();
+
+        $record1 = $c->create(new Addressbook_Model_Contact(array('n_family' => 'Friendly', 'n_given' => 'Rupert')), false);
+        $record2 = $c->create(new Addressbook_Model_Contact(array('n_family' => 'Friendly', 'n_given' => 'Matt')), false);
         $contactIds = array($record1->getId(), $record2->getId());
         
-        $json = new Tinebase_Frontend_Json();
-        
-        $result = $json->updateMultipleRecords(
-            'Addressbook',
-            'Contact',
-            array(array('name' => 'customfield_' . $cf->name, 'value' => $record1->getId())),
-            array(array('field' => 'id', 'operator' => 'in', 'value' => $contactIds))
-        );
+        $filter = new Addressbook_Model_ContactFilter(array(
+            array('field' => 'n_family', 'operator' => 'equals', 'value' => 'Friendly')
+            ), 'AND');
+
+        $result = $c->updateMultiple($filter, array('#' . $cf->name => $contactIds[0]));
         
         $this->assertEquals(1, $result['totalcount']);
         $this->assertEquals(1, $result['failcount']);
index f318138..a97e83f 100644 (file)
@@ -204,7 +204,7 @@ class Tinebase_Frontend_CliTest extends PHPUnit_Framework_TestCase
         $this->_cli->triggerAsyncEvents($opts);
         $out = ob_get_clean();
 
-        $cronuserId = Tinebase_Config::getInstance()->getConfig(Tinebase_Config::CRONUSERID)->value;
+        $cronuserId = Tinebase_Config::getInstance()->get(Tinebase_Config::CRONUSERID);
         $cronuser = Tinebase_User::getInstance()->getFullUserById($cronuserId);
         $this->assertEquals('cronuser', $cronuser->accountLoginName);
         $adminGroup = Tinebase_Group::getInstance()->getDefaultAdminGroup();
index abbaf93..552530b 100644 (file)
@@ -242,6 +242,36 @@ class Tinebase_Frontend_Json_PersistentFilterTest extends PHPUnit_Framework_Test
     }
     
     /**
+     * test save shipped filter as not shipped
+     * 
+     * #6990: user with right "manage_shared_*_favorites" should be able to delete/edit default shared favorites
+     * https://forge.tine20.org/mantisbt/view.php?id=6990
+     */
+    public function testSaveShippedFilter()
+    {
+        $accountId = Tinebase_Core::getUser()->getId();
+        
+        $filterData = array(
+            array('field' => 'model',      'operator' => 'equals', 'value' => 'Tasks_Model_TaskFilter'),
+            array('field' => 'account_id', 'operator' => 'notin', 'value' => array($accountId))
+        );
+        // search for shipped filters
+        $searchResult = $this->_uit->searchPersistentFilter($filterData, NULL);
+        if(count($searchResult['results']) == 0) {
+            $this->markTestSkipped('There haven\'t been found any persistenfilters.');
+        }
+        // take first found
+        $filter = $searchResult['results'][0];
+        $filter['account_id'] = $accountId;
+        $filter['name'] = 'UNITTEST';
+        
+        $savedFilter = $this->_uit->savePersistentFilter($filter);
+        $this->assertEquals($accountId, $savedFilter['created_by']);
+        $this->assertEquals($accountId, $savedFilter['account_id']);
+        $this->assertEquals('UNITTEST', $savedFilter['name']);
+    }
+    
+    /**
      * assert saved filer matches expections for $this->_testFilterData
      * 
      * @param array $savedFilter
index 938ecac..39d9404 100644 (file)
@@ -91,7 +91,7 @@ class Tinebase_Frontend_JsonTest extends PHPUnit_Framework_TestCase
     {
         if ($this->_clearPrefs) {
             $query = Tinebase_Core::getDb()->quoteInto(
-                'DELETE FROM ' . SQL_TABLE_PREFIX . 'preferences WHERE application_id = ?', 
+                'DELETE FROM ' . Tinebase_Core::getDb()->quoteIdentifier(SQL_TABLE_PREFIX . 'preferences') .' WHERE ' .Tinebase_Core::getDb()->quoteIdentifier('application_id') .' = ?', 
                 Tinebase_Application::getInstance()->getApplicationByName('Tinebase')->getId()
             );
             Tinebase_Core::getDb()->query($query);
index 74f84e4..e14ac64 100644 (file)
@@ -311,8 +311,9 @@ class Tinebase_GroupTest extends PHPUnit_Framework_TestCase
         $this->assertEquals($this->objects['account1']->contact_id, $list->members[0]);
         
         $appConfigDefaults = Admin_Controller::getInstance()->getConfigSettings();
+        $this->assertTrue(! empty($appConfigDefaults), 'app config defaults empty');
         $internal = $appConfigDefaults[Admin_Model_Config::DEFAULTINTERNALADDRESSBOOK];
-        $this->assertEquals($internal, $list->container_id);
+        $this->assertEquals($internal, $list->container_id, 'did not get correct internal container');
         
         // sync again -> should not change anything
         Tinebase_Group::syncListsOfUserContact(array($group->getId()), $this->objects['account1']->contact_id);
index b398196..e1d6823 100644 (file)
@@ -66,6 +66,7 @@ class Tinebase_Log_FormatterTest extends PHPUnit_Framework_TestCase
         $config = Tinebase_Core::getConfig();
         $this->_logger->notice($config->database->password);
         $loggerFile = file_get_contents($logfile);
+        $writer->shutdown();
         unlink($logfile);
         
         $this->assertFalse(strpos($loggerFile, $config->database->password), 'pw found!');
index 92a0968..84ae234 100644 (file)
@@ -31,7 +31,7 @@ class Tinebase_NotificationTest extends PHPUnit_Framework_TestCase
      */
     public function setUp()
     {
-        $smtpConfig = Tinebase_Config::getInstance()->getConfigAsArray(Tinebase_Config::SMTP);
+        $smtpConfig = Tinebase_Config::getInstance()->get(Tinebase_Config::SMTP, new Tinebase_Config_Struct())->toArray();
         if (empty($smtpConfig)) {
              $this->markTestSkipped('No SMTP config found: this is needed to send notifications.');
         }
index e1dd985..beb1e17 100644 (file)
@@ -356,7 +356,7 @@ class Tinebase_Record_RecordTest extends Tinebase_Record_AbstractTest
         $crtime->addYear(2);
         $auto->creation_time = $crtime; 
         
-        $this->assertEquals(14, count($auto->getFields()));
+        $this->assertEquals(15, count($auto->getFields()));
         
         $autoArray = $auto->toArray();
         
index e997b13..fee60a5 100644 (file)
@@ -112,7 +112,7 @@ class Tinebase_Relation_Backend_SqlTest extends PHPUnit_Framework_TestCase
 
         foreach ($this->relations as $relation) {
              $db->delete(array(
-                 $db->getAdapter()->quoteInto('rel_id = ?',$relation->getId())
+                 $db->getAdapter()->quoteInto($db->getAdapter()->quoteIdentifier('rel_id') .' = ?',$relation->getId())
             ));
         }
     }
index fd2d28b..7032c3f 100644 (file)
@@ -184,7 +184,6 @@ class Tinebase_TagsTest extends PHPUnit_Framework_TestCase
             $contact->tags = array();
             $this->_instance->setTagsOfRecord($contact);
         }
-        sleep(1);
 
         $filter = new Addressbook_Model_ContactFilter(array(
             array('field' => 'id', 'operator' => 'in', 'value' => $personasContactIds)
@@ -198,7 +197,6 @@ class Tinebase_TagsTest extends PHPUnit_Framework_TestCase
         );
         $tag1 = $this->_instance->attachTagToMultipleRecords($filter, $tagData1);
         $tagIds[] = $tag1->getId();
-        sleep(1);
 
         $tagData2 = array(
             'type'  => Tinebase_Model_Tag::TYPE_PERSONAL,
@@ -217,7 +215,6 @@ class Tinebase_TagsTest extends PHPUnit_Framework_TestCase
         }
         
         // Try to remove the created Tags
-        sleep(1);
         try {
             $this->_instance->detachTagsFromMultipleRecords($filter, $tagIds);
         } catch (Zend_Db_Statement_Exception $zdse) {
@@ -271,14 +268,10 @@ class Tinebase_TagsTest extends PHPUnit_Framework_TestCase
             array('field' => 'id', 'operator' => 'in', 'value' => array_slice($contactIds, 0, 3))
         ));
         $sharedTag1 = Tinebase_Tags::getInstance()->attachTagToMultipleRecords($contactFilter, $sharedTag1);
-        // sleep modlog
-        sleep(1);
         $contactFilter = new Addressbook_Model_ContactFilter(array(
             array('field' => 'id', 'operator' => 'in', 'value' => array_slice($contactIds, 3, 3))
         ));
         $sharedTag2 = Tinebase_Tags::getInstance()->attachTagToMultipleRecords($contactFilter, $sharedTag2);
-        // sleep modlog
-        sleep(1);
         
         $this->_instance->mergeDuplicateSharedTags('Addressbook_Model_Contact');
         
index fa6e226..2965cf0 100644 (file)
@@ -250,6 +250,7 @@ class Tinebase_Timemachine_ModificationLogTest extends PHPUnit_Framework_TestCas
      * test modlog undo
      * 
      * @see 0006252: allow to undo history items (modlog)
+     * @see 0000554: modlog: records can't be updated in less than 1 second intervals
      */
     public function testUndo()
     {
@@ -262,8 +263,12 @@ class Tinebase_Timemachine_ModificationLogTest extends PHPUnit_Framework_TestCas
         $contact->tel_cell = NULL;
         $contact = Addressbook_Controller_Contact::getInstance()->update($contact);
         
-        // needs sleeping because of modlog/concurrency restrictions
-        sleep(1);
+        // fetch modlog and test seq
+        $modlog = $this->_modLogClass->getModifications('Addressbook', $contact->getId(), NULL, 'Sql',
+            Tinebase_DateTime::now()->subSecond(5), Tinebase_DateTime::now())->getFirstRecord();
+        $this->assertTrue($modlog !== NULL);
+        $this->assertEquals(1, $modlog->seq);
+        $this->assertEquals('+491234', $modlog->old_value);
         
         $filter = new Tinebase_Model_ModificationLogFilter(array(
             array('field' => 'record_type',         'operator' => 'equals', 'value' => 'Addressbook_Model_Contact'),
@@ -271,7 +276,7 @@ class Tinebase_Timemachine_ModificationLogTest extends PHPUnit_Framework_TestCas
             array('field' => 'modification_time',   'operator' => 'within', 'value' => 'weekThis'),
         ));
         $result = $this->_modLogClass->undo($filter);
-        $this->assertEquals(1, $result['totalcount']);
+        $this->assertEquals(1, $result['totalcount'], 'did not get 1 undone modlog: ' . print_r($result, TRUE));
         $this->assertEquals('+491234', $result['undoneModlogs']->getFirstRecord()->old_value);
         
         // check record after undo
index d49d154..7387b76 100644 (file)
@@ -16,20 +16,34 @@ require_once dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'TestHelper.php'
 class Tinebase_TransactionManagerTest extends PHPUnit_Framework_TestCase
 {
     /**
-     * @var bool allow the use of GLOBALS to excange data between tests
-     */
-    protected $backupGlobals = false;
-    
-    /**
      * @var string
      */
-    protected $_testTableName = '';
+    protected $_testTableName = null;
     
     /**
      * @var Tinebase_TransactionManager
      */
     protected $_instance = NULL;
     
+    protected $_tableXML = '
+        <table>
+            <name>transactiontest</name>
+            <version>1</version>
+            <declaration>
+                <field>
+                    <name>Column1</name>
+                    <type>text</type>
+                    <length>64</length>
+                </field>
+                <field>
+                    <name>contact_id</name>
+                    <type>text</type>
+                    <length>64</length>
+                </field>
+            </declaration>
+        </table>
+    ';
+    
     /**
      * Runs the test methods of this class.
      *
@@ -41,11 +55,14 @@ class Tinebase_TransactionManagerTest extends PHPUnit_Framework_TestCase
         $suite  = new PHPUnit_Framework_TestSuite('Tinebase_TransactionManagerTest');
         PHPUnit_TextUI_TestRunner::run($suite);
     }
-    
-    public function setup()
+
+    /**
+     * setup test
+     */
+    protected function setup()
     {
         $this->_testTableName = SQL_TABLE_PREFIX . 'transactiontest';
-        $this->_instance = Tinebase_TransactionManager::getInstance();
+        $this->_instance      = Tinebase_TransactionManager::getInstance();
     }
     
     /**
@@ -55,27 +72,15 @@ class Tinebase_TransactionManagerTest extends PHPUnit_Framework_TestCase
      */
     protected function _createDbTestTable($_db)
     {
-        $tableName = $_db->quoteIdentifier($this->_testTableName);
-        $createQuery = "CREATE TABLE $tableName (" .\r
-            $_db->quoteIdentifier('Column1') . " varchar(64)," .\r
-            $_db->quoteIdentifier('Column2') . " varchar(64))";\r
-         
-        if ($_db instanceof Zend_Db_Adapter_Pdo_Mysql) {\r
-            $createQuery .= " ENGINE=InnoDB DEFAULT CHARSET=utf8";
-        }\r
+        $setupBackend = Setup_Backend_Factory::factory();
         
-        $_db->query("DROP TABLE IF EXISTS $tableName;");
-        $_db->query($createQuery);
-    }
-    
-    protected function _cleanDbTestTable($db)
-    {
+        $setupBackend->dropTable('transactiontest');
         
+        $setupBackend->createTable(new Setup_Backend_Schema_Table_Xml($this->_tableXML));
     }
     
     /**
      * test getInstance()
-     *
      */
     public function testGetInstance()
     {
@@ -85,7 +90,6 @@ class Tinebase_TransactionManagerTest extends PHPUnit_Framework_TestCase
     
     /**
      * tests transaction ids
-     *
      */
     public function testUniqueTransactionIds()
     {
@@ -111,6 +115,9 @@ class Tinebase_TransactionManagerTest extends PHPUnit_Framework_TestCase
         $this->_instance->startTransaction($date);
     }
     
+    /**
+     * test one single transaction
+     */
     public function testOneDbSingleTransaction()
     {
         $db = Zend_Registry::get('dbAdapter');
@@ -127,6 +134,9 @@ class Tinebase_TransactionManagerTest extends PHPUnit_Framework_TestCase
         $this->assertEquals($transactionId, $columns[0]['Column1'], 'Transaction was not executed properly');
     }
 
+    /**
+     * 
+     */
     public function testOneDbRollback()
     {
         $db = Zend_Registry::get('dbAdapter');
index b4965ca..f3a8081 100644 (file)
@@ -63,7 +63,7 @@ class Tinebase_User_EmailUser_Imap_CyrusTest extends PHPUnit_Framework_TestCase
             $this->markTestSkipped('Cyrus IMAP plugin not enabled');
         }
         
-        $this->_config = Tinebase_Config::getInstance()->getConfigAsArray(Tinebase_Config::IMAP);
+        $this->_config = Tinebase_Config::getInstance()->get(Tinebase_Config::IMAP, new Tinebase_Config_Struct())->toArray();
         
         $this->objects['users'] = array();
     }
index 7ad91e0..e6db301 100644 (file)
@@ -63,7 +63,7 @@ class Tinebase_User_EmailUser_Imap_DbmailTest extends PHPUnit_Framework_TestCase
             $this->markTestSkipped('Dbmail MySQL plugin not enabled');
         }
         
-        $this->_config = Tinebase_Config::getInstance()->getConfigAsArray(Tinebase_Config::IMAP);
+        $this->_config = Tinebase_Config::getInstance()->get(Tinebase_Config::IMAP, new Tinebase_Config_Struct())->toArray();
         
         $this->objects['users'] = array();
     }
index 6dd9226..7d1adeb 100644 (file)
@@ -56,7 +56,7 @@ class Tinebase_User_EmailUser_Imap_DovecotTest extends PHPUnit_Framework_TestCas
      */
     protected function setUp()
     {
-        $this->_config = Tinebase_Config::getInstance()->getConfigAsArray(Tinebase_Config::IMAP);
+        $this->_config = Tinebase_Config::getInstance()->get(Tinebase_Config::IMAP, new Tinebase_Config_Struct())->toArray();
         if (!isset($this->_config['backend']) || !(ucfirst($this->_config['backend']) == Tinebase_EmailUser::DOVECOT_IMAP) || $this->_config['active'] != true) {
             $this->markTestSkipped('Dovecot MySQL backend not configured or not enabled');
         }
index 694b8c6..bdfcba9 100644 (file)
@@ -67,7 +67,7 @@ class Tinebase_User_EmailUser_Imap_LdapDbmailSchemaTest extends PHPUnit_Framewor
             $this->markTestSkipped('Dbmail LDAP plugin not enabled');
         }
         
-        $this->_config = Tinebase_Config::getInstance()->getConfigAsArray(Tinebase_Config::IMAP);
+        $this->_config = Tinebase_Config::getInstance()->get(Tinebase_Config::IMAP, new Tinebase_Config_Struct())->toArray();
         
         $this->objects['users'] = array();
     }
index 9115019..9d8a132 100644 (file)
@@ -63,7 +63,7 @@ class Tinebase_User_EmailUser_Smtp_LdapDbmailSchemaTest extends PHPUnit_Framewor
             $this->markTestSkipped('Dbmail LDAP plugin not enabled');
         }
         
-        $this->_config = Tinebase_Config::getInstance()->getConfigAsArray(Tinebase_Config::IMAP);
+        $this->_config = Tinebase_Config::getInstance()->get(Tinebase_Config::IMAP, new Tinebase_Config_Struct())->toArray();
         
         $this->objects['users'] = array();
     }
index 1862183..61690c7 100644 (file)
@@ -77,12 +77,12 @@ class Tinebase_UserTest extends PHPUnit_Framework_TestCase
     {
         Tinebase_User::setBackendType(Tinebase_User::LDAP);
      
-        $rawConfigBefore = Tinebase_Config::getInstance()->getConfig(Tinebase_Config::USERBACKEND, null, 'null');
+        $rawConfigBefore = Tinebase_Config::getInstance()->get(Tinebase_Config::USERBACKEND);
         $key = 'host';
         $testValue = 'phpunit-test-host2';
         Tinebase_User::setBackendConfiguration($testValue, $key);
         Tinebase_User::saveBackendConfiguration();
-        $rawConfigAfter = Tinebase_Config::getInstance()->getConfig(Tinebase_Config::USERBACKEND);
+        $rawConfigAfter = Tinebase_Config::getInstance()->get(Tinebase_Config::USERBACKEND);
         $this->assertNotEquals($rawConfigBefore, $rawConfigAfter);
     }
     
index 0026e01..6c03336 100644 (file)
@@ -54,43 +54,45 @@ class Voipmanager_Backend_Snom_PhoneTest extends PHPUnit_Framework_TestCase
      */
     protected function setUp()
     {
+        Tinebase_TransactionManager::getInstance()->startTransaction(Tinebase_Core::getDb());
+        
         // we need that because the voip db tables can have a different prefix
         Tinebase_Core::set('voipdbTablePrefix', SQL_TABLE_PREFIX);
         
         $this->_backend = new Voipmanager_Backend_Snom_Phone();
         
         $this->_objects['location'] = new Voipmanager_Model_Snom_Location(array(
-            'id' => 20001,
-            'name' => 'phpunit test location',
-            'registrar' => 'registrar'        
+            'id'        => Tinebase_Record_Abstract::generateUID(),
+            'name'      => 'phpunit test location',
+            'registrar' => 'registrar'
         ));
 
         $this->_objects['software'] = new Voipmanager_Model_Snom_Software(array(
-            'id' => 20003
+            'id' => Tinebase_Record_Abstract::generateUID()
         ));
         
         $this->_objects['setting'] = new Voipmanager_Model_Snom_Setting(array(
-            'id' => 20004
+            'id' => Tinebase_Record_Abstract::generateUID()
         ));
         
         $this->_objects['template'] = new Voipmanager_Model_Snom_Template(array(
-            'id' => 20002,
-            'name' => 'phpunit test location',
+            'id'          => Tinebase_Record_Abstract::generateUID(),
+            'name'        => 'phpunit test location',
             'software_id' => $this->_objects['software']->getId(),
-            'setting_id' => $this->_objects['setting']->getId()
+            'setting_id'  => $this->_objects['setting']->getId()
         ));
         
         $this->_objects['phone'] = new Voipmanager_Model_Snom_Phone(array(
-            'id' => 1001,
-            'macaddress' => "1234567890cd",
-            'location_id' => $this->_objects['location']->getId(),
-            'template_id' => $this->_objects['template']->getId(),
-            'current_model' => 'snom320',
+            'id'             => Tinebase_Record_Abstract::generateUID(),
+            'macaddress'     => "1234567890cd",
+            'location_id'    => $this->_objects['location']->getId(),
+            'template_id'    => $this->_objects['template']->getId(),
+            'current_model'  => 'snom320',
             'redirect_event' => 'none'
         ));
         
         $this->_objects['phoneOwner'] = array(
-            'account_id' => Zend_Registry::get('currentAccount')->getId(),
+            'account_id'   => Zend_Registry::get('currentAccount')->getId(),
             'account_type' => 'user'
         );
         
@@ -108,6 +110,7 @@ class Voipmanager_Backend_Snom_PhoneTest extends PHPUnit_Framework_TestCase
      */
     protected function tearDown()
     {
+        Tinebase_TransactionManager::getInstance()->rollBack();
     }
     
     /**
@@ -143,11 +146,5 @@ class Voipmanager_Backend_Snom_PhoneTest extends PHPUnit_Framework_TestCase
         $rights = $this->_backend->getPhoneRights($this->_objects['phone']->getId());
         
         $this->assertEquals(0, count($rights));
-        
-        // remove phone, location, template
-        $this->_backend->delete($this->_objects['phone']->getId());
-        $snomLocationBackend->delete($this->_objects['location']->getId());
-        $snomTemplateBackend->delete($this->_objects['template']->getId());
-        $snomSoftwareBackend->delete($this->_objects['software']->getId());
     }
 }
index 92c4e6c..d552f8d 100644 (file)
@@ -56,16 +56,18 @@ class Voipmanager_ControllerTest extends PHPUnit_Framework_TestCase
      */
     protected function setUp()
     {
-        $this->_backends['Asterisk_Context'] = Voipmanager_Controller_Asterisk_Context::getInstance();
-        $this->_backends['Asterisk_Meetme'] = Voipmanager_Controller_Asterisk_Meetme::getInstance();
-        $this->_backends['Asterisk_SipPeer'] = Voipmanager_Controller_Asterisk_SipPeer::getInstance();
+        Tinebase_TransactionManager::getInstance()->startTransaction(Tinebase_Core::getDb());
+        
+        $this->_backends['Asterisk_Context']   = Voipmanager_Controller_Asterisk_Context::getInstance();
+        $this->_backends['Asterisk_Meetme']    = Voipmanager_Controller_Asterisk_Meetme::getInstance();
+        $this->_backends['Asterisk_SipPeer']   = Voipmanager_Controller_Asterisk_SipPeer::getInstance();
         $this->_backends['Asterisk_Voicemail'] = Voipmanager_Controller_Asterisk_Voicemail::getInstance();
-        $this->_backends['Snom_Line'] = Voipmanager_Controller_Snom_Line::getInstance();
-        $this->_backends['Snom_Location'] = Voipmanager_Controller_Snom_Location::getInstance();
-        $this->_backends['Snom_Phone'] = Voipmanager_Controller_Snom_Phone::getInstance();
-        $this->_backends['Snom_Setting'] = Voipmanager_Controller_Snom_Setting::getInstance();
-        $this->_backends['Snom_Software'] = Voipmanager_Controller_Snom_Software::getInstance();
-        $this->_backends['Snom_Template'] = Voipmanager_Controller_Snom_Template::getInstance();
+        $this->_backends['Snom_Line']          = Voipmanager_Controller_Snom_Line::getInstance();
+        $this->_backends['Snom_Location']      = Voipmanager_Controller_Snom_Location::getInstance();
+        $this->_backends['Snom_Phone']         = Voipmanager_Controller_Snom_Phone::getInstance();
+        $this->_backends['Snom_Setting']       = Voipmanager_Controller_Snom_Setting::getInstance();
+        $this->_backends['Snom_Software']      = Voipmanager_Controller_Snom_Software::getInstance();
+        $this->_backends['Snom_Template']      = Voipmanager_Controller_Snom_Template::getInstance();
     }
 
     /**
@@ -76,13 +78,7 @@ class Voipmanager_ControllerTest extends PHPUnit_Framework_TestCase
      */
     protected function tearDown()
     {
-        foreach (array('Asterisk_SipPeer', 'Asterisk_Context', 'Snom_Location') as $backend) {
-            $filterName = 'Voipmanager_Model_' . $backend . 'Filter';
-            $search = $this->_backends[$backend]->search(new $filterName());
-            foreach ($search as $result) {
-                $this->_backends[$backend]->delete($result->getId());
-            }
-        }
+        Tinebase_TransactionManager::getInstance()->rollBack();
     }
 
     /**
@@ -97,8 +93,6 @@ class Voipmanager_ControllerTest extends PHPUnit_Framework_TestCase
         $this->assertEquals($test->name, $returned->name);
         $this->assertEquals($test->description, $returned->description);
         $this->assertNotNull($returned->id);
-        
-        $this->_backends['Asterisk_Context']->delete($returned->getId());
     }
     
     /**
@@ -116,8 +110,6 @@ class Voipmanager_ControllerTest extends PHPUnit_Framework_TestCase
         $this->assertEquals($test->name, $returned->name);
         $this->assertEquals($test->description, $returned->description);
         $this->assertNotNull($returned->id);
-        
-        $this->_backends['Asterisk_Context']->delete($returned->getId());
     }
     
     /**
@@ -139,8 +131,6 @@ class Voipmanager_ControllerTest extends PHPUnit_Framework_TestCase
         ));
         $returned = $this->_backends['Asterisk_Context']->search($filter);
         $this->assertEquals(1, count($returned));
-        
-        $this->_backends['Asterisk_Context']->delete($returned->getId());
     }
     
     protected function _getAsteriskContext()
@@ -165,8 +155,6 @@ class Voipmanager_ControllerTest extends PHPUnit_Framework_TestCase
         $this->assertEquals($test->confno, $returned->confno);
         $this->assertEquals($test->adminpin, $returned->adminpin);
         $this->assertNotNull($returned->id);
-        
-        $this->_backends['Asterisk_Meetme']->delete($returned->getId());
     }
     
     /**
@@ -184,8 +172,6 @@ class Voipmanager_ControllerTest extends PHPUnit_Framework_TestCase
         $this->assertEquals($test->confno, $returned->confno);
         $this->assertEquals($test->adminpin, $returned->adminpin);
         $this->assertNotNull($returned->id);
-        
-        $this->_backends['Asterisk_Meetme']->delete($returned->getId());
     }
     
     /**
@@ -206,8 +192,6 @@ class Voipmanager_ControllerTest extends PHPUnit_Framework_TestCase
         ));
         $returned = $this->_backends['Asterisk_Meetme']->search($filter);
         $this->assertEquals(1, count($returned));
-        
-        $this->_backends['Asterisk_Meetme']->delete($returned->getId());
     }
     
     protected function _getAsteriskMeetme()
@@ -233,8 +217,6 @@ class Voipmanager_ControllerTest extends PHPUnit_Framework_TestCase
         $this->assertEquals($test->name, $returned->name);
         $this->assertEquals($test->qualify, $returned->qualify);
         $this->assertNotNull($returned->id);
-        
-        $this->_backends['Asterisk_SipPeer']->delete($returned->getId());
     }
     
     /**
@@ -253,8 +235,6 @@ class Voipmanager_ControllerTest extends PHPUnit_Framework_TestCase
         $this->assertEquals($test->name, $returned->name);
         $this->assertEquals($test->callerid, $returned->callerid);
         $this->assertNotNull($returned->id);
-        
-        $this->_backends['Asterisk_SipPeer']->delete($returned->getId());
     }
     
     /**
@@ -272,8 +252,6 @@ class Voipmanager_ControllerTest extends PHPUnit_Framework_TestCase
         $this->assertEquals($test->qualify, $returned->qualify, 'qualify does not match');
         $this->assertEquals($test->name, $returned->name, 'name does not match');
         $this->assertNotNull($returned->id);
-        
-       $this->_backends['Asterisk_SipPeer']->delete($returned->getId());
     }
     
     /**
@@ -305,8 +283,6 @@ class Voipmanager_ControllerTest extends PHPUnit_Framework_TestCase
         ));
         $returned = $this->_backends['Asterisk_SipPeer']->search($filter);
         $this->assertEquals(1, count($returned));
-        
-        $this->_backends['Asterisk_SipPeer']->delete($returned->getId());
     }
     
     protected function _getAsteriskSipPeer()
@@ -316,10 +292,11 @@ class Voipmanager_ControllerTest extends PHPUnit_Framework_TestCase
         $context = $this->_backends['Asterisk_Context']->create($context);
         
         return new Voipmanager_Model_Asterisk_SipPeer(array(
-            'name'  => Tinebase_Record_Abstract::generateUID(),
-            'callerid' => Tinebase_Record_Abstract::generateUID(),
-            'qualify' => 'yes',
-            'context_id' => $context->getId()
+            'name'       => Tinebase_Record_Abstract::generateUID(),
+            'callerid'   => Tinebase_Record_Abstract::generateUID(),
+            'qualify'    => 'yes',
+            'context_id' => $context->getId(),
+            'regseconds' => '111111111'
         ));
     }    
     
@@ -337,8 +314,6 @@ class Voipmanager_ControllerTest extends PHPUnit_Framework_TestCase
         $this->assertEquals($test->mailbox, $returned->mailbox);
         $this->assertEquals($test->fullname, $returned->fullname);
         $this->assertNotNull($returned->id);
-        
-        $this->_backends['Asterisk_Voicemail']->delete($returned->getId());
     }
     
     /**
@@ -356,8 +331,6 @@ class Voipmanager_ControllerTest extends PHPUnit_Framework_TestCase
         $this->assertEquals($test->mailbox, $returned->mailbox);
         $this->assertEquals($test->fullname, $returned->fullname);
         $this->assertNotNull($returned->id);
-        
-        $this->_backends['Asterisk_Voicemail']->delete($returned->getId());
     }
     
     /**
@@ -379,8 +352,6 @@ class Voipmanager_ControllerTest extends PHPUnit_Framework_TestCase
         ));
         $returned = $this->_backends['Asterisk_Voicemail']->search($filter);
         $this->assertEquals(1, count($returned));
-                
-        $this->_backends['Asterisk_Voicemail']->delete($returned->getId());
     }
     
     /**
@@ -416,8 +387,6 @@ class Voipmanager_ControllerTest extends PHPUnit_Framework_TestCase
         $this->assertEquals($test->description, $returned->description);
         $this->assertEquals($test->softwareimage_snom320, $returned->softwareimage_snom320);
         $this->assertNotNull($returned->id);
-        
-        $this->_backends['Snom_Software']->delete($returned->getId());
     }
     
     /**
@@ -436,8 +405,6 @@ class Voipmanager_ControllerTest extends PHPUnit_Framework_TestCase
         $this->assertEquals($test->name, $returned->name);
         $this->assertEquals($test->description, $returned->description);
         $this->assertNotNull($returned->id);
-        
-        $this->_backends['Snom_Software']->delete($returned->getId());
     }
     
     /**
@@ -454,8 +421,6 @@ class Voipmanager_ControllerTest extends PHPUnit_Framework_TestCase
         $this->assertEquals($test->description, $returned->description);
         $this->assertEquals($test->softwareimage_snom320, $returned->softwareimage_snom320);
         $this->assertNotNull($returned->id);
-        
-        $this->_backends['Snom_Software']->delete($returned->getId());
     }
     
     /**
@@ -477,8 +442,6 @@ class Voipmanager_ControllerTest extends PHPUnit_Framework_TestCase
         ));
         $returned = $this->_backends['Snom_Software']->search($filter);
         $this->assertEquals(1, count($returned));
-                
-        $this->_backends['Snom_Software']->delete($returned->getId());
     }
     
     /**
@@ -513,8 +476,6 @@ class Voipmanager_ControllerTest extends PHPUnit_Framework_TestCase
         $this->assertEquals($test->mwi_notification, $returned->mwi_notification);
         $this->assertEquals($test->mwi_notification_w, $returned->mwi_notification_w);
         $this->assertNotNull($returned->id);
-        
-        $this->_backends['Snom_Setting']->delete($returned->getId());
     }
     
     /**
@@ -536,8 +497,6 @@ class Voipmanager_ControllerTest extends PHPUnit_Framework_TestCase
         $this->assertEquals($test->mwi_notification, $returned->mwi_notification);
         $this->assertEquals($test->mwi_notification_w, $returned->mwi_notification_w);
         $this->assertNotNull($returned->id);
-        
-        $this->_backends['Snom_Setting']->delete($returned->getId());
     }
     
     /**
@@ -559,8 +518,6 @@ class Voipmanager_ControllerTest extends PHPUnit_Framework_TestCase
         ));
         $returned = $this->_backends['Snom_Setting']->search($filter);
         $this->assertEquals(1, count($returned));
-                
-        $this->_backends['Snom_Setting']->delete($returned->getId());
     }
     
     /**
@@ -594,8 +551,6 @@ class Voipmanager_ControllerTest extends PHPUnit_Framework_TestCase
         $this->assertEquals($test->name, $returned->name);
         $this->assertEquals($test->description, $returned->description);
         $this->assertNotNull($returned->id);
-        
-        $this->_backends['Snom_Location']->delete($returned->getId());
     }
     
     /**
@@ -614,8 +569,6 @@ class Voipmanager_ControllerTest extends PHPUnit_Framework_TestCase
         $this->assertEquals($test->name, $returned->name);
         $this->assertEquals($test->description, $returned->description);
         $this->assertNotNull($returned->id);
-        
-        $this->_backends['Snom_Location']->delete($returned->getId());
     }
     
     /**
@@ -633,8 +586,6 @@ class Voipmanager_ControllerTest extends PHPUnit_Framework_TestCase
         $this->assertEquals($test->name, $returned->name);
         $this->assertEquals($test->description, $returned->description);
         $this->assertNotNull($returned->id);
-        
-        $this->_backends['Snom_Location']->delete($returned->getId());
     }
     
     /**
@@ -657,8 +608,6 @@ class Voipmanager_ControllerTest extends PHPUnit_Framework_TestCase
         
         $returned = $this->_backends['Snom_Location']->search($filter);
         $this->assertEquals(1, count($returned));
-                
-        $this->_backends['Snom_Location']->delete($returned->getId());
     }
     
     /**
@@ -691,10 +640,6 @@ class Voipmanager_ControllerTest extends PHPUnit_Framework_TestCase
         $this->assertEquals($test->name, $returned->name);
         $this->assertEquals($test->description, $returned->description);
         $this->assertNotNull($returned->id);
-        
-        $this->_backends['Snom_Template']->delete($returned->getId());
-        $this->_backends['Snom_Setting']->delete($settings->getId());
-        $this->_backends['Snom_Software']->delete($software->getId());
     }
     
     /**
@@ -715,10 +660,6 @@ class Voipmanager_ControllerTest extends PHPUnit_Framework_TestCase
         $this->assertEquals($test->name, $returned->name);
         $this->assertEquals($test->description, $returned->description);
         $this->assertNotNull($returned->id);
-        
-        $this->_backends['Snom_Template']->delete($returned->getId());
-        $this->_backends[