From 45d35d5739d05e602bc317739485693e0e9ff0b5 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Tue, 25 Feb 2014 18:34:25 -0800 Subject: [PATCH] RT 4.0.19 --- rt/Makefile.in | 23 +- rt/README | 2 +- rt/bin/rt | 135 +++- rt/bin/rt-crontool.in | 2 +- rt/bin/rt-mailgate.in | 2 +- rt/bin/rt.in | 135 +++- rt/configure | 25 +- rt/configure.ac | 1 - rt/devel/tools/change-loc-msgstr | 2 +- rt/devel/tools/extract-message-catalog | 2 +- rt/devel/tools/factory | 2 +- rt/devel/tools/license_tag | 45 +- rt/devel/tools/merge-rosetta.pl | 2 +- rt/devel/tools/rt-attributes-editor | 2 +- rt/devel/tools/tweak-template-locstring | 2 +- rt/docs/UPGRADING-3.8 | 6 +- rt/docs/UPGRADING-4.0 | 57 ++ rt/etc/RT_Config.pm.in | 34 +- rt/etc/schema.mysql | 6 +- rt/etc/upgrade/3.7.19/content | 17 +- rt/etc/upgrade/3.8-ical-extension.in | 2 +- rt/etc/upgrade/3.9.8/content | 6 +- rt/etc/upgrade/generate-rtaddressregexp.in | 2 +- rt/etc/upgrade/sanity-check-stylesheets.pl | 2 +- rt/etc/upgrade/shrink_cgm_table.pl | 2 +- rt/etc/upgrade/shrink_transactions_table.pl | 2 +- rt/etc/upgrade/split-out-cf-categories.in | 2 +- rt/etc/upgrade/upgrade-articles | 8 +- rt/etc/upgrade/upgrade-articles.in | 8 +- rt/etc/upgrade/upgrade-mysql-schema.pl | 8 +- rt/etc/upgrade/vulnerable-passwords.in | 2 +- rt/lib/RT.pm | 16 +- rt/lib/RT/ACE.pm | 2 +- rt/lib/RT/ACL.pm | 2 +- rt/lib/RT/Action.pm | 2 +- rt/lib/RT/Action/AutoOpen.pm | 2 +- rt/lib/RT/Action/Autoreply.pm | 2 +- rt/lib/RT/Action/CreateTickets.pm | 2 +- rt/lib/RT/Action/EscalatePriority.pm | 2 +- rt/lib/RT/Action/ExtractSubjectTag.pm | 2 +- rt/lib/RT/Action/LinearEscalate.pm | 2 +- rt/lib/RT/Action/Notify.pm | 2 +- rt/lib/RT/Action/NotifyAsComment.pm | 2 +- rt/lib/RT/Action/NotifyGroup.pm | 2 +- rt/lib/RT/Action/NotifyGroupAsComment.pm | 2 +- rt/lib/RT/Action/RecordComment.pm | 2 +- rt/lib/RT/Action/RecordCorrespondence.pm | 2 +- rt/lib/RT/Action/SendEmail.pm | 24 +- rt/lib/RT/Action/SetPriority.pm | 2 +- rt/lib/RT/Action/SetStatus.pm | 2 +- rt/lib/RT/Action/UserDefined.pm | 2 +- rt/lib/RT/Approval.pm | 2 +- rt/lib/RT/Approval/Rule.pm | 2 +- rt/lib/RT/Approval/Rule/Created.pm | 2 +- rt/lib/RT/Approval/Rule/NewPending.pm | 2 +- rt/lib/RT/Approval/Rule/Passed.pm | 2 +- rt/lib/RT/Approval/Rule/Rejected.pm | 2 +- rt/lib/RT/Article.pm | 2 +- rt/lib/RT/Articles.pm | 8 +- rt/lib/RT/Attachment.pm | 2 +- rt/lib/RT/Attachments.pm | 2 +- rt/lib/RT/Attribute.pm | 4 +- rt/lib/RT/Attributes.pm | 7 +- rt/lib/RT/Base.pm | 2 +- rt/lib/RT/CachedGroupMember.pm | 2 +- rt/lib/RT/CachedGroupMembers.pm | 2 +- rt/lib/RT/Class.pm | 2 +- rt/lib/RT/Classes.pm | 11 +- rt/lib/RT/Condition.pm | 2 +- rt/lib/RT/Condition/AnyTransaction.pm | 2 +- rt/lib/RT/Condition/BeforeDue.pm | 2 +- rt/lib/RT/Condition/CloseTicket.pm | 2 +- rt/lib/RT/Condition/Overdue.pm | 2 +- rt/lib/RT/Condition/OwnerChange.pm | 2 +- rt/lib/RT/Condition/PriorityChange.pm | 2 +- rt/lib/RT/Condition/PriorityExceeds.pm | 2 +- rt/lib/RT/Condition/QueueChange.pm | 2 +- rt/lib/RT/Condition/ReopenTicket.pm | 2 +- rt/lib/RT/Condition/StatusChange.pm | 2 +- rt/lib/RT/Condition/UserDefined.pm | 2 +- rt/lib/RT/Config.pm | 2 +- rt/lib/RT/Crypt/GnuPG.pm | 7 +- rt/lib/RT/CurrentUser.pm | 2 +- rt/lib/RT/CustomField.pm | 64 +- rt/lib/RT/CustomFieldValue.pm | 2 +- rt/lib/RT/CustomFieldValues.pm | 2 +- rt/lib/RT/CustomFieldValues/External.pm | 2 +- rt/lib/RT/CustomFieldValues/Groups.pm | 34 +- rt/lib/RT/CustomFields.pm | 35 +- rt/lib/RT/Dashboard.pm | 2 +- rt/lib/RT/Dashboard/Mailer.pm | 9 +- rt/lib/RT/Dashboards.pm | 2 +- rt/lib/RT/Date.pm | 34 +- rt/lib/RT/EmailParser.pm | 32 +- rt/lib/RT/Generated.pm | 4 +- rt/lib/RT/Generated.pm.in | 2 +- rt/lib/RT/Graph/Tickets.pm | 2 +- rt/lib/RT/Group.pm | 2 +- rt/lib/RT/GroupMember.pm | 2 +- rt/lib/RT/GroupMembers.pm | 2 +- rt/lib/RT/Groups.pm | 2 +- rt/lib/RT/Handle.pm | 37 +- rt/lib/RT/I18N.pm | 3 +- rt/lib/RT/I18N/cs.pm | 2 +- rt/lib/RT/I18N/de.pm | 61 ++ .../rt-session-viewer => lib/RT/I18N/fr.pm} | 110 +-- rt/lib/RT/I18N/i_default.pm | 2 +- rt/lib/RT/I18N/ru.pm | 2 +- rt/lib/RT/Installer.pm | 2 +- rt/lib/RT/Interface/CLI.pm | 2 +- rt/lib/RT/Interface/Email.pm | 37 +- rt/lib/RT/Interface/Email/Auth/GnuPG.pm | 2 +- rt/lib/RT/Interface/Email/Auth/MailFrom.pm | 2 +- rt/lib/RT/Interface/REST.pm | 44 +- rt/lib/RT/Interface/Web.pm | 36 +- rt/lib/RT/Interface/Web/Handler.pm | 2 +- rt/lib/RT/Interface/Web/Menu.pm | 2 +- rt/lib/RT/Interface/Web/QueryBuilder.pm | 2 +- rt/lib/RT/Interface/Web/QueryBuilder/Tree.pm | 2 +- rt/lib/RT/Interface/Web/Request.pm | 2 +- rt/lib/RT/Interface/Web/Session.pm | 55 +- rt/lib/RT/Lifecycle.pm | 8 +- rt/lib/RT/Link.pm | 2 +- rt/lib/RT/Links.pm | 2 +- rt/lib/RT/ObjectClass.pm | 2 +- rt/lib/RT/ObjectClasses.pm | 2 +- rt/lib/RT/ObjectCustomField.pm | 2 +- rt/lib/RT/ObjectCustomFieldValue.pm | 2 +- rt/lib/RT/ObjectCustomFieldValues.pm | 2 +- rt/lib/RT/ObjectCustomFields.pm | 2 +- rt/lib/RT/ObjectTopic.pm | 2 +- rt/lib/RT/ObjectTopics.pm | 2 +- rt/lib/RT/Plugin.pm | 2 +- rt/lib/RT/Pod/HTML.pm | 35 +- rt/lib/RT/Pod/HTMLBatch.pm | 9 +- rt/lib/RT/Pod/Search.pm | 2 +- rt/lib/RT/Principal.pm | 7 +- rt/lib/RT/Principals.pm | 3 +- rt/lib/RT/Queue.pm | 2 +- rt/lib/RT/Queues.pm | 2 +- rt/lib/RT/Record.pm | 52 +- rt/lib/RT/Reminders.pm | 5 +- rt/lib/RT/Report/Tickets.pm | 6 +- rt/lib/RT/Report/Tickets/Entry.pm | 2 +- rt/lib/RT/Rule.pm | 2 +- rt/lib/RT/Ruleset.pm | 2 +- rt/lib/RT/SQL.pm | 2 +- rt/lib/RT/SavedSearch.pm | 2 +- rt/lib/RT/SavedSearches.pm | 2 +- rt/lib/RT/Scrip.pm | 2 +- rt/lib/RT/ScripAction.pm | 2 +- rt/lib/RT/ScripActions.pm | 2 +- rt/lib/RT/ScripCondition.pm | 2 +- rt/lib/RT/ScripConditions.pm | 2 +- rt/lib/RT/Scrips.pm | 2 +- rt/lib/RT/Search.pm | 2 +- rt/lib/RT/Search/ActiveTicketsInQueue.pm | 2 +- rt/lib/RT/Search/FromSQL.pm | 2 +- rt/lib/RT/Search/Googleish.pm | 4 +- rt/lib/RT/SearchBuilder.pm | 6 +- rt/lib/RT/SharedSetting.pm | 2 +- rt/lib/RT/SharedSettings.pm | 2 +- rt/lib/RT/Shredder.pm | 17 +- rt/lib/RT/Shredder/ACE.pm | 2 +- rt/lib/RT/Shredder/Attachment.pm | 2 +- rt/lib/RT/Shredder/CachedGroupMember.pm | 2 +- rt/lib/RT/Shredder/Constants.pm | 2 +- rt/lib/RT/Shredder/CustomField.pm | 2 +- rt/lib/RT/Shredder/CustomFieldValue.pm | 2 +- rt/lib/RT/Shredder/Dependencies.pm | 2 +- rt/lib/RT/Shredder/Dependency.pm | 2 +- rt/lib/RT/Shredder/Exceptions.pm | 2 +- rt/lib/RT/Shredder/Group.pm | 2 +- rt/lib/RT/Shredder/GroupMember.pm | 2 +- rt/lib/RT/Shredder/Link.pm | 2 +- rt/lib/RT/Shredder/ObjectCustomFieldValue.pm | 2 +- rt/lib/RT/Shredder/POD.pm | 2 +- rt/lib/RT/Shredder/Plugin.pm | 2 +- rt/lib/RT/Shredder/Plugin/Attachments.pm | 2 +- rt/lib/RT/Shredder/Plugin/Base.pm | 2 +- rt/lib/RT/Shredder/Plugin/Base/Dump.pm | 2 +- rt/lib/RT/Shredder/Plugin/Base/Search.pm | 2 +- rt/lib/RT/Shredder/Plugin/Objects.pm | 2 +- rt/lib/RT/Shredder/Plugin/SQLDump.pm | 2 +- rt/lib/RT/Shredder/Plugin/Summary.pm | 2 +- rt/lib/RT/Shredder/Plugin/Tickets.pm | 2 +- rt/lib/RT/Shredder/Plugin/Users.pm | 2 +- rt/lib/RT/Shredder/Principal.pm | 2 +- rt/lib/RT/Shredder/Queue.pm | 2 +- rt/lib/RT/Shredder/Record.pm | 2 +- rt/lib/RT/Shredder/Scrip.pm | 2 +- rt/lib/RT/Shredder/ScripAction.pm | 2 +- rt/lib/RT/Shredder/ScripCondition.pm | 2 +- rt/lib/RT/Shredder/Template.pm | 2 +- rt/lib/RT/Shredder/Ticket.pm | 2 +- rt/lib/RT/Shredder/Transaction.pm | 2 +- rt/lib/RT/Shredder/User.pm | 2 +- rt/lib/RT/Squish.pm | 2 +- rt/lib/RT/Squish/CSS.pm | 2 +- rt/lib/RT/Squish/JS.pm | 2 +- rt/lib/RT/System.pm | 2 +- rt/lib/RT/Template.pm | 10 +- rt/lib/RT/Templates.pm | 2 +- rt/lib/RT/Test.pm | 9 +- rt/lib/RT/Test/Apache.pm | 2 +- rt/lib/RT/Test/Email.pm | 2 +- rt/lib/RT/Test/GnuPG.pm | 2 +- rt/lib/RT/Test/Web.pm | 2 +- rt/lib/RT/Ticket.pm | 6 +- rt/lib/RT/Tickets.pm | 191 +++-- rt/lib/RT/Tickets_SQL.pm | 106 ++- rt/lib/RT/Topic.pm | 2 +- rt/lib/RT/Topics.pm | 2 +- rt/lib/RT/Transaction.pm | 143 +++- rt/lib/RT/Transactions.pm | 2 +- rt/lib/RT/URI.pm | 4 +- rt/lib/RT/URI/a.pm | 2 +- rt/lib/RT/URI/base.pm | 2 +- rt/lib/RT/URI/fsck_com_article.pm | 2 +- rt/lib/RT/URI/fsck_com_rt.pm | 2 +- rt/lib/RT/URI/t.pm | 2 +- rt/lib/RT/User.pm | 2 +- rt/lib/RT/Users.pm | 2 +- rt/lib/RT/Util.pm | 13 +- rt/sbin/rt-attributes-viewer.in | 2 +- rt/sbin/rt-clean-sessions.in | 2 +- rt/sbin/rt-dump-metadata.in | 191 +++-- rt/sbin/rt-email-dashboards.in | 2 +- rt/sbin/rt-email-digest.in | 8 +- rt/sbin/rt-email-group-admin.in | 36 +- rt/sbin/rt-fulltext-indexer | 465 ------------ rt/sbin/rt-fulltext-indexer.in | 6 +- rt/sbin/rt-message-catalog | 2 +- rt/sbin/rt-preferences-viewer.in | 2 +- rt/sbin/rt-server.fcgi.in | 4 +- rt/sbin/rt-server.in | 4 +- rt/sbin/rt-session-viewer.in | 2 +- rt/sbin/rt-setup-database.in | 44 +- rt/sbin/rt-setup-fulltext-index | 714 ------------------ rt/sbin/rt-setup-fulltext-index.in | 2 +- rt/sbin/rt-shredder.in | 8 +- rt/sbin/rt-test-dependencies.in | 3 +- rt/sbin/rt-validate-aliases.in | 2 +- rt/sbin/rt-validator.in | 2 +- rt/sbin/standalone_httpd | 284 ------- rt/sbin/standalone_httpd.in | 4 +- .../Admin/Articles/Classes/CustomFields.html | 2 +- .../Admin/Articles/Classes/GroupRights.html | 2 +- .../html/Admin/Articles/Classes/Modify.html | 2 +- .../html/Admin/Articles/Classes/Objects.html | 2 +- .../html/Admin/Articles/Classes/Topics.html | 2 +- .../Admin/Articles/Classes/UserRights.html | 2 +- .../html/Admin/Articles/Classes/index.html | 2 +- rt/share/html/Admin/Articles/Elements/Topics | 2 +- rt/share/html/Admin/Articles/index.html | 2 +- .../html/Admin/CustomFields/GroupRights.html | 2 +- rt/share/html/Admin/CustomFields/Modify.html | 4 +- rt/share/html/Admin/CustomFields/Objects.html | 2 +- .../html/Admin/CustomFields/UserRights.html | 2 +- rt/share/html/Admin/CustomFields/index.html | 2 +- .../html/Admin/Elements/AddCustomFieldValue | 2 +- rt/share/html/Admin/Elements/ConfigureMyRT | 2 +- rt/share/html/Admin/Elements/CreateUserCalled | 2 +- rt/share/html/Admin/Elements/EditCustomField | 2 +- .../html/Admin/Elements/EditCustomFieldValues | 2 +- .../Elements/EditCustomFieldValuesSource | 2 +- rt/share/html/Admin/Elements/EditCustomFields | 2 +- .../html/Admin/Elements/EditQueueWatcherGroup | 2 +- .../html/Admin/Elements/EditQueueWatchers | 2 +- rt/share/html/Admin/Elements/EditRights | 2 +- .../Admin/Elements/EditRightsCategoryTabs | 14 +- rt/share/html/Admin/Elements/EditScrip | 2 +- rt/share/html/Admin/Elements/EditScrips | 2 +- rt/share/html/Admin/Elements/EditTemplates | 2 +- rt/share/html/Admin/Elements/EditUserComments | 2 +- rt/share/html/Admin/Elements/Header | 2 +- .../Admin/Elements/ListGlobalCustomFields | 2 +- rt/share/html/Admin/Elements/ListGlobalScrips | 2 +- rt/share/html/Admin/Elements/ModifyTemplate | 2 +- rt/share/html/Admin/Elements/PickCustomFields | 2 +- rt/share/html/Admin/Elements/PickObjects | 2 +- rt/share/html/Admin/Elements/Portal | 2 +- .../html/Admin/Elements/QueueRightsForUser | 2 +- .../html/Admin/Elements/SelectCustomField | 2 +- .../Elements/SelectCustomFieldLookupType | 2 +- .../Elements/SelectCustomFieldRenderType | 7 +- .../html/Admin/Elements/SelectCustomFieldType | 2 +- rt/share/html/Admin/Elements/SelectGroups | 2 +- .../html/Admin/Elements/SelectModifyGroup | 2 +- .../html/Admin/Elements/SelectModifyQueue | 2 +- rt/share/html/Admin/Elements/SelectModifyUser | 2 +- .../html/Admin/Elements/SelectNewGroupMembers | 4 +- rt/share/html/Admin/Elements/SelectRights | 2 +- rt/share/html/Admin/Elements/SelectScrip | 2 +- .../html/Admin/Elements/SelectScripAction | 2 +- .../html/Admin/Elements/SelectScripCondition | 2 +- .../Admin/Elements/SelectSingleOrMultiple | 2 +- rt/share/html/Admin/Elements/SelectStage | 2 +- rt/share/html/Admin/Elements/SelectTemplate | 2 +- rt/share/html/Admin/Elements/SelectUsers | 2 +- rt/share/html/Admin/Elements/ShowKeyInfo | 2 +- .../Global/CustomFields/Class-Article.html | 2 +- .../Admin/Global/CustomFields/Groups.html | 2 +- .../Global/CustomFields/Queue-Tickets.html | 2 +- .../CustomFields/Queue-Transactions.html | 2 +- .../Admin/Global/CustomFields/Queues.html | 2 +- .../html/Admin/Global/CustomFields/Users.html | 2 +- .../html/Admin/Global/CustomFields/index.html | 2 +- rt/share/html/Admin/Global/GroupRights.html | 2 +- rt/share/html/Admin/Global/MyRT.html | 2 +- rt/share/html/Admin/Global/Scrip.html | 2 +- rt/share/html/Admin/Global/Scrips.html | 2 +- rt/share/html/Admin/Global/Template.html | 2 +- rt/share/html/Admin/Global/Templates.html | 2 +- rt/share/html/Admin/Global/Topics.html | 2 +- rt/share/html/Admin/Global/UserRights.html | 2 +- rt/share/html/Admin/Global/index.html | 2 +- rt/share/html/Admin/Groups/GroupRights.html | 2 +- rt/share/html/Admin/Groups/History.html | 2 +- rt/share/html/Admin/Groups/Members.html | 2 +- rt/share/html/Admin/Groups/Modify.html | 2 +- rt/share/html/Admin/Groups/UserRights.html | 2 +- rt/share/html/Admin/Groups/index.html | 2 +- rt/share/html/Admin/Queues/CustomField.html | 2 +- rt/share/html/Admin/Queues/CustomFields.html | 2 +- rt/share/html/Admin/Queues/GroupRights.html | 2 +- rt/share/html/Admin/Queues/History.html | 2 +- rt/share/html/Admin/Queues/Modify.html | 2 +- rt/share/html/Admin/Queues/People.html | 2 +- rt/share/html/Admin/Queues/Scrip.html | 2 +- rt/share/html/Admin/Queues/Scrips.html | 2 +- rt/share/html/Admin/Queues/Template.html | 2 +- rt/share/html/Admin/Queues/Templates.html | 2 +- rt/share/html/Admin/Queues/UserRights.html | 2 +- rt/share/html/Admin/Queues/index.html | 3 +- rt/share/html/Admin/Tools/Configuration.html | 2 +- rt/share/html/Admin/Tools/Queries.html | 2 +- .../html/Admin/Tools/Shredder/Dumps/dhandler | 2 +- .../Tools/Shredder/Elements/DumpFileLink | 2 +- .../Tools/Shredder/Elements/Error/NoRights | 2 +- .../Tools/Shredder/Elements/Error/NoStorage | 2 +- .../Shredder/Elements/Object/RT--Attachment | 2 +- .../Tools/Shredder/Elements/Object/RT--Ticket | 2 +- .../Tools/Shredder/Elements/Object/RT--User | 2 +- .../Tools/Shredder/Elements/ObjectCheckBox | 2 +- .../Tools/Shredder/Elements/PluginArguments | 2 +- .../Admin/Tools/Shredder/Elements/PluginHelp | 2 +- .../Tools/Shredder/Elements/SelectObjects | 2 +- .../Tools/Shredder/Elements/SelectPlugin | 2 +- .../html/Admin/Tools/Shredder/autohandler | 2 +- rt/share/html/Admin/Tools/Shredder/index.html | 2 +- rt/share/html/Admin/Tools/Theme.html | 20 +- rt/share/html/Admin/Tools/index.html | 2 +- rt/share/html/Admin/Users/CustomFields.html | 2 +- rt/share/html/Admin/Users/GnuPG.html | 2 +- rt/share/html/Admin/Users/History.html | 2 +- rt/share/html/Admin/Users/Memberships.html | 2 +- rt/share/html/Admin/Users/Modify.html | 2 +- rt/share/html/Admin/Users/MyRT.html | 2 +- rt/share/html/Admin/Users/index.html | 4 +- rt/share/html/Admin/autohandler | 2 +- rt/share/html/Admin/index.html | 2 +- rt/share/html/Approvals/Display.html | 2 +- rt/share/html/Approvals/Elements/Approve | 2 +- .../html/Approvals/Elements/PendingMyApproval | 2 +- .../html/Approvals/Elements/ShowDependency | 2 +- rt/share/html/Approvals/autohandler | 2 +- rt/share/html/Approvals/index.html | 9 +- rt/share/html/Articles/Article/Delete.html | 2 +- rt/share/html/Articles/Article/Display.html | 2 +- rt/share/html/Articles/Article/Edit.html | 2 +- .../html/Articles/Article/Elements/EditBasics | 2 +- .../Article/Elements/EditCustomFields | 2 +- .../html/Articles/Article/Elements/EditLinks | 2 +- .../html/Articles/Article/Elements/EditTopics | 2 +- .../Article/Elements/LinkEntryInstructions | 2 +- .../Articles/Article/Elements/Preformatted | 2 +- .../Article/Elements/SearchByCustomField | 2 +- .../Article/Elements/SelectSavedSearches | 2 +- .../Article/Elements/SelectSearchPrivacy | 2 +- .../Articles/Article/Elements/ShowHistory | 2 +- .../html/Articles/Article/Elements/ShowLinks | 2 +- .../Article/Elements/ShowSavedSearches | 2 +- .../Article/Elements/ShowSearchCriteria | 2 +- .../html/Articles/Article/Elements/ShowTopics | 2 +- .../Articles/Article/ExtractFromTicket.html | 2 +- .../Articles/Article/ExtractIntoClass.html | 4 +- .../Articles/Article/ExtractIntoTopic.html | 2 +- rt/share/html/Articles/Article/History.html | 2 +- rt/share/html/Articles/Article/PreCreate.html | 4 +- rt/share/html/Articles/Article/Search.html | 2 +- .../html/Articles/Elements/BeforeMessageBox | 2 +- .../html/Articles/Elements/CheckSkipCreate | 2 +- rt/share/html/Articles/Elements/CreateArticle | 2 +- rt/share/html/Articles/Elements/GotoArticle | 2 +- .../html/Articles/Elements/IncludeArticle | 2 +- .../html/Articles/Elements/NewestArticles | 2 +- rt/share/html/Articles/Elements/QuickSearch | 2 +- rt/share/html/Articles/Elements/SelectClass | 2 +- rt/share/html/Articles/Elements/ShowTopic | 2 +- rt/share/html/Articles/Elements/ShowTopicLink | 2 +- .../html/Articles/Elements/UpdatedArticles | 2 +- rt/share/html/Articles/Topics.html | 2 +- rt/share/html/Articles/index.html | 2 +- .../Dashboards/Elements/DashboardsForObject | 2 +- rt/share/html/Dashboards/Elements/Deleted | 2 +- .../html/Dashboards/Elements/HiddenSearches | 2 +- .../html/Dashboards/Elements/ListOfDashboards | 2 +- .../html/Dashboards/Elements/SelectPrivacy | 2 +- .../html/Dashboards/Elements/ShowDashboards | 2 +- .../Dashboards/Elements/ShowPortlet/component | 2 +- .../Dashboards/Elements/ShowPortlet/dashboard | 2 +- .../Dashboards/Elements/ShowPortlet/search | 2 +- rt/share/html/Dashboards/Modify.html | 2 +- rt/share/html/Dashboards/Queries.html | 2 +- rt/share/html/Dashboards/Render.html | 12 +- rt/share/html/Dashboards/Subscription.html | 2 +- rt/share/html/Dashboards/dhandler | 2 +- rt/share/html/Dashboards/index.html | 2 +- .../html/Download/CustomFieldValue/dhandler | 2 +- rt/share/html/Elements/BevelBoxRaisedEnd | 2 +- rt/share/html/Elements/BevelBoxRaisedStart | 2 +- rt/share/html/Elements/CSRF | 2 +- rt/share/html/Elements/Callback | 2 +- rt/share/html/Elements/Checkbox | 2 +- .../html/Elements/CollectionAsTable/Header | 2 +- .../Elements/CollectionAsTable/ParseFormat | 3 +- rt/share/html/Elements/CollectionAsTable/Row | 2 +- rt/share/html/Elements/CollectionList | 5 +- rt/share/html/Elements/CollectionListPaging | 2 +- rt/share/html/Elements/ColumnMap | 6 +- rt/share/html/Elements/CreateTicket | 2 +- rt/share/html/Elements/Dashboards | 2 +- rt/share/html/Elements/EditCustomField | 2 +- .../html/Elements/EditCustomFieldAutocomplete | 2 +- rt/share/html/Elements/EditCustomFieldBinary | 4 +- .../html/Elements/EditCustomFieldCombobox | 2 +- rt/share/html/Elements/EditCustomFieldDate | 2 +- .../html/Elements/EditCustomFieldDateTime | 2 +- .../html/Elements/EditCustomFieldFreeform | 2 +- .../html/Elements/EditCustomFieldIPAddress | 2 +- .../Elements/EditCustomFieldIPAddressRange | 2 +- rt/share/html/Elements/EditCustomFieldImage | 2 +- rt/share/html/Elements/EditCustomFieldSelect | 60 +- rt/share/html/Elements/EditCustomFieldText | 2 +- .../html/Elements/EditCustomFieldWikitext | 2 +- rt/share/html/Elements/EditLinks | 2 +- rt/share/html/Elements/EditPassword | 2 +- rt/share/html/Elements/EditTimeValue | 2 +- rt/share/html/Elements/EmailInput | 2 +- rt/share/html/Elements/Error | 2 +- rt/share/html/Elements/Footer | 2 +- rt/share/html/Elements/Framekiller | 2 +- rt/share/html/Elements/GnuPG/KeyIssues | 2 +- .../Elements/GnuPG/SelectKeyForEncryption | 2 +- .../html/Elements/GnuPG/SelectKeyForSigning | 2 +- .../html/Elements/GnuPG/SignEncryptWidget | 2 +- rt/share/html/Elements/GotoTicket | 2 +- rt/share/html/Elements/Header | 2 +- rt/share/html/Elements/HeaderJavascript | 4 +- rt/share/html/Elements/ListActions | 2 +- rt/share/html/Elements/ListMenu | 2 +- rt/share/html/Elements/Login | 2 +- rt/share/html/Elements/LoginRedirectWarning | 2 +- rt/share/html/Elements/Logo | 2 +- rt/share/html/Elements/MakeClicky | 6 +- rt/share/html/Elements/Menu | 2 +- rt/share/html/Elements/MessageBox | 5 +- rt/share/html/Elements/MyAdminQueues | 2 +- rt/share/html/Elements/MyRT | 2 +- rt/share/html/Elements/MyReminders | 2 +- rt/share/html/Elements/MyRequests | 2 +- rt/share/html/Elements/MySupportQueues | 2 +- rt/share/html/Elements/MyTickets | 2 +- rt/share/html/Elements/PageLayout | 2 +- rt/share/html/Elements/PersonalQuickbar | 2 +- rt/share/html/Elements/QueriesAsComment | 2 +- rt/share/html/Elements/QueryString | 2 +- .../html/Elements/QueueSummaryByLifecycle | 4 +- rt/share/html/Elements/QueueSummaryByStatus | 4 +- rt/share/html/Elements/QuickCreate | 2 +- rt/share/html/Elements/Quicksearch | 2 +- rt/share/html/Elements/RT__Article/ColumnMap | 2 +- rt/share/html/Elements/RT__Class/ColumnMap | 2 +- .../html/Elements/RT__CustomField/ColumnMap | 4 +- .../html/Elements/RT__Dashboard/ColumnMap | 2 +- rt/share/html/Elements/RT__Group/ColumnMap | 2 +- rt/share/html/Elements/RT__Queue/ColumnMap | 2 +- .../html/Elements/RT__SavedSearch/ColumnMap | 2 +- rt/share/html/Elements/RT__Scrip/ColumnMap | 2 +- rt/share/html/Elements/RT__Template/ColumnMap | 2 +- rt/share/html/Elements/RT__Ticket/ColumnMap | 4 +- rt/share/html/Elements/RT__User/ColumnMap | 7 +- rt/share/html/Elements/Refresh | 2 +- rt/share/html/Elements/RefreshHomepage | 2 +- rt/share/html/Elements/SavedSearches | 2 +- rt/share/html/Elements/ScrubHTML | 2 +- rt/share/html/Elements/Section | 2 +- rt/share/html/Elements/SelectAttachmentField | 2 +- rt/share/html/Elements/SelectBoolean | 2 +- .../html/Elements/SelectCustomFieldOperator | 2 +- rt/share/html/Elements/SelectCustomFieldValue | 17 +- rt/share/html/Elements/SelectDate | 2 +- rt/share/html/Elements/SelectDateRelation | 2 +- rt/share/html/Elements/SelectDateType | 2 +- rt/share/html/Elements/SelectEqualityOperator | 2 +- rt/share/html/Elements/SelectGroups | 2 +- rt/share/html/Elements/SelectIPRelation | 2 +- rt/share/html/Elements/SelectLang | 2 +- rt/share/html/Elements/SelectLinkType | 2 +- rt/share/html/Elements/SelectMatch | 2 +- rt/share/html/Elements/SelectNewTicketQueue | 2 +- rt/share/html/Elements/SelectOwner | 2 +- .../html/Elements/SelectOwnerAutocomplete | 2 +- rt/share/html/Elements/SelectOwnerDropdown | 2 +- rt/share/html/Elements/SelectPriority | 2 +- rt/share/html/Elements/SelectQueue | 18 +- rt/share/html/Elements/SelectResultsPerPage | 2 +- rt/share/html/Elements/SelectSortOrder | 2 +- rt/share/html/Elements/SelectStatus | 4 +- rt/share/html/Elements/SelectTicketSortBy | 2 +- rt/share/html/Elements/SelectTicketTypes | 2 +- rt/share/html/Elements/SelectTimeUnits | 2 +- rt/share/html/Elements/SelectTimezone | 2 +- rt/share/html/Elements/SelectUsers | 2 +- rt/share/html/Elements/SelectWatcherType | 2 +- rt/share/html/Elements/SetupSessionCookie | 2 +- rt/share/html/Elements/ShowCustomFieldBinary | 2 +- rt/share/html/Elements/ShowCustomFieldDate | 2 +- .../html/Elements/ShowCustomFieldDateTime | 2 +- rt/share/html/Elements/ShowCustomFieldImage | 2 +- rt/share/html/Elements/ShowCustomFieldText | 2 +- .../html/Elements/ShowCustomFieldWikitext | 2 +- rt/share/html/Elements/ShowCustomFields | 2 +- rt/share/html/Elements/ShowLink | 2 +- rt/share/html/Elements/ShowLinks | 2 +- rt/share/html/Elements/ShowMemberships | 2 +- rt/share/html/Elements/ShowRelationLabel | 2 +- rt/share/html/Elements/ShowReminders | 2 +- rt/share/html/Elements/ShowSearch | 7 +- rt/share/html/Elements/ShowUser | 2 +- rt/share/html/Elements/ShowUserConcise | 2 +- rt/share/html/Elements/ShowUserEmailFrequency | 2 +- rt/share/html/Elements/ShowUserVerbose | 2 +- rt/share/html/Elements/SimpleSearch | 2 +- rt/share/html/Elements/Submit | 2 +- rt/share/html/Elements/Tabs | 10 +- rt/share/html/Elements/TicketList | 2 +- rt/share/html/Elements/TitleBox | 2 +- rt/share/html/Elements/TitleBoxEnd | 2 +- rt/share/html/Elements/TitleBoxStart | 2 +- rt/share/html/Elements/ValidateCustomFields | 2 +- rt/share/html/Elements/WidgetBar | 2 +- .../Helpers/Autocomplete/CustomFieldValues | 2 +- rt/share/html/Helpers/Autocomplete/Groups | 4 +- rt/share/html/Helpers/Autocomplete/Owners | 2 +- rt/share/html/Helpers/Autocomplete/Users | 4 +- .../html/Helpers/Autocomplete/autohandler | 2 +- rt/share/html/Helpers/TicketHistory | 2 +- rt/share/html/Helpers/Toggle/ShowRequestor | 2 +- rt/share/html/Helpers/Toggle/TicketBookmark | 2 +- rt/share/html/Helpers/autohandler | 2 +- rt/share/html/Install/Basics.html | 2 +- rt/share/html/Install/DatabaseDetails.html | 14 +- rt/share/html/Install/DatabaseType.html | 2 +- rt/share/html/Install/Elements/Errors | 2 +- rt/share/html/Install/Elements/Wrapper | 2 +- rt/share/html/Install/Finish.html | 2 +- rt/share/html/Install/Global.html | 2 +- rt/share/html/Install/Initialize.html | 2 +- rt/share/html/Install/Sendmail.html | 2 +- rt/share/html/Install/autohandler | 2 +- rt/share/html/Install/index.html | 2 +- .../html/NoAuth/Helpers/CustomLogo/dhandler | 2 +- rt/share/html/NoAuth/Login.html | 2 +- rt/share/html/NoAuth/Logout.html | 2 +- rt/share/html/NoAuth/Reminder.html | 2 +- rt/share/html/NoAuth/RichText/autohandler | 2 +- rt/share/html/NoAuth/RichText/dhandler | 2 +- rt/share/html/NoAuth/css/aileron/InHeader | 2 +- rt/share/html/NoAuth/css/aileron/base.css | 2 +- rt/share/html/NoAuth/css/aileron/boxes.css | 2 +- rt/share/html/NoAuth/css/aileron/forms.css | 2 +- .../html/NoAuth/css/aileron/images/dhandler | 2 +- rt/share/html/NoAuth/css/aileron/layout.css | 2 +- rt/share/html/NoAuth/css/aileron/login.css | 2 +- rt/share/html/NoAuth/css/aileron/main.css | 2 +- rt/share/html/NoAuth/css/aileron/misc.css | 2 +- rt/share/html/NoAuth/css/aileron/msie.css | 2 +- rt/share/html/NoAuth/css/aileron/msie6.css | 26 +- rt/share/html/NoAuth/css/aileron/nav.css | 2 +- .../html/NoAuth/css/aileron/ticket-lists.css | 4 +- .../html/NoAuth/css/aileron/ticket-search.css | 2 +- rt/share/html/NoAuth/css/aileron/ticket.css | 2 +- rt/share/html/NoAuth/css/autohandler | 2 +- rt/share/html/NoAuth/css/ballard/InHeader | 4 +- rt/share/html/NoAuth/css/ballard/base.css | 2 +- rt/share/html/NoAuth/css/ballard/boxes.css | 2 +- .../html/NoAuth/css/ballard/images/dhandler | 2 +- rt/share/html/NoAuth/css/ballard/layout.css | 2 +- rt/share/html/NoAuth/css/ballard/main.css | 2 +- rt/share/html/NoAuth/css/ballard/misc.css | 2 +- rt/share/html/NoAuth/css/ballard/msie.css | 2 +- rt/share/html/NoAuth/css/ballard/msie6.css | 12 +- rt/share/html/NoAuth/css/ballard/nav.css | 3 +- .../html/NoAuth/css/ballard/ticket-lists.css | 5 +- .../html/NoAuth/css/ballard/ticket-search.css | 2 +- rt/share/html/NoAuth/css/ballard/ticket.css | 2 +- rt/share/html/NoAuth/css/base/admin.css | 2 +- rt/share/html/NoAuth/css/base/articles.css | 2 +- rt/share/html/NoAuth/css/base/collection.css | 2 +- rt/share/html/NoAuth/css/base/farbtastic.css | 47 -- rt/share/html/NoAuth/css/base/forms.css | 2 +- .../html/NoAuth/css/base/history-folding.css | 2 +- rt/share/html/NoAuth/css/base/jquery-ui.css | 2 +- rt/share/html/NoAuth/css/base/login.css | 2 +- rt/share/html/NoAuth/css/base/main.css | 2 +- rt/share/html/NoAuth/css/base/misc.css | 6 +- rt/share/html/NoAuth/css/base/nav.css | 2 +- rt/share/html/NoAuth/css/base/portlets.css | 2 +- .../html/NoAuth/css/base/rights-editor.css | 2 +- .../html/NoAuth/css/base/theme-editor.css | 2 +- rt/share/html/NoAuth/css/base/ticket-form.css | 2 +- rt/share/html/NoAuth/css/base/ticket.css | 2 +- rt/share/html/NoAuth/css/base/tools.css | 2 +- rt/share/html/NoAuth/css/dhandler | 2 +- rt/share/html/NoAuth/css/print.css | 2 +- rt/share/html/NoAuth/css/web2/InHeader | 2 +- rt/share/html/NoAuth/css/web2/base.css | 2 +- rt/share/html/NoAuth/css/web2/boxes.css | 2 +- rt/share/html/NoAuth/css/web2/images/dhandler | 2 +- rt/share/html/NoAuth/css/web2/layout.css | 2 +- rt/share/html/NoAuth/css/web2/main.css | 2 +- rt/share/html/NoAuth/css/web2/misc.css | 2 +- rt/share/html/NoAuth/css/web2/msie.css | 2 +- rt/share/html/NoAuth/css/web2/msie6.css | 7 +- rt/share/html/NoAuth/css/web2/nav.css | 2 +- .../html/NoAuth/css/web2/ticket-lists.css | 5 +- .../html/NoAuth/css/web2/ticket-search.css | 2 +- rt/share/html/NoAuth/css/web2/ticket.css | 2 +- rt/share/html/NoAuth/iCal/dhandler | 2 +- rt/share/html/NoAuth/images/autohandler | 2 +- rt/share/html/NoAuth/js/autohandler | 2 +- rt/share/html/NoAuth/js/cascaded.js | 100 ++- rt/share/html/NoAuth/js/combobox.js | 2 +- rt/share/html/NoAuth/js/dhandler | 2 +- rt/share/html/NoAuth/js/history-folding.js | 2 +- .../NoAuth/js/jquery-ui-patch-datepicker.js | 2 +- rt/share/html/NoAuth/js/jquery_noconflict.js | 2 +- rt/share/html/NoAuth/js/late.js | 2 +- rt/share/html/NoAuth/js/titlebox-state.js | 2 +- rt/share/html/NoAuth/js/userautocomplete.js | 20 +- rt/share/html/NoAuth/js/util.js | 33 +- rt/share/html/NoAuth/rss/dhandler | 2 +- rt/share/html/Prefs/MyRT.html | 2 +- rt/share/html/Prefs/Other.html | 2 +- rt/share/html/Prefs/Quicksearch.html | 2 +- rt/share/html/Prefs/Search.html | 2 +- rt/share/html/Prefs/SearchOptions.html | 2 +- .../html/REST/1.0/Forms/attachment/default | 2 +- .../html/REST/1.0/Forms/group/customfields | 2 +- rt/share/html/REST/1.0/Forms/group/default | 9 +- rt/share/html/REST/1.0/Forms/group/ns | 2 +- .../html/REST/1.0/Forms/queue/customfields | 2 +- rt/share/html/REST/1.0/Forms/queue/default | 9 +- rt/share/html/REST/1.0/Forms/queue/ns | 2 +- .../REST/1.0/Forms/queue/ticketcustomfields | 2 +- .../html/REST/1.0/Forms/ticket/attachments | 2 +- rt/share/html/REST/1.0/Forms/ticket/comment | 43 +- rt/share/html/REST/1.0/Forms/ticket/default | 44 +- rt/share/html/REST/1.0/Forms/ticket/history | 2 +- rt/share/html/REST/1.0/Forms/ticket/links | 2 +- rt/share/html/REST/1.0/Forms/ticket/merge | 2 +- rt/share/html/REST/1.0/Forms/ticket/take | 2 +- .../html/REST/1.0/Forms/transaction/default | 2 +- rt/share/html/REST/1.0/Forms/user/default | 9 +- rt/share/html/REST/1.0/Forms/user/ns | 2 +- rt/share/html/REST/1.0/NoAuth/mail-gateway | 2 +- rt/share/html/REST/1.0/autohandler | 2 +- rt/share/html/REST/1.0/dhandler | 2 +- rt/share/html/REST/1.0/logout | 2 +- rt/share/html/REST/1.0/search/dhandler | 2 +- rt/share/html/REST/1.0/search/ticket | 2 +- rt/share/html/REST/1.0/ticket/comment | 38 +- rt/share/html/REST/1.0/ticket/link | 2 +- rt/share/html/REST/1.0/ticket/merge | 2 +- rt/share/html/Search/Article.html | 2 +- rt/share/html/Search/Build.html | 10 +- rt/share/html/Search/Bulk.html | 6 +- rt/share/html/Search/Chart | 2 +- rt/share/html/Search/Chart.html | 14 +- rt/share/html/Search/Edit.html | 2 +- rt/share/html/Search/Elements/Article | 2 +- .../html/Search/Elements/BuildFormatString | 39 +- rt/share/html/Search/Elements/Chart | 2 +- rt/share/html/Search/Elements/ConditionRow | 2 +- rt/share/html/Search/Elements/DisplayOptions | 2 +- rt/share/html/Search/Elements/EditFormat | 2 +- rt/share/html/Search/Elements/EditQuery | 2 +- rt/share/html/Search/Elements/EditSearches | 2 +- rt/share/html/Search/Elements/EditSort | 2 +- rt/share/html/Search/Elements/Graph | 2 +- rt/share/html/Search/Elements/NewListActions | 2 +- rt/share/html/Search/Elements/PickBasics | 2 +- rt/share/html/Search/Elements/PickCFs | 14 +- rt/share/html/Search/Elements/PickCriteria | 7 +- rt/share/html/Search/Elements/ResultsRSSView | 2 +- rt/share/html/Search/Elements/SearchPrivacy | 2 +- .../html/Search/Elements/SearchesForObject | 2 +- rt/share/html/Search/Elements/SelectAndOr | 2 +- rt/share/html/Search/Elements/SelectChartType | 2 +- rt/share/html/Search/Elements/SelectGroup | 2 +- rt/share/html/Search/Elements/SelectGroupBy | 2 +- rt/share/html/Search/Elements/SelectLinks | 2 +- .../html/Search/Elements/SelectPersonType | 2 +- .../html/Search/Elements/SelectSearchObject | 2 +- .../Search/Elements/SelectSearchesForObjects | 2 +- rt/share/html/Search/Graph.html | 2 +- rt/share/html/Search/Results.html | 10 +- rt/share/html/Search/Results.rdf | 2 +- rt/share/html/Search/Results.tsv | 2 +- rt/share/html/Search/Simple.html | 4 +- .../html/SelfService/Article/Display.html | 2 +- rt/share/html/SelfService/Article/Search.html | 2 +- rt/share/html/SelfService/Article/autohandler | 2 +- rt/share/html/SelfService/Attachment/dhandler | 2 +- rt/share/html/SelfService/Closed.html | 2 +- rt/share/html/SelfService/Create.html | 2 +- .../html/SelfService/CreateTicketInQueue.html | 2 +- rt/share/html/SelfService/Display.html | 25 +- rt/share/html/SelfService/Elements/GotoTicket | 2 +- rt/share/html/SelfService/Elements/Header | 2 +- rt/share/html/SelfService/Elements/MyRequests | 2 +- .../html/SelfService/Elements/SearchArticle | 2 +- rt/share/html/SelfService/Error.html | 2 +- rt/share/html/SelfService/Prefs.html | 2 +- rt/share/html/SelfService/Update.html | 2 +- rt/share/html/SelfService/index.html | 2 +- .../Ticket/Attachment/WithHeaders/dhandler | 2 +- rt/share/html/Ticket/Attachment/dhandler | 2 +- rt/share/html/Ticket/Create.html | 12 +- rt/share/html/Ticket/Display.html | 4 +- rt/share/html/Ticket/Elements/AddAttachments | 4 +- rt/share/html/Ticket/Elements/AddWatchers | 2 +- rt/share/html/Ticket/Elements/Bookmark | 2 +- rt/share/html/Ticket/Elements/BulkLinks | 2 +- .../html/Ticket/Elements/ClickToShowHistory | 2 +- rt/share/html/Ticket/Elements/EditBasics | 5 +- .../html/Ticket/Elements/EditCustomFields | 2 +- rt/share/html/Ticket/Elements/EditDates | 2 +- rt/share/html/Ticket/Elements/EditPeople | 2 +- .../Elements/EditTransactionCustomFields | 2 +- rt/share/html/Ticket/Elements/EditWatchers | 2 +- rt/share/html/Ticket/Elements/FindAttachments | 2 +- .../html/Ticket/Elements/FindTransactions | 2 +- rt/share/html/Ticket/Elements/FoldStanzaJS | 2 +- .../html/Ticket/Elements/LoadTextAttachments | 2 +- rt/share/html/Ticket/Elements/PreviewScrips | 2 +- rt/share/html/Ticket/Elements/Reminders | 6 +- rt/share/html/Ticket/Elements/ShowAttachments | 2 +- rt/share/html/Ticket/Elements/ShowBasics | 2 +- .../html/Ticket/Elements/ShowCustomFields | 2 +- rt/share/html/Ticket/Elements/ShowDates | 2 +- .../html/Ticket/Elements/ShowDependencies | 2 +- rt/share/html/Ticket/Elements/ShowGnuPGStatus | 2 +- .../html/Ticket/Elements/ShowGroupMembers | 2 +- rt/share/html/Ticket/Elements/ShowHistory | 2 +- rt/share/html/Ticket/Elements/ShowMembers | 2 +- .../html/Ticket/Elements/ShowMessageHeaders | 2 +- .../html/Ticket/Elements/ShowMessageStanza | 2 +- rt/share/html/Ticket/Elements/ShowParents | 2 +- rt/share/html/Ticket/Elements/ShowPeople | 2 +- rt/share/html/Ticket/Elements/ShowPriority | 2 +- rt/share/html/Ticket/Elements/ShowQueue | 2 +- rt/share/html/Ticket/Elements/ShowRequestor | 2 +- .../Ticket/Elements/ShowRequestorExtraInfo | 2 +- .../html/Ticket/Elements/ShowRequestorTickets | 2 +- .../Elements/ShowRequestorTicketsActive | 2 +- .../Ticket/Elements/ShowRequestorTicketsAll | 2 +- .../Elements/ShowRequestorTicketsInactive | 2 +- .../Ticket/Elements/ShowSimplifiedRecipients | 2 +- rt/share/html/Ticket/Elements/ShowSummary | 6 +- rt/share/html/Ticket/Elements/ShowTime | 2 +- rt/share/html/Ticket/Elements/ShowTransaction | 2 +- .../Elements/ShowTransactionAttachments | 29 +- .../html/Ticket/Elements/ShowUpdateStatus | 8 +- rt/share/html/Ticket/Elements/ShowUserEntry | 2 +- rt/share/html/Ticket/Elements/UpdateCc | 2 +- rt/share/html/Ticket/Forward.html | 2 +- rt/share/html/Ticket/GnuPG.html | 2 +- .../Graphs/Elements/EditGraphProperties | 2 +- .../html/Ticket/Graphs/Elements/ShowGraph | 2 +- .../html/Ticket/Graphs/Elements/ShowLegends | 2 +- rt/share/html/Ticket/Graphs/dhandler | 2 +- rt/share/html/Ticket/Graphs/index.html | 2 +- rt/share/html/Ticket/History.html | 2 +- rt/share/html/Ticket/Modify.html | 2 +- rt/share/html/Ticket/ModifyAll.html | 2 +- rt/share/html/Ticket/ModifyDates.html | 2 +- rt/share/html/Ticket/ModifyLinks.html | 2 +- rt/share/html/Ticket/ModifyPeople.html | 2 +- rt/share/html/Ticket/Reminders.html | 2 +- rt/share/html/Ticket/ShowEmailRecord.html | 2 +- rt/share/html/Ticket/Update.html | 11 +- rt/share/html/Ticket/autohandler | 2 +- rt/share/html/Tools/MyDay.html | 2 +- rt/share/html/Tools/MyReminders.html | 2 +- rt/share/html/Tools/Offline.html | 2 +- rt/share/html/Tools/index.html | 2 +- rt/share/html/User/Prefs.html | 2 +- rt/share/html/Widgets/BulkEdit | 2 +- rt/share/html/Widgets/BulkProcess | 2 +- rt/share/html/Widgets/ComboBox | 2 +- rt/share/html/Widgets/FinalizeWidgetArguments | 2 +- rt/share/html/Widgets/Form/Boolean | 2 +- rt/share/html/Widgets/Form/Integer | 2 +- rt/share/html/Widgets/Form/Select | 2 +- rt/share/html/Widgets/Form/String | 2 +- rt/share/html/Widgets/SavedSearch | 2 +- rt/share/html/Widgets/SelectionBox | 2 +- rt/share/html/Widgets/TitleBox | 2 +- rt/share/html/Widgets/TitleBoxEnd | 2 +- rt/share/html/Widgets/TitleBoxStart | 2 +- rt/share/html/autohandler | 2 +- rt/share/html/dhandler | 2 +- rt/share/html/index.html | 2 +- rt/share/html/l | 2 +- rt/share/html/l_unsafe | 2 +- rt/share/html/m/_elements/footer | 4 +- rt/share/html/m/_elements/full_site_link | 2 +- rt/share/html/m/_elements/header | 2 +- rt/share/html/m/_elements/login | 2 +- rt/share/html/m/_elements/menu | 2 +- rt/share/html/m/_elements/raw_style | 2 +- rt/share/html/m/_elements/ticket_list | 2 +- rt/share/html/m/_elements/ticket_menu | 2 +- rt/share/html/m/_elements/wrapper | 2 +- rt/share/html/m/dhandler | 2 +- rt/share/html/m/index.html | 2 +- rt/share/html/m/logout | 2 +- rt/share/html/m/style.css | 2 +- rt/share/html/m/ticket/autohandler | 2 +- rt/share/html/m/ticket/create | 2 +- rt/share/html/m/ticket/history | 2 +- rt/share/html/m/ticket/reply | 2 +- rt/share/html/m/ticket/select_create_queue | 2 +- rt/share/html/m/ticket/show | 2 +- rt/share/html/m/tickets/search | 2 +- rt/t/api/action-createtickets.t | 2 +- rt/t/api/date.t | 30 +- rt/t/api/group.t | 22 +- rt/t/api/rights.t | 50 +- rt/t/api/rights_show_ticket.t | 1 - rt/t/api/searchbuilder.t | 26 +- rt/t/fts/indexed_mysql.t | 2 +- rt/t/fts/indexed_oracle.t | 2 +- rt/t/mail/dashboards.t | 22 +- rt/t/mail/digest-attributes.t | 4 +- rt/t/mail/disposition-outgoing.t | 2 +- rt/t/mail/gnupg-reverification.t | 4 +- rt/t/mail/mime_decoding.t | 12 +- rt/t/shredder/utils.pl | 11 +- rt/t/ticket/search_by_links.t | 10 +- rt/t/ticket/search_by_watcher.t | 73 +- rt/t/web/articles-links.t | 2 +- rt/t/web/case-sensitivity.t | 2 +- rt/t/web/cf_date.t | 8 +- rt/t/web/cf_datetime.t | 7 +- rt/t/web/charting.t | 17 + rt/t/web/command_line.t | 52 +- rt/t/web/crypt-gnupg.t | 4 +- rt/t/web/gnupg-select-keys-on-create.t | 8 +- rt/t/web/gnupg-select-keys-on-update.t | 7 +- rt/t/web/installer.t | 1 + rt/t/web/reminders.t | 8 +- rt/t/web/rest_cfs_with_same_name.t | 4 +- rt/t/web/self_service.t | 44 +- rt/t/web/user_update.t | 2 +- 878 files changed, 3086 insertions(+), 3283 deletions(-) create mode 100644 rt/lib/RT/I18N/de.pm rename rt/{sbin/rt-session-viewer => lib/RT/I18N/fr.pm} (50%) mode change 100755 => 100644 delete mode 100755 rt/sbin/rt-fulltext-indexer delete mode 100755 rt/sbin/rt-setup-fulltext-index delete mode 100755 rt/sbin/standalone_httpd diff --git a/rt/Makefile.in b/rt/Makefile.in index 2823d5474..89d4bf1e6 100644 --- a/rt/Makefile.in +++ b/rt/Makefile.in @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -351,7 +351,7 @@ dirs: install: testdeps config-install dirs files-install fixperms instruct -files-install: libs-install etc-install config-install bin-install sbin-install html-install local-install doc-install font-install po-install +files-install: libs-install etc-install config-install bin-install sbin-install html-install doc-install font-install po-install config-install: @COMMENT_INPLACE_LAYOUT@ $(INSTALL) -m 0755 -o $(BIN_OWNER) -g $(RTGROUP) -d $(DESTDIR)$(CONFIG_FILE_PATH) @@ -461,25 +461,6 @@ bin-install: @COMMENT_INPLACE_LAYOUT@ $(INSTALL) -o $(BIN_OWNER) -g $(RTGROUP) -m 0755 "bin/$$file" "$(DESTDIR)$(RT_BIN_PATH)/" ; \ @COMMENT_INPLACE_LAYOUT@ done -local-install: - -( cd local/html && find . -type d -print ) | while read dir ; do \ - $(INSTALL) -m 0755 -d "$(DESTDIR)$(MASON_LOCAL_HTML_PATH)/$$dir" ; \ - done - -( cd local/html && find . -type f -print ) | while read file ; do \ - $(INSTALL) -m 0644 "local/html/$$file" "$(DESTDIR)$(MASON_LOCAL_HTML_PATH)/$$file" ; \ - done - -( cd local/po && find . -type d -print ) | while read dir ; do \ - $(INSTALL) -m 0755 -d "$(DESTDIR)$(LOCAL_LEXICON_PATH)/$$dir" ; \ - done - -( cd local/po && find . -type f -print ) | while read file ; do \ - $(INSTALL) -m 0644 "local/po/$$file" "$(DESTDIR)$(LOCAL_LEXICON_PATH)/$$file" ; \ - done - -( cd local/etc && find . -type d -print ) | while read dir ; do \ - $(INSTALL) -m 0755 -d "$(DESTDIR)$(LOCAL_ETC_PATH)/$$dir" ; \ - done - -( cd local/etc && find . -type f -print ) | while read file ; do \ - $(INSTALL) -m 0644 "etc/$$file" "$(DESTDIR)$(LOCAL_ETC_PATH)/$$file" ; \ - done regenerate-catalogs: diff --git a/rt/README b/rt/README index 4cb3918f1..a397ca788 100755 --- a/rt/README +++ b/rt/README @@ -295,7 +295,7 @@ fix them. To report a bug, send email to . # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/bin/rt b/rt/bin/rt index ed87f84cf..b87d50d2e 100755 --- a/rt/bin/rt +++ b/rt/bin/rt @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -472,7 +472,7 @@ sub show { sub edit { my ($action) = @_; my (%data, $type, @objects); - my ($cl, $text, $edit, $input, $output); + my ($cl, $text, $edit, $input, $output, $content_type); use vars qw(%set %add %del); %set = %add = %del = (); @@ -486,6 +486,7 @@ sub edit { if (/^-e$/) { $edit = 1 } elsif (/^-i$/) { $input = 1 } elsif (/^-o$/) { $output = 1 } + elsif (/^-ct$/) { $content_type = shift @ARGV } elsif (/^-t$/) { $bad = 1, last unless defined($type = get_type_argument()); } @@ -655,24 +656,54 @@ sub edit { return 0; } + my @files; + @files = @{ vsplit($set{'attachment'}) } if exists $set{'attachment'}; + my $synerr = 0; EDIT: # We'll let the user edit the form before sending it to the server, # unless we have enough information to submit it non-interactively. + if ( $type && $type eq 'ticket' && $text !~ /^Content-Type:/m ) { + $text .= "Content-Type: $content_type\n" + if $content_type and $content_type ne "text/plain"; + } + if ($edit || (!$input && !$cl)) { - my $newtext = vi($text); + my ($newtext) = vi_form_while( + $text, + sub { + my ($text, $form) = @_; + return 1 unless exists $form->[2]{'Attachment'}; + + foreach my $f ( @{ vsplit($form->[2]{'Attachment'}) } ) { + return (0, "File '$f' doesn't exist") unless -f $f; + } + @files = @{ vsplit($form->[2]{'Attachment'}) }; + return 1; + }, + ); + return $newtext unless $newtext; # We won't resubmit a bad form unless it was changed. $text = ($synerr && $newtext eq $text) ? undef : $newtext; } + delete @data{ grep /^attachment_\d+$/, keys %data }; + my $i = 1; + foreach my $file (@files) { + $data{"attachment_$i"} = bless([ $file ], "Attachment"); + $i++; + } + if ($text) { my $r = submit("$REST/edit", {content => $text, %data}); if ($r->code == 409) { # If we submitted a bad form, we'll give the user a chance # to correct it and resubmit. if ($edit || (!$input && !$cl)) { - $text = $r->content; + my $content = $r->content . "\n"; + $content =~ s/^(?!#)/# /mg; + $text = $content . $text; $synerr = 1; goto EDIT; } @@ -738,7 +769,7 @@ sub setcommand { sub comment { my ($action) = @_; - my (%data, $id, @files, @bcc, @cc, $msg, $wtime, $edit); + my (%data, $id, @files, @bcc, @cc, $msg, $content_type, $wtime, $edit); my $bad = 0; while (@ARGV) { @@ -747,7 +778,7 @@ sub comment { if (/^-e$/) { $edit = 1; } - elsif (/^-[abcmw]$/) { + elsif (/^-(?:[abcmw]|ct)$/) { unless (@ARGV) { whine "No argument specified with $_."; $bad = 1; last; @@ -760,6 +791,9 @@ sub comment { } push @files, shift @ARGV; } + elsif (/-ct/) { + $content_type = shift @ARGV; + } elsif (/-([bc])/) { my $a = $_ eq "-b" ? \@bcc : \@cc; @$a = split /\s*,\s*/, shift @ARGV; @@ -771,7 +805,6 @@ sub comment { while () { $msg .= $_ } } } - elsif (/-w/) { $wtime = shift @ARGV } } elsif (!$id && m|^(?:ticket/)?($idlist)$|) { @@ -793,7 +826,7 @@ sub comment { my $form = [ "", - [ "Ticket", "Action", "Cc", "Bcc", "Attachment", "TimeWorked", "Text" ], + [ "Ticket", "Action", "Cc", "Bcc", "Attachment", "TimeWorked", "Content-Type", "Text" ], { Ticket => $id, Action => $action, @@ -801,6 +834,7 @@ sub comment { Bcc => [ @bcc ], Attachment => [ @files ], TimeWorked => $wtime || '', + 'Content-Type' => $content_type || 'text/plain', Text => $msg || '', Status => '' } @@ -809,30 +843,19 @@ sub comment { my $text = Form::compose([ $form ]); if ($edit || !$msg) { - my $error = 0; - my ($c, $o, $k, $e); - - do { - my $ntext = vi($text); - return if ($error && $ntext eq $text); - $text = $ntext; - $form = Form::parse($text); - $error = 0; - - ($c, $o, $k, $e) = @{ $form->[0] }; - if ($e) { - $error = 1; - $c = "# Syntax error."; - goto NEXT; - } - elsif (!@$o) { - return 0; - } - @files = @{ vsplit($k->{Attachment}) }; - - NEXT: - $text = Form::compose([[$c, $o, $k, $e]]); - } while ($error); + my ($tmp) = vi_form_while( + $text, + sub { + my ($text, $form) = @_; + foreach my $f ( @{ vsplit($form->[2]{'Attachment'}) } ) { + return (0, "File '$f' doesn't exist") unless -f $f; + } + @files = @{ vsplit($form->[2]{'Attachment'}) }; + return 1; + }, + ); + return $tmp unless $tmp; + $text = $tmp; } my $i = 1; @@ -1466,6 +1489,43 @@ sub read_passwd { return $passwd; } +sub vi_form_while { + my $text = shift; + my $cb = shift; + + my $error = 0; + my ($c, $o, $k, $e); + do { + my $ntext = vi($text); + return undef if ($error && $ntext eq $text); + + $text = $ntext; + + my $form = Form::parse($text); + $error = 0; + ($c, $o, $k, $e) = @{ $form->[0] }; + if ( $e ) { + $error = 1; + $c = "# Syntax error."; + goto NEXT; + } + elsif (!@$o) { + return 0; + } + + my ($status, $msg) = $cb->( $text, [$c, $o, $k, $e] ); + unless ( $status ) { + $error = 1; + $c = "# $msg"; + } + + NEXT: + $text = Form::compose([[$c, $o, $k, $e]]); + } while ($error); + + return $text; +} + sub vi { my ($text) = @_; my $editor = $ENV{EDITOR} || $ENV{VISUAL} || "vi"; @@ -1525,15 +1585,15 @@ sub vsplit { } push @words, $s; } - elsif ( $a =~ /^q{/ ) { + elsif ( $a =~ /^q\{/ ) { my $s = $a; - while ( $a !~ /}$/ ) { + while ( $a !~ /\}$/ ) { ( $a, $b ) = split /\s*,\s*/, $b, 2; $s .= ',' . $a; } - $s =~ s/^q{/'/; - $s =~ s/}/'/; + $s =~ s/^q\{/'/; + $s =~ s/\}/'/; push @words, $s; } else { @@ -2273,12 +2333,14 @@ Text: -S var=val Submits the specified variable with the request. -t type Specifies object type. + -ct content-type Specifies content type of message(tickets only). Examples: # Interactive (starts $EDITOR with a form). rt edit ticket/3 rt create -t ticket + rt create -t ticket -ct text/html # Non-interactive. rt edit ticket/1-3 add cc=foo@example.com set priority=3 due=tomorrow @@ -2310,6 +2372,7 @@ Text: Options: -m Specify comment text. + -ct Specify content-type of comment text. -a Attach a file to the comment. (May be used more than once to attach multiple files.) -c A comma-separated list of Cc addresses. diff --git a/rt/bin/rt-crontool.in b/rt/bin/rt-crontool.in index 5498da751..e2026985a 100644 --- a/rt/bin/rt-crontool.in +++ b/rt/bin/rt-crontool.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/bin/rt-mailgate.in b/rt/bin/rt-mailgate.in index be1c03224..df2ab5a8b 100644 --- a/rt/bin/rt-mailgate.in +++ b/rt/bin/rt-mailgate.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/bin/rt.in b/rt/bin/rt.in index 4a3eadadf..480f178b4 100644 --- a/rt/bin/rt.in +++ b/rt/bin/rt.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -472,7 +472,7 @@ sub show { sub edit { my ($action) = @_; my (%data, $type, @objects); - my ($cl, $text, $edit, $input, $output); + my ($cl, $text, $edit, $input, $output, $content_type); use vars qw(%set %add %del); %set = %add = %del = (); @@ -486,6 +486,7 @@ sub edit { if (/^-e$/) { $edit = 1 } elsif (/^-i$/) { $input = 1 } elsif (/^-o$/) { $output = 1 } + elsif (/^-ct$/) { $content_type = shift @ARGV } elsif (/^-t$/) { $bad = 1, last unless defined($type = get_type_argument()); } @@ -655,24 +656,54 @@ sub edit { return 0; } + my @files; + @files = @{ vsplit($set{'attachment'}) } if exists $set{'attachment'}; + my $synerr = 0; EDIT: # We'll let the user edit the form before sending it to the server, # unless we have enough information to submit it non-interactively. + if ( $type && $type eq 'ticket' && $text !~ /^Content-Type:/m ) { + $text .= "Content-Type: $content_type\n" + if $content_type and $content_type ne "text/plain"; + } + if ($edit || (!$input && !$cl)) { - my $newtext = vi($text); + my ($newtext) = vi_form_while( + $text, + sub { + my ($text, $form) = @_; + return 1 unless exists $form->[2]{'Attachment'}; + + foreach my $f ( @{ vsplit($form->[2]{'Attachment'}) } ) { + return (0, "File '$f' doesn't exist") unless -f $f; + } + @files = @{ vsplit($form->[2]{'Attachment'}) }; + return 1; + }, + ); + return $newtext unless $newtext; # We won't resubmit a bad form unless it was changed. $text = ($synerr && $newtext eq $text) ? undef : $newtext; } + delete @data{ grep /^attachment_\d+$/, keys %data }; + my $i = 1; + foreach my $file (@files) { + $data{"attachment_$i"} = bless([ $file ], "Attachment"); + $i++; + } + if ($text) { my $r = submit("$REST/edit", {content => $text, %data}); if ($r->code == 409) { # If we submitted a bad form, we'll give the user a chance # to correct it and resubmit. if ($edit || (!$input && !$cl)) { - $text = $r->content; + my $content = $r->content . "\n"; + $content =~ s/^(?!#)/# /mg; + $text = $content . $text; $synerr = 1; goto EDIT; } @@ -738,7 +769,7 @@ sub setcommand { sub comment { my ($action) = @_; - my (%data, $id, @files, @bcc, @cc, $msg, $wtime, $edit); + my (%data, $id, @files, @bcc, @cc, $msg, $content_type, $wtime, $edit); my $bad = 0; while (@ARGV) { @@ -747,7 +778,7 @@ sub comment { if (/^-e$/) { $edit = 1; } - elsif (/^-[abcmw]$/) { + elsif (/^-(?:[abcmw]|ct)$/) { unless (@ARGV) { whine "No argument specified with $_."; $bad = 1; last; @@ -760,6 +791,9 @@ sub comment { } push @files, shift @ARGV; } + elsif (/-ct/) { + $content_type = shift @ARGV; + } elsif (/-([bc])/) { my $a = $_ eq "-b" ? \@bcc : \@cc; @$a = split /\s*,\s*/, shift @ARGV; @@ -771,7 +805,6 @@ sub comment { while () { $msg .= $_ } } } - elsif (/-w/) { $wtime = shift @ARGV } } elsif (!$id && m|^(?:ticket/)?($idlist)$|) { @@ -793,7 +826,7 @@ sub comment { my $form = [ "", - [ "Ticket", "Action", "Cc", "Bcc", "Attachment", "TimeWorked", "Text" ], + [ "Ticket", "Action", "Cc", "Bcc", "Attachment", "TimeWorked", "Content-Type", "Text" ], { Ticket => $id, Action => $action, @@ -801,6 +834,7 @@ sub comment { Bcc => [ @bcc ], Attachment => [ @files ], TimeWorked => $wtime || '', + 'Content-Type' => $content_type || 'text/plain', Text => $msg || '', Status => '' } @@ -809,30 +843,19 @@ sub comment { my $text = Form::compose([ $form ]); if ($edit || !$msg) { - my $error = 0; - my ($c, $o, $k, $e); - - do { - my $ntext = vi($text); - return if ($error && $ntext eq $text); - $text = $ntext; - $form = Form::parse($text); - $error = 0; - - ($c, $o, $k, $e) = @{ $form->[0] }; - if ($e) { - $error = 1; - $c = "# Syntax error."; - goto NEXT; - } - elsif (!@$o) { - return 0; - } - @files = @{ vsplit($k->{Attachment}) }; - - NEXT: - $text = Form::compose([[$c, $o, $k, $e]]); - } while ($error); + my ($tmp) = vi_form_while( + $text, + sub { + my ($text, $form) = @_; + foreach my $f ( @{ vsplit($form->[2]{'Attachment'}) } ) { + return (0, "File '$f' doesn't exist") unless -f $f; + } + @files = @{ vsplit($form->[2]{'Attachment'}) }; + return 1; + }, + ); + return $tmp unless $tmp; + $text = $tmp; } my $i = 1; @@ -1466,6 +1489,43 @@ sub read_passwd { return $passwd; } +sub vi_form_while { + my $text = shift; + my $cb = shift; + + my $error = 0; + my ($c, $o, $k, $e); + do { + my $ntext = vi($text); + return undef if ($error && $ntext eq $text); + + $text = $ntext; + + my $form = Form::parse($text); + $error = 0; + ($c, $o, $k, $e) = @{ $form->[0] }; + if ( $e ) { + $error = 1; + $c = "# Syntax error."; + goto NEXT; + } + elsif (!@$o) { + return 0; + } + + my ($status, $msg) = $cb->( $text, [$c, $o, $k, $e] ); + unless ( $status ) { + $error = 1; + $c = "# $msg"; + } + + NEXT: + $text = Form::compose([[$c, $o, $k, $e]]); + } while ($error); + + return $text; +} + sub vi { my ($text) = @_; my $editor = $ENV{EDITOR} || $ENV{VISUAL} || "vi"; @@ -1525,15 +1585,15 @@ sub vsplit { } push @words, $s; } - elsif ( $a =~ /^q{/ ) { + elsif ( $a =~ /^q\{/ ) { my $s = $a; - while ( $a !~ /}$/ ) { + while ( $a !~ /\}$/ ) { ( $a, $b ) = split /\s*,\s*/, $b, 2; $s .= ',' . $a; } - $s =~ s/^q{/'/; - $s =~ s/}/'/; + $s =~ s/^q\{/'/; + $s =~ s/\}/'/; push @words, $s; } else { @@ -2273,12 +2333,14 @@ Text: -S var=val Submits the specified variable with the request. -t type Specifies object type. + -ct content-type Specifies content type of message(tickets only). Examples: # Interactive (starts $EDITOR with a form). rt edit ticket/3 rt create -t ticket + rt create -t ticket -ct text/html # Non-interactive. rt edit ticket/1-3 add cc=foo@example.com set priority=3 due=tomorrow @@ -2310,6 +2372,7 @@ Text: Options: -m Specify comment text. + -ct Specify content-type of comment text. -a Attach a file to the comment. (May be used more than once to attach multiple files.) -c A comma-separated list of Cc addresses. diff --git a/rt/configure b/rt/configure index d37616745..3abb324ba 100755 --- a/rt/configure +++ b/rt/configure @@ -1,7 +1,7 @@ #! /bin/sh # From configure.ac Revision. # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for RT rt-4.0.13. +# Generated by GNU Autoconf 2.68 for RT rt-4.0.19. # # Report bugs to . # @@ -560,8 +560,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='RT' PACKAGE_TARNAME='rt' -PACKAGE_VERSION='rt-4.0.13' -PACKAGE_STRING='RT rt-4.0.13' +PACKAGE_VERSION='rt-4.0.19' +PACKAGE_STRING='RT rt-4.0.19' PACKAGE_BUGREPORT='rt-bugs@bestpractical.com' PACKAGE_URL='' @@ -1311,7 +1311,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures RT rt-4.0.13 to adapt to many kinds of systems. +\`configure' configures RT rt-4.0.19 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1372,7 +1372,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of RT rt-4.0.13:";; + short | recursive ) echo "Configuration of RT rt-4.0.19:";; esac cat <<\_ACEOF @@ -1496,7 +1496,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -RT configure rt-4.0.13 +RT configure rt-4.0.19 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1597,7 +1597,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by RT $as_me rt-4.0.13, which was +It was created by RT $as_me rt-4.0.19, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -1954,7 +1954,7 @@ rt_version_major=4 rt_version_minor=0 -rt_version_patch=13 +rt_version_patch=19 test "x$rt_version_major" = 'x' && rt_version_major=0 test "x$rt_version_minor" = 'x' && rt_version_minor=0 @@ -3923,7 +3923,7 @@ RT_LOG_PATH_R=${exp_logfiledir} fi -ac_config_files="$ac_config_files etc/upgrade/3.8-branded-queues-extension etc/upgrade/3.8-ical-extension etc/upgrade/split-out-cf-categories etc/upgrade/generate-rtaddressregexp etc/upgrade/upgrade-articles etc/upgrade/vulnerable-passwords sbin/rt-attributes-viewer sbin/rt-preferences-viewer sbin/rt-session-viewer sbin/rt-dump-metadata sbin/rt-setup-database sbin/rt-test-dependencies sbin/rt-email-digest sbin/rt-email-dashboards sbin/rt-clean-sessions sbin/rt-shredder sbin/rt-validator sbin/rt-validate-aliases sbin/rt-email-group-admin sbin/rt-server sbin/rt-server.fcgi sbin/standalone_httpd sbin/rt-setup-fulltext-index sbin/rt-fulltext-indexer bin/rt-crontool bin/rt-mailgate bin/rt" +ac_config_files="$ac_config_files etc/upgrade/3.8-ical-extension etc/upgrade/split-out-cf-categories etc/upgrade/generate-rtaddressregexp etc/upgrade/upgrade-articles etc/upgrade/vulnerable-passwords sbin/rt-attributes-viewer sbin/rt-preferences-viewer sbin/rt-session-viewer sbin/rt-dump-metadata sbin/rt-setup-database sbin/rt-test-dependencies sbin/rt-email-digest sbin/rt-email-dashboards sbin/rt-clean-sessions sbin/rt-shredder sbin/rt-validator sbin/rt-validate-aliases sbin/rt-email-group-admin sbin/rt-server sbin/rt-server.fcgi sbin/standalone_httpd sbin/rt-setup-fulltext-index sbin/rt-fulltext-indexer bin/rt-crontool bin/rt-mailgate bin/rt" ac_config_files="$ac_config_files Makefile etc/RT_Config.pm lib/RT/Generated.pm t/data/configs/apache2.2+mod_perl.conf t/data/configs/apache2.2+fastcgi.conf" @@ -4482,7 +4482,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by RT $as_me rt-4.0.13, which was +This file was extended by RT $as_me rt-4.0.19, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4535,7 +4535,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -RT config.status rt-4.0.13 +RT config.status rt-4.0.19 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" @@ -4646,7 +4646,6 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 for ac_config_target in $ac_config_targets do case $ac_config_target in - "etc/upgrade/3.8-branded-queues-extension") CONFIG_FILES="$CONFIG_FILES etc/upgrade/3.8-branded-queues-extension" ;; "etc/upgrade/3.8-ical-extension") CONFIG_FILES="$CONFIG_FILES etc/upgrade/3.8-ical-extension" ;; "etc/upgrade/split-out-cf-categories") CONFIG_FILES="$CONFIG_FILES etc/upgrade/split-out-cf-categories" ;; "etc/upgrade/generate-rtaddressregexp") CONFIG_FILES="$CONFIG_FILES etc/upgrade/generate-rtaddressregexp" ;; @@ -5098,8 +5097,6 @@ which seems to be undefined. Please make sure it is defined" >&2;} case $ac_file$ac_mode in - "etc/upgrade/3.8-branded-queues-extension":F) chmod ug+x $ac_file - ;; "etc/upgrade/3.8-ical-extension":F) chmod ug+x $ac_file ;; "etc/upgrade/split-out-cf-categories":F) chmod ug+x $ac_file diff --git a/rt/configure.ac b/rt/configure.ac index a168e285c..47ec7c954 100644 --- a/rt/configure.ac +++ b/rt/configure.ac @@ -407,7 +407,6 @@ dnl Configure the output files, and generate them. dnl Binaries that should be +x AC_CONFIG_FILES([ - etc/upgrade/3.8-branded-queues-extension etc/upgrade/3.8-ical-extension etc/upgrade/split-out-cf-categories etc/upgrade/generate-rtaddressregexp diff --git a/rt/devel/tools/change-loc-msgstr b/rt/devel/tools/change-loc-msgstr index 9eb9ac697..bd1892a85 100644 --- a/rt/devel/tools/change-loc-msgstr +++ b/rt/devel/tools/change-loc-msgstr @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/devel/tools/extract-message-catalog b/rt/devel/tools/extract-message-catalog index b95c99047..0afec0b2c 100644 --- a/rt/devel/tools/extract-message-catalog +++ b/rt/devel/tools/extract-message-catalog @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/devel/tools/factory b/rt/devel/tools/factory index 5f9c49b46..5d05d0853 100644 --- a/rt/devel/tools/factory +++ b/rt/devel/tools/factory @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/devel/tools/license_tag b/rt/devel/tools/license_tag index 05bcf83e9..4cf09174a 100644 --- a/rt/devel/tools/license_tag +++ b/rt/devel/tools/license_tag @@ -5,7 +5,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -54,7 +54,7 @@ my $LICENSE = <<'EOL'; COPYRIGHT: -This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC (Except where explicitly superseded by other copyright notices) @@ -103,12 +103,15 @@ use File::Find; my @MAKE = qw(Makefile); File::Find::find({ no_chdir => 1, wanted => \&tag_pm}, 'lib'); -File::Find::find({ no_chdir => 1, wanted => \&tag_mason}, 'share/html'); -File::Find::find({ no_chdir => 1, wanted => \&tag_script}, 'sbin'); -File::Find::find({ no_chdir => 1, wanted => \&tag_script}, 'bin'); -File::Find::find({ no_chdir => 1, wanted => \&tag_script}, 'etc/upgrade'); -File::Find::find({ no_chdir => 1, wanted => \&tag_script}, 'devel/tools'); -tag_makefile ('Makefile.in'); +for my $masondir (qw( html share/html )) { + next unless -d $masondir; + File::Find::find({ no_chdir => 1, wanted => \&tag_mason}, $masondir); +} +for my $bindir (qw( sbin bin etc/upgrade devel/tools )) { + next unless -d $bindir; + File::Find::find({ no_chdir => 1, wanted => \&tag_script}, $bindir); +} +tag_makefile ('Makefile.in') if -f 'Makefile.in'; tag_makefile ('README'); @@ -125,16 +128,16 @@ sub tag_mason { my $pmlic = $LICENSE; $pmlic =~ s/^/%# /mg; $pmlic =~ s/\s*$//mg; - if ($file =~ /^%# BEGIN BPS TAGGED BLOCK {{{/ms) { + if ($file =~ /^%# BEGIN BPS TAGGED BLOCK \{\{\{/ms) { print "has license section"; - $file =~ s/^%# BEGIN BPS TAGGED BLOCK {{{(.*?)%# END BPS TAGGED BLOCK }}}/%# BEGIN BPS TAGGED BLOCK {{{\n$pmlic\n%# END BPS TAGGED BLOCK }}}/ms; + $file =~ s/^%# BEGIN BPS TAGGED BLOCK \{\{\{(.*?)%# END BPS TAGGED BLOCK \}\}\}/%# BEGIN BPS TAGGED BLOCK {{{\n$pmlic\n%# END BPS TAGGED BLOCK }}}/ms; } else { print "no license section"; $file ="%# BEGIN BPS TAGGED BLOCK {{{\n$pmlic\n%# END BPS TAGGED BLOCK }}}\n". $file; } - $file =~ s/%# END BPS TAGGED BLOCK }}}(\n+)/%# END BPS TAGGED BLOCK }}}\n/mg; + $file =~ s/%# END BPS TAGGED BLOCK \}\}\}(\n+)/%# END BPS TAGGED BLOCK }}}\n/mg; print "\n"; @@ -158,16 +161,16 @@ sub tag_makefile { my $pmlic = $LICENSE; $pmlic =~ s/^/# /mg; $pmlic =~ s/\s*$//mg; - if ($file =~ /^# BEGIN BPS TAGGED BLOCK {{{/ms) { + if ($file =~ /^# BEGIN BPS TAGGED BLOCK \{\{\{/ms) { print "has license section"; - $file =~ s/^# BEGIN BPS TAGGED BLOCK {{{(.*?)# END BPS TAGGED BLOCK }}}/# BEGIN BPS TAGGED BLOCK {{{\n$pmlic\n# END BPS TAGGED BLOCK }}}/ms; + $file =~ s/^# BEGIN BPS TAGGED BLOCK \{\{\{(.*?)# END BPS TAGGED BLOCK \}\}\}/# BEGIN BPS TAGGED BLOCK {{{\n$pmlic\n# END BPS TAGGED BLOCK }}}/ms; } else { print "no license section"; $file ="# BEGIN BPS TAGGED BLOCK {{{\n$pmlic\n# END BPS TAGGED BLOCK }}}\n". $file; } - $file =~ s/# END BPS TAGGED BLOCK }}}(\n+)/# END BPS TAGGED BLOCK }}}\n/mg; + $file =~ s/# END BPS TAGGED BLOCK \}\}\}(\n+)/# END BPS TAGGED BLOCK }}}\n/mg; print "\n"; @@ -182,7 +185,7 @@ sub tag_makefile { sub tag_pm { my $pm = $_; - next unless $pm =~ /\.pm/s; + return unless $pm =~ /\.pm/s; open( FILE, '<', $pm ) or die "Failed to open $pm"; my $file = (join "", ); close (FILE); @@ -192,16 +195,16 @@ sub tag_pm { my $pmlic = $LICENSE; $pmlic =~ s/^/# /mg; $pmlic =~ s/\s*$//mg; - if ($file =~ /^# BEGIN BPS TAGGED BLOCK {{{/ms) { + if ($file =~ /^# BEGIN BPS TAGGED BLOCK \{\{\{/ms) { print "has license section"; - $file =~ s/^# BEGIN BPS TAGGED BLOCK {{{(.*?)# END BPS TAGGED BLOCK }}}/# BEGIN BPS TAGGED BLOCK {{{\n$pmlic\n# END BPS TAGGED BLOCK }}}/ms; + $file =~ s/^# BEGIN BPS TAGGED BLOCK \{\{\{(.*?)# END BPS TAGGED BLOCK \}\}\}/# BEGIN BPS TAGGED BLOCK {{{\n$pmlic\n# END BPS TAGGED BLOCK }}}/ms; } else { print "no license section"; $file ="# BEGIN BPS TAGGED BLOCK {{{\n$pmlic\n# END BPS TAGGED BLOCK }}}\n". $file; } - $file =~ s/# END BPS TAGGED BLOCK }}}(\n+)/# END BPS TAGGED BLOCK }}}\n\n/mg; + $file =~ s/# END BPS TAGGED BLOCK \}\}\}(\n+)/# END BPS TAGGED BLOCK }}}\n\n/mg; print "\n"; @@ -226,9 +229,9 @@ sub tag_script { my $pmlic = $LICENSE; $pmlic =~ s/^/# /msg; $pmlic =~ s/\s*$//mg; - if ($file =~ /^# BEGIN BPS TAGGED BLOCK {{{/ms) { + if ($file =~ /^# BEGIN BPS TAGGED BLOCK \{\{\{/ms) { print "has license section"; - $file =~ s/^# BEGIN BPS TAGGED BLOCK {{{(.*?)# END BPS TAGGED BLOCK }}}/# BEGIN BPS TAGGED BLOCK {{{\n$pmlic\n# END BPS TAGGED BLOCK }}}/ms; + $file =~ s/^# BEGIN BPS TAGGED BLOCK \{\{\{(.*?)# END BPS TAGGED BLOCK \}\}\}/# BEGIN BPS TAGGED BLOCK {{{\n$pmlic\n# END BPS TAGGED BLOCK }}}/ms; } else { @@ -240,7 +243,7 @@ sub tag_script { } } - $file =~ s/# END BPS TAGGED BLOCK }}}(\n+)/# END BPS TAGGED BLOCK }}}\n/mg; + $file =~ s/# END BPS TAGGED BLOCK \}\}\}(\n+)/# END BPS TAGGED BLOCK }}}\n/mg; print "\n"; diff --git a/rt/devel/tools/merge-rosetta.pl b/rt/devel/tools/merge-rosetta.pl index a0ef3e2a7..ec587add2 100644 --- a/rt/devel/tools/merge-rosetta.pl +++ b/rt/devel/tools/merge-rosetta.pl @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/devel/tools/rt-attributes-editor b/rt/devel/tools/rt-attributes-editor index d3443177a..92998a472 100644 --- a/rt/devel/tools/rt-attributes-editor +++ b/rt/devel/tools/rt-attributes-editor @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/devel/tools/tweak-template-locstring b/rt/devel/tools/tweak-template-locstring index d77ef9e94..ca44d39db 100644 --- a/rt/devel/tools/tweak-template-locstring +++ b/rt/devel/tools/tweak-template-locstring @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/docs/UPGRADING-3.8 b/rt/docs/UPGRADING-3.8 index cfe01dfbf..ba7177764 100644 --- a/rt/docs/UPGRADING-3.8 +++ b/rt/docs/UPGRADING-3.8 @@ -168,11 +168,7 @@ Change this line to read: been assigned an ID of { $Ticket->SubjectTag }." If you were previously using RT::Extension::BrandedQueues, you MUST uninstall -it before upgrading. In addition, you must run the -'etc/upgrade/3.8-branded-queues-extension' perl script. This will -convert the extension's configuration into the new format. Finally, in -templates where you were using the Tag method ($Ticket->QueueObj->Tag), -you will need to replace it with $Ticket->SubjectTag +it before upgrading. RT::Action::LinearEscalate extension has been integrated into core, so you MUST uninstall it before upgrading. diff --git a/rt/docs/UPGRADING-4.0 b/rt/docs/UPGRADING-4.0 index 687dfbc61..63dd2eecc 100644 --- a/rt/docs/UPGRADING-4.0 +++ b/rt/docs/UPGRADING-4.0 @@ -126,6 +126,14 @@ database level. =back +=head2 Ticket content searches (full text search) + +Since 4.0.0, RT's ticket content search is disabled by default because of +performance issues when used without full text indexing. For details on how to +re-enable it with (or without) full text indexing, see +F. + + =head1 UPGRADING FROM 4.0.5 AND EARLIER @@ -189,3 +197,52 @@ these types before insertion. Site-specific custom types (anything but ticket, reminder or approval) are not affected by these changes. + +=head1 UPGRADING FROM 4.0.13 AND EARLIER + +=head2 Outgoing mail From: header + +The "Default" key of the C<$OverrideOutgoingMailFrom> config option now, +as previously documented, only applies when no ticket is involved. +Previously it was also used when a ticket was involved but the +associated queue had no specific correspond address. In such cases the +global correspond address is now used. + +The config option C<$SetOutgoingMailFrom> now accepts an email address +as a value which will act as a global default. This covers the simple +case of sending all bounces to a specific address, without the previous +solution of resorting to defining all queues in +$OverrideOutgoingMailFrom. Any definitions in the Override option +(including Default) still take precedence. See +L for more information. + +=head2 Reminder statuses + +New reminders are now created in the "reminder_on_open" status defined in your +lifecycles. For the default lifecycle, this means reminders will start as +"open" instead of "new". This change is for consistency when a completed +reminder is reopened at a later date. If you use custom lifecycles and added +further transition restrictions, you may need to adjust the L<"reminder_on_open" +setting|RT_Config/reminder_on_open> in your lifecycles. + +=head2 Bookmarks + +Previously, the list of Bookmarks on your homepage was unlimited (if you +had 100 bookmarked tickets, you would see a 100 item list on your RT at +a Glance). 'Bookmarked Tickets' now uses the same size limits as any +other search on your homepage. This can be customized using the 'Rows +per box' setting on your RT at a Glance configuration page. + +=head2 PostgreSQL 9.2 + +If you are upgrading an RT from 3.8 (or earlier) to 4.0 on PostgreSQL +9.2, you should make sure that you have installed DBD::Pg 2.19.3 or +higher. If you start your upgrade without installing a recent-enough +version of DBD::Pg RT will stop the upgrade during the 3.9.8 step and +remind you to upgrade DBD::Pg. If this happens, you can re-start your +upgrade by running: + + ./sbin/rt-setup-database --action insert --datadir etc/upgrade/3.9.8/ + +Followed by re-running make upgrade-database and answering 3.9.8 when +prompted for which RT version you're upgrading from. diff --git a/rt/etc/RT_Config.pm.in b/rt/etc/RT_Config.pm.in index 36a4c3014..a52965a9d 100644 --- a/rt/etc/RT_Config.pm.in +++ b/rt/etc/RT_Config.pm.in @@ -388,9 +388,10 @@ already, you can generate a naive first pass regexp by using: perl etc/upgrade/generate-rtaddressregexp -If left blank, RT will generate a regexp for you, based on your -comment and correspond address settings on your queues; this comes at -a small cost in start-up speed. +If left blank, RT will compare each address to your configured +C<$CorrespondAddress> and C<$CommentAddress> before searching for a +Queue configured with a matching "Reply Address" or "Comment Address" +on the Queue Admin page. =cut @@ -524,6 +525,15 @@ world, you can set C<$MailCommand> to 'testfile' which writes all mail to a temporary file. RT will log the location of the temporary file so you can extract mail from it afterward. +On shutdown, RT will clean up the temporary file created when using +the 'testfile' option. If testing while the RT server is still running, +you can find the files in the location noted in the log file. If you run +a tool like C however, or if you look after stopping the server, +the files will have been deleted when the process completed. If you need to +keep the files for development or debugging, you can manually set +C<< UNLINK => 0 >> where the testfile config is processed in +F. + =cut #Set($MailCommand, "sendmailpipe"); @@ -537,6 +547,12 @@ Correspond mail address of the ticket's queue. Warning: If you use this setting, bounced mails will appear to be incoming mail to the system, thus creating new tickets. +If the value contains an C<@>, it is assumed to be an email address and used as +a global envelope sender. Expected usage in this case is to simply set the +same envelope sender on all mail from RT, without defining +C<$OverrideOutgoingMailFrom>. If you do define C<$OverrideOutgoingMailFrom>, +anything specified there overrides the global value (including Default). + This option only works if C<$MailCommand> is set to 'sendmailpipe'. =cut @@ -1220,7 +1236,7 @@ Set ($DefaultSearchResultFormat, qq{ OwnerName, Priority, '__NEWLINE__', - '', + '__NBSP__', '__Requestors__', '__CustomerTags__', '__CreatedRelative__', @@ -1733,9 +1749,11 @@ Set(@Active_MakeClicky, qw()); If C<$ParseNewMessageForTicketCcs> is set to 1, RT will attempt to divine Ticket 'Cc' watchers from the To and Cc lines of incoming -messages. Be forewarned that if you have I addresses which forward -mail to RT automatically and you enable this option without modifying -C<$RTAddressRegexp> below, you will get yourself into a heap of trouble. +messages that create new Tickets. This option does not apply to replies +or comments on existing Tickets. Be forewarned that if you have I +addresses which forward mail to RT automatically and you enable this +option without modifying C<$RTAddressRegexp> below, you will get +yourself into a heap of trouble. =cut @@ -2189,7 +2207,7 @@ Set(%GnuPGOptions, # 'auto-key-locate' => 'keyserver', # enables the automatic retrieving of keys when verifying signatures -# 'auto-key-retrieve' => undef, +# 'keyserver-options' => 'auto-key-retrieve', ); =back diff --git a/rt/etc/schema.mysql b/rt/etc/schema.mysql index 9ed0337aa..e0ccecb52 100644 --- a/rt/etc/schema.mysql +++ b/rt/etc/schema.mysql @@ -22,9 +22,9 @@ CREATE TABLE Queues ( id INTEGER NOT NULL AUTO_INCREMENT, Name varchar(200) NOT NULL , Description varchar(255) NULL , - CorrespondAddress varchar(120) CHARACTER SET ascii NULL, - CommentAddress varchar(120) CHARACTER SET ascii NULL, - Lifecycle varchar(32) CHARACTER SET ascii NULL, + CorrespondAddress varchar(120) NULL, + CommentAddress varchar(120) NULL, + Lifecycle varchar(32) NULL, SubjectTag varchar(120) NULL, InitialPriority integer NOT NULL DEFAULT 0 , FinalPriority integer NOT NULL DEFAULT 0 , diff --git a/rt/etc/upgrade/3.7.19/content b/rt/etc/upgrade/3.7.19/content index 31ab1c84a..ff43dd053 100644 --- a/rt/etc/upgrade/3.7.19/content +++ b/rt/etc/upgrade/3.7.19/content @@ -24,14 +24,25 @@ sub add_description_to_all_scrips { sub gen_scrip_description { my $scrip = shift; - my $condition = $scrip->ConditionObj->Name + + my $condition; + eval{ + $condition = $scrip->ConditionObj->Name || $scrip->ConditionObj->Description - || ('On Condition #'. $scrip->Condition); + || ('On Condition #'. $scrip->Condition); + }; + + if ($@){ + print STDERR $@; + print STDERR "Reference to missing scrip condition found. If you have ScripCondition = 0 in the Scrips table, update with a real condition number.\n"; + $condition = 'On undefined Condition # 0'; + } + my $action = $scrip->ActionObj->Name || $scrip->ActionObj->Description || ('Run Action #'. $scrip->Action); return join ' ', $condition, $action; -} + } } 1; diff --git a/rt/etc/upgrade/3.8-ical-extension.in b/rt/etc/upgrade/3.8-ical-extension.in index 0bbba7b2d..47b184682 100644 --- a/rt/etc/upgrade/3.8-ical-extension.in +++ b/rt/etc/upgrade/3.8-ical-extension.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/etc/upgrade/3.9.8/content b/rt/etc/upgrade/3.9.8/content index db717cd95..24242fda2 100644 --- a/rt/etc/upgrade/3.9.8/content +++ b/rt/etc/upgrade/3.9.8/content @@ -1,9 +1,6 @@ @Initial = sub { - my $dbh = $RT::Handle->dbh; - my $sth = $dbh->table_info( '', undef, undef, "'TABLE'"); my $found_fm_tables = {}; - while ( my $table = $sth->fetchrow_hashref ) { - my $name = $table->{TABLE_NAME} || $table->{table_name}; + foreach my $name ( $RT::Handle->_TableNames ) { next unless $name =~ /^fm_/i; $found_fm_tables->{lc $name}++; } @@ -16,6 +13,7 @@ $RT::Logger->error("We found RTFM tables in your database. Checking for content."); + my $dbh = $RT::Handle->dbh; my $result = $dbh->selectall_arrayref("SELECT count(*) AS articlecount FROM FM_Articles", { Slice => {} } ); if ($result->[0]{articlecount} > 0) { diff --git a/rt/etc/upgrade/generate-rtaddressregexp.in b/rt/etc/upgrade/generate-rtaddressregexp.in index 751122a99..a6be3f59a 100644 --- a/rt/etc/upgrade/generate-rtaddressregexp.in +++ b/rt/etc/upgrade/generate-rtaddressregexp.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/etc/upgrade/sanity-check-stylesheets.pl b/rt/etc/upgrade/sanity-check-stylesheets.pl index 6ae1cc61c..3171bda80 100644 --- a/rt/etc/upgrade/sanity-check-stylesheets.pl +++ b/rt/etc/upgrade/sanity-check-stylesheets.pl @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/etc/upgrade/shrink_cgm_table.pl b/rt/etc/upgrade/shrink_cgm_table.pl index bb6c8d487..fcfe8c5f1 100644 --- a/rt/etc/upgrade/shrink_cgm_table.pl +++ b/rt/etc/upgrade/shrink_cgm_table.pl @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/etc/upgrade/shrink_transactions_table.pl b/rt/etc/upgrade/shrink_transactions_table.pl index b4f07f090..66bdcf50c 100644 --- a/rt/etc/upgrade/shrink_transactions_table.pl +++ b/rt/etc/upgrade/shrink_transactions_table.pl @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/etc/upgrade/split-out-cf-categories.in b/rt/etc/upgrade/split-out-cf-categories.in index dcb56d08d..d9d2ffaf5 100644 --- a/rt/etc/upgrade/split-out-cf-categories.in +++ b/rt/etc/upgrade/split-out-cf-categories.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/etc/upgrade/upgrade-articles b/rt/etc/upgrade/upgrade-articles index 0b4663213..dbd481442 100755 --- a/rt/etc/upgrade/upgrade-articles +++ b/rt/etc/upgrade/upgrade-articles @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -64,10 +64,8 @@ my $db_type = RT->Config->Get('DatabaseType'); my $dbh = $RT::Handle->dbh; -my $sth = $dbh->table_info( '', undef, undef, "'TABLE'"); my $found_fm_tables; -while ( my $table = $sth->fetchrow_hashref ) { - my $name = $table->{TABLE_NAME} || $table->{'table_name'}; # Oracle's table_info affected by NAME_lc +foreach my $name ( $RT::Handle->_TableNames ) { next unless $name =~ /^fm_/i; $found_fm_tables->{lc $name}++; } @@ -159,6 +157,7 @@ sub copy_tables { use RT::CustomFields; my $cfs = RT::CustomFields->new(RT->SystemUser); $cfs->Limit( FIELD => 'LookupType', VALUE => 'RT::FM::Class-RT::FM::Article' ); + $cfs->{'find_disabled_rows'} = 1; while ( my $cf = $cfs->Next ) { my ($ret, $msg) = $cf->__Set( Field => 'LookupType', Value => 'RT::Class-RT::Article' ); warn "Update Custom Field LookupType for CF.".$cf->Id." $msg"; @@ -169,6 +168,7 @@ sub copy_tables { use RT::ObjectCustomFieldValues; my $ocfvs = RT::ObjectCustomFieldValues->new(RT->System); $ocfvs->Limit( FIELD => 'ObjectType', VALUE => 'RT::FM::Article' ); + $ocfvs->{'find_expired_rows'} = 1; while ( my $ocfv = $ocfvs->Next ) { my ($ret, $msg) = $ocfv->__Set( Field => 'ObjectType', Value => 'RT::Article' ); warn "Updated CF ".$ocfv->__Value('CustomField')." Value for Article ".$ocfv->__Value('ObjectId'); diff --git a/rt/etc/upgrade/upgrade-articles.in b/rt/etc/upgrade/upgrade-articles.in index 6e8d1d7c8..0aab0e22b 100644 --- a/rt/etc/upgrade/upgrade-articles.in +++ b/rt/etc/upgrade/upgrade-articles.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -64,10 +64,8 @@ my $db_type = RT->Config->Get('DatabaseType'); my $dbh = $RT::Handle->dbh; -my $sth = $dbh->table_info( '', undef, undef, "'TABLE'"); my $found_fm_tables; -while ( my $table = $sth->fetchrow_hashref ) { - my $name = $table->{TABLE_NAME} || $table->{'table_name'}; # Oracle's table_info affected by NAME_lc +foreach my $name ( $RT::Handle->_TableNames ) { next unless $name =~ /^fm_/i; $found_fm_tables->{lc $name}++; } @@ -159,6 +157,7 @@ sub copy_tables { use RT::CustomFields; my $cfs = RT::CustomFields->new(RT->SystemUser); $cfs->Limit( FIELD => 'LookupType', VALUE => 'RT::FM::Class-RT::FM::Article' ); + $cfs->{'find_disabled_rows'} = 1; while ( my $cf = $cfs->Next ) { my ($ret, $msg) = $cf->__Set( Field => 'LookupType', Value => 'RT::Class-RT::Article' ); warn "Update Custom Field LookupType for CF.".$cf->Id." $msg"; @@ -169,6 +168,7 @@ sub copy_tables { use RT::ObjectCustomFieldValues; my $ocfvs = RT::ObjectCustomFieldValues->new(RT->System); $ocfvs->Limit( FIELD => 'ObjectType', VALUE => 'RT::FM::Article' ); + $ocfvs->{'find_expired_rows'} = 1; while ( my $ocfv = $ocfvs->Next ) { my ($ret, $msg) = $ocfv->__Set( Field => 'ObjectType', Value => 'RT::Article' ); warn "Updated CF ".$ocfv->__Value('CustomField')." Value for Article ".$ocfv->__Value('ObjectId'); diff --git a/rt/etc/upgrade/upgrade-mysql-schema.pl b/rt/etc/upgrade/upgrade-mysql-schema.pl index 98eb7b4e3..8d6615d6b 100755 --- a/rt/etc/upgrade/upgrade-mysql-schema.pl +++ b/rt/etc/upgrade/upgrade-mysql-schema.pl @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -184,8 +184,8 @@ my %charset = ( Queues => { Name => 'utf8', Description => 'utf8', - CorrespondAddress => 'ascii', - CommentAddress => 'ascii', + CorrespondAddress => 'utf8', + CommentAddress => 'utf8', }, ScripActions => { Name => 'utf8', @@ -239,7 +239,7 @@ my %charset = ( Password => 'binary', Comments => 'utf8', Signature => 'utf8', - EmailAddress => 'ascii', + EmailAddress => 'utf8', FreeformContactInfo => 'utf8', Organization => 'utf8', RealName => 'utf8', diff --git a/rt/etc/upgrade/vulnerable-passwords.in b/rt/etc/upgrade/vulnerable-passwords.in index 22c56fd23..b1027a432 100755 --- a/rt/etc/upgrade/vulnerable-passwords.in +++ b/rt/etc/upgrade/vulnerable-passwords.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT.pm b/rt/lib/RT.pm index da60ef77d..0f0c79a55 100644 --- a/rt/lib/RT.pm +++ b/rt/lib/RT.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -181,8 +181,8 @@ up logging|/InitLogging>, and L. =cut sub Init { - - my @arg = @_; + shift if @_%2; # code is inconsistent about calling as method + my %args = (@_); CheckPerlRequirements(); @@ -191,8 +191,8 @@ sub Init { #Get a database connection ConnectToDatabase(); InitSystemObjects(); - InitClasses(); - InitLogging(@arg); + InitClasses(%args); + InitLogging(%args); InitPlugins(); RT::I18N->Init; RT->Config->PostLoadCheck; @@ -264,7 +264,7 @@ sub InitLogging { my ($package, $filename, $line) = caller($frame); $p{'message'} =~ s/(?:\r*\n)+$//; - return "[". gmtime(time) ."] [". $p{'level'} ."]: " + return "[$$] [". gmtime(time) ."] [". $p{'level'} ."]: " . $p{'message'} ." ($filename:$line)\n"; }; @@ -283,9 +283,9 @@ sub InitLogging { $p{message} =~ s/(?:\r*\n)+$//; if ($p{level} eq 'debug') { - return "$p{message}\n"; + return "[$$] $p{message} ($filename:$line)\n"; } else { - return "$p{message} ($filename:$line)\n"; + return "[$$] $p{message}\n"; } }; diff --git a/rt/lib/RT/ACE.pm b/rt/lib/RT/ACE.pm index c752aa2dc..baf6fb2fd 100755 --- a/rt/lib/RT/ACE.pm +++ b/rt/lib/RT/ACE.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/ACL.pm b/rt/lib/RT/ACL.pm index d1e0df5ad..0662b3955 100755 --- a/rt/lib/RT/ACL.pm +++ b/rt/lib/RT/ACL.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Action.pm b/rt/lib/RT/Action.pm index dc10d0da6..88e5b15d4 100755 --- a/rt/lib/RT/Action.pm +++ b/rt/lib/RT/Action.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Action/AutoOpen.pm b/rt/lib/RT/Action/AutoOpen.pm index 8566c62d5..e819ca989 100644 --- a/rt/lib/RT/Action/AutoOpen.pm +++ b/rt/lib/RT/Action/AutoOpen.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Action/Autoreply.pm b/rt/lib/RT/Action/Autoreply.pm index 89b7536fa..a2703e51d 100755 --- a/rt/lib/RT/Action/Autoreply.pm +++ b/rt/lib/RT/Action/Autoreply.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Action/CreateTickets.pm b/rt/lib/RT/Action/CreateTickets.pm index 80308020f..e3c7b53e0 100644 --- a/rt/lib/RT/Action/CreateTickets.pm +++ b/rt/lib/RT/Action/CreateTickets.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Action/EscalatePriority.pm b/rt/lib/RT/Action/EscalatePriority.pm index 1300b4fe3..38cad9407 100644 --- a/rt/lib/RT/Action/EscalatePriority.pm +++ b/rt/lib/RT/Action/EscalatePriority.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Action/ExtractSubjectTag.pm b/rt/lib/RT/Action/ExtractSubjectTag.pm index 6a3898e74..92a72148f 100644 --- a/rt/lib/RT/Action/ExtractSubjectTag.pm +++ b/rt/lib/RT/Action/ExtractSubjectTag.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Action/LinearEscalate.pm b/rt/lib/RT/Action/LinearEscalate.pm index 13913e6cd..9b75286cf 100755 --- a/rt/lib/RT/Action/LinearEscalate.pm +++ b/rt/lib/RT/Action/LinearEscalate.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Action/Notify.pm b/rt/lib/RT/Action/Notify.pm index 3553cbc39..26aae47b0 100755 --- a/rt/lib/RT/Action/Notify.pm +++ b/rt/lib/RT/Action/Notify.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Action/NotifyAsComment.pm b/rt/lib/RT/Action/NotifyAsComment.pm index 0016a364a..a2c57db2d 100755 --- a/rt/lib/RT/Action/NotifyAsComment.pm +++ b/rt/lib/RT/Action/NotifyAsComment.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Action/NotifyGroup.pm b/rt/lib/RT/Action/NotifyGroup.pm index 1dece60a3..789c182e4 100644 --- a/rt/lib/RT/Action/NotifyGroup.pm +++ b/rt/lib/RT/Action/NotifyGroup.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Action/NotifyGroupAsComment.pm b/rt/lib/RT/Action/NotifyGroupAsComment.pm index cf6952aff..135ef7f9c 100644 --- a/rt/lib/RT/Action/NotifyGroupAsComment.pm +++ b/rt/lib/RT/Action/NotifyGroupAsComment.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Action/RecordComment.pm b/rt/lib/RT/Action/RecordComment.pm index a384af347..8f55ff187 100644 --- a/rt/lib/RT/Action/RecordComment.pm +++ b/rt/lib/RT/Action/RecordComment.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Action/RecordCorrespondence.pm b/rt/lib/RT/Action/RecordCorrespondence.pm index cc21503de..2304f2857 100644 --- a/rt/lib/RT/Action/RecordCorrespondence.pm +++ b/rt/lib/RT/Action/RecordCorrespondence.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Action/SendEmail.pm b/rt/lib/RT/Action/SendEmail.pm index 0a52904dd..0f11cc141 100755 --- a/rt/lib/RT/Action/SendEmail.pm +++ b/rt/lib/RT/Action/SendEmail.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -382,7 +382,7 @@ sub AddAttachments { =head2 AddAttachment $attachment -Takes one attachment object of L class and attaches it to the message +Takes one attachment object of L class and attaches it to the message we're building. =cut @@ -397,14 +397,15 @@ sub AddAttachment { and $attach->TransactionObj->CurrentUserCanSee; # ->attach expects just the disposition type; extract it if we have the header + # or default to "attachment" my $disp = ($attach->GetHeader('Content-Disposition') || '') - =~ /^\s*(inline|attachment)/i ? $1 : undef; + =~ /^\s*(inline|attachment)/i ? $1 : "attachment"; $MIMEObj->attach( Type => $attach->ContentType, Charset => $attach->OriginalEncoding, Data => $attach->OriginalContent, - Disposition => $disp, # a false value defaults to inline in MIME::Entity + Disposition => $disp, Filename => $self->MIMEEncodeString( $attach->Filename ), 'RT-Attachment:' => $self->TicketObj->Id . "/" . $self->TransactionObj->Id . "/" @@ -975,7 +976,7 @@ sub SetSubject { $subject =~ s/(\r\n|\n|\s)/ /g; - $self->SetHeader( 'Subject', $subject ); + $self->SetHeader( 'Subject', Encode::encode_utf8( $subject ) ); } @@ -989,11 +990,14 @@ sub SetSubjectToken { my $self = shift; my $head = $self->TemplateObj->MIMEObj->head; - $head->replace( - Subject => RT::Interface::Email::AddSubjectTag( - Encode::decode_utf8( $head->get('Subject') ), - $self->TicketObj, - ), + $self->SetHeader( + Subject => + Encode::encode_utf8( + RT::Interface::Email::AddSubjectTag( + Encode::decode_utf8( $head->get('Subject') ), + $self->TicketObj, + ), + ), ); } diff --git a/rt/lib/RT/Action/SetPriority.pm b/rt/lib/RT/Action/SetPriority.pm index 2043532f7..7385c13d9 100644 --- a/rt/lib/RT/Action/SetPriority.pm +++ b/rt/lib/RT/Action/SetPriority.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Action/SetStatus.pm b/rt/lib/RT/Action/SetStatus.pm index be00396ce..c7a3127f1 100644 --- a/rt/lib/RT/Action/SetStatus.pm +++ b/rt/lib/RT/Action/SetStatus.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Action/UserDefined.pm b/rt/lib/RT/Action/UserDefined.pm index b259323d7..adc40e948 100644 --- a/rt/lib/RT/Action/UserDefined.pm +++ b/rt/lib/RT/Action/UserDefined.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Approval.pm b/rt/lib/RT/Approval.pm index dc60222a8..34cf10012 100644 --- a/rt/lib/RT/Approval.pm +++ b/rt/lib/RT/Approval.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Approval/Rule.pm b/rt/lib/RT/Approval/Rule.pm index 6892f41ec..1b7b7aca5 100644 --- a/rt/lib/RT/Approval/Rule.pm +++ b/rt/lib/RT/Approval/Rule.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Approval/Rule/Created.pm b/rt/lib/RT/Approval/Rule/Created.pm index 8fcaeb273..91063d179 100644 --- a/rt/lib/RT/Approval/Rule/Created.pm +++ b/rt/lib/RT/Approval/Rule/Created.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Approval/Rule/NewPending.pm b/rt/lib/RT/Approval/Rule/NewPending.pm index 97d3cfbb5..3fdb99d2b 100644 --- a/rt/lib/RT/Approval/Rule/NewPending.pm +++ b/rt/lib/RT/Approval/Rule/NewPending.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Approval/Rule/Passed.pm b/rt/lib/RT/Approval/Rule/Passed.pm index acc49161f..241e6046e 100644 --- a/rt/lib/RT/Approval/Rule/Passed.pm +++ b/rt/lib/RT/Approval/Rule/Passed.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Approval/Rule/Rejected.pm b/rt/lib/RT/Approval/Rule/Rejected.pm index 0a025684f..adc30634b 100644 --- a/rt/lib/RT/Approval/Rule/Rejected.pm +++ b/rt/lib/RT/Approval/Rule/Rejected.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Article.pm b/rt/lib/RT/Article.pm index ec1ae3cae..e9f3d43f1 100644 --- a/rt/lib/RT/Article.pm +++ b/rt/lib/RT/Article.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Articles.pm b/rt/lib/RT/Articles.pm index d69eabf82..9bee84472 100644 --- a/rt/lib/RT/Articles.pm +++ b/rt/lib/RT/Articles.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -597,7 +597,11 @@ sub Search { require Time::ParseDate; foreach my $date (qw(Created< Created> LastUpdated< LastUpdated>)) { next unless ( $args{$date} ); - my $seconds = Time::ParseDate::parsedate( $args{$date}, FUZZY => 1, PREFER_PAST => 1 ); + my ($seconds, $error) = Time::ParseDate::parsedate( $args{$date}, FUZZY => 1, PREFER_PAST => 1 ); + unless ( defined $seconds ) { + $RT::Logger->warning( + "Couldn't parse date '$args{$date}' by Time::ParseDate" ); + } my $date_obj = RT::Date->new( $self->CurrentUser ); $date_obj->Set( Format => 'unix', Value => $seconds ); $dates->{$date} = $date_obj; diff --git a/rt/lib/RT/Attachment.pm b/rt/lib/RT/Attachment.pm index 54217b32b..07fdea3b2 100755 --- a/rt/lib/RT/Attachment.pm +++ b/rt/lib/RT/Attachment.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Attachments.pm b/rt/lib/RT/Attachments.pm index 5b087a493..7f6f258c9 100755 --- a/rt/lib/RT/Attachments.pm +++ b/rt/lib/RT/Attachments.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Attribute.pm b/rt/lib/RT/Attribute.pm index 10971a279..745f95fd2 100644 --- a/rt/lib/RT/Attribute.pm +++ b/rt/lib/RT/Attribute.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -148,7 +148,7 @@ sub Create { @_); if ($args{Object} and UNIVERSAL::can($args{Object}, 'Id')) { - $args{ObjectType} = ref($args{Object}); + $args{ObjectType} = $args{Object}->isa("RT::CurrentUser") ? "RT::User" : ref($args{Object}); $args{ObjectId} = $args{Object}->Id; } else { return(0, $self->loc("Required parameter '[_1]' not specified", 'Object')); diff --git a/rt/lib/RT/Attributes.pm b/rt/lib/RT/Attributes.pm index 9c18c1a0f..c556756ae 100644 --- a/rt/lib/RT/Attributes.pm +++ b/rt/lib/RT/Attributes.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -210,7 +210,10 @@ sub LimitToObject { unless (eval { $obj->id} ){ return undef; } - $self->Limit(FIELD => 'ObjectType', OPERATOR=> '=', VALUE => ref($obj), ENTRYAGGREGATOR => 'OR'); + + my $type = $obj->isa("RT::CurrentUser") ? "RT::User" : ref($obj); + + $self->Limit(FIELD => 'ObjectType', OPERATOR=> '=', VALUE => $type, ENTRYAGGREGATOR => 'OR'); $self->Limit(FIELD => 'ObjectId', OPERATOR=> '=', VALUE => $obj->id, ENTRYAGGREGATOR => 'OR', QUOTEVALUE => 0); } diff --git a/rt/lib/RT/Base.pm b/rt/lib/RT/Base.pm index 403c318b4..f83ed8e0e 100644 --- a/rt/lib/RT/Base.pm +++ b/rt/lib/RT/Base.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/CachedGroupMember.pm b/rt/lib/RT/CachedGroupMember.pm index b334d4d6c..66e7c7a93 100644 --- a/rt/lib/RT/CachedGroupMember.pm +++ b/rt/lib/RT/CachedGroupMember.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/CachedGroupMembers.pm b/rt/lib/RT/CachedGroupMembers.pm index 4d8f356fb..f65796acb 100644 --- a/rt/lib/RT/CachedGroupMembers.pm +++ b/rt/lib/RT/CachedGroupMembers.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Class.pm b/rt/lib/RT/Class.pm index dfe8eb386..8f6892456 100644 --- a/rt/lib/RT/Class.pm +++ b/rt/lib/RT/Class.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Classes.pm b/rt/lib/RT/Classes.pm index 60122c7eb..6b50d5dce 100644 --- a/rt/lib/RT/Classes.pm +++ b/rt/lib/RT/Classes.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -54,6 +54,15 @@ use base 'RT::SearchBuilder'; sub Table {'Classes'} +=head2 _Init + +=cut + + sub _Init { + my $self = shift; + $self->{'with_disabled_column'} = 1; + return ($self->SUPER::_Init(@_)); + } =head2 Next diff --git a/rt/lib/RT/Condition.pm b/rt/lib/RT/Condition.pm index 07518151f..80cf01992 100755 --- a/rt/lib/RT/Condition.pm +++ b/rt/lib/RT/Condition.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Condition/AnyTransaction.pm b/rt/lib/RT/Condition/AnyTransaction.pm index 2c9129c0f..5d8b3bc76 100644 --- a/rt/lib/RT/Condition/AnyTransaction.pm +++ b/rt/lib/RT/Condition/AnyTransaction.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Condition/BeforeDue.pm b/rt/lib/RT/Condition/BeforeDue.pm index 8df73cacd..73015bcc8 100644 --- a/rt/lib/RT/Condition/BeforeDue.pm +++ b/rt/lib/RT/Condition/BeforeDue.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Condition/CloseTicket.pm b/rt/lib/RT/Condition/CloseTicket.pm index bdeaf2d5d..2e027f4de 100644 --- a/rt/lib/RT/Condition/CloseTicket.pm +++ b/rt/lib/RT/Condition/CloseTicket.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Condition/Overdue.pm b/rt/lib/RT/Condition/Overdue.pm index 547aea25b..462fa407c 100644 --- a/rt/lib/RT/Condition/Overdue.pm +++ b/rt/lib/RT/Condition/Overdue.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Condition/OwnerChange.pm b/rt/lib/RT/Condition/OwnerChange.pm index 85005482c..407d5a5ae 100644 --- a/rt/lib/RT/Condition/OwnerChange.pm +++ b/rt/lib/RT/Condition/OwnerChange.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Condition/PriorityChange.pm b/rt/lib/RT/Condition/PriorityChange.pm index a600453a3..25e6bfb5b 100644 --- a/rt/lib/RT/Condition/PriorityChange.pm +++ b/rt/lib/RT/Condition/PriorityChange.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Condition/PriorityExceeds.pm b/rt/lib/RT/Condition/PriorityExceeds.pm index a28d6df15..e35d0b5b8 100644 --- a/rt/lib/RT/Condition/PriorityExceeds.pm +++ b/rt/lib/RT/Condition/PriorityExceeds.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Condition/QueueChange.pm b/rt/lib/RT/Condition/QueueChange.pm index ba7a8a495..91cd88c4e 100644 --- a/rt/lib/RT/Condition/QueueChange.pm +++ b/rt/lib/RT/Condition/QueueChange.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Condition/ReopenTicket.pm b/rt/lib/RT/Condition/ReopenTicket.pm index a057e401d..69ef8f9ab 100644 --- a/rt/lib/RT/Condition/ReopenTicket.pm +++ b/rt/lib/RT/Condition/ReopenTicket.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Condition/StatusChange.pm b/rt/lib/RT/Condition/StatusChange.pm index e84915d19..55fe2347f 100644 --- a/rt/lib/RT/Condition/StatusChange.pm +++ b/rt/lib/RT/Condition/StatusChange.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Condition/UserDefined.pm b/rt/lib/RT/Condition/UserDefined.pm index 1abee67f2..4f4ff1816 100644 --- a/rt/lib/RT/Condition/UserDefined.pm +++ b/rt/lib/RT/Condition/UserDefined.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Config.pm b/rt/lib/RT/Config.pm index ee426bfa8..fee6c5106 100644 --- a/rt/lib/RT/Config.pm +++ b/rt/lib/RT/Config.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Crypt/GnuPG.pm b/rt/lib/RT/Crypt/GnuPG.pm index 6164a4241..d0587d4fe 100644 --- a/rt/lib/RT/Crypt/GnuPG.pm +++ b/rt/lib/RT/Crypt/GnuPG.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -2160,7 +2160,10 @@ sub GetKeysInfo { } $RT::Logger->debug( $res{'status'} ) if $res{'status'}; $RT::Logger->warning( $res{'stderr'} ) if $res{'stderr'}; - $RT::Logger->error( $res{'logger'} ) if $res{'logger'} && $?; + if ( $res{'logger'} && $? ) { + $RT::Logger->error( $res{'logger'} ); + $RT::Logger->error( 'The above error may result from an unconfigured RT/GPG installation. See perldoc etc/RT_Config.pm for information about configuring or disabling GPG support for RT' ); + } if ( $@ || $? ) { $res{'message'} = $@? $@: "gpg exitted with error code ". ($? >> 8); return %res; diff --git a/rt/lib/RT/CurrentUser.pm b/rt/lib/RT/CurrentUser.pm index fa0d4ca7a..c11d46031 100755 --- a/rt/lib/RT/CurrentUser.pm +++ b/rt/lib/RT/CurrentUser.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/CustomField.pm b/rt/lib/RT/CustomField.pm index 01b4970c4..e71bbf78a 100644 --- a/rt/lib/RT/CustomField.pm +++ b/rt/lib/RT/CustomField.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -51,7 +51,7 @@ package RT::CustomField; use strict; use warnings; - +use Scalar::Util 'blessed'; use base 'RT::Record'; @@ -1111,11 +1111,6 @@ sub SetRenderType { $self->FriendlyType)); } - # XXX: Remove this restriction once we support lists and cascaded selects - if ( $self->BasedOnObj->id and $type =~ /List/ ) { - return (0, $self->loc("We can't currently render as a List when basing categories on another custom field. Please use another render type.")); - } - return $self->_Set( Field => 'RenderType', Value => $type, @_ ); } @@ -1193,7 +1188,7 @@ Returns an array of LookupTypes available sub LookupTypes { my $self = shift; - return keys %FRIENDLY_OBJECT_TYPES; + return sort keys %FRIENDLY_OBJECT_TYPES; } my @FriendlyObjectTypes = ( @@ -1222,14 +1217,57 @@ sub FriendlyLookupType { return ( $self->loc( $FriendlyObjectTypes[$#types], @types ) ); } +=head1 RecordClassFromLookupType + +Returns the type of Object referred to by ObjectCustomFields' ObjectId column + +Optionally takes a LookupType to use instead of using the value on the loaded +record. In this case, the method may be called on the class instead of an +object. + +=cut + sub RecordClassFromLookupType { my $self = shift; - my ($class) = ($self->LookupType =~ /^([^-]+)/); + my $type = shift || $self->LookupType; + my ($class) = ($type =~ /^([^-]+)/); unless ( $class ) { - $RT::Logger->error( - "Custom Field #". $self->id - ." has incorrect LookupType '". $self->LookupType ."'" - ); + if (blessed($self) and $self->LookupType eq $type) { + $RT::Logger->error( + "Custom Field #". $self->id + ." has incorrect LookupType '$type'" + ); + } else { + RT->Logger->error("Invalid LookupType passed as argument: $type"); + } + return undef; + } + return $class; +} + +=head1 ObjectTypeFromLookupType + +Returns the ObjectType used in ObjectCustomFieldValues rows for this CF + +Optionally takes a LookupType to use instead of using the value on the loaded +record. In this case, the method may be called on the class instead of an +object. + +=cut + +sub ObjectTypeFromLookupType { + my $self = shift; + my $type = shift || $self->LookupType; + my ($class) = ($type =~ /([^-]+)$/); + unless ( $class ) { + if (blessed($self) and $self->LookupType eq $type) { + $RT::Logger->error( + "Custom Field #". $self->id + ." has incorrect LookupType '$type'" + ); + } else { + RT->Logger->error("Invalid LookupType passed as argument: $type"); + } return undef; } return $class; diff --git a/rt/lib/RT/CustomFieldValue.pm b/rt/lib/RT/CustomFieldValue.pm index 6dffc3455..4adb84d9e 100644 --- a/rt/lib/RT/CustomFieldValue.pm +++ b/rt/lib/RT/CustomFieldValue.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/CustomFieldValues.pm b/rt/lib/RT/CustomFieldValues.pm index e3380b7e5..18bc6b4b0 100644 --- a/rt/lib/RT/CustomFieldValues.pm +++ b/rt/lib/RT/CustomFieldValues.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/CustomFieldValues/External.pm b/rt/lib/RT/CustomFieldValues/External.pm index e6bf2f87d..375f5c538 100644 --- a/rt/lib/RT/CustomFieldValues/External.pm +++ b/rt/lib/RT/CustomFieldValues/External.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/CustomFieldValues/Groups.pm b/rt/lib/RT/CustomFieldValues/Groups.pm index feeeadbd7..48234e293 100644 --- a/rt/lib/RT/CustomFieldValues/Groups.pm +++ b/rt/lib/RT/CustomFieldValues/Groups.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -53,10 +53,42 @@ use warnings; use base qw(RT::CustomFieldValues::External); +=head1 NAME + +RT::CustomFieldValues::Groups - Provide RT's groups as a dynamic list of CF values + +=head1 SYNOPSIS + +To use as a source of CF values, add the following to your F +and restart RT. + + # In RT_SiteConfig.pm + Set( @CustomFieldValuesSources, "RT::CustomFieldValues::Groups" ); + +Then visit the modify CF page in the RT admin configuration. + +=head1 METHODS + +Most methods are inherited from L, except the +ones below. + +=head2 SourceDescription + +Returns a brief string describing this data source. + +=cut + sub SourceDescription { return 'RT user defined groups'; } +=head2 ExternalValues + +Returns an arrayref containing a hashref for each possible value in this data +source, where the value name is the group name. + +=cut + sub ExternalValues { my $self = shift; diff --git a/rt/lib/RT/CustomFields.pm b/rt/lib/RT/CustomFields.pm index 017018ef4..7c7701580 100644 --- a/rt/lib/RT/CustomFields.pm +++ b/rt/lib/RT/CustomFields.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -141,6 +141,25 @@ sub LimitToParentType { $self->Limit( FIELD => 'LookupType', STARTSWITH => "$lookup" ); } +=head2 LimitToObjectId + +Takes an ObjectId and limits the collection to CFs applied to said object. + +When called multiple times the ObjectId limits are joined with OR. + +=cut + +sub LimitToObjectId { + my $self = shift; + my $id = shift; + $self->Limit( + ALIAS => $self->_OCFAlias, + FIELD => 'ObjectId', + OPERATOR => '=', + VALUE => $id || 0, + ENTRYAGGREGATOR => 'OR' + ); +} =head2 LimitToGlobalOrObjectId @@ -155,19 +174,11 @@ sub LimitToGlobalOrObjectId { foreach my $id (@_) { - $self->Limit( ALIAS => $self->_OCFAlias, - FIELD => 'ObjectId', - OPERATOR => '=', - VALUE => $id || 0, - ENTRYAGGREGATOR => 'OR' ); - $global_only = 0 if $id; + $self->LimitToObjectId($id); + $global_only = 0 if $id; } - $self->Limit( ALIAS => $self->_OCFAlias, - FIELD => 'ObjectId', - OPERATOR => '=', - VALUE => 0, - ENTRYAGGREGATOR => 'OR' ) unless $global_only; + $self->LimitToObjectId(0) unless $global_only; } sub _LimitToOCFs { diff --git a/rt/lib/RT/Dashboard.pm b/rt/lib/RT/Dashboard.pm index 349864e12..6d4c51562 100644 --- a/rt/lib/RT/Dashboard.pm +++ b/rt/lib/RT/Dashboard.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Dashboard/Mailer.pm b/rt/lib/RT/Dashboard/Mailer.pm index 9d28c4942..eb620e65d 100644 --- a/rt/lib/RT/Dashboard/Mailer.pm +++ b/rt/lib/RT/Dashboard/Mailer.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -146,7 +146,7 @@ sub IsSubscriptionReady { my $sub_hour = $subscription->SubValue('Hour'); my $sub_dow = $subscription->SubValue('Dow'); my $sub_dom = $subscription->SubValue('Dom'); - my $sub_fow = $subscription->SubValue('Fow'); + my $sub_fow = $subscription->SubValue('Fow') || 1; my ($hour, $dow, $dom) = @{ $args{LocalTime} }; @@ -165,8 +165,6 @@ sub IsSubscriptionReady { return 0 if $sub_dow ne $dow; # does it match the "every N weeks" clause? - $sub_fow = 1 if !$sub_fow; - return 1 if $counter % $sub_fow == 0; $subscription->SetSubValues(Counter => $counter + 1) @@ -422,12 +420,15 @@ sub BuildEmail { Type => 'text/html', Charset => 'UTF-8', Disposition => 'inline', + Encoding => "base64", ); for my $part (@parts) { $entity->add_part($part); } + $entity->make_singlepart; + return $entity; } diff --git a/rt/lib/RT/Dashboards.pm b/rt/lib/RT/Dashboards.pm index f9cbbe877..1c5fe3d97 100644 --- a/rt/lib/RT/Dashboards.pm +++ b/rt/lib/RT/Dashboards.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Date.pm b/rt/lib/RT/Date.pm index 031f9c8d4..db56cfeb9 100644 --- a/rt/lib/RT/Date.pm +++ b/rt/lib/RT/Date.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -208,7 +208,7 @@ sub Set { # should be applied to absolute times, so compensate shift in NOW my $now = time; $now += ($self->Localtime( $args{Timezone}, $now ))[9]; - my $date = Time::ParseDate::parsedate( + my ($date, $error) = Time::ParseDate::parsedate( $args{'Value'}, GMT => 1, NOW => $now, @@ -216,6 +216,13 @@ sub Set { PREFER_PAST => RT->Config->Get('AmbiguousDayInPast'), PREFER_FUTURE => RT->Config->Get('AmbiguousDayInFuture'), ); + unless ( defined $date ) { + $RT::Logger->warning( + "Couldn't parse date '$args{'Value'}' by Time::ParseDate" + ); + return $self->Unix(0); + } + # apply timezone offset $date -= ($self->Localtime( $args{Timezone}, $date ))[9]; @@ -895,7 +902,7 @@ sub RFC2822 { my ($date, $time) = ('',''); $date .= "$DAYS_OF_WEEK[$wday], " if $args{'DayOfWeek'} && $args{'Date'}; - $date .= "$mday $MONTHS[$mon] $year" if $args{'Date'}; + $date .= sprintf("%02d %s %04d", $mday, $MONTHS[$mon], $year) if $args{'Date'}; if ( $args{'Time'} ) { $time .= sprintf("%02d:%02d", $hour, $min); @@ -960,21 +967,20 @@ sub iCal { Date => 1, Time => 1, @_, ); - my ($sec,$min,$hour,$mday,$mon,$year,$wday,$ydaym,$isdst,$offset) = - $self->Localtime( 'utc' ); - - #the month needs incrementing, as gmtime returns 0-11 - $mon++; my $res; if ( $args{'Date'} && !$args{'Time'} ) { - $res = sprintf( '%04d%02d%02d', $year, $mon, $mday ); - } - elsif ( !$args{'Date'} && $args{'Time'} ) { + my (undef, undef, undef, $mday, $mon, $year) = + $self->Localtime( 'user' ); + $res = sprintf( '%04d%02d%02d', $year, $mon+1, $mday ); + } elsif ( !$args{'Date'} && $args{'Time'} ) { + my ($sec, $min, $hour) = + $self->Localtime( 'utc' ); $res = sprintf( 'T%02d%02d%02dZ', $hour, $min, $sec ); - } - else { - $res = sprintf( '%04d%02d%02dT%02d%02d%02dZ', $year, $mon, $mday, $hour, $min, $sec ); + } else { + my ($sec, $min, $hour, $mday, $mon, $year) = + $self->Localtime( 'utc' ); + $res = sprintf( '%04d%02d%02dT%02d%02d%02dZ', $year, $mon+1, $mday, $hour, $min, $sec ); } return $res; } diff --git a/rt/lib/RT/EmailParser.pm b/rt/lib/RT/EmailParser.pm index 19dc2c9e8..89f7ea4f9 100644 --- a/rt/lib/RT/EmailParser.pm +++ b/rt/lib/RT/EmailParser.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -110,7 +110,7 @@ sub SmartParseMIMEEntityFromScalar { # accommodate this by pausing and retrying. last if ( $fh, $temp_file ) = - eval { File::Temp::tempfile( undef, UNLINK => 0 ) }; + eval { File::Temp::tempfile( UNLINK => 0 ) }; sleep 1; } if ($fh) { @@ -546,10 +546,38 @@ sub ParseEmailAddress { @addresses = Email::Address->parse($address_string); } + $self->CleanupAddresses(@addresses); + return @addresses; } +=head2 CleanupAddresses ARRAY + +Massages an array of L objects to make their email addresses +more palatable. + +Currently this strips off surrounding single quotes around C<< ->address >> and +B<< modifies the L objects in-place >>. + +Returns the list of objects for convienence in C/C chains. + +=cut + +sub CleanupAddresses { + my $self = shift; + + for my $addr (@_) { + next unless defined $addr; + # Outlook sometimes sends addresses surrounded by single quotes; + # clean them all up + if ((my $email = $addr->address) =~ s/^'(.+)'$/$1/) { + $addr->address($email); + } + } + return @_; +} + =head2 RescueOutlook Outlook 2007/2010 have a bug when you write an email with the html format. diff --git a/rt/lib/RT/Generated.pm b/rt/lib/RT/Generated.pm index 4f74ea984..5edd7e3f8 100644 --- a/rt/lib/RT/Generated.pm +++ b/rt/lib/RT/Generated.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -50,7 +50,7 @@ package RT; use warnings; use strict; -our $VERSION = '4.0.13'; +our $VERSION = '4.0.19'; diff --git a/rt/lib/RT/Generated.pm.in b/rt/lib/RT/Generated.pm.in index 91aa84073..dc4163e34 100644 --- a/rt/lib/RT/Generated.pm.in +++ b/rt/lib/RT/Generated.pm.in @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Graph/Tickets.pm b/rt/lib/RT/Graph/Tickets.pm index 753ff20e7..477a5d077 100644 --- a/rt/lib/RT/Graph/Tickets.pm +++ b/rt/lib/RT/Graph/Tickets.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Group.pm b/rt/lib/RT/Group.pm index d4d2802ad..dc5295758 100755 --- a/rt/lib/RT/Group.pm +++ b/rt/lib/RT/Group.pm @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/GroupMember.pm b/rt/lib/RT/GroupMember.pm index e3c5e1dda..1d4090cc6 100755 --- a/rt/lib/RT/GroupMember.pm +++ b/rt/lib/RT/GroupMember.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/GroupMembers.pm b/rt/lib/RT/GroupMembers.pm index 52244bd09..49cd8debc 100755 --- a/rt/lib/RT/GroupMembers.pm +++ b/rt/lib/RT/GroupMembers.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Groups.pm b/rt/lib/RT/Groups.pm index e7734e095..c2348584e 100755 --- a/rt/lib/RT/Groups.pm +++ b/rt/lib/RT/Groups.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Handle.pm b/rt/lib/RT/Handle.pm index b449d2037..4ea1576dc 100644 --- a/rt/lib/RT/Handle.pm +++ b/rt/lib/RT/Handle.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -114,6 +114,7 @@ sub Connect { $self->SUPER::Connect( User => RT->Config->Get('DatabaseUser'), Password => RT->Config->Get('DatabasePassword'), + DisconnectHandleOnDestroy => 1, %args, ); @@ -161,7 +162,6 @@ sub BuildDSN { Port => $db_port, Driver => $db_type, RequireSSL => RT->Config->Get('DatabaseRequireSSL'), - DisconnectHandleOnDestroy => 1, ); if ( $db_type eq 'Oracle' && $db_host ) { $args{'SID'} = delete $args{'Database'}; @@ -361,6 +361,9 @@ sub CreateDatabase { elsif ( $db_type eq 'Pg' ) { $status = $dbh->do("CREATE DATABASE $db_name WITH ENCODING='UNICODE' TEMPLATE template0"); } + elsif ( $db_type eq 'mysql' ) { + $status = $dbh->do("CREATE DATABASE $db_name DEFAULT CHARACTER SET utf8"); + } else { $status = $dbh->do("CREATE DATABASE $db_name"); } @@ -872,7 +875,9 @@ sub InsertData { } if ( $item->{'BasedOn'} ) { - if ( $item->{'LookupType'} ) { + if ( $item->{'BasedOn'} =~ /^\d+$/) { + # Already have an ID -- should be fine + } elsif ( $item->{'LookupType'} ) { my $basedon = RT::CustomField->new($RT::SystemUser); my ($ok, $msg ) = $basedon->LoadByCols( Name => $item->{'BasedOn'}, LookupType => $item->{'LookupType'} ); @@ -1203,6 +1208,32 @@ sub _LogSQLStatement { push @{$self->{'StatementLog'}} , ([Time::HiRes::time(), $statement, [@bind], $duration, HTML::Mason::Exception->new->as_string]); } + +sub _TableNames { + my $self = shift; + my $dbh = shift || $self->dbh; + + { + local $@; + if ( + $dbh->{Driver}->{Name} eq 'Pg' + && $dbh->{'pg_server_version'} >= 90200 + && !eval { DBD::Pg->VERSION('2.19.3'); 1 } + ) { + die "You're using PostgreSQL 9.2 or newer. You have to upgrade DBD::Pg module to 2.19.3 or newer: $@"; + } + } + + my @res; + + my $sth = $dbh->table_info( '', undef, undef, "'TABLE'"); + while ( my $table = $sth->fetchrow_hashref ) { + push @res, $table->{TABLE_NAME} || $table->{table_name}; + } + + return @res; +} + __PACKAGE__->FinalizeDatabaseType; RT::Base->_ImportOverlays(); diff --git a/rt/lib/RT/I18N.pm b/rt/lib/RT/I18N.pm index 0e75b9f3b..bc267e438 100644 --- a/rt/lib/RT/I18N.pm +++ b/rt/lib/RT/I18N.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -388,6 +388,7 @@ sub DecodeMIMEWordsToEncoding { $enc_str = qq{"$enc_str"} if $enc_str =~ /[,;]/ and $enc_str !~ /^".*"$/ + and $prefix !~ /"$/ and $trailing !~ /^"/ and (!$field || $field =~ /^(?:To$|From$|B?Cc$|Content-)/i); $str .= $prefix . $enc_str . $trailing; diff --git a/rt/lib/RT/I18N/cs.pm b/rt/lib/RT/I18N/cs.pm index faea9d70b..30da114d0 100644 --- a/rt/lib/RT/I18N/cs.pm +++ b/rt/lib/RT/I18N/cs.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/I18N/de.pm b/rt/lib/RT/I18N/de.pm new file mode 100644 index 000000000..3a40a7f9e --- /dev/null +++ b/rt/lib/RT/I18N/de.pm @@ -0,0 +1,61 @@ +# BEGIN BPS TAGGED BLOCK {{{ +# +# COPYRIGHT: +# +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC +# +# +# (Except where explicitly superseded by other copyright notices) +# +# +# LICENSE: +# +# This work is made available to you under the terms of Version 2 of +# the GNU General Public License. A copy of that license should have +# been provided with this software, but in any event can be snarfed +# from www.gnu.org. +# +# This work is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301 or visit their web page on the internet at +# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. +# +# +# CONTRIBUTION SUBMISSION POLICY: +# +# (The following paragraph is not intended to limit the rights granted +# to you to modify and distribute this software under the terms of +# the GNU General Public License and is only of importance to you if +# you choose to contribute your changes and enhancements to the +# community by submitting them to Best Practical Solutions, LLC.) +# +# By intentionally submitting any modifications, corrections or +# derivatives to this work, or any other work intended for use with +# Request Tracker, to Best Practical Solutions, LLC, you confirm that +# you are the copyright holder for those contributions and you grant +# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, +# royalty-free, perpetual, license to use, copy, create derivative +# works based on those contributions, and sublicense and distribute +# those contributions and any derivatives thereof. +# +# END BPS TAGGED BLOCK }}} + +use strict; +use warnings; + +package RT::I18N::de; +use base 'RT::I18N'; + +sub init { + $_[0]->{numf_comma} = 1; +} + +RT::Base->_ImportOverlays(); + +1; diff --git a/rt/sbin/rt-session-viewer b/rt/lib/RT/I18N/fr.pm old mode 100755 new mode 100644 similarity index 50% rename from rt/sbin/rt-session-viewer rename to rt/lib/RT/I18N/fr.pm index 1a6334d94..23b047a91 --- a/rt/sbin/rt-session-viewer +++ b/rt/lib/RT/I18N/fr.pm @@ -1,41 +1,40 @@ -#!/usr/bin/perl # BEGIN BPS TAGGED BLOCK {{{ -# +# # COPYRIGHT: -# -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC -# -# +# +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC +# +# # (Except where explicitly superseded by other copyright notices) -# -# +# +# # LICENSE: -# +# # This work is made available to you under the terms of Version 2 of # the GNU General Public License. A copy of that license should have # been provided with this software, but in any event can be snarfed # from www.gnu.org. -# +# # This work is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301 or visit their web page on the internet at # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. -# -# +# +# # CONTRIBUTION SUBMISSION POLICY: -# +# # (The following paragraph is not intended to limit the rights granted # to you to modify and distribute this software under the terms of # the GNU General Public License and is only of importance to you if # you choose to contribute your changes and enhancements to the # community by submitting them to Best Practical Solutions, LLC.) -# +# # By intentionally submitting any modifications, corrections or # derivatives to this work, or any other work intended for use with # Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -44,78 +43,27 @@ # royalty-free, perpetual, license to use, copy, create derivative # works based on those contributions, and sublicense and distribute # those contributions and any derivatives thereof. -# +# # END BPS TAGGED BLOCK }}} + use strict; use warnings; +use utf8; -# fix lib paths, some may be relative -BEGIN { - require File::Spec; - my @libs = ("/opt/rt3/lib", "/opt/rt3/local/lib"); - my $bin_path; - - for my $lib (@libs) { - unless ( File::Spec->file_name_is_absolute($lib) ) { - unless ($bin_path) { - if ( File::Spec->file_name_is_absolute(__FILE__) ) { - $bin_path = ( File::Spec->splitpath(__FILE__) )[1]; - } - else { - require FindBin; - no warnings "once"; - $bin_path = $FindBin::Bin; - } - } - $lib = File::Spec->catfile( $bin_path, File::Spec->updir, $lib ); - } - unshift @INC, $lib; - } -} - -use Getopt::Long; -my %opt; -GetOptions( \%opt, 'help|h', ); - -my $session_id = shift; +package RT::I18N::fr; +use base 'RT::I18N'; -if ( $opt{help} || !$session_id ) { - require Pod::Usage; - Pod::Usage::pod2usage({ verbose => 2 }); - exit; -} - -require RT; -RT::LoadConfig(); -RT::Init(); - -require RT::Interface::Web::Session; -my %session; +use strict; +use warnings; -tie %session, 'RT::Interface::Web::Session', $session_id; -unless ( $session{'_session_id'} eq $session_id ) { - print STDERR "Couldn't load session $session_id\n"; - exit 1; +sub numf { + my ($handle, $num) = @_[0,1]; + my $fr_num = $handle->SUPER::numf($num); + # French prefer to print 1000 as 1 000 rather than 1,000 + $fr_num =~ tr<.,><, >; + return $fr_num; } -use Data::Dumper; -print "Content of session $session_id: ". Dumper( \%session); - -__END__ - -=head1 NAME - -rt-session-viewer - show the content of a user's session - -=head1 SYNOPSIS - - # show the content of a session - rt-session-viewer 2c21c8a2909c14eff12975dd2cc7b9a3 - -=head1 DESCRIPTION - -This script deserializes and print content of a session identified -by . May be useful for developers and for troubleshooting -problems. +RT::Base->_ImportOverlays(); -=cut +1; diff --git a/rt/lib/RT/I18N/i_default.pm b/rt/lib/RT/I18N/i_default.pm index 2b48c629c..316f51a64 100644 --- a/rt/lib/RT/I18N/i_default.pm +++ b/rt/lib/RT/I18N/i_default.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/I18N/ru.pm b/rt/lib/RT/I18N/ru.pm index a98636f19..5b34d777a 100755 --- a/rt/lib/RT/I18N/ru.pm +++ b/rt/lib/RT/I18N/ru.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Installer.pm b/rt/lib/RT/Installer.pm index d876e10aa..c48b06c1f 100644 --- a/rt/lib/RT/Installer.pm +++ b/rt/lib/RT/Installer.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Interface/CLI.pm b/rt/lib/RT/Interface/CLI.pm index c1a6f4fe8..feef6b802 100644 --- a/rt/lib/RT/Interface/CLI.pm +++ b/rt/lib/RT/Interface/CLI.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Interface/Email.pm b/rt/lib/RT/Interface/Email.pm index ab319e665..74120ba07 100755 --- a/rt/lib/RT/Interface/Email.pm +++ b/rt/lib/RT/Interface/Email.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -431,21 +431,24 @@ sub SendEmail { # SetOutgoingMailFrom and bounces conflict, since they both want -f if ( $args{'Bounce'} ) { push @args, shellwords(RT->Config->Get('SendmailBounceArguments')); - } elsif ( RT->Config->Get('SetOutgoingMailFrom') ) { - my $OutgoingMailAddress; + } elsif ( my $MailFrom = RT->Config->Get('SetOutgoingMailFrom') ) { + my $OutgoingMailAddress = $MailFrom =~ /\@/ ? $MailFrom : undef; + my $Overrides = RT->Config->Get('OverrideOutgoingMailFrom') || {}; if ($TicketObj) { my $QueueName = $TicketObj->QueueObj->Name; - my $QueueAddressOverride = RT->Config->Get('OverrideOutgoingMailFrom')->{$QueueName}; + my $QueueAddressOverride = $Overrides->{$QueueName}; if ($QueueAddressOverride) { $OutgoingMailAddress = $QueueAddressOverride; } else { - $OutgoingMailAddress = $TicketObj->QueueObj->CorrespondAddress; + $OutgoingMailAddress ||= $TicketObj->QueueObj->CorrespondAddress + || RT->Config->Get('CorrespondAddress'); } } - - $OutgoingMailAddress ||= RT->Config->Get('OverrideOutgoingMailFrom')->{'Default'}; + elsif ($Overrides->{'Default'}) { + $OutgoingMailAddress = $Overrides->{'Default'}; + } push @args, "-f", $OutgoingMailAddress if $OutgoingMailAddress; @@ -1084,7 +1087,7 @@ sub ParseCcAddressesFromHead { && !IgnoreCcAddress( $_ ) } map lc $user->CanonicalizeEmailAddress( $_->address ), - map Email::Address->parse( $args{'Head'}->get( $_ ) ), + map RT::EmailParser->CleanupAddresses( Email::Address->parse( $args{'Head'}->get( $_ ) ) ), qw(To Cc); } @@ -1464,6 +1467,9 @@ sub Gateway { my $head = $Message->head; my $ErrorsTo = ParseErrorsToAddressFromHead( $head ); + my $Sender = (ParseSenderAddressFromHead( $head ))[0]; + my $From = $head->get("From"); + chomp $From if defined $From; my $MessageId = $head->get('Message-ID') || "Config->Get('Organization') .'>'; @@ -1548,7 +1554,8 @@ sub Gateway { ); return ( 0, - "$ErrorsTo tried to submit a message to " + ($CurrentUser->EmailAddress || $CurrentUser->Name) + . " ($Sender) tried to submit a message to " . $args{'Queue'} . " without permission.", undef @@ -1595,7 +1602,7 @@ sub Gateway { Explanation => $ErrStr, MIMEObj => $Message ); - return ( 0, "Ticket creation failed: $ErrStr", $Ticket ); + return ( 0, "Ticket creation From: $From failed: $ErrStr", $Ticket ); } # strip comments&corresponds from the actions we don't need @@ -1640,7 +1647,7 @@ sub Gateway { Explanation => $msg, MIMEObj => $Message ); - return ( 0, "Message not recorded: $msg", $Ticket ); + return ( 0, "Message From: $From not recorded: $msg", $Ticket ); } } elsif ($unsafe_actions) { my ( $status, $msg ) = _RunUnsafeAction( @@ -1739,6 +1746,8 @@ sub _RunUnsafeAction { @_ ); + my $From = $args{Message}->head->get("From"); + if ( $args{'Action'} =~ /^take$/i ) { my ( $status, $msg ) = $args{'Ticket'}->SetOwner( $args{'CurrentUser'}->id ); unless ($status) { @@ -1748,7 +1757,7 @@ sub _RunUnsafeAction { Explanation => $msg, MIMEObj => $args{'Message'} ); - return ( 0, "Ticket not taken" ); + return ( 0, "Ticket not taken, by email From: $From" ); } } elsif ( $args{'Action'} =~ /^resolve$/i ) { my $new_status = $args{'Ticket'}->FirstInactiveStatus; @@ -1763,11 +1772,11 @@ sub _RunUnsafeAction { Explanation => $msg, MIMEObj => $args{'Message'} ); - return ( 0, "Ticket not resolved" ); + return ( 0, "Ticket not resolved, by email From: $From" ); } } } else { - return ( 0, "Not supported unsafe action $args{'Action'}", $args{'Ticket'} ); + return ( 0, "Not supported unsafe action $args{'Action'}, by email From: $From", $args{'Ticket'} ); } return ( 1, "Success" ); } diff --git a/rt/lib/RT/Interface/Email/Auth/GnuPG.pm b/rt/lib/RT/Interface/Email/Auth/GnuPG.pm index c14bcf074..5137707e5 100755 --- a/rt/lib/RT/Interface/Email/Auth/GnuPG.pm +++ b/rt/lib/RT/Interface/Email/Auth/GnuPG.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Interface/Email/Auth/MailFrom.pm b/rt/lib/RT/Interface/Email/Auth/MailFrom.pm index bfe493958..b353907fb 100644 --- a/rt/lib/RT/Interface/Email/Auth/MailFrom.pm +++ b/rt/lib/RT/Interface/Email/Auth/MailFrom.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Interface/REST.pm b/rt/lib/RT/Interface/REST.pm index 5f8ff99b7..17fe44669 100644 --- a/rt/lib/RT/Interface/REST.pm +++ b/rt/lib/RT/Interface/REST.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -47,12 +47,13 @@ # END BPS TAGGED BLOCK }}} package RT::Interface::REST; +use LWP::MediaTypes qw(guess_media_type); use strict; use warnings; use RT; use base 'Exporter'; -our @EXPORT = qw(expand_list form_parse form_compose vpush vsplit); +our @EXPORT = qw(expand_list form_parse form_compose vpush vsplit process_attachments); sub custom_field_spec { my $self = shift; @@ -296,6 +297,45 @@ sub vsplit { return \@words; } +sub process_attachments { + my $entity = shift; + my @list = @_; + return 1 unless @list; + + my $m = $HTML::Mason::Commands::m; + my $cgi = $m->cgi_object; + + my $i = 1; + foreach my $e ( @list ) { + + my $fh = $cgi->upload("attachment_$i"); + return (0, "No attachment for $e") unless $fh; + + local $/=undef; + + my $file = $e; + $file =~ s#^.*[\\/]##; + + my ($tmp_fh, $tmp_fn) = File::Temp::tempfile( UNLINK => 1 ); + + my $buf; + while (sysread($fh, $buf, 8192)) { + syswrite($tmp_fh, $buf); + } + + my $info = $cgi->uploadInfo($fh); + my $new_entity = $entity->attach( + Path => $tmp_fn, + Type => $info->{'Content-Type'} || guess_media_type($tmp_fn), + Filename => $file, + Disposition => "attachment", + ); + $new_entity->bodyhandle->{'_dirty_hack_to_save_a_ref_tmp_fh'} = $tmp_fh; + $i++; + } + return (1); +} + RT::Base->_ImportOverlays(); 1; diff --git a/rt/lib/RT/Interface/Web.pm b/rt/lib/RT/Interface/Web.pm index 5ca4a9f63..1f2f488fb 100644 --- a/rt/lib/RT/Interface/Web.pm +++ b/rt/lib/RT/Interface/Web.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -1283,10 +1283,16 @@ our %is_whitelisted_component = ( # While these can be used for denial-of-service against RT # (construct a very inefficient query and trick lots of users into # running them against RT) it's incredibly useful to be able to link - # to a search result or bookmark a result page. + # to a search result (or chart) or bookmark a result page. '/Search/Results.html' => 1, '/Search/Simple.html' => 1, - '/m/tickets/search' => 1, + '/m/tickets/search' => 1, + '/Search/Chart.html' => 1, + + # This page takes Attachment and Transaction argument to figure + # out what to show, but it's read only and will deny information if you + # don't have ShowOutgoingEmail. + '/Ticket/ShowEmailRecord.html' => 1, ); # Components which are blacklisted from automatic, argument-based whitelisting. @@ -1762,7 +1768,7 @@ sub CreateTicket { $RT::Logger->error("Couldn't make multipart message") if !$rv || $rv !~ /^(?:DONE|ALREADY)$/; - foreach ( values %{ $ARGS{'Attachments'} } ) { + foreach ( map $ARGS{Attachments}->{$_}, sort keys %{ $ARGS{'Attachments'} } ) { unless ($_) { $RT::Logger->error("Couldn't add empty attachemnt"); next; @@ -2017,7 +2023,8 @@ sub ProcessUpdateMessage { if ( $args{ARGSRef}->{'UpdateAttachments'} ) { $Message->make_multipart; - $Message->add_part($_) foreach values %{ $args{ARGSRef}->{'UpdateAttachments'} }; + $Message->add_part($_) foreach map $args{ARGSRef}->{UpdateAttachments}{$_}, + sort keys %{ $args{ARGSRef}->{'UpdateAttachments'} }; } if ( $args{ARGSRef}->{'AttachTickets'} ) { @@ -2619,18 +2626,23 @@ sub ProcessTicketReminders { while ( my $reminder = $reminder_collection->Next ) { my $resolve_status = $reminder->QueueObj->Lifecycle->ReminderStatusOnResolve; if ( $reminder->Status ne $resolve_status && $args->{ 'Complete-Reminder-' . $reminder->id } ) { - $Ticket->Reminders->Resolve($reminder); + my ($status, $msg) = $Ticket->Reminders->Resolve($reminder); + push @results, loc("Reminder #[_1]: [_2]", $reminder->id, $msg); + } elsif ( $reminder->Status eq $resolve_status && !$args->{ 'Complete-Reminder-' . $reminder->id } ) { - $Ticket->Reminders->Open($reminder); + my ($status, $msg) = $Ticket->Reminders->Open($reminder); + push @results, loc("Reminder #[_1]: [_2]", $reminder->id, $msg); } if ( exists( $args->{ 'Reminder-Subject-' . $reminder->id } ) && ( $reminder->Subject ne $args->{ 'Reminder-Subject-' . $reminder->id } )) { - $reminder->SetSubject( $args->{ 'Reminder-Subject-' . $reminder->id } ) ; + my ($status, $msg) = $reminder->SetSubject( $args->{ 'Reminder-Subject-' . $reminder->id } ) ; + push @results, loc("Reminder #[_1]: [_2]", $reminder->id, $msg); } if ( exists( $args->{ 'Reminder-Owner-' . $reminder->id } ) && ( $reminder->Owner != $args->{ 'Reminder-Owner-' . $reminder->id } )) { - $reminder->SetOwner( $args->{ 'Reminder-Owner-' . $reminder->id } , "Force" ) ; + my ($status, $msg) = $reminder->SetOwner( $args->{ 'Reminder-Owner-' . $reminder->id } , "Force" ) ; + push @results, loc("Reminder #[_1]: [_2]", $reminder->id, $msg); } if ( exists( $args->{ 'Reminder-Due-' . $reminder->id } ) && $args->{ 'Reminder-Due-' . $reminder->id } ne '' ) { @@ -2640,7 +2652,8 @@ sub ProcessTicketReminders { Value => $args->{ 'Reminder-Due-' . $reminder->id } ); if ( defined $DateObj->Unix && $DateObj->Unix != $reminder->DueObj->Unix ) { - $reminder->SetDue( $DateObj->ISO ); + my ($status, $msg) = $reminder->SetDue( $DateObj->ISO ); + push @results, loc("Reminder #[_1]: [_2]", $reminder->id, $msg); } } } @@ -3180,7 +3193,8 @@ sub GetColumnMapEntry { } # complex things - elsif ( my ( $mainkey, $subkey ) = $args{'Name'} =~ /^(.*?)\.{(.+)}$/ ) { + elsif ( my ( $mainkey, $subkey ) = $args{'Name'} =~ /^(.*?)\.(.+)$/ ) { + $subkey =~ s/^\{(.*)\}$/$1/; return undef unless $args{'Map'}->{$mainkey}; return $args{'Map'}{$mainkey}{ $args{'Attribute'} } unless ref $args{'Map'}{$mainkey}{ $args{'Attribute'} } eq 'CODE'; diff --git a/rt/lib/RT/Interface/Web/Handler.pm b/rt/lib/RT/Interface/Web/Handler.pm index a1784c2cc..37031b18d 100644 --- a/rt/lib/RT/Interface/Web/Handler.pm +++ b/rt/lib/RT/Interface/Web/Handler.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Interface/Web/Menu.pm b/rt/lib/RT/Interface/Web/Menu.pm index e4e08d63b..e7833828c 100644 --- a/rt/lib/RT/Interface/Web/Menu.pm +++ b/rt/lib/RT/Interface/Web/Menu.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Interface/Web/QueryBuilder.pm b/rt/lib/RT/Interface/Web/QueryBuilder.pm index 546427833..a1b066227 100755 --- a/rt/lib/RT/Interface/Web/QueryBuilder.pm +++ b/rt/lib/RT/Interface/Web/QueryBuilder.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Interface/Web/QueryBuilder/Tree.pm b/rt/lib/RT/Interface/Web/QueryBuilder/Tree.pm index 9bbd876e5..f9305545f 100755 --- a/rt/lib/RT/Interface/Web/QueryBuilder/Tree.pm +++ b/rt/lib/RT/Interface/Web/QueryBuilder/Tree.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Interface/Web/Request.pm b/rt/lib/RT/Interface/Web/Request.pm index cdd4594d6..13d667288 100644 --- a/rt/lib/RT/Interface/Web/Request.pm +++ b/rt/lib/RT/Interface/Web/Request.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Interface/Web/Session.pm b/rt/lib/RT/Interface/Web/Session.pm index 4edd9bd2e..aded596c4 100644 --- a/rt/lib/RT/Interface/Web/Session.pm +++ b/rt/lib/RT/Interface/Web/Session.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -192,7 +192,7 @@ sub _ClearOldDB { die "couldn't execute query: ". $dbh->errstr unless defined $rows; } - $RT::Logger->info("successfuly deleted $rows sessions"); + $RT::Logger->info("successfully deleted $rows sessions"); return; } @@ -222,15 +222,53 @@ sub _ClearOldDir { next; } tied(%session)->delete; - $RT::Logger->info("successfuly deleted session '$id'"); + $RT::Logger->info("successfully deleted session '$id'"); } + # Apache::Session::Lock::File will clean out locks older than X, but it + # leaves around bogus locks if they're too new, even though they're + # guaranteed dead. On even just largeish installs, the accumulated number + # of them may bump into ext3/4 filesystem limits since Apache::Session + # doesn't use a fan-out tree. my $lock = Apache::Session::Lock::File->new; $lock->clean( $dir, $older_than ); + # Take matters into our own hands and clear bogus locks hanging around + # regardless of how recent they are. + $self->ClearOrphanLockFiles($dir); + return; } +=head3 ClearOrphanLockFiles + +Takes a directory in which to look for L locks +which no longer have a corresponding session file. If not provided, the +directory is taken from the session configuration data. + +=cut + +sub ClearOrphanLockFiles { + my $class = shift; + my $dir = shift || $class->Attributes->{Directory} + or return; + + if (opendir my $dh, $dir) { + for (readdir $dh) { + next unless /^Apache-Session-([0-9a-f]{32})\.lock$/; + next if -e "$dir/$1"; + + RT->Logger->debug("deleting orphaned session lockfile '$_'"); + + unlink "$dir/$_" + or warn "Failed to unlink session lockfile $dir/$_: $!"; + } + closedir $dh; + } else { + warn "Unable to open directory '$dir' for reading: $!"; + } +} + =head3 ClearByUser Checks all sessions and if user has more then one session @@ -243,6 +281,7 @@ sub ClearByUser { my $class = $self->Class; my $attrs = $self->Attributes; + my $deleted; my %seen = (); foreach my $id( @{ $self->Ids } ) { my %session; @@ -259,8 +298,10 @@ sub ClearByUser { } } tied(%session)->delete; - $RT::Logger->info("successfuly deleted session '$id'"); + $RT::Logger->info("successfully deleted session '$id'"); + $deleted++; } + $self->ClearOrphanLockFiles if $deleted; } sub TIEHASH { @@ -276,10 +317,8 @@ sub TIEHASH { eval { tie %session, $class, $id, $attrs }; eval { tie %session, $class, undef, $attrs } if $@; if ( $@ ) { - die loc("RT couldn't store your session.") . "\n" - . loc("This may mean that that the directory '[_1]' isn't writable or a database table is missing or corrupt.", - $RT::MasonSessionDir) - . "\n\n" + die "RT couldn't store your session. " + . "This may mean that that the directory '$RT::MasonSessionDir' isn't writable or a database table is missing or corrupt.\n\n" . $@; } diff --git a/rt/lib/RT/Lifecycle.pm b/rt/lib/RT/Lifecycle.pm index c90528258..accef228f 100644 --- a/rt/lib/RT/Lifecycle.pm +++ b/rt/lib/RT/Lifecycle.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -707,11 +707,11 @@ sub FillCache { } my %seen; - @statuses = grep !$seen{ $_ }++, @statuses; + @statuses = grep !$seen{ lc $_ }++, @statuses; $lifecycle->{''} = \@statuses; unless ( $lifecycle->{'transitions'}{''} ) { - $lifecycle->{'transitions'}{''} = [ grep $_ ne 'deleted', @statuses ]; + $lifecycle->{'transitions'}{''} = [ grep lc $_ ne 'deleted', @statuses ]; } my @actions; @@ -767,7 +767,7 @@ sub FillCache { foreach my $type ( qw(initial active inactive), '' ) { my %seen; - @{ $all{ $type } } = grep !$seen{ $_ }++, @{ $all{ $type } }; + @{ $all{ $type } } = grep !$seen{ lc $_ }++, @{ $all{ $type } }; push @{ $all{''} }, @{ $all{ $type } } if $type; } $LIFECYCLES_CACHE{''} = \%all; diff --git a/rt/lib/RT/Link.pm b/rt/lib/RT/Link.pm index 7a277473f..305c34503 100644 --- a/rt/lib/RT/Link.pm +++ b/rt/lib/RT/Link.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Links.pm b/rt/lib/RT/Links.pm index af36a5bdc..d90865daf 100644 --- a/rt/lib/RT/Links.pm +++ b/rt/lib/RT/Links.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/ObjectClass.pm b/rt/lib/RT/ObjectClass.pm index 684af132d..7fd8d9066 100644 --- a/rt/lib/RT/ObjectClass.pm +++ b/rt/lib/RT/ObjectClass.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/ObjectClasses.pm b/rt/lib/RT/ObjectClasses.pm index 01cf77f8e..b179180d7 100644 --- a/rt/lib/RT/ObjectClasses.pm +++ b/rt/lib/RT/ObjectClasses.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/ObjectCustomField.pm b/rt/lib/RT/ObjectCustomField.pm index e7f350a5a..1acf891f2 100644 --- a/rt/lib/RT/ObjectCustomField.pm +++ b/rt/lib/RT/ObjectCustomField.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/ObjectCustomFieldValue.pm b/rt/lib/RT/ObjectCustomFieldValue.pm index 63da581ce..de4bc748d 100644 --- a/rt/lib/RT/ObjectCustomFieldValue.pm +++ b/rt/lib/RT/ObjectCustomFieldValue.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/ObjectCustomFieldValues.pm b/rt/lib/RT/ObjectCustomFieldValues.pm index a1d5391f8..486265e26 100644 --- a/rt/lib/RT/ObjectCustomFieldValues.pm +++ b/rt/lib/RT/ObjectCustomFieldValues.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/ObjectCustomFields.pm b/rt/lib/RT/ObjectCustomFields.pm index 5bdc069ba..97e4f91fb 100644 --- a/rt/lib/RT/ObjectCustomFields.pm +++ b/rt/lib/RT/ObjectCustomFields.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/ObjectTopic.pm b/rt/lib/RT/ObjectTopic.pm index 8ca01ae9d..a5e36c348 100644 --- a/rt/lib/RT/ObjectTopic.pm +++ b/rt/lib/RT/ObjectTopic.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/ObjectTopics.pm b/rt/lib/RT/ObjectTopics.pm index bdcff7755..f376f53d7 100644 --- a/rt/lib/RT/ObjectTopics.pm +++ b/rt/lib/RT/ObjectTopics.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Plugin.pm b/rt/lib/RT/Plugin.pm index 1f97ec22d..82f4de2b2 100644 --- a/rt/lib/RT/Plugin.pm +++ b/rt/lib/RT/Plugin.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Pod/HTML.pm b/rt/lib/RT/Pod/HTML.pm index 689606323..69045595b 100644 --- a/rt/lib/RT/Pod/HTML.pm +++ b/rt/lib/RT/Pod/HTML.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -54,6 +54,10 @@ use base 'Pod::Simple::XHTML'; use HTML::Entities qw//; +__PACKAGE__->_accessorize( + "batch" +); + sub new { my $self = shift->SUPER::new(@_); $self->index(1); @@ -118,27 +122,35 @@ sub resolve_local_link { my $self = shift; my ($name, $section) = @_; + $name .= ""; # stringify name, it may be an object + $section = defined $section ? '#' . $self->idify($section, 1) : ''; my $local; - if ($name =~ /^RT::/) { + if ($name =~ /^RT(::(?!Extension::|Authen::)|$)/ or $self->batch->found($name)) { $local = join "/", map { $self->encode_entities($_) } split /::/, $name; } - elsif ($name =~ /^rt[-_]/) { + elsif ($name =~ /^rt([-_]|$)/) { $local = $self->encode_entities($name); } - elsif ($name eq "RT_Config" or $name eq "RT_Config.pm") { - $local = "RT_Config"; + elsif ($name =~ /^(\w+)_Config(\.pm)?$/) { + $name = "$1_Config"; + $local = "$1_Config"; + } + elsif ($name eq 'README') { + # We process README separately in devel/tools/rt-static-docs + $local = $name; } # These matches handle links that look like filenames, such as those we # parse out of F<> tags. elsif ( $name =~ m{^(?:lib/)(RT/[\w/]+?)\.pm$} or $name =~ m{^(?:docs/)(.+?)\.pod$}) { + $name = join "::", split '/', $1; $local = join "/", map { $self->encode_entities($_) } split /\//, $1; @@ -146,11 +158,20 @@ sub resolve_local_link { if ($local) { # Resolve links correctly by going up - my $depth = $self->batch_mode_current_level - 1; - return ($depth ? "../" x $depth : "") . "$local.html$section"; + my $found = $self->batch->found($name); + my $depth = $self->batch_mode_current_level + + ($found ? -1 : 1); + return ($depth ? "../" x $depth : "") . ($found ? "" : "rt/latest/") . "$local.html$section"; } else { return; } } +sub batch_mode_page_object_init { + my ($self, $batch, $module, $infile, $outfile, $depth) = @_; + $self->SUPER::batch_mode_page_object_init(@_[1..$#_]); + $self->batch( $batch ); + return $self; +} + 1; diff --git a/rt/lib/RT/Pod/HTMLBatch.pm b/rt/lib/RT/Pod/HTMLBatch.pm index f41a43acb..2545ea91c 100644 --- a/rt/lib/RT/Pod/HTMLBatch.pm +++ b/rt/lib/RT/Pod/HTMLBatch.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -84,7 +84,7 @@ sub classify { my %page = @_; local $_ = $page{name}; return 1 if /^(README|UPGRADING)/; - return 1 if $_ eq "RT_Config"; + return 1 if /^RT\w*?_Config$/; return 1 if $_ eq "web_deployment"; return 1 if $page{infile} =~ m{^configure(\.ac)?$}; return 0; @@ -176,4 +176,9 @@ sub esc { Pod::Simple::HTMLBatch::esc(@_); } +sub found { + my ($self, $module) = @_; + return grep { $_->[0] eq $module } @{$self->_contents}; +} + 1; diff --git a/rt/lib/RT/Pod/Search.pm b/rt/lib/RT/Pod/Search.pm index 29e7d437c..e0670ea3b 100644 --- a/rt/lib/RT/Pod/Search.pm +++ b/rt/lib/RT/Pod/Search.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Principal.pm b/rt/lib/RT/Principal.pm index 175f1b003..76582d675 100644 --- a/rt/lib/RT/Principal.pm +++ b/rt/lib/RT/Principal.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -263,8 +263,9 @@ sub HasRight { return 1; } - $args{'Right'} = RT::ACE->CanonicalizeRightName( $args{'Right'} ); - unless ( $args{'Right'} ) { + if ( my $right = RT::ACE->CanonicalizeRightName( $args{'Right'} ) ) { + $args{'Right'} = $right; + } else { $RT::Logger->error( "Invalid right. Couldn't canonicalize right '$args{'Right'}'"); return undef; diff --git a/rt/lib/RT/Principals.pm b/rt/lib/RT/Principals.pm index 9cf8cbb39..145ec17af 100644 --- a/rt/lib/RT/Principals.pm +++ b/rt/lib/RT/Principals.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -78,6 +78,7 @@ sub Table { 'Principals'} sub _Init { my $self = shift; + $self->{'with_disabled_column'} = 1; return ( $self->SUPER::_Init(@_) ); } diff --git a/rt/lib/RT/Queue.pm b/rt/lib/RT/Queue.pm index ee68b8195..677a05af8 100755 --- a/rt/lib/RT/Queue.pm +++ b/rt/lib/RT/Queue.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Queues.pm b/rt/lib/RT/Queues.pm index 45cb686e0..f5cd2b2b5 100755 --- a/rt/lib/RT/Queues.pm +++ b/rt/lib/RT/Queues.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Record.pm b/rt/lib/RT/Record.pm index 6601a0df2..59867aae8 100755 --- a/rt/lib/RT/Record.pm +++ b/rt/lib/RT/Record.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -730,9 +730,20 @@ sub _Accessible { } -=head2 _EncodeLOB BODY MIME_TYPE +=head2 _EncodeLOB BODY MIME_TYPE FILENAME -Takes a potentially large attachment. Returns (ContentEncoding, EncodedBody) based on system configuration and selected database +Takes a potentially large attachment. Returns (ContentEncoding, +EncodedBody, MimeType, Filename) based on system configuration and +selected database. Returns a custom (short) text/plain message if +DropLongAttachments causes an attachment to not be stored. + +Encodes your data as base64 or Quoted-Printable as needed based on your +Databases's restrictions and the UTF-8ness of the data being passed in. Since +we are storing in columns marked UTF8, we must ensure that binary data is +encoded on databases which are strict. + +This function expects to receive an octet string in order to properly +evaluate and encode it. It will return an octet string. =cut @@ -760,7 +771,7 @@ sub _EncodeLOB { $MaxSize = $MaxSize * 3 / 4; # Some databases (postgres) can't handle non-utf8 data } elsif ( !$RT::Handle->BinarySafeBLOBs - && $MIMEType !~ /text\/plain/gi + && $Body =~ /\P{ASCII}/ && !Encode::is_utf8( $Body, 1 ) ) { $ContentEncoding = 'quoted-printable'; } @@ -784,7 +795,7 @@ sub _EncodeLOB { . length($Body)); $RT::Logger->info( "It started: " . substr( $Body, 0, 60 ) ); $Filename .= ".txt" if $Filename; - return ("none", "Large attachment dropped", "plain/text", $Filename ); + return ("none", "Large attachment dropped", "text/plain", $Filename ); } } @@ -805,6 +816,27 @@ sub _EncodeLOB { } +=head2 _DecodeLOB + +Unpacks data stored in the database, which may be base64 or QP encoded +because of our need to store binary and badly encoded data in columns +marked as UTF-8. Databases such as PostgreSQL and Oracle care that you +are feeding them invalid UTF-8 and will refuse the content. This +function handles unpacking the encoded data. + +It returns textual data as a UTF-8 string which has been processed by Encode's +PERLQQ filter which will replace the invalid bytes with \x{HH} so you can see +the invalid byte but won't run into problems treating the data as UTF-8 later. + +This is similar to how we filter all data coming in via the web UI in +RT::Interface::Web::DecodeARGS. This filter should only end up being +applied to old data from less UTF-8-safe versions of RT. + +Important Note - This function expects an octet string and returns a +character string for non-binary data. + +=cut + sub _DecodeLOB { my $self = shift; my $ContentType = shift || ''; @@ -821,7 +853,7 @@ sub _DecodeLOB { return ( $self->loc( "Unknown ContentEncoding [_1]", $ContentEncoding ) ); } if ( RT::I18N::IsTextualContentType($ContentType) ) { - $Content = Encode::decode_utf8($Content) unless Encode::is_utf8($Content); + $Content = Encode::decode('UTF-8',$Content,Encode::FB_PERLQQ) unless Encode::is_utf8($Content); } return ($Content); } @@ -1372,7 +1404,7 @@ sub _AddLink { if ( $args{'Base'} and $args{'Target'} ) { $RT::Logger->debug( "$self tried to create a link. both base and target were specified" ); - return ( 0, $self->loc("Can't specifiy both base and target") ); + return ( 0, $self->loc("Can't specify both base and target") ); } elsif ( $args{'Base'} ) { $args{'Target'} = $self->URI(); @@ -1450,7 +1482,7 @@ sub _DeleteLink { if ( $args{'Base'} and $args{'Target'} ) { $RT::Logger->debug("$self ->_DeleteLink. got both Base and Target"); - return ( 0, $self->loc("Can't specifiy both base and target") ); + return ( 0, $self->loc("Can't specify both base and target") ); } elsif ( $args{'Base'} ) { $args{'Target'} = $self->URI(); @@ -1686,7 +1718,7 @@ Returns the path RT uses to figure out which custom fields apply to this object. sub CustomFieldLookupType { my $self = shift; - return ref($self); + return ref($self) || $self; } @@ -1789,7 +1821,7 @@ sub _AddCustomFieldValue { my $is_the_same = 1; if ( defined $args{'Value'} ) { $is_the_same = 0 unless defined $old_content - && lc $old_content eq lc $args{'Value'}; + && $old_content eq $args{'Value'}; } else { $is_the_same = 0 if defined $old_content; } diff --git a/rt/lib/RT/Reminders.pm b/rt/lib/RT/Reminders.pm index 42f4e1d2f..133dbf030 100644 --- a/rt/lib/RT/Reminders.pm +++ b/rt/lib/RT/Reminders.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -122,7 +122,7 @@ sub Add { return ( 0, $self->loc( "Failed to load ticket [_1]", $self->Ticket ) ); } - if ( $ticket->Status eq 'deleted' ) { + if ( lc $ticket->Status eq 'deleted' ) { return ( 0, $self->loc("Can't link to a deleted ticket") ); } @@ -134,6 +134,7 @@ sub Add { RefersTo => $self->Ticket, Type => 'reminder', Queue => $self->TicketObj->Queue, + Status => $self->TicketObj->QueueObj->Lifecycle->ReminderStatusOnOpen, ); $self->TicketObj->_NewTransaction( Type => 'AddReminder', diff --git a/rt/lib/RT/Report/Tickets.pm b/rt/lib/RT/Report/Tickets.pm index b73bbaaa3..aa27b17f3 100644 --- a/rt/lib/RT/Report/Tickets.pm +++ b/rt/lib/RT/Report/Tickets.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -111,7 +111,7 @@ sub Groupings { sub Label { my $self = shift; my $field = shift; - if ( $field =~ /^(?:CF|CustomField)\.{(.*)}$/ ) { + if ( $field =~ /^(?:CF|CustomField)\.\{(.*)\}$/ ) { my $cf = $1; return $self->CurrentUser->loc( "Custom field '[_1]'", $cf ) if $cf =~ /\D/; my $obj = RT::CustomField->new( $self->CurrentUser ); @@ -239,7 +239,7 @@ sub _FieldToFunction { $func = "SUBSTR($func,1,4)"; } $args{'FUNCTION'} = $func; - } elsif ( $field =~ /^(?:CF|CustomField)\.{(.*)}$/ ) { #XXX: use CFDecipher method + } elsif ( $field =~ /^(?:CF|CustomField)\.\{(.*)\}$/ ) { #XXX: use CFDecipher method my $cf_name = $1; my $cf = RT::CustomField->new( $self->CurrentUser ); $cf->Load($cf_name); diff --git a/rt/lib/RT/Report/Tickets/Entry.pm b/rt/lib/RT/Report/Tickets/Entry.pm index eb3899319..fc0b63394 100644 --- a/rt/lib/RT/Report/Tickets/Entry.pm +++ b/rt/lib/RT/Report/Tickets/Entry.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Rule.pm b/rt/lib/RT/Rule.pm index c5c8b0920..675191535 100644 --- a/rt/lib/RT/Rule.pm +++ b/rt/lib/RT/Rule.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Ruleset.pm b/rt/lib/RT/Ruleset.pm index 26227b759..e6267da06 100644 --- a/rt/lib/RT/Ruleset.pm +++ b/rt/lib/RT/Ruleset.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/SQL.pm b/rt/lib/RT/SQL.pm index 15715a762..94b56653c 100644 --- a/rt/lib/RT/SQL.pm +++ b/rt/lib/RT/SQL.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/SavedSearch.pm b/rt/lib/RT/SavedSearch.pm index 7c4df8b76..3e0e928eb 100644 --- a/rt/lib/RT/SavedSearch.pm +++ b/rt/lib/RT/SavedSearch.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/SavedSearches.pm b/rt/lib/RT/SavedSearches.pm index af8f48265..25c7e4a69 100644 --- a/rt/lib/RT/SavedSearches.pm +++ b/rt/lib/RT/SavedSearches.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Scrip.pm b/rt/lib/RT/Scrip.pm index 5fa7165b1..71080a00c 100755 --- a/rt/lib/RT/Scrip.pm +++ b/rt/lib/RT/Scrip.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/ScripAction.pm b/rt/lib/RT/ScripAction.pm index 44f9bd83c..be8b130d5 100755 --- a/rt/lib/RT/ScripAction.pm +++ b/rt/lib/RT/ScripAction.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/ScripActions.pm b/rt/lib/RT/ScripActions.pm index a3a162253..41ac60e92 100755 --- a/rt/lib/RT/ScripActions.pm +++ b/rt/lib/RT/ScripActions.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/ScripCondition.pm b/rt/lib/RT/ScripCondition.pm index e7e4652c9..0d0fa665e 100755 --- a/rt/lib/RT/ScripCondition.pm +++ b/rt/lib/RT/ScripCondition.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/ScripConditions.pm b/rt/lib/RT/ScripConditions.pm index 66684972d..368008b2b 100755 --- a/rt/lib/RT/ScripConditions.pm +++ b/rt/lib/RT/ScripConditions.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Scrips.pm b/rt/lib/RT/Scrips.pm index af8323e33..de9d1eae9 100755 --- a/rt/lib/RT/Scrips.pm +++ b/rt/lib/RT/Scrips.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Search.pm b/rt/lib/RT/Search.pm index 7ec50de88..8e13987aa 100755 --- a/rt/lib/RT/Search.pm +++ b/rt/lib/RT/Search.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Search/ActiveTicketsInQueue.pm b/rt/lib/RT/Search/ActiveTicketsInQueue.pm index da1cdb646..1c69e93b2 100644 --- a/rt/lib/RT/Search/ActiveTicketsInQueue.pm +++ b/rt/lib/RT/Search/ActiveTicketsInQueue.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Search/FromSQL.pm b/rt/lib/RT/Search/FromSQL.pm index 4cb17f5e5..2f27fee82 100644 --- a/rt/lib/RT/Search/FromSQL.pm +++ b/rt/lib/RT/Search/FromSQL.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Search/Googleish.pm b/rt/lib/RT/Search/Googleish.pm index f8465f00e..d11fa2b13 100644 --- a/rt/lib/RT/Search/Googleish.pm +++ b/rt/lib/RT/Search/Googleish.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -197,6 +197,7 @@ our @GUESS = ( [ 10 => sub { return "subject" if $_[1] } ], [ 20 => sub { return "id" if /^#?\d+$/ } ], [ 30 => sub { return "requestor" if /\w+@\w+/} ], + [ 35 => sub { return "domain" if /^@\w+/} ], [ 40 => sub { return "status" if RT::Queue->new( $_[2] )->IsValidStatus( $_ ) }], @@ -260,6 +261,7 @@ sub HandleWatcher { return watcher => (!$_[2] and $_[1] eq "me") ? "Watcher.id = '__CurrentUser__'" : "Watcher = '$_[1]'"; } sub HandleRequestor { return requestor => "Requestor STARTSWITH '$_[1]'"; } +sub HandleDomain { $_[1] =~ s/^@?/@/; return requestor => "Requestor ENDSWITH '$_[1]'"; } sub HandleQueue { return queue => "Queue = '$_[1]'"; } sub HandleQ { return queue => "Queue = '$_[1]'"; } sub HandleCf { return "cf.$_[3]" => "'CF.{$_[3]}' LIKE '$_[1]'"; } diff --git a/rt/lib/RT/SearchBuilder.pm b/rt/lib/RT/SearchBuilder.pm index adc8a98d7..8b808c69b 100644 --- a/rt/lib/RT/SearchBuilder.pm +++ b/rt/lib/RT/SearchBuilder.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -86,9 +86,13 @@ sub _Init { $self->SUPER::_Init( 'Handle' => $RT::Handle); } +sub _Handle { return $RT::Handle } + sub CleanSlate { my $self = shift; $self->{'_sql_aliases'} = {}; + delete $self->{'handled_disabled_column'}; + delete $self->{'find_disabled_rows'}; return $self->SUPER::CleanSlate(@_); } diff --git a/rt/lib/RT/SharedSetting.pm b/rt/lib/RT/SharedSetting.pm index 3467167cc..0bdd196ea 100644 --- a/rt/lib/RT/SharedSetting.pm +++ b/rt/lib/RT/SharedSetting.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/SharedSettings.pm b/rt/lib/RT/SharedSettings.pm index 6e7ec3b19..51b496552 100644 --- a/rt/lib/RT/SharedSettings.pm +++ b/rt/lib/RT/SharedSettings.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Shredder.pm b/rt/lib/RT/Shredder.pm index bebd599b4..125ed0dc4 100644 --- a/rt/lib/RT/Shredder.pm +++ b/rt/lib/RT/Shredder.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -164,6 +164,21 @@ your F: Be sure to specify an absolute path. +=head1 Database Indexes + +We have found that the following indexes significantly speed up +shredding on most databases. + + CREATE INDEX SHREDDER_CGM1 ON CachedGroupMembers(MemberId, GroupId, Disabled); + CREATE INDEX SHREDDER_CGM2 ON CachedGroupMembers(ImmediateParentId,MemberId); + CREATE INDEX SHREDDER_CGM3 on CachedGroupMembers (Via, Id); + + CREATE UNIQUE INDEX SHREDDER_GM1 ON GroupMembers(MemberId, GroupId); + + CREATE INDEX SHREDDER_TXN1 ON Transactions(ReferenceType, OldReference); + CREATE INDEX SHREDDER_TXN2 ON Transactions(ReferenceType, NewReference); + CREATE INDEX SHREDDER_TXN3 ON Transactions(Type, OldValue); + CREATE INDEX SHREDDER_TXN4 ON Transactions(Type, NewValue) =head1 INFORMATION FOR DEVELOPERS diff --git a/rt/lib/RT/Shredder/ACE.pm b/rt/lib/RT/Shredder/ACE.pm index 7a50d9a90..1f882e2ff 100644 --- a/rt/lib/RT/Shredder/ACE.pm +++ b/rt/lib/RT/Shredder/ACE.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Shredder/Attachment.pm b/rt/lib/RT/Shredder/Attachment.pm index 9cd40884d..a3705fae1 100644 --- a/rt/lib/RT/Shredder/Attachment.pm +++ b/rt/lib/RT/Shredder/Attachment.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Shredder/CachedGroupMember.pm b/rt/lib/RT/Shredder/CachedGroupMember.pm index 9f1668f9e..ffd4ada04 100644 --- a/rt/lib/RT/Shredder/CachedGroupMember.pm +++ b/rt/lib/RT/Shredder/CachedGroupMember.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Shredder/Constants.pm b/rt/lib/RT/Shredder/Constants.pm index b09b52f7d..b71e19108 100644 --- a/rt/lib/RT/Shredder/Constants.pm +++ b/rt/lib/RT/Shredder/Constants.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Shredder/CustomField.pm b/rt/lib/RT/Shredder/CustomField.pm index 8c7dc2210..e6fcc5f01 100644 --- a/rt/lib/RT/Shredder/CustomField.pm +++ b/rt/lib/RT/Shredder/CustomField.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Shredder/CustomFieldValue.pm b/rt/lib/RT/Shredder/CustomFieldValue.pm index 9a9d36967..0cefc9be7 100644 --- a/rt/lib/RT/Shredder/CustomFieldValue.pm +++ b/rt/lib/RT/Shredder/CustomFieldValue.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Shredder/Dependencies.pm b/rt/lib/RT/Shredder/Dependencies.pm index 9364887fc..fdfcb8bf5 100644 --- a/rt/lib/RT/Shredder/Dependencies.pm +++ b/rt/lib/RT/Shredder/Dependencies.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Shredder/Dependency.pm b/rt/lib/RT/Shredder/Dependency.pm index 280077132..b94f43aea 100644 --- a/rt/lib/RT/Shredder/Dependency.pm +++ b/rt/lib/RT/Shredder/Dependency.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Shredder/Exceptions.pm b/rt/lib/RT/Shredder/Exceptions.pm index 8c1d6ed4c..d0cc2db9d 100644 --- a/rt/lib/RT/Shredder/Exceptions.pm +++ b/rt/lib/RT/Shredder/Exceptions.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Shredder/Group.pm b/rt/lib/RT/Shredder/Group.pm index bbf84ab88..ad74e976f 100644 --- a/rt/lib/RT/Shredder/Group.pm +++ b/rt/lib/RT/Shredder/Group.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Shredder/GroupMember.pm b/rt/lib/RT/Shredder/GroupMember.pm index a7e0b427f..ed632e3df 100644 --- a/rt/lib/RT/Shredder/GroupMember.pm +++ b/rt/lib/RT/Shredder/GroupMember.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Shredder/Link.pm b/rt/lib/RT/Shredder/Link.pm index a4429100e..32d583d26 100644 --- a/rt/lib/RT/Shredder/Link.pm +++ b/rt/lib/RT/Shredder/Link.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Shredder/ObjectCustomFieldValue.pm b/rt/lib/RT/Shredder/ObjectCustomFieldValue.pm index 7612f4ade..dab4d5bee 100644 --- a/rt/lib/RT/Shredder/ObjectCustomFieldValue.pm +++ b/rt/lib/RT/Shredder/ObjectCustomFieldValue.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Shredder/POD.pm b/rt/lib/RT/Shredder/POD.pm index 6cc869503..ee4fb09ca 100644 --- a/rt/lib/RT/Shredder/POD.pm +++ b/rt/lib/RT/Shredder/POD.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Shredder/Plugin.pm b/rt/lib/RT/Shredder/Plugin.pm index 60ba333c2..84d20eb1a 100644 --- a/rt/lib/RT/Shredder/Plugin.pm +++ b/rt/lib/RT/Shredder/Plugin.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Shredder/Plugin/Attachments.pm b/rt/lib/RT/Shredder/Plugin/Attachments.pm index f0f64a192..05f264ec3 100644 --- a/rt/lib/RT/Shredder/Plugin/Attachments.pm +++ b/rt/lib/RT/Shredder/Plugin/Attachments.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Shredder/Plugin/Base.pm b/rt/lib/RT/Shredder/Plugin/Base.pm index 0adadfd1e..7ada97e48 100644 --- a/rt/lib/RT/Shredder/Plugin/Base.pm +++ b/rt/lib/RT/Shredder/Plugin/Base.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Shredder/Plugin/Base/Dump.pm b/rt/lib/RT/Shredder/Plugin/Base/Dump.pm index 903a962b8..945bd93e8 100644 --- a/rt/lib/RT/Shredder/Plugin/Base/Dump.pm +++ b/rt/lib/RT/Shredder/Plugin/Base/Dump.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Shredder/Plugin/Base/Search.pm b/rt/lib/RT/Shredder/Plugin/Base/Search.pm index a493cd82f..bb21bd6af 100644 --- a/rt/lib/RT/Shredder/Plugin/Base/Search.pm +++ b/rt/lib/RT/Shredder/Plugin/Base/Search.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Shredder/Plugin/Objects.pm b/rt/lib/RT/Shredder/Plugin/Objects.pm index 20905748b..ebfe2a00f 100644 --- a/rt/lib/RT/Shredder/Plugin/Objects.pm +++ b/rt/lib/RT/Shredder/Plugin/Objects.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Shredder/Plugin/SQLDump.pm b/rt/lib/RT/Shredder/Plugin/SQLDump.pm index 2e7c25965..cc0d4cc08 100644 --- a/rt/lib/RT/Shredder/Plugin/SQLDump.pm +++ b/rt/lib/RT/Shredder/Plugin/SQLDump.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Shredder/Plugin/Summary.pm b/rt/lib/RT/Shredder/Plugin/Summary.pm index 9b533bc60..9ccd66e0a 100644 --- a/rt/lib/RT/Shredder/Plugin/Summary.pm +++ b/rt/lib/RT/Shredder/Plugin/Summary.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Shredder/Plugin/Tickets.pm b/rt/lib/RT/Shredder/Plugin/Tickets.pm index 034448723..180c45c9e 100644 --- a/rt/lib/RT/Shredder/Plugin/Tickets.pm +++ b/rt/lib/RT/Shredder/Plugin/Tickets.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Shredder/Plugin/Users.pm b/rt/lib/RT/Shredder/Plugin/Users.pm index 244a2621b..5b7ccae8f 100644 --- a/rt/lib/RT/Shredder/Plugin/Users.pm +++ b/rt/lib/RT/Shredder/Plugin/Users.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Shredder/Principal.pm b/rt/lib/RT/Shredder/Principal.pm index 5dc04b30b..14f446a88 100644 --- a/rt/lib/RT/Shredder/Principal.pm +++ b/rt/lib/RT/Shredder/Principal.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Shredder/Queue.pm b/rt/lib/RT/Shredder/Queue.pm index 80a1c84c6..426170e0d 100644 --- a/rt/lib/RT/Shredder/Queue.pm +++ b/rt/lib/RT/Shredder/Queue.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Shredder/Record.pm b/rt/lib/RT/Shredder/Record.pm index d70bf123b..6a8777a8e 100644 --- a/rt/lib/RT/Shredder/Record.pm +++ b/rt/lib/RT/Shredder/Record.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Shredder/Scrip.pm b/rt/lib/RT/Shredder/Scrip.pm index 74878b62b..9a80cf988 100644 --- a/rt/lib/RT/Shredder/Scrip.pm +++ b/rt/lib/RT/Shredder/Scrip.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Shredder/ScripAction.pm b/rt/lib/RT/Shredder/ScripAction.pm index cdad7e4d2..ebe7ce586 100644 --- a/rt/lib/RT/Shredder/ScripAction.pm +++ b/rt/lib/RT/Shredder/ScripAction.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Shredder/ScripCondition.pm b/rt/lib/RT/Shredder/ScripCondition.pm index 857f0623e..6d2b83e5c 100644 --- a/rt/lib/RT/Shredder/ScripCondition.pm +++ b/rt/lib/RT/Shredder/ScripCondition.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Shredder/Template.pm b/rt/lib/RT/Shredder/Template.pm index 4ac6daf79..89859a6e0 100644 --- a/rt/lib/RT/Shredder/Template.pm +++ b/rt/lib/RT/Shredder/Template.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Shredder/Ticket.pm b/rt/lib/RT/Shredder/Ticket.pm index 2e5453666..b70e8bb97 100644 --- a/rt/lib/RT/Shredder/Ticket.pm +++ b/rt/lib/RT/Shredder/Ticket.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Shredder/Transaction.pm b/rt/lib/RT/Shredder/Transaction.pm index 37e6ba5ad..1fe42f9f7 100644 --- a/rt/lib/RT/Shredder/Transaction.pm +++ b/rt/lib/RT/Shredder/Transaction.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Shredder/User.pm b/rt/lib/RT/Shredder/User.pm index 6e19da789..0cd5bf335 100644 --- a/rt/lib/RT/Shredder/User.pm +++ b/rt/lib/RT/Shredder/User.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Squish.pm b/rt/lib/RT/Squish.pm index e64b71198..e0e61065c 100644 --- a/rt/lib/RT/Squish.pm +++ b/rt/lib/RT/Squish.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Squish/CSS.pm b/rt/lib/RT/Squish/CSS.pm index 1e2a45326..5ce3882cd 100644 --- a/rt/lib/RT/Squish/CSS.pm +++ b/rt/lib/RT/Squish/CSS.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Squish/JS.pm b/rt/lib/RT/Squish/JS.pm index 4dd24b709..9a4cac582 100644 --- a/rt/lib/RT/Squish/JS.pm +++ b/rt/lib/RT/Squish/JS.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/System.pm b/rt/lib/RT/System.pm index cf3d2d00b..4c1f5f135 100644 --- a/rt/lib/RT/System.pm +++ b/rt/lib/RT/System.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Template.pm b/rt/lib/RT/Template.pm index fd4b511e9..d15c1cdcb 100755 --- a/rt/lib/RT/Template.pm +++ b/rt/lib/RT/Template.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -256,7 +256,7 @@ sub Create { $args{'Queue'} = $QueueObj->Id; } - my $result = $self->SUPER::Create( + my ( $result, $msg ) = $self->SUPER::Create( Content => $args{'Content'}, Queue => $args{'Queue'}, Description => $args{'Description'}, @@ -264,7 +264,11 @@ sub Create { Type => $args{'Type'}, ); - return ($result); + if ( wantarray ) { + return ( $result, $msg ); + } else { + return ( $result ); + } } diff --git a/rt/lib/RT/Templates.pm b/rt/lib/RT/Templates.pm index b4da63628..7d117fae3 100755 --- a/rt/lib/RT/Templates.pm +++ b/rt/lib/RT/Templates.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Test.pm b/rt/lib/RT/Test.pm index 55fd88af9..2a1f52b90 100644 --- a/rt/lib/RT/Test.pm +++ b/rt/lib/RT/Test.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -51,6 +51,7 @@ package RT::Test; use strict; use warnings; +BEGIN { $^W = 1 }; use base 'Test::More'; @@ -925,7 +926,7 @@ sub set_rights { $acl->Limit( FIELD => 'RightName', OPERATOR => '!=', VALUE => 'SuperUser' ); while ( my $ace = $acl->Next ) { my $obj = $ace->PrincipalObj->Object; - if ( $obj->isa('RT::Group') && $obj->Type eq 'UserEquiv' && $obj->Instance == RT->Nobody->id ) { + if ( $obj->isa('RT::Group') && ($obj->Type||'') eq 'UserEquiv' && $obj->Instance == RT->Nobody->id ) { next; } $ace->Delete; @@ -1502,9 +1503,7 @@ sub stop_server { my $in_end = shift; return unless @SERVERS; - my $sig = 'TERM'; - $sig = 'INT' if $ENV{'RT_TEST_WEB_HANDLER'} eq "plack"; - kill $sig, @SERVERS; + kill 'TERM', @SERVERS; foreach my $pid (@SERVERS) { if ($ENV{RT_TEST_WEB_HANDLER} =~ /^apache/) { sleep 1 while kill 0, $pid; diff --git a/rt/lib/RT/Test/Apache.pm b/rt/lib/RT/Test/Apache.pm index 256945afe..31ad9bcf8 100644 --- a/rt/lib/RT/Test/Apache.pm +++ b/rt/lib/RT/Test/Apache.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Test/Email.pm b/rt/lib/RT/Test/Email.pm index 8cf683946..54aa87dcd 100644 --- a/rt/lib/RT/Test/Email.pm +++ b/rt/lib/RT/Test/Email.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Test/GnuPG.pm b/rt/lib/RT/Test/GnuPG.pm index ec446724e..95c21f8ae 100644 --- a/rt/lib/RT/Test/GnuPG.pm +++ b/rt/lib/RT/Test/GnuPG.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Test/Web.pm b/rt/lib/RT/Test/Web.pm index 8611102c2..81644817c 100644 --- a/rt/lib/RT/Test/Web.pm +++ b/rt/lib/RT/Test/Web.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Ticket.pm b/rt/lib/RT/Ticket.pm index 61653789c..6a8b40cfb 100755 --- a/rt/lib/RT/Ticket.pm +++ b/rt/lib/RT/Ticket.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -642,7 +642,7 @@ sub Create { } } - if ( $obj && $obj->Status eq 'deleted' ) { + if ( $obj && lc $obj->Status eq 'deleted' ) { push @non_fatal_errors, $self->loc("Linking. Can't link to a deleted ticket"); next; @@ -2681,7 +2681,7 @@ sub AddLink { } return ( 0, "Can't link to a deleted ticket" ) - if $other_ticket && $other_ticket->Status eq 'deleted'; + if $other_ticket && lc $other_ticket->Status eq 'deleted'; return $self->_AddLink(%args); } diff --git a/rt/lib/RT/Tickets.pm b/rt/lib/RT/Tickets.pm index 06b17e263..2220a077f 100755 --- a/rt/lib/RT/Tickets.pm +++ b/rt/lib/RT/Tickets.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -142,9 +142,9 @@ our %FIELD_METADATA = ( QueueCc => [ 'WATCHERFIELD' => 'Cc' => 'Queue', ], #loc_left_pair QueueAdminCc => [ 'WATCHERFIELD' => 'AdminCc' => 'Queue', ], #loc_left_pair QueueWatcher => [ 'WATCHERFIELD' => undef => 'Queue', ], #loc_left_pair - CustomFieldValue => [ 'CUSTOMFIELD', ], #loc_left_pair - CustomField => [ 'CUSTOMFIELD', ], #loc_left_pair - CF => [ 'CUSTOMFIELD', ], #loc_left_pair + CustomFieldValue => [ 'CUSTOMFIELD' => 'Ticket' ], #loc_left_pair + CustomField => [ 'CUSTOMFIELD' => 'Ticket' ], #loc_left_pair + CF => [ 'CUSTOMFIELD' => 'Ticket' ], #loc_left_pair Updated => [ 'TRANSDATE', ], #loc_left_pair RequestorGroup => [ 'MEMBERSHIPFIELD' => 'Requestor', ], #loc_left_pair CCGroup => [ 'MEMBERSHIPFIELD' => 'Cc', ], #loc_left_pair @@ -443,10 +443,6 @@ sub _LinkLimit { my $is_null = 0; $is_null = 1 if !$value || $value =~ /^null$/io; - unless ($is_null) { - $value = RT::URI->new( $sb->CurrentUser )->CanonicalizeURI( $value ); - } - my $direction = $meta->[1] || ''; my ($matchfield, $linkfield) = ('', ''); if ( $direction eq 'To' ) { @@ -473,6 +469,7 @@ sub _LinkLimit { $op = ($op =~ /^(=|IS)$/i)? 'IS': 'IS NOT'; } elsif ( $value =~ /\D/ ) { + $value = RT::URI->new( $sb->CurrentUser )->CanonicalizeURI( $value ); $is_local = 0; } $matchfield = "Local$matchfield" if $is_local; @@ -977,13 +974,18 @@ sub _WatcherLimit { } $rest{SUBKEY} ||= 'EmailAddress'; - my $groups = $self->_RoleGroupsJoin( Type => $type, Class => $class, New => !$type ); + my ($groups, $group_members, $users); + if ( $rest{'BUNDLE'} ) { + ($groups, $group_members, $users) = @{ $rest{'BUNDLE'} }; + } else { + $groups = $self->_RoleGroupsJoin( Type => $type, Class => $class, New => !$type ); + } $self->_OpenParen; if ( $op =~ /^IS(?: NOT)?$/i ) { # is [not] empty case - my $group_members = $self->_GroupMembersJoin( GroupsAlias => $groups ); + $group_members ||= $self->_GroupMembersJoin( GroupsAlias => $groups ); # to avoid joining the table Users into the query, we just join GM # and make sure we don't match records where group is member of itself $self->SUPER::Limit( @@ -1021,7 +1023,7 @@ sub _WatcherLimit { $users_obj->RowsPerPage(2); my @users = @{ $users_obj->ItemsArrayRef }; - my $group_members = $self->_GroupMembersJoin( GroupsAlias => $groups ); + $group_members ||= $self->_GroupMembersJoin( GroupsAlias => $groups ); if ( @users <= 1 ) { my $uid = 0; $uid = $users[0]->id if @users; @@ -1046,7 +1048,7 @@ sub _WatcherLimit { VALUE => "$group_members.MemberId", QUOTEVALUE => 0, ); - my $users = $self->Join( + $users ||= $self->Join( TYPE => 'LEFT', ALIAS1 => $group_members, FIELD1 => 'MemberId', @@ -1072,10 +1074,10 @@ sub _WatcherLimit { } else { # positive condition case - my $group_members = $self->_GroupMembersJoin( + $group_members ||= $self->_GroupMembersJoin( GroupsAlias => $groups, New => 1, Left => 0 ); - my $users = $self->Join( + $users ||= $self->Join( TYPE => 'LEFT', ALIAS1 => $group_members, FIELD1 => 'MemberId', @@ -1092,6 +1094,7 @@ sub _WatcherLimit { ); } $self->_CloseParen; + return ($groups, $group_members, $users); } sub _RoleGroupsJoin { @@ -1342,33 +1345,44 @@ sub _WatcherMembershipLimit { Try and turn a CF descriptor into (cfid, cfname) object pair. +Takes an optional second parameter of the CF LookupType, defaults to Ticket CFs. + =cut sub _CustomFieldDecipher { - my ($self, $string) = @_; + my ($self, $string, $lookuptype) = @_; + $lookuptype ||= $self->_SingularClass->CustomFieldLookupType; - my ($queue, $field, $column) = ($string =~ /^(?:(.+?)\.)?{(.+)}(?:\.(Content|LargeContent))?$/); + my ($object, $field, $column) = ($string =~ /^(?:(.+?)\.)?\{(.+)\}(?:\.(Content|LargeContent))?$/); $field ||= ($string =~ /^{(.*?)}$/)[0] || $string; - my $cf; - if ( $queue ) { - my $q = RT::Queue->new( $self->CurrentUser ); - $q->Load( $queue ); + my ($cf, $applied_to); + + if ( $object ) { + my $record_class = RT::CustomField->RecordClassFromLookupType($lookuptype); + $applied_to = $record_class->new( $self->CurrentUser ); + $applied_to->Load( $object ); - if ( $q->id ) { - # $queue = $q->Name; # should we normalize the queue? - $cf = $q->CustomField( $field ); + if ( $applied_to->id ) { + RT->Logger->debug("Limiting to CFs identified by '$field' applied to $record_class #@{[$applied_to->id]} (loaded via '$object')"); } else { - $RT::Logger->warning("Queue '$queue' doesn't exist, parsed from '$string'"); - $queue = 0; + RT->Logger->warning("$record_class '$object' doesn't exist, parsed from '$string'"); + $object = 0; + undef $applied_to; } } - elsif ( $field =~ /\D/ ) { - $queue = ''; + + if ( $field =~ /\D/ ) { + $object ||= ''; my $cfs = RT::CustomFields->new( $self->CurrentUser ); - $cfs->Limit( FIELD => 'Name', VALUE => $field ); - $cfs->LimitToLookupType('RT::Queue-RT::Ticket'); + $cfs->Limit( FIELD => 'Name', VALUE => $field, ($applied_to ? (CASESENSITIVE => 0) : ()) ); + $cfs->LimitToLookupType($lookuptype); + + if ($applied_to) { + $cfs->SetContextObject($applied_to); + $cfs->LimitToObjectId($applied_to->id); + } # if there is more then one field the current user can # see with the same name then we shouldn't return cf object @@ -1381,9 +1395,11 @@ sub _CustomFieldDecipher { else { $cf = RT::CustomField->new( $self->CurrentUser ); $cf->Load( $field ); + $cf->SetContextObject($applied_to) + if $cf->id and $applied_to; } - return ($queue, $field, $cf, $column); + return ($object, $field, $cf, $column); } =head2 _CustomFieldJoin @@ -1392,8 +1408,14 @@ Factor out the Join of custom fields so we can use it for sorting too =cut +our %JOIN_ALIAS_FOR_LOOKUP_TYPE = ( + RT::Ticket->CustomFieldLookupType => sub { "main" }, +); + sub _CustomFieldJoin { - my ($self, $cfkey, $cfid, $field) = @_; + my ($self, $cfkey, $cfid, $field, $type) = @_; + $type ||= RT::Ticket->CustomFieldLookupType; + # Perform one Join per CustomField if ( $self->{_sql_object_cfv_alias}{$cfkey} || $self->{_sql_cf_alias}{$cfkey} ) @@ -1402,17 +1424,21 @@ sub _CustomFieldJoin { $self->{_sql_cf_alias}{$cfkey} ); } - my ($TicketCFs, $CFs); + my $ObjectAlias = $JOIN_ALIAS_FOR_LOOKUP_TYPE{$type} + ? $JOIN_ALIAS_FOR_LOOKUP_TYPE{$type}->($self) + : die "We don't know how to join on $type"; + + my ($ObjectCFs, $CFs); if ( $cfid ) { - $TicketCFs = $self->{_sql_object_cfv_alias}{$cfkey} = $self->Join( + $ObjectCFs = $self->{_sql_object_cfv_alias}{$cfkey} = $self->Join( TYPE => 'LEFT', - ALIAS1 => 'main', + ALIAS1 => $ObjectAlias, FIELD1 => 'id', TABLE2 => 'ObjectCustomFieldValues', FIELD2 => 'ObjectId', ); $self->SUPER::Limit( - LEFTJOIN => $TicketCFs, + LEFTJOIN => $ObjectCFs, FIELD => 'CustomField', VALUE => $cfid, ENTRYAGGREGATOR => 'AND' @@ -1444,7 +1470,7 @@ sub _CustomFieldJoin { LEFTJOIN => $CFs, ENTRYAGGREGATOR => 'AND', FIELD => 'LookupType', - VALUE => 'RT::Queue-RT::Ticket', + VALUE => $type, ); $self->SUPER::Limit( LEFTJOIN => $CFs, @@ -1453,7 +1479,7 @@ sub _CustomFieldJoin { VALUE => $field, ); - $TicketCFs = $self->{_sql_object_cfv_alias}{$cfkey} = $self->Join( + $ObjectCFs = $self->{_sql_object_cfv_alias}{$cfkey} = $self->Join( TYPE => 'LEFT', ALIAS1 => $CFs, FIELD1 => 'id', @@ -1461,28 +1487,29 @@ sub _CustomFieldJoin { FIELD2 => 'CustomField', ); $self->SUPER::Limit( - LEFTJOIN => $TicketCFs, + LEFTJOIN => $ObjectCFs, FIELD => 'ObjectId', - VALUE => 'main.id', + VALUE => "$ObjectAlias.id", QUOTEVALUE => 0, ENTRYAGGREGATOR => 'AND', ); } + $self->SUPER::Limit( - LEFTJOIN => $TicketCFs, + LEFTJOIN => $ObjectCFs, FIELD => 'ObjectType', - VALUE => 'RT::Ticket', + VALUE => RT::CustomField->ObjectTypeFromLookupType($type), ENTRYAGGREGATOR => 'AND' ); $self->SUPER::Limit( - LEFTJOIN => $TicketCFs, + LEFTJOIN => $ObjectCFs, FIELD => 'Disabled', OPERATOR => '=', VALUE => '0', ENTRYAGGREGATOR => 'AND' ); - return ($TicketCFs, $CFs); + return ($ObjectCFs, $CFs); } =head2 _CustomFieldLimit @@ -1501,12 +1528,16 @@ use Regexp::Common::net::CIDR; sub _CustomFieldLimit { my ( $self, $_field, $op, $value, %rest ) = @_; + my $meta = $FIELD_METADATA{ $_field }; + my $class = $meta->[1] || 'Ticket'; + my $type = "RT::$class"->CustomFieldLookupType; + my $field = $rest{'SUBKEY'} || die "No field specified"; # For our sanity, we can only limit on one queue at a time - my ($queue, $cfid, $cf, $column); - ($queue, $field, $cf, $column) = $self->_CustomFieldDecipher( $field ); + my ($object, $cfid, $cf, $column); + ($object, $field, $cf, $column) = $self->_CustomFieldDecipher( $field, $type ); $cfid = $cf ? $cf->id : 0 ; # If we're trying to find custom fields that don't match something, we @@ -1602,16 +1633,16 @@ sub _CustomFieldLimit { my $single_value = !$cf || !$cfid || $cf->SingleValue; - my $cfkey = $cfid ? $cfid : "$queue.$field"; + my $cfkey = $cfid ? $cfid : "$type-$object.$field"; if ( $null_op && !$column ) { # IS[ NOT] NULL without column is the same as has[ no] any CF value, # we can reuse our default joins for this operation # with column specified we have different situation - my ($TicketCFs, $CFs) = $self->_CustomFieldJoin( $cfkey, $cfid, $field ); + my ($ObjectCFs, $CFs) = $self->_CustomFieldJoin( $cfkey, $cfid, $field, $type ); $self->_OpenParen; $self->_SQLLimit( - ALIAS => $TicketCFs, + ALIAS => $ObjectCFs, FIELD => 'id', OPERATOR => $op, VALUE => $value, @@ -1634,11 +1665,11 @@ sub _CustomFieldLimit { $self->_OpenParen; if ( $op !~ /NOT|!=|<>/i ) { # positive equation $self->_CustomFieldLimit( - 'CF', '<=', $end_ip, %rest, + $_field, '<=', $end_ip, %rest, SUBKEY => $rest{'SUBKEY'}. '.Content', ); $self->_CustomFieldLimit( - 'CF', '>=', $start_ip, %rest, + $_field, '>=', $start_ip, %rest, SUBKEY => $rest{'SUBKEY'}. '.LargeContent', ENTRYAGGREGATOR => 'AND', ); @@ -1646,20 +1677,20 @@ sub _CustomFieldLimit { # estimations and scan less rows # have to disable this tweak because of ipv6 # $self->_CustomFieldLimit( -# $field, '>=', '000.000.000.000', %rest, +# $_field, '>=', '000.000.000.000', %rest, # SUBKEY => $rest{'SUBKEY'}. '.Content', # ENTRYAGGREGATOR => 'AND', # ); # $self->_CustomFieldLimit( -# $field, '<=', '255.255.255.255', %rest, +# $_field, '<=', '255.255.255.255', %rest, # SUBKEY => $rest{'SUBKEY'}. '.LargeContent', # ENTRYAGGREGATOR => 'AND', # ); } else { # negative equation - $self->_CustomFieldLimit($field, '>', $end_ip, %rest); + $self->_CustomFieldLimit($_field, '>', $end_ip, %rest); $self->_CustomFieldLimit( - $field, '<', $start_ip, %rest, + $_field, '<', $start_ip, %rest, SUBKEY => $rest{'SUBKEY'}. '.LargeContent', ENTRYAGGREGATOR => 'OR', ); @@ -1671,7 +1702,7 @@ sub _CustomFieldLimit { } elsif ( !$negative_op || $single_value ) { $cfkey .= '.'. $self->{'_sql_multiple_cfs_index'}++ if !$single_value && !$range_op; - my ($TicketCFs, $CFs) = $self->_CustomFieldJoin( $cfkey, $cfid, $field ); + my ($ObjectCFs, $CFs) = $self->_CustomFieldJoin( $cfkey, $cfid, $field, $type ); $self->_OpenParen; @@ -1682,7 +1713,7 @@ sub _CustomFieldLimit { # otherwise search in Content and in LargeContent if ( $column ) { $self->_SQLLimit( $fix_op->( - ALIAS => $TicketCFs, + ALIAS => $ObjectCFs, FIELD => $column, OPERATOR => $op, VALUE => $value, @@ -1708,7 +1739,7 @@ sub _CustomFieldLimit { $self->_OpenParen; $self->_SQLLimit( - ALIAS => $TicketCFs, + ALIAS => $ObjectCFs, FIELD => 'Content', OPERATOR => ">=", VALUE => $daystart, @@ -1716,7 +1747,7 @@ sub _CustomFieldLimit { ); $self->_SQLLimit( - ALIAS => $TicketCFs, + ALIAS => $ObjectCFs, FIELD => 'Content', OPERATOR => "<", VALUE => $dayend, @@ -1729,7 +1760,7 @@ sub _CustomFieldLimit { elsif ( $op eq '=' || $op eq '!=' || $op eq '<>' ) { if ( length( Encode::encode_utf8($value) ) < 256 ) { $self->_SQLLimit( - ALIAS => $TicketCFs, + ALIAS => $ObjectCFs, FIELD => 'Content', OPERATOR => $op, VALUE => $value, @@ -1740,14 +1771,14 @@ sub _CustomFieldLimit { else { $self->_OpenParen; $self->_SQLLimit( - ALIAS => $TicketCFs, + ALIAS => $ObjectCFs, FIELD => 'Content', OPERATOR => '=', VALUE => '', ENTRYAGGREGATOR => 'OR' ); $self->_SQLLimit( - ALIAS => $TicketCFs, + ALIAS => $ObjectCFs, FIELD => 'Content', OPERATOR => 'IS', VALUE => 'NULL', @@ -1755,7 +1786,7 @@ sub _CustomFieldLimit { ); $self->_CloseParen; $self->_SQLLimit( $fix_op->( - ALIAS => $TicketCFs, + ALIAS => $ObjectCFs, FIELD => 'LargeContent', OPERATOR => $op, VALUE => $value, @@ -1766,7 +1797,7 @@ sub _CustomFieldLimit { } else { $self->_SQLLimit( - ALIAS => $TicketCFs, + ALIAS => $ObjectCFs, FIELD => 'Content', OPERATOR => $op, VALUE => $value, @@ -1777,14 +1808,14 @@ sub _CustomFieldLimit { $self->_OpenParen; $self->_OpenParen; $self->_SQLLimit( - ALIAS => $TicketCFs, + ALIAS => $ObjectCFs, FIELD => 'Content', OPERATOR => '=', VALUE => '', ENTRYAGGREGATOR => 'OR' ); $self->_SQLLimit( - ALIAS => $TicketCFs, + ALIAS => $ObjectCFs, FIELD => 'Content', OPERATOR => 'IS', VALUE => 'NULL', @@ -1792,7 +1823,7 @@ sub _CustomFieldLimit { ); $self->_CloseParen; $self->_SQLLimit( $fix_op->( - ALIAS => $TicketCFs, + ALIAS => $ObjectCFs, FIELD => 'LargeContent', OPERATOR => $op, VALUE => $value, @@ -1826,7 +1857,7 @@ sub _CustomFieldLimit { if ($negative_op) { $self->_SQLLimit( - ALIAS => $TicketCFs, + ALIAS => $ObjectCFs, FIELD => $column || 'Content', OPERATOR => 'IS', VALUE => 'NULL', @@ -1840,7 +1871,7 @@ sub _CustomFieldLimit { } else { $cfkey .= '.'. $self->{'_sql_multiple_cfs_index'}++; - my ($TicketCFs, $CFs) = $self->_CustomFieldJoin( $cfkey, $cfid, $field ); + my ($ObjectCFs, $CFs) = $self->_CustomFieldJoin( $cfkey, $cfid, $field, $type ); # reverse operation $op =~ s/!|NOT\s+//i; @@ -1849,8 +1880,8 @@ sub _CustomFieldLimit { # otherwise search in Content and in LargeContent if ( $column ) { $self->SUPER::Limit( $fix_op->( - LEFTJOIN => $TicketCFs, - ALIAS => $TicketCFs, + LEFTJOIN => $ObjectCFs, + ALIAS => $ObjectCFs, FIELD => $column, OPERATOR => $op, VALUE => $value, @@ -1859,8 +1890,8 @@ sub _CustomFieldLimit { } else { $self->SUPER::Limit( - LEFTJOIN => $TicketCFs, - ALIAS => $TicketCFs, + LEFTJOIN => $ObjectCFs, + ALIAS => $ObjectCFs, FIELD => 'Content', OPERATOR => $op, VALUE => $value, @@ -1869,7 +1900,7 @@ sub _CustomFieldLimit { } $self->_SQLLimit( %rest, - ALIAS => $TicketCFs, + ALIAS => $ObjectCFs, FIELD => 'id', OPERATOR => 'IS', VALUE => 'NULL', @@ -1979,10 +2010,10 @@ sub OrderByCols { } push @res, { %$row, ALIAS => $users, FIELD => $subkey }; } elsif ( defined $meta->[0] && $meta->[0] eq 'CUSTOMFIELD' ) { - my ($queue, $field, $cf_obj, $column) = $self->_CustomFieldDecipher( $subkey ); - my $cfkey = $cf_obj ? $cf_obj->id : "$queue.$field"; + my ($object, $field, $cf_obj, $column) = $self->_CustomFieldDecipher( $subkey ); + my $cfkey = $cf_obj ? $cf_obj->id : "$object.$field"; $cfkey .= ".ordering" if !$cf_obj || ($cf_obj->MaxValues||0) != 1; - my ($TicketCFs, $CFs) = $self->_CustomFieldJoin( $cfkey, ($cf_obj ?$cf_obj->id :0) , $field ); + my ($ObjectCFs, $CFs) = $self->_CustomFieldJoin( $cfkey, ($cf_obj ?$cf_obj->id :0) , $field ); # this is described in _CustomFieldLimit $self->_SQLLimit( ALIAS => $CFs, @@ -2004,7 +2035,7 @@ sub OrderByCols { } my $CFvs = $self->Join( TYPE => 'LEFT', - ALIAS1 => $TicketCFs, + ALIAS1 => $ObjectCFs, FIELD1 => 'CustomField', TABLE2 => 'CustomFieldValues', FIELD2 => 'CustomField', @@ -2013,12 +2044,12 @@ sub OrderByCols { LEFTJOIN => $CFvs, FIELD => 'Name', QUOTEVALUE => 0, - VALUE => $TicketCFs . ".Content", + VALUE => $ObjectCFs . ".Content", ENTRYAGGREGATOR => 'AND' ); push @res, { %$row, ALIAS => $CFvs, FIELD => 'SortOrder' }; - push @res, { %$row, ALIAS => $TicketCFs, FIELD => 'Content' }; + push @res, { %$row, ALIAS => $ObjectCFs, FIELD => 'Content' }; } elsif ( $field eq "Custom" && $subkey eq "Ownership") { # PAW logic is "reversed" my $order = "ASC"; @@ -3144,7 +3175,7 @@ sub LimitCustomField { $self->Limit( VALUE => $args{VALUE}, FIELD => "CF" - .(defined $args{'QUEUE'}? ".{$args{'QUEUE'}}" : '' ) + .(defined $args{'QUEUE'}? ".$args{'QUEUE'}" : '' ) .".{" . $CF->Name . "}", OPERATOR => $args{OPERATOR}, CUSTOMFIELD => 1, diff --git a/rt/lib/RT/Tickets_SQL.pm b/rt/lib/RT/Tickets_SQL.pm index 608862a37..f667b0699 100644 --- a/rt/lib/RT/Tickets_SQL.pm +++ b/rt/lib/RT/Tickets_SQL.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -74,7 +74,7 @@ sub _InitSQL { sub _SQLLimit { my $self = shift; - my %args = (@_); + my %args = (FIELD => '', @_); if ($args{'FIELD'} eq 'EffectiveId' && (!$args{'ALIAS'} || $args{'ALIAS'} eq 'main' ) ) { $self->{'looking_at_effective_id'} = 1; @@ -171,19 +171,69 @@ sub _parser { my @bundle; my $ea = ''; + # Bundling of joins is implemented by dynamically tracking a parallel query + # tree in %sub_tree as the TicketSQL is parsed. Don't be fooled by + # _close_bundle(), @bundle, and %can_bundle; they are completely unused for + # quite a long time and removed in RT 4.2. For now they stay, a useless + # relic. + # + # Only positive, OR'd watcher conditions are bundled currently. Each key + # in %sub_tree is a watcher type (Requestor, Cc, AdminCc) or the generic + # "Watcher" for any watcher type. Owner is not bundled because it is + # denormalized into a Tickets column and doesn't need a join. AND'd + # conditions are not bundled since a record may have multiple watchers + # which independently match the conditions, thus necessitating two joins. + # + # The values of %sub_tree are arrayrefs made up of: + # + # * Open parentheses "(" pushed on by the OpenParen callback + # * Arrayrefs of bundled join aliases pushed on by the Condition callback + # * Entry aggregators (AND/OR) pushed on by the EntryAggregator callback + # + # The CloseParen callback takes care of backing off the query trees until + # outside of the just-closed parenthetical, thus restoring the tree state + # an equivalent of before the parenthetical was entered. + # + # The Condition callback handles starting a new subtree or extending an + # existing one, determining if bundling the current condition with any + # subtree is possible, and pruning any dangling entry aggregators from + # trees. + # + + my %sub_tree; + my $depth = 0; + my %callback; $callback{'OpenParen'} = sub { $self->_close_bundle(@bundle); @bundle = (); - $self->_OpenParen + $self->_OpenParen; + $depth++; + push @$_, '(' foreach values %sub_tree; }; $callback{'CloseParen'} = sub { $self->_close_bundle(@bundle); @bundle = (); $self->_CloseParen; + $depth--; + foreach my $list ( values %sub_tree ) { + if ( $list->[-1] eq '(' ) { + pop @$list; + pop @$list if $list->[-1] =~ /^(?:AND|OR)$/i; + } + else { + pop @$list while $list->[-2] ne '('; + $list->[-1] = pop @$list; + } + } + }; + $callback{'EntryAggregator'} = sub { + $ea = $_[0] || ''; + push @$_, $ea foreach grep @$_ && $_->[-1] ne '(', values %sub_tree; }; - $callback{'EntryAggregator'} = sub { $ea = $_[0] || '' }; $callback{'Condition'} = sub { my ($key, $op, $value) = @_; + my ($negative_op, $null_op, $inv_op, $range_op) + = $self->ClassifySQLOperation( $op ); # key has dot then it's compound variant and we have subkey my $subkey = ''; ($key, $subkey) = ($1, $2) if $key =~ /^([^\.]+)\.(.+)$/; @@ -225,10 +275,28 @@ sub _parser { } else { $self->_close_bundle(@bundle); @bundle = (); - $sub->( $self, $key, $op, $value, + my @res; my $bundle_with; + if ( $class eq 'WATCHERFIELD' && $key ne 'Owner' && !$negative_op && (!$null_op || $subkey) ) { + if ( !$sub_tree{$key} ) { + $sub_tree{$key} = [ ('(')x$depth, \@res ]; + } else { + $bundle_with = $self->_check_bundling_possibility( $string, @{ $sub_tree{$key} } ); + if ( $sub_tree{$key}[-1] eq '(' ) { + push @{ $sub_tree{$key} }, \@res; + } + } + } + + # Remove our aggregator from subtrees where our condition didn't get added + pop @$_ foreach grep @$_ && $_->[-1] =~ /^(?:AND|OR)$/i, values %sub_tree; + + # A reference to @res may be pushed onto $sub_tree{$key} from + # above, and we fill it here. + @res = $sub->( $self, $key, $op, $value, SUBCLAUSE => '', # don't need anymore ENTRYAGGREGATOR => $ea, SUBKEY => $subkey, + BUNDLE => $bundle_with, ); } $self->{_sql_looking_at}{lc $key} = 1; @@ -238,6 +306,29 @@ sub _parser { $self->_close_bundle(@bundle); @bundle = (); } +sub _check_bundling_possibility { + my $self = shift; + my $string = shift; + my @list = reverse @_; + while (my $e = shift @list) { + next if $e eq '('; + if ( lc($e) eq 'and' ) { + return undef; + } + elsif ( lc($e) eq 'or' ) { + return shift @list; + } + else { + # should not happen + $RT::Logger->error( + "Joins optimization failed when parsing '$string'. It's bug in RT, contact Best Practical" + ); + die "Internal error. Contact your system administrator."; + } + } + return undef; +} + =head2 ClausesToSQL =cut @@ -292,8 +383,9 @@ sub FromSQL { $self->{_sql_query} = $query; eval { $self->_parser( $query ); }; if ( $@ ) { - $RT::Logger->error( $@ ); - return (0, $@); + my $error = "$@"; + $RT::Logger->error("Couldn't parse query: $error"); + return (0, $error); } # We only want to look at EffectiveId's (mostly) for these searches. diff --git a/rt/lib/RT/Topic.pm b/rt/lib/RT/Topic.pm index 3e91e9dc3..d6a88e17c 100644 --- a/rt/lib/RT/Topic.pm +++ b/rt/lib/RT/Topic.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Topics.pm b/rt/lib/RT/Topics.pm index 01674fb66..5c735b7f1 100644 --- a/rt/lib/RT/Topics.pm +++ b/rt/lib/RT/Topics.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Transaction.pm b/rt/lib/RT/Transaction.pm index 48d4e8ce9..5c903e9f1 100755 --- a/rt/lib/RT/Transaction.pm +++ b/rt/lib/RT/Transaction.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -368,24 +368,9 @@ sub Content { } if ( $args{'Quote'} ) { + $content = $self->ApplyQuoteWrap(content => $content, + cols => $args{'Wrap'} ); - # What's the longest line like? - my $max = 0; - foreach ( split ( /\n/, $content ) ) { - $max = length if length > $max; - } - - if ( $max > $args{'Wrap'}+6 ) { # 76 ) { - require Text::Wrapper; - my $wrapper = Text::Wrapper->new( - columns => $args{'Wrap'}, - body_start => ( $max > 70 * 3 ? ' ' : '' ), - par_start => '' - ); - $content = $wrapper->wrap($content); - } - - $content =~ s/^/> /gm; $content = $self->QuoteHeader . "\n$content\n\n"; } @@ -405,6 +390,84 @@ sub QuoteHeader { return $self->loc("On [_1], [_2] wrote:", $self->CreatedAsString, $self->CreatorObj->Name); } +=head2 ApplyQuoteWrap PARAMHASH + +Wrapper to calculate wrap criteria and apply quote wrapping if needed. + +=cut + +sub ApplyQuoteWrap { + my $self = shift; + my %args = @_; + my $content = $args{content}; + + # What's the longest line like? + my $max = 0; + foreach ( split ( /\n/, $args{content} ) ) { + $max = length if length > $max; + } + + if ( $max > 76 ) { + require Text::Quoted; + require Text::Wrapper; + + my $structure = Text::Quoted::extract($args{content}); + $content = $self->QuoteWrap(content_ref => $structure, + cols => $args{cols}, + max => $max ); + } + + $content =~ s/^/> /gm; # use regex since string might be multi-line + return $content; +} + +=head2 QuoteWrap PARAMHASH + +Wrap the contents of transactions based on Wrap settings, maintaining +the quote character from the original. + +=cut + +sub QuoteWrap { + my $self = shift; + my %args = @_; + my $ref = $args{content_ref}; + my $final_string; + + if ( ref $ref eq 'ARRAY' ){ + foreach my $array (@$ref){ + $final_string .= $self->QuoteWrap(content_ref => $array, + cols => $args{cols}, + max => $args{max} ); + } + } + elsif ( ref $ref eq 'HASH' ){ + return $ref->{quoter} . "\n" if $ref->{empty}; # Blank line + + my $col = $args{cols} - (length $ref->{quoter}); + my $wrapper = Text::Wrapper->new( columns => $col ); + + # Wrap on individual lines to honor incoming line breaks + # Otherwise deliberate separate lines (like a list or a sig) + # all get combined incorrectly into single paragraphs. + + my @lines = split /\n/, $ref->{text}; + my $wrap = join '', map { $wrapper->wrap($_) } @lines; + my $quoter = $ref->{quoter}; + + # Only add the space if actually quoting + $quoter .= ' ' if length $quoter; + $wrap =~ s/^/$quoter/mg; # use regex since string might be multi-line + + return $wrap; + } + else{ + $RT::Logger->warning("Can't apply quoting with $ref"); + return; + } + return $final_string; +} + =head2 Addresses @@ -725,8 +788,9 @@ sub BriefDescription { my $self = shift; my $field = $self->loc('CustomField'); + my $cf; if ( $self->Field ) { - my $cf = RT::CustomField->new( $self->CurrentUser ); + $cf = RT::CustomField->new( $self->CurrentUser ); $cf->SetContextObject( $self->Object ); $cf->Load( $self->Field ); $field = $cf->Name(); @@ -736,6 +800,44 @@ sub BriefDescription { my $new = $self->NewValue; my $old = $self->OldValue; + if ( $cf ) { + + if ( $cf->Type eq 'DateTime' ) { + if ($old) { + my $date = RT::Date->new( $self->CurrentUser ); + $date->Set( Format => 'ISO', Value => $old ); + $old = $date->AsString; + } + + if ($new) { + my $date = RT::Date->new( $self->CurrentUser ); + $date->Set( Format => 'ISO', Value => $new ); + $new = $date->AsString; + } + } + elsif ( $cf->Type eq 'Date' ) { + if ($old) { + my $date = RT::Date->new( $self->CurrentUser ); + $date->Set( + Format => 'unknown', + Value => $old, + Timezone => 'UTC', + ); + $old = $date->AsString( Time => 0, Timezone => 'UTC' ); + } + + if ($new) { + my $date = RT::Date->new( $self->CurrentUser ); + $date->Set( + Format => 'unknown', + Value => $new, + Timezone => 'UTC', + ); + $new = $date->AsString( Time => 0, Timezone => 'UTC' ); + } + } + } + if ( !defined($old) || $old eq '' ) { return $self->loc("[_1] [_2] added", $field, $new); } @@ -938,7 +1040,8 @@ sub BriefDescription { else { return $self->loc( "[_1] changed from [_2] to [_3]", $self->loc($self->Field), - ($self->OldValue? "'".$self->OldValue ."'" : $self->loc("(no value)")) , "'". $self->NewValue."'" ); + ($self->OldValue? "'".$self->OldValue ."'" : $self->loc("(no value)")), + ($self->NewValue? "'".$self->NewValue ."'" : $self->loc("(no value)"))); } }, PurgeTransaction => sub { diff --git a/rt/lib/RT/Transactions.pm b/rt/lib/RT/Transactions.pm index 3c9dac4d7..82bd50f12 100755 --- a/rt/lib/RT/Transactions.pm +++ b/rt/lib/RT/Transactions.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/URI.pm b/rt/lib/RT/URI.pm index c0958ca36..11a9e3e06 100644 --- a/rt/lib/RT/URI.pm +++ b/rt/lib/RT/URI.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -199,6 +199,8 @@ sub _GetResolver { if ($resolver) { $self->{'resolver'} = $resolver; } else { + RT->Logger->warning("Failed to create new resolver object for scheme '$scheme': $@") + if $@ !~ m{Can't locate RT/URI/\Q$scheme\E}; $self->{'resolver'} = RT::URI::base->new($self->CurrentUser); } diff --git a/rt/lib/RT/URI/a.pm b/rt/lib/RT/URI/a.pm index 9475ba157..76bd4e831 100644 --- a/rt/lib/RT/URI/a.pm +++ b/rt/lib/RT/URI/a.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/URI/base.pm b/rt/lib/RT/URI/base.pm index 63af14063..820f83f79 100644 --- a/rt/lib/RT/URI/base.pm +++ b/rt/lib/RT/URI/base.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/URI/fsck_com_article.pm b/rt/lib/RT/URI/fsck_com_article.pm index 2b2132f5f..34c81a818 100644 --- a/rt/lib/RT/URI/fsck_com_article.pm +++ b/rt/lib/RT/URI/fsck_com_article.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/URI/fsck_com_rt.pm b/rt/lib/RT/URI/fsck_com_rt.pm index 34249d057..9f68aa5b1 100644 --- a/rt/lib/RT/URI/fsck_com_rt.pm +++ b/rt/lib/RT/URI/fsck_com_rt.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/URI/t.pm b/rt/lib/RT/URI/t.pm index 71c81fa91..d3a1214dd 100644 --- a/rt/lib/RT/URI/t.pm +++ b/rt/lib/RT/URI/t.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/User.pm b/rt/lib/RT/User.pm index 5511b9f6a..018ac8a62 100755 --- a/rt/lib/RT/User.pm +++ b/rt/lib/RT/User.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Users.pm b/rt/lib/RT/Users.pm index 0f5ca706a..1c75f4250 100755 --- a/rt/lib/RT/Users.pm +++ b/rt/lib/RT/Users.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Util.pm b/rt/lib/RT/Util.pm index 38c3c20c9..9720f1da8 100644 --- a/rt/lib/RT/Util.pm +++ b/rt/lib/RT/Util.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -65,8 +65,11 @@ sub safe_run_child (&) { # values. Instead we set values, eval code, check pid # on failure and reset values only in our original # process + my ($oldv_dbh, $oldv_rth); my $dbh = $RT::Handle->dbh; + $oldv_dbh = $dbh->{'InactiveDestroy'} if $dbh; $dbh->{'InactiveDestroy'} = 1 if $dbh; + $oldv_rth = $RT::Handle->{'DisconnectHandleOnDestroy'}; $RT::Handle->{'DisconnectHandleOnDestroy'} = 0; my ($reader, $writer); @@ -90,8 +93,8 @@ sub safe_run_child (&) { my $err = $@; $err =~ s/^Stack:.*$//ms; if ( $our_pid == $$ ) { - $dbh->{'InactiveDestroy'} = 0 if $dbh; - $RT::Handle->{'DisconnectHandleOnDestroy'} = 1; + $dbh->{'InactiveDestroy'} = $oldv_dbh if $dbh; + $RT::Handle->{'DisconnectHandleOnDestroy'} = $oldv_rth; die "System Error: $err"; } else { print $writer "System Error: $err"; @@ -104,8 +107,8 @@ sub safe_run_child (&) { my ($response) = $reader->getline; warn $response if $response; - $dbh->{'InactiveDestroy'} = 0 if $dbh; - $RT::Handle->{'DisconnectHandleOnDestroy'} = 1; + $dbh->{'InactiveDestroy'} = $oldv_dbh if $dbh; + $RT::Handle->{'DisconnectHandleOnDestroy'} = $oldv_rth; return $want? (@res) : $res[0]; } diff --git a/rt/sbin/rt-attributes-viewer.in b/rt/sbin/rt-attributes-viewer.in index 59eb42361..31bae00c7 100644 --- a/rt/sbin/rt-attributes-viewer.in +++ b/rt/sbin/rt-attributes-viewer.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/sbin/rt-clean-sessions.in b/rt/sbin/rt-clean-sessions.in index 1d6e1cfb5..77730fe13 100644 --- a/rt/sbin/rt-clean-sessions.in +++ b/rt/sbin/rt-clean-sessions.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/sbin/rt-dump-metadata.in b/rt/sbin/rt-dump-metadata.in index 20c28538b..5e0e5c3db 100644 --- a/rt/sbin/rt-dump-metadata.in +++ b/rt/sbin/rt-dump-metadata.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -79,7 +79,11 @@ BEGIN { use Getopt::Long; my %opt; -GetOptions( \%opt, "help|h" ); +GetOptions( \%opt, "help|h", + "limit-to-privileged|l", + "skip-disabled|s", + "all|a", +); if ( $opt{help} ) { require Pod::Usage; @@ -93,8 +97,6 @@ require XML::Simple; RT::LoadConfig(); RT::Init(); -my $LocalOnly = @ARGV ? shift(@ARGV) : 1; - my %RV; my %Ignore = ( All => [ @@ -117,8 +119,15 @@ my @classes = qw( foreach my $class (@classes) { require "RT/$class.pm"; my $objects = "RT::$class"->new( RT->SystemUser ); - $objects->{find_disabled_rows} = 1; + $objects->{find_disabled_rows} = 1 unless $opt{'skip-disabled'}; $objects->UnLimit; + $objects->LimitToPrivileged if $class eq 'Users' + && $opt{'limit-to-privileged'}; + $objects->Limit( + FIELD => 'Domain', + OPERATOR => '=', + VALUE => 'UserDefined' + ) if $class eq 'Groups'; if ( $class eq 'CustomFields' ) { $objects->OrderByCols( @@ -130,7 +139,7 @@ foreach my $class (@classes) { $objects->OrderBy( FIELD => 'Id' ); } - if ($LocalOnly) { + unless ($opt{all}) { next if $class eq 'ACL'; # XXX - would go into infinite loop - XXX $objects->Limit( FIELD => 'LastUpdatedBy', @@ -142,14 +151,10 @@ foreach my $class (@classes) { OPERATOR => '!=', VALUE => $SystemUserId ) if $class eq 'Users'; - $objects->Limit( - FIELD => 'Domain', - OPERATOR => '=', - VALUE => 'UserDefined' - ) if $class eq 'Groups'; } my %fields; +OBJECT: while ( my $obj = $objects->Next ) { next if $obj->can('LastUpdatedBy') @@ -163,36 +168,116 @@ foreach my $class (@classes) { my $rv; - # next if $obj-> # skip default names - foreach my $field ( sort keys %fields ) { - my $value = $obj->__Value($field); - $rv->{$field} = $value if ( defined($value) && length($value) ); - } - delete $rv->{Disabled} unless $rv->{Disabled}; - - foreach my $record ( map { /ACL/ ? 'ACE' : substr( $_, 0, -1 ) } - @classes ) - { - foreach my $key ( map "$record$_", ( '', 'Id' ) ) { - next unless exists $rv->{$key}; - my $id = $rv->{$key} or next; - my $obj = "RT::$record"->new( RT->SystemUser ); - $obj->LoadByCols( Id => $id ) or next; - $rv->{$key} = $obj->__Value('Name') || 0; + if ( $class ne 'ACL' ) { + # next if $obj-> # skip default names + foreach my $field ( sort keys %fields ) { + my $value = $obj->__Value($field); + $rv->{$field} = $value if ( defined($value) && length($value) ); + } + delete $rv->{Disabled} unless $rv->{Disabled}; + + foreach my $record ( map { /ACL/ ? 'ACE' : substr( $_, 0, -1 ) } + @classes ) + { + foreach my $key ( map "$record$_", ( '', 'Id' ) ) { + next unless exists $rv->{$key}; + my $id = $rv->{$key} or next; + my $obj = "RT::$record"->new( RT->SystemUser ); + $obj->LoadByCols( Id => $id ) or next; + $rv->{$key} = $obj->__Value('Name') || 0; + } + } + + if ( $class eq 'Users' and defined $obj->Privileged ) { + $rv->{Privileged} = int( $obj->Privileged ); + } elsif ( $class eq 'CustomFields' ) { + my $values = $obj->Values; + while ( my $value = $values->Next ) { + push @{ $rv->{Values} }, { + map { ( $_ => $value->__Value($_) ) } + qw( + Name Description SortOrder + ), + }; + } + if ( $obj->LookupType eq 'RT::Queue-RT::Ticket' ) { + # XXX-TODO: unused CF's turn into global CF when importing + # as the sub InsertData in RT::Handle creates a global CF + # when no queue is specified. + $rv->{Queue} = []; + my $applies = $obj->AppliedTo; + while ( my $queue = $applies->Next ) { + push @{ $rv->{Queue} }, $queue->Name; + } + } } } + else { + # 1) pick the right + $rv->{Right} = $obj->RightName; + + # 2) Pick a level: Granted on Queue, CF, CF+Queue, or Globally? + for ( $obj->ObjectType ) { + if ( /^RT::Queue$/ ) { + next OBJECT if $opt{'skip-disabled'} && $obj->Object->Disabled; + $rv->{Queue} = $obj->Object->Name; + } + elsif ( /^RT::CustomField$/ ) { + next OBJECT if $opt{'skip-disabled'} && $obj->Object->Disabled; + $rv->{CF} = $obj->Object->Name; + } + elsif ( /^RT::Group$/ ) { + # No support for RT::Group ACLs in RT::Handle yet. + next OBJECT; + } + elsif ( /^RT::System$/ ) { + # skip setting anything on $rv; + # "Specifying none of the above will get you a global right." + } + } - if ( $class eq 'Users' and defined $obj->Privileged ) { - $rv->{Privileged} = int( $obj->Privileged ); - } elsif ( $class eq 'CustomFields' ) { - my $values = $obj->Values; - while ( my $value = $values->Next ) { - push @{ $rv->{Values} }, { - map { ( $_ => $value->__Value($_) ) } - qw( - Name Description SortOrder - ), - }; + # 3) Pick a Principal; User or Group or Role + if ( $obj->PrincipalType eq 'Group' ) { + next OBJECT if $opt{'skip-disabled'} && $obj->PrincipalObj->Disabled; + my $group = $obj->PrincipalObj->Object; + for ( $group->Domain ) { + # An internal user group + if ( /^SystemInternal$/ ) { + $rv->{GroupDomain} = $group->Domain; + $rv->{GroupType} = $group->Type; + } + # An individual user + elsif ( /^ACLEquivalence$/ ) { + my $member = $group->MembersObj->Next->MemberObj; + next OBJECT if $opt{'skip-disabled'} && $member->Disabled; + $rv->{UserId} = $member->Object->Name; + } + # A group you created + elsif ( /^UserDefined$/ ) { + $rv->{GroupDomain} = 'UserDefined'; + $rv->{GroupId} = $group->Name; + } + } + } else { + $rv->{GroupType} = $obj->PrincipalType; + # A system-level role + if ( $obj->ObjectType eq 'RT::System' ) { + $rv->{GroupDomain} = 'RT::System-Role'; + } + # A queue-level role + elsif ( $obj->ObjectType eq 'RT::Queue' ) { + $rv->{GroupDomain} = 'RT::Queue-Role'; + } + } + if ( $obj->LookupType eq 'RT::Queue-RT::Ticket' ) { + # XXX-TODO: unused CF's turn into global CF when importing + # as the sub InsertData in RT::Handle creates a global CF + # when no queue is specified. + $rv->{Queue} = []; + my $applies = $obj->AppliedTo; + while ( my $queue = $applies->Next ) { + push @{ $rv->{Queue} }, $queue->Name; + } } } @@ -200,6 +285,9 @@ foreach my $class (@classes) { my $attributes = $obj->Attributes; while ( my $attribute = $attributes->Next ) { my $content = $attribute->Content; + if ( $class eq 'Users' and $attribute->Name eq 'Bookmarks' ) { + next; + } $rv->{Attributes}{ $attribute->Name } = $content if length($content); } @@ -232,7 +320,7 @@ rt-dump-metadata - dump configuration metadata from an RT database =head1 SYNOPSIS - rt-dump-metdata [ 0 ] + rt-dump-metdata [--all] =head1 DESCRIPTION @@ -242,11 +330,28 @@ C. To dump and load a full RT database, you should generally use the native database tools instead, as well as performing any necessary steps from UPGRADING. -When run without arguments, the metadata dump will only include 'local' +This is NOT a tool for backing up an RT database. See also +L for more straightforward means of importing data. + +=head1 OPTIONS + +=over + +=item C<--all> or C<-a> + +When run with C<--all>, the dump will include all configuration +metadata; otherwise, the metadata dump will only include 'local' configuration changes, i.e. those done manually in the web interface. -When run with the argument '0', the dump will include all configuration -metadata. +=item C<--limit-to-privileged> or C<-l> + +Causes the dumper to only dump privileged users. + +=item C<--skip-disabled> or C<-s> + +Ignores disabled rows in the database. + +=back -This is NOT a tool for backing up an RT database. +=cut diff --git a/rt/sbin/rt-email-dashboards.in b/rt/sbin/rt-email-dashboards.in index f77ae6117..0fcb1268e 100644 --- a/rt/sbin/rt-email-dashboards.in +++ b/rt/sbin/rt-email-dashboards.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/sbin/rt-email-digest.in b/rt/sbin/rt-email-digest.in index 68f0b4c92..a535e3649 100644 --- a/rt/sbin/rt-email-digest.in +++ b/rt/sbin/rt-email-digest.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -95,6 +95,7 @@ sub usage { print "\t-p, --print\t" . loc("Print the resulting digest messages to STDOUT; don't mail them. Do not mark them as sent") . "\n"; + print "\t-v, --verbose\t" . loc("Give output even on messages successfully sent") . "\n"; print "\t-h, --help\t" . loc("Print this message") . "\n"; if ( $error eq 'help' ) { @@ -105,10 +106,11 @@ sub usage { } } -my ( $frequency, $print, $help ) = ( '', '', '' ); +my ( $frequency, $print, $verbose, $help ) = ( '', '', '', '' ); GetOptions( 'mode=s' => \$frequency, 'print' => \$print, + 'verbose' => \$verbose, 'help' => \$help, ); @@ -134,7 +136,7 @@ sub run { my ( $contents_list, $contents_body ) = build_digest_for_user( $user, $all_digest->{$user} ); # Now we have a content head and a content body. We can send a message. if ( send_digest( $user, $contents_list, $contents_body ) ) { - print "Sent message to $user\n"; + print "Sent message to $user\n" if $verbose; mark_transactions_sent( $frequency, $user, values %{$sent_transactions->{$user}} ) unless ($print); } else { print "Failed to send message to $user\n"; diff --git a/rt/sbin/rt-email-group-admin.in b/rt/sbin/rt-email-group-admin.in index f62662631..3306a3812 100755 --- a/rt/sbin/rt-email-group-admin.in +++ b/rt/sbin/rt-email-group-admin.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -245,10 +245,11 @@ sub _list { return; } -=head2 create NAME [--comment] [--group GNAME] [--user UNAME] +=head2 create NAME [--comment] [--group GNAME] [--user NAME-OR-EMAIL] Creates new action with NAME and adds users and/or groups to its -recipient list. Would be notify as comment if --comment specified. +recipient list. Would be notify as comment if --comment specified. The +user, if specified, will be autocreated if necessary. =cut @@ -295,8 +296,9 @@ sub __create_empty { sub _check_groups { - return grep { $_ ? 1: do { print STDERR "Group '$_' skipped, doesn't exist\n"; 0; } } - map { __check_group($_) } @_; + return map {$_->[1]} + grep { $_->[1] ? 1: do { print STDERR "Group '$_->[0]' skipped, doesn't exist\n"; 0; } } + map { [$_, __check_group($_)] } @_; } sub __check_group @@ -310,8 +312,9 @@ sub __check_group sub _check_users { - return grep { $_ ? 1: do { print STDERR "User '$_' skipped, doesn't exist\n"; 0; } } - map { __check_user($_) } @_; + return map {$_->[1]} + grep { $_->[1] ? 1: do { print STDERR "User '$_->[0]' skipped, doesn't exist and couldn't autocreate\n"; 0; } } + map { [$_, __check_user($_)] } @_; } sub __check_user @@ -320,12 +323,27 @@ sub __check_user require RT::User; my $obj = RT::User->new( RT->SystemUser ); $obj->Load( $instance ); + $obj->LoadByEmail( $instance ) + if not $obj->id and $instance =~ /@/; + + unless ($obj->id) { + my ($ok, $msg) = $obj->Create( + Name => $instance, + EmailAddress => $instance, + Privileged => 0, + Comments => 'Autocreated when added to notify action via rt-email-group-admin', + ); + print STDERR "Autocreate of user '$instance' failed: $msg\n" + unless $ok; + } + return $obj->id ? $obj : undef; } -=head2 add NAME [--group GNAME] [--user UNAME] +=head2 add NAME [--group GNAME] [--user NAME-OR-EMAIL] -Adds groups and/or users to recipients of the action NAME. +Adds groups and/or users to recipients of the action NAME. The user, if +specified, will be autocreated if necessary. =cut diff --git a/rt/sbin/rt-fulltext-indexer b/rt/sbin/rt-fulltext-indexer deleted file mode 100755 index 8ac0e9c21..000000000 --- a/rt/sbin/rt-fulltext-indexer +++ /dev/null @@ -1,465 +0,0 @@ -#!/usr/bin/perl -# BEGIN BPS TAGGED BLOCK {{{ -# -# COPYRIGHT: -# -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC -# -# -# (Except where explicitly superseded by other copyright notices) -# -# -# LICENSE: -# -# This work is made available to you under the terms of Version 2 of -# the GNU General Public License. A copy of that license should have -# been provided with this software, but in any event can be snarfed -# from www.gnu.org. -# -# This work is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301 or visit their web page on the internet at -# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. -# -# -# CONTRIBUTION SUBMISSION POLICY: -# -# (The following paragraph is not intended to limit the rights granted -# to you to modify and distribute this software under the terms of -# the GNU General Public License and is only of importance to you if -# you choose to contribute your changes and enhancements to the -# community by submitting them to Best Practical Solutions, LLC.) -# -# By intentionally submitting any modifications, corrections or -# derivatives to this work, or any other work intended for use with -# Request Tracker, to Best Practical Solutions, LLC, you confirm that -# you are the copyright holder for those contributions and you grant -# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, -# royalty-free, perpetual, license to use, copy, create derivative -# works based on those contributions, and sublicense and distribute -# those contributions and any derivatives thereof. -# -# END BPS TAGGED BLOCK }}} -use strict; -use warnings; -no warnings 'once'; - -# fix lib paths, some may be relative -BEGIN { - require File::Spec; - my @libs = ("/opt/rt3/lib", "/opt/rt3/local/lib"); - my $bin_path; - - for my $lib (@libs) { - unless ( File::Spec->file_name_is_absolute($lib) ) { - unless ($bin_path) { - if ( File::Spec->file_name_is_absolute(__FILE__) ) { - $bin_path = ( File::Spec->splitpath(__FILE__) )[1]; - } - else { - require FindBin; - no warnings "once"; - $bin_path = $FindBin::Bin; - } - } - $lib = File::Spec->catfile( $bin_path, File::Spec->updir, $lib ); - } - unshift @INC, $lib; - } -} - -BEGIN { - use RT; - RT::LoadConfig(); - RT::Init(); -}; -use RT::Interface::CLI (); - -my %OPT = ( - help => 0, - debug => 0, -); -my @OPT_LIST = qw(help|h! debug!); - -my $db_type = RT->Config->Get('DatabaseType'); -if ( $db_type eq 'Pg' ) { - %OPT = ( - %OPT, - limit => 0, - all => 0, - ); - push @OPT_LIST, 'limit=i', 'all!'; -} -elsif ( $db_type eq 'mysql' ) { - %OPT = ( - %OPT, - limit => 0, - all => 0, - xmlpipe2 => 0, - ); - push @OPT_LIST, 'limit=i', 'all!', 'xmlpipe2!'; -} -elsif ( $db_type eq 'Oracle' ) { - %OPT = ( - %OPT, - memory => '2M', - ); - push @OPT_LIST, qw(memory=s); -} - -use Getopt::Long qw(GetOptions); -GetOptions( \%OPT, @OPT_LIST ); - -if ( $OPT{'help'} ) { - RT::Interface::CLI->ShowHelp( - Sections => 'NAME|DESCRIPTION|'. uc($db_type), - ); -} - -my $fts_config = RT->Config->Get('FullTextSearch') || {}; -unless ( $fts_config->{'Enable'} ) { - print STDERR <{'Indexed'} ) { - print STDERR <{'IndexName'} || 'rt_fts_index'; - $RT::Handle->dbh->do( - "begin ctx_ddl.sync_index(?, ?); end;", undef, - $index, $OPT{'memory'} - ); - exit; -} elsif ( $db_type eq 'mysql' ) { - unless ($OPT{'xmlpipe2'}) { - print STDERR <Limit( - FIELD => 'id', - OPERATOR => '>', - VALUE => last_indexed($type) - ); - $attachments->OrderBy( FIELD => 'id', ORDER => 'asc' ); - $attachments->RowsPerPage( $OPT{'limit'} || 100 ); - - my $found = 0; - while ( my $a = $attachments->Next ) { - next if filter( $type, $a ); - debug("Found attachment #". $a->id ); - my $txt = extract($type, $a) or next; - $found++; - process( $type, $a, $txt ); - debug("Processed attachment #". $a->id ); - } - finalize( $type, $attachments ) if $found; - clean( $type ); - goto REDO if $OPT{'all'} and $attachments->Count == ($OPT{'limit'} || 100) -} - -sub attachments { - my $type = shift; - my $res = RT::Attachments->new( RT->SystemUser ); - my $txn_alias = $res->Join( - ALIAS1 => 'main', - FIELD1 => 'TransactionId', - TABLE2 => 'Transactions', - FIELD2 => 'id', - ); - $res->Limit( - ALIAS => $txn_alias, - FIELD => 'ObjectType', - VALUE => 'RT::Ticket', - ); - my $ticket_alias = $res->Join( - ALIAS1 => $txn_alias, - FIELD1 => 'ObjectId', - TABLE2 => 'Tickets', - FIELD2 => 'id', - ); - $res->Limit( - ALIAS => $ticket_alias, - FIELD => 'Status', - OPERATOR => '!=', - VALUE => 'deleted' - ); - - # On newer DBIx::SearchBuilder's, indicate that making the query DISTINCT - # is unnecessary because the joins won't produce duplicates. This - # drastically improves performance when fetching attachments. - $res->{joins_are_distinct} = 1; - - return goto_specific( - suffix => $type, - error => "Don't know how to find $type attachments", - arguments => [$res], - ); -} - -sub last_indexed { - my ($type) = (@_); - return goto_specific( - suffix => $db_type, - error => "Don't know how to find last indexed $type attachment for $db_type DB", - arguments => \@_, - ); -} - -sub filter { - my $type = shift; - return goto_specific( - suffix => $type, - arguments => \@_, - ); -} - -sub extract { - my $type = shift; - return goto_specific( - suffix => $type, - error => "No way to convert $type attachment into text", - arguments => \@_, - ); -} - -sub process { - return goto_specific( - suffix => $db_type, - error => "No processer for $db_type DB", - arguments => \@_, - ); -} - -sub finalize { - return goto_specific( - suffix => $db_type, - arguments => \@_, - ); -} - -sub clean { - return goto_specific( - suffix => $db_type, - arguments => \@_, - ); -} - -{ -sub last_indexed_mysql { - my $type = shift; - my $attr = $RT::System->FirstAttribute('LastIndexedAttachments'); - return 0 unless $attr; - return 0 unless exists $attr->{ $type }; - return $attr->{ $type } || 0; -} - -sub process_mysql { - my ($type, $attachment, $text) = (@_); - - my $doc = sphinx_template(); - - my $element = $doc->createElement('sphinx:document'); - $element->setAttribute( id => $attachment->id ); - $element->appendTextChild( content => $$text ); - - $doc->documentElement->appendChild( $element ); -} - -my $doc = undef; -sub sphinx_template { - return $doc if $doc; - - require XML::LibXML; - $doc = XML::LibXML::Document->new('1.0', 'UTF-8'); - my $root = $doc->createElement('sphinx:docset'); - $doc->setDocumentElement( $root ); - - my $schema = $doc->createElement('sphinx:schema'); - $root->appendChild( $schema ); - foreach ( qw(content) ) { - my $field = $doc->createElement('sphinx:field'); - $field->setAttribute( name => $_ ); - $schema->appendChild( $field ); - } - - return $doc; -} - -sub finalize_mysql { - my ($type, $attachments) = @_; - sphinx_template()->toFH(*STDOUT, 1); -} - -sub clean_mysql { - $doc = undef; -} - -} - -sub last_indexed_pg { - my $type = shift; - my $attachments = attachments( $type ); - my $alias = 'main'; - if ( $fts_config->{'Table'} && $fts_config->{'Table'} ne 'Attachments' ) { - $alias = $attachments->Join( - TYPE => 'left', - FIELD1 => 'id', - TABLE2 => $fts_config->{'Table'}, - FIELD2 => 'id', - ); - } - $attachments->Limit( - ALIAS => $alias, - FIELD => $fts_config->{'Column'}, - OPERATOR => 'IS NOT', - VALUE => 'NULL', - ); - $attachments->OrderBy( FIELD => 'id', ORDER => 'desc' ); - $attachments->RowsPerPage( 1 ); - my $res = $attachments->First; - return 0 unless $res; - return $res->id; -} - -sub process_pg { - my ($type, $attachment, $text) = (@_); - - my $dbh = $RT::Handle->dbh; - my $table = $fts_config->{'Table'}; - my $column = $fts_config->{'Column'}; - - my $query; - if ( $table ) { - if ( my ($id) = $dbh->selectrow_array("SELECT id FROM $table WHERE id = ?", undef, $attachment->id) ) { - $query = "UPDATE $table SET $column = to_tsvector(?) WHERE id = ?"; - } else { - $query = "INSERT INTO $table($column, id) VALUES(to_tsvector(?), ?)"; - } - } else { - $query = "UPDATE Attachments SET $column = to_tsvector(?) WHERE id = ?"; - } - - my $status = eval { $dbh->do( $query, undef, $$text, $attachment->id ) }; - unless ( $status ) { - if ( $dbh->err == 7 && $dbh->state eq '54000' ) { - warn "Attachment @{[$attachment->id]} cannot be indexed, as it contains too many unique words"; - } elsif ( $dbh->err == 7 && $dbh->state eq '22021' ) { - warn "Attachment @{[$attachment->id]} cannot be indexed, as it contains invalid UTF8 bytes"; - } else { - die "error: ". $dbh->errstr; - } - - # Insert an empty tsvector, so we count this row as "indexed" - # for purposes of knowing where to pick up - eval { $dbh->do( $query, undef, "", $attachment->id ) } - or die "Failed to insert empty tsvector: " . $dbh->errstr; - } -} - -sub attachments_text { - my $res = shift; - $res->Limit( FIELD => 'ContentType', VALUE => 'text/plain' ); - return $res; -} - -sub extract_text { - my $attachment = shift; - my $text = $attachment->Content; - return undef unless defined $text && length($text); - return \$text; -} - -sub attachments_html { - my $res = shift; - $res->Limit( FIELD => 'ContentType', VALUE => 'text/html' ); - return $res; -} - -sub filter_html { - my $attachment = shift; - if ( my $parent = $attachment->ParentObj ) { -# skip html parts that are alternatives - return 1 if $parent->id - && $parent->ContentType eq 'mulitpart/alternative'; - } - return 0; -} - -sub extract_html { - my $attachment = shift; - my $text = $attachment->Content; - return undef unless defined $text && length($text); -# TODO: html -> text - return \$text; -} - -sub goto_specific { - my %args = (@_); - - my $func = (caller(1))[3]; - $func =~ s/.*:://; - my $call = $func ."_". lc $args{'suffix'}; - unless ( defined &$call ) { - return undef unless $args{'error'}; - require Carp; Carp::croak( $args{'error'} ); - } - @_ = @{ $args{'arguments'} }; - goto &$call; -} - - -# helper functions -sub debug { print @_, "\n" if $OPT{debug}; 1 } -sub error { $RT::Logger->error(_(@_)); 1 } -sub warning { $RT::Logger->warn(_(@_)); 1 } - -=head1 NAME - -rt-fulltext-indexer - Indexer for full text search - -=head1 DESCRIPTION - -This is a helper script to keep full text indexes in sync with data. -Read F for complete details on how and when -to run it. - -=head1 AUTHOR - -Ruslan Zakirov Eruz@bestpractical.comE, -Alex Vandiver Ealexmv@bestpractical.comE - -=cut - diff --git a/rt/sbin/rt-fulltext-indexer.in b/rt/sbin/rt-fulltext-indexer.in index 9ad6d26bd..b84ca9499 100644 --- a/rt/sbin/rt-fulltext-indexer.in +++ b/rt/sbin/rt-fulltext-indexer.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -375,9 +375,9 @@ sub process_pg { my $status = eval { $dbh->do( $query, undef, $$text, $attachment->id ) }; unless ( $status ) { if ( $dbh->err == 7 && $dbh->state eq '54000' ) { - warn "Attachment @{[$attachment->id]} cannot be indexed, as it contains too many unique words"; + warn "Attachment @{[$attachment->id]} cannot be indexed. Most probably it contains too many unique words. Error: ". $dbh->errstr; } elsif ( $dbh->err == 7 && $dbh->state eq '22021' ) { - warn "Attachment @{[$attachment->id]} cannot be indexed, as it contains invalid UTF8 bytes"; + warn "Attachment @{[$attachment->id]} cannot be indexed. Most probably it contains invalid UTF8 bytes. Error: ". $dbh->errstr; } else { die "error: ". $dbh->errstr; } diff --git a/rt/sbin/rt-message-catalog b/rt/sbin/rt-message-catalog index b31b58de7..b4283694f 100755 --- a/rt/sbin/rt-message-catalog +++ b/rt/sbin/rt-message-catalog @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/sbin/rt-preferences-viewer.in b/rt/sbin/rt-preferences-viewer.in index d32588eca..8eeb7c97d 100644 --- a/rt/sbin/rt-preferences-viewer.in +++ b/rt/sbin/rt-preferences-viewer.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/sbin/rt-server.fcgi.in b/rt/sbin/rt-server.fcgi.in index 632ba0ba6..0d11f0124 100644 --- a/rt/sbin/rt-server.fcgi.in +++ b/rt/sbin/rt-server.fcgi.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -127,7 +127,7 @@ EOF RT->InstallMode(1); } else { - RT->Init(); + RT->Init( Heavy => 1 ); my ($status, $msg) = RT::Handle->CheckCompatibility( $RT::Handle->dbh, 'post'); unless ( $status ) { diff --git a/rt/sbin/rt-server.in b/rt/sbin/rt-server.in index 632ba0ba6..0d11f0124 100644 --- a/rt/sbin/rt-server.in +++ b/rt/sbin/rt-server.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -127,7 +127,7 @@ EOF RT->InstallMode(1); } else { - RT->Init(); + RT->Init( Heavy => 1 ); my ($status, $msg) = RT::Handle->CheckCompatibility( $RT::Handle->dbh, 'post'); unless ( $status ) { diff --git a/rt/sbin/rt-session-viewer.in b/rt/sbin/rt-session-viewer.in index cdf7a77bc..5ace1aee2 100644 --- a/rt/sbin/rt-session-viewer.in +++ b/rt/sbin/rt-session-viewer.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/sbin/rt-setup-database.in b/rt/sbin/rt-setup-database.in index f1e35f5cc..edf3d4636 100644 --- a/rt/sbin/rt-setup-database.in +++ b/rt/sbin/rt-setup-database.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -83,13 +83,15 @@ $| = 1; # unbuffer all output. my %args = ( dba => '@DB_DBA@', + package => 'RT', ); GetOptions( \%args, 'action=s', 'force', 'debug', - 'dba=s', 'dba-password=s', 'prompt-for-dba-password', + 'dba=s', 'dba-password=s', 'prompt-for-dba-password', 'package=s', 'datafile=s', 'datadir=s', 'skip-create', 'root-password-file=s', + 'upgrade-from=s', 'upgrade-to=s', 'help|h', ); @@ -164,6 +166,7 @@ foreach my $key(qw(Type Host Name User Password)) { my $db_type = RT->Config->Get('DatabaseType') || ''; my $db_host = RT->Config->Get('DatabaseHost') || ''; +my $db_port = RT->Config->Get('DatabasePort') || ''; my $db_name = RT->Config->Get('DatabaseName') || ''; my $db_user = RT->Config->Get('DatabaseUser') || ''; my $db_pass = RT->Config->Get('DatabasePassword') || ''; @@ -191,8 +194,11 @@ if ($args{'skip-create'}) { } } +my $version_word_regex = join '|', RT::Handle->version_words; +my $version_dir = qr/^\d+\.\d+\.\d+(?:$version_word_regex)?\d*$/; + print "Working with:\n" - ."Type:\t$db_type\nHost:\t$db_host\nName:\t$db_name\n" + ."Type:\t$db_type\nHost:\t$db_host\nPort:\t$db_port\nName:\t$db_name\n" ."User:\t$db_user\nDBA:\t$dba_user" . ($args{'skip-create'} ? ' (No DBA)' : '') . "\n"; foreach my $action ( @actions ) { @@ -220,7 +226,7 @@ sub action_drop { unless ( $args{'force'} ) { print <version_words; my $upgrading_from = undef; do { if ( defined $upgrading_from ) { print "Doesn't match #.#.#: "; } else { - print "Enter RT version you're upgrading from: "; + print "Enter $args{package} version you're upgrading from: "; } - $upgrading_from = scalar ; + $upgrading_from = $args{'upgrade-from'} || scalar ; chomp $upgrading_from; $upgrading_from =~ s/\s+//g; - } while $upgrading_from !~ /^\d+\.\d+\.\d+(?:$version_word_regex)?\d*$/; + } while $upgrading_from !~ /$version_dir/; my $upgrading_to = $RT::VERSION; return (0, "The current version $upgrading_to is lower than $upgrading_from") @@ -347,14 +352,14 @@ sub action_upgrade { if ( defined $custom_upgrading_to ) { print "Doesn't match #.#.#: "; } else { - print "\nEnter RT version if you want to stop upgrade at some point,\n"; + print "\nEnter $args{package} version if you want to stop upgrade at some point,\n"; print " or leave it blank if you want apply above upgrades: "; } - $custom_upgrading_to = scalar ; + $custom_upgrading_to = $args{'upgrade-to'} || scalar ; chomp $custom_upgrading_to; $custom_upgrading_to =~ s/\s+//g; last unless $custom_upgrading_to; - } while $custom_upgrading_to !~ /^\d+\.\d+\.\d+(?:$version_word_regex)?\d*$/; + } while $custom_upgrading_to !~ /$version_dir/; if ( $custom_upgrading_to ) { return ( @@ -410,9 +415,12 @@ sub get_versions_from_to { my ($base_dir, $from, $to) = @_; opendir( my $dh, $base_dir ) or die "couldn't open dir: $!"; - my @versions = grep -d "$base_dir/$_" && /\d+\.\d+\.\d+/, readdir $dh; + my @versions = grep -d "$base_dir/$_" && /$version_dir/, readdir $dh; closedir $dh; + die "\nERROR: No upgrade data found in '$base_dir'! Perhaps you specified the wrong --datadir?\n" + unless @versions; + return grep defined $to ? RT::Handle::cmp_version($_, $to) <= 0 : 1, grep RT::Handle::cmp_version($_, $from) > 0, @@ -429,7 +437,7 @@ sub error { sub get_dba_password { print "In order to create or update your RT database," . " this script needs to connect to your " - . " $db_type instance on $db_host as $dba_user\n"; + . " $db_type instance on $db_host (port '$db_port') as $dba_user\n"; print "Please specify that user's database password below. If the user has no database\n"; print "password, just press return.\n\n"; print "Password: "; @@ -588,4 +596,14 @@ administrator privileges for 'init' and 'insert': rather than using the default administrative password for RT's "root" user, use the password in this file. +=item upgrade-from + +for 'upgrade': specifies the version to upgrade from, and do not prompt +for it if it appears to be a valid version. + +=item upgrade-to + +for 'upgrade': specifies the version to upgrade to, and do not prompt +for it if it appears to be a valid version. + =back diff --git a/rt/sbin/rt-setup-fulltext-index b/rt/sbin/rt-setup-fulltext-index deleted file mode 100755 index ef9b7d543..000000000 --- a/rt/sbin/rt-setup-fulltext-index +++ /dev/null @@ -1,714 +0,0 @@ -#!/usr/bin/perl -# BEGIN BPS TAGGED BLOCK {{{ -# -# COPYRIGHT: -# -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC -# -# -# (Except where explicitly superseded by other copyright notices) -# -# -# LICENSE: -# -# This work is made available to you under the terms of Version 2 of -# the GNU General Public License. A copy of that license should have -# been provided with this software, but in any event can be snarfed -# from www.gnu.org. -# -# This work is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301 or visit their web page on the internet at -# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. -# -# -# CONTRIBUTION SUBMISSION POLICY: -# -# (The following paragraph is not intended to limit the rights granted -# to you to modify and distribute this software under the terms of -# the GNU General Public License and is only of importance to you if -# you choose to contribute your changes and enhancements to the -# community by submitting them to Best Practical Solutions, LLC.) -# -# By intentionally submitting any modifications, corrections or -# derivatives to this work, or any other work intended for use with -# Request Tracker, to Best Practical Solutions, LLC, you confirm that -# you are the copyright holder for those contributions and you grant -# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, -# royalty-free, perpetual, license to use, copy, create derivative -# works based on those contributions, and sublicense and distribute -# those contributions and any derivatives thereof. -# -# END BPS TAGGED BLOCK }}} -use strict; -use warnings; -no warnings 'once'; - -# fix lib paths, some may be relative -BEGIN { - require File::Spec; - my @libs = ("/opt/rt3/lib", "/opt/rt3/local/lib"); - my $bin_path; - - for my $lib (@libs) { - unless ( File::Spec->file_name_is_absolute($lib) ) { - unless ($bin_path) { - if ( File::Spec->file_name_is_absolute(__FILE__) ) { - $bin_path = ( File::Spec->splitpath(__FILE__) )[1]; - } - else { - require FindBin; - no warnings "once"; - $bin_path = $FindBin::Bin; - } - } - $lib = File::Spec->catfile( $bin_path, File::Spec->updir, $lib ); - } - unshift @INC, $lib; - } -} - -BEGIN { - use RT; - RT::LoadConfig(); - RT::Init(); -}; -use RT::Interface::CLI (); - -my %DB = ( - type => scalar RT->Config->Get('DatabaseType'), - user => scalar RT->Config->Get('DatabaseUser'), - admin => 'freeside', - admin_password => undef, -); - -my %OPT = ( - help => 0, - ask => 1, - dryrun => 0, - attachments => 1, -); - -my %DEFAULT; -if ( $DB{'type'} eq 'Pg' ) { - %DEFAULT = ( - table => 'Attachments', - column => 'ContentIndex', - ); -} -elsif ( $DB{'type'} eq 'mysql' ) { - %DEFAULT = ( - table => 'AttachmentsIndex', - ); -} -elsif ( $DB{'type'} eq 'Oracle' ) { - %DEFAULT = ( - prefix => 'rt_fts_', - ); -} - -use Getopt::Long qw(GetOptions); -GetOptions( - 'h|help!' => \$OPT{'help'}, - 'ask!' => \$OPT{'ask'}, - 'dry-run!' => \$OPT{'dryrun'}, - 'attachments!' => \$OPT{'attachments'}, - - 'table=s' => \$OPT{'table'}, - 'column=s' => \$OPT{'column'}, - 'url=s' => \$OPT{'url'}, - 'maxmatches=i' => \$OPT{'maxmatches'}, - 'index-type=s' => \$OPT{'index-type'}, - - 'dba=s' => \$DB{'admin'}, - 'dba-password=s' => \$DB{'admin_password'}, -) or show_help(); - -if ( $OPT{'help'} || (!$DB{'admin'} && $DB{'type'} eq 'Oracle' ) ) { - show_help( !$OPT{'help'} ); -} - -my $dbh = $RT::Handle->dbh; -$dbh->{'RaiseError'} = 1; -$dbh->{'PrintError'} = 1; - -if ( $DB{'type'} eq 'mysql' ) { - check_sphinx(); - my $table = $OPT{'table'} || prompt( - message => "Enter name of a new MySQL table that will be used to connect to the\n" - . "Sphinx server:", - default => $DEFAULT{'table'}, - silent => !$OPT{'ask'}, - ); - my $url = $OPT{'url'} || prompt( - message => "Enter URL of the sphinx search server; this should be of the form\n" - . "sphinx://:/", - default => 'sphinx://localhost:3312/rt', - silent => !$OPT{'ask'}, - ); - my $maxmatches = $OPT{'maxmatches'} || prompt( - message => "Maximum number of matches to return; this is the maximum number of\n" - . "attachment records returned by the search, not the maximum number\n" - . "of tickets. Both your RT_SiteConfig.pm and your sphinx.conf must\n" - . "agree on this value. Larger values cause your Sphinx server to\n" - . "consume more memory and CPU time per query.", - default => 10000, - silent => !$OPT{'ask'}, - ); - - my $schema = < "DROP TABLE $table" ) - unless $OPT{'dryrun'}; - insert_schema( $schema ); - - print_rt_config( Table => $table, MaxMatches => $maxmatches ); - - require URI; - my $urlo = URI->new( $url ); - my ($host, $port) = split /:/, $urlo->authority; - my $index = $urlo->path; - $index =~ s{^/+}{}; - - my $var_path = $RT::VarPath; - - my %sphinx_conf = (); - $sphinx_conf{'host'} = RT->Config->Get('DatabaseHost'); - $sphinx_conf{'db'} = RT->Config->Get('DatabaseName'); - $sphinx_conf{'user'} = RT->Config->Get('DatabaseUser'); - $sphinx_conf{'pass'} = RT->Config->Get('DatabasePassword'); - - print < "Enter the name of a DB table that will be used to store the Pg tsvector.\n" - . "You may either use the existing Attachments table, or create a new\n" - . "table.", - default => $DEFAULT{'table'}, - silent => !$OPT{'ask'}, - ); - my $column = $OPT{'column'} || prompt( - message => 'Enter the name of a column that will be used to store the Pg tsvector:', - default => $DEFAULT{'column'}, - silent => !$OPT{'ask'}, - ); - - my $schema; - my $drop; - if ( lc($table) eq 'attachments' ) { - $drop = "ALTER TABLE $table DROP COLUMN $column"; - $schema = "ALTER TABLE $table ADD COLUMN $column tsvector"; - } else { - $drop = "DROP TABLE $table"; - $schema = "CREATE TABLE $table ( " - ."id INTEGER NOT NULL," - ."$column tsvector )"; - } - - my $index_type = lc($OPT{'index-type'} || ''); - while ( $index_type ne 'gist' and $index_type ne 'gin' ) { - $index_type = lc prompt( - message => "You may choose between GiST or GIN indexes; the former is several times\n" - . "slower to search, but takes less space on disk and is faster to update.", - default => 'GiST', - silent => !$OPT{'ask'}, - ); - } - - do_error_is_ok( dba_handle() => $drop ) - unless $OPT{'dryrun'}; - insert_schema( $schema ); - insert_schema("CREATE INDEX ${column}_idx ON $table USING $index_type($column)"); - - print_rt_config( Table => $table, Column => $column ); -} -elsif ( $DB{'type'} eq 'Oracle' ) { - { - my $dbah = dba_handle(); - do_print_error( $dbah => 'GRANT CTXAPP TO '. $DB{'user'} ); - do_print_error( $dbah => 'GRANT EXECUTE ON CTXSYS.CTX_DDL TO '. $DB{'user'} ); - } - - my %PREFERENCES = ( - datastore => { - type => 'DIRECT_DATASTORE', - }, - filter => { - type => 'AUTO_FILTER', -# attributes => { -# timeout => 120, # seconds -# timeout_type => 'HEURISTIC', # or 'FIXED' -# }, - }, - lexer => { - type => 'WORLD_LEXER', - }, - word_list => { - type => 'BASIC_WORDLIST', - attributes => { - stemmer => 'AUTO', - fuzzy_match => 'AUTO', -# fuzzy_score => undef, -# fuzzy_numresults => undef, -# substring_index => undef, -# prefix_index => undef, -# prefix_length_min => undef, -# prefix_length_max => undef, -# wlidcard_maxterms => undef, - }, - }, - 'section_group' => { - type => 'NULL_SECTION_GROUP', - }, - - storage => { - type => 'BASIC_STORAGE', - attributes => { - R_TABLE_CLAUSE => 'lob (data) store as (cache)', - I_INDEX_CLAUSE => 'compress 2', - }, - }, - ); - - my @params = (); - push @params, ora_create_datastore( %{ $PREFERENCES{'datastore'} } ); - push @params, ora_create_filter( %{ $PREFERENCES{'filter'} } ); - push @params, ora_create_lexer( %{ $PREFERENCES{'lexer'} } ); - push @params, ora_create_word_list( %{ $PREFERENCES{'word_list'} } ); - push @params, ora_create_stop_list(); - push @params, ora_create_section_group( %{ $PREFERENCES{'section_group'} } ); - push @params, ora_create_storage( %{ $PREFERENCES{'storage'} } ); - - my $index_params = join "\n", @params; - my $index_name = $DEFAULT{prefix} .'index'; - do_error_is_ok( $dbh => "DROP INDEX $index_name" ) - unless $OPT{'dryrun'}; - $dbh->do( - "CREATE INDEX $index_name ON Attachments(Content) - indextype is ctxsys.context parameters(' - $index_params - ')", - ) unless $OPT{'dryrun'}; - - print_rt_config( IndexName => $index_name ); -} -else { - die "Full-text indexes on $DB{type} are not yet supported"; -} - -sub check_tsvalue { - my $dbh = $RT::Handle->dbh; - my $fts = ($dbh->selectrow_array(<CheckSphinxSE; - - print STDERR < 'datastore', - ); -} - -sub ora_create_filter { - my $res = ''; - $res .= sprintf "format column %s\n", ora_create_format_column(); - $res .= sprintf 'filter %s', ora_create_preference( - @_, - name => 'filter', - ); - return $res; -} - -sub ora_create_lexer { - return sprintf 'lexer %s', ora_create_preference( - @_, - name => 'lexer', - ); -} - -sub ora_create_word_list { - return sprintf 'wordlist %s', ora_create_preference( - @_, - name => 'word_list', - ); -} - -sub ora_create_stop_list { - my $file = shift || 'etc/stopwords/en.txt'; - return '' unless -e $file; - - my $name = $DEFAULT{'prefix'} .'stop_list'; - unless ($OPT{'dryrun'}) { - do_error_is_ok( $dbh => 'begin ctx_ddl.drop_stoplist(?); end;', $name ); - - $dbh->do( - 'begin ctx_ddl.create_stoplist(?, ?); end;', - undef, $name, 'BASIC_STOPLIST' - ); - - open( my $fh, '<:utf8', $file ) - or die "couldn't open file '$file': $!"; - while ( my $word = <$fh> ) { - chomp $word; - $dbh->do( - 'begin ctx_ddl.add_stopword(?, ?); end;', - undef, $name, $word - ); - } - close $fh; - } - return sprintf 'stoplist %s', $name; -} - -sub ora_create_section_group { - my %args = @_; - my $name = $DEFAULT{'prefix'} .'section_group'; - unless ($OPT{'dryrun'}) { - do_error_is_ok( $dbh => 'begin ctx_ddl.drop_section_group(?); end;', $name ); - $dbh->do( - 'begin ctx_ddl.create_section_group(?, ?); end;', - undef, $name, $args{'type'} - ); - } - return sprintf 'section group %s', $name; -} - -sub ora_create_storage { - return sprintf 'storage %s', ora_create_preference( - @_, - name => 'storage', - ); -} - -sub ora_create_format_column { - my $column_name = 'ContentOracleFormat'; - return $column_name if $OPT{'dryrun'}; - unless ( - $dbh->column_info( - undef, undef, uc('Attachments'), uc( $column_name ) - )->fetchrow_array - ) { - $dbh->do(qq{ - ALTER TABLE Attachments ADD $column_name VARCHAR2(10) - }); - } - - my $detect_format = qq{ - CREATE OR REPLACE FUNCTION $DEFAULT{prefix}detect_format_simple( - parent IN NUMBER, - type IN VARCHAR2, - encoding IN VARCHAR2, - fname IN VARCHAR2 - ) - RETURN VARCHAR2 - AS - format VARCHAR2(10); - BEGIN - format := CASE - }; - unless ( $OPT{'attachments'} ) { - $detect_format .= qq{ - WHEN fname IS NOT NULL THEN 'ignore' - }; - } - $detect_format .= qq{ - WHEN type = 'text' THEN 'text' - WHEN type = 'text/rtf' THEN 'ignore' - WHEN type LIKE 'text/%' THEN 'text' - WHEN type LIKE 'message/%' THEN 'text' - ELSE 'ignore' - END; - RETURN format; - END; - }; - ora_create_procedure( $detect_format ); - - $dbh->do(qq{ - UPDATE Attachments - SET $column_name = $DEFAULT{prefix}detect_format_simple( - Parent, - ContentType, ContentEncoding, - Filename - ) - WHERE $column_name IS NULL - }); - $dbh->do(qq{ - CREATE OR REPLACE TRIGGER $DEFAULT{prefix}set_format - BEFORE INSERT - ON Attachments - FOR EACH ROW - BEGIN - :new.$column_name := $DEFAULT{prefix}detect_format_simple( - :new.Parent, - :new.ContentType, :new.ContentEncoding, - :new.Filename - ); - END; - }); - return $column_name; -} - -sub ora_create_preference { - my %info = @_; - my $name = $DEFAULT{'prefix'} . $info{'name'}; - return $name if $OPT{'dryrun'}; - do_error_is_ok( $dbh => 'begin ctx_ddl.drop_preference(?); end;', $name ); - $dbh->do( - 'begin ctx_ddl.create_preference(?, ?); end;', - undef, $name, $info{'type'} - ); - return $name unless $info{'attributes'}; - - while ( my ($attr, $value) = each %{ $info{'attributes'} } ) { - $dbh->do( - 'begin ctx_ddl.set_attribute(?, ?, ?); end;', - undef, $name, $attr, $value - ); - } - - return $name; -} - -sub ora_create_procedure { - my $text = shift; - - return if $OPT{'dryrun'}; - my $status = $dbh->do($text, { RaiseError => 0 }); - - # Statement succeeded - return if $status; - - if ( 6550 != $dbh->err ) { - # Utter failure - die $dbh->errstr; - } - else { - my $msg = $dbh->func( 'plsql_errstr' ); - die $dbh->errstr if !defined $msg; - die $msg if $msg; - } -} - -sub dba_handle { - if ( $DB{'type'} eq 'Oracle' ) { - $ENV{'NLS_LANG'} = "AMERICAN_AMERICA.AL32UTF8"; - $ENV{'NLS_NCHAR'} = "AL32UTF8"; - } - my $dsn = do { my $h = new RT::Handle; $h->BuildDSN; $h->DSN }; - my $dbh = DBI->connect( - $dsn, $DB{admin}, $DB{admin_password}, - { RaiseError => 1, PrintError => 1 }, - ); - unless ( $dbh ) { - die "Failed to connect to $dsn as user '$DB{admin}': ". $DBI::errstr; - } - return $dbh; -} - -sub do_error_is_ok { - my $dbh = shift; - local $dbh->{'RaiseError'} = 0; - local $dbh->{'PrintError'} = 0; - return $dbh->do(shift, undef, @_); -} - -sub do_print_error { - my $dbh = shift; - local $dbh->{'RaiseError'} = 0; - local $dbh->{'PrintError'} = 1; - return $dbh->do(shift, undef, @_); -} - -sub prompt { - my %args = ( @_ ); - return $args{'default'} if $args{'silent'}; - - local $| = 1; - print $args{'message'}; - if ( $args{'default'} ) { - print "\n[". $args{'default'} .']: '; - } else { - print ":\n"; - } - - my $res = ; - chomp $res; - print "\n"; - return $args{'default'} if !$res && $args{'default'}; - return $res; -} - -sub verbose { print @_, "\n" if $OPT{verbose} || $OPT{verbose}; 1 } -sub debug { print @_, "\n" if $OPT{debug}; 1 } -sub error { $RT::Logger->error( @_ ); verbose(@_); 1 } -sub warning { $RT::Logger->warning( @_ ); verbose(@_); 1 } - -sub show_help { - my $error = shift; - RT::Interface::CLI->ShowHelp( - ExitValue => $error, - Sections => 'NAME|DESCRIPTION', - ); -} - -sub print_rt_config { - my %args = @_; - my $config = < 1, - Indexed => 1, -END - - $config .= sprintf(" %-10s => '$args{$_}',\n",$_) - foreach grep defined $args{$_}, keys %args; - $config .= ");\n"; - - print $config; -} - -sub insert_schema { - my $dbh = dba_handle(); - my $message = "Going to run the following in the DB:"; - my $schema = shift; - print "$message\n"; - my $disp = $schema; - $disp =~ s/^/ /mg; - print "$disp\n\n"; - return if $OPT{'dryrun'}; - - my $res = $dbh->do( $schema ); - unless ( $res ) { - die "Couldn't run DDL query: ". $dbh->errstr; - } -} - -=head1 NAME - -rt-setup-fulltext-index - Create indexes for full text search - -=head1 DESCRIPTION - -This script creates the appropriate tables, columns, functions, and / or -views necessary for full-text searching for your database type. It will -drop any existing indexes in the process. - -Please read F for complete documentation on -full-text indexing for your database type. - -If you have a non-standard database administrator user or password, you -may use the C<--dba> and C<--dba-password> parameters to set them -explicitly: - - rt-setup-fulltext-index --dba sysdba --dba-password 'secret' - -To test what will happen without running any DDL, pass the C<--dryrun> -flag. - -The Oracle index determines which content-types it will index at -creation time. By default, textual message bodies and textual uploaded -attachments (attachments with filenames) are indexed; to ignore textual -attachments, pass the C<--no-attachments> flag when the index is -created. - - -=head1 AUTHOR - -Ruslan Zakirov Eruz@bestpractical.comE, -Alex Vandiver Ealexmv@bestpractical.comE - -=cut - diff --git a/rt/sbin/rt-setup-fulltext-index.in b/rt/sbin/rt-setup-fulltext-index.in index eab720352..ade728f8f 100644 --- a/rt/sbin/rt-setup-fulltext-index.in +++ b/rt/sbin/rt-setup-fulltext-index.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/sbin/rt-shredder.in b/rt/sbin/rt-shredder.in index e7910e523..a903728ce 100755 --- a/rt/sbin/rt-shredder.in +++ b/rt/sbin/rt-shredder.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -135,7 +135,10 @@ BEGIN { } -use RT::Shredder (); +use RT -init; + +require RT::Shredder; + use Getopt::Long qw(GetOptions); use File::Spec (); @@ -146,7 +149,6 @@ our %plugins = RT::Shredder::Plugin->List; our %opt; parse_args(); -RT::Shredder::Init( %opt ); my $shredder = RT::Shredder->new; { diff --git a/rt/sbin/rt-test-dependencies.in b/rt/sbin/rt-test-dependencies.in index df1ef135f..868105431 100644 --- a/rt/sbin/rt-test-dependencies.in +++ b/rt/sbin/rt-test-dependencies.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -295,6 +295,7 @@ Test::WWW::Mechanize::PSGI Plack::Middleware::Test::StashWarnings 0.06 Test::LongString Test::NoWarnings +Locale::PO . $deps{'FASTCGI'} = [ text_to_hash( << '.') ]; diff --git a/rt/sbin/rt-validate-aliases.in b/rt/sbin/rt-validate-aliases.in index 5dbfaa459..97252ae19 100644 --- a/rt/sbin/rt-validate-aliases.in +++ b/rt/sbin/rt-validate-aliases.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/sbin/rt-validator.in b/rt/sbin/rt-validator.in index d90280169..128e60af0 100644 --- a/rt/sbin/rt-validator.in +++ b/rt/sbin/rt-validator.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/sbin/standalone_httpd b/rt/sbin/standalone_httpd deleted file mode 100755 index 5bc8d0c8b..000000000 --- a/rt/sbin/standalone_httpd +++ /dev/null @@ -1,284 +0,0 @@ -#!/usr/bin/perl -w -# BEGIN BPS TAGGED BLOCK {{{ -# -# COPYRIGHT: -# -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC -# -# -# (Except where explicitly superseded by other copyright notices) -# -# -# LICENSE: -# -# This work is made available to you under the terms of Version 2 of -# the GNU General Public License. A copy of that license should have -# been provided with this software, but in any event can be snarfed -# from www.gnu.org. -# -# This work is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301 or visit their web page on the internet at -# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. -# -# -# CONTRIBUTION SUBMISSION POLICY: -# -# (The following paragraph is not intended to limit the rights granted -# to you to modify and distribute this software under the terms of -# the GNU General Public License and is only of importance to you if -# you choose to contribute your changes and enhancements to the -# community by submitting them to Best Practical Solutions, LLC.) -# -# By intentionally submitting any modifications, corrections or -# derivatives to this work, or any other work intended for use with -# Request Tracker, to Best Practical Solutions, LLC, you confirm that -# you are the copyright holder for those contributions and you grant -# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, -# royalty-free, perpetual, license to use, copy, create derivative -# works based on those contributions, and sublicense and distribute -# those contributions and any derivatives thereof. -# -# END BPS TAGGED BLOCK }}} -use warnings; -use strict; - -# fix lib paths, some may be relative -BEGIN { - die <file_name_is_absolute($lib) ) { - unless ($bin_path) { - if ( File::Spec->file_name_is_absolute(__FILE__) ) { - $bin_path = ( File::Spec->splitpath(__FILE__) )[1]; - } - else { - require FindBin; - no warnings "once"; - $bin_path = $FindBin::Bin; - } - } - $lib = File::Spec->catfile( $bin_path, File::Spec->updir, $lib ); - } - unshift @INC, $lib; - } - -} - -use Getopt::Long; -no warnings 'once'; - -if (grep { m/help/ } @ARGV) { - require Pod::Usage; - print Pod::Usage::pod2usage( { verbose => 2 } ); - exit; -} - -require RT; -RT->LoadConfig(); -RT->InitPluginPaths(); -RT->InitLogging(); -require Module::Refresh if RT->Config->Get('DevelMode'); - -require RT::Handle; -my ($integrity, $state, $msg) = RT::Handle->CheckIntegrity; - -unless ( $integrity ) { - print STDERR <ConfigFile && !-w _) { - die 'Since your configuration exists (' - . RT::Installer->ConfigFile - . ") but is not writable, I'm refusing to do anything.\n"; - } - - RT->Config->Set( 'LexiconLanguages' => '*' ); - RT::I18N->Init; - - RT->InstallMode(1); -} else { - RT->Init(); - - my ($status, $msg) = RT::Handle->CheckCompatibility( $RT::Handle->dbh, 'post'); - unless ( $status ) { - print STDERR $msg, "\n\n"; - exit -1; - } -} - -# we must disconnect DB before fork -if ($RT::Handle) { - $RT::Handle->dbh(undef); - undef $RT::Handle; -} - -require RT::Interface::Web::Handler; -my $app = RT::Interface::Web::Handler->PSGIApp; - -if ($ENV{RT_TESTING}) { - my $screen_logger = $RT::Logger->remove('screen'); - require Log::Dispatch::Perl; - $RT::Logger->add( - Log::Dispatch::Perl->new( - name => 'rttest', - min_level => $screen_logger->min_level, - action => { - error => 'warn', - critical => 'warn' - } - ) - ); - require Plack::Middleware::Test::StashWarnings; - $app = Plack::Middleware::Test::StashWarnings->wrap($app); -} - -# when used as a psgi file -if (caller) { - return $app; -} - - -# load appropriate server - -require Plack::Runner; - -my $is_fastcgi = $0 =~ m/fcgi$/; -my $r = Plack::Runner->new( $0 =~ /standalone/ ? ( server => 'Standalone' ) : - $is_fastcgi ? ( server => 'FCGI' ) - : (), - env => 'deployment' ); - -# figure out the port -my $port; - -# handle "rt-server 8888" for back-compat, but complain about it -if ($ARGV[0] && $ARGV[0] =~ m/^\d+$/) { - warn "Deprecated: please run $0 --port $ARGV[0] instead\n"; - unshift @ARGV, '--port'; -} - -my @args = @ARGV; - -use List::MoreUtils 'last_index'; -my $last_index = last_index { $_ eq '--port' } @args; - -my $explicit_port; - -if ( $last_index != -1 && $args[$last_index+1] =~ /^\d+$/ ) { - $explicit_port = $args[$last_index+1]; - $port = $explicit_port; - - # inform the rest of the system what port we manually chose - my $old_app = $app; - $app = sub { - my $env = shift; - - $env->{'rt.explicit_port'} = $port; - - $old_app->($env, @_); - }; -} -else { - # default to the configured WebPort and inform Plack::Runner - $port = RT->Config->Get('WebPort') || '8080'; - push @args, '--port', $port; -} - -push @args, '--server', 'Standalone' if RT->InstallMode; -push @args, '--server', 'Starlet' unless $r->{server} || grep { m/--server/ } @args; - -$r->parse_options(@args); - -delete $r->{options} if $is_fastcgi; ### mangle_host_port_socket ruins everything - -unless ($r->{env} eq 'development') { - push @{$r->{options}}, server_ready => sub { - my($args) = @_; - my $name = $args->{server_software} || ref($args); # $args is $server - my $host = $args->{host} || 0; - my $proto = $args->{proto} || 'http'; - print STDERR "$name: Accepting connections at $proto://$host:$args->{port}/\n"; - }; -} -eval { $r->run($app) }; -if (my $err = $@) { - handle_startup_error($err); -} - -exit 0; - -sub handle_startup_error { - my $err = shift; - if ( $err =~ /listen/ ) { - handle_bind_error(); - } else { - die - "Something went wrong while trying to run RT's standalone web server:\n\t" - . $err; - } -} - - -sub handle_bind_error { - - print STDERR < -EOF - - if ($explicit_port) { - print STDERR - "Please check your system configuration or choose another port\n\n"; - } -} - -__END__ - -=head1 NAME - -rt-server - RT standalone server - -=head1 SYNOPSIS - - # runs prefork server listening on port 8080, requires Starlet - rt-server --port 8080 - - # runs server listening on port 8080 - rt-server --server Standalone --port 8080 - # or - standalone_httpd --port 8080 - - # runs other PSGI server on port 8080 - rt-server --server Starman --port 8080 diff --git a/rt/sbin/standalone_httpd.in b/rt/sbin/standalone_httpd.in index 632ba0ba6..0d11f0124 100644 --- a/rt/sbin/standalone_httpd.in +++ b/rt/sbin/standalone_httpd.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -127,7 +127,7 @@ EOF RT->InstallMode(1); } else { - RT->Init(); + RT->Init( Heavy => 1 ); my ($status, $msg) = RT::Handle->CheckCompatibility( $RT::Handle->dbh, 'post'); unless ( $status ) { diff --git a/rt/share/html/Admin/Articles/Classes/CustomFields.html b/rt/share/html/Admin/Articles/Classes/CustomFields.html index 65705b9a4..f8a5bd69b 100644 --- a/rt/share/html/Admin/Articles/Classes/CustomFields.html +++ b/rt/share/html/Admin/Articles/Classes/CustomFields.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Articles/Classes/GroupRights.html b/rt/share/html/Admin/Articles/Classes/GroupRights.html index 9fdd60d55..433e3d518 100644 --- a/rt/share/html/Admin/Articles/Classes/GroupRights.html +++ b/rt/share/html/Admin/Articles/Classes/GroupRights.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Articles/Classes/Modify.html b/rt/share/html/Admin/Articles/Classes/Modify.html index ef71ac399..f96094b78 100644 --- a/rt/share/html/Admin/Articles/Classes/Modify.html +++ b/rt/share/html/Admin/Articles/Classes/Modify.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Articles/Classes/Objects.html b/rt/share/html/Admin/Articles/Classes/Objects.html index b7c393774..5d5118fa9 100644 --- a/rt/share/html/Admin/Articles/Classes/Objects.html +++ b/rt/share/html/Admin/Articles/Classes/Objects.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Articles/Classes/Topics.html b/rt/share/html/Admin/Articles/Classes/Topics.html index 88b602ed3..525bf45b4 100644 --- a/rt/share/html/Admin/Articles/Classes/Topics.html +++ b/rt/share/html/Admin/Articles/Classes/Topics.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Articles/Classes/UserRights.html b/rt/share/html/Admin/Articles/Classes/UserRights.html index fe614ba9f..9f26fdcca 100644 --- a/rt/share/html/Admin/Articles/Classes/UserRights.html +++ b/rt/share/html/Admin/Articles/Classes/UserRights.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Articles/Classes/index.html b/rt/share/html/Admin/Articles/Classes/index.html index 5d478b3b9..1dc975622 100644 --- a/rt/share/html/Admin/Articles/Classes/index.html +++ b/rt/share/html/Admin/Articles/Classes/index.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Articles/Elements/Topics b/rt/share/html/Admin/Articles/Elements/Topics index c6a383996..f30f69e38 100644 --- a/rt/share/html/Admin/Articles/Elements/Topics +++ b/rt/share/html/Admin/Articles/Elements/Topics @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Articles/index.html b/rt/share/html/Admin/Articles/index.html index b2fca6f66..171af476d 100644 --- a/rt/share/html/Admin/Articles/index.html +++ b/rt/share/html/Admin/Articles/index.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/CustomFields/GroupRights.html b/rt/share/html/Admin/CustomFields/GroupRights.html index e58268fa4..b63619f55 100644 --- a/rt/share/html/Admin/CustomFields/GroupRights.html +++ b/rt/share/html/Admin/CustomFields/GroupRights.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/CustomFields/Modify.html b/rt/share/html/Admin/CustomFields/Modify.html index 8628cd383..015f4f350 100644 --- a/rt/share/html/Admin/CustomFields/Modify.html +++ b/rt/share/html/Admin/CustomFields/Modify.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -345,7 +345,7 @@ $m->callback(CallbackName => 'ValidationPatterns', Values => \@CFvalidations); <%ARGS> $id => undef $TypeComposite => undef -$LookupType => undef +$LookupType => RT::Ticket->CustomFieldLookupType $MaxValues => undef $SortOrder => undef $Description => undef diff --git a/rt/share/html/Admin/CustomFields/Objects.html b/rt/share/html/Admin/CustomFields/Objects.html index 26183acc1..f28997675 100644 --- a/rt/share/html/Admin/CustomFields/Objects.html +++ b/rt/share/html/Admin/CustomFields/Objects.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/CustomFields/UserRights.html b/rt/share/html/Admin/CustomFields/UserRights.html index d4692986c..bc2d800c4 100644 --- a/rt/share/html/Admin/CustomFields/UserRights.html +++ b/rt/share/html/Admin/CustomFields/UserRights.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/CustomFields/index.html b/rt/share/html/Admin/CustomFields/index.html index 24264fd23..78d9a92a9 100644 --- a/rt/share/html/Admin/CustomFields/index.html +++ b/rt/share/html/Admin/CustomFields/index.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Elements/AddCustomFieldValue b/rt/share/html/Admin/Elements/AddCustomFieldValue index ac570db2c..ec1a34bc8 100755 --- a/rt/share/html/Admin/Elements/AddCustomFieldValue +++ b/rt/share/html/Admin/Elements/AddCustomFieldValue @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Elements/ConfigureMyRT b/rt/share/html/Admin/Elements/ConfigureMyRT index 91e71d291..4be6803f8 100644 --- a/rt/share/html/Admin/Elements/ConfigureMyRT +++ b/rt/share/html/Admin/Elements/ConfigureMyRT @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Elements/CreateUserCalled b/rt/share/html/Admin/Elements/CreateUserCalled index f0394ea14..f5ef9da8a 100755 --- a/rt/share/html/Admin/Elements/CreateUserCalled +++ b/rt/share/html/Admin/Elements/CreateUserCalled @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Elements/EditCustomField b/rt/share/html/Admin/Elements/EditCustomField index caf5ce838..4c5e98fb6 100755 --- a/rt/share/html/Admin/Elements/EditCustomField +++ b/rt/share/html/Admin/Elements/EditCustomField @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Elements/EditCustomFieldValues b/rt/share/html/Admin/Elements/EditCustomFieldValues index 32715805a..5a81ec7db 100755 --- a/rt/share/html/Admin/Elements/EditCustomFieldValues +++ b/rt/share/html/Admin/Elements/EditCustomFieldValues @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Elements/EditCustomFieldValuesSource b/rt/share/html/Admin/Elements/EditCustomFieldValuesSource index 2b3051442..3aecf7cf6 100644 --- a/rt/share/html/Admin/Elements/EditCustomFieldValuesSource +++ b/rt/share/html/Admin/Elements/EditCustomFieldValuesSource @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Elements/EditCustomFields b/rt/share/html/Admin/Elements/EditCustomFields index 7e63e5836..d3cd8e125 100755 --- a/rt/share/html/Admin/Elements/EditCustomFields +++ b/rt/share/html/Admin/Elements/EditCustomFields @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Elements/EditQueueWatcherGroup b/rt/share/html/Admin/Elements/EditQueueWatcherGroup index 56c6490d5..767bc857c 100644 --- a/rt/share/html/Admin/Elements/EditQueueWatcherGroup +++ b/rt/share/html/Admin/Elements/EditQueueWatcherGroup @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Elements/EditQueueWatchers b/rt/share/html/Admin/Elements/EditQueueWatchers index d7954820b..fb9d1d5f2 100755 --- a/rt/share/html/Admin/Elements/EditQueueWatchers +++ b/rt/share/html/Admin/Elements/EditQueueWatchers @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Elements/EditRights b/rt/share/html/Admin/Elements/EditRights index 1522543f7..5d1e62f40 100644 --- a/rt/share/html/Admin/Elements/EditRights +++ b/rt/share/html/Admin/Elements/EditRights @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Elements/EditRightsCategoryTabs b/rt/share/html/Admin/Elements/EditRightsCategoryTabs index 60d0a4412..61e30c313 100644 --- a/rt/share/html/Admin/Elements/EditRightsCategoryTabs +++ b/rt/share/html/Admin/Elements/EditRightsCategoryTabs @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -70,7 +70,8 @@ if ( blessed($Context) and $Context->can('RightCategories') ) { my %right_categories = %{$Context->RightCategories}; for my $right (keys %available_rights) { - push @{$categories{$right_categories{$right}}}, $right; + my $category = $right_categories{$right} || 'Miscellaneous'; # loc + push @{$categories{$category}}, $right; } } @@ -94,7 +95,12 @@ my %category_desc = ( 'Status' => loc('Status changes'), ); -my %catsort = ( General => 1, Staff => 2, Admin => 3, Status => 4 ); +my %catsort = ( General => 1, Staff => 2, Admin => 3, Status => 4, Miscellaneous => 999 ); +my $i = 5; +for my $category ( sort keys %categories ) { + next if $catsort{$category}; + $catsort{$category} = $i++; +} $acldesc ||= join '-', ($Principal ? $Principal->PrincipalId : 'addprincipal'), ref($Context), $Context->Id; @@ -102,7 +108,7 @@ $acldesc ||= join '-', ($Principal ? $Principal->PrincipalId : 'addprincipal'),
% for my $category (sort { $catsort{$a} <=> $catsort{$b} } keys %categories) { diff --git a/rt/share/html/Admin/Elements/EditScrip b/rt/share/html/Admin/Elements/EditScrip index bd1bde71d..3e2227c73 100755 --- a/rt/share/html/Admin/Elements/EditScrip +++ b/rt/share/html/Admin/Elements/EditScrip @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Elements/EditScrips b/rt/share/html/Admin/Elements/EditScrips index 25cafb42f..c92fc5563 100755 --- a/rt/share/html/Admin/Elements/EditScrips +++ b/rt/share/html/Admin/Elements/EditScrips @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Elements/EditTemplates b/rt/share/html/Admin/Elements/EditTemplates index 28fc59c49..e713e9d29 100755 --- a/rt/share/html/Admin/Elements/EditTemplates +++ b/rt/share/html/Admin/Elements/EditTemplates @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Elements/EditUserComments b/rt/share/html/Admin/Elements/EditUserComments index 1a163d0d8..ac4b91a9d 100755 --- a/rt/share/html/Admin/Elements/EditUserComments +++ b/rt/share/html/Admin/Elements/EditUserComments @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Elements/Header b/rt/share/html/Admin/Elements/Header index 7169bda94..b55052173 100755 --- a/rt/share/html/Admin/Elements/Header +++ b/rt/share/html/Admin/Elements/Header @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Elements/ListGlobalCustomFields b/rt/share/html/Admin/Elements/ListGlobalCustomFields index ccec9986f..05ee51966 100755 --- a/rt/share/html/Admin/Elements/ListGlobalCustomFields +++ b/rt/share/html/Admin/Elements/ListGlobalCustomFields @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Elements/ListGlobalScrips b/rt/share/html/Admin/Elements/ListGlobalScrips index 042628c1c..89491d3a7 100755 --- a/rt/share/html/Admin/Elements/ListGlobalScrips +++ b/rt/share/html/Admin/Elements/ListGlobalScrips @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Elements/ModifyTemplate b/rt/share/html/Admin/Elements/ModifyTemplate index f5bb866de..d12dbb436 100755 --- a/rt/share/html/Admin/Elements/ModifyTemplate +++ b/rt/share/html/Admin/Elements/ModifyTemplate @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Elements/PickCustomFields b/rt/share/html/Admin/Elements/PickCustomFields index 7ed29993c..bb9ba8cc8 100644 --- a/rt/share/html/Admin/Elements/PickCustomFields +++ b/rt/share/html/Admin/Elements/PickCustomFields @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Elements/PickObjects b/rt/share/html/Admin/Elements/PickObjects index 6fccd49fa..d8f1aac66 100644 --- a/rt/share/html/Admin/Elements/PickObjects +++ b/rt/share/html/Admin/Elements/PickObjects @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Elements/Portal b/rt/share/html/Admin/Elements/Portal index 52257aebe..b0b41f28a 100644 --- a/rt/share/html/Admin/Elements/Portal +++ b/rt/share/html/Admin/Elements/Portal @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Elements/QueueRightsForUser b/rt/share/html/Admin/Elements/QueueRightsForUser index a00f84ff7..bab16853d 100755 --- a/rt/share/html/Admin/Elements/QueueRightsForUser +++ b/rt/share/html/Admin/Elements/QueueRightsForUser @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Elements/SelectCustomField b/rt/share/html/Admin/Elements/SelectCustomField index 70b7be61f..9f2c24b66 100644 --- a/rt/share/html/Admin/Elements/SelectCustomField +++ b/rt/share/html/Admin/Elements/SelectCustomField @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Elements/SelectCustomFieldLookupType b/rt/share/html/Admin/Elements/SelectCustomFieldLookupType index 7caa4eaef..7a66ff19c 100644 --- a/rt/share/html/Admin/Elements/SelectCustomFieldLookupType +++ b/rt/share/html/Admin/Elements/SelectCustomFieldLookupType @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Elements/SelectCustomFieldRenderType b/rt/share/html/Admin/Elements/SelectCustomFieldRenderType index 6484def34..0ef6b53ea 100644 --- a/rt/share/html/Admin/Elements/SelectCustomFieldRenderType +++ b/rt/share/html/Admin/Elements/SelectCustomFieldRenderType @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -56,11 +56,6 @@ $Default ||= $cf->DefaultRenderType($TypeComposite); my @types = $cf->RenderTypes($TypeComposite); -# XXX: We currently don't support cascaded select CFs when -# rendering as a list, so don't offer it for now. -if ( $BasedOn ) { - @types = grep { not /List/ } @types; -} <%ARGS> $Default => undef diff --git a/rt/share/html/Admin/Elements/SelectCustomFieldType b/rt/share/html/Admin/Elements/SelectCustomFieldType index bf4cce1cb..a61b0bfa0 100755 --- a/rt/share/html/Admin/Elements/SelectCustomFieldType +++ b/rt/share/html/Admin/Elements/SelectCustomFieldType @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Elements/SelectGroups b/rt/share/html/Admin/Elements/SelectGroups index 2661a02fc..e74bede72 100755 --- a/rt/share/html/Admin/Elements/SelectGroups +++ b/rt/share/html/Admin/Elements/SelectGroups @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Elements/SelectModifyGroup b/rt/share/html/Admin/Elements/SelectModifyGroup index 8e8c7c9af..9aa6419a7 100755 --- a/rt/share/html/Admin/Elements/SelectModifyGroup +++ b/rt/share/html/Admin/Elements/SelectModifyGroup @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Elements/SelectModifyQueue b/rt/share/html/Admin/Elements/SelectModifyQueue index 08fd8e901..92f4a7dad 100755 --- a/rt/share/html/Admin/Elements/SelectModifyQueue +++ b/rt/share/html/Admin/Elements/SelectModifyQueue @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Elements/SelectModifyUser b/rt/share/html/Admin/Elements/SelectModifyUser index 7365f5a6e..0d4b130c0 100755 --- a/rt/share/html/Admin/Elements/SelectModifyUser +++ b/rt/share/html/Admin/Elements/SelectModifyUser @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Elements/SelectNewGroupMembers b/rt/share/html/Admin/Elements/SelectNewGroupMembers index a3a649291..72f649c64 100755 --- a/rt/share/html/Admin/Elements/SelectNewGroupMembers +++ b/rt/share/html/Admin/Elements/SelectNewGroupMembers @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -57,7 +57,7 @@ jQuery(function(){ jQuery(event.target).val(ui.item.value); jQuery(event.target).closest("form").submit(); } - }); + }).addClass("autocompletes-user"); }); % } diff --git a/rt/share/html/Admin/Elements/SelectRights b/rt/share/html/Admin/Elements/SelectRights index 161c09122..7994c14b4 100755 --- a/rt/share/html/Admin/Elements/SelectRights +++ b/rt/share/html/Admin/Elements/SelectRights @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Elements/SelectScrip b/rt/share/html/Admin/Elements/SelectScrip index e13726d13..ffac81cf3 100755 --- a/rt/share/html/Admin/Elements/SelectScrip +++ b/rt/share/html/Admin/Elements/SelectScrip @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Elements/SelectScripAction b/rt/share/html/Admin/Elements/SelectScripAction index a3f4431b5..33f6c1801 100755 --- a/rt/share/html/Admin/Elements/SelectScripAction +++ b/rt/share/html/Admin/Elements/SelectScripAction @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Elements/SelectScripCondition b/rt/share/html/Admin/Elements/SelectScripCondition index a962e6eeb..e895c9425 100755 --- a/rt/share/html/Admin/Elements/SelectScripCondition +++ b/rt/share/html/Admin/Elements/SelectScripCondition @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Elements/SelectSingleOrMultiple b/rt/share/html/Admin/Elements/SelectSingleOrMultiple index ae2639f6c..11cb0a7f1 100755 --- a/rt/share/html/Admin/Elements/SelectSingleOrMultiple +++ b/rt/share/html/Admin/Elements/SelectSingleOrMultiple @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Elements/SelectStage b/rt/share/html/Admin/Elements/SelectStage index 78624eea3..1adb7c2cf 100644 --- a/rt/share/html/Admin/Elements/SelectStage +++ b/rt/share/html/Admin/Elements/SelectStage @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Elements/SelectTemplate b/rt/share/html/Admin/Elements/SelectTemplate index 5da3baace..67e661b5b 100755 --- a/rt/share/html/Admin/Elements/SelectTemplate +++ b/rt/share/html/Admin/Elements/SelectTemplate @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Elements/SelectUsers b/rt/share/html/Admin/Elements/SelectUsers index 7089362ff..2562b7a82 100755 --- a/rt/share/html/Admin/Elements/SelectUsers +++ b/rt/share/html/Admin/Elements/SelectUsers @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Elements/ShowKeyInfo b/rt/share/html/Admin/Elements/ShowKeyInfo index 71b58cfed..56c1d770d 100644 --- a/rt/share/html/Admin/Elements/ShowKeyInfo +++ b/rt/share/html/Admin/Elements/ShowKeyInfo @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Global/CustomFields/Class-Article.html b/rt/share/html/Admin/Global/CustomFields/Class-Article.html index 3f8a52c65..f7401bae4 100644 --- a/rt/share/html/Admin/Global/CustomFields/Class-Article.html +++ b/rt/share/html/Admin/Global/CustomFields/Class-Article.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Global/CustomFields/Groups.html b/rt/share/html/Admin/Global/CustomFields/Groups.html index 8466ff21e..64e331059 100644 --- a/rt/share/html/Admin/Global/CustomFields/Groups.html +++ b/rt/share/html/Admin/Global/CustomFields/Groups.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Global/CustomFields/Queue-Tickets.html b/rt/share/html/Admin/Global/CustomFields/Queue-Tickets.html index 4bdf702fc..5ab984405 100755 --- a/rt/share/html/Admin/Global/CustomFields/Queue-Tickets.html +++ b/rt/share/html/Admin/Global/CustomFields/Queue-Tickets.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Global/CustomFields/Queue-Transactions.html b/rt/share/html/Admin/Global/CustomFields/Queue-Transactions.html index 45c8de050..c198054f1 100755 --- a/rt/share/html/Admin/Global/CustomFields/Queue-Transactions.html +++ b/rt/share/html/Admin/Global/CustomFields/Queue-Transactions.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Global/CustomFields/Queues.html b/rt/share/html/Admin/Global/CustomFields/Queues.html index 6581bd3ed..04a264f3d 100644 --- a/rt/share/html/Admin/Global/CustomFields/Queues.html +++ b/rt/share/html/Admin/Global/CustomFields/Queues.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Global/CustomFields/Users.html b/rt/share/html/Admin/Global/CustomFields/Users.html index bb065db62..588818baf 100644 --- a/rt/share/html/Admin/Global/CustomFields/Users.html +++ b/rt/share/html/Admin/Global/CustomFields/Users.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Global/CustomFields/index.html b/rt/share/html/Admin/Global/CustomFields/index.html index 1a1406a0c..9034baf16 100644 --- a/rt/share/html/Admin/Global/CustomFields/index.html +++ b/rt/share/html/Admin/Global/CustomFields/index.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Global/GroupRights.html b/rt/share/html/Admin/Global/GroupRights.html index cccd894b1..055f1e033 100755 --- a/rt/share/html/Admin/Global/GroupRights.html +++ b/rt/share/html/Admin/Global/GroupRights.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Global/MyRT.html b/rt/share/html/Admin/Global/MyRT.html index 9b3cb96ee..d31aa444f 100644 --- a/rt/share/html/Admin/Global/MyRT.html +++ b/rt/share/html/Admin/Global/MyRT.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Global/Scrip.html b/rt/share/html/Admin/Global/Scrip.html index a730b8d0e..d03d52fd2 100755 --- a/rt/share/html/Admin/Global/Scrip.html +++ b/rt/share/html/Admin/Global/Scrip.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Global/Scrips.html b/rt/share/html/Admin/Global/Scrips.html index b9fd279ff..feccea569 100755 --- a/rt/share/html/Admin/Global/Scrips.html +++ b/rt/share/html/Admin/Global/Scrips.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Global/Template.html b/rt/share/html/Admin/Global/Template.html index 27b2a96c2..fad2d86e4 100755 --- a/rt/share/html/Admin/Global/Template.html +++ b/rt/share/html/Admin/Global/Template.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Global/Templates.html b/rt/share/html/Admin/Global/Templates.html index 9ef9f835e..64d6bd6d8 100755 --- a/rt/share/html/Admin/Global/Templates.html +++ b/rt/share/html/Admin/Global/Templates.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Global/Topics.html b/rt/share/html/Admin/Global/Topics.html index 9ad584b50..4b5aa6414 100644 --- a/rt/share/html/Admin/Global/Topics.html +++ b/rt/share/html/Admin/Global/Topics.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Global/UserRights.html b/rt/share/html/Admin/Global/UserRights.html index 55babf0b0..45d2bfc70 100755 --- a/rt/share/html/Admin/Global/UserRights.html +++ b/rt/share/html/Admin/Global/UserRights.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Global/index.html b/rt/share/html/Admin/Global/index.html index e382203fc..e01cff623 100755 --- a/rt/share/html/Admin/Global/index.html +++ b/rt/share/html/Admin/Global/index.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Groups/GroupRights.html b/rt/share/html/Admin/Groups/GroupRights.html index b3f0426f7..8e7f90827 100755 --- a/rt/share/html/Admin/Groups/GroupRights.html +++ b/rt/share/html/Admin/Groups/GroupRights.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Groups/History.html b/rt/share/html/Admin/Groups/History.html index 91a4fcce1..ba6ac813d 100644 --- a/rt/share/html/Admin/Groups/History.html +++ b/rt/share/html/Admin/Groups/History.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Groups/Members.html b/rt/share/html/Admin/Groups/Members.html index 24d575e7a..aca3633e6 100755 --- a/rt/share/html/Admin/Groups/Members.html +++ b/rt/share/html/Admin/Groups/Members.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Groups/Modify.html b/rt/share/html/Admin/Groups/Modify.html index b3bc13faa..94431d09d 100755 --- a/rt/share/html/Admin/Groups/Modify.html +++ b/rt/share/html/Admin/Groups/Modify.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Groups/UserRights.html b/rt/share/html/Admin/Groups/UserRights.html index e2c4b9c91..bcd2b0008 100755 --- a/rt/share/html/Admin/Groups/UserRights.html +++ b/rt/share/html/Admin/Groups/UserRights.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Groups/index.html b/rt/share/html/Admin/Groups/index.html index b86571f1a..a70904645 100755 --- a/rt/share/html/Admin/Groups/index.html +++ b/rt/share/html/Admin/Groups/index.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Queues/CustomField.html b/rt/share/html/Admin/Queues/CustomField.html index 3524c5b45..b1e0b9e6f 100755 --- a/rt/share/html/Admin/Queues/CustomField.html +++ b/rt/share/html/Admin/Queues/CustomField.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Queues/CustomFields.html b/rt/share/html/Admin/Queues/CustomFields.html index 7d1e60198..b5386900b 100755 --- a/rt/share/html/Admin/Queues/CustomFields.html +++ b/rt/share/html/Admin/Queues/CustomFields.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Queues/GroupRights.html b/rt/share/html/Admin/Queues/GroupRights.html index 72c0f2eff..60fb84399 100755 --- a/rt/share/html/Admin/Queues/GroupRights.html +++ b/rt/share/html/Admin/Queues/GroupRights.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Queues/History.html b/rt/share/html/Admin/Queues/History.html index 3a725b09a..7df45649a 100644 --- a/rt/share/html/Admin/Queues/History.html +++ b/rt/share/html/Admin/Queues/History.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Queues/Modify.html b/rt/share/html/Admin/Queues/Modify.html index 49736a45a..5ef308dae 100755 --- a/rt/share/html/Admin/Queues/Modify.html +++ b/rt/share/html/Admin/Queues/Modify.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Queues/People.html b/rt/share/html/Admin/Queues/People.html index e7cdd47e1..e3a9d0c20 100755 --- a/rt/share/html/Admin/Queues/People.html +++ b/rt/share/html/Admin/Queues/People.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Queues/Scrip.html b/rt/share/html/Admin/Queues/Scrip.html index fd487a157..4181c5184 100755 --- a/rt/share/html/Admin/Queues/Scrip.html +++ b/rt/share/html/Admin/Queues/Scrip.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Queues/Scrips.html b/rt/share/html/Admin/Queues/Scrips.html index 326d23fe0..8b1220d60 100755 --- a/rt/share/html/Admin/Queues/Scrips.html +++ b/rt/share/html/Admin/Queues/Scrips.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Queues/Template.html b/rt/share/html/Admin/Queues/Template.html index 50c29dc24..dfcee30fe 100755 --- a/rt/share/html/Admin/Queues/Template.html +++ b/rt/share/html/Admin/Queues/Template.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Queues/Templates.html b/rt/share/html/Admin/Queues/Templates.html index 1d1f19dc7..8713e20dc 100755 --- a/rt/share/html/Admin/Queues/Templates.html +++ b/rt/share/html/Admin/Queues/Templates.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Queues/UserRights.html b/rt/share/html/Admin/Queues/UserRights.html index ec908672f..957eed47b 100755 --- a/rt/share/html/Admin/Queues/UserRights.html +++ b/rt/share/html/Admin/Queues/UserRights.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Queues/index.html b/rt/share/html/Admin/Queues/index.html index 7f267021b..4ef183ee1 100755 --- a/rt/share/html/Admin/Queues/index.html +++ b/rt/share/html/Admin/Queues/index.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -58,6 +58,7 @@ <& /Elements/CollectionList, OrderBy => 'Name', Order => 'ASC', + Rows => 50, %ARGS, Format => $Format, Collection => $queues, diff --git a/rt/share/html/Admin/Tools/Configuration.html b/rt/share/html/Admin/Tools/Configuration.html index bedbba54b..43e9c21b1 100644 --- a/rt/share/html/Admin/Tools/Configuration.html +++ b/rt/share/html/Admin/Tools/Configuration.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Tools/Queries.html b/rt/share/html/Admin/Tools/Queries.html index 6304ffbf5..c9f6c2daa 100644 --- a/rt/share/html/Admin/Tools/Queries.html +++ b/rt/share/html/Admin/Tools/Queries.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Tools/Shredder/Dumps/dhandler b/rt/share/html/Admin/Tools/Shredder/Dumps/dhandler index a070c2342..bc09f2511 100644 --- a/rt/share/html/Admin/Tools/Shredder/Dumps/dhandler +++ b/rt/share/html/Admin/Tools/Shredder/Dumps/dhandler @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Tools/Shredder/Elements/DumpFileLink b/rt/share/html/Admin/Tools/Shredder/Elements/DumpFileLink index c43e81048..af720eb7d 100644 --- a/rt/share/html/Admin/Tools/Shredder/Elements/DumpFileLink +++ b/rt/share/html/Admin/Tools/Shredder/Elements/DumpFileLink @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Tools/Shredder/Elements/Error/NoRights b/rt/share/html/Admin/Tools/Shredder/Elements/Error/NoRights index 93319c491..af11bd7d6 100644 --- a/rt/share/html/Admin/Tools/Shredder/Elements/Error/NoRights +++ b/rt/share/html/Admin/Tools/Shredder/Elements/Error/NoRights @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Tools/Shredder/Elements/Error/NoStorage b/rt/share/html/Admin/Tools/Shredder/Elements/Error/NoStorage index 6197d395d..b337aa28f 100644 --- a/rt/share/html/Admin/Tools/Shredder/Elements/Error/NoStorage +++ b/rt/share/html/Admin/Tools/Shredder/Elements/Error/NoStorage @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Tools/Shredder/Elements/Object/RT--Attachment b/rt/share/html/Admin/Tools/Shredder/Elements/Object/RT--Attachment index cc6dd7dab..6ebdb4138 100644 --- a/rt/share/html/Admin/Tools/Shredder/Elements/Object/RT--Attachment +++ b/rt/share/html/Admin/Tools/Shredder/Elements/Object/RT--Attachment @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Tools/Shredder/Elements/Object/RT--Ticket b/rt/share/html/Admin/Tools/Shredder/Elements/Object/RT--Ticket index 1786959b2..9dcdeaddc 100644 --- a/rt/share/html/Admin/Tools/Shredder/Elements/Object/RT--Ticket +++ b/rt/share/html/Admin/Tools/Shredder/Elements/Object/RT--Ticket @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Tools/Shredder/Elements/Object/RT--User b/rt/share/html/Admin/Tools/Shredder/Elements/Object/RT--User index e8808e5cd..6cb7d1f11 100644 --- a/rt/share/html/Admin/Tools/Shredder/Elements/Object/RT--User +++ b/rt/share/html/Admin/Tools/Shredder/Elements/Object/RT--User @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Tools/Shredder/Elements/ObjectCheckBox b/rt/share/html/Admin/Tools/Shredder/Elements/ObjectCheckBox index fa7165dc6..20d0e02aa 100644 --- a/rt/share/html/Admin/Tools/Shredder/Elements/ObjectCheckBox +++ b/rt/share/html/Admin/Tools/Shredder/Elements/ObjectCheckBox @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Tools/Shredder/Elements/PluginArguments b/rt/share/html/Admin/Tools/Shredder/Elements/PluginArguments index 8456a8dd7..412f941b7 100644 --- a/rt/share/html/Admin/Tools/Shredder/Elements/PluginArguments +++ b/rt/share/html/Admin/Tools/Shredder/Elements/PluginArguments @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Tools/Shredder/Elements/PluginHelp b/rt/share/html/Admin/Tools/Shredder/Elements/PluginHelp index 3f064b0f6..6a8539e29 100644 --- a/rt/share/html/Admin/Tools/Shredder/Elements/PluginHelp +++ b/rt/share/html/Admin/Tools/Shredder/Elements/PluginHelp @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Tools/Shredder/Elements/SelectObjects b/rt/share/html/Admin/Tools/Shredder/Elements/SelectObjects index 0521075c0..f9f44aba0 100644 --- a/rt/share/html/Admin/Tools/Shredder/Elements/SelectObjects +++ b/rt/share/html/Admin/Tools/Shredder/Elements/SelectObjects @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Tools/Shredder/Elements/SelectPlugin b/rt/share/html/Admin/Tools/Shredder/Elements/SelectPlugin index b9d6fe6d6..28b7cbb72 100644 --- a/rt/share/html/Admin/Tools/Shredder/Elements/SelectPlugin +++ b/rt/share/html/Admin/Tools/Shredder/Elements/SelectPlugin @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Tools/Shredder/autohandler b/rt/share/html/Admin/Tools/Shredder/autohandler index 49c42340c..d8e0aa658 100644 --- a/rt/share/html/Admin/Tools/Shredder/autohandler +++ b/rt/share/html/Admin/Tools/Shredder/autohandler @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Tools/Shredder/index.html b/rt/share/html/Admin/Tools/Shredder/index.html index 01e4d167f..f5c5dff1b 100644 --- a/rt/share/html/Admin/Tools/Shredder/index.html +++ b/rt/share/html/Admin/Tools/Shredder/index.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Tools/Theme.html b/rt/share/html/Admin/Tools/Theme.html index a3f910edb..ac297e9ee 100644 --- a/rt/share/html/Admin/Tools/Theme.html +++ b/rt/share/html/Admin/Tools/Theme.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -131,14 +131,24 @@ jQuery(function($) { .text(v[0])); }); - $("style#sitecss").text($('#user_css').val()); + function update_sitecss(text) { + if (!text) + text = $('#user_css').val(); + + // IE 8 doesn't let us update the innerHTML of ").appendTo('head'); + } + + update_sitecss(); $('#try').click(function() { - $("style#sitecss").text($('#user_css').val()); + update_sitecss(); }); $('#reset').click(function() { setTimeout(function() { - $("style#sitecss").text($('#user_css').val()); + update_sitecss(); }, 1000); }); @@ -174,7 +184,7 @@ jQuery(function($) { } } $('#user_css').val(css); - $("style#sitecss").text(css); + update_sitecss(css); } $('#color-picker').farbtastic(function(color){ change_color(color, this.hsl[2] > <% $text_threshold %> ? '#000' : '#fff') }); diff --git a/rt/share/html/Admin/Tools/index.html b/rt/share/html/Admin/Tools/index.html index c14847ebd..bee491f74 100644 --- a/rt/share/html/Admin/Tools/index.html +++ b/rt/share/html/Admin/Tools/index.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Users/CustomFields.html b/rt/share/html/Admin/Users/CustomFields.html index cca0606a8..b57cfa522 100644 --- a/rt/share/html/Admin/Users/CustomFields.html +++ b/rt/share/html/Admin/Users/CustomFields.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Users/GnuPG.html b/rt/share/html/Admin/Users/GnuPG.html index fbf1a3cca..71cf22b54 100644 --- a/rt/share/html/Admin/Users/GnuPG.html +++ b/rt/share/html/Admin/Users/GnuPG.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Users/History.html b/rt/share/html/Admin/Users/History.html index 2b91b6631..d6e4aa3e8 100644 --- a/rt/share/html/Admin/Users/History.html +++ b/rt/share/html/Admin/Users/History.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Users/Memberships.html b/rt/share/html/Admin/Users/Memberships.html index cff33fa1c..ba88905ce 100644 --- a/rt/share/html/Admin/Users/Memberships.html +++ b/rt/share/html/Admin/Users/Memberships.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Users/Modify.html b/rt/share/html/Admin/Users/Modify.html index d66955660..814e7f996 100755 --- a/rt/share/html/Admin/Users/Modify.html +++ b/rt/share/html/Admin/Users/Modify.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Users/MyRT.html b/rt/share/html/Admin/Users/MyRT.html index f9055d3ad..1836b43df 100644 --- a/rt/share/html/Admin/Users/MyRT.html +++ b/rt/share/html/Admin/Users/MyRT.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/Users/index.html b/rt/share/html/Admin/Users/index.html index de9a55d36..31e1c122d 100755 --- a/rt/share/html/Admin/Users/index.html +++ b/rt/share/html/Admin/Users/index.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -70,7 +70,7 @@ jQuery(function(){ form.find('input[name=UserOp]').val('='); form.submit(); } - }); + }).addClass("autocompletes-user"); }); diff --git a/rt/share/html/Admin/autohandler b/rt/share/html/Admin/autohandler index faf7237c4..73aa47dfc 100644 --- a/rt/share/html/Admin/autohandler +++ b/rt/share/html/Admin/autohandler @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Admin/index.html b/rt/share/html/Admin/index.html index 09d0908db..ac29709d0 100755 --- a/rt/share/html/Admin/index.html +++ b/rt/share/html/Admin/index.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Approvals/Display.html b/rt/share/html/Approvals/Display.html index 562487357..b639f41a5 100755 --- a/rt/share/html/Approvals/Display.html +++ b/rt/share/html/Approvals/Display.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Approvals/Elements/Approve b/rt/share/html/Approvals/Elements/Approve index 4df5ff1b7..e9a3762bd 100755 --- a/rt/share/html/Approvals/Elements/Approve +++ b/rt/share/html/Approvals/Elements/Approve @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Approvals/Elements/PendingMyApproval b/rt/share/html/Approvals/Elements/PendingMyApproval index 475cb428b..9b34b1f81 100755 --- a/rt/share/html/Approvals/Elements/PendingMyApproval +++ b/rt/share/html/Approvals/Elements/PendingMyApproval @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Approvals/Elements/ShowDependency b/rt/share/html/Approvals/Elements/ShowDependency index 70d22eb94..c7e31769d 100755 --- a/rt/share/html/Approvals/Elements/ShowDependency +++ b/rt/share/html/Approvals/Elements/ShowDependency @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Approvals/autohandler b/rt/share/html/Approvals/autohandler index 8a6df139a..c98152837 100644 --- a/rt/share/html/Approvals/autohandler +++ b/rt/share/html/Approvals/autohandler @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Approvals/index.html b/rt/share/html/Approvals/index.html index 09392c910..97f360ac0 100755 --- a/rt/share/html/Approvals/index.html +++ b/rt/share/html/Approvals/index.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -64,6 +64,13 @@ foreach my $arg ( keys %ARGS ) { my $ticket = LoadTicket($1); + my $skip_update = 0; + $m->callback( CallbackName => 'BeforeApproval', + skip_update => \$skip_update, + Ticket => $ticket, + actions => \@actions); + next if $skip_update; + if ( $ARGS{ "Approval-" . $ticket->Id . "-Notes" } ) { my $notes = MIME::Entity->build( Data => [ $ARGS{ "Approval-" . $ticket->Id . "-Notes" } ] diff --git a/rt/share/html/Articles/Article/Delete.html b/rt/share/html/Articles/Article/Delete.html index fc695c6cb..22dc30348 100644 --- a/rt/share/html/Articles/Article/Delete.html +++ b/rt/share/html/Articles/Article/Delete.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Articles/Article/Display.html b/rt/share/html/Articles/Article/Display.html index 1b455b9b3..77a1e433c 100644 --- a/rt/share/html/Articles/Article/Display.html +++ b/rt/share/html/Articles/Article/Display.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Articles/Article/Edit.html b/rt/share/html/Articles/Article/Edit.html index 2d27b03f8..dd8f94582 100644 --- a/rt/share/html/Articles/Article/Edit.html +++ b/rt/share/html/Articles/Article/Edit.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Articles/Article/Elements/EditBasics b/rt/share/html/Articles/Article/Elements/EditBasics index ab12b394a..705cb0d19 100644 --- a/rt/share/html/Articles/Article/Elements/EditBasics +++ b/rt/share/html/Articles/Article/Elements/EditBasics @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Articles/Article/Elements/EditCustomFields b/rt/share/html/Articles/Article/Elements/EditCustomFields index 1eee87c1a..792f2220e 100644 --- a/rt/share/html/Articles/Article/Elements/EditCustomFields +++ b/rt/share/html/Articles/Article/Elements/EditCustomFields @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Articles/Article/Elements/EditLinks b/rt/share/html/Articles/Article/Elements/EditLinks index 1d86eb5be..57d733362 100644 --- a/rt/share/html/Articles/Article/Elements/EditLinks +++ b/rt/share/html/Articles/Article/Elements/EditLinks @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Articles/Article/Elements/EditTopics b/rt/share/html/Articles/Article/Elements/EditTopics index e5f9fade3..531030160 100644 --- a/rt/share/html/Articles/Article/Elements/EditTopics +++ b/rt/share/html/Articles/Article/Elements/EditTopics @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Articles/Article/Elements/LinkEntryInstructions b/rt/share/html/Articles/Article/Elements/LinkEntryInstructions index 8e6cc4eb5..23512634b 100644 --- a/rt/share/html/Articles/Article/Elements/LinkEntryInstructions +++ b/rt/share/html/Articles/Article/Elements/LinkEntryInstructions @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Articles/Article/Elements/Preformatted b/rt/share/html/Articles/Article/Elements/Preformatted index d4ab9f949..0b4ddaaaa 100644 --- a/rt/share/html/Articles/Article/Elements/Preformatted +++ b/rt/share/html/Articles/Article/Elements/Preformatted @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Articles/Article/Elements/SearchByCustomField b/rt/share/html/Articles/Article/Elements/SearchByCustomField index b86698660..188995d63 100644 --- a/rt/share/html/Articles/Article/Elements/SearchByCustomField +++ b/rt/share/html/Articles/Article/Elements/SearchByCustomField @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Articles/Article/Elements/SelectSavedSearches b/rt/share/html/Articles/Article/Elements/SelectSavedSearches index 8bf070adb..57ab8d19a 100644 --- a/rt/share/html/Articles/Article/Elements/SelectSavedSearches +++ b/rt/share/html/Articles/Article/Elements/SelectSavedSearches @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Articles/Article/Elements/SelectSearchPrivacy b/rt/share/html/Articles/Article/Elements/SelectSearchPrivacy index 01bd592ec..8fa382270 100644 --- a/rt/share/html/Articles/Article/Elements/SelectSearchPrivacy +++ b/rt/share/html/Articles/Article/Elements/SelectSearchPrivacy @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Articles/Article/Elements/ShowHistory b/rt/share/html/Articles/Article/Elements/ShowHistory index a419f2a72..d48bc0b5c 100644 --- a/rt/share/html/Articles/Article/Elements/ShowHistory +++ b/rt/share/html/Articles/Article/Elements/ShowHistory @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Articles/Article/Elements/ShowLinks b/rt/share/html/Articles/Article/Elements/ShowLinks index f90289022..8dddfc7fd 100644 --- a/rt/share/html/Articles/Article/Elements/ShowLinks +++ b/rt/share/html/Articles/Article/Elements/ShowLinks @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Articles/Article/Elements/ShowSavedSearches b/rt/share/html/Articles/Article/Elements/ShowSavedSearches index b9485e27d..8da873e61 100644 --- a/rt/share/html/Articles/Article/Elements/ShowSavedSearches +++ b/rt/share/html/Articles/Article/Elements/ShowSavedSearches @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Articles/Article/Elements/ShowSearchCriteria b/rt/share/html/Articles/Article/Elements/ShowSearchCriteria index 6430691c6..cf2884592 100644 --- a/rt/share/html/Articles/Article/Elements/ShowSearchCriteria +++ b/rt/share/html/Articles/Article/Elements/ShowSearchCriteria @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Articles/Article/Elements/ShowTopics b/rt/share/html/Articles/Article/Elements/ShowTopics index 2c805a7c0..cf62afa80 100644 --- a/rt/share/html/Articles/Article/Elements/ShowTopics +++ b/rt/share/html/Articles/Article/Elements/ShowTopics @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Articles/Article/ExtractFromTicket.html b/rt/share/html/Articles/Article/ExtractFromTicket.html index a7b15d6fc..9d4939034 100644 --- a/rt/share/html/Articles/Article/ExtractFromTicket.html +++ b/rt/share/html/Articles/Article/ExtractFromTicket.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Articles/Article/ExtractIntoClass.html b/rt/share/html/Articles/Article/ExtractIntoClass.html index b64a5a9fb..e2ddfcde4 100644 --- a/rt/share/html/Articles/Article/ExtractIntoClass.html +++ b/rt/share/html/Articles/Article/ExtractIntoClass.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -55,7 +55,7 @@ % $Classes->LimitToEnabled(); % while (my $Class = $Classes->Next) {
  • <%$Class->Name%>: -<%$Class->Description%> +<%$Class->Description || ''%>